當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript protractor.ExpectedConditions類代碼示例

本文整理匯總了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;
   });
 }
開發者ID:bloonbullet,項目名稱:composer,代碼行數:10,代碼來源:add-file.ts

示例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);
 });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:9,代碼來源:semantic-domains.e2e-spec.ts

示例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');
        });
開發者ID:rlasjunies,項目名稱:kct,代碼行數:9,代碼來源:timer-config.e2e-spec.ts

示例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);
  });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:18,代碼來源:project-settings.e2e-spec.ts

示例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();
    });
開發者ID:OkBayat,項目名稱:material2,代碼行數:18,代碼來源:radio-e2e.spec.ts

示例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');
   });
 });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:9,代碼來源:signup.e2e-spec.ts

示例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();
 });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:9,代碼來源:sf-checks-project-settings.e2e-spec.ts

示例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();
 });
開發者ID:s0undt3ch,項目名稱:buildbot,代碼行數:9,代碼來源:reason_force.scenarios.ts

示例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();
 }
開發者ID:ewongbb,項目名稱:buildbot,代碼行數:10,代碼來源:waterfall.ts


注:本文中的protractor.ExpectedConditions類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。