本文整理汇总了TypeScript中protractor.ExpectedConditions.not方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ExpectedConditions.not方法的具体用法?TypeScript ExpectedConditions.not怎么用?TypeScript ExpectedConditions.not使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor.ExpectedConditions
的用法示例。
在下文中一共展示了ExpectedConditions.not方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should display different size when set presize', async () => {
let size;
const testButton = element(by.id('test-button'));
const presizeList = element(by.id('presize-list')).all(by.tagName('jigsaw-button'));
presizeList.get(0).click();
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('.jigsaw-button-clicked')))));
size = await testButton.getSize();
expect(size.width).toBe(80);
expect(size.height).toBe(20);
presizeList.get(1).click();
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('.jigsaw-button-clicked')))));
size = await testButton.getSize();
expect(size.width).toBe(80);
expect(size.height).toBe(28);
presizeList.get(2).click();
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('.jigsaw-button-clicked')))));
size = await testButton.getSize();
expect(size.width).toBe(80);
expect(size.height).toBe(36);
});
示例2: it
it('should change steps correctly when stepper button is clicked', async () => {
const previousButton = element.all(by.buttonText('Back'));
const nextButton = element.all(by.buttonText('Next'));
expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
.toBe('1\nFill out your name');
screenshot('start');
nextButton.get(0).click();
expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
.toBe('2\nFill out your address');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
screenshot('click next');
previousButton.get(0).click();
expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
.toBe('1\nFill out your name');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
screenshot('click back');
});
示例3: it
it('should prevent click handlers from executing when disabled', async () => {
await element(by.id('test-button')).click();
expect(await element(by.id('click-counter')).getText()).toEqual('1');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
await element(by.id('disable-toggle')).click();
await element(by.id('test-button')).click();
expect(await element(by.id('click-counter')).getText()).toEqual('1');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
});
示例4: it
it('should change tabs when the label is clicked', () => {
tabLabels.get(1).click();
expect(getLabelActiveStates(tabLabels)).toEqual([false, true, false]);
expect(getBodyActiveStates(tabBodies)).toEqual([false, true, false]);
browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
.then(() => screenshot('click1'));
tabLabels.get(0).click();
expect(getLabelActiveStates(tabLabels)).toEqual([true, false, false]);
expect(getBodyActiveStates(tabBodies)).toEqual([true, false, false]);
browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
.then(() => screenshot('click0'));
});
示例5: it
it('should be checked when clicked', async () => {
element(by.id('water')).click();
expect(element(by.id('water')).getAttribute('class')).toContain('mat-radio-checked');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
expect(element(by.css('input[id=water-input]')).getAttribute('checked')).toBeTruthy();
expect(element(by.css('input[id=leaf-input]')).getAttribute('checked')).toBeFalsy();
element(by.id('leaf')).click();
expect(element(by.id('leaf')).getAttribute('class')).toContain('mat-radio-checked');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
expect(element(by.css('input[id=leaf-input]')).getAttribute('checked')).toBeTruthy();
expect(element(by.css('input[id=water-input]')).getAttribute('checked')).toBeFalsy();
});
示例6: it
it('should emit checkedChange event when change the checked state', async () => {
const switchEl = element(by.id('test-switch1'));
switchEl.click();
const alert = browser.driver.switchTo().alert();
expect(alert.getText()).toBe('switch message is: true');
alert.dismiss();
await browser.wait(ExpectedConditions.not(ExpectedConditions.alertIsPresent()));
switchEl.click();
expect(browser.driver.switchTo().alert().getText()).toBe('switch message is: false');
alert.dismiss();
});
示例7: it
it('should be checked when clicked, and unchecked when clicked again', async () => {
let checkboxEl = element(by.id('test-checkbox'));
let inputEl = element(by.css('input[id=test-checkbox-input]'));
checkboxEl.click();
expect(inputEl.getAttribute('checked'))
.toBeTruthy('Expect checkbox "checked" property to be true');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
checkboxEl.click();
expect(inputEl.getAttribute('checked'))
.toBeFalsy('Expect checkbox "checked" property to be false');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
});
示例8: it
it('should not change the checked state on click when disabled', async () => {
let inputEl = getInput();
expect(inputEl.getAttribute('checked')).toBeFalsy('Expect slide-toggle to be unchecked');
element(by.css('#disabled-slide-toggle')).click();
expect(inputEl.getAttribute('checked')).toBeFalsy('Expect slide-toggle to be unchecked');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
});
示例9: it
it('should change the checked state on click', async () => {
let inputEl = getInput();
expect(inputEl.getAttribute('checked')).toBeFalsy('Expect slide-toggle to be unchecked');
getNormalToggle().click();
expect(inputEl.getAttribute('checked')).toBeTruthy('Expect slide-toggle to be checked');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
screenshot();
});
示例10: reportGame
reportGame(result: Array<Array<string>>) {
element(by.css('.app-action button')).click();
browser.wait(ExpectedConditions.presenceOf(element(by.partialButtonText('Report'))), 5 * oneSecond);
for (let i = 0; i < result.length; i++) {
for (let j = 0; j < result[i].length; j++) {
element(by.css(`input[name="name${i}.${j}"]`)).sendKeys(result[i][j]);
browser.sleep(shortSleep);
}
}
element(by.partialButtonText('Report')).click();
browser.wait(ExpectedConditions.not(ExpectedConditions.presenceOf(
element(by.tagName('app-game')))), 5 * oneSecond);
}