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


TypeScript by.repeater方法代码示例

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


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

示例1: it

 it('should wait on async function in conditional', async function() : Promise<any> {
   browser.get('http://www.angularjs.org');
   let todoList = element.all(by.repeater('todo in todoList.todos'));
   if ((await todoList.count()) > 1) {
     expect((await todoList.get(1).getText())).toEqual('build an angular app');
   }
 });
开发者ID:DeegC,项目名称:Zeidon-Northwind,代码行数:7,代码来源:spec.ts

示例2: it

    it('should be possible to control phone order via the drop-down menu', function() {
      let queryField = element(by.model('$ctrl.query'));
      let orderSelect = element(by.model('$ctrl.orderProp'));
      let nameOption = orderSelect.element(by.css('option[value="name"]'));
      let phoneNameColumn = element.all(by.repeater('phone in $ctrl.phones').column('phone.name'));

      function getNames() {
        return phoneNameColumn.map(function(elem: ElementFinder) {
          return elem.getText();
        });
      }

      queryField.sendKeys('tablet');   // Let's narrow the dataset to make the assertions shorter

      expect(getNames()).toEqual([
        'Motorola XOOM\u2122 with Wi-Fi',
        'MOTOROLA XOOM\u2122'
      ]);

      nameOption.click();

      expect(getNames()).toEqual([
        'MOTOROLA XOOM\u2122',
        'Motorola XOOM\u2122 with Wi-Fi'
      ]);
    });
开发者ID:AnthonyPAlicea,项目名称:angular,代码行数:26,代码来源:e2e-spec.ts

示例3: constructor

    constructor()
    {
        this.firstTextBox=element(by.model("first"));
        this.secondTextBox = element(by.model("second"));
        this.goButton = element(by.id("gobutton"));
        this.result = element(by.repeater("result in memory")).element(by.css("td:nth-child(3)"));

    }
开发者ID:ashutoshchittora,项目名称:TypeScriptCucumberProtractorVisualStudioCode,代码行数:8,代码来源:Calculator.ts

示例4: it

    it('should render phone specific links', function() {
      let phoneList = element.all(by.repeater('phone in $ctrl.phones'));
      let query = element(by.model('$ctrl.query'));

      query.sendKeys('nexus');
      waitForCount(phoneList, 1);

      let nexusPhone = phoneList.first();
      let detailLink = nexusPhone.all(by.css('a')).first()

      detailLink.click();
      expect(browser.getLocationAbsUrl()).toBe('/phones/nexus-s');
    });
开发者ID:BobChao87,项目名称:angular,代码行数:13,代码来源:e2e-spec.ts

示例5: it

    it('should fill the memory with past results', () => {
      first.sendKeys('1');
      second.sendKeys('1');
      goButton.click();

      first.sendKeys('10');
      second.sendKeys('20');
      goButton.click();

      let memory = element.all(by.repeater('result in memory').
          column('result.value'));
      memory.then((arr) => {
        expect(arr.length).toEqual(2);
        expect(arr[0].getText()).toEqual('30'); // 10 + 20 = 30
        expect(arr[1].getText()).toEqual('2'); // 1 + 1 = 2
      },
      // TODO: remove optional error fn
      () => {});
    });
开发者ID:angular,项目名称:protractor-cookbook,代码行数:19,代码来源:spec.ts

示例6:

export const meetingPanels = () => element.all(by.repeater("meeting in value"));
开发者ID:disco-funk,项目名称:ca-london-angular,代码行数:1,代码来源:app-elements.e2e-spec.ts

示例7: pageSizes

 get pageSizes(): ElementArrayFinder {
     return this.all(by.repeater('i in pageTracking.itemSizeList'));
 }
开发者ID:Droogans,项目名称:encore-ui,代码行数:3,代码来源:rxPaginate.page.ts

示例8:

by.model(0);
by.model(true);
by.model(() => {});
by.model();
by.model('', '');
by.buttonText(0);
by.buttonText(true);
by.buttonText(() => {});
by.buttonText();
by.buttonText('', '');
by.partialButtonText(0);
by.partialButtonText(true);
by.partialButtonText(() => {});
by.partialButtonText();
by.partialButtonText('', '');
by.repeater(0);
by.repeater(true);
by.repeater(() => {});
by.repeater();
by.repeater('', '');
by.exactRepeater(0);
by.exactRepeater(true);
by.exactRepeater(() => {});
by.exactRepeater();
by.exactRepeater('', '');
by.cssContainingText(0);
by.cssContainingText(true);
by.cssContainingText(() => {});
by.cssContainingText();
by.cssContainingText('', 0);
by.cssContainingText(0, 0);
开发者ID:HelloMQL,项目名称:protractor,代码行数:31,代码来源:test_fail_by.ts

示例9: getDataForColumn

 getDataForColumn(column: string) {
     return element.all(by.repeater('ticket in').column(column))
         .map(cell => cell.getText()).then(_.uniq).then(_.sortBy);
 }
开发者ID:Droogans,项目名称:encore-ui,代码行数:4,代码来源:rxSelectFilter.midway.ts


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