本文整理汇总了TypeScript中protractor.ExpectedConditions类的典型用法代码示例。如果您正苦于以下问题:TypeScript ExpectedConditions类的具体用法?TypeScript ExpectedConditions怎么用?TypeScript ExpectedConditions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ExpectedConditions类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: selectFromFile
// Select BND from BNA file drop
static selectFromFile(filePath: string) {
// Import modal should be present
return browser.wait(ExpectedConditions.visibilityOf(element(by.css('.import'))), Constants.shortWait)
.then(() => {
let inputFileElement = element(by.id('file-importer_input'));
dragDropFile(inputFileElement, filePath);
return true;
});
}
示例2: it
it('should be using Thai Semantic Domain after refresh', () => {
Utils.clickBreadcrumb(constants.testProjectName);
editorPage.browse.findEntryByLexeme(constants.testEntry1.lexeme.th.value).click();
expect<any>(editorPage.edit.semanticDomain.values.first().getText()).toEqual(semanticDomain1dot1Thai);
expect<any>(editorPage.edit.entryCountElem.isDisplayed()).toBe(true);
browser.refresh();
browser.wait(ExpectedConditions.visibilityOf(editorPage.edit.entryCountElem), Utils.conditionTimeout);
expect<any>(editorPage.edit.semanticDomain.values.first().getText()).toEqual(semanticDomain1dot1Thai);
});
示例3: it
it('should allows modifications - icon', async () => {
await page.iconButton$.click();
browser.wait(ExpectedConditions.visibilityOf(modalPageIconSelection), navigateSleep);
const title = await modalPageIconSelection_title.getText();
expect(title).toEqual('Select an icon');
});
示例4: it
it('System Admin can manage project', () => {
loginPage.loginAsAdmin();
settingsPage.get(constants.testProjectName);
expect<any>(settingsPage.noticeList.count()).toBe(0);
// Archive tab currently disabled
/*
managementPage.tabs.archive.click();
expect(managementPage.archiveTab.archiveButton.isDisplayed()).toBe(true);
expect(managementPage.archiveTab.archiveButton.isEnabled()).toBe(true);
*/
browser.wait(ExpectedConditions.elementToBeClickable(settingsPage.tabs.remove), constants.conditionTimeout);
browser.actions().mouseMove(settingsPage.tabs.remove).click().perform();
// settingsPage.tabs.remove.click();
browser.wait(ExpectedConditions.visibilityOf(settingsPage.deleteTab.deleteButton), constants.conditionTimeout);
expect<any>(settingsPage.deleteTab.deleteButton.isDisplayed()).toBe(true);
expect<any>(settingsPage.deleteTab.deleteButton.isEnabled()).toBe(false);
});
示例5: it
it('should be disabled when disable the radio group', async () => {
element(by.id('toggle-disable')).click();
element(by.id('water')).click();
expect(element(by.id('water')).getAttribute('class')).toContain('mat-radio-disabled');
await browser.wait(ExpectedConditions.presenceOf(element(by.css('.mat-radio-disabled'))));
expect(element(by.css('input[id=water-input]')).getAttribute('disabled')).toBeTruthy();
element(by.id('leaf')).click();
expect(element(by.id('leaf')).getAttribute('class')).toContain('mat-radio-disabled');
await browser.wait(ExpectedConditions.not(
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
expect(element(by.css('input[id=leaf-input]')).getAttribute('disabled')).toBeTruthy();
});
示例6: it
it('redirects to projects page if already logged in', () => {
BellowsLoginPage.logout();
loginPage.loginAsUser();
SignupPage.get();
browser.wait(ExpectedConditions.urlContains('projects'), constants.conditionTimeout);
browser.getCurrentUrl().then(() => {
expect(browser.getCurrentUrl()).toContain('/app/projects');
});
});
示例7: it
it('can change the role of a member', () => {
projectSettingsPage.membersTab.listFilter.sendKeys('dude');
browser.wait(ExpectedConditions.visibilityOf(projectSettingsPage.membersTab.list.first()
.element(by.model('user.role'))));
Utils.clickDropdownByValue(projectSettingsPage.membersTab.list.first().element(by.model('user.role')), 'Manager');
expect<any>(projectSettingsPage.membersTab.list.first().element(by.model('user.role'))
.element(by.css('option:checked')).getText()).toEqual('Manager');
projectSettingsPage.membersTab.listFilter.clear();
});
示例8: it
it('should create a build with a dedicated reason and cancel it', async () => {
await builder.go();
await builder.goForce();
let cancelButton = force.getCancelButton();
await browser.wait(EC.elementToBeClickable(cancelButton),
5000,
"cancel button not clickable");
await cancelButton.click();
});
示例9: goBuildAndClose
async goBuildAndClose() {
await this.goBuild();
const popupClose = element.all(By.css('i.fa-times')).first();
await browser.wait(EC.elementToBeClickable(popupClose),
5000,
"popup close not clickable");
await popupClose.click();
const dialogIsPresent = await $('modal-dialog').isPresent();
expect(dialogIsPresent).toBeFalsy();
}