-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(KTL-1189); fix: crop editor screenshots
- Loading branch information
Showing
7 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
Binary file modified
BIN
-4.89 KB
(48%)
tests/__screenshots__/dev/Desktop-Chrome/basics.e2e.ts-basics-highlight-only-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-8.41 KB
(36%)
tests/__screenshots__/dev/Desktop-Chrome/basics.e2e.ts-basics-simple-usage-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-7.93 KB
(48%)
tests/__screenshots__/dev/Desktop-Chrome/basics.e2e.ts-basics-simple-usage-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-8.41 KB
(36%)
tests/__screenshots__/dev/Desktop-Chrome/basics.e2e.ts-basics-simple-usage-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-7.94 KB
(45%)
tests/__screenshots__/dev/Desktop-Chrome/basics.e2e.ts-basics-simple-usage-4.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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { expect, Page } from '@playwright/test'; | ||
import { expect, Locator } from '@playwright/test'; | ||
|
||
export async function expectScreenshot(page: Page, message: string) { | ||
const cursor = page.locator('.CodeMirror-cursors'); | ||
export async function checkEditorScreenshot(node: Locator, message: string) { | ||
const cursor = node.locator('.CodeMirror-cursors'); | ||
|
||
// Cursor blinks all the time, it's failed test from time to time | ||
await cursor.evaluate((element) => (element.style.display = 'none')); | ||
await expect(page, message).toHaveScreenshot(); | ||
await expect(node, message).toHaveScreenshot(); | ||
await cursor.evaluate((element) => (element.style.display = null)); | ||
} |