当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript protractor.ExpectedConditions.invisibilityOf方法代码示例

本文整理汇总了TypeScript中protractor.protractor.ExpectedConditions.invisibilityOf方法的典型用法代码示例。如果您正苦于以下问题:TypeScript protractor.ExpectedConditions.invisibilityOf方法的具体用法?TypeScript protractor.ExpectedConditions.invisibilityOf怎么用?TypeScript protractor.ExpectedConditions.invisibilityOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在protractor.protractor.ExpectedConditions的用法示例。


在下文中一共展示了protractor.ExpectedConditions.invisibilityOf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it('saving a file should work', async () => {
        let saveBtn = element(by.css('sd-device-toolbar .save')),
            filesLink = element(by.css('.primary-sidebar a.files'));

        saveBtn.click();
        browser.wait(protractor.ExpectedConditions.visibilityOf(element(by.css('.save-modal'))), 1000);
        // No filename is there by default if the tab is pristine
        expect(await element(by.css('.save-modal input[name="filename"]')).getAttribute('value')).toBe('');
        // Cancel
        element(by.css('.save-modal .modal-footer button[data-dismiss="modal"]')).click();
        browser.wait(protractor.ExpectedConditions.stalenessOf(element(by.css('.modal-backdrop'))), 1000);

        // Let's rename the tab
        browser.executeScript('arguments[0].click()', element(by.css('.edit-tab')));
        browser.wait(protractor.ExpectedConditions.visibilityOf(element(by.css('.tab-title-editor'))), 1000);
        element(by.css('.tab-title-editor')).sendKeys('New title');
        element(by.css('.tab-title-editor')).sendKeys(protractor.Key.ENTER);
        browser.wait(protractor.ExpectedConditions.invisibilityOf(element(by.css('.tab-title-editor'))), 1000);

        // Now we click the save button again
        saveBtn.click();
        browser.wait(protractor.ExpectedConditions.visibilityOf(element(by.css('.save-modal'))), 1000);
        // The title is there as a default for the filename
        expect(await element(by.css('.save-modal input[name="filename"]')).getAttribute('value')).toBe('New title');
        // Save
        element(by.css('.save-modal .modal-footer .btn-primary')).click();
        browser.wait(protractor.ExpectedConditions.stalenessOf(element(by.css('.modal-backdrop'))), 1000);
        filesLink.click();
        expect(await element.all(by.css('.secondary-sidebar .files li')).count()).toBe(1);
        expect(await element(by.css('.secondary-sidebar .files .filename')).getText()).toMatch('New title');
        expect(await element(by.css('.secondary-sidebar .files .size')).getText()).toBe('0 bytes');

        browser.executeScript('localStorage.removeItem("zephyrjs-ide.FILES.New title");');
        filesLink.click();
        let closeTabBtn = element(by.css('#tab-bar .nav-item.active .close-tab'));
        closeTabBtn.click();
    });
开发者ID:baleboy,项目名称:zephyrjs-ide,代码行数:37,代码来源:editor.component.e2e-spec.ts

示例2: element

      return element.all(by.css('.e2e-language-modal .button')).first().click().then(() => {
        const el = element(by.css('.e2e-language-modal'));

        return browser.wait(protractor.ExpectedConditions.invisibilityOf(el), 5000).then(() => true);
      });
开发者ID:skycoin,项目名称:skycoin,代码行数:5,代码来源:onboarding.po.ts


注:本文中的protractor.protractor.ExpectedConditions.invisibilityOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。