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


TypeScript ExpectedConditions.not方法代码示例

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


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

示例1: it

        it('should display different size when set presize', async () => {
            let size;
            const testButton = element(by.id('test-button'));
            const presizeList = element(by.id('presize-list')).all(by.tagName('jigsaw-button'));

            presizeList.get(0).click();
            await browser.wait(ExpectedConditions.not(
                ExpectedConditions.presenceOf(element(by.css('.jigsaw-button-clicked')))));

            size = await testButton.getSize();
            expect(size.width).toBe(80);
            expect(size.height).toBe(20);

            presizeList.get(1).click();
            await browser.wait(ExpectedConditions.not(
                ExpectedConditions.presenceOf(element(by.css('.jigsaw-button-clicked')))));
            size = await testButton.getSize();
            expect(size.width).toBe(80);
            expect(size.height).toBe(28);

            presizeList.get(2).click();
            await browser.wait(ExpectedConditions.not(
                ExpectedConditions.presenceOf(element(by.css('.jigsaw-button-clicked')))));
            size = await testButton.getSize();
            expect(size.width).toBe(80);
            expect(size.height).toBe(36);
        });
开发者ID:jiw0220,项目名称:jigsaw,代码行数:27,代码来源:button.e2e-spec.ts

示例2: it

    it('should change steps correctly when stepper button is clicked', async () => {
      const previousButton = element.all(by.buttonText('Back'));
      const nextButton = element.all(by.buttonText('Next'));

      expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
          .toBe('1\nFill out your name');

      screenshot('start');
      nextButton.get(0).click();

      expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
          .toBe('2\nFill out your address');

      await browser.wait(ExpectedConditions.not(
          ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
      screenshot('click next');

      previousButton.get(0).click();

      expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
          .toBe('1\nFill out your name');

      await browser.wait(ExpectedConditions.not(
          ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
      screenshot('click back');
    });
开发者ID:clydin,项目名称:material2,代码行数:26,代码来源:stepper-e2e.spec.ts

示例3: it

    it('should prevent click handlers from executing when disabled', async () => {
      await element(by.id('test-button')).click();
      expect(await element(by.id('click-counter')).getText()).toEqual('1');

      await browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));

      await element(by.id('disable-toggle')).click();
      await element(by.id('test-button')).click();
      expect(await element(by.id('click-counter')).getText()).toEqual('1');

      await browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
    });
开发者ID:Nodarii,项目名称:material2,代码行数:14,代码来源:button.e2e.spec.ts

示例4: it

    it('should change tabs when the label is clicked', () => {
      tabLabels.get(1).click();
      expect(getLabelActiveStates(tabLabels)).toEqual([false, true, false]);
      expect(getBodyActiveStates(tabBodies)).toEqual([false, true, false]);
      browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
        .then(() => screenshot('click1'));

      tabLabels.get(0).click();
      expect(getLabelActiveStates(tabLabels)).toEqual([true, false, false]);
      expect(getBodyActiveStates(tabBodies)).toEqual([true, false, false]);
      browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
        .then(() => screenshot('click0'));
    });
开发者ID:Daniel-McK,项目名称:material2,代码行数:15,代码来源:tabs.e2e.ts

示例5: it

    it('should be checked when clicked', async () => {
      element(by.id('water')).click();

      expect(element(by.id('water')).getAttribute('class')).toContain('mat-radio-checked');
      await browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));

      expect(element(by.css('input[id=water-input]')).getAttribute('checked')).toBeTruthy();
      expect(element(by.css('input[id=leaf-input]')).getAttribute('checked')).toBeFalsy();

      element(by.id('leaf')).click();
      expect(element(by.id('leaf')).getAttribute('class')).toContain('mat-radio-checked');

      await browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));

      expect(element(by.css('input[id=leaf-input]')).getAttribute('checked')).toBeTruthy();
      expect(element(by.css('input[id=water-input]')).getAttribute('checked')).toBeFalsy();
    });
开发者ID:OkBayat,项目名称:material2,代码行数:19,代码来源:radio-e2e.spec.ts

示例6: it

 it('should emit checkedChange event when change the checked state', async () => {
     const switchEl = element(by.id('test-switch1'));
     switchEl.click();
     const alert = browser.driver.switchTo().alert();
     expect(alert.getText()).toBe('switch message is: true');
     alert.dismiss();
     await browser.wait(ExpectedConditions.not(ExpectedConditions.alertIsPresent()));
     switchEl.click();
     expect(browser.driver.switchTo().alert().getText()).toBe('switch message is: false');
     alert.dismiss();
 });
开发者ID:jiw0220,项目名称:jigsaw,代码行数:11,代码来源:switch.e2e-spec.ts

示例7: it

    it('should be checked when clicked, and unchecked when clicked again', async () => {
      let checkboxEl = element(by.id('test-checkbox'));
      let inputEl = element(by.css('input[id=test-checkbox-input]'));

      checkboxEl.click();

      expect(inputEl.getAttribute('checked'))
          .toBeTruthy('Expect checkbox "checked" property to be true');

      await browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));

      checkboxEl.click();

      expect(inputEl.getAttribute('checked'))
          .toBeFalsy('Expect checkbox "checked" property to be false');

      await browser.wait(ExpectedConditions.not(
        ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
    });
开发者ID:OkBayat,项目名称:material2,代码行数:20,代码来源:checkbox-e2e.spec.ts

示例8: it

  it('should not change the checked state on click when disabled', async () => {
    let inputEl = getInput();

    expect(inputEl.getAttribute('checked')).toBeFalsy('Expect slide-toggle to be unchecked');

    element(by.css('#disabled-slide-toggle')).click();

    expect(inputEl.getAttribute('checked')).toBeFalsy('Expect slide-toggle to be unchecked');
    await browser.wait(ExpectedConditions.not(
      ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
  });
开发者ID:OkBayat,项目名称:material2,代码行数:11,代码来源:slide-toggle-e2e.spec.ts

示例9: it

  it('should change the checked state on click', async () => {
    let inputEl = getInput();

    expect(inputEl.getAttribute('checked')).toBeFalsy('Expect slide-toggle to be unchecked');

    getNormalToggle().click();

    expect(inputEl.getAttribute('checked')).toBeTruthy('Expect slide-toggle to be checked');
    await browser.wait(ExpectedConditions.not(
      ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
    screenshot();
  });
开发者ID:GuzmanPI,项目名称:material2,代码行数:12,代码来源:slide-toggle-e2e.spec.ts

示例10: reportGame

 reportGame(result: Array<Array<string>>) {
   element(by.css('.app-action button')).click();
   browser.wait(ExpectedConditions.presenceOf(element(by.partialButtonText('Report'))), 5 * oneSecond);
   for (let i = 0; i < result.length; i++) {
     for (let j = 0; j < result[i].length; j++) {
       element(by.css(`input[name="name${i}.${j}"]`)).sendKeys(result[i][j]);
       browser.sleep(shortSleep);
     }
   }
   element(by.partialButtonText('Report')).click();
   browser.wait(ExpectedConditions.not(ExpectedConditions.presenceOf(
     element(by.tagName('app-game')))), 5 * oneSecond);
 }
开发者ID:lrem,项目名称:ladders,代码行数:13,代码来源:app.po.ts


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