Skip to content

Commit

Permalink
define header height
Browse files Browse the repository at this point in the history
  • Loading branch information
just-boris committed Oct 12, 2024
1 parent cfebb2b commit 82e17e3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/app-layout/__integ__/awsui-applayout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,11 @@ describe.each(['classic', 'refresh', 'refresh-toolbar'] as Theme[])('%s', theme
test(
'does not render notifications slot when it is empty',
setupTest({ pageName: 'with-notifications' }, async page => {
const { height: originalHeight } = await page.getBoundingBox(wrapper.findNotifications().toSelector());
expect(originalHeight).toBeGreaterThan(0);
await page.click(wrapper.findNotifications().findFlashbar().findItems().get(1).findDismissButton().toSelector());
await expect(page.isExisting(wrapper.findNotifications().findFlashbar().toSelector())).resolves.toBe(true);
await expect(
page.getElementsCount(wrapper.findNotifications().findFlashbar().findItems().toSelector())
).resolves.toBe(0);
const { top: contentTop } = await page.getBoundingBox('[data-testid="content-root"]');
const expectedOffset = {
classic: 61,
refresh: 57,
'refresh-toolbar': 99,
}[theme];
expect(contentTop).toEqual(expectedOffset);
const { height: newHeight } = await page.getBoundingBox(wrapper.findNotifications().toSelector());
expect(newHeight).toEqual(0);
})
);
});

0 comments on commit 82e17e3

Please sign in to comment.