-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy pathpicker-column-option.spec.ts
More file actions
31 lines (24 loc) · 975 Bytes
/
picker-column-option.spec.ts
File metadata and controls
31 lines (24 loc) · 975 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
29
30
31
import { newSpecPage } from '@stencil/core/testing';
import { PickerColumnOption } from '../picker-column-option';
describe('picker column option', () => {
it('should be enabled by default', async () => {
const page = await newSpecPage({
components: [PickerColumnOption],
html: `
<ion-picker-column-option value="test">Test</ion-picker-column-otion>
`,
});
const option = page.body.querySelector('ion-picker-column-option')!;
await expect(option.classList.contains('option-disabled')).toEqual(false);
});
it('should be disabled if specified', async () => {
const page = await newSpecPage({
components: [PickerColumnOption],
html: `
<ion-picker-column-option disabled="true" value="test">Test</ion-picker-column-otion>
`,
});
const option = page.body.querySelector('ion-picker-column-option')!;
await expect(option.classList.contains('option-disabled')).toEqual(true);
});
});