diff --git a/tests/about.spec.ts b/tests/about.spec.ts index 538ce6e3..84bcc0f8 100644 --- a/tests/about.spec.ts +++ b/tests/about.spec.ts @@ -50,25 +50,45 @@ test.describe('About Page Tests', () => { await page.getByRole('link', { name: 'Creative Commons' }).click() await expect(page).toHaveURL('https://creativecommons.org/') }) -}) -test('clicking the links under "questions" should lead to the correct contact ways', async ({ - page, -}) => { - await page.goto('/') - await page.getByRole('link', { name: 'אודות' }).click() - await page.getByRole('link', { name: 'צרו איתנו קשר' }).click() - await expect(page).toHaveURL('https://www.hasadna.org.il/צור-קשר/') - await page.goto('/about') - await page.getByRole('link', { name: 'דברו איתנו על זה בסלאק' }).click() - await expect(page).toHaveURL( - 'https://hasadna.slack.com/join/shared_invite/zt-167h764cg-J18ZcY1odoitq978IyMMig#/shared-invite/email', - ) - await page.goto('/about') - await page - .getByRole('link', { name: 'שרתים עולים כסף - עזרו לנו להמשיך לתחזק ולפתח את הפרויקט!' }) - .click() - await expect(page).toHaveURL( - 'https://www.jgive.com/new/he/ils/donation-targets/3268#donation-modal', - ) + test('clicking the links under "questions" should lead to the correct contact ways', async ({ + page, + }) => { + await page.goto('/') + await page.getByRole('link', { name: 'אודות' }).click() + await page.getByRole('link', { name: 'צרו איתנו קשר' }).click() + await expect(page).toHaveURL('https://www.hasadna.org.il/צור-קשר/') + await page.goto('/about') + await page.getByRole('link', { name: 'דברו איתנו על זה בסלאק' }).click() + await expect(page).toHaveURL( + 'https://hasadna.slack.com/join/shared_invite/zt-167h764cg-J18ZcY1odoitq978IyMMig#/shared-invite/email', + ) + await page.goto('/about') + await page + .getByRole('link', { name: 'שרתים עולים כסף - עזרו לנו להמשיך לתחזק ולפתח את הפרויקט!' }) + .click() + await expect(page).toHaveURL( + 'https://www.jgive.com/new/he/ils/donation-targets/3268#donation-modal', + ) + }) + + test('links under "Attributions" should lead to the attr origins', async ({ page }) => { + await page.goto('/') + await page.getByRole('link', { name: 'אודות' }).click() + await page.getByRole('link', { name: 'Applitools' }).click() + await expect(page).toHaveURL('https://applitools.com/') + await page.goto('/about') + const page1Promise = page.waitForEvent('popup') + await page.getByRole('link', { name: 'pch.vector' }).click() + const page1 = await page1Promise + await expect(page1).toHaveURL( + 'https://www.freepik.com/free-vector/passengers-waiting-bus-city-queue-town-road-flat-vector-illustration-public-transport-urban-lifestyle_10173277.htm#query=public%20transportation&position=0&from_view=search&track=ais&uuid=70a79b38-20cb-42b8-9dde-b96a68088522', + ) + await page.goto('https://github.com/hasadna/open-bus-map-search/blob/main/CONTRIBUTING.md') + await page.goto('/about') + await page.getByRole('link', { name: 'קרא כאן' }).click() + await expect(page).toHaveURL( + 'https://github.com/hasadna/open-bus-map-search/blob/main/CONTRIBUTING.md', + ) + }) })