test(editor): enable basic test for cross platform (#11667)

This commit is contained in:
Saul-Mirone 2025-04-14 07:36:56 +00:00
parent ee15b364d1
commit efecce9bf2
No known key found for this signature in database
GPG Key ID: 0D941B4A9125B742
6 changed files with 13 additions and 10 deletions

View File

@ -248,7 +248,7 @@ jobs:
- name: Run playwright tests
env:
BROWSER: ${{ matrix.browser }}
run: yarn workspace @affine-test/blocksuite test "inline-editor.spec.ts" --forbid-only --shard=${{ matrix.shard }}/${{ strategy.job-total }}
run: yarn workspace @affine-test/blocksuite test "cross-platform/" --forbid-only --shard=${{ matrix.shard }}/${{ strategy.job-total }}
- name: Upload test results
if: always()

View File

@ -31,7 +31,7 @@ import {
undoByKeyboard,
waitDefaultPageLoaded,
waitNextFrame,
} from './utils/actions/index.js';
} from '../utils/actions/index.js';
import {
assertBlockChildrenIds,
assertEmpty,
@ -39,9 +39,9 @@ import {
assertRichTexts,
assertText,
assertTitle,
} from './utils/asserts.js';
import { scoped, test } from './utils/playwright.js';
import { getFormatBar } from './utils/query.js';
} from '../utils/asserts.js';
import { scoped, test } from '../utils/playwright.js';
import { getFormatBar } from '../utils/query.js';
const BASIC_DEFAULT_SNAPSHOT = 'basic test default';

View File

@ -2,20 +2,21 @@ import type { InlineEditor, InlineRange } from '@blocksuite/affine/std/inline';
import type { DeltaInsert } from '@blocksuite/affine/store';
import { expect, type Page, test } from '@playwright/test';
import { press } from '../database/actions.js';
import { press } from '../../database/actions.js';
import {
pressArrowLeft,
pressBackspace,
pressEnter,
type,
} from '../utils/actions/keyboard.js';
} from '../../utils/actions/keyboard.js';
import {
enterPlaygroundRoom,
focusRichText,
initEmptyParagraphState,
} from '../utils/actions/misc.js';
import { assertRichTextInlineDeltas } from '../utils/asserts.js';
import { ZERO_WIDTH_FOR_EMPTY_LINE } from '../utils/inline-editor.js';
} from '../../utils/actions/misc.js';
import { assertRichTextInlineDeltas } from '../../utils/asserts.js';
import { ZERO_WIDTH_FOR_EMPTY_LINE } from '../../utils/inline-editor.js';
// FIXME(mirone): copy paste from framework/inline/__tests__/utils.ts
const defaultPlaygroundURL = new URL(
`http://localhost:${process.env.CI ? 4173 : 5173}/`

View File

@ -151,6 +151,8 @@ export async function enterPlaygroundRoom(
'Running frontend commit',
// Github timeout:
'Failed to load resource: the server responded with a status of 403',
// font download warning:
'[JavaScript Warning: "downloadable font:',
].some(text => message.text().startsWith(text))
) {
return;