Skip to content

Commit

Permalink
adjust playwright test
Browse files Browse the repository at this point in the history
using the Avatar component for favicon instead of just img made the
Avatar element to be a better locator
  • Loading branch information
subhoghoshX committed Jul 26, 2024
1 parent c3527ea commit 3139cc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/newtab/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function App() {
className="flex items-center gap-x-8 px-2 py-1 -mx-2 hover:bg-zinc-50 dark:hover:bg-zinc-900 rounded"
>
<div className="w-44 flex items-center gap-3">
<Avatar className="size-3.5">
<Avatar className="size-3.5" id="favicon">
<AvatarImage
src={"https://favicone.com/" + hostName}
alt={hostName + " favicon"}
Expand Down
2 changes: 1 addition & 1 deletion tests/example.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test("Extension in New Tab page", async ({ page }) => {
await expect(page).toHaveScreenshot({
mask: [
page.locator("section > div:last-child > div:first-child svg"),
page.locator("section > div:first-child ul li button img"),
page.locator("#favicon"),
],
});
});

0 comments on commit 3139cc9

Please sign in to comment.