Skip to content

Commit

Permalink
fix: removed avt test cases as per the PR review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
preetibansalui committed Feb 29, 2024
1 parent 3e8be93 commit ecb5590
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions e2e/components/Accordion/Accordion-test.avt.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,6 @@ test.describe('@avt Accordion', () => {
);
});

test('@avt-advanced-states controlled', async ({ page }) => {
await visitStory(page, {
component: 'Accordion',
id: 'components-accordion--controlled',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations(
'Accordion @avt-advanced-states controlled'
);
});

test('@avt-keyboard-nav', async ({ page }) => {
await visitStory(page, {
component: 'Accordion',
Expand Down Expand Up @@ -157,36 +144,4 @@ test.describe('@avt Accordion', () => {
'Accordion @avt-advanced-states disabled'
);
});

test('@avt-keyboard-nav expand/collapseAll', async ({ page }) => {
await visitStory(page, {
component: 'Accordion',
id: 'components-accordion--controlled',
globals: {
theme: 'white',
},
});
const expand_all_btn = page.getByRole('button', {
name: 'Click to expand all',
});
const collapse_all_btn = page.getByRole('button', {
name: 'Click to collapse all',
});
const accordion_btn1 = page.getByRole('button', {
name: 'Section 1 title',
});
await expect(expand_all_btn).toBeVisible();
await expect(collapse_all_btn).toBeVisible();
await page.keyboard.press('Tab');

// Check the focus on Expand button
await expect(expand_all_btn).toBeFocused();
await page.keyboard.press('Enter');
await expect(accordion_btn1).toHaveAttribute('aria-expanded', 'true');
//focus on collapse button
await page.keyboard.press('Tab');
await expect(collapse_all_btn).toBeFocused();
await page.keyboard.press('Enter');
await expect(accordion_btn1).toHaveAttribute('aria-expanded', 'false');
});
});

0 comments on commit ecb5590

Please sign in to comment.