From 26408c4889cbffd6fc5500ad8af984ecb43613c4 Mon Sep 17 00:00:00 2001 From: YaelChen Date: Mon, 4 Nov 2024 14:52:58 +0200 Subject: [PATCH] test: add test for GitHub icon --- tests/githubLink.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/githubLink.spec.ts diff --git a/tests/githubLink.spec.ts b/tests/githubLink.spec.ts new file mode 100644 index 00000000..d3c60724 --- /dev/null +++ b/tests/githubLink.spec.ts @@ -0,0 +1,10 @@ +import { test, expect } from '@playwright/test' + +test('make sure the corner GitHub icon leads to DataBus GitHub project', async ({ page }) => { + await page.goto('/') + const page1Promise = page.waitForEvent('popup') + await page.getByLabel('למעבר אל GitHub').locator('svg').click() + const page1 = await page1Promise + await expect(page1).toHaveURL(/open-bus-map-search/) + await expect(page1.getByRole('heading', { name: 'open-bus-map-search' })).toBeVisible() +})