@crowdstrike/glide-core 0.9.6 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -53
- package/dist/accordion.d.ts +10 -10
- package/dist/accordion.js +1 -1
- package/dist/accordion.stories.d.ts +0 -1
- package/dist/accordion.styles.js +36 -38
- package/dist/accordion.test.basics.js +13 -95
- package/dist/accordion.test.events.js +21 -33
- package/dist/accordion.test.focus.d.ts +1 -0
- package/dist/accordion.test.focus.js +11 -0
- package/dist/accordion.test.interactions.d.ts +1 -0
- package/dist/accordion.test.interactions.js +75 -0
- package/dist/button-group.button.d.ts +2 -4
- package/dist/button-group.button.js +1 -1
- package/dist/button-group.button.styles.js +6 -14
- package/dist/button-group.button.test.basics.js +8 -17
- package/dist/button-group.button.test.interactions.js +4 -4
- package/dist/button-group.d.ts +0 -2
- package/dist/button-group.test.basics.js +10 -10
- package/dist/button-group.test.events.js +2 -2
- package/dist/button-group.test.interactions.js +1 -1
- package/dist/button.d.ts +7 -10
- package/dist/button.js +1 -1
- package/dist/button.styles.js +4 -7
- package/dist/button.test.basics.js +10 -26
- package/dist/button.test.events.js +9 -9
- package/dist/checkbox-group.d.ts +3 -4
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox-group.styles.js +13 -1
- package/dist/checkbox-group.test.basics.js +8 -12
- package/dist/checkbox-group.test.focus.js +7 -7
- package/dist/checkbox-group.test.interactions.d.ts +1 -0
- package/dist/checkbox-group.test.interactions.js +82 -0
- package/dist/checkbox.d.ts +5 -4
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.styles.js +35 -15
- package/dist/checkbox.test.basics.js +6 -15
- package/dist/checkbox.test.events.js +9 -0
- package/dist/checkbox.test.focus.js +4 -2
- package/dist/checkbox.test.interactions.js +11 -11
- package/dist/drawer.d.ts +2 -5
- package/dist/drawer.js +1 -1
- package/dist/drawer.test.accessibility.js +8 -8
- package/dist/drawer.test.basics.js +16 -16
- package/dist/drawer.test.closing.js +18 -16
- package/dist/drawer.test.events.js +13 -24
- package/dist/drawer.test.methods.js +22 -22
- package/dist/dropdown.d.ts +7 -5
- package/dist/dropdown.js +1 -1
- package/dist/dropdown.option.d.ts +2 -3
- package/dist/dropdown.option.js +1 -1
- package/dist/dropdown.option.styles.js +31 -19
- package/dist/dropdown.option.test.basics.js +4 -4
- package/dist/dropdown.option.test.events.js +9 -1
- package/dist/dropdown.option.test.interactions.single.js +2 -2
- package/dist/dropdown.styles.js +39 -3
- package/dist/dropdown.test.basics.d.ts +1 -1
- package/dist/dropdown.test.basics.js +27 -14
- package/dist/dropdown.test.basics.multiple.js +65 -32
- package/dist/dropdown.test.basics.single.js +49 -0
- package/dist/dropdown.test.events.filterable.js +13 -2
- package/dist/dropdown.test.focus.filterable.js +12 -3
- package/dist/dropdown.test.focus.js +18 -2
- package/dist/dropdown.test.form.multiple.js +3 -2
- package/dist/dropdown.test.interactions.filterable.js +141 -45
- package/dist/dropdown.test.interactions.js +24 -0
- package/dist/dropdown.test.interactions.multiple.js +87 -30
- package/dist/dropdown.test.interactions.single.js +40 -4
- package/dist/form-controls-layout.d.ts +0 -2
- package/dist/icon-button.d.ts +2 -4
- package/dist/icon-button.js +1 -1
- package/dist/icon-button.test.basics.js +14 -82
- package/dist/icon-button.test.focus.d.ts +1 -0
- package/dist/icon-button.test.focus.js +13 -0
- package/dist/input.d.ts +4 -5
- package/dist/input.js +1 -1
- package/dist/input.styles.js +4 -4
- package/dist/input.test.basics.js +0 -52
- package/dist/input.test.events.js +27 -27
- package/dist/input.test.focus.js +27 -26
- package/dist/input.test.form.js +6 -6
- package/dist/input.test.validity.js +130 -130
- package/dist/label.d.ts +1 -3
- package/dist/label.js +1 -1
- package/dist/label.styles.js +5 -6
- package/dist/label.test.basics.js +4 -4
- package/dist/library/ow.js +1 -1
- package/dist/menu.button.d.ts +0 -2
- package/dist/menu.button.test.basics.js +3 -3
- package/dist/menu.d.ts +1 -4
- package/dist/menu.js +1 -1
- package/dist/menu.link.d.ts +1 -2
- package/dist/menu.link.js +1 -1
- package/dist/menu.options.d.ts +0 -2
- package/dist/menu.test.events.js +6 -6
- package/dist/menu.test.focus.js +5 -18
- package/dist/menu.test.interactions.js +48 -24
- package/dist/modal.d.ts +6 -17
- package/dist/modal.icon-button.d.ts +0 -2
- package/dist/modal.icon-button.test.basics.js +3 -3
- package/dist/modal.js +1 -1
- package/dist/modal.styles.js +13 -19
- package/dist/modal.tertiary-icon.d.ts +0 -3
- package/dist/modal.tertiary-icon.test.basics.js +3 -3
- package/dist/modal.test.basics.js +9 -5
- package/dist/modal.test.close.js +2 -2
- package/dist/modal.test.events.js +2 -2
- package/dist/radio-group.d.ts +0 -3
- package/dist/radio-group.js +1 -1
- package/dist/radio-group.test.basics.js +61 -61
- package/dist/radio-group.test.events.js +13 -13
- package/dist/radio-group.test.focus.js +1 -1
- package/dist/radio-group.test.form.js +2 -2
- package/dist/radio-group.test.validity.js +12 -12
- package/dist/radio.d.ts +0 -3
- package/dist/radio.styles.js +4 -12
- package/dist/split-button.d.ts +8 -11
- package/dist/split-button.js +1 -1
- package/dist/split-button.primary-button.d.ts +21 -0
- package/dist/split-button.primary-button.js +1 -0
- package/dist/split-button.primary-button.styles.js +96 -0
- package/dist/split-button.primary-button.test.basics.d.ts +1 -0
- package/dist/split-button.primary-button.test.basics.js +31 -0
- package/dist/split-button.primary-button.test.focus.d.ts +1 -0
- package/dist/split-button.primary-button.test.focus.js +14 -0
- package/dist/split-button.primary-link.d.ts +19 -0
- package/dist/split-button.primary-link.js +1 -0
- package/dist/split-button.primary-link.test.basics.d.ts +1 -0
- package/dist/split-button.primary-link.test.basics.js +30 -0
- package/dist/split-button.primary-link.test.focus.d.ts +1 -0
- package/dist/split-button.primary-link.test.focus.js +15 -0
- package/dist/split-button.secondary-button.d.ts +25 -0
- package/dist/split-button.secondary-button.js +1 -0
- package/dist/split-button.secondary-button.styles.js +103 -0
- package/dist/split-button.secondary-button.test.basics.d.ts +1 -0
- package/dist/split-button.secondary-button.test.basics.js +58 -0
- package/dist/split-button.secondary-button.test.focus.d.ts +1 -0
- package/dist/split-button.secondary-button.test.focus.js +14 -0
- package/dist/split-button.secondary-button.test.interactions.d.ts +2 -0
- package/dist/split-button.secondary-button.test.interactions.js +30 -0
- package/dist/split-button.stories.d.ts +4 -3
- package/dist/split-button.styles.js +1 -94
- package/dist/split-button.test.basics.d.ts +2 -1
- package/dist/split-button.test.basics.js +67 -80
- package/dist/split-button.test.interactions.d.ts +4 -0
- package/dist/split-button.test.interactions.js +51 -0
- package/dist/styles/opacity-and-scale-animation.js +2 -6
- package/dist/styles/variables.css +1 -1
- package/dist/tab.d.ts +2 -11
- package/dist/tab.group.d.ts +3 -5
- package/dist/tab.group.js +1 -1
- package/dist/tab.group.styles.js +18 -15
- package/dist/tab.group.test.basics.js +49 -34
- package/dist/tab.group.test.interactions.js +17 -14
- package/dist/tab.panel.d.ts +0 -3
- package/dist/tab.test.basics.js +6 -5
- package/dist/tag.d.ts +5 -4
- package/dist/tag.js +1 -1
- package/dist/tag.styles.js +47 -38
- package/dist/tag.test.basics.js +18 -110
- package/dist/tag.test.events.js +12 -8
- package/dist/tag.test.focus.js +2 -3
- package/dist/tag.test.interactions.d.ts +1 -0
- package/dist/tag.test.interactions.js +36 -0
- package/dist/textarea.d.ts +2 -3
- package/dist/textarea.js +2 -2
- package/dist/textarea.test.basics.js +8 -8
- package/dist/textarea.test.events.js +55 -55
- package/dist/textarea.test.form.js +9 -9
- package/dist/textarea.test.validity.js +167 -135
- package/dist/toasts.d.ts +1 -5
- package/dist/toasts.test.basics.js +2 -1
- package/dist/toasts.toast.d.ts +1 -4
- package/dist/toasts.toast.js +1 -1
- package/dist/toasts.toast.styles.js +12 -0
- package/dist/toggle.d.ts +0 -2
- package/dist/toggle.styles.js +1 -5
- package/dist/toggle.test.basics.js +2 -2
- package/dist/toggle.test.interactions.js +7 -7
- package/dist/tooltip.d.ts +2 -1
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.styles.js +37 -13
- package/dist/tooltip.test.basics.d.ts +1 -1
- package/dist/tooltip.test.basics.js +19 -19
- package/dist/tree.d.ts +0 -2
- package/dist/tree.item.d.ts +5 -7
- package/dist/tree.item.icon-button.d.ts +1 -4
- package/dist/tree.item.js +1 -1
- package/dist/tree.item.menu.d.ts +1 -2
- package/dist/tree.item.menu.js +1 -1
- package/dist/tree.item.menu.test.basics.js +31 -10
- package/dist/tree.item.styles.js +7 -9
- package/dist/tree.item.test.basics.js +43 -31
- package/dist/tree.test.basics.js +29 -29
- package/dist/tree.test.focus.js +77 -74
- package/package.json +12 -14
- package/dist/split-container.d.ts +0 -31
- package/dist/split-container.js +0 -1
- package/dist/split-container.styles.js +0 -132
- package/dist/split-container.test.basics.d.ts +0 -3
- package/dist/split-container.test.basics.js +0 -445
- package/dist/split-container.test.interactions.d.ts +0 -1
- package/dist/split-container.test.interactions.js +0 -20
- package/dist/split-link.d.ts +0 -25
- package/dist/split-link.js +0 -1
- package/dist/split-link.test.basics.d.ts +0 -1
- package/dist/split-link.test.basics.js +0 -93
- package/dist/split-link.test.interactions.d.ts +0 -1
- package/dist/split-link.test.interactions.js +0 -20
- package/dist/status-indicator.d.ts +0 -30
- package/dist/status-indicator.js +0 -1
- package/dist/status-indicator.stories.d.ts +0 -5
- package/dist/status-indicator.styles.js +0 -58
- package/dist/status-indicator.test.basics.d.ts +0 -1
- package/dist/status-indicator.test.basics.js +0 -102
- /package/dist/{split-container.styles.d.ts → split-button.primary-button.styles.d.ts} +0 -0
- /package/dist/{status-indicator.styles.d.ts → split-button.secondary-button.styles.d.ts} +0 -0
@@ -18,27 +18,25 @@ it('registers', async () => {
|
|
18
18
|
expect(window.customElements.get('glide-core-tab-panel')).to.equal(GlideCoreTabPanel);
|
19
19
|
});
|
20
20
|
it('renders correct markup and sets correct attributes for the default case', async () => {
|
21
|
-
const
|
21
|
+
const component = await fixture(html `
|
22
22
|
<glide-core-tab-group>
|
23
23
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
24
24
|
<glide-core-tab-panel name="1">Content for Tab 1</glide-core-tab-panel>
|
25
25
|
</glide-core-tab-group>
|
26
26
|
`);
|
27
|
-
await expect(
|
28
|
-
const [firstTab] =
|
29
|
-
expect(
|
30
|
-
expect([...
|
31
|
-
'component',
|
32
|
-
]);
|
27
|
+
await expect(component).to.be.accessible();
|
28
|
+
const [firstTab] = component.tabElements;
|
29
|
+
expect(component.activeTab).to.equal(firstTab, 'activeTab defaults to first tab');
|
30
|
+
expect([...component.shadowRoot.firstElementChild.classList]).to.deep.equal(['component']);
|
33
31
|
expect([
|
34
|
-
...
|
32
|
+
...component.shadowRoot.querySelector('.tab-group').classList,
|
35
33
|
]).to.deep.equal(['tab-group', 'animated']);
|
36
|
-
const slot =
|
34
|
+
const slot = component.shadowRoot.querySelector('slot:not([name="nav"])');
|
37
35
|
expect(slot).to.exist;
|
38
36
|
expect(slot.assignedElements.length).to.equal(0);
|
39
37
|
});
|
40
38
|
it('can switch tabs', async () => {
|
41
|
-
const
|
39
|
+
const component = await fixture(html `
|
42
40
|
<glide-core-tab-group>
|
43
41
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
44
42
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -51,19 +49,27 @@ it('can switch tabs', async () => {
|
|
51
49
|
<glide-core-tab-panel name="4">Content for Tab 4</glide-core-tab-panel>
|
52
50
|
</glide-core-tab-group>
|
53
51
|
`);
|
54
|
-
const listener = oneEvent(
|
55
|
-
const [firstTab, secondTab, thirdTab, disabledTab] =
|
56
|
-
const [firstPanel, secondPanel, thirdPanel] =
|
57
|
-
|
58
|
-
expect(
|
59
|
-
|
60
|
-
expect(
|
52
|
+
const listener = oneEvent(component, 'tab-show');
|
53
|
+
const [firstTab, secondTab, thirdTab, disabledTab] = component.tabElements;
|
54
|
+
const [firstPanel, secondPanel, thirdPanel] = component.panelElements;
|
55
|
+
// first tab defaults to active
|
56
|
+
expect(firstTab.active).to.be.true;
|
57
|
+
// other tabs default to not active
|
58
|
+
expect(secondTab.active).to.be.false;
|
59
|
+
// first panel is not hidden by default
|
60
|
+
expect(isPanelHidden(firstPanel)).to.be.false;
|
61
|
+
// nonactive panel is hidden by default
|
62
|
+
expect(isPanelHidden(secondPanel)).to.be.true;
|
61
63
|
secondTab.click();
|
62
64
|
const triggeredEvent = await listener;
|
63
|
-
|
64
|
-
expect(
|
65
|
-
|
66
|
-
expect(
|
65
|
+
// after clicking a different tab, previous tab is no longer active
|
66
|
+
expect(firstTab.active).to.be.false;
|
67
|
+
// clicked tab becomes active
|
68
|
+
expect(secondTab.active).to.be.true;
|
69
|
+
// after clicking a different tab, previous panel is hidden
|
70
|
+
expect(isPanelHidden(firstPanel)).to.be.true;
|
71
|
+
// clicked tab's panel is no longer hidden
|
72
|
+
expect(isPanelHidden(secondPanel)).to.be.false;
|
67
73
|
expect(triggeredEvent.type).to.equal('tab-show', 'correct tab event fires');
|
68
74
|
expect(triggeredEvent.bubbles).to.be.true;
|
69
75
|
expect(triggeredEvent.detail.panel).to.equal('2', 'Can get the panel name from the tab click event');
|
@@ -72,18 +78,23 @@ it('can switch tabs', async () => {
|
|
72
78
|
// Should be focused on third tab. Press Enter on it
|
73
79
|
await sendKeys({ press: 'Enter' });
|
74
80
|
const secondTriggeredEvent = await listener;
|
75
|
-
|
76
|
-
expect(
|
77
|
-
|
78
|
-
expect(
|
81
|
+
// after pressing Enter on a different tab, previous tab is no longer active
|
82
|
+
expect(secondTab.active).to.be.false;
|
83
|
+
// new tab becomes active
|
84
|
+
expect(thirdTab.active).to.be.true;
|
85
|
+
// after pressing Enter on a different tab, previous panel is hidden
|
86
|
+
expect(isPanelHidden(secondPanel)).to.be.true;
|
87
|
+
// new tab's panel is no longer hidden
|
88
|
+
expect(isPanelHidden(thirdPanel)).to.be.false;
|
79
89
|
expect(secondTriggeredEvent.type).to.equal('tab-show', 'correct tab event fires for keydown');
|
80
90
|
expect(secondTriggeredEvent.bubbles).to.be.true;
|
81
91
|
expect(secondTriggeredEvent.detail.panel).to.equal('2', 'Can get the panel name from the tab show event');
|
82
92
|
disabledTab.click();
|
83
|
-
|
93
|
+
// clicking on a disabled tab does not make it active
|
94
|
+
expect(disabledTab.active).to.be.false;
|
84
95
|
});
|
85
96
|
it('can use left/right, home and end keys to focus on tabs', async () => {
|
86
|
-
const
|
97
|
+
const component = await fixture(html `
|
87
98
|
<glide-core-tab-group>
|
88
99
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
89
100
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -94,26 +105,30 @@ it('can use left/right, home and end keys to focus on tabs', async () => {
|
|
94
105
|
<glide-core-tab-panel name="3">Content for Tab 3</glide-core-tab-panel>
|
95
106
|
</glide-core-tab-group>
|
96
107
|
`);
|
97
|
-
const [firstTab, secondTab, thirdTab] =
|
108
|
+
const [firstTab, secondTab, thirdTab] = component.tabElements;
|
98
109
|
firstTab.focus();
|
99
110
|
await sendKeys({ press: 'ArrowRight' });
|
100
111
|
await sendKeys({ press: 'Enter' });
|
101
|
-
|
112
|
+
// right works
|
113
|
+
expect(secondTab.active).to.be.true;
|
102
114
|
await sendKeys({ press: 'ArrowLeft' });
|
103
115
|
await sendKeys({ press: 'Enter' });
|
104
|
-
|
116
|
+
// left works
|
117
|
+
expect(firstTab.active).to.be.true;
|
105
118
|
await sendKeys({ press: 'ArrowLeft' });
|
106
119
|
await sendKeys({ press: 'Enter' });
|
107
|
-
|
120
|
+
// left from first goes to last
|
121
|
+
expect(thirdTab.active).to.be.true;
|
108
122
|
await sendKeys({ press: 'ArrowRight' });
|
109
123
|
await sendKeys({ press: 'Enter' });
|
110
|
-
|
124
|
+
// right from last goes to first
|
125
|
+
expect(firstTab.active).to.be.true;
|
111
126
|
await sendKeys({ press: 'Home' });
|
112
127
|
await sendKeys({ press: 'Enter' });
|
113
|
-
expect(firstTab.active).to.
|
128
|
+
expect(firstTab.active).to.be.true;
|
114
129
|
await sendKeys({ press: 'End' });
|
115
130
|
await sendKeys({ press: 'Enter' });
|
116
|
-
expect(thirdTab.active).to.
|
131
|
+
expect(thirdTab.active).to.be.true;
|
117
132
|
});
|
118
133
|
it('throws an error when an element other than `glide-core-tab` is a child of the `nav` slot', async () => {
|
119
134
|
await expectArgumentError(() => {
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import './tab.group.js';
|
3
3
|
import './tab.js';
|
4
4
|
import './tab.panel.js';
|
5
|
+
import { emulateMedia } from '@web/test-runner-commands';
|
5
6
|
import { expect, fixture, html, waitUntil } from '@open-wc/testing';
|
6
7
|
import { sendKeys } from '@web/test-runner-commands';
|
7
8
|
import GlideCoreTabGroup from './tab.group.js';
|
@@ -129,6 +130,7 @@ it('renders a disabled end-overflow button when there is only overflow at the st
|
|
129
130
|
expect(startOverflowButton?.disabled).to.be.false;
|
130
131
|
});
|
131
132
|
it('scrolls tabs when overflow buttons are clicked', async () => {
|
133
|
+
await emulateMedia({ reducedMotion: 'reduce' });
|
132
134
|
const spy = sinon.spy();
|
133
135
|
const component = await fixture(html `
|
134
136
|
<div style="width:23rem">
|
@@ -170,6 +172,7 @@ it('scrolls tabs when overflow buttons are clicked', async () => {
|
|
170
172
|
expect(spy.callCount).to.equal(1);
|
171
173
|
expect(startOverflowButton?.disabled).to.be.true;
|
172
174
|
expect(endOverflowButton?.disabled).to.be.false;
|
175
|
+
await emulateMedia({ reducedMotion: 'no-preference' });
|
173
176
|
});
|
174
177
|
it('removes overflow buttons when the component is resized and there is no overflow', async () => {
|
175
178
|
const component = await fixture(html `
|
@@ -234,7 +237,7 @@ it('renders overflow buttons when the component is resized and there is overflow
|
|
234
237
|
tabGroup?.shadowRoot?.querySelector('[data-test="overflow-end-button"]') !== null);
|
235
238
|
});
|
236
239
|
it('has only one active tab that is tabbable after pressing the Enter key', async () => {
|
237
|
-
const
|
240
|
+
const component = await fixture(html `
|
238
241
|
<glide-core-tab-group>
|
239
242
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
240
243
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -247,7 +250,7 @@ it('has only one active tab that is tabbable after pressing the Enter key', asyn
|
|
247
250
|
<glide-core-tab-panel name="4">Content for Tab 4</glide-core-tab-panel>
|
248
251
|
</glide-core-tab-group>
|
249
252
|
`);
|
250
|
-
const [firstTab, secondTab, thirdTab, fourthTab] =
|
253
|
+
const [firstTab, secondTab, thirdTab, fourthTab] = component.tabElements;
|
251
254
|
expect(firstTab.active).to.be.true;
|
252
255
|
expect(secondTab.active).to.be.false;
|
253
256
|
expect(thirdTab.active).to.be.false;
|
@@ -299,7 +302,7 @@ it('has only one active tab that is tabbable after pressing the Enter key', asyn
|
|
299
302
|
expect(fourthTab.tabIndex).to.equal(-1);
|
300
303
|
});
|
301
304
|
it('has only one active tab that is tabbable when clicked', async () => {
|
302
|
-
const
|
305
|
+
const component = await fixture(html `
|
303
306
|
<glide-core-tab-group>
|
304
307
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
305
308
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -310,7 +313,7 @@ it('has only one active tab that is tabbable when clicked', async () => {
|
|
310
313
|
<glide-core-tab-panel name="3">Content for Tab 3</glide-core-tab-panel>
|
311
314
|
</glide-core-tab-group>
|
312
315
|
`);
|
313
|
-
const [firstTab, secondTab, thirdTab] =
|
316
|
+
const [firstTab, secondTab, thirdTab] = component.tabElements;
|
314
317
|
expect(firstTab.active).to.be.true;
|
315
318
|
expect(secondTab.active).to.be.false;
|
316
319
|
expect(thirdTab.active).to.be.false;
|
@@ -333,7 +336,7 @@ it('has only one active tab that is tabbable when clicked', async () => {
|
|
333
336
|
expect(thirdTab.tabIndex).to.equal(0);
|
334
337
|
});
|
335
338
|
it('has only one tab panel that is active and tabbable when a tab is clicked', async () => {
|
336
|
-
const
|
339
|
+
const component = await fixture(html `
|
337
340
|
<glide-core-tab-group>
|
338
341
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
339
342
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -342,8 +345,8 @@ it('has only one tab panel that is active and tabbable when a tab is clicked', a
|
|
342
345
|
<glide-core-tab-panel name="2">Content for Tab 2</glide-core-tab-panel>
|
343
346
|
</glide-core-tab-group>
|
344
347
|
`);
|
345
|
-
const [, secondTab] =
|
346
|
-
const [firstPanel, secondPanel] =
|
348
|
+
const [, secondTab] = component.tabElements;
|
349
|
+
const [firstPanel, secondPanel] = component.panelElements;
|
347
350
|
expect(firstPanel.isActive).to.be.true;
|
348
351
|
expect(secondPanel.isActive).to.be.false;
|
349
352
|
expect(firstPanel.tabIndex).to.equal(0);
|
@@ -355,7 +358,7 @@ it('has only one tab panel that is active and tabbable when a tab is clicked', a
|
|
355
358
|
expect(secondPanel.tabIndex).to.equal(0);
|
356
359
|
});
|
357
360
|
it('has only one tab panel that is active and tabbable when using the keyboard to make selections', async () => {
|
358
|
-
const
|
361
|
+
const component = await fixture(html `
|
359
362
|
<glide-core-tab-group>
|
360
363
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
361
364
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -364,8 +367,8 @@ it('has only one tab panel that is active and tabbable when using the keyboard t
|
|
364
367
|
<glide-core-tab-panel name="2">Content for Tab 2</glide-core-tab-panel>
|
365
368
|
</glide-core-tab-group>
|
366
369
|
`);
|
367
|
-
const [firstTab] =
|
368
|
-
const [firstPanel, secondPanel] =
|
370
|
+
const [firstTab] = component.tabElements;
|
371
|
+
const [firstPanel, secondPanel] = component.panelElements;
|
369
372
|
expect(firstPanel.isActive).to.be.true;
|
370
373
|
expect(secondPanel.isActive).to.be.false;
|
371
374
|
expect(firstPanel.tabIndex).to.equal(0);
|
@@ -379,7 +382,7 @@ it('has only one tab panel that is active and tabbable when using the keyboard t
|
|
379
382
|
expect(secondPanel.tabIndex).to.equal(0);
|
380
383
|
});
|
381
384
|
it('sets the last keyboard focused tab as tabbable ', async () => {
|
382
|
-
const
|
385
|
+
const component = await fixture(html `
|
383
386
|
<glide-core-tab-group>
|
384
387
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
385
388
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -388,7 +391,7 @@ it('sets the last keyboard focused tab as tabbable ', async () => {
|
|
388
391
|
<glide-core-tab-panel name="2">Content for Tab 2</glide-core-tab-panel>
|
389
392
|
</glide-core-tab-group>
|
390
393
|
`);
|
391
|
-
const [firstTab, secondTab] =
|
394
|
+
const [firstTab, secondTab] = component.tabElements;
|
392
395
|
expect(firstTab.active).to.be.true;
|
393
396
|
expect(secondTab.active).to.be.false;
|
394
397
|
expect(firstTab.tabIndex).to.equal(0);
|
@@ -403,7 +406,7 @@ it('sets the last keyboard focused tab as tabbable ', async () => {
|
|
403
406
|
it('sets the active tab as tabbable on tab blur', async () => {
|
404
407
|
// This behavior is to ensure that the last active tab is the first tabbable
|
405
408
|
// element in the component.
|
406
|
-
const
|
409
|
+
const component = await fixture(html `
|
407
410
|
<glide-core-tab-group>
|
408
411
|
<glide-core-tab slot="nav" panel="1">Tab 1</glide-core-tab>
|
409
412
|
<glide-core-tab slot="nav" panel="2">Tab 2</glide-core-tab>
|
@@ -412,7 +415,7 @@ it('sets the active tab as tabbable on tab blur', async () => {
|
|
412
415
|
<glide-core-tab-panel name="2">Content for Tab 2</glide-core-tab-panel>
|
413
416
|
</glide-core-tab-group>
|
414
417
|
`);
|
415
|
-
const [firstTab, secondTab] =
|
418
|
+
const [firstTab, secondTab] = component.tabElements;
|
416
419
|
expect(firstTab.active).to.be.true;
|
417
420
|
expect(secondTab.active).to.be.false;
|
418
421
|
expect(firstTab.tabIndex).to.equal(0);
|
package/dist/tab.panel.d.ts
CHANGED
package/dist/tab.test.basics.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
1
2
|
import './tab.js';
|
2
3
|
import { expect, fixture, html } from '@open-wc/testing';
|
3
4
|
import GlideCoreTab from './tab.js';
|
@@ -10,8 +11,8 @@ it('renders correct markup and sets correct attributes for the default case', as
|
|
10
11
|
<glide-core-tab>Tab</glide-core-tab>
|
11
12
|
`);
|
12
13
|
await expect(component).to.not.be.accessible();
|
13
|
-
expect(component.active).to.
|
14
|
-
expect(component.disabled).to.
|
14
|
+
expect(component.active).to.be.false;
|
15
|
+
expect(component.disabled).to.be.false;
|
15
16
|
expect(component.getAttribute('aria-disabled')).to.equal(null, 'does not set aria-disabled');
|
16
17
|
expect([...component.shadowRoot.firstElementChild.classList]).to.deep.equal(['component']);
|
17
18
|
});
|
@@ -25,14 +26,14 @@ it('sets the active attribute', async () => {
|
|
25
26
|
const component = await fixture(html `
|
26
27
|
<glide-core-tab active>Tab</glide-core-tab>
|
27
28
|
`);
|
28
|
-
expect(component.active).to.
|
29
|
+
expect(component.active).to.be.true;
|
29
30
|
});
|
30
31
|
it('sets the disabled attribute', async () => {
|
31
32
|
const component = await fixture(html `
|
32
33
|
<glide-core-tab disabled>Tab</glide-core-tab>
|
33
34
|
`);
|
34
|
-
expect(component.disabled).to.
|
35
|
-
expect(component
|
35
|
+
expect(component.disabled).to.be.true;
|
36
|
+
expect(component?.getAttribute('aria-disabled')).to.equal('true');
|
36
37
|
});
|
37
38
|
it('renders the icon slot', async () => {
|
38
39
|
const component = await fixture(html `
|
package/dist/tag.d.ts
CHANGED
@@ -5,17 +5,18 @@ declare global {
|
|
5
5
|
}
|
6
6
|
}
|
7
7
|
/**
|
8
|
-
* @event remove -
|
8
|
+
* @event remove - `(event: Event) => void`
|
9
9
|
*
|
10
|
-
* @slot
|
11
|
-
* @slot prefix - A slot for an optional icon.
|
10
|
+
* @slot icon
|
12
11
|
*/
|
13
12
|
export default class GlideCoreTag extends LitElement {
|
14
13
|
#private;
|
15
14
|
static shadowRootOptions: ShadowRootInit;
|
16
15
|
static styles: import("lit").CSSResult[];
|
16
|
+
disabled: boolean;
|
17
|
+
label?: string;
|
18
|
+
removable: boolean;
|
17
19
|
size: 'small' | 'medium' | 'large';
|
18
|
-
removableLabel?: string | undefined;
|
19
20
|
click(): void;
|
20
21
|
firstUpdated(): void;
|
21
22
|
render(): import("lit").TemplateResult<1>;
|
package/dist/tag.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var __decorate=this&&this.__decorate||function(e,t,o,
|
1
|
+
var __decorate=this&&this.__decorate||function(e,t,o,i){var l,s=arguments.length,r=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(l=e[a])&&(r=(s<3?l(r):s>3?l(t,o,r):l(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};import{LitElement,html}from"lit";import{LocalizeController}from"./library/localize.js";import{classMap}from"lit/directives/class-map.js";import{createRef,ref}from"lit/directives/ref.js";import{customElement,property}from"lit/decorators.js";import{when}from"lit/directives/when.js";import styles from"./tag.styles.js";let GlideCoreTag=class GlideCoreTag extends LitElement{constructor(){super(...arguments),this.disabled=!1,this.removable=!1,this.size="medium",this.#e=createRef(),this.#t=createRef(),this.#o=createRef(),this.#i=new LocalizeController(this)}static{this.shadowRootOptions={...LitElement.shadowRootOptions,delegatesFocus:!0,mode:"closed"}}static{this.styles=styles}click(){this.#e.value?.click()}firstUpdated(){this.#t.value?.addEventListener("animationend",(()=>{this.#t.value?.classList.remove("added")}),{once:!0})}render(){return html`<div class="${classMap({component:!0,added:!0,disabled:this.disabled,[this.size]:!0})}" data-test="component" ${ref(this.#t)}><slot class="${classMap({"icon-slot":!0,[this.size]:!0})}" name="icon" ${ref(this.#o)}></slot>${this.label} ${when(this.removable,(()=>html`<button aria-label="${this.#i.term("removeTag",this.label)}" class="${classMap({button:!0,[this.size]:!0,disabled:this.disabled})}" data-test="button" type="button" @click="${this.#l}" ?disabled="${this.disabled}" ${ref(this.#e)}><svg width="12" height="12" viewBox="0 0 24 24" fill="none"><path d="M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M18 6L6 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>`))}</div>`}#e;#t;#o;#i;#l(){setTimeout((()=>{this.remove()}),200),this.#t.value?.classList.add("removed"),this.dispatchEvent(new Event("remove",{bubbles:!0}))}};__decorate([property({reflect:!0,type:Boolean})],GlideCoreTag.prototype,"disabled",void 0),__decorate([property({reflect:!0})],GlideCoreTag.prototype,"label",void 0),__decorate([property({reflect:!0,type:Boolean})],GlideCoreTag.prototype,"removable",void 0),__decorate([property({reflect:!0})],GlideCoreTag.prototype,"size",void 0),GlideCoreTag=__decorate([customElement("glide-core-tag")],GlideCoreTag);export default GlideCoreTag;
|
package/dist/tag.styles.js
CHANGED
@@ -6,7 +6,7 @@ import{css}from"lit";import focusOutline from"./styles/focus-outline.js";export
|
|
6
6
|
background: var(--glide-core-surface-base);
|
7
7
|
border-radius: var(--glide-core-border-radius-round);
|
8
8
|
color: var(--glide-core-text-body-1);
|
9
|
-
display:
|
9
|
+
display: flex;
|
10
10
|
font-family: var(--glide-core-body-xs-font-family);
|
11
11
|
font-size: var(--glide-core-body-xs-font-size);
|
12
12
|
font-style: var(--glide-core-body-xs-font-variant);
|
@@ -14,6 +14,7 @@ import{css}from"lit";import focusOutline from"./styles/focus-outline.js";export
|
|
14
14
|
justify-content: center;
|
15
15
|
line-height: 1;
|
16
16
|
margin: 0;
|
17
|
+
max-inline-size: max-content;
|
17
18
|
min-block-size: var(--glide-core-spacing-md);
|
18
19
|
opacity: 1;
|
19
20
|
overflow: hidden;
|
@@ -30,46 +31,17 @@ import{css}from"lit";import focusOutline from"./styles/focus-outline.js";export
|
|
30
31
|
padding: 0 var(--glide-core-spacing-xs);
|
31
32
|
}
|
32
33
|
|
33
|
-
&.
|
34
|
+
&.added {
|
34
35
|
animation: fade-in 100ms ease-in-out;
|
35
36
|
}
|
36
37
|
|
37
|
-
&.
|
38
|
-
|
39
|
-
animation-fill-mode: forwards;
|
40
|
-
}
|
41
|
-
|
42
|
-
& ::slotted([slot='prefix']) {
|
43
|
-
--size: var(--glide-core-spacing-sm);
|
44
|
-
|
45
|
-
align-items: center;
|
46
|
-
block-size: var(--glide-core-spacing-sm);
|
47
|
-
display: flex;
|
48
|
-
inline-size: var(--glide-core-spacing-sm);
|
49
|
-
justify-content: center;
|
50
|
-
margin-inline-end: 0.375rem;
|
51
|
-
}
|
52
|
-
|
53
|
-
&.small ::slotted([slot='prefix']) {
|
54
|
-
--size: 0.625rem;
|
55
|
-
|
56
|
-
align-items: center;
|
57
|
-
block-size: 0.625rem;
|
58
|
-
display: flex;
|
59
|
-
inline-size: 0.625rem;
|
60
|
-
justify-content: center;
|
61
|
-
margin-inline-end: var(--glide-core-spacing-xxs);
|
38
|
+
&.disabled {
|
39
|
+
color: var(--glide-core-icon-tertiary-disabled);
|
62
40
|
}
|
63
41
|
|
64
|
-
&.
|
65
|
-
|
66
|
-
|
67
|
-
align-items: center;
|
68
|
-
block-size: 0.875rem;
|
69
|
-
display: flex;
|
70
|
-
inline-size: 0.875rem;
|
71
|
-
justify-content: center;
|
72
|
-
margin-inline-end: var(--glide-core-spacing-xs);
|
42
|
+
&.removed {
|
43
|
+
animation: fade-out 200ms ease-in-out;
|
44
|
+
animation-fill-mode: forwards;
|
73
45
|
}
|
74
46
|
}
|
75
47
|
|
@@ -93,7 +65,7 @@ import{css}from"lit";import focusOutline from"./styles/focus-outline.js";export
|
|
93
65
|
}
|
94
66
|
}
|
95
67
|
|
96
|
-
button {
|
68
|
+
.button {
|
97
69
|
align-items: center;
|
98
70
|
background-color: transparent;
|
99
71
|
block-size: var(--glide-core-spacing-sm);
|
@@ -121,7 +93,12 @@ import{css}from"lit";import focusOutline from"./styles/focus-outline.js";export
|
|
121
93
|
margin-inline-start: var(--glide-core-spacing-xxs);
|
122
94
|
}
|
123
95
|
|
124
|
-
|
96
|
+
&.disabled {
|
97
|
+
color: var(--glide-core-icon-tertiary-disabled);
|
98
|
+
cursor: not-allowed;
|
99
|
+
}
|
100
|
+
|
101
|
+
&:hover:not(.disabled) {
|
125
102
|
color: var(--glide-core-icon-primary-hover);
|
126
103
|
}
|
127
104
|
|
@@ -129,4 +106,36 @@ import{css}from"lit";import focusOutline from"./styles/focus-outline.js";export
|
|
129
106
|
outline: none;
|
130
107
|
}
|
131
108
|
}
|
109
|
+
|
110
|
+
.icon-slot {
|
111
|
+
&.large {
|
112
|
+
&::slotted(*) {
|
113
|
+
block-size: 0.875rem;
|
114
|
+
inline-size: 0.875rem;
|
115
|
+
margin-inline-end: var(--glide-core-spacing-xs);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
&.medium {
|
120
|
+
&::slotted(*) {
|
121
|
+
block-size: 0.75rem;
|
122
|
+
inline-size: 0.75rem;
|
123
|
+
margin-inline-end: 0.375rem;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
&.small {
|
128
|
+
&::slotted(*) {
|
129
|
+
block-size: 0.625rem;
|
130
|
+
inline-size: 0.625rem;
|
131
|
+
margin-inline-end: var(--glide-core-spacing-xxs);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
&::slotted(*) {
|
136
|
+
align-items: center;
|
137
|
+
display: flex;
|
138
|
+
justify-content: center;
|
139
|
+
}
|
140
|
+
}
|
132
141
|
`];
|
package/dist/tag.test.basics.js
CHANGED
@@ -1,120 +1,28 @@
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
2
|
-
import {
|
3
|
-
import { aTimeout, expect, fixture, html } from '@open-wc/testing';
|
2
|
+
import { aTimeout, elementUpdated, expect, fixture, html, } from '@open-wc/testing';
|
4
3
|
import GlideCoreTag from './tag.js';
|
5
|
-
import sinon from 'sinon';
|
6
4
|
GlideCoreTag.shadowRootOptions.mode = 'open';
|
7
5
|
it('registers', async () => {
|
8
6
|
expect(window.customElements.get('glide-core-tag')).to.equal(GlideCoreTag);
|
9
7
|
});
|
10
8
|
it('is accessible', async () => {
|
11
|
-
const component = await fixture(html `<glide-core-tag
|
12
|
-
// Wait for the animation to complete
|
13
|
-
await aTimeout(
|
9
|
+
const component = await fixture(html `<glide-core-tag label="Label"></glide-core-tag>`);
|
10
|
+
// Wait for the animation to complete.
|
11
|
+
await aTimeout(100);
|
12
|
+
await expect(component).to.be.accessible();
|
13
|
+
component.removable = true;
|
14
|
+
await elementUpdated(component);
|
14
15
|
await expect(component).to.be.accessible();
|
15
16
|
});
|
16
|
-
it('
|
17
|
-
const component = await fixture(html `<glide-core-tag
|
18
|
-
expect(component).to.be.
|
19
|
-
|
20
|
-
expect(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
expect(component).to.not.have.attribute('removable-label');
|
28
|
-
const iconButton = component.shadowRoot?.querySelector('[data-test="button"]');
|
29
|
-
expect(iconButton).to.be.null;
|
30
|
-
});
|
31
|
-
it('renders an icon button with aria-label when "removable-label" attribute is set', async () => {
|
32
|
-
const component = await fixture(html `<glide-core-tag removable-label="test-aria-label"
|
33
|
-
><span slot="prefix">Prefix</span
|
34
|
-
><span data-content>Tag</span></glide-core-tag
|
35
|
-
>`);
|
36
|
-
expect(component).to.be.not.null;
|
37
|
-
expect(component).to.have.attribute('removable-label', 'test-aria-label');
|
38
|
-
const iconButton = component.shadowRoot?.querySelector('[data-test="button"]');
|
39
|
-
expect(iconButton).to.be.not.null;
|
40
|
-
expect(iconButton).to.have.attribute('aria-label', `Remove tag: test-aria-label`);
|
41
|
-
expect(iconButton).to.have.attribute('type', 'button');
|
42
|
-
});
|
43
|
-
it('renders the "prefix" slot and its content', async () => {
|
44
|
-
const component = await fixture(html `<glide-core-tag
|
45
|
-
><span slot="prefix" data-prefix>test-prefix</span>Tag</glide-core-tag
|
46
|
-
>`);
|
47
|
-
const prefixSlot = component.shadowRoot?.querySelector('slot[name="prefix"]');
|
48
|
-
expect(prefixSlot?.assignedNodes()?.length).to.be.equal(1);
|
49
|
-
expect(document.querySelector('[data-prefix]')).to.be.not.null;
|
50
|
-
expect(document.querySelector('[data-prefix]')?.textContent).to.be.equal('test-prefix');
|
51
|
-
});
|
52
|
-
it('renders correctly when the "size" attribute is set to "small"', async () => {
|
53
|
-
const component = await fixture(html `<glide-core-tag removable-label="test-aria-label" size="small"
|
54
|
-
><span slot="prefix">Prefix</span
|
55
|
-
><span data-content>Tag</span></glide-core-tag
|
56
|
-
>`);
|
57
|
-
const container = component.shadowRoot?.querySelector('[data-test="component"]');
|
58
|
-
const iconButton = component.shadowRoot?.querySelector('[data-test="button"]');
|
59
|
-
expect(container).to.have.class('small');
|
60
|
-
expect(iconButton).to.have.class('small');
|
61
|
-
});
|
62
|
-
it('renders correctly when the "size" attribute is set to "large"', async () => {
|
63
|
-
const component = await fixture(html `<glide-core-tag removable-label="test-aria-label" size="large"
|
64
|
-
><span slot="prefix">Prefix</span
|
65
|
-
><span data-content>Tag</span></glide-core-tag
|
66
|
-
>`);
|
67
|
-
const container = component.shadowRoot?.querySelector('[data-test="component"]');
|
68
|
-
const iconButton = component.shadowRoot?.querySelector('[data-test="button"]');
|
69
|
-
expect(container).to.have.class('large');
|
70
|
-
expect(iconButton).to.have.class('large');
|
71
|
-
});
|
72
|
-
it('throws an error when the default slot is empty', async () => {
|
73
|
-
const spy = sinon.spy();
|
74
|
-
try {
|
75
|
-
await fixture(html `<glide-core-tag></glide-core-tag>`);
|
76
|
-
}
|
77
|
-
catch (error) {
|
78
|
-
if (error instanceof ArgumentError) {
|
79
|
-
spy();
|
80
|
-
}
|
81
|
-
}
|
82
|
-
expect(spy.callCount).to.equal(1);
|
83
|
-
});
|
84
|
-
it('does not throw an error when the default slot is non-empty', async () => {
|
85
|
-
const spy = sinon.spy();
|
86
|
-
try {
|
87
|
-
await fixture(html `<glide-core-tag>Tag</glide-core-tag>`);
|
88
|
-
}
|
89
|
-
catch (error) {
|
90
|
-
if (error instanceof ArgumentError) {
|
91
|
-
spy();
|
92
|
-
}
|
93
|
-
}
|
94
|
-
expect(spy.callCount).to.equal(0);
|
95
|
-
});
|
96
|
-
it('toggles the "activate" and "deactivate" clases when the button is clicked', async () => {
|
97
|
-
const component = await fixture(html `<glide-core-tag removable-label="test-aria-label"
|
98
|
-
><span slot="prefix">Prefix</span>Tag</glide-core-tag
|
99
|
-
>`);
|
100
|
-
const container = component.shadowRoot?.querySelector('[data-test="component"]');
|
101
|
-
const iconButton = component.shadowRoot?.querySelector('[data-test="button"]');
|
102
|
-
expect(container).to.have.class('activate');
|
103
|
-
iconButton?.click();
|
104
|
-
expect(container).to.have.class('deactivate');
|
105
|
-
});
|
106
|
-
it('removes the tag from the DOM when the button is clicked', async () => {
|
107
|
-
const component = await fixture(html `<glide-core-tag removable-label="test-aria-label"
|
108
|
-
><span slot="prefix">Prefix</span
|
109
|
-
><span data-content>Tag</span></glide-core-tag
|
110
|
-
>`);
|
111
|
-
expect(component.shadowRoot?.querySelector('[data-test="component"]')).to.be
|
112
|
-
.not.null;
|
113
|
-
expect(document.querySelector('[data-content]')).to.be.not.null;
|
114
|
-
component?.click();
|
115
|
-
// Wait for the animation to complete
|
116
|
-
await aTimeout(300);
|
117
|
-
// the tag and its contents should be removed
|
118
|
-
expect(document.querySelector('glide-core-tag')).to.be.null;
|
119
|
-
expect(document.querySelector('[data-content]')).to.be.null;
|
17
|
+
it('has defaults', async () => {
|
18
|
+
const component = await fixture(html `<glide-core-tag label="Label"></glide-core-tag>`);
|
19
|
+
expect(component.disabled).to.be.false;
|
20
|
+
expect(component.removable).to.be.false;
|
21
|
+
expect(component.size).to.equal('medium');
|
22
|
+
});
|
23
|
+
it('can be removed', async () => {
|
24
|
+
const component = await fixture(html `<glide-core-tag label="Label" removable></glide-core-tag>`);
|
25
|
+
const button = component.shadowRoot?.querySelector('[data-test="button"]');
|
26
|
+
expect(button?.checkVisibility()).to.be.true;
|
27
|
+
expect(button?.getAttribute('aria-label')).to.equal('Remove tag: Label');
|
120
28
|
});
|