本文整理匯總了TypeScript中@angular/cdk/testing/e2e.expectToExist函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript expectToExist函數的具體用法?TypeScript expectToExist怎麽用?TypeScript expectToExist使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了expectToExist函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should open menu when the trigger is clicked', async () => {
await expectToExist(menuSelector, false);
await page.trigger().click();
await expectToExist(menuSelector);
expect(await page.menu().getText()).toEqual('One\nTwo\nThree\nFour');
});
示例2: it
it('should close by clicking on the "close" button', async () => {
await element(by.id('default')).click();
await waitForDialog();
await element(by.id('close')).click();
await expectToExist('mat-dialog-container', false);
});
示例3: async
async () => {
await element(by.id('default')).click();
await waitForDialog();
await clickElementAtPoint('mat-dialog-container', { x: 0, y: 0 });
await pressKeys(Key.ESCAPE);
await expectToExist('mat-dialog-container', false);
});
示例4: it
it('should render a slide-toggle', async () => {
await expectToExist('mat-slide-toggle');
});