當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。