當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript By.repeater方法代碼示例

本文整理匯總了TypeScript中protractor.By.repeater方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript By.repeater方法的具體用法?TypeScript By.repeater怎麽用?TypeScript By.repeater使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在protractor.By的用法示例。


在下文中一共展示了By.repeater方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

 it('the most recent pairs are shown', function () {
     const pairElements = element.all(By.repeater('pair in pairAssignments.pairAssignments.pairs'));
     const firstPair = pairElements.get(0).all(By.repeater('player in pair'));
     expect(firstPair.getText()).toEqual(pluck('name', [player1, player3]));
     const secondPair = pairElements.get(1).all(By.repeater('player in pair'));
     expect(secondPair.getText()).toEqual(pluck('name', [player5]));
 });
開發者ID:robertfmurdock,項目名稱:Coupling,代碼行數:7,代碼來源:pair-assignments.e2e.ts

示例2: it

        it('spinning with two players disabled will only yield one pair and then saving persists the pair', function () {
            const playerElements = element.all(By.repeater('selectable in prepare.selectablePlayers'));
            expect(playerElements.count()).toEqual(5);

            playerElements.get(0).element(By.css('.player-icon')).click();
            playerElements.get(2).element(By.css('.player-icon')).click();
            playerElements.get(3).element(By.css('.player-icon')).click();

            spinButton.click();

            const pairs = element.all(By.repeater('pair in pairAssignments.pairAssignments.pairs'));
            expect(pairs.count()).toEqual(1);
            const players = element.all(By.repeater('player in players'));
            expect(players.count()).toEqual(3);

            const saveButton = element(By.id('save-button'));
            saveButton.click();

            browser.wait(async () => false === await saveButton.isDisplayed(), 2000);

            expect(pairs.count()).toEqual(1);
            expect(players.count()).toEqual(3);
        });
開發者ID:robertfmurdock,項目名稱:Coupling,代碼行數:23,代碼來源:prepare-to-spin.e2e.ts

示例3:

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

示例4: it

 it('will show all players', function () {
     browser.setLocation(`/${tribe.id}/player/new`);
     const playerElements = element.all(By.repeater('player in players'));
     expect(playerElements.getText()).toEqual(pluck('name', players));
 });
開發者ID:robertfmurdock,項目名稱:Coupling,代碼行數:5,代碼來源:edit-player.e2e.ts


注:本文中的protractor.By.repeater方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。