本文整理汇总了TypeScript中@stencil/core/testing.E2EPage.click方法的典型用法代码示例。如果您正苦于以下问题:TypeScript E2EPage.click方法的具体用法?TypeScript E2EPage.click怎么用?TypeScript E2EPage.click使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@stencil/core/testing.E2EPage
的用法示例。
在下文中一共展示了E2EPage.click方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: 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);
});
示例2: 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);
});