Skip to content

Commit

Permalink
test(Label): update visual test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
amje committed May 28, 2024
1 parent 8de89f1 commit bb3235a
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions playwright/core/expectScreenshotFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export const expectScreenshotFixture: PlaywrightFixture<ExpectScreenshotFixture>
...pageScreenshotOptions
} = {}) => {
const captureScreenshot = async (theme: string) => {
const root = page.locator('#root');
const body = page.locator('body');

await root.evaluate((el: HTMLElement | SVGElement, newTheme: string) => {
await body.evaluate((el: HTMLElement | SVGElement, newTheme: string) => {
el.setAttribute('class', `g-root g-root_theme_${newTheme}`);
}, theme);

Expand Down
6 changes: 3 additions & 3 deletions playwright/playwright/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="ru">
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Test component page</title>
</head>
<body>
<div id="root" class="g-root g-root_theme_light"></div>
<body class="g-root g-root_theme_light">
<div id="root"></div>
<script type="module" src="./index.tsx"></script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bb3235a

Please sign in to comment.