-
-
Notifications
You must be signed in to change notification settings - Fork 835
Expand file tree
/
Copy pathattribute-basic.test.tsx
More file actions
28 lines (24 loc) · 1021 Bytes
/
attribute-basic.test.tsx
File metadata and controls
28 lines (24 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { h } from '@stencil/core';
import { render } from '@wdio/browser-runner/stencil';
import { $, expect } from '@wdio/globals';
describe('attribute-basic', () => {
before(async () => {
render({
template: () => <attribute-basic-root></attribute-basic-root>,
});
});
it('button click rerenders', async () => {
await $('attribute-basic.hydrated').waitForExist();
await expect($('.single')).toHaveText('single');
await expect($('.multiWord')).toHaveText('multiWord');
await expect($('.customAttr')).toHaveText('my-custom-attr');
await expect($('.htmlForLabel')).toHaveAttribute('for', 'a');
await expect($('.getter')).toHaveText('getter');
const button = await $('button');
await button.click();
await expect($('.single')).toHaveText('single-update');
await expect($('.multiWord')).toHaveText('multiWord-update');
await expect($('.customAttr')).toHaveText('my-custom-attr-update');
await expect($('.getter')).toHaveText('getter-update');
});
});