fix sizing of nav items on desktop

This commit is contained in:
2024-10-12 11:57:58 -05:00
parent 3049446f65
commit 8caf7ac85a
3 changed files with 21 additions and 2 deletions

View File

@@ -30,3 +30,14 @@ test('desktop page has equal width for both columns', async ({ page }) => {
};
expect(contentWidth).toEqual(previewWidth);
});
test('desktop page has equal width for nav items', async ({ page }) => {
await page.goto('/');
const visibleTabs = page.getByRole('tab').filter({ hasNotText: 'preview' });
const { width: firstTabWidth } = (await visibleTabs.first().boundingBox()) ?? {
width: -1,
};
for (let i = 1; i < (await visibleTabs.count()); i++) {
await expect((await visibleTabs.nth(i).boundingBox())?.width).toEqual(firstTabWidth);
}
});