Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Logo desktop link #886

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/layouts/desktop/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ const DesktopLayout = () => {
<Link
href="/"
className="pointer-events-auto absolute top-0 left-0 z-50 cursor-pointer print:hidden"
data-testid="desktop-logo-link"
>
<Image width={220} height={100} src="/images/logo.svg" alt="Global Mangrove Watch" />
<Image
data-testid="desktop-logo"
width={220}
height={100}
src="/images/logo.svg"
alt="Global Mangrove Watch"
/>
</Link>
<MapContainer mapId={`default-desktop-${isPrintingId}`} />

Expand Down
10 changes: 10 additions & 0 deletions tests/logo-desktop.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { test } from '@playwright/test';

test('test logo links', async ({ page }) => {
await page.goto('/?active=["mangrove_allen_coral_reef","mangrove_habitat_extent"]');

const logoLink = page.getByTestId('desktop-logo');

await logoLink.click();
await page.waitForURL('/');
});
Loading