Skip to content

Commit

Permalink
Fix unicode normalization test, work around bigint logging issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bitjson committed Jan 26, 2024
1 parent 9047128 commit d67eee2
Show file tree
Hide file tree
Showing 28 changed files with 30 additions and 97 deletions.
14 changes: 13 additions & 1 deletion src/editor/evaluation-viewer/EvaluationViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ import {
} from '@blueprintjs/icons';
import { useState } from 'react';

// TODO: remove this workaround when https://github.com/PostHog/posthog-js/issues/968 lands
declare global {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface BigInt {
toJSON: () => string;
}
}
BigInt.prototype.toJSON = function () {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
return this.toString();
};

// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
(window as any).libauth = libauth;

Expand Down Expand Up @@ -262,7 +274,7 @@ const EvaluationLine = ({
}`}
onClick={() => {
console.log(`ProgramState after line #${lineNumber}:`);
console.log(stringify(line.state));
console.log(line.state);

Check warning on line 277 in src/editor/evaluation-viewer/EvaluationViewer.tsx

View check run for this annotation

Codecov / codecov/patch

src/editor/evaluation-viewer/EvaluationViewer.tsx#L277

Added line #L277 was not covered by tests
}}
>
{line.spacers?.slice(0, sliceSpacersAtIndex).map((type, index) => (
Expand Down
49 changes: 15 additions & 34 deletions tests/editor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, loadTemplate, scrollUntil, test } from './test-utils';
import { expect, loadTemplate, test } from './test-utils';

test('renders spacers as expected', async ({ page }) => {
await loadTemplate(page, 'tests/fixtures/spacers.json');
Expand Down Expand Up @@ -29,7 +29,7 @@ test('renders error as expected for a non-push opcode in unlocking script', asyn
await expect(page).toHaveScreenshot();
});

test('Displays evaluation of tested scripts', async ({ page }) => {
test('displays evaluation of tested scripts', async ({ page }) => {
await loadTemplate(page, 'tests/fixtures/state-merkle-trees.json');
await page.getByRole('button', { name: 'Empty Leaf', exact: true }).click();
await expect(page).toHaveScreenshot();
Expand All @@ -51,7 +51,7 @@ test('Displays evaluation of tested scripts', async ({ page }) => {
await expect(page.locator('.state.highlight.success')).toContainText('1');
});

test('Displays evaluation of tested scripts with custom scenarios', async ({
test('displays evaluation of tested scripts with custom scenarios', async ({
page,
}) => {
await loadTemplate(
Expand All @@ -61,34 +61,15 @@ test('Displays evaluation of tested scripts with custom scenarios', async ({
await page.getByRole('button', { name: 'Is 2 Bytes' }).click();
});

test.fixme(
'scrolls, renders success highlighting on valid unlock',
async ({ page, isMobile }) => {
test.skip(isMobile, '`scrollUntil` is not supported by mobile WebKit');
await loadTemplate(page, 'tests/fixtures/state-merkle-trees.json');
await page.getByRole('button', { name: 'Replace Empty Leaf' }).click();

await scrollUntil(
page,
page.locator('.ScriptEditor-locking .editor'),
page.getByText('OP_OUTPUTVALUE OP_EQUAL'),
);
await page.locator('.state.highlight.success').isVisible();
await expect(page).toHaveScreenshot();
},
);

test.fixme(
'ignores misleading unicode characters, shows compilation on hover',
async ({ page }) => {
await loadTemplate(page, 'tests/fixtures/empty.json');
await page.getByRole('button', { name: 'Unlock' }).click();
await page.locator('.ScriptEditor-locking .monaco-editor').click();
await page
.locator('.editor textarea')
.last()
.fill("<'fit'> <'fit'>\nOP_EQUAL\n");
await page.getByText('<').first().hover();
await expect(page).toHaveScreenshot();
},
);
test('ignores misleading unicode characters, shows compilation on hover', async ({
page,
}) => {
await loadTemplate(page, 'tests/fixtures/empty.json');
await page.getByRole('button', { name: 'Unlock' }).click();
await page.locator('.ScriptEditor-locking .monaco-editor').click();
await page.locator('.editor .view-line').last().click();
await page.keyboard.type(`<'fit'> <'fit'>\nOP_EQUAL`);
await page.getByText('<').first().hover();
await expect(page.getByText('Compiled: 0x03666974')).toBeVisible();
await expect(page).toHaveScreenshot();

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 1/8)

[chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2955 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-chromium-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2955 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2955 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 1/8)

[chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2955 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-chromium-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2955 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2955 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 1/8)

[chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2955 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-chromium-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2955 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2955 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 3/8)

[firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2605 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-firefox-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2605 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2605 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 3/8)

[firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2605 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-firefox-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2605 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2605 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 3/8)

[firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2605 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-firefox-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2605 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2605 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 1/8)

[chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2955 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-chromium-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2955 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2955 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 1/8)

[chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2955 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-chromium-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2955 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2955 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 1/8)

[chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [chromium] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2955 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-chromium-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-chromium-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2955 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2955 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 5/8)

[webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2970 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2970 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2970 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 5/8)

[webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2970 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2970 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2970 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 5/8)

[webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2970 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2970 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2970 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 3/8)

[firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2605 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-firefox-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2605 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2605 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 3/8)

[firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2605 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-firefox-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2605 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2605 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 3/8)

[firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [firefox] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2605 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-firefox-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-firefox-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2605 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2605 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 7/8)

[mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2973 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-mobile-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2973 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2973 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 7/8)

[mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2973 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-mobile-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2973 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2973 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (dev, 7/8)

[mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2973 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-mobile-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2973 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2973 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 5/8)

[webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2970 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2970 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2970 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 5/8)

[webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2970 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2970 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2970 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 5/8)

[webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2970 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2970 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2970 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 7/8)

[mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Error: Screenshot comparison failed: 2973 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-mobile-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2973 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2973 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 7/8)

[mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2973 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-mobile-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry1/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2973 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2973 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22

Check failure on line 74 in tests/editor.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests (prod, 7/8)

[mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters

1) [mobile-webkit] › editor.spec.ts:64:5 › ignores misleading unicode characters, shows compilation on hover Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: 2973 pixels (ratio 0.01 of all image pixels) are different. Expected: /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts-snapshots/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-mobile-webkit-linux.png Received: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-actual.png Diff: /__w/bitauth-ide/bitauth-ide/test-results/editor-ignores-misleading-unicode-characters-shows-compilation-on-hover-mobile-webkit-retry2/ignores-misleading-unicode-characters-shows-compilation-on-hover-1-diff.png Call log: - page._expectScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - 2973 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - 2973 pixels (ratio 0.01 of all image pixels) are different. 72 | await page.getByText('<').first().hover(); 73 | await expect(page.getByText('Compiled: 0x03666974')).toBeVisible(); > 74 | await expect(page).toHaveScreenshot(); | ^ 75 | }); 76 | at /__w/bitauth-ide/bitauth-ide/tests/editor.spec.ts:74:22
});
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.
2 changes: 1 addition & 1 deletion tests/fixtures/empty.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"unlocks": "lock"
},
"lock": {
"lockingType": "standard",
"lockingType": "p2sh20",
"name": "Lock",
"script": ""
}
Expand Down
62 changes: 1 addition & 61 deletions tests/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { randomBytes } from 'crypto';
import { promises, writeFileSync } from 'fs';
import { join } from 'path';

import { test as baseTest, Locator, Page } from '@playwright/test';
import { test as baseTest, Page } from '@playwright/test';

const istanbulCLIOutput = join(process.cwd(), '.nyc_output');
const generateUUID = () => randomBytes(16).toString('hex');
Expand Down Expand Up @@ -101,63 +101,3 @@ export const fixFontFlakiness = async (page: Page, enable = true) => {
);
await page.evaluate(() => document.fonts.ready);
};

const timeout = (ms: number) => {
const state = {
done: false,
promise: new Promise((res) => setTimeout(res, ms)).then(() => {
state.done = true;
}),
};
return state;
};

/**
* A utility to scroll within a container until another element becomes visible.
*
* Note, scrolling with Playwright's `mouse.wheel` is not supported in
* mobile WebKit.
*/
export const scrollUntil = async (
/**
* A Playwright {@link Page}
*/
page: Page,
/**
* A locator for the element in which to scroll
*/
scrollContainer: Locator,
/**
* A locator for the element to which the container should scroll
*/
scrollUntilVisible: Locator,
options: {
/**
* Pixels to scroll horizontally for each `wheel` event
*/
deltaX: number;
/**
* Pixels to scroll vertically for each `wheel` event
*/
deltaY: number;
/**
* The delay in milliseconds after which the operation will abort
*/
timeout: number;
} = {
deltaX: 0,
deltaY: 100,
timeout: 5_000,
},
) => {
const indefinite = options.timeout === 0;
const timer = timeout(options.timeout);
await scrollContainer.hover();
while (
(indefinite || !timer.done) &&
!(await scrollUntilVisible.isVisible())
) {
await page.mouse.wheel(options.deltaX, options.deltaY);
}
await page.mouse.wheel(options.deltaX, options.deltaY);
};

0 comments on commit d67eee2

Please sign in to comment.