本文整理匯總了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();
}