-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(footer): add lightmode and darkmode screenshot tests for mode va…
…riants
- Loading branch information
Showing
12 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/core/src/components/footer/test/default/primary/darkmode/footer.e2e.ts
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,15 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/footer/test/default/primary/darkmode/index.html'; | ||
|
||
test.describe.parallel('tds-footer-default-primary-darkmode', () => { | ||
test('renders default footer correctly', async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
const footerComponent = page.locator('footer'); | ||
await expect(footerComponent).toHaveCount(1); | ||
|
||
/** Check screenshot diff */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+8.99 KB
...ds-footer-default-primary-darkmode-renders-default-footer-correctly-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions
47
packages/core/src/components/footer/test/default/primary/darkmode/index.html
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,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Footer - Default</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" /> | ||
<link rel="stylesheet" href="../../../../../../../dist/tegel/tegel.css" /> | ||
<script type="module"> | ||
import { defineCustomElements } from '../../../../../../../loader/index.es2017.js'; | ||
defineCustomElements(); | ||
</script> | ||
</head> | ||
|
||
<body class="tds-mode-dark" style="background-color: var(--tds-grey-958); padding: 20px"> | ||
<tds-footer mode-variant="primary"> | ||
<div slot="start"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
<div slot="end"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
</tds-footer> | ||
</body> | ||
</html> |
15 changes: 15 additions & 0 deletions
15
packages/core/src/components/footer/test/default/primary/lightmode/footer.e2e.ts
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,15 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/footer/test/default/primary/lightmode/index.html'; | ||
|
||
test.describe.parallel('tds-footer-default-primary-lightmode', () => { | ||
test('renders default footer correctly', async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
const footerComponent = page.locator('footer'); | ||
await expect(footerComponent).toHaveCount(1); | ||
|
||
/** Check screenshot diff */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+8.89 KB
...s-footer-default-primary-lightmode-renders-default-footer-correctly-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions
47
packages/core/src/components/footer/test/default/primary/lightmode/index.html
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,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Footer - Default</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" /> | ||
<link rel="stylesheet" href="../../../../../../../dist/tegel/tegel.css" /> | ||
<script type="module"> | ||
import { defineCustomElements } from '../../../../../../../loader/index.es2017.js'; | ||
defineCustomElements(); | ||
</script> | ||
</head> | ||
|
||
<body style="padding: 20px"> | ||
<tds-footer mode-variant="primary"> | ||
<div slot="start"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
<div slot="end"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
</tds-footer> | ||
</body> | ||
</html> |
15 changes: 15 additions & 0 deletions
15
packages/core/src/components/footer/test/default/secondary/darkmode/footer.e2e.ts
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,15 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/footer/test/default/secondary/darkmode/index.html'; | ||
|
||
test.describe.parallel('tds-footer-default-secondary-darkmode', () => { | ||
test('renders default footer correctly', async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
const footerComponent = page.locator('footer'); | ||
await expect(footerComponent).toHaveCount(1); | ||
|
||
/** Check screenshot diff */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+9 KB
...-footer-default-secondary-darkmode-renders-default-footer-correctly-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions
47
packages/core/src/components/footer/test/default/secondary/darkmode/index.html
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,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Footer - Default</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" /> | ||
<link rel="stylesheet" href="../../../../../../../dist/tegel/tegel.css" /> | ||
<script type="module"> | ||
import { defineCustomElements } from '../../../../../../../loader/index.es2017.js'; | ||
defineCustomElements(); | ||
</script> | ||
</head> | ||
|
||
<body class="tds-mode-dark" style="background-color: var(--tds-grey-900); padding: 20px"> | ||
<tds-footer mode-variant="secondary"> | ||
<div slot="start"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
<div slot="end"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
</tds-footer> | ||
</body> | ||
</html> |
15 changes: 15 additions & 0 deletions
15
packages/core/src/components/footer/test/default/secondary/lightmode/footer.e2e.ts
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,15 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/footer/test/default/secondary/lightmode/index.html'; | ||
|
||
test.describe.parallel('tds-footer-default-secondary-lightmode', () => { | ||
test('renders default footer correctly', async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
const footerComponent = page.locator('footer'); | ||
await expect(footerComponent).toHaveCount(1); | ||
|
||
/** Check screenshot diff */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+8.91 KB
...footer-default-secondary-lightmode-renders-default-footer-correctly-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions
47
packages/core/src/components/footer/test/default/secondary/lightmode/index.html
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,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Footer - Default</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" /> | ||
<link rel="stylesheet" href="../../../../../../../dist/tegel/tegel.css" /> | ||
<script type="module"> | ||
import { defineCustomElements } from '../../../../../../../loader/index.es2017.js'; | ||
defineCustomElements(); | ||
</script> | ||
</head> | ||
|
||
<body style="background-color: var(--tds-grey-50); padding: 20px"> | ||
<tds-footer mode-variant="secondary"> | ||
<div slot="start"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#">Link text</a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
<div slot="end"> | ||
<tds-footer-group> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
<tds-footer-item> | ||
<a href="#"><tds-icon name="truck"></tds-icon></a> | ||
</tds-footer-item> | ||
</tds-footer-group> | ||
</div> | ||
</tds-footer> | ||
</body> | ||
</html> |