当前位置: 首页>>代码示例>>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;未经允许,请勿转载。