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


TypeScript ExpectedConditions.visibilityOf方法代碼示例

本文整理匯總了TypeScript中protractor.ExpectedConditions.visibilityOf方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ExpectedConditions.visibilityOf方法的具體用法?TypeScript ExpectedConditions.visibilityOf怎麽用?TypeScript ExpectedConditions.visibilityOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在protractor.ExpectedConditions的用法示例。


在下文中一共展示了ExpectedConditions.visibilityOf方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

 it('can update an existing template', () => {
   projectSettingsPage.templatesTab.list.last().element(by.linkText('sound check')).click();
   browser.wait(ExpectedConditions.visibilityOf(projectSettingsPage.templatesTab.editor.saveButton),
     Utils.conditionTimeout);
   expect<any>(projectSettingsPage.templatesTab.editor.saveButton.isDisplayed()).toBe(true);
   projectSettingsPage.templatesTab.editor.title.clear();
   projectSettingsPage.templatesTab.editor.title.sendKeys('test12');
   projectSettingsPage.templatesTab.editor.saveButton.click();
   browser.wait(ExpectedConditions.invisibilityOf(projectSettingsPage.templatesTab.editor.saveButton),
     Utils.conditionTimeout);
   expect<any>(projectSettingsPage.templatesTab.editor.saveButton.isDisplayed()).toBe(false);
   expect<any>(projectSettingsPage.templatesTab.list.count()).toBe(3);
 });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:13,代碼來源:sf-checks-project-settings.e2e-spec.ts

示例2: cancelImport

  // Cancel import
  static cancelImport() {
      // Import drawer should be present, button should be visible within chosen-network div
      browser.wait(ExpectedConditions.visibilityOf(element(by.css('.chosen-network'))), Constants.longWait);

      // Wait for poplation of sample-network-list-item(s)
      OperationsHelper.retrieveMatchingElementsByCSS('.sample-network-list-container', '.sample-network-list-item', 3)
      .then(() => {
        let cancelElement = element(by.id('import_cancel'));
        browser.executeScript('arguments[0].scrollIntoView();', cancelElement.getWebElement());
        OperationsHelper.click(cancelElement);
        browser.wait(ExpectedConditions.invisibilityOf(element(by.css('.drawer'))), Constants.longWait);
      });
  }
開發者ID:bloonbullet,項目名稱:composer,代碼行數:14,代碼來源:import.ts

示例3: it

  it('can successfully changes user\'s password after form submission', () => {
    changePasswordPage.password.sendKeys(newPassword);
    changePasswordPage.confirm.sendKeys(newPassword);
    browser.wait(ExpectedConditions.visibilityOf(changePasswordPage.passwordMatchImage), constants.conditionTimeout);
    browser.wait(ExpectedConditions.elementToBeClickable(changePasswordPage.submitButton), constants.conditionTimeout);
    changePasswordPage.submitButton.click();
    expect<any>(changePasswordPage.noticeList.count()).toBe(1);
    expect(changePasswordPage.noticeList.first().getText()).toContain('Password updated');
    BellowsLoginPage.logout();

    loginPage.login(constants.memberUsername, newPassword);
    browser.wait(ExpectedConditions.visibilityOf(header.myProjects.button), constants.conditionTimeout);
    expect<any>(header.myProjects.button.isDisplayed()).toBe(true);

    // reset password back to original
    changePasswordPage.get();
    changePasswordPage.password.sendKeys(constants.memberPassword);
    changePasswordPage.confirm.sendKeys(constants.memberPassword);
    browser.wait(ExpectedConditions.visibilityOf(changePasswordPage.passwordMatchImage), constants.conditionTimeout);
    browser.wait(ExpectedConditions.elementToBeClickable(changePasswordPage.submitButton), constants.conditionTimeout);
    changePasswordPage.submitButton.click();
  });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:22,代碼來源:change-password.e2e-spec.ts

示例4: it

    it('should login successfully with admin account', async () => {
        await browser.get('/');
        signInPage = await navBarPage.getSignInPage();

        const expect1 = /global.form.username/;
        const value1 = await element(by.className('username-label')).getAttribute('jhiTranslate');
        expect(value1).toMatch(expect1);
        await signInPage.autoSignInUsing('admin', 'admin');

        const expect2 = /home.logged.message/;
        const value2 = element(by.id('home-logged-message'));
        await browser.wait(ec.visibilityOf(value2), 5000);
        expect(await value2.getAttribute('jhiTranslate')).toMatch(expect2);
    });
開發者ID:PierreBesson,項目名稱:jhipster-sample-app,代碼行數:14,代碼來源:account.spec.ts

示例5: selectBusinessNetworkDefinitionFromFile

 // Select BND from BNA file drop
 static selectBusinessNetworkDefinitionFromFile(filePath: string) {
   // Import modal should be present
   return browser.wait(ExpectedConditions.visibilityOf(element(by.css('.import'))), 10000)
   .then(() => {
       let inputFileElement = element(by.id('file-importer_input'));
       return dragDropFile(inputFileElement, filePath);
   })
   .then(() => {
       let importElement = element(by.id('import_confirm'));
       return browser.wait(ExpectedConditions.elementToBeClickable(importElement), 10000)
       .then(() => {
           return importElement.click();
       });
   });
 }
開發者ID:GitWhiskey,項目名稱:composer,代碼行數:16,代碼來源:import.ts

示例6: it

    it('cannot request for non-existent user', () => {
      BellowsForgotPasswordPage.get();
      expect<any>(forgotPasswordPage.infoMessages.count()).toBe(0);
      expect<any>(forgotPasswordPage.errors.count()).toBe(0);
      forgotPasswordPage.usernameInput.sendKeys(constants.unusedUsername);
      forgotPasswordPage.submitButton.click();
      browser.wait(ExpectedConditions.visibilityOf(forgotPasswordPage.errors.get(0)), constants.conditionTimeout);
      expect<any>(forgotPasswordPage.errors.count()).toBe(1);
      expect<any>(forgotPasswordPage.errors.first().getText()).toContain('User not found');
      forgotPasswordPage.usernameInput.clear();

      // clear errors so that afterEach appFrame error check doesn't fail, see project-settings.e2e-spec.js
      browser.refresh();
      expect<any>(forgotPasswordPage.errors.count()).toBe(0);
    });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:15,代碼來源:reset-forgotten-password.e2e-spec.ts

示例7: it

      it('Login with new username and revert to original username', () => {
        // user is automatically logged out and taken to login page when username is changed
        browser.wait(ExpectedConditions.visibilityOf(loginPage.username), constants.conditionTimeout);
        expect<any>(loginPage.infoMessages.count()).toBe(1);
        expect(loginPage.infoMessages.first().getText()).toContain('Username changed. Please login.');

        loginPage.login(newUsername, password);

        userProfile.getMyAccount();
        expect<any>(userProfile.myAccountTab.username.getAttribute('value')).toEqual(newUsername);
        userProfile.myAccountTab.updateUsername(expectedUsername);
        userProfile.myAccountTab.saveBtn.click();
        Utils.clickModalButton('Save changes');
        BellowsLoginPage.get();
      });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:15,代碼來源:user-profile.e2e-spec.ts

示例8: it

    it('create: new empty project', () => {
      NewLexProjectPage.get();
      page.chooserPage.createButton.click();
      page.namePage.projectNameInput.sendKeys(constants.emptyProjectName + Key.TAB);
      browser.wait(ExpectedConditions.visibilityOf(page.namePage.projectCodeOk), constants.conditionTimeout);
      expect<any>(page.namePage.projectCodeExists.isPresent()).toBe(false);
      expect<any>(page.namePage.projectCodeAlphanumeric.isPresent()).toBe(false);
      expect<any>(page.namePage.projectCodeOk.isDisplayed()).toBe(true);
      expect<any>(page.nextButton.isEnabled()).toBe(true);

      // added sleep to ensure state is stable so the next test passes (expectFormIsNotValid)
      browser.sleep(500);
      page.nextButton.click();
      expect<any>(page.namePage.projectNameInput.isPresent()).toBe(false);
      expect<any>(page.initialDataPage.browseButton.isPresent()).toBe(true);
    });
開發者ID:,項目名稱:,代碼行數:16,代碼來源:

示例9: it

 it('Manager can delete if owner', () => {
   if (!browser.baseUrl.startsWith('http://jamaicanpsalms') && !browser.baseUrl.startsWith('https://jamaicanpsalms')) {
     loginPage.loginAsManager();
     settingsPage.get(constants.fourthProjectName);
     expect<any>(settingsPage.noticeList.count()).toBe(0);
     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);
     settingsPage.deleteTab.deleteBoxText.sendKeys('DELETE');
     expect<any>(settingsPage.deleteTab.deleteButton.isEnabled()).toBe(true);
     settingsPage.deleteTab.deleteButton.click();
     Utils.clickModalButton('Delete');
     projectsPage.get();
     expect<any>(projectsPage.projectsList.count()).toBe(3);
   }
 });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:17,代碼來源:project-settings.e2e-spec.ts

示例10: it

  it('should create a third new position on sumbmit', () => {
    expect(element(by.id('submit')).isPresent()).toBe(true);
    expect(element(by.id('submit')).isEnabled()).toBe(false);

    const table = element(by.id('positions'));
    expect(table.isPresent()).toBe(true);
    const rows = table.$$('tr');
    expect(rows.count()).toBe(2);

    element(by.css('input[formcontrolname=newName]')).sendKeys('Position 3');
    expect(element(by.id('submit')).isEnabled()).toBe(true);

    element(by.id('submit')).click();
    browser.wait(ExpectedConditions.visibilityOf(element(by.id('name-2'))), 5000) ;
    expect(element(by.id('submit')).isEnabled()).toBe(false);
    expect(element(by.id('name-2')).getAttribute('value')).toBe('Position 3');
  });
開發者ID:PloughingAByteField,項目名稱:tiatus,代碼行數:17,代碼來源:positions.e2e.ts


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