-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into test/link-screenshot-tests
- Loading branch information
Showing
71 changed files
with
721 additions
and
88 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
packages/core/src/components/button/test/secondary/primary/darkmode/button.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,18 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/button/test/secondary/primary/darkmode/index.html'; | ||
|
||
test.describe.parallel('tds-button-secondary-primary-darkmode', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
}); | ||
|
||
test('renders secondary button correctly', async ({ page }) => { | ||
const button = page.getByTestId('tds-button-testid'); | ||
await expect(button).toHaveCount(1); | ||
|
||
/* Check diff on screenshot */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+5.32 KB
...utton-secondary-primary-darkmode-renders-secondary-button-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.
23 changes: 23 additions & 0 deletions
23
packages/core/src/components/button/test/secondary/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,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Button - Secondary</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-button | ||
text="Button" | ||
variant="secondary" | ||
mode-variant="primary" | ||
size="md" | ||
data-testid="tds-button-testid" | ||
></tds-button> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/core/src/components/button/test/secondary/primary/lightmode/button.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,18 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/button/test/secondary/primary/lightmode/index.html'; | ||
|
||
test.describe.parallel('tds-button-secondary-primary-lightmode', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
}); | ||
|
||
test('renders secondary button correctly', async ({ page }) => { | ||
const button = page.getByTestId('tds-button-testid'); | ||
await expect(button).toHaveCount(1); | ||
|
||
/* Check diff on screenshot */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+5.18 KB
...tton-secondary-primary-lightmode-renders-secondary-button-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.
23 changes: 23 additions & 0 deletions
23
packages/core/src/components/button/test/secondary/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,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Button - Secondary</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-button | ||
text="Button" | ||
variant="secondary" | ||
mode-variant="primary" | ||
size="md" | ||
data-testid="tds-button-testid" | ||
></tds-button> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/core/src/components/button/test/secondary/secondary/darkmode/button.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,18 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/button/test/secondary/secondary/darkmode/index.html'; | ||
|
||
test.describe.parallel('tds-button-secondary-secondary-darkmode', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
}); | ||
|
||
test('renders secondary button correctly', async ({ page }) => { | ||
const button = page.getByTestId('tds-button-testid'); | ||
await expect(button).toHaveCount(1); | ||
|
||
/* Check diff on screenshot */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+5.34 KB
...ton-secondary-secondary-darkmode-renders-secondary-button-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.
23 changes: 23 additions & 0 deletions
23
packages/core/src/components/button/test/secondary/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,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Button - Secondary</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-button | ||
text="Button" | ||
variant="secondary" | ||
mode-variant="secondary" | ||
size="md" | ||
data-testid="tds-button-testid" | ||
></tds-button> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/core/src/components/button/test/secondary/secondary/lightmode/button.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,18 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/button/test/secondary/secondary/lightmode/index.html'; | ||
|
||
test.describe.parallel('tds-button-secondary-secondary-lightmode', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
}); | ||
|
||
test('renders secondary button correctly', async ({ page }) => { | ||
const button = page.getByTestId('tds-button-testid'); | ||
await expect(button).toHaveCount(1); | ||
|
||
/* Check diff on screenshot */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+5.27 KB
...on-secondary-secondary-lightmode-renders-secondary-button-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.
23 changes: 23 additions & 0 deletions
23
packages/core/src/components/button/test/secondary/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,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Button - Secondary</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-button | ||
text="Button" | ||
variant="secondary" | ||
mode-variant="secondary" | ||
size="md" | ||
data-testid="tds-button-testid" | ||
></tds-button> | ||
</body> | ||
</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
File renamed without changes
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
packages/core/src/components/checkbox/test/default/darkmode/checkbox.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,18 @@ | ||
import { test } from 'stencil-playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const componentTestPath = 'src/components/checkbox/test/default/darkmode/index.html'; | ||
|
||
test.describe.parallel('tds-checkbox-darkmode', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
}); | ||
|
||
test('renders basic checkbox correctly', async ({ page }) => { | ||
const labelElement = page.locator('tds-checkbox label'); // Target label underneath checkbox | ||
|
||
expect(labelElement).toHaveText('Label'); // Check label text | ||
/* Check diff on screenshot */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file renamed
BIN
+4.26 KB
...o-render-a-horizontal-divider-1-linux.png → ...ders-basic-checkbox-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.
19 changes: 19 additions & 0 deletions
19
packages/core/src/components/checkbox/test/default/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,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Checkbox - 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)"> | ||
<tds-checkbox> | ||
<span slot="label">Label</span> | ||
</tds-checkbox> | ||
</body> | ||
</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
File renamed without changes
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
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
8 changes: 5 additions & 3 deletions
8
...nts/divider/test/darkmode/darkmode.e2e.ts → ...r/test/horizontal/darkmode/divider.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 renamed
BIN
+4.27 KB
...-render-a-divider-in-darkmode-1-linux.png → ...-render-a-divider-in-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
18 changes: 0 additions & 18 deletions
18
packages/core/src/components/divider/test/horizontal/divider.e2e.ts
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
packages/core/src/components/divider/test/horizontal/lightmode/divider.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/divider/test/horizontal/lightmode/index.html'; | ||
|
||
test.describe.parallel('tds-divider-lightmode', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(componentTestPath); | ||
}); | ||
|
||
test('expect to render a divider in lightmode', async ({ page }) => { | ||
/* Check diff on screenshot */ | ||
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); | ||
}); | ||
}); |
Binary file added
BIN
+4.26 KB
...shots/tds-divider-lightmode-expect-to-render-a-divider-in-lightmode-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
Oops, something went wrong.