-
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(stepper): add darkmode screenshot test and refactor folder struc…
…ture
- Loading branch information
Showing
6 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
packages/core/src/components/stepper/test/large-horizontal-text-below/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,39 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
/> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<title>Stepper - Large horizontal text below</title> | ||
<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)"> | ||
<tds-stepper | ||
data-testid="tds-stepper-testid" | ||
size="lg" | ||
label-position="below" | ||
orientation="horizontal" | ||
> | ||
<tds-step state="success" index="1"> | ||
<div slot="label">Success step</div> | ||
</tds-step> | ||
<tds-step state="error" index="2"> | ||
<div slot="label">Error step</div> | ||
</tds-step> | ||
<tds-step state="current" index="3"> | ||
<div slot="label">Current step</div> | ||
</tds-step> | ||
<tds-step index="4"> | ||
<div slot="label">Upcoming step</div> | ||
</tds-step> | ||
</tds-stepper> | ||
</body> | ||
</html> |
5 changes: 3 additions & 2 deletions
5
...arge-horizontal-text-below/stepper.e2e.ts → ...zontal-text-below/darkmode/stepper.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
Binary file added
BIN
+13.3 KB
....ts-snapshots/Stepper---Large-horizontal-with-text-below---darkmode-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.
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
13 changes: 13 additions & 0 deletions
13
...ges/core/src/components/stepper/test/large-horizontal-text-below/lightmode/stepper.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,13 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = | ||
'src/components/stepper/test/large-horizontal-text-below/lightmode/index.html'; | ||
|
||
//Test if component renders and take a screenshot of the component | ||
test('Stepper - Large horizontal with text below - lightmode', async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
const stepper = page.locator('[data-testid="tds-stepper-testid"]'); | ||
await stepper.waitFor({ state: 'visible' }); | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); |
File renamed without changes