Skip to content

Commit

Permalink
fix: pageHeader avt 1
Browse files Browse the repository at this point in the history
  • Loading branch information
devadula-nandan committed Dec 11, 2024
1 parent 9a6a1d3 commit 43ea6f7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions e2e/components/PageHeader/PageHeader-test.avt.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,17 @@ test.describe('PageHeader @avt', () => {
(await page.locator('*:focus').textContent()) === 'Secondary button';
await page.keyboard.press('Tab');
(await page.locator('*:focus').textContent()) === 'Primary button';
// reset focus to first focusable element
await page.getByRole('link', { name: 'Home page' }).focus();
// changes position when header collapsed
await page.locator(`.page-header-stories__dummy-content`).first().hover();
await page.mouse.wheel(0, 180);
await pressTabKey(page, 4);

// collapse header through args
await visitStory(page, {
component: 'PageHeader',
id: 'ibm-products-components-page-header-pageheader--fully-loaded-and-some&args=collapseHeader:!true',
globals: {
carbonTheme: 'white',
},
});
await page.screenshot({ animations: 'disabled' });
await pressTabKey(page, 5);
await expect(
page.getByRole('button', { name: 'Page actions...' })
).toBeFocused();
Expand Down

0 comments on commit 43ea6f7

Please sign in to comment.