Skip to content

Commit 60ed0e3

Browse files
committed
test: removed left overs from tabs spec
1 parent cde87ee commit 60ed0e3

File tree

1 file changed

+6
-25
lines changed

1 file changed

+6
-25
lines changed

packages/kit-headless/src/components/tabs/tabs.spec.tsx

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ interface DynamicTabsProps {
1313

1414
const ThreeTabsComponent = component$(() => {
1515
return (
16-
17-
<Tabs data-testid='tabs'>
16+
<Tabs data-testid="tabs">
1817
<TabList>
1918
<Tab>Tab 1</Tab>
2019
<Tab>Tab 2</Tab>
@@ -25,8 +24,7 @@ const ThreeTabsComponent = component$(() => {
2524
<TabPanel>Panel 2</TabPanel>
2625
<TabPanel>Panel 3</TabPanel>
2726
</Tabs>
28-
29-
)
27+
);
3028
});
3129

3230
const DynamicTabsComponent = component$(
@@ -68,35 +66,18 @@ const DynamicTabsComponent = component$(
6866
);
6967

7068
describe('Tabs', () => {
71-
it('should render the component and check if its accessible', () => {
72-
cy.mount(
73-
<Tabs>
74-
<TabList>
75-
<Tab>Tab 1</Tab>
76-
<Tab>Tab 2</Tab>
77-
<Tab>Tab 3</Tab>
78-
</TabList>
79-
80-
describe('Tabs', () => {
81-
8269
it('INIT', () => {
83-
cy.mount(
84-
<ThreeTabsComponent/>
85-
);
70+
cy.mount(<ThreeTabsComponent />);
8671
cy.findByTestId('tabs').matchImage();
87-
72+
8873
cy.checkA11yForComponent();
89-
})
74+
});
9075
it('should render the component', () => {
91-
cy.mount(
92-
<ThreeTabsComponent/>
93-
);
76+
cy.mount(<ThreeTabsComponent />);
9477

9578
cy.findByRole('tab', { name: /Tab 2/i }).click();
9679

9780
cy.findByRole('tabpanel').should('contain', 'Panel 2');
98-
99-
10081
});
10182

10283
it('Given 3 tabs, when removing the last one dynamically, only 2 should remain', () => {

0 commit comments

Comments
 (0)