本文整理匯總了TypeScript中@stencil/core/testing.E2EPage.waitForChanges方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript E2EPage.waitForChanges方法的具體用法?TypeScript E2EPage.waitForChanges怎麽用?TypeScript E2EPage.waitForChanges使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@stencil/core/testing.E2EPage
的用法示例。
在下文中一共展示了E2EPage.waitForChanges方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should render with hint', async () => {
element.setProperty('hint', 'this is a hint');
await page.waitForChanges();
// tslint:disable-next-line:max-line-length
const tagsRenderExpected = `<div class=\"dot-field__label\"><label for=\"Address\">Address:</label></div><textarea id=\"Address\" name=\"Address\"></textarea><span class=\"dot-field__hint\">this is a hint</span>`;
expect(element.innerHTML).toBe(tagsRenderExpected);
});
示例2: it
it('should show invalid range validation message', async () => {
element.setProperty('value', '2015-10-01');
await input.press('2');
await page.waitForChanges();
const errorMessage = await page.find('.dot-field__error-meessage');
expect(errorMessage.innerHTML).toBe('Invalid Date Range');
});
示例3: it
it('should be valid, touched & dirty ', async () => {
await page.click('input');
await page.waitForChanges();
expect(element.classList.contains('dot-valid')).toBe(true);
expect(element.classList.contains('dot-dirty')).toBe(true);
expect(element.classList.contains('dot-touched')).toBe(true);
});
示例4: it
it('should clear value, set pristine and untouched when input set reset', async () => {
element.callMethod('reset');
await page.waitForChanges();
expect(element.classList.contains('dot-pristine')).toBe(true);
expect(element.classList.contains('dot-untouched')).toBe(true);
expect(element.classList.contains('dot-invalid')).toBe(true);
expect(await input.getProperty('value')).toBe('');
});
示例5: it
it('should be invalid, touched & dirty and the error msg should display', async () => {
await page.click('input');
await page.waitForChanges();
// tslint:disable-next-line:max-line-length
expect(element.outerHTML).toBe(`<dot-checkbox name=\"testName\" label=\"testLabel\" hint=\"testHint\" options=\"valueA|1,valueB|2,valueC|3\" value=\"1\" required-message=\"testErrorMsg\" required=\"true\" class=\"dot-required hydrated dot-invalid dot-dirty dot-touched\"><div class=\"dot-field__label\"><label for=\"testName\">testLabel</label><span class=\"dot-field__required-mark\">*</span></div><input class=\"dot-field__error\" type=\"checkbox\" id=\"1\" value=\"1\"><div class=\"dot-field__label\"><label for=\"1\">valueA</label></div><input class=\"dot-field__error\" type=\"checkbox\" id=\"2\" value=\"2\"><div class=\"dot-field__label\"><label for=\"2\">valueB</label></div><input class=\"dot-field__error\" type=\"checkbox\" id=\"3\" value=\"3\"><div class=\"dot-field__label\"><label for=\"3\">valueC</label></div><span class=\"dot-field__hint\">testHint</span><span class=\"dot-field__error-meessage\">testErrorMsg</span></dot-checkbox>`);
expect(element.classList.contains('dot-invalid')).toBe(true);
expect(element.classList.contains('dot-dirty')).toBe(true);
expect(element.classList.contains('dot-touched')).toBe(true);
});