This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
340 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { test } from '@playwright/test'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('/', { waitUntil: 'load' }); | ||
}); | ||
|
||
const socialLinks = [ | ||
{ | ||
test: 'twitter-link', | ||
href: 'https://twitter.com/i/flow/login?redirect_after_login=%2FEarthMonitorOrg', | ||
}, | ||
// mastodon: '', | ||
{ test: 'github-link', href: 'https://github.com/Open-Earth-Monitor' }, | ||
// { test: 'tib-link', href: 'https://av.tib.eu/publisher/OpenGeoHub_Foundation' }, | ||
{ test: 'linkedin-link', href: 'https://www.linkedin.com/in/opengeohub]' }, | ||
]; | ||
|
||
test.describe('external links', () => { | ||
test('links to social media', async ({ page }) => { | ||
for (const link of socialLinks) { | ||
const Link = page.getByTestId(link['test']); | ||
await Link.click(); | ||
await page.waitForURL(link.href); | ||
} | ||
}); | ||
|
||
test('OEMC factsheet', async ({ page }) => { | ||
const OEMCFactsheet = page.getByTestId('OEMC-factsheet-link'); | ||
await OEMCFactsheet.click(); | ||
await page.waitForURL('https://cordis.europa.eu/project/id/101059548'); | ||
}); | ||
|
||
test('OEMC conact us', async ({ page }) => { | ||
const OEMCFactsheet = page.getByTestId('contact-link'); | ||
await OEMCFactsheet.click(); | ||
await page.waitForURL('https://earthmonitor.org/contact-us/'); | ||
}); | ||
|
||
test('OEMC privacy policy', async ({ page }) => { | ||
const OEMCFactsheet = page.getByTestId('privacy-policy-link'); | ||
await OEMCFactsheet.click(); | ||
await page.waitForURL('https://earthmonitor.org/privacy-policy/'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('/', { waitUntil: 'load' }); | ||
}); | ||
|
||
const socialLinks = [ | ||
{ | ||
test: 'twitter-link', | ||
href: 'https://twitter.com/i/flow/login?redirect_after_login=%2FEarthMonitorOrg', | ||
}, | ||
// mastodon: '', | ||
{ test: 'github-link', href: 'https://github.com/Open-Earth-Monitor' }, | ||
// { test: 'tib-link', href: 'https://av.tib.eu/publisher/OpenGeoHub_Foundation' }, | ||
{ test: 'linkedin-link', href: 'https://www.linkedin.com/in/opengeohub]' }, | ||
]; | ||
|
||
test.describe('external links', () => { | ||
test('links to social media', async ({ page }) => { | ||
for (const link of socialLinks) { | ||
const Link = page.getByTestId(link['test']); | ||
await Link.click(); | ||
await page.waitForURL(link.href); | ||
} | ||
}); | ||
|
||
test('OEMC factsheet', async ({ page }) => { | ||
const OEMCFactsheet = page.getByTestId('OEMC-factsheet-link'); | ||
await OEMCFactsheet.click(); | ||
await page.waitForURL('https://cordis.europa.eu/project/id/101059548'); | ||
}); | ||
|
||
test('OEMC contact us', async ({ page }) => { | ||
const OEMCFactsheet = page.getByTestId('contact-link'); | ||
await OEMCFactsheet.click(); | ||
await page.waitForURL('https://earthmonitor.org/contact-us/'); | ||
}); | ||
|
||
test('OEMC privacy policy', async ({ page }) => { | ||
const OEMCFactsheet = page.getByTestId('privacy-policy-link'); | ||
await OEMCFactsheet.click(); | ||
await page.waitForURL('https://earthmonitor.org/privacy-policy/'); | ||
}); | ||
}); | ||
|
||
test('Disclaimer', async ({ page }) => { | ||
const disclaimerTrigger = page.getByTestId('disclaimer'); | ||
await disclaimerTrigger.click(); | ||
await expect(page.getByTestId('disclaimer-content')).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const CONTROL_BUTTON_STYLES = | ||
'h-[25px] w-[25px] text-secondary-800 active:bg-brand-200 hover:text-secondary-500'; | ||
|
||
export const CONTROL_ICON_STYLES = 'h-5 w-5 self-baseline'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.