diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..87697e5b29 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,17 @@ +# Keep the e2e image build context lean and Linux-clean: never copy host +# (macOS) node_modules or build outputs — deps are installed fresh inside the +# image. What actually lands in the image is selected explicitly by the COPY +# steps in tests/Dockerfile (manifests + example apps), not by exclusions here; +# these entries just stop the heavy/irrelevant trees from bloating the context. +**/node_modules +**/dist +**/types +**/.vite +**/.vite-plus +**/*.tsbuildinfo +**/.DS_Store +.git +**/test-results +**/blob-report +**/playwright-report +tests/.vitest-attachments diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f26c1c565..8f8a91035c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,8 +50,8 @@ jobs: id: soft-release run: vp dlx pkg-pr-new publish './packages/*' # TODO disabled only for AI branch--compact - playwright-build: - name: "Playwright Build" + e2e-build: + name: "E2E Build" runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -67,22 +67,24 @@ jobs: - name: Install dependencies run: vp install + # Example apps mounted by the e2e tests import the @blocknote/* packages' + # built dist. - name: Build packages - run: vp run -r build + run: vp run --filter ./packages build - - name: Upload build artifacts + - name: Upload package dist uses: actions/upload-artifact@v7 with: - name: playwright-build - path: | - packages/*/dist - playground/dist + name: e2e-package-dist + path: packages/*/dist retention-days: 1 - playwright: - name: "Playwright Tests - ${{ matrix.browser }} (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})" + e2e: + # Vitest Browser Mode runs in the Playwright Linux container — the same + # environment as the local Docker run — so behaviour matches local dev. + name: "E2E - ${{ matrix.browser }}" runs-on: ubuntu-latest - needs: playwright-build + needs: e2e-build timeout-minutes: 30 container: image: mcr.microsoft.com/playwright:v1.51.1-noble @@ -90,56 +92,11 @@ jobs: fail-fast: false matrix: browser: [chromium, firefox, webkit] - shardIndex: [1, 2] - shardTotal: [2] steps: - uses: actions/checkout@v6 with: fetch-depth: 100 - - uses: voidzero-dev/setup-vp@v1 - with: - node-version-file: ".node-version" - cache: true - - - name: Download build artifacts - uses: actions/download-artifact@v8 - with: - name: playwright-build - - - name: Install dependencies - run: vp install - - - name: Run server and Playwright tests - run: | - HOME=/root vp exec concurrently --success=first -r --kill-others \ - "vp run --filter @blocknote/example-editor preview" \ - "wait-on http://localhost:3000 && cd tests && vp exec playwright test --project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}" - - - name: Upload blob report - uses: actions/upload-artifact@v7 - if: ${{ !cancelled() }} - with: - name: blob-report-${{ matrix.browser }}-${{ matrix.shardIndex }} - path: tests/blob-report/ - retention-days: 1 - - - name: Upload HTML report - uses: actions/upload-artifact@v7 - if: ${{ !cancelled() }} - with: - name: playwright-report-${{ matrix.browser }}-${{ matrix.shardIndex }} - path: tests/playwright-report/ - retention-days: 30 - - merge-reports: - name: "Merge Playwright Reports" - if: ${{ !cancelled() }} - needs: playwright - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: voidzero-dev/setup-vp@v1 with: node-version-file: ".node-version" @@ -148,20 +105,22 @@ jobs: - name: Install dependencies run: vp install - - name: Download blob reports + - name: Download package dist uses: actions/download-artifact@v8 with: - path: tests/all-blob-reports - pattern: blob-report-* - merge-multiple: true + name: e2e-package-dist + path: packages - - name: Merge reports - run: vp exec playwright merge-reports --reporter html ./all-blob-reports + # No preview server: Vitest Browser Mode serves the tests + mounted example + # apps itself. `--browser` selects this matrix shard's browser. + - name: Run e2e tests (${{ matrix.browser }}) + run: HOME=/root vp test -c vite.config.browser.ts --run --browser ${{ matrix.browser }} working-directory: tests - - name: Upload merged HTML report + - name: Upload failure artifacts uses: actions/upload-artifact@v7 + if: ${{ failure() }} with: - name: playwright-report-merged - path: tests/playwright-report/ - retention-days: 30 + name: e2e-attachments-${{ matrix.browser }} + path: tests/.vitest-attachments/ + retention-days: 7 diff --git a/.gitignore b/.gitignore index 898dcdcc62..9fac8b5d4a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,10 @@ examples/*/types tsconfig.tsbuildinfo # testing coverage +# Vitest's attachment store (failure screenshots / diffs). Accumulates across +# runs; the HTML reporter copies what it needs into playwright-report/data, +# so the originals are unreferenced cruft. +.vitest-attachments/ # production /build diff --git a/e2e-vitest-browser-migration.md b/e2e-vitest-browser-migration.md new file mode 100644 index 0000000000..328d7e06a3 --- /dev/null +++ b/e2e-vitest-browser-migration.md @@ -0,0 +1,237 @@ +# Migrate the e2e suite from Playwright to Vitest Browser Mode + +## Context + +BlockNote is adopting **Vite Plus** (the `vp` CLI), which bundles **Vitest 4.1.5 Browser Mode** with a built-in Playwright provider (`@voidzero-dev/vite-plus-test`). We want the e2e suite (`tests/src/end-to-end`, 24 files / ~136 tests) to run under Vitest Browser Mode instead of standalone Playwright, so the whole test toolchain is unified under `vp test` (no separate preview server, no separate Playwright config/runner). + +The fundamental shift: **today each test navigates to a built preview page** (`page.goto("http://localhost:3000/basic/testing?hideMenu")`), which requires building + serving the `playground` app on port 3000. **Vitest Browser Mode runs the test file _inside the browser_ and serves the test plus everything it imports through its own Vite dev server.** So instead of navigating to an example, each test **imports that example's `App` component and mounts it** — no preview server at all. + +We are also removing the abandoned Playwright component-testing experiment (`tests/src/component`, the external copy/paste tests are explicitly flagged as not-yet-correct). + +Decisions confirmed with the user: **full migration** (all 24 files); **migrate the 42 PNG visual snapshots to Vitest's `toMatchScreenshot`** (regenerate baselines); **keep all three browsers** (chromium, firefox, webkit) with the existing per-browser skips. + +--- + +## The core mechanism: mounting instead of navigating + +Each example's `examples///src/App.tsx` is a default-exported React component (`export default function App()`). The playground already loads these dynamically via `import.meta.glob` ([playground/src/main.tsx:22,119-130](playground/src/main.tsx#L22)). We do the same in tests, but with a static import + synchronous render: + +```tsx +import { render } from "vitest-browser-react"; +import App from "../../../../examples/01-basic/testing/src/App.js"; + +beforeEach(() => { + render(); +}); +``` + +- `window.ProseMirror` (used by `getDoc`) is set by `useCreateBlockNote` ([useCreateBlockNote.tsx:30-33](packages/react/src/hooks/useCreateBlockNote.tsx#L30)), so it works for any mounted example. +- `?hideMenu` only hides the _playground_ shell ([playground/src/main.tsx:54,66](playground/src/main.tsx#L54)); mounting `App` directly means there is no shell, so the param is dropped entirely. +- The example→folder mapping (URL slug strips the numeric prefix), to replace every URL constant in [tests/src/utils/const.ts](tests/src/utils/const.ts): + +| Old constant (slug) | Example `App` to import | +| --------------------------------------------------------------------- | ---------------------------------------------------- | +| `BASE_URL` `/basic/testing` | `examples/01-basic/testing` | +| `SHADCN_URL` `/basic/shadcn` | `examples/01-basic/09-shadcn` | +| `ARIAKIT_URL` `/basic/ariakit` | `examples/01-basic/08-ariakit` | +| `MULTI_COLUMN_URL` `/basic/multi-column` | `examples/01-basic/03-multi-column` | +| `BASIC_BLOCKS_URL` `/basic/default-blocks` | `examples/01-basic/04-default-blocks` | +| `NO_TRAILING_BLOCK_URL` `/basic/no-trailing-block` | `examples/01-basic/17-no-trailing-block` | +| `AI_URL` `/ai/minimal` | `examples/09-ai/01-minimal` | +| `STATIC_URL` `/backend/rendering-static-documents` | `examples/02-backend/04-rendering-static-documents` | +| `BASIC_BLOCKS_STATIC_URL` `/interoperability/static-html-render` | `examples/05-interoperability/10-static-html-render` | +| `CUSTOM_BLOCKS_REACT_URL` `/custom-schema/react-custom-blocks` | `examples/06-custom-schema/react-custom-blocks` | +| `ALERT_BLOCK_URL` `/custom-schema/alert-block` | `examples/06-custom-schema/01-alert-block` | +| `NON_EDITABLE_BLOCK_URL` `/custom-schema/non-editable-block` | `examples/06-custom-schema/08-non-editable-block` | +| `PDF_FILE_BLOCK_URL` `/custom-schema/pdf-file-block` | `examples/06-custom-schema/04-pdf-file-block` | +| `COMMENTS_URL` `/collaboration/comments-testing` | `examples/07-collaboration/09-comments-testing` | +| `CUSTOM_BLOCKS_VANILLA_URL` `/vanilla-js/react-vanilla-custom-blocks` | `examples/vanilla-js/react-vanilla-custom-blocks` | + +> **tsconfig note:** statically importing `examples/**/App.tsx` pulls example sources into the tests' `tsc` build task ([tests/vite.config.ts:9-17](tests/vite.config.ts#L9)). Validate that the tests `tsconfig` `include`/references cover these (or add an `@examples/*` path alias). If type friction is excessive, fall back to the playground's `import.meta.glob(..., { import: "default" })` pattern in a small `loadExampleApp` helper. + +--- + +## New dependencies (`tests/package.json`) + +- **`vitest-browser-react`** — provides `render` (+ auto-cleanup between tests). Required; Vite Plus bundles the runner + Playwright provider but not a framework render helper. Use a Vitest-4-compatible version (add via the workspace `catalog:` like `vite-plus`). +- **`playwright`** — add explicitly. The provider runs `await import('playwright')` and bare `playwright` is **not** currently resolvable (only `@playwright/test` is). Pin to the existing `1.51.1`. +- **Remove** `@playwright/experimental-ct-react`. `@playwright/test` can also be removed once nothing imports from it (keep `playwright` only). + +--- + +## Infrastructure changes + +**1. New browser test project — `tests/vite.config.browser.ts`:** + +```ts +import { defineConfig, type UserConfig } from "vite-plus"; +import { playwright } from "vite-plus/test/browser/providers/playwright"; +import { dragAndDropBlock, dragMouse } from "./src/end-to-end/commands"; // see step 3 + +export default defineConfig( + (conf) => + ({ + test: { + name: "e2e", + include: ["./src/end-to-end/**/*.test.ts"], + setupFiles: ["./vitestSetup.browser.ts"], + browser: { + enabled: true, + provider: playwright(), // function call, NOT the string "playwright" + headless: !!process.env.CI, + commands: { dragAndDropBlock, dragMouse }, + expect: { + toMatchScreenshot: { + comparatorName: "pixelmatch", + comparatorOptions: { + threshold: 0.2, + allowedMismatchedPixelRatio: 0.01, + }, + }, + }, + instances: [ + { browser: "chromium" }, + { browser: "firefox" }, + { browser: "webkit" }, + ], + }, + // reuse the dev-time resolve.alias for @blocknote/core + @blocknote/react -> src + }, + resolve: { + /* same alias block as tests/vite.config.ts */ + }, + }) as UserConfig, +); +``` + +**2. Register the project** in the root [vite.config.ts](vite.config.ts) `test.projects` array (alongside `"./tests/vite.config.ts"`): add `"./tests/vite.config.browser.ts"`. The existing `tests/vite.config.ts` jsdom project (unit tests) stays unchanged — browser instances and jsdom cannot share one `test` block, so they remain separate projects. + +**3. Custom mouse commands — `tests/src/end-to-end/commands/` (run in Node, get the real Playwright `page`):** + +Port [tests/src/utils/mouse.ts](tests/src/utils/mouse.ts) logic verbatim into commands that resolve selectors via `frame()` (its `boundingBox()` returns top-level-page coordinates, sidestepping iframe-offset math). Example: + +```ts +import { defineBrowserCommand } from "vite-plus/test/browser/providers/playwright"; + +export const dragAndDropBlock = defineBrowserCommand< + [dragSel: string, dropSel: string, dropAbove: boolean] +>(async ({ frame }, dragSel, dropSel, dropAbove) => { + const f = await frame(); + const drag = f.locator(dragSel); + const box = (await drag.boundingBox())!; + // hover block -> drag handle appears -> drag handle center -> target left/right edge + // (mirrors dragAndDropBlock in mouse.ts using context.page.mouse.move/down/up) +}); +``` + +Augment the `BrowserCommands` interface (in `vitestSetup.browser.ts` or a `.d.ts`) so `server.commands.dragAndDropBlock(...)` is typed. Call from tests via `import { server } from "vite-plus/test/browser/context"`. + +**4. Browser setup file — `tests/vitestSetup.browser.ts`:** sets `window.__TEST_OPTIONS` per test (replacing the Playwright init-script in [tests/src/setup/setupScript.ts](tests/src/setup/setupScript.ts)) and the command type augmentation. Drop the jsdom-only mocks (`ClipboardEvent`/`DragEvent`/`matchMedia`) — the real browser provides them; those stay in the existing [tests/vitestSetup.ts](tests/vitestSetup.ts) for the unit project. + +--- + +## Rewrite shared utilities (`tests/src/utils/`) + +All helpers currently take `page: Page` and use the Playwright API. Rewrite them to use the global Vitest browser context (`page`, `userEvent`, `server` from `vite-plus/test/browser/context`) — they no longer need a `page` argument. The biggest simplification: **the test runs in the browser**, so `window`/`document` are directly accessible. + +| Util | Today (Playwright) | After (Vitest browser) | +| -------------------------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `editor.ts` `getDoc` | `page.evaluateHandle` → `window.ProseMirror.getJSON()` | `(window as any).ProseMirror.getJSON()` directly | +| `editor.ts` `compareDocToSnapshot` | `expect(doc).toMatchSnapshot("x.json")` | `expect(docStr).toMatchFileSnapshot(\`**snapshots**/${name}-${server.browser}.json\`)` (browser name in filename for per-browser baselines) | +| `editor.ts` `focusOnEditor` / `waitForSelectorInEditor` | `page.waitForSelector`/`click` | `await vi.waitFor(() => document.querySelector(".bn-editor"))`; `await userEvent.click(el)`; `await expect.element(...).toBeVisible()` | +| `mouse.ts` | `page.mouse.move/down/up`, `locator.boundingBox()` | thin wrappers calling `server.commands.dragAndDropBlock(...)` / `dragMouse(...)`; coord math moves into the command | +| `copypaste.ts` `copyPaste` | `page.keyboard` Ctrl+C/V | `userEvent.copy()` / `userEvent.paste()` (or `userEvent.keyboard("{Control>}c{/Control}")`) | +| `copypaste.ts` `copyPasteAllExternal(os)` | passed `os` | `server.platform` (external tests removed anyway — see below) | +| `slashmenu.ts` / `draghandle.ts` / `emojipicker.ts` | `page.keyboard.press`, `page.waitForSelector` | `userEvent.keyboard`, `vi.waitFor` / `expect.element(...)` | +| `const.ts` | URL constants + selectors | drop URL constants; keep CSS selector constants + `TYPE_DELAY` | +| pure helpers (`removeAttFromDoc`, `removeClassesFromHTML`, `removeMetaFromHTML`) | — | keep as-is | + +--- + +## Per-test conversion pattern (×24 files) + +Standard transformation per `*.test.ts`: + +- **Imports:** replace `import { expect } from "@playwright/test"` + `import { test } from "../../setup/setupScript.js"` with `import { test, expect, beforeEach, vi } from "vite-plus/test"`, `import { userEvent, page, server } from "vite-plus/test/browser/context"`, `import { render } from "vitest-browser-react"`, and the example `App` import. +- **Setup:** `test.beforeEach(async ({ page }) => { await page.goto(URL) })` → `beforeEach(() => { render(); })`. Drop the `{ page }` fixture from every test signature (use the global `page`). +- **API translation:** + - `page.locator(css)` / queries → `document.querySelector(css)` (in-browser) or `page.elementLocator(el)`; `userEvent`/`expect.element` accept raw `Element`. + - `page.keyboard.insertText/type/press` → `userEvent.keyboard(...)` (testing-library syntax: `{Enter}`, `{Shift>}{ArrowUp}{/Shift}`, etc.). + - `element.boundingBox()` → `el.getBoundingClientRect()`. + - `page.waitForSelector` / `locator.waitFor` → `vi.waitFor(...)` or `await expect.element(locator).toBeVisible()`. + - `page.evaluate(fn)` → run the code directly (already in browser). + - `expect(await el.textContent()).toBe(x)` → `await expect.element(page.elementLocator(el)).toHaveTextContent(x)`. + - file upload (`page.on("filechooser")`, images tests) → `userEvent.upload(inputEl, file)`. + - `test.use({ viewport })` (ai.test.ts) → `page.viewport(w, h)` in `beforeEach`. +- **Per-browser skips:** `test.skip(browserName === "firefox", ...)` → `test.skipIf(server.browser === "firefox")(...)`. Note copy/paste + `cdp()` are Chromium-only, matching existing skips. + +--- + +## Snapshots + +- **JSON doc snapshots (82 uses of `compareDocToSnapshot`):** → `toMatchFileSnapshot`, embedding `server.browser` in the filename for per-browser baselines. Regenerate with the Vitest update flag. +- **PNG visual snapshots (42 uses across 11 files):** `expect(await page.screenshot()).toMatchSnapshot("x.png")` → `await expect.element(locator).toMatchScreenshot("x")`. Vitest auto-appends `-${browserName}-${platform}` to baseline filenames (default dir `__screenshots__//`). All baselines must be regenerated (Vitest screenshots differ from the old Playwright/Docker PNGs). +- **Regeneration must run in Docker** for cross-platform/CI consistency, mirroring the current `test:updateSnaps` Docker flow ([tests/package.json](tests/package.json)) — replace it with a Docker invocation of `vp test --project e2e -u` (headless). Old `*.test.ts-snapshots/` dirs are replaced by the new Vitest snapshot locations. + +--- + +## Removals + +- Delete `tests/src/component/` entirely (incl. `snapshots/`) — the half-baked Playwright CT experiment (external tests carry an explicit "not the output we want" TODO). +- Delete `tests/playwright.config.ts`, `tests/playwright-ct.config.ts`, `tests/src/setup/setupScript.ts`, `tests/src/setup/setupScriptComponent.ts`. +- `tests/package.json` scripts: remove `playwright`, `test-ct`, `test-ct:updateSnaps`; rework `test:updateSnaps` to the Docker `vp test -u` flow. The `test` script (`vp test --run`) now runs jsdom unit + browser e2e projects. +- Root [package.json](package.json): drop the `e2e`/`e2e:updateSnaps` `concurrently "vp run start" + wait-on :3000 + playwright` orchestration — replace with `vp test --project e2e` (no preview server). Keep an `install-playwright` step (`playwright install --with-deps`). + +--- + +## Order of operations + +1. Add deps (`vitest-browser-react`, `playwright`); remove CT dep. +2. Add `tests/vite.config.browser.ts` + register in root `test.projects`; add `vitestSetup.browser.ts`. +3. Implement the `commands/` mouse commands + type augmentation. +4. Rewrite `tests/src/utils/*` to the browser context API. +5. Convert one representative file first (`basics/basics.test.ts`, then `draghandle/draghandle.test.ts` to exercise drag + visual snapshots) to validate the whole chain end-to-end before batch-converting. +6. Convert remaining files; replace URL constants with example imports. +7. Delete component tests + Playwright configs/setup; clean scripts. +8. Regenerate all snapshots (JSON + screenshots) in Docker; commit baselines. + +--- + +## Verification + +- `cd tests && vp test --project e2e` — runs the full e2e suite headless across chromium/firefox/webkit, with **no preview server running**. Confirms mounting + interactions + commands work. +- `vp test` from repo root — both the jsdom unit project and the browser e2e project run and pass. +- Spot-check a visual test (`theming`/`colors`/`slashmenu`) produces a `__screenshots__/...--.png` baseline and re-runs green. +- Spot-check a drag test (`draghandle`) to confirm the `dragAndDropBlock` command drives the real Playwright mouse correctly through the test iframe. +- Confirm the AI test's `window.__TEST_OPTIONS.mockID` is set by the browser setup file before render. +- Grep confirms zero remaining imports from `@playwright/test`, `@playwright/experimental-ct-react`, or `../../setup/setupScript`. + +--- + +## Implementation status (what was actually done) + +**Done & statically verified** (`tsc --noEmit` 0 errors, `vp lint src` 0 errors): + +- Browser project `tests/vite.config.browser.ts` (provider `playwright({ launchOptions: { args: ["--no-sandbox", "--disable-setuid-sandbox"] } })`, 3 instances, `optimizeDeps.exclude: ["fsevents"]`), registered in root `vite.config.ts` `test.projects`. +- `tests/vitestSetup.browser.ts` (seeds `window.__TEST_OPTIONS`). +- `tests/src/end-to-end/commands/playwrightMouse.ts` — the low-level mouse command (resolves the iframe offset via Playwright `frame()`). +- `tests/src/utils/context.ts` — **adapter for this vite-plus build**: the browser-context runtime exports `createUserEvent` (factory), `page`, `cdp`, `locators`, `utils` — _not_ the `userEvent`/`server`/`commands` its `.d.ts` advertises. So `context.ts` builds `userEvent = createUserEvent()`, derives `MOD`/`browserName` from `navigator`, and triggers commands via `window.__vitest_browser_runner__.commands.triggerCommand`. +- All other utils rewritten (`editor`, `mouse`, `copypaste`, `slashmenu`, `emojipicker`, `draghandle`, `keyboard`, `render`, `const`). +- All **24** e2e files converted to `.test.tsx` mounting example `App`s. Component tests, both Playwright configs, `src/setup/*`, and orphaned `*.test.ts-snapshots/` dirs removed. Scripts updated: `tests` → `test:e2e` / `test:e2e:updateSnaps`; root `e2e` → `vp run -r build && cd tests && vp test -c vite.config.browser.ts --run`. +- Shims: `tests/src/examples.d.ts` (`@examples/*` → React component) and `tests/src/vitest-browser.d.ts` (declares the runtime `createUserEvent`). + +**NOT validated at runtime here:** This assistant sandbox cannot complete a Vitest Browser Mode run — even a trivial test fails with _"Browser connection was closed while running tests / Was the page closed unexpectedly?"_ (the headless page dies before the runner initializes). This is environmental; browser tests run fine on the user's machine/CI. **Validate with `cd tests && pnpm test:e2e` (or `pnpm e2e` from root), then `pnpm test:e2e:updateSnaps` to generate baselines** (do snapshot generation in Docker for cross-platform/CI parity). + +**Gotchas worth knowing when validating:** + +- Test discovery only matches `**/*.test.tsx` (recursive glob). Files must live in a subdirectory (not directly under `end-to-end/`) and must not be underscore-prefixed. +- Cold dep-optimization is slow on first run (heavy `@mantine` graph); it caches afterward. Don't mistake a slow first run for a hang. +- Example apps load from **built `dist`** (no source aliases) — that's why `e2e` builds first. + +**Known limitations / TODOs left in code (search `TODO(migration)` / `NOTE:`):** + +1. `theming/theming.test.tsx` — the old `test.use({ colorScheme: "dark" })` has no per-test equivalent in this Vitest browser build; the dark-theme screenshot won't render dark until colorScheme emulation is wired up. +2. `static/static.test.tsx` — `matchPageScreenshot` doesn't expose Playwright's `mask` / `maxDiffPixels`, so the original media-masking + 200px tolerance aren't applied; may be flaky until the helper is extended. +3. `images/images.test.tsx` upload test is `test.skip` (file-path upload → `userEvent.upload` with a placeholder `File`). +4. `comments/comments.test.tsx` popup assertion reimplemented via `vi.spyOn(window, "open")`. +5. `@playwright/test` left as a devDependency (harmless; only `playwright` is required by the provider) — can be removed. diff --git a/package.json b/package.json index ccc8615521..7196536733 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,11 @@ "deploy": "echo not working:(", "gen": "vp run --filter @blocknote/dev-scripts gen", "install-playwright": "cd tests && vp exec playwright install --with-deps", - "e2e": "concurrently --success=first -r --kill-others \"vp run start\" \"wait-on http://localhost:3000 && cd tests && vp exec playwright test $PLAYWRIGHT_CONFIG\"", - "e2e:updateSnaps": "concurrently --success=first -r --kill-others \"vp run start\" \"wait-on http://localhost:3000 && cd tests && vp run test:updateSnaps\"", + "e2e:image": "docker build -t blocknote-e2e -f tests/Dockerfile .", + "e2e": "bash tests/docker-run.sh -e CI=1 -- --run", + "e2e:ui": "echo '\\n ▶ Vitest UI: http://localhost:63315/__vitest__/ (ignore the :51204 line the container logs below)\\n' && bash tests/docker-run.sh -p 127.0.0.1:63315:63315 -- --ui --watch --no-open", + "e2e:updateSnaps": "bash tests/docker-run.sh -e CI=1 -- --run -u", + "e2e:report": "serve -l 4173 tests/playwright-report", "lint": "vp lint", "postpublish": "rm -rf packages/core/README.md && rm -rf packages/react/README.md", "prebuild": "cp README.md packages/core/README.md && cp README.md packages/react/README.md", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4bae9eb2bd..c9311052a2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,7 +36,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) wait-on: specifier: 9.0.5 version: 9.0.5 @@ -132,7 +132,7 @@ importers: version: 3.1.18 '@polar-sh/better-auth': specifier: ^1.6.4 - version: 1.8.3(@polar-sh/sdk@0.42.5)(@stripe/react-stripe-js@4.0.2(@stripe/stripe-js@7.9.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(@stripe/stripe-js@7.9.0)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(better-auth@1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react-is@19.2.4)(react@19.2.5)(redux@5.0.1)(zod@4.3.6) + version: 1.8.3(@polar-sh/sdk@0.42.5)(@stripe/react-stripe-js@4.0.2(@stripe/stripe-js@7.9.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(@stripe/stripe-js@7.9.0)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(better-auth@1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(vitest@4.1.5))(react-dom@19.2.5(react@19.2.5))(react-is@19.2.4)(react@19.2.5)(redux@5.0.1)(zod@4.3.6) '@polar-sh/sdk': specifier: ^0.42.2 version: 0.42.5 @@ -210,7 +210,7 @@ importers: version: 6.0.5(zod@4.3.6) better-auth: specifier: ~1.4.15 - version: 1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + version: 1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(vitest@4.1.5) better-sqlite3: specifier: ^12.6.2 version: 12.8.0 @@ -377,7 +377,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/02-block-objects: dependencies: @@ -420,7 +420,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/03-multi-column: dependencies: @@ -466,7 +466,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/04-default-blocks: dependencies: @@ -509,7 +509,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/05-removing-default-blocks: dependencies: @@ -552,7 +552,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/06-block-manipulation: dependencies: @@ -595,7 +595,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/07-selection-blocks: dependencies: @@ -638,7 +638,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/08-ariakit: dependencies: @@ -681,7 +681,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/09-shadcn: dependencies: @@ -733,7 +733,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/10-localization: dependencies: @@ -776,7 +776,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/11-custom-placeholder: dependencies: @@ -819,7 +819,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/12-multi-editor: dependencies: @@ -862,7 +862,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/13-custom-paste-handler: dependencies: @@ -905,7 +905,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/14-editor-scrollable: dependencies: @@ -948,7 +948,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/15-shadowdom: dependencies: @@ -991,7 +991,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/16-read-only-editor: dependencies: @@ -1034,7 +1034,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/17-no-trailing-block: dependencies: @@ -1077,7 +1077,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/01-basic/testing: dependencies: @@ -1120,7 +1120,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/02-backend/01-file-uploading: dependencies: @@ -1163,7 +1163,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/02-backend/02-saving-loading: dependencies: @@ -1206,7 +1206,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/02-backend/03-s3: dependencies: @@ -1255,7 +1255,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/02-backend/04-rendering-static-documents: dependencies: @@ -1301,7 +1301,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/01-ui-elements-remove: dependencies: @@ -1344,7 +1344,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/02-formatting-toolbar-buttons: dependencies: @@ -1387,7 +1387,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/03-formatting-toolbar-block-type-items: dependencies: @@ -1433,7 +1433,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/04-side-menu-buttons: dependencies: @@ -1479,7 +1479,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/05-side-menu-drag-handle-items: dependencies: @@ -1525,7 +1525,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/06-suggestion-menus-slash-menu-items: dependencies: @@ -1571,7 +1571,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/07-suggestion-menus-slash-menu-component: dependencies: @@ -1614,7 +1614,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/08-suggestion-menus-emoji-picker-columns: dependencies: @@ -1657,7 +1657,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/09-suggestion-menus-emoji-picker-component: dependencies: @@ -1700,7 +1700,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/10-suggestion-menus-grid-mentions: dependencies: @@ -1743,7 +1743,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/11-uppy-file-panel: dependencies: @@ -1822,7 +1822,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/12-static-formatting-toolbar: dependencies: @@ -1865,7 +1865,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/13-custom-ui: dependencies: @@ -1914,7 +1914,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/14-experimental-mobile-formatting-toolbar: dependencies: @@ -1957,7 +1957,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/15-advanced-tables: dependencies: @@ -2000,7 +2000,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/16-link-toolbar-buttons: dependencies: @@ -2043,7 +2043,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/17-advanced-tables-2: dependencies: @@ -2086,7 +2086,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/18-drag-n-drop: dependencies: @@ -2129,7 +2129,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/03-ui-components/19-suggestion-menus-grouping-ordering: dependencies: @@ -2172,7 +2172,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/04-theming/01-theming-dom-attributes: dependencies: @@ -2215,7 +2215,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/04-theming/02-changing-font: dependencies: @@ -2258,7 +2258,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/04-theming/03-theming-css: dependencies: @@ -2301,7 +2301,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/04-theming/04-theming-css-variables: dependencies: @@ -2344,7 +2344,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/04-theming/05-theming-css-variables-code: dependencies: @@ -2387,7 +2387,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/04-theming/06-code-block: dependencies: @@ -2433,7 +2433,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/04-theming/07-custom-code-block: dependencies: @@ -2494,7 +2494,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/01-converting-blocks-to-html: dependencies: @@ -2537,7 +2537,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/02-converting-blocks-from-html: dependencies: @@ -2580,7 +2580,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/03-converting-blocks-to-md: dependencies: @@ -2623,7 +2623,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/04-converting-blocks-from-md: dependencies: @@ -2666,7 +2666,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/05-converting-blocks-to-pdf: dependencies: @@ -2718,7 +2718,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/06-converting-blocks-to-docx: dependencies: @@ -2767,7 +2767,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/07-converting-blocks-to-odt: dependencies: @@ -2816,7 +2816,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/08-converting-blocks-to-react-email: dependencies: @@ -2865,7 +2865,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/09-blocks-to-html-static-render: dependencies: @@ -2908,7 +2908,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/05-interoperability/10-static-html-render: dependencies: @@ -2951,7 +2951,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/01-alert-block: dependencies: @@ -2997,7 +2997,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/02-suggestion-menus-mentions: dependencies: @@ -3040,7 +3040,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/03-font-style: dependencies: @@ -3086,7 +3086,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/04-pdf-file-block: dependencies: @@ -3132,7 +3132,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/05-alert-block-full-ux: dependencies: @@ -3178,7 +3178,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/06-toggleable-blocks: dependencies: @@ -3221,7 +3221,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/07-configuring-blocks: dependencies: @@ -3264,7 +3264,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/08-non-editable-block: dependencies: @@ -3307,7 +3307,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/draggable-inline-content: dependencies: @@ -3350,7 +3350,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/react-custom-blocks: dependencies: @@ -3393,7 +3393,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/react-custom-inline-content: dependencies: @@ -3436,7 +3436,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/06-custom-schema/react-custom-styles: dependencies: @@ -3479,7 +3479,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/01-partykit: dependencies: @@ -3528,7 +3528,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/02-liveblocks: dependencies: @@ -3589,7 +3589,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/03-y-sweet: dependencies: @@ -3635,7 +3635,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/04-electric-sql: dependencies: @@ -3678,7 +3678,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/05-comments: dependencies: @@ -3724,7 +3724,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/06-comments-with-sidebar: dependencies: @@ -3773,7 +3773,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/07-ghost-writer: dependencies: @@ -3822,7 +3822,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/08-forking: dependencies: @@ -3871,7 +3871,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/07-collaboration/09-comments-testing: dependencies: @@ -3917,7 +3917,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/08-extensions/01-tiptap-arrow-conversion: dependencies: @@ -3963,7 +3963,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/09-ai/01-minimal: dependencies: @@ -4012,7 +4012,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/09-ai/02-playground: dependencies: @@ -4061,7 +4061,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/09-ai/03-custom-ai-menu-items: dependencies: @@ -4113,7 +4113,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/09-ai/04-with-collaboration: dependencies: @@ -4168,7 +4168,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/09-ai/05-manual-execution: dependencies: @@ -4223,7 +4223,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/09-ai/06-client-side-transport: dependencies: @@ -4275,7 +4275,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/09-ai/07-server-persistence: dependencies: @@ -4324,7 +4324,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/vanilla-js/react-vanilla-custom-blocks: dependencies: @@ -4367,7 +4367,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/vanilla-js/react-vanilla-custom-inline-content: dependencies: @@ -4410,7 +4410,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) examples/vanilla-js/react-vanilla-custom-styles: dependencies: @@ -4453,7 +4453,7 @@ importers: version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/ariakit: dependencies: @@ -4496,7 +4496,7 @@ importers: version: 0.10.0(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/code-block: dependencies: @@ -4530,7 +4530,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/core: dependencies: @@ -4630,7 +4630,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/dev-scripts: devDependencies: @@ -4666,7 +4666,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/mantine: dependencies: @@ -4715,7 +4715,7 @@ importers: version: 0.10.0(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/react: dependencies: @@ -4800,7 +4800,7 @@ importers: version: 0.10.0(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/server-util: dependencies: @@ -4855,7 +4855,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/shadcn: dependencies: @@ -4928,7 +4928,7 @@ importers: version: 19.2.3(@types/react@19.2.14) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) react: specifier: ^19.2.5 version: 19.2.5 @@ -4946,10 +4946,10 @@ importers: version: 5.9.3 vite-plugin-externalize-deps: specifier: ^0.10.0 - version: 0.10.0(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.10.0(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/xl-ai: dependencies: @@ -5094,7 +5094,7 @@ importers: version: 0.10.0(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/xl-ai-server: dependencies: @@ -5149,7 +5149,7 @@ importers: version: 0.10.0(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/xl-docx-exporter: dependencies: @@ -5195,7 +5195,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) xml-formatter: specifier: ^3.6.7 version: 3.7.0 @@ -5250,7 +5250,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/xl-multi-column: dependencies: @@ -5308,7 +5308,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) packages/xl-odt-exporter: dependencies: @@ -5354,7 +5354,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) xml-formatter: specifier: ^3.6.7 version: 3.7.0 @@ -5421,7 +5421,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) playground: dependencies: @@ -5599,7 +5599,7 @@ importers: version: 12.0.0-beta.1(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))(ws@8.20.0) vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) shared: dependencies: @@ -5618,7 +5618,7 @@ importers: version: 5.9.3 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) tests: dependencies: @@ -5641,12 +5641,12 @@ importers: '@blocknote/shadcn': specifier: workspace:^ version: link:../packages/shadcn - '@playwright/experimental-ct-react': - specifier: 1.51.1 - version: 1.51.1(@types/node@20.19.37)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) '@playwright/test': specifier: 1.51.1 version: 1.51.1 + '@tailwindcss/vite': + specifier: ^4.1.14 + version: 4.2.2(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) '@tiptap/pm': specifier: ^3.0.0 version: 3.22.4 @@ -5659,6 +5659,9 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.14) + '@vitest/ui': + specifier: 4.1.5 + version: 4.1.5(vitest@4.1.5) htmlfy: specifier: ^0.6.7 version: 0.6.7 @@ -5676,7 +5679,10 @@ importers: version: 5.0.10 vite-plus: specifier: 'catalog:' - version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + version: 0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + vitest-browser-react: + specifier: ^2.2.0 + version: 2.2.0(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(vitest@4.1.5) packages: @@ -5976,10 +5982,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-plugin-utils@7.28.6': - resolution: {integrity: sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} @@ -6006,18 +6008,6 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-transform-react-jsx-self@7.27.1': - resolution: {integrity: sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-react-jsx-source@7.27.1': - resolution: {integrity: sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/runtime@7.29.2': resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} engines: {node: '>=6.9.0'} @@ -6229,12 +6219,6 @@ packages: '@emotion/weak-memoize@0.4.0': resolution: {integrity: sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==} - '@esbuild/aix-ppc64@0.25.12': - resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.27.3': resolution: {integrity: sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==} engines: {node: '>=18'} @@ -6247,12 +6231,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.25.12': - resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.27.3': resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==} engines: {node: '>=18'} @@ -6265,12 +6243,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.12': - resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.27.3': resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==} engines: {node: '>=18'} @@ -6283,12 +6255,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.12': - resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.27.3': resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==} engines: {node: '>=18'} @@ -6301,12 +6267,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.25.12': - resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.27.3': resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==} engines: {node: '>=18'} @@ -6319,12 +6279,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.12': - resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.27.3': resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==} engines: {node: '>=18'} @@ -6337,12 +6291,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.12': - resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.27.3': resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==} engines: {node: '>=18'} @@ -6355,12 +6303,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.12': - resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.27.3': resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==} engines: {node: '>=18'} @@ -6373,12 +6315,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.12': - resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.27.3': resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==} engines: {node: '>=18'} @@ -6391,12 +6327,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.12': - resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.27.3': resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==} engines: {node: '>=18'} @@ -6409,12 +6339,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.25.12': - resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.27.3': resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==} engines: {node: '>=18'} @@ -6427,12 +6351,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.25.12': - resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.27.3': resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==} engines: {node: '>=18'} @@ -6445,12 +6363,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.25.12': - resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.27.3': resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==} engines: {node: '>=18'} @@ -6463,12 +6375,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.12': - resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.27.3': resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==} engines: {node: '>=18'} @@ -6481,12 +6387,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.12': - resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.27.3': resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==} engines: {node: '>=18'} @@ -6499,12 +6399,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.25.12': - resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.27.3': resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==} engines: {node: '>=18'} @@ -6517,12 +6411,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.12': - resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.27.3': resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==} engines: {node: '>=18'} @@ -6535,12 +6423,6 @@ packages: cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.12': - resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - '@esbuild/netbsd-arm64@0.27.3': resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==} engines: {node: '>=18'} @@ -6553,12 +6435,6 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.12': - resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.27.3': resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==} engines: {node: '>=18'} @@ -6571,12 +6447,6 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.12': - resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-arm64@0.27.3': resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==} engines: {node: '>=18'} @@ -6589,12 +6459,6 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.12': - resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.27.3': resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==} engines: {node: '>=18'} @@ -6607,12 +6471,6 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.12': - resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] - '@esbuild/openharmony-arm64@0.27.3': resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==} engines: {node: '>=18'} @@ -6625,12 +6483,6 @@ packages: cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.25.12': - resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.27.3': resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==} engines: {node: '>=18'} @@ -6643,12 +6495,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.25.12': - resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.27.3': resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==} engines: {node: '>=18'} @@ -6661,12 +6507,6 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.12': - resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.27.3': resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==} engines: {node: '>=18'} @@ -6679,12 +6519,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.12': - resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.27.3': resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==} engines: {node: '>=18'} @@ -7882,15 +7716,6 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@playwright/experimental-ct-core@1.51.1': - resolution: {integrity: sha512-kpRZWBT3SMukL1fx8BwEj385Pkgtp86bBKzmrmJU30lWlQiIDFNaIHosgxQC68c8y2mg3Una/lBSHNc2Fotgkw==} - engines: {node: '>=18'} - - '@playwright/experimental-ct-react@1.51.1': - resolution: {integrity: sha512-Lu14QiemO2TWfiL6TQPWBH2n+4IvPYH/W6cfblzYpLu/TZdJ7e608l3GwqAGRN5FJym3YOonC7x1Q5EAwcBarg==} - engines: {node: '>=18'} - hasBin: true - '@playwright/test@1.51.1': resolution: {integrity: sha512-nM+kEaTSAoVlXmMPH10017vn3FSiFqr/bh4fKg9vmAdMfd9SDqRZNvPSiAHADc/itWak+qPvMPZQOPwCBW7k7Q==} engines: {node: '>=18'} @@ -9026,9 +8851,6 @@ packages: cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.27': - resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} - '@rolldown/pluginutils@1.0.0-rc.15': resolution: {integrity: sha512-UromN0peaE53IaBRe9W7CjrZgXl90fqGpK+mIZbA3qSTeYqg3pqpROBdIPvOG3F5ereDHNwoHBI2e50n1BDr1g==} @@ -9892,18 +9714,6 @@ packages: '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} - '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - - '@types/babel__generator@7.27.0': - resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} - - '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - - '@types/babel__traverse@7.28.0': - resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} - '@types/better-sqlite3@7.6.13': resolution: {integrity: sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==} @@ -10257,12 +10067,6 @@ packages: ws: optional: true - '@vitejs/plugin-react@4.7.0': - resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - '@vitejs/plugin-react@6.0.1': resolution: {integrity: sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -10276,6 +10080,40 @@ packages: babel-plugin-react-compiler: optional: true + '@vitest/expect@4.1.5': + resolution: {integrity: sha512-PWBaRY5JoKuRnHlUHfpV/KohFylaDZTupcXN1H9vYryNLOnitSw60Mw9IAE2r67NbwwzBw/Cc/8q9BK3kIX8Kw==} + + '@vitest/mocker@4.1.5': + resolution: {integrity: sha512-/x2EmFC4mT4NNzqvC3fmesuV97w5FC903KPmey4gsnJiMQ3Be1IlDKVaDaG8iqaLFHqJ2FVEkxZk5VmeLjIItw==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.5': + resolution: {integrity: sha512-7I3q6l5qr03dVfMX2wCo9FxwSJbPdwKjy2uu/YPpU3wfHvIL4QHwVRp57OfGrDFeUJ8/8QdfBKIV12FTtLn00g==} + + '@vitest/runner@4.1.5': + resolution: {integrity: sha512-2D+o7Pr82IEO46YPpoA/YU0neeyr6FTerQb5Ro7BUnBuv6NQtT/kmVnczngiMEBhzgqz2UZYl5gArejsyERDSQ==} + + '@vitest/snapshot@4.1.5': + resolution: {integrity: sha512-zypXEt4KH/XgKGPUz4eC2AvErYx0My5hfL8oDb1HzGFpEk1P62bxSohdyOmvz+d9UJwanI68MKwr2EquOaOgMQ==} + + '@vitest/spy@4.1.5': + resolution: {integrity: sha512-2lNOsh6+R2Idnf1TCZqSwYlKN2E/iDlD8sgU59kYVl+OMDmvldO1VDk39smRfpUNwYpNRVn3w4YfuC7KfbBnkQ==} + + '@vitest/ui@4.1.5': + resolution: {integrity: sha512-3Z9HNFiV0IF1fk0JPiK+7kE1GcaIPefQQIBYur6PM5yFIq6agys3uqP/0t966e1wXfmjbRCHDe7qW236Xjwnag==} + peerDependencies: + vitest: 4.1.5 + + '@vitest/utils@4.1.5': + resolution: {integrity: sha512-76wdkrmfXfqGjueGgnb45ITPyUi1ycZ4IHgC2bhPDUfWHklY/q3MdLOAB+TF1e6xfl8NxNY0ZYaPCFNWSsw3Ug==} + '@voidzero-dev/vite-plus-core@0.1.21': resolution: {integrity: sha512-BEnqw8h2vxgKkzBjmmW4e1kwPwzoWc+jXJQB+7e0Dm1/1AkdTaQ9FgUMFzDfYrwTDkGzCZHSSsHDOl3RERQFTA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -10891,6 +10729,10 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + chalk-template@0.4.0: resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} engines: {node: '>=12'} @@ -11459,11 +11301,6 @@ packages: esast-util-from-js@2.0.1: resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==} - esbuild@0.25.12: - resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} - engines: {node: '>=18'} - hasBin: true - esbuild@0.27.3: resolution: {integrity: sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==} engines: {node: '>=18'} @@ -11631,6 +11468,10 @@ packages: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} + engines: {node: '>=12.0.0'} + expect@30.3.0: resolution: {integrity: sha512-1zQrciTiQfRdo7qJM1uG4navm8DayFa2TgCSRlzUyNkhcJ6XUZF3hjnpkyr3VhAqPH7i/9GkG7Tv5abz6fqz0Q==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -11683,6 +11524,9 @@ packages: picomatch: optional: true + fflate@0.8.3: + resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -13771,10 +13615,6 @@ packages: redux: optional: true - react-refresh@0.17.0: - resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} - engines: {node: '>=0.10.0'} - react-remove-scroll-bar@2.3.8: resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==} engines: {node: '>=10'} @@ -14155,6 +13995,9 @@ packages: resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -14252,6 +14095,9 @@ packages: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + stacktrace-parser@0.1.11: resolution: {integrity: sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==} engines: {node: '>=6'} @@ -14503,6 +14349,10 @@ packages: resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} engines: {node: ^20.0.0 || >=22.0.0} + tinyrainbow@3.1.0: + resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} + engines: {node: '>=14.0.0'} + tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} @@ -14795,46 +14645,6 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - vite@6.4.2: - resolution: {integrity: sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - jiti: '>=1.21.0' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - '@types/node': - optional: true - jiti: - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - tsx: - optional: true - yaml: - optional: true - vite@8.0.8: resolution: {integrity: sha512-dbU7/iLVa8KZALJyLOBOQ88nOXtNG8vxKuOT4I2mD+Ya70KPceF4IAmDsmU0h1Qsn5bPrvsY9HJstCRh3hG6Uw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -14878,9 +14688,64 @@ packages: yaml: optional: true + vitest-browser-react@2.2.0: + resolution: {integrity: sha512-oY3KM6305kwJMa6nHo92vVtkOsih7mjEf12dLKuphaF+9ywWPEc+qanIBd394SZ6m5LadVEaG6dicvvizOzmjA==} + peerDependencies: + '@types/react': ^18.0.0 || ^19.0.0 + '@types/react-dom': ^18.0.0 || ^19.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + vitest: ^4.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + vitest-tsconfig-paths@3.4.1: resolution: {integrity: sha512-CnRpA/jcqgZfnkk0yvwFW92UmIpf03wX/wLiQBNWAcOG7nv6Sdz3GsPESAMEqbVy8kHBoWB3XeNamu6PUrFZLA==} + vitest@4.1.5: + resolution: {integrity: sha512-9Xx1v3/ih3m9hN+SbfkUyy0JAs72ap3r7joc87XL6jwF0jGg6mFBvQ1SrwaX+h8BlkX6Hz9shdd1uo6AF+ZGpg==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.5 + '@vitest/browser-preview': 4.1.5 + '@vitest/browser-webdriverio': 4.1.5 + '@vitest/coverage-istanbul': 4.1.5 + '@vitest/coverage-v8': 4.1.5 + '@vitest/ui': 4.1.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + w3c-keyname@2.2.8: resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} @@ -14974,6 +14839,11 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -15769,8 +15639,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-plugin-utils@7.28.6': {} - '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.28.5': {} @@ -15790,16 +15658,6 @@ snapshots: dependencies: '@babel/types': 7.29.0 - '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.29.0)': - dependencies: - '@babel/core': 7.29.0 - '@babel/helper-plugin-utils': 7.28.6 - - '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.29.0)': - dependencies: - '@babel/core': 7.29.0 - '@babel/helper-plugin-utils': 7.28.6 - '@babel/runtime@7.29.2': {} '@babel/template@7.28.6': @@ -16044,234 +15902,156 @@ snapshots: '@emotion/weak-memoize@0.4.0': {} - '@esbuild/aix-ppc64@0.25.12': - optional: true - '@esbuild/aix-ppc64@0.27.3': optional: true '@esbuild/aix-ppc64@0.27.5': optional: true - '@esbuild/android-arm64@0.25.12': - optional: true - '@esbuild/android-arm64@0.27.3': optional: true '@esbuild/android-arm64@0.27.5': optional: true - '@esbuild/android-arm@0.25.12': - optional: true - '@esbuild/android-arm@0.27.3': optional: true '@esbuild/android-arm@0.27.5': optional: true - '@esbuild/android-x64@0.25.12': - optional: true - '@esbuild/android-x64@0.27.3': optional: true '@esbuild/android-x64@0.27.5': optional: true - '@esbuild/darwin-arm64@0.25.12': - optional: true - '@esbuild/darwin-arm64@0.27.3': optional: true '@esbuild/darwin-arm64@0.27.5': optional: true - '@esbuild/darwin-x64@0.25.12': - optional: true - '@esbuild/darwin-x64@0.27.3': optional: true '@esbuild/darwin-x64@0.27.5': optional: true - '@esbuild/freebsd-arm64@0.25.12': - optional: true - - '@esbuild/freebsd-arm64@0.27.3': + '@esbuild/freebsd-arm64@0.27.3': optional: true '@esbuild/freebsd-arm64@0.27.5': optional: true - '@esbuild/freebsd-x64@0.25.12': - optional: true - '@esbuild/freebsd-x64@0.27.3': optional: true '@esbuild/freebsd-x64@0.27.5': optional: true - '@esbuild/linux-arm64@0.25.12': - optional: true - '@esbuild/linux-arm64@0.27.3': optional: true '@esbuild/linux-arm64@0.27.5': optional: true - '@esbuild/linux-arm@0.25.12': - optional: true - '@esbuild/linux-arm@0.27.3': optional: true '@esbuild/linux-arm@0.27.5': optional: true - '@esbuild/linux-ia32@0.25.12': - optional: true - '@esbuild/linux-ia32@0.27.3': optional: true '@esbuild/linux-ia32@0.27.5': optional: true - '@esbuild/linux-loong64@0.25.12': - optional: true - '@esbuild/linux-loong64@0.27.3': optional: true '@esbuild/linux-loong64@0.27.5': optional: true - '@esbuild/linux-mips64el@0.25.12': - optional: true - '@esbuild/linux-mips64el@0.27.3': optional: true '@esbuild/linux-mips64el@0.27.5': optional: true - '@esbuild/linux-ppc64@0.25.12': - optional: true - '@esbuild/linux-ppc64@0.27.3': optional: true '@esbuild/linux-ppc64@0.27.5': optional: true - '@esbuild/linux-riscv64@0.25.12': - optional: true - '@esbuild/linux-riscv64@0.27.3': optional: true '@esbuild/linux-riscv64@0.27.5': optional: true - '@esbuild/linux-s390x@0.25.12': - optional: true - '@esbuild/linux-s390x@0.27.3': optional: true '@esbuild/linux-s390x@0.27.5': optional: true - '@esbuild/linux-x64@0.25.12': - optional: true - '@esbuild/linux-x64@0.27.3': optional: true '@esbuild/linux-x64@0.27.5': optional: true - '@esbuild/netbsd-arm64@0.25.12': - optional: true - '@esbuild/netbsd-arm64@0.27.3': optional: true '@esbuild/netbsd-arm64@0.27.5': optional: true - '@esbuild/netbsd-x64@0.25.12': - optional: true - '@esbuild/netbsd-x64@0.27.3': optional: true '@esbuild/netbsd-x64@0.27.5': optional: true - '@esbuild/openbsd-arm64@0.25.12': - optional: true - '@esbuild/openbsd-arm64@0.27.3': optional: true '@esbuild/openbsd-arm64@0.27.5': optional: true - '@esbuild/openbsd-x64@0.25.12': - optional: true - '@esbuild/openbsd-x64@0.27.3': optional: true '@esbuild/openbsd-x64@0.27.5': optional: true - '@esbuild/openharmony-arm64@0.25.12': - optional: true - '@esbuild/openharmony-arm64@0.27.3': optional: true '@esbuild/openharmony-arm64@0.27.5': optional: true - '@esbuild/sunos-x64@0.25.12': - optional: true - '@esbuild/sunos-x64@0.27.3': optional: true '@esbuild/sunos-x64@0.27.5': optional: true - '@esbuild/win32-arm64@0.25.12': - optional: true - '@esbuild/win32-arm64@0.27.3': optional: true '@esbuild/win32-arm64@0.27.5': optional: true - '@esbuild/win32-ia32@0.25.12': - optional: true - '@esbuild/win32-ia32@0.27.3': optional: true '@esbuild/win32-ia32@0.27.5': optional: true - '@esbuild/win32-x64@0.25.12': - optional: true - '@esbuild/win32-x64@0.27.3': optional: true @@ -16549,6 +16329,22 @@ snapshots: '@inquirer/ansi@1.0.2': {} + '@inquirer/confirm@5.1.21(@types/node@20.19.37)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@20.19.37) + '@inquirer/type': 3.0.10(@types/node@20.19.37) + optionalDependencies: + '@types/node': 20.19.37 + optional: true + + '@inquirer/confirm@5.1.21(@types/node@25.5.0)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@25.5.0) + '@inquirer/type': 3.0.10(@types/node@25.5.0) + optionalDependencies: + '@types/node': 25.5.0 + optional: true + '@inquirer/confirm@5.1.21(@types/node@25.6.0)': dependencies: '@inquirer/core': 10.3.2(@types/node@25.6.0) @@ -16556,6 +16352,34 @@ snapshots: optionalDependencies: '@types/node': 25.6.0 + '@inquirer/core@10.3.2(@types/node@20.19.37)': + dependencies: + '@inquirer/ansi': 1.0.2 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@20.19.37) + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.3 + optionalDependencies: + '@types/node': 20.19.37 + optional: true + + '@inquirer/core@10.3.2(@types/node@25.5.0)': + dependencies: + '@inquirer/ansi': 1.0.2 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@25.5.0) + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.3 + optionalDependencies: + '@types/node': 25.5.0 + optional: true + '@inquirer/core@10.3.2(@types/node@25.6.0)': dependencies: '@inquirer/ansi': 1.0.2 @@ -16571,6 +16395,16 @@ snapshots: '@inquirer/figures@1.0.15': {} + '@inquirer/type@3.0.10(@types/node@20.19.37)': + optionalDependencies: + '@types/node': 20.19.37 + optional: true + + '@inquirer/type@3.0.10(@types/node@25.5.0)': + optionalDependencies: + '@types/node': 25.5.0 + optional: true + '@inquirer/type@3.0.10(@types/node@25.6.0)': optionalDependencies: '@types/node': 25.6.0 @@ -17373,52 +17207,15 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@playwright/experimental-ct-core@1.51.1(@types/node@20.19.37)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)': - dependencies: - playwright: 1.51.1 - playwright-core: 1.51.1 - vite: 6.4.2(@types/node@20.19.37)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - terser - - tsx - - yaml - - '@playwright/experimental-ct-react@1.51.1(@types/node@20.19.37)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': - dependencies: - '@playwright/experimental-ct-core': 1.51.1(@types/node@20.19.37)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0) - '@vitejs/plugin-react': 4.7.0(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - vite - - yaml - '@playwright/test@1.51.1': dependencies: playwright: 1.51.1 - '@polar-sh/better-auth@1.8.3(@polar-sh/sdk@0.42.5)(@stripe/react-stripe-js@4.0.2(@stripe/stripe-js@7.9.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(@stripe/stripe-js@7.9.0)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(better-auth@1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react-is@19.2.4)(react@19.2.5)(redux@5.0.1)(zod@4.3.6)': + '@polar-sh/better-auth@1.8.3(@polar-sh/sdk@0.42.5)(@stripe/react-stripe-js@4.0.2(@stripe/stripe-js@7.9.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(@stripe/stripe-js@7.9.0)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(better-auth@1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(vitest@4.1.5))(react-dom@19.2.5(react@19.2.5))(react-is@19.2.4)(react@19.2.5)(redux@5.0.1)(zod@4.3.6)': dependencies: '@polar-sh/checkout': 0.2.0(@stripe/react-stripe-js@4.0.2(@stripe/stripe-js@7.9.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(@stripe/stripe-js@7.9.0)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react-is@19.2.4)(react@19.2.5)(redux@5.0.1) '@polar-sh/sdk': 0.42.5 - better-auth: 1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + better-auth: 1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(vitest@4.1.5) zod: 4.3.6 transitivePeerDependencies: - '@stripe/react-stripe-js' @@ -18594,8 +18391,6 @@ snapshots: '@rolldown/binding-win32-x64-msvc@1.0.0-rc.15': optional: true - '@rolldown/pluginutils@1.0.0-beta.27': {} - '@rolldown/pluginutils@1.0.0-rc.15': {} '@rolldown/pluginutils@1.0.0-rc.7': {} @@ -19429,6 +19224,13 @@ snapshots: postcss: 8.5.14 tailwindcss: 4.2.2 + '@tailwindcss/vite@4.2.2(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + dependencies: + '@tailwindcss/node': 4.2.2 + '@tailwindcss/oxide': 4.2.2 + tailwindcss: 4.2.2 + vite: 8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + '@tailwindcss/vite@4.2.2(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': dependencies: '@tailwindcss/node': 4.2.2 @@ -19582,27 +19384,6 @@ snapshots: '@types/aria-query@5.0.4': {} - '@types/babel__core@7.20.5': - dependencies: - '@babel/parser': 7.29.2 - '@babel/types': 7.29.0 - '@types/babel__generator': 7.27.0 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.28.0 - - '@types/babel__generator@7.27.0': - dependencies: - '@babel/types': 7.29.0 - - '@types/babel__template@7.4.4': - dependencies: - '@babel/parser': 7.29.2 - '@babel/types': 7.29.0 - - '@types/babel__traverse@7.28.0': - dependencies: - '@babel/types': 7.29.0 - '@types/better-sqlite3@7.6.13': dependencies: '@types/node': 25.5.0 @@ -19994,17 +19775,12 @@ snapshots: transitivePeerDependencies: - typescript - '@vitejs/plugin-react@4.7.0(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + '@vitejs/plugin-react@6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': dependencies: - '@babel/core': 7.29.0 - '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) - '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.29.0) - '@rolldown/pluginutils': 1.0.0-beta.27 - '@types/babel__core': 7.20.5 - react-refresh: 0.17.0 + '@rolldown/pluginutils': 1.0.0-rc.7 vite: 8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) - transitivePeerDependencies: - - supports-color + optionalDependencies: + babel-plugin-react-compiler: 1.0.0 '@vitejs/plugin-react@6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': dependencies: @@ -20013,6 +19789,78 @@ snapshots: optionalDependencies: babel-plugin-react-compiler: 1.0.0 + '@vitest/expect@4.1.5': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.5 + '@vitest/utils': 4.1.5 + chai: 6.2.2 + tinyrainbow: 3.1.0 + + '@vitest/mocker@4.1.5(msw@2.11.5(@types/node@20.19.37)(typescript@5.9.3))(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + dependencies: + '@vitest/spy': 4.1.5 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + msw: 2.11.5(@types/node@20.19.37)(typescript@5.9.3) + vite: 8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + + '@vitest/mocker@4.1.5(msw@2.11.5(@types/node@25.5.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.5.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + dependencies: + '@vitest/spy': 4.1.5 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + msw: 2.11.5(@types/node@25.5.0)(typescript@5.9.3) + vite: 8.0.8(@types/node@25.5.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + optional: true + + '@vitest/mocker@4.1.5(msw@2.11.5(@types/node@25.6.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + dependencies: + '@vitest/spy': 4.1.5 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + msw: 2.11.5(@types/node@25.6.0)(typescript@5.9.3) + vite: 8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + + '@vitest/pretty-format@4.1.5': + dependencies: + tinyrainbow: 3.1.0 + + '@vitest/runner@4.1.5': + dependencies: + '@vitest/utils': 4.1.5 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.5': + dependencies: + '@vitest/pretty-format': 4.1.5 + '@vitest/utils': 4.1.5 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.5': {} + + '@vitest/ui@4.1.5(vitest@4.1.5)': + dependencies: + '@vitest/utils': 4.1.5 + fflate: 0.8.3 + flatted: 3.4.2 + pathe: 2.0.3 + sirv: 3.0.2 + tinyglobby: 0.2.16 + tinyrainbow: 3.1.0 + vitest: 4.1.5(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(msw@2.11.5(@types/node@25.6.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + + '@vitest/utils@4.1.5': + dependencies: + '@vitest/pretty-format': 4.1.5 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.0 + '@voidzero-dev/vite-plus-core@0.1.21(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)': dependencies: '@oxc-project/runtime': 0.129.0 @@ -20076,7 +19924,7 @@ snapshots: '@voidzero-dev/vite-plus-linux-x64-musl@0.1.21': optional: true - '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 @@ -20095,6 +19943,7 @@ snapshots: optionalDependencies: '@opentelemetry/api': 1.9.1 '@types/node': 20.19.37 + '@vitest/ui': 4.1.5(vitest@4.1.5) jsdom: 29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0) transitivePeerDependencies: - '@arethetypeswrong/core' @@ -20118,49 +19967,7 @@ snapshots: - utf-8-validate - yaml - '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': - dependencies: - '@standard-schema/spec': 1.1.0 - '@types/chai': 5.2.3 - '@voidzero-dev/vite-plus-core': 0.1.21(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3) - es-module-lexer: 1.7.0 - obug: 2.1.1 - pixelmatch: 7.2.0 - pngjs: 7.0.0 - sirv: 3.0.2 - std-env: 4.0.0 - tinybench: 2.9.0 - tinyexec: 1.0.4 - tinyglobby: 0.2.16 - vite: 8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) - ws: 8.20.0 - optionalDependencies: - '@opentelemetry/api': 1.9.1 - '@types/node': 20.19.37 - jsdom: 29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0) - transitivePeerDependencies: - - '@arethetypeswrong/core' - - '@tsdown/css' - - '@tsdown/exe' - - '@vitejs/devtools' - - bufferutil - - esbuild - - jiti - - less - - publint - - sass - - sass-embedded - - stylus - - sugarss - - terser - - tsx - - typescript - - unplugin-unused - - unrun - - utf-8-validate - - yaml - - '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 @@ -20179,6 +19986,7 @@ snapshots: optionalDependencies: '@opentelemetry/api': 1.9.1 '@types/node': 22.13.13 + '@vitest/ui': 4.1.5(vitest@4.1.5) jsdom: 29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0) transitivePeerDependencies: - '@arethetypeswrong/core' @@ -20202,7 +20010,7 @@ snapshots: - utf-8-validate - yaml - '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 @@ -20221,6 +20029,7 @@ snapshots: optionalDependencies: '@opentelemetry/api': 1.9.1 '@types/node': 25.6.0 + '@vitest/ui': 4.1.5(vitest@4.1.5) jsdom: 25.0.1(canvas@2.11.2) transitivePeerDependencies: - '@arethetypeswrong/core' @@ -20244,7 +20053,7 @@ snapshots: - utf-8-validate - yaml - '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': + '@voidzero-dev/vite-plus-test@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0))': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 @@ -20263,6 +20072,7 @@ snapshots: optionalDependencies: '@opentelemetry/api': 1.9.1 '@types/node': 25.6.0 + '@vitest/ui': 4.1.5(vitest@4.1.5) jsdom: 29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0) transitivePeerDependencies: - '@arethetypeswrong/core' @@ -20624,7 +20434,7 @@ snapshots: baseline-browser-mapping@2.10.17: {} - better-auth@1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5): + better-auth@1.4.22(better-sqlite3@12.8.0)(next@16.2.6(@babel/core@7.29.0)(@opentelemetry/api@1.9.1)(@playwright/test@1.51.1)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(pg@8.20.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(vitest@4.1.5): dependencies: '@better-auth/core': 1.4.22(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0) '@better-auth/telemetry': 1.4.22(@better-auth/core@1.4.22(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.2.2)(kysely@0.28.15)(nanostores@1.2.0)) @@ -20644,6 +20454,7 @@ snapshots: pg: 8.20.0 react: 19.2.5 react-dom: 19.2.5(react@19.2.5) + vitest: 4.1.5(@opentelemetry/api@1.9.1)(@types/node@25.5.0)(@vitest/ui@4.1.5)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(msw@2.11.5(@types/node@25.5.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.5.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) better-call@1.1.8(zod@4.3.6): dependencies: @@ -20781,6 +20592,8 @@ snapshots: ccount@2.0.1: {} + chai@6.2.2: {} + chalk-template@0.4.0: dependencies: chalk: 4.1.2 @@ -21382,35 +21195,6 @@ snapshots: esast-util-from-estree: 2.0.0 vfile-message: 4.0.3 - esbuild@0.25.12: - optionalDependencies: - '@esbuild/aix-ppc64': 0.25.12 - '@esbuild/android-arm': 0.25.12 - '@esbuild/android-arm64': 0.25.12 - '@esbuild/android-x64': 0.25.12 - '@esbuild/darwin-arm64': 0.25.12 - '@esbuild/darwin-x64': 0.25.12 - '@esbuild/freebsd-arm64': 0.25.12 - '@esbuild/freebsd-x64': 0.25.12 - '@esbuild/linux-arm': 0.25.12 - '@esbuild/linux-arm64': 0.25.12 - '@esbuild/linux-ia32': 0.25.12 - '@esbuild/linux-loong64': 0.25.12 - '@esbuild/linux-mips64el': 0.25.12 - '@esbuild/linux-ppc64': 0.25.12 - '@esbuild/linux-riscv64': 0.25.12 - '@esbuild/linux-s390x': 0.25.12 - '@esbuild/linux-x64': 0.25.12 - '@esbuild/netbsd-arm64': 0.25.12 - '@esbuild/netbsd-x64': 0.25.12 - '@esbuild/openbsd-arm64': 0.25.12 - '@esbuild/openbsd-x64': 0.25.12 - '@esbuild/openharmony-arm64': 0.25.12 - '@esbuild/sunos-x64': 0.25.12 - '@esbuild/win32-arm64': 0.25.12 - '@esbuild/win32-ia32': 0.25.12 - '@esbuild/win32-x64': 0.25.12 - esbuild@0.27.3: optionalDependencies: '@esbuild/aix-ppc64': 0.27.3 @@ -21663,6 +21447,8 @@ snapshots: expand-template@2.0.3: {} + expect-type@1.3.0: {} + expect@30.3.0: dependencies: '@jest/expect-utils': 30.3.0 @@ -21708,6 +21494,8 @@ snapshots: optionalDependencies: picomatch: 4.0.4 + fflate@0.8.3: {} + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -23313,6 +23101,58 @@ snapshots: dependencies: msw: 2.11.5(@types/node@25.6.0)(typescript@5.9.3) + msw@2.11.5(@types/node@20.19.37)(typescript@5.9.3): + dependencies: + '@inquirer/confirm': 5.1.21(@types/node@20.19.37) + '@mswjs/interceptors': 0.39.8 + '@open-draft/deferred-promise': 2.2.0 + '@types/statuses': 2.0.6 + cookie: 1.1.1 + graphql: 16.13.2 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + rettime: 0.7.0 + statuses: 2.0.2 + strict-event-emitter: 0.5.1 + tough-cookie: 6.0.1 + type-fest: 4.41.0 + until-async: 3.0.2 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - '@types/node' + optional: true + + msw@2.11.5(@types/node@25.5.0)(typescript@5.9.3): + dependencies: + '@inquirer/confirm': 5.1.21(@types/node@25.5.0) + '@mswjs/interceptors': 0.39.8 + '@open-draft/deferred-promise': 2.2.0 + '@types/statuses': 2.0.6 + cookie: 1.1.1 + graphql: 16.13.2 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + rettime: 0.7.0 + statuses: 2.0.2 + strict-event-emitter: 0.5.1 + tough-cookie: 6.0.1 + type-fest: 4.41.0 + until-async: 3.0.2 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - '@types/node' + optional: true + msw@2.11.5(@types/node@25.6.0)(typescript@5.9.3): dependencies: '@inquirer/confirm': 5.1.21(@types/node@25.6.0) @@ -24178,8 +24018,6 @@ snapshots: '@types/react': 19.2.14 redux: 5.0.1 - react-refresh@0.17.0: {} - react-remove-scroll-bar@2.3.8(@types/react@19.2.14)(react@19.2.5): dependencies: react: 19.2.5 @@ -24751,6 +24589,8 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 + siginfo@2.0.0: {} + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -24868,6 +24708,8 @@ snapshots: dependencies: escape-string-regexp: 2.0.0 + stackback@0.0.2: {} + stacktrace-parser@0.1.11: dependencies: type-fest: 0.7.1 @@ -25114,6 +24956,8 @@ snapshots: tinypool@2.1.0: {} + tinyrainbow@3.1.0: {} + tldts-core@6.1.86: {} tldts-core@7.0.27: {} @@ -25430,6 +25274,10 @@ snapshots: - tsx - yaml + vite-plugin-externalize-deps@0.10.0(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + dependencies: + vite: 8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + vite-plugin-externalize-deps@0.10.0(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): dependencies: vite: 8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) @@ -25450,59 +25298,11 @@ snapshots: - typescript - ws - vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): - dependencies: - '@oxc-project/types': 0.129.0 - '@voidzero-dev/vite-plus-core': 0.1.21(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3) - '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) - oxfmt: 0.48.0 - oxlint: 1.63.0(oxlint-tsgolint@0.22.1) - oxlint-tsgolint: 0.22.1 - optionalDependencies: - '@voidzero-dev/vite-plus-darwin-arm64': 0.1.21 - '@voidzero-dev/vite-plus-darwin-x64': 0.1.21 - '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.1.21 - '@voidzero-dev/vite-plus-linux-arm64-musl': 0.1.21 - '@voidzero-dev/vite-plus-linux-x64-gnu': 0.1.21 - '@voidzero-dev/vite-plus-linux-x64-musl': 0.1.21 - '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.1.21 - '@voidzero-dev/vite-plus-win32-x64-msvc': 0.1.21 - transitivePeerDependencies: - - '@arethetypeswrong/core' - - '@edge-runtime/vm' - - '@opentelemetry/api' - - '@tsdown/css' - - '@tsdown/exe' - - '@types/node' - - '@vitejs/devtools' - - '@vitest/coverage-istanbul' - - '@vitest/coverage-v8' - - '@vitest/ui' - - bufferutil - - esbuild - - happy-dom - - jiti - - jsdom - - less - - publint - - sass - - sass-embedded - - stylus - - sugarss - - terser - - tsx - - typescript - - unplugin-unused - - unrun - - utf-8-validate - - vite - - yaml - - vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): dependencies: '@oxc-project/types': 0.129.0 '@voidzero-dev/vite-plus-core': 0.1.21(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3) - '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) oxfmt: 0.48.0 oxlint: 1.63.0(oxlint-tsgolint@0.22.1) oxlint-tsgolint: 0.22.1 @@ -25546,11 +25346,11 @@ snapshots: - vite - yaml - vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): dependencies: '@oxc-project/types': 0.129.0 '@voidzero-dev/vite-plus-core': 0.1.21(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3) - '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@22.13.13)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@22.13.13)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) oxfmt: 0.48.0 oxlint: 1.63.0(oxlint-tsgolint@0.22.1) oxlint-tsgolint: 0.22.1 @@ -25594,11 +25394,11 @@ snapshots: - vite - yaml - vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): dependencies: '@oxc-project/types': 0.129.0 '@voidzero-dev/vite-plus-core': 0.1.21(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3) - '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@25.0.1(canvas@2.11.2))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) oxfmt: 0.48.0 oxlint: 1.63.0(oxlint-tsgolint@0.22.1) oxlint-tsgolint: 0.22.1 @@ -25642,11 +25442,11 @@ snapshots: - vite - yaml - vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + vite-plus@0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): dependencies: '@oxc-project/types': 0.129.0 '@voidzero-dev/vite-plus-core': 0.1.21(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3) - '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + '@voidzero-dev/vite-plus-test': 0.1.21(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(esbuild@0.27.5)(jiti@2.6.1)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(terser@5.46.2)(tsx@4.21.0)(typescript@5.9.3)(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) oxfmt: 0.48.0 oxlint: 1.63.0(oxlint-tsgolint@0.22.1) oxlint-tsgolint: 0.22.1 @@ -25690,22 +25490,6 @@ snapshots: - vite - yaml - vite@6.4.2(@types/node@20.19.37)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0): - dependencies: - esbuild: 0.25.12 - fdir: 6.5.0(picomatch@4.0.4) - picomatch: 4.0.4 - postcss: 8.5.14 - rollup: 4.60.1 - tinyglobby: 0.2.16 - optionalDependencies: - '@types/node': 20.19.37 - fsevents: 2.3.3 - jiti: 2.6.1 - lightningcss: 1.32.0 - terser: 5.46.2 - tsx: 4.21.0 - vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0): dependencies: lightningcss: 1.32.0 @@ -25767,6 +25551,15 @@ snapshots: terser: 5.46.2 tsx: 4.21.0 + vitest-browser-react@2.2.0(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(vitest@4.1.5): + dependencies: + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + vitest: 4.1.5(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(@vitest/ui@4.1.5)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(msw@2.11.5(@types/node@20.19.37)(typescript@5.9.3))(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + vitest-tsconfig-paths@3.4.1: dependencies: debug: 4.4.3 @@ -25776,6 +25569,97 @@ snapshots: transitivePeerDependencies: - supports-color + vitest@4.1.5(@opentelemetry/api@1.9.1)(@types/node@20.19.37)(@vitest/ui@4.1.5)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(msw@2.11.5(@types/node@20.19.37)(typescript@5.9.3))(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + dependencies: + '@vitest/expect': 4.1.5 + '@vitest/mocker': 4.1.5(msw@2.11.5(@types/node@20.19.37)(typescript@5.9.3))(vite@8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + '@vitest/pretty-format': 4.1.5 + '@vitest/runner': 4.1.5 + '@vitest/snapshot': 4.1.5 + '@vitest/spy': 4.1.5 + '@vitest/utils': 4.1.5 + es-module-lexer: 2.1.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.4 + std-env: 4.0.0 + tinybench: 2.9.0 + tinyexec: 1.0.4 + tinyglobby: 0.2.16 + tinyrainbow: 3.1.0 + vite: 8.0.8(@types/node@20.19.37)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@opentelemetry/api': 1.9.1 + '@types/node': 20.19.37 + '@vitest/ui': 4.1.5(vitest@4.1.5) + jsdom: 29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0) + transitivePeerDependencies: + - msw + + vitest@4.1.5(@opentelemetry/api@1.9.1)(@types/node@25.5.0)(@vitest/ui@4.1.5)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(msw@2.11.5(@types/node@25.5.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.5.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + dependencies: + '@vitest/expect': 4.1.5 + '@vitest/mocker': 4.1.5(msw@2.11.5(@types/node@25.5.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.5.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + '@vitest/pretty-format': 4.1.5 + '@vitest/runner': 4.1.5 + '@vitest/snapshot': 4.1.5 + '@vitest/spy': 4.1.5 + '@vitest/utils': 4.1.5 + es-module-lexer: 2.1.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.4 + std-env: 4.0.0 + tinybench: 2.9.0 + tinyexec: 1.0.4 + tinyglobby: 0.2.16 + tinyrainbow: 3.1.0 + vite: 8.0.8(@types/node@25.5.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@opentelemetry/api': 1.9.1 + '@types/node': 25.5.0 + '@vitest/ui': 4.1.5(vitest@4.1.5) + jsdom: 29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0) + transitivePeerDependencies: + - msw + optional: true + + vitest@4.1.5(@opentelemetry/api@1.9.1)(@types/node@25.6.0)(@vitest/ui@4.1.5)(jsdom@29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0))(msw@2.11.5(@types/node@25.6.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)): + dependencies: + '@vitest/expect': 4.1.5 + '@vitest/mocker': 4.1.5(msw@2.11.5(@types/node@25.6.0)(typescript@5.9.3))(vite@8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0)) + '@vitest/pretty-format': 4.1.5 + '@vitest/runner': 4.1.5 + '@vitest/snapshot': 4.1.5 + '@vitest/spy': 4.1.5 + '@vitest/utils': 4.1.5 + es-module-lexer: 2.1.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.4 + std-env: 4.0.0 + tinybench: 2.9.0 + tinyexec: 1.0.4 + tinyglobby: 0.2.16 + tinyrainbow: 3.1.0 + vite: 8.0.8(@types/node@25.6.0)(esbuild@0.27.5)(jiti@2.6.1)(terser@5.46.2)(tsx@4.21.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@opentelemetry/api': 1.9.1 + '@types/node': 25.6.0 + '@vitest/ui': 4.1.5(vitest@4.1.5) + jsdom: 29.0.2(@noble/hashes@2.0.1)(canvas@3.1.0) + transitivePeerDependencies: + - msw + w3c-keyname@2.2.8: {} w3c-xmlserializer@5.0.0: @@ -25912,6 +25796,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + wide-align@1.1.5: dependencies: string-width: 4.2.3 diff --git a/tests/Dockerfile b/tests/Dockerfile new file mode 100644 index 0000000000..67d42d51c8 --- /dev/null +++ b/tests/Dockerfile @@ -0,0 +1,49 @@ +# syntax=docker/dockerfile:1.7-labs +# Fixed Linux environment for the Vitest Browser Mode e2e suite. Running the +# browser here (instead of natively on macOS) guarantees parity with CI for +# keyboard semantics, the WebKit engine build, and font rendering — the same +# reason the old Playwright suite ran in Docker. The Vitest UI is HTTP-served, so +# it's viewable from the host browser even though the browser itself is headless. +# +# Build context is the repo root. Host node_modules are NOT reused (they hold +# macOS-native binaries — vite-plus napi, oxc, esbuild); deps are installed fresh +# for Linux here. +# +# The image deliberately holds NO package source and does NOT build the packages +# to dist. The e2e suite resolves every @blocknote/* package to its src/ (see the +# alias block in vite.config.browser.ts) and vite transpiles it at test time, so +# the run scripts bind-mount packages/*/src live. The COPY steps below pull in +# only what the image needs — the dependency manifests and the example apps — so +# editing package source never invalidates a cached layer; only a dependency +# change (a package.json / the lockfile) forces a rebuild. +# +# Build: pnpm e2e:image (rebuild only after dependency changes) +# Run: pnpm e2e / e2e:ui / e2e:updateSnaps (bind-mount live source) +FROM mcr.microsoft.com/playwright:v1.51.1-noble + +WORKDIR /work + +# pnpm matching the repo's packageManager. +RUN corepack enable && corepack prepare pnpm@11.1.1 --activate + +# Copy ONLY the dependency manifests — every workspace member's package.json plus +# the lockfile/workspace file — preserving their paths with --parents. These are +# the entire input to `pnpm install`, so editing package *source* can't bust this +# layer (or the install below); only a manifest or the lockfile changing does. +COPY --parents pnpm-lock.yaml pnpm-workspace.yaml **/package.json ./ + +# Install workspace deps (Linux binaries) + bootstrap the vite-plus toolchain +# (the root `prepare` script runs `vp config`, which fetches vp's node runtime). +# `docs` is excluded: its fumadocs-mdx postinstall needs docs source we don't +# ship, and the e2e suite never touches docs. +RUN pnpm install --frozen-lockfile --filter '!docs' + +# Bake in the example apps: the tests import them and vite transpiles them from +# source at run time. They sit after the install layer, so editing an example +# rebuilds only this cheap COPY — never triggers a reinstall. (Package and test +# sources are bind-mounted live by the run scripts, so they aren't copied here.) +COPY examples ./examples + +WORKDIR /work/tests +# Callers append flags, e.g. `docker run --run` or `--ui --watch --no-open`. +ENTRYPOINT ["pnpm", "exec", "vp", "test", "-c", "vite.config.browser.ts"] diff --git a/tests/docker-run.sh b/tests/docker-run.sh new file mode 100755 index 0000000000..46dcb9ec9a --- /dev/null +++ b/tests/docker-run.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# Run the blocknote-e2e image with live source. +# +# The image installs deps but builds nothing (see tests/Dockerfile); the suite +# resolves every @blocknote/* package to its src/ (see vite.config.browser.ts). +# So we bind-mount each packages/*/src over the image's (source-less) tree. Only +# the src/ dirs are mounted — never a whole package dir — so the image's Linux +# node_modules (pnpm's isolated symlinks live alongside src/) stay intact. +# Editing packages/*/src is therefore picked up on the next run with no rebuild. +# Example apps are baked into the image and transpiled from source at test time. +# +# Usage: tests/docker-run.sh [docker run flags...] -- [vitest/vp args...] +# +# `set -u` is intentionally omitted: macOS bash 3.2 errors on empty-array +# expansion under it, and both the flag and entrypoint-arg arrays may be empty. +set -eo pipefail + +cd "$(git rev-parse --show-toplevel)" + +docker_flags=() +while [ "$#" -gt 0 ] && [ "$1" != "--" ]; do + docker_flags+=("$1") + shift +done +# Drop the "--" separator; the rest are entrypoint (vp test) args. +[ "$#" -gt 0 ] && shift +entrypoint_args=("$@") + +mounts=() +for src in packages/*/src; do + mounts+=(-v "$PWD/$src:/work/$src") +done +# The test files and browser config (callers iterate on these too). +mounts+=( + -v "$PWD/tests/src:/work/tests/src" + -v "$PWD/tests/vite.config.browser.ts:/work/tests/vite.config.browser.ts" + -v "$PWD/tests/vitestSetup.browser.ts:/work/tests/vitestSetup.browser.ts" +) +# Mount the report dir so the html reporter's output lands on the host instead +# of being thrown away with the container. Created on the host first so docker +# binds the dir (not an anonymous mountpoint). +mkdir -p "$PWD/tests/playwright-report" +mounts+=(-v "$PWD/tests/playwright-report:/work/tests/playwright-report") + +# --init : avoid PID-1 special treatment / zombie processes +# --ipc=host : Chromium needs this in Docker to avoid OOM crashes +# Both flags are Playwright's recommended baseline for running its image. +exec docker run --rm --init --ipc=host "${docker_flags[@]}" "${mounts[@]}" \ + blocknote-e2e "${entrypoint_args[@]}" diff --git a/tests/package.json b/tests/package.json index 61d8b83e10..616bb5069e 100644 --- a/tests/package.json +++ b/tests/package.json @@ -4,11 +4,9 @@ "version": "0.30.0", "scripts": { "lint": "vp lint src", - "playwright": "playwright test", "test": "vp test --run", - "test:updateSnaps": "docker run --rm -e RUN_IN_DOCKER=true --network host -v $(pwd)/..:/work/ -w /work/tests -it mcr.microsoft.com/playwright:v1.51.1-noble npx playwright test", - "test-ct": "playwright test -c playwright-ct.config.ts --headed", - "test-ct:updateSnaps": "docker run --rm -e RUN_IN_DOCKER=true --network host -v $(pwd)/..:/work/ -w /work/tests -it mcr.microsoft.com/playwright:v1.51.1-noble npx playwright test -c playwright-ct.config.ts -u", + "test:e2e": "vp test -c vite.config.browser.ts --run", + "test:e2e:updateSnaps": "vp test -c vite.config.browser.ts --run -u", "clean": "rimraf dist" }, "devDependencies": { @@ -17,18 +15,20 @@ "@blocknote/mantine": "workspace:^", "@blocknote/react": "workspace:^", "@blocknote/shadcn": "workspace:^", - "@playwright/experimental-ct-react": "1.51.1", "@playwright/test": "1.51.1", + "@tailwindcss/vite": "^4.1.14", "@tiptap/pm": "^3.13.0", "@types/node": "^20.19.22", "@types/react": "^19.2.3", "@types/react-dom": "^19.2.3", + "@vitest/ui": "4.1.5", "htmlfy": "^0.6.7", "react": "^19.2.5", "react-dom": "^19.2.5", "react-icons": "^5.5.0", "rimraf": "^5.0.10", - "vite-plus": "catalog:" + "vite-plus": "catalog:", + "vitest-browser-react": "^2.2.0" }, "dependencies": { "get-port-please": "3.2.0" diff --git a/tests/playwright-ct.config.ts b/tests/playwright-ct.config.ts deleted file mode 100644 index d21dc064b1..0000000000 --- a/tests/playwright-ct.config.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { defineConfig, devices } from "@playwright/experimental-ct-react"; - -/** - * See https://playwright.dev/docs/test-configuration. - */ -export default defineConfig({ - testDir: "./src/component/", - /* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */ - snapshotDir: "./src/component/snapshots", - /* Maximum time one test can run for. */ - timeout: 10 * 1000, - /* Run tests in files in parallel */ - fullyParallel: true, - /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, - /* Retry on CI only */ - retries: process.env.CI ? 2 : 0, - /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: "html", - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: "on-first-retry", - - /* Port to use for Playwright component endpoint. */ - ctPort: 3100, - }, - - /* Configure projects for major browsers */ - projects: [ - { - name: "chromium", - use: { ...devices["Desktop Chrome"] }, - }, - { - name: "firefox", - use: { ...devices["Desktop Firefox"] }, - }, - { - name: "webkit", - use: { ...devices["Desktop Safari"] }, - }, - ], -}); diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts deleted file mode 100644 index 82b0dacaaa..0000000000 --- a/tests/playwright.config.ts +++ /dev/null @@ -1,120 +0,0 @@ -/// -import type { PlaywrightTestConfig } from "@playwright/test"; -import { devices } from "@playwright/test"; - -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// require('dotenv').config(); - -/** - * See https://playwright.dev/docs/test-configuration. - */ -const config: PlaywrightTestConfig = { - testDir: "./src/end-to-end", - /* Maximum time one test can run for. */ - timeout: 30 * 1000, - expect: { - /** - * Maximum time expect() should wait for the condition to be met. - * For example in `await expect(locator).toHaveText();` - */ - timeout: 5000, - }, - /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, - retries: 2, - /* Run tests in parallel on CI (sharding handles distribution across runners) */ - workers: process.env.CI ? "50%" : undefined, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: process.env.CI - ? [ - ["dot"], - ["github"], - ["blob", { outputDir: "blob-report" }], - ["html", { open: "never" }], - ] - : [ - ["list", { printSteps: true }], - ["html", { open: "on-failure" }], - ], - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ - actionTimeout: 0, - /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: "http://localhost:3000", - - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: "on-first-retry", - /* Capture screenshot on failure for better debugging */ - screenshot: "only-on-failure", - /* Disable video recording to reduce overhead */ - video: "off", - }, - - /* Configure projects for major browsers */ - projects: [ - { - name: "chromium", - use: { - ...devices["Desktop Chrome"], - }, - }, - - { - name: "firefox", - use: { - ...devices["Desktop Firefox"], - }, - }, - - { - name: "webkit", - use: { - ...devices["Desktop Safari"], - }, - }, - - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { - // ...devices['Pixel 5'], - // }, - // }, - // { - // name: 'Mobile Safari', - // use: { - // ...devices['iPhone 12'], - // }, - // }, - - /* Test against branded browsers. */ - // { - // name: 'Microsoft Edge', - // use: { - // channel: 'msedge', - // }, - // }, - // { - // name: 'Google Chrome', - // use: { - // channel: 'chrome', - // }, - // }, - ], - - /* Folder for test artifacts such as screenshots, videos, traces, etc. */ - // outputDir: 'test-results/', - - /* Run your local dev server before starting the tests */ - // webServer: { - // command: "cd ../ && pnpm run start -L", - // port: 3000, - // reuseExistingServer: !process.env.CI, - // }, -}; - -export default config; diff --git a/tests/src/component/copypaste-external.spec.tsx b/tests/src/component/copypaste-external.spec.tsx deleted file mode 100644 index 200dbdbe77..0000000000 --- a/tests/src/component/copypaste-external.spec.tsx +++ /dev/null @@ -1,154 +0,0 @@ -import { expect, test } from "../setup/setupScriptComponent.js"; -import EditorWithTextArea from "../utils/components/EditorWithTextArea.js"; -import { - copyPasteAllExternal, - removeClassesFromHTML, - removeMetaFromHTML, -} from "../utils/copypaste.js"; -import { focusOnEditor } from "../utils/editor.js"; -import { executeSlashCommand } from "../utils/slashmenu.js"; - -test.describe.configure({ mode: "serial" }); - -// eslint-disable-next-line no-empty-pattern -test.beforeEach(async ({}, testInfo) => { - testInfo.snapshotSuffix = ""; -}); - -// TODO: These tests should not be used for now. While they do pass, the -// snapshots don't contain the output we actually want as the custom -// serializer hasn't been implemented yet. -test("Alert Copy/Paste External", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "alert"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Alert"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - const button = await page.locator( - `[data-content-type="alert"] > div > div:first-child`, - ); - await button.first().click(); - - const value = await copyPasteAllExternal(page, "mac"); - await expect( - removeClassesFromHTML(removeMetaFromHTML(value)), - ).toMatchSnapshot("alert-external.html"); -}); - -test("Button Copy/Paste External", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "button"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - const value = await copyPasteAllExternal(page, "mac"); - await expect( - removeClassesFromHTML(removeMetaFromHTML(value)), - ).toMatchSnapshot("button-external.html"); -}); - -test("Embed Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "embed"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - const value = await copyPasteAllExternal(page, "mac"); - await expect( - removeClassesFromHTML(removeMetaFromHTML(value)), - ).toMatchSnapshot("embed-external.html"); -}); - -test("Image Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "image"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Caption"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - const value = await copyPasteAllExternal(page, "mac"); - await expect( - removeClassesFromHTML(removeMetaFromHTML(value)), - ).toMatchSnapshot("image-external.html"); -}); - -test("Separator Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "separator"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - const value = await copyPasteAllExternal(page, "mac"); - await expect( - removeClassesFromHTML(removeMetaFromHTML(value)), - ).toMatchSnapshot("separator-external.html"); -}); - -test("Table of Contents Copy/Paste Internal", async ({ - browserName, - mount, - page, -}) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Heading 1"); - await executeSlashCommand(page, "toc"); - await page.keyboard.press("ArrowDown"); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("Heading 2"); - - const value = await copyPasteAllExternal(page, "mac"); - await expect( - removeClassesFromHTML(removeMetaFromHTML(value)), - ).toMatchSnapshot("toc-external.html"); -}); diff --git a/tests/src/component/copypaste-internal.spec.tsx b/tests/src/component/copypaste-internal.spec.tsx deleted file mode 100644 index 90c5eff9b4..0000000000 --- a/tests/src/component/copypaste-internal.spec.tsx +++ /dev/null @@ -1,160 +0,0 @@ -import { expect, test } from "../setup/setupScriptComponent.js"; -import Editor from "../utils/components/Editor.js"; -import { copyPasteAll } from "../utils/copypaste.js"; -import { compareDocToSnapshot, focusOnEditor } from "../utils/editor.js"; -import { executeSlashCommand } from "../utils/slashmenu.js"; - -test.describe.configure({ mode: "serial" }); - -// eslint-disable-next-line no-empty-pattern -test.beforeEach(async ({}, testInfo) => { - testInfo.snapshotSuffix = ""; -}); - -test("Alert Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "alert"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Alert"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - const button = await page.locator( - `[data-content-type="alert"] > div > div:first-child`, - ); - await button.first().click(); - - await copyPasteAll(page); - await page.waitForTimeout(50); - - await compareDocToSnapshot(page, "alert-internal"); -}); - -test("Button Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "button"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - await copyPasteAll(page); - await page.waitForTimeout(50); - - const button = await page.locator("button"); - await button.first().click(); - await button.last().click(); - - await compareDocToSnapshot(page, "button-internal"); -}); - -test("Embed Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "embed"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - await copyPasteAll(page); - await page.waitForTimeout(50); - - await compareDocToSnapshot(page, "embed-internal"); -}); - -test("Image Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "image"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Caption"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - await copyPasteAll(page); - await page.waitForTimeout(50); - - await compareDocToSnapshot(page, "image-internal"); -}); - -test("Separator Copy/Paste Internal", async ({ browserName, mount, page }) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await page.keyboard.type("Paragraph 1"); - await executeSlashCommand(page, "separator"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.type("Paragraph 2"); - - await copyPasteAll(page); - await page.waitForTimeout(50); - - await compareDocToSnapshot(page, "separator-internal"); -}); - -test("Table of Contents Copy/Paste Internal", async ({ - browserName, - mount, - page, -}) => { - test.skip( - browserName === "firefox", - "Firefox doesn't yet support the async clipboard API.", - ); - - await mount(); - - await focusOnEditor(page); - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Heading 1"); - await executeSlashCommand(page, "toc"); - await page.keyboard.press("ArrowDown"); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("Heading 2"); - - await copyPasteAll(page); - await page.waitForTimeout(50); - - const expectedToC = - "
  • Heading 1

  • Heading 2

  • Heading 1

  • Heading 2

  • "; - await expect(await page.locator("ol").first().innerHTML()).toEqual( - expectedToC, - ); - await expect(await page.locator("ol").first().innerHTML()).toEqual( - await page.locator("ol").last().innerHTML(), - ); - - await compareDocToSnapshot(page, "toc-internal"); -}); diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-chromium.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-chromium.html deleted file mode 100644 index 1051dff8fe..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-chromium.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Alert

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-firefox.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-firefox.html deleted file mode 100644 index 1051dff8fe..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-firefox.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Alert

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-webkit.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-webkit.html deleted file mode 100644 index 1051dff8fe..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/alert-external-webkit.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Alert

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-chromium.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-chromium.html deleted file mode 100644 index 365732b783..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-chromium.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-firefox.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-firefox.html deleted file mode 100644 index 365732b783..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-firefox.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-webkit.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-webkit.html deleted file mode 100644 index 365732b783..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/button-external-webkit.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-chromium.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-chromium.html deleted file mode 100644 index e10175903b..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-chromium.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-firefox.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-firefox.html deleted file mode 100644 index e10175903b..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-firefox.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-webkit.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-webkit.html deleted file mode 100644 index e10175903b..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/embed-external-webkit.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-chromium.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-chromium.html deleted file mode 100644 index add115848a..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-chromium.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Caption

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-firefox.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-firefox.html deleted file mode 100644 index add115848a..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-firefox.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Caption

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-webkit.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-webkit.html deleted file mode 100644 index add115848a..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/image-external-webkit.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Caption

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-chromium.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-chromium.html deleted file mode 100644 index 644b8f5f92..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-chromium.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-firefox.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-firefox.html deleted file mode 100644 index 644b8f5f92..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-firefox.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-webkit.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-webkit.html deleted file mode 100644 index 644b8f5f92..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/separator-external-webkit.html +++ /dev/null @@ -1 +0,0 @@ -

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-chromium.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-chromium.html deleted file mode 100644 index 52e158dd0f..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-chromium.html +++ /dev/null @@ -1 +0,0 @@ -

    Heading 1

    Heading 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-firefox.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-firefox.html deleted file mode 100644 index 52e158dd0f..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-firefox.html +++ /dev/null @@ -1 +0,0 @@ -

    Heading 1

    Heading 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-webkit.html b/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-webkit.html deleted file mode 100644 index 52e158dd0f..0000000000 --- a/tests/src/component/snapshots/copypaste-external.spec.tsx-snapshots/toc-external-webkit.html +++ /dev/null @@ -1 +0,0 @@ -

    Heading 1

    Heading 2

    \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-chromium.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-chromium.json deleted file mode 100644 index ec4caf0535..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-chromium.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "black", - "type": "error" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "black", - "type": "error" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-firefox.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-firefox.json deleted file mode 100644 index ec4caf0535..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-firefox.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "black", - "type": "error" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "black", - "type": "error" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-webkit.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-webkit.json deleted file mode 100644 index ec4caf0535..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/alert-internal-webkit.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "black", - "type": "error" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "black", - "type": "error" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-chromium.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-chromium.json deleted file mode 100644 index 4df38a66b0..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-chromium.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "button", - "attrs": { - "backgroundColor": "transparent" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Hello World" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "button", - "attrs": { - "backgroundColor": "transparent" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Hello World" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-firefox.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-firefox.json deleted file mode 100644 index 4df38a66b0..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-firefox.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "button", - "attrs": { - "backgroundColor": "transparent" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Hello World" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "button", - "attrs": { - "backgroundColor": "transparent" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Hello World" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-webkit.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-webkit.json deleted file mode 100644 index 4df38a66b0..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/button-internal-webkit.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "button", - "attrs": { - "backgroundColor": "transparent" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Hello World" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "button", - "attrs": { - "backgroundColor": "transparent" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Hello World" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-chromium.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-chromium.json deleted file mode 100644 index 1254937ad4..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-chromium.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "embed", - "attrs": { - "src": "https://www.youtube.com/embed/wjfuB8Xjhc4" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "embed", - "attrs": { - "src": "https://www.youtube.com/embed/wjfuB8Xjhc4" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-firefox.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-firefox.json deleted file mode 100644 index 1254937ad4..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-firefox.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "embed", - "attrs": { - "src": "https://www.youtube.com/embed/wjfuB8Xjhc4" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "embed", - "attrs": { - "src": "https://www.youtube.com/embed/wjfuB8Xjhc4" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-webkit.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-webkit.json deleted file mode 100644 index 1254937ad4..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/embed-internal-webkit.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "embed", - "attrs": { - "src": "https://www.youtube.com/embed/wjfuB8Xjhc4" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "embed", - "attrs": { - "src": "https://www.youtube.com/embed/wjfuB8Xjhc4" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-chromium.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-chromium.json deleted file mode 100644 index e40c6b535b..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-chromium.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "image", - "attrs": { - "src": "https://via.placeholder.com/150" - }, - "content": [ - { - "type": "text", - "text": "Caption" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "image", - "attrs": { - "src": "https://via.placeholder.com/150" - }, - "content": [ - { - "type": "text", - "text": "Caption" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-firefox.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-firefox.json deleted file mode 100644 index e40c6b535b..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-firefox.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "image", - "attrs": { - "src": "https://via.placeholder.com/150" - }, - "content": [ - { - "type": "text", - "text": "Caption" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "image", - "attrs": { - "src": "https://via.placeholder.com/150" - }, - "content": [ - { - "type": "text", - "text": "Caption" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-webkit.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-webkit.json deleted file mode 100644 index e40c6b535b..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/image-internal-webkit.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "image", - "attrs": { - "src": "https://via.placeholder.com/150" - }, - "content": [ - { - "type": "text", - "text": "Caption" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "image", - "attrs": { - "src": "https://via.placeholder.com/150" - }, - "content": [ - { - "type": "text", - "text": "Caption" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-chromium.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-chromium.json deleted file mode 100644 index 4dae2e010a..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-chromium.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "separator" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "separator" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-firefox.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-firefox.json deleted file mode 100644 index 4dae2e010a..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-firefox.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "separator" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "separator" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-webkit.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-webkit.json deleted file mode 100644 index 4dae2e010a..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/separator-internal-webkit.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "separator" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "separator" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-chromium.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-chromium.json deleted file mode 100644 index b9baad31bb..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-chromium.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "1" - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "toc" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "2" - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "1" - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "toc" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "2" - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-firefox.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-firefox.json deleted file mode 100644 index b9baad31bb..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-firefox.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "1" - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "toc" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "2" - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "1" - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "toc" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "2" - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-webkit.json b/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-webkit.json deleted file mode 100644 index b9baad31bb..0000000000 --- a/tests/src/component/snapshots/copypaste-internal.spec.tsx-snapshots/toc-internal-webkit.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "1" - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "toc" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "2" - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "1" - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "toc" - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "heading", - "attrs": { - "textAlignment": "left", - "level": "2" - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8", - "textColor": "default", - "backgroundColor": "default" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-chromium-linux.png b/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-chromium-linux.png new file mode 100644 index 0000000000..c5c7d6b558 Binary files /dev/null and b/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-chromium-linux.png differ diff --git a/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-firefox-linux.png b/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-firefox-linux.png new file mode 100644 index 0000000000..0378b47e90 Binary files /dev/null and b/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-firefox-linux.png differ diff --git a/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-webkit-linux.png b/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-webkit-linux.png new file mode 100644 index 0000000000..736eb91e07 Binary files /dev/null and b/tests/src/end-to-end/ai/__screenshots__/ai.test.tsx/ai_menu_scroll_position-webkit-linux.png differ diff --git a/tests/src/end-to-end/ai/ai-selection.test.ts b/tests/src/end-to-end/ai/ai-selection.test.ts deleted file mode 100644 index 08f93bcbdc..0000000000 --- a/tests/src/end-to-end/ai/ai-selection.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { AI_URL } from "../../utils/const.js"; -import { focusOnEditor } from "../../utils/editor.js"; - -const AI_BUTTON_SELECTOR = `[data-test="editwithAI"]`; - -test.beforeEach(async ({ page }) => { - await page.goto(AI_URL); -}); - -test.describe("AI toolbar button should preserve selection (issue #2525)", () => { - test("Editor selection must be preserved after clicking the AI toolbar button", async ({ - page, - }) => { - await focusOnEditor(page); - - // Select text in the first paragraph - await page.keyboard.press("Home"); - await page.keyboard.press("Shift+End"); - await page.waitForTimeout(500); - - // Record the PM selection before clicking - const selBefore = await page.evaluate(() => { - const pm = (window as any).ProseMirror; - return { from: pm.state.selection.from, to: pm.state.selection.to }; - }); - expect(selBefore.to - selBefore.from).toBeGreaterThan(0); - - // Click the AI button using page.mouse to trigger real browser - // focus-shift behavior (Playwright's locator.click() bypasses it) - const aiButton = page.locator(AI_BUTTON_SELECTOR); - await expect(aiButton).toBeVisible(); - const box = (await aiButton.boundingBox())!; - await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2); - - // Wait for AI menu to appear - await page - .locator(".bn-combobox-input input, .bn-combobox input") - .waitFor({ state: "visible", timeout: 3000 }); - - // The PM selection must match what we had before clicking. - // Without skipping refs.setReference for in-editor references while - // FloatingFocusManager is active, floating-ui inserts a focus-return - // element into the PM contenteditable, triggering its MutationObserver - // and resetting the selection. - const selAfter = await page.evaluate(() => { - const pm = (window as any).ProseMirror; - return { from: pm.state.selection.from, to: pm.state.selection.to }; - }); - expect(selAfter.from).toBe(selBefore.from); - expect(selAfter.to).toBe(selBefore.to); - }); -}); diff --git a/tests/src/end-to-end/ai/ai-selection.test.tsx b/tests/src/end-to-end/ai/ai-selection.test.tsx new file mode 100644 index 0000000000..908c639e61 --- /dev/null +++ b/tests/src/end-to-end/ai/ai-selection.test.tsx @@ -0,0 +1,54 @@ +import App from "@examples/09-ai/01-minimal/src/App"; +import { beforeEach, describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { focusOnEditor, sleep, waitForSelector } from "../../utils/editor.js"; +import { clickAt, getRect } from "../../utils/mouse.js"; + +const AI_BUTTON_SELECTOR = `[data-test="editwithAI"]`; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("AI toolbar button should preserve selection (issue #2525)", () => { + test("Editor selection must be preserved after clicking the AI toolbar button", async () => { + await focusOnEditor(); + + // Select text in the first paragraph + await userEvent.keyboard("{Home}"); + await userEvent.keyboard("{Shift>}{End}{/Shift}"); + await sleep(500); + + // Record the PM selection before clicking + const pm = (window as any).ProseMirror; + const selBefore = { + from: pm.state.selection.from, + to: pm.state.selection.to, + }; + expect(selBefore.to - selBefore.from).toBeGreaterThan(0); + + // Click the AI button using the real browser mouse to trigger real + // focus-shift behavior (a synthetic locator click bypasses it) + const aiButton = await waitForSelector(AI_BUTTON_SELECTOR); + const box = getRect(aiButton); + await clickAt(box.x + box.width / 2, box.y + box.height / 2); + + // Wait for AI menu to appear + await waitForSelector(".bn-combobox-input input, .bn-combobox input"); + + // The PM selection must match what we had before clicking. + // Without skipping refs.setReference for in-editor references while + // FloatingFocusManager is active, floating-ui inserts a focus-return + // element into the PM contenteditable, triggering its MutationObserver + // and resetting the selection. + const selAfter = { + from: pm.state.selection.from, + to: pm.state.selection.to, + }; + expect(selAfter.from).toBe(selBefore.from); + expect(selAfter.to).toBe(selBefore.to); + }); +}); diff --git a/tests/src/end-to-end/ai/ai.test.ts b/tests/src/end-to-end/ai/ai.test.ts deleted file mode 100644 index 5a9ec24217..0000000000 --- a/tests/src/end-to-end/ai/ai.test.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { AI_URL, EDITOR_SELECTOR } from "../../utils/const.js"; - -// Use a small viewport so the editor content requires scrolling. -test.use({ viewport: { width: 800, height: 400 } }); - -test.beforeEach(async ({ page }) => { - await page.goto(AI_URL); -}); - -test.describe("AI Menu Scroll Regression", () => { - test("opening the AI menu should not scroll the page to the top", async ({ - page, - }) => { - // Wait for the editor to be ready - await page.waitForSelector(EDITOR_SELECTOR); - - // Click on the last paragraph so the cursor is near the bottom of the content - const lastParagraph = page - .locator("[data-content-type='paragraph']") - .last(); - await lastParagraph.click(); - - // Ensure the page is scrolled down (editor puts cursor near bottom of content) - // We scroll down explicitly to make sure we're not at the top - await page.evaluate(() => { - window.scrollTo(0, document.body.scrollHeight); - }); - await page.waitForTimeout(200); - - // Record the scroll position before opening the AI menu - const scrollYBefore = await page.evaluate(() => window.scrollY); - - // Sanity check: we should actually be scrolled down - expect(scrollYBefore).toBeGreaterThan(0); - - // Open the AI menu via the slash command - // First, focus back on the editor at the last paragraph - await lastParagraph.click(); - await page.waitForTimeout(100); - - // Type /ai to open the slash menu and select the AI option - await page.keyboard.type("/ai", { delay: 50 }); - await page.waitForTimeout(300); - - // Wait for the suggestion menu to appear - const suggestionMenu = page.locator(".bn-suggestion-menu"); - await suggestionMenu.waitFor({ state: "visible", timeout: 3000 }); - - // Click the AI suggestion menu item to open the AI menu - const aiMenuItem = suggestionMenu - .locator(".bn-suggestion-menu-item") - .first(); - await aiMenuItem.click(); - - // Wait for the AI menu (combobox input) to appear - const aiMenuInput = page.locator( - ".bn-combobox-input input, .bn-combobox input", - ); - await aiMenuInput.waitFor({ state: "visible", timeout: 3000 }); - - // Brief wait for any scroll side effects to take place - await page.waitForTimeout(300); - - // Screenshot after opening AI menu - expect(await page.screenshot()).toMatchSnapshot( - "ai_menu_scroll_position.png", - ); - - // Check that the scroll position has not jumped to the top - const scrollYAfter = await page.evaluate(() => window.scrollY); - expect(scrollYAfter).toBeGreaterThan(0); - expect(scrollYAfter).toBeGreaterThanOrEqual(scrollYBefore * 0.2); - - // Verify the AI menu input is actually focused - await expect(aiMenuInput).toBeFocused(); - }); -}); diff --git a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-chromium-darwin.png b/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-chromium-darwin.png deleted file mode 100644 index 7deffef50c..0000000000 Binary files a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-chromium-darwin.png and /dev/null differ diff --git a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-chromium-linux.png b/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-chromium-linux.png deleted file mode 100644 index b1da69e580..0000000000 Binary files a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-firefox-linux.png b/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-firefox-linux.png deleted file mode 100644 index 61f6813e86..0000000000 Binary files a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-webkit-linux.png b/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-webkit-linux.png deleted file mode 100644 index dfd2aab50c..0000000000 Binary files a/tests/src/end-to-end/ai/ai.test.ts-snapshots/ai-menu-scroll-position-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ai/ai.test.tsx b/tests/src/end-to-end/ai/ai.test.tsx new file mode 100644 index 0000000000..12a81980ae --- /dev/null +++ b/tests/src/end-to-end/ai/ai.test.tsx @@ -0,0 +1,74 @@ +import App from "@examples/09-ai/01-minimal/src/App"; +import { beforeEach, describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { page, userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { expectElement, sleep, waitForSelector } from "../../utils/editor.js"; + +beforeEach(async () => { + // Use a small viewport so the editor content requires scrolling. + await page.viewport(800, 400); + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("AI Menu Scroll Regression", () => { + test("opening the AI menu should not scroll the page to the top", async () => { + // Click on the last paragraph so the cursor is near the bottom of the content + const paragraphs = document.querySelectorAll( + "[data-content-type='paragraph']", + ); + const lastParagraph = paragraphs[paragraphs.length - 1] as HTMLElement; + await userEvent.click(lastParagraph); + + // Ensure the page is scrolled down (editor puts cursor near bottom of content) + // We scroll down explicitly to make sure we're not at the top + window.scrollTo(0, document.body.scrollHeight); + await sleep(200); + + // Record the scroll position before opening the AI menu + const scrollYBefore = window.scrollY; + + // Sanity check: we should actually be scrolled down + expect(scrollYBefore).toBeGreaterThan(0); + + // Open the AI menu via the slash command + // First, focus back on the editor at the last paragraph + await userEvent.click(lastParagraph); + await sleep(100); + + // Type /ai to open the slash menu and select the AI option + await userEvent.keyboard("/ai"); + await sleep(300); + + // Wait for the suggestion menu to appear + await waitForSelector(".bn-suggestion-menu"); + + // Click the AI suggestion menu item to open the AI menu + const aiMenuItem = await waitForSelector( + ".bn-suggestion-menu .bn-suggestion-menu-item", + ); + await userEvent.click(aiMenuItem); + + // Wait for the AI menu (combobox input) to appear + const aiMenuInput = await waitForSelector( + ".bn-combobox-input input, .bn-combobox input", + ); + + // Brief wait for any scroll side effects to take place + await sleep(300); + + // Screenshot after opening AI menu + await expectElement(document.body).toMatchScreenshot( + "ai_menu_scroll_position", + ); + + // Check that the scroll position has not jumped to the top + const scrollYAfter = window.scrollY; + expect(scrollYAfter).toBeGreaterThan(0); + expect(scrollYAfter).toBeGreaterThanOrEqual(scrollYBefore * 0.2); + + // Verify the AI menu input is actually focused + expect(document.activeElement).toBe(aiMenuInput); + }); +}); diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-chromium-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-chromium-linux.png new file mode 100644 index 0000000000..0fce2a086a Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-firefox-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-firefox-linux.png new file mode 100644 index 0000000000..d82a60c1f8 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-webkit-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-webkit-linux.png new file mode 100644 index 0000000000..27b45bcfee Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-drag-handle-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-chromium-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-chromium-linux.png new file mode 100644 index 0000000000..92d64f4cdb Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-firefox-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-firefox-linux.png new file mode 100644 index 0000000000..64f9470737 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-webkit-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-webkit-linux.png new file mode 100644 index 0000000000..e764f433ec Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-emoji-picker-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-chromium-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-chromium-linux.png new file mode 100644 index 0000000000..51b2b59ee1 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-firefox-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-firefox-linux.png new file mode 100644 index 0000000000..2ce48f1508 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-webkit-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-webkit-linux.png new file mode 100644 index 0000000000..43f2a8abc2 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-formatting-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-chromium-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-chromium-linux.png new file mode 100644 index 0000000000..254c9e157c Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-firefox-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-firefox-linux.png new file mode 100644 index 0000000000..bd00eddd6d Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-webkit-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-webkit-linux.png new file mode 100644 index 0000000000..e8b18330f9 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-image-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-chromium-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-chromium-linux.png new file mode 100644 index 0000000000..78aa0ce0a5 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-firefox-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-firefox-linux.png new file mode 100644 index 0000000000..51592b8003 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-webkit-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-webkit-linux.png new file mode 100644 index 0000000000..59cb8d0c1c Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-link-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-chromium-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-chromium-linux.png new file mode 100644 index 0000000000..c32761127b Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-firefox-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-firefox-linux.png new file mode 100644 index 0000000000..b41f54dc33 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-webkit-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-webkit-linux.png new file mode 100644 index 0000000000..c3864cbed3 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-side-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-chromium-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-chromium-linux.png new file mode 100644 index 0000000000..b0aae2197b Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-firefox-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-firefox-linux.png new file mode 100644 index 0000000000..d7eb0d5f6e Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-webkit-linux.png b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-webkit-linux.png new file mode 100644 index 0000000000..33ff0c4a28 Binary files /dev/null and b/tests/src/end-to-end/ariakit/__screenshots__/ariakit.test.tsx/ariakit-slash-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts b/tests/src/end-to-end/ariakit/ariakit.test.ts deleted file mode 100644 index dd5fa0eccf..0000000000 --- a/tests/src/end-to-end/ariakit/ariakit.test.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - ARIAKIT_URL, - DRAG_HANDLE_SELECTOR, - LINK_BUTTON_SELECTOR, - PARAGRAPH_SELECTOR, -} from "../../utils/const.js"; -import { focusOnEditor } from "../../utils/editor.js"; -import { moveMouseOverElement } from "../../utils/mouse.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(ARIAKIT_URL); -}); - -test.describe("Check Ariakit UI", () => { - test("Check formatting toolbar", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("Shift+Home"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot( - "ariakit-formatting-toolbar.png", - ); - }); - test("Check link toolbar", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("Shift+Home"); - - await page.waitForSelector(LINK_BUTTON_SELECTOR); - await page.click(LINK_BUTTON_SELECTOR); - - await page.keyboard.type("link"); - await page.keyboard.press("Enter"); - await page.waitForTimeout(500); - await page.keyboard.press("ArrowLeft"); - await page.keyboard.press("ArrowRight"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("ariakit-link-toolbar.png"); - }); - test("Check slash menu", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.press("/"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("ariakit-slash-menu.png"); - }); - test("Check emoji picker", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.press(":"); - await page.keyboard.type("sm"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("ariakit-emoji-picker.png"); - }); - test("Check side menu", async ({ page }) => { - await focusOnEditor(page); - await page.waitForSelector(PARAGRAPH_SELECTOR); - await moveMouseOverElement(page, page.locator(PARAGRAPH_SELECTOR)); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("ariakit-side-menu.png"); - }); - test("Check drag handle menu", async ({ page }) => { - await focusOnEditor(page); - await page.waitForSelector(PARAGRAPH_SELECTOR); - await moveMouseOverElement(page, page.locator(PARAGRAPH_SELECTOR)); - - await page.waitForTimeout(500); - await page.waitForSelector(DRAG_HANDLE_SELECTOR); - await moveMouseOverElement(page, page.locator(DRAG_HANDLE_SELECTOR)); - await page.mouse.down(); - await page.mouse.up(); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot( - "ariakit-drag-handle-menu.png", - ); - }); - test("Check image toolbar", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot( - "ariakit-image-toolbar.png", - ); - }); -}); diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-chromium-linux.png deleted file mode 100644 index 7e706a89c5..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-firefox-linux.png deleted file mode 100644 index c124faa614..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-webkit-linux.png deleted file mode 100644 index 7942b011d9..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-drag-handle-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-chromium-linux.png deleted file mode 100644 index ca272ee051..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-firefox-linux.png deleted file mode 100644 index 0b0ec27da9..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-webkit-linux.png deleted file mode 100644 index 3e48eae5e2..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-emoji-picker-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-chromium-linux.png deleted file mode 100644 index a149f45e73..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-firefox-linux.png deleted file mode 100644 index e91c544e21..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-webkit-linux.png deleted file mode 100644 index b29e23a350..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-formatting-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-chromium-linux.png deleted file mode 100644 index 70faff1e79..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-firefox-linux.png deleted file mode 100644 index 98f2191e10..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-webkit-linux.png deleted file mode 100644 index 91b64b8415..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-chromium-linux.png deleted file mode 100644 index 6846345b2b..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-firefox-linux.png deleted file mode 100644 index c012e8bb04..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-webkit-linux.png deleted file mode 100644 index f1137ad69f..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-link-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-chromium-linux.png deleted file mode 100644 index c4010b522e..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-firefox-linux.png deleted file mode 100644 index 64b9b8e9b2..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-webkit-linux.png deleted file mode 100644 index c98215d1d0..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-side-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-chromium-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-chromium-linux.png deleted file mode 100644 index 9dee39cb3b..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-firefox-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-firefox-linux.png deleted file mode 100644 index 9c7689e33a..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-webkit-linux.png b/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-webkit-linux.png deleted file mode 100644 index 35c7f334b2..0000000000 Binary files a/tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-slash-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/ariakit/ariakit.test.tsx b/tests/src/end-to-end/ariakit/ariakit.test.tsx new file mode 100644 index 0000000000..9400d1472a --- /dev/null +++ b/tests/src/end-to-end/ariakit/ariakit.test.tsx @@ -0,0 +1,103 @@ +import App from "@examples/01-basic/08-ariakit/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { + DRAG_HANDLE_SELECTOR, + EDITOR_SELECTOR, + LINK_BUTTON_SELECTOR, + PARAGRAPH_SELECTOR, +} from "../../utils/const.js"; +import { + focusOnEditor, + expectElement, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { mouseSequence, moveMouseOverElement } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Ariakit UI", () => { + test("Check formatting toolbar", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard("{Shift>}{Home}{/Shift}"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "ariakit-formatting-toolbar", + ); + }); + test("Check link toolbar", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard("{Shift>}{Home}{/Shift}"); + + await userEvent.click(await waitForSelector(LINK_BUTTON_SELECTOR)); + + await userEvent.keyboard("link"); + await userEvent.keyboard("{Enter}"); + await sleep(500); + await userEvent.keyboard("{ArrowLeft}"); + await userEvent.keyboard("{ArrowRight}"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "ariakit-link-toolbar", + ); + }); + test("Check slash menu", async () => { + await focusOnEditor(); + await userEvent.keyboard("/"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("ariakit-slash-menu"); + }); + test("Check emoji picker", async () => { + await focusOnEditor(); + await userEvent.keyboard(":"); + await userEvent.keyboard("sm"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "ariakit-emoji-picker", + ); + }); + test("Check side menu", async () => { + await focusOnEditor(); + await waitForSelector(PARAGRAPH_SELECTOR); + await moveMouseOverElement(PARAGRAPH_SELECTOR); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("ariakit-side-menu"); + }); + test("Check drag handle menu", async () => { + await focusOnEditor(); + await waitForSelector(PARAGRAPH_SELECTOR); + await moveMouseOverElement(PARAGRAPH_SELECTOR); + + await sleep(500); + await waitForSelector(DRAG_HANDLE_SELECTOR); + await moveMouseOverElement(DRAG_HANDLE_SELECTOR); + await mouseSequence([{ type: "down" }, { type: "up" }]); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "ariakit-drag-handle-menu", + ); + }); + test("Check image toolbar", async () => { + await focusOnEditor(); + await executeSlashCommand("image"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "ariakit-image-toolbar", + ); + }); +}); diff --git a/tests/src/end-to-end/basics/basicblocks.test.ts b/tests/src/end-to-end/basics/basicblocks.test.ts deleted file mode 100644 index 7658241e91..0000000000 --- a/tests/src/end-to-end/basics/basicblocks.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { BASIC_BLOCKS_URL, PARAGRAPH_SELECTOR } from "../../utils/const.js"; -import { focusOnEditor } from "../../utils/editor.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASIC_BLOCKS_URL); -}); - -// Skip due to flaky timeout on locator.click -test.describe.skip("Check basic text block appearance", () => { - test("renders correctly", async ({ page }) => { - focusOnEditor(page); - await page.waitForTimeout(500); - - await page.locator(`[data-content-type="audio"] .bn-file-caption`).click(); - await page.keyboard.press("Backspace"); - await page.waitForTimeout(500); - - await page.locator(`[data-content-type="video"] .bn-file-caption`).click(); - await page.keyboard.press("Backspace"); - await page.waitForTimeout(500); - - await page - .locator(`${PARAGRAPH_SELECTOR} > p`, { - hasText: "Welcome to this demo!", - }) - .click(); - - await page.waitForTimeout(100); - expect(await page.screenshot({ fullPage: true })).toMatchSnapshot( - "basicblocks.png", - ); - }); -}); diff --git a/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-chromium-linux.png b/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-chromium-linux.png deleted file mode 100644 index daa362b64e..0000000000 Binary files a/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-firefox-linux.png b/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-firefox-linux.png deleted file mode 100644 index 77809d33f0..0000000000 Binary files a/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-webkit-linux.png b/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-webkit-linux.png deleted file mode 100644 index 6341152d27..0000000000 Binary files a/tests/src/end-to-end/basics/basicblocks.test.ts-snapshots/basicblocks-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/basics/basicblocks.test.tsx b/tests/src/end-to-end/basics/basicblocks.test.tsx new file mode 100644 index 0000000000..4736d276aa --- /dev/null +++ b/tests/src/end-to-end/basics/basicblocks.test.tsx @@ -0,0 +1,41 @@ +import App from "@examples/01-basic/04-default-blocks/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { page, userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { + focusOnEditor, + expectElement, + sleep, + waitForSelector, +} from "../../utils/editor.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +// Skip due to flaky timeout on locator.click +describe.skip("Check basic text block appearance", () => { + test("renders correctly", async () => { + await focusOnEditor(); + await sleep(500); + + await userEvent.click( + await waitForSelector(`[data-content-type="audio"] .bn-file-caption`), + ); + await userEvent.keyboard("{Backspace}"); + await sleep(500); + + await userEvent.click( + await waitForSelector(`[data-content-type="video"] .bn-file-caption`), + ); + await userEvent.keyboard("{Backspace}"); + await sleep(500); + + await page.getByText("Welcome to this demo!").click(); + + await sleep(100); + await expectElement(document.body).toMatchScreenshot("basicblocks"); + }); +}); diff --git a/tests/src/end-to-end/basics/basics.test.ts b/tests/src/end-to-end/basics/basics.test.ts deleted file mode 100644 index 58c51eb997..0000000000 --- a/tests/src/end-to-end/basics/basics.test.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { BASE_URL, EDITOR_SELECTOR } from "../../utils/const.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); -}); - -test.describe("Basic typing functionality", () => { - test("should allow me to type content", async ({ page }) => { - const editor = await page.waitForSelector(EDITOR_SELECTOR); - await page - .locator(EDITOR_SELECTOR + " div") - .nth(3) - .click(); - await page.keyboard.insertText("hello world"); - // await page.pause(); - expect(await editor.textContent()).toBe("hello world"); - }); -}); diff --git a/tests/src/end-to-end/basics/basics.test.tsx b/tests/src/end-to-end/basics/basics.test.tsx new file mode 100644 index 0000000000..2148415c8a --- /dev/null +++ b/tests/src/end-to-end/basics/basics.test.tsx @@ -0,0 +1,22 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { waitForSelector } from "../../utils/editor.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Basic typing functionality", () => { + test("should allow me to type content", async () => { + const editor = await waitForSelector(EDITOR_SELECTOR); + await userEvent.click( + document.querySelectorAll(`${EDITOR_SELECTOR} div`)[3] as HTMLElement, + ); + await userEvent.keyboard("hello world"); + expect(editor.textContent).toBe("hello world"); + }); +}); diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-chromium-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-chromium-linux.png new file mode 100644 index 0000000000..f0aebf63e9 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-chromium-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-firefox-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-firefox-linux.png new file mode 100644 index 0000000000..aea499f51e Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-firefox-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-webkit-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-webkit-linux.png new file mode 100644 index 0000000000..230f4341bf Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/backgroundColorMark-webkit-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-chromium-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-chromium-linux.png new file mode 100644 index 0000000000..ca48025531 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-chromium-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-firefox-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-firefox-linux.png new file mode 100644 index 0000000000..8632090ef4 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-firefox-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-webkit-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-webkit-linux.png new file mode 100644 index 0000000000..76dcabb55e Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockBackgroundColor-webkit-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-chromium-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-chromium-linux.png new file mode 100644 index 0000000000..f8ddb8aed1 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-chromium-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-firefox-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-firefox-linux.png new file mode 100644 index 0000000000..b5ad7ee1ac Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-firefox-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-webkit-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-webkit-linux.png new file mode 100644 index 0000000000..5c9a861927 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColor-webkit-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-chromium-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-chromium-linux.png new file mode 100644 index 0000000000..247be5a952 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-chromium-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-firefox-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-firefox-linux.png new file mode 100644 index 0000000000..76c9c9815f Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-firefox-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-webkit-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-webkit-linux.png new file mode 100644 index 0000000000..e008037200 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/blockTextColorTable-webkit-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-chromium-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-chromium-linux.png new file mode 100644 index 0000000000..c9fa05e638 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-chromium-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-firefox-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-firefox-linux.png new file mode 100644 index 0000000000..b40b6b63e3 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-firefox-linux.png differ diff --git a/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-webkit-linux.png b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-webkit-linux.png new file mode 100644 index 0000000000..94a66aca20 Binary files /dev/null and b/tests/src/end-to-end/colors/__screenshots__/colors.test.tsx/textColorMark-webkit-linux.png differ diff --git a/tests/src/end-to-end/colors/colors.test.ts b/tests/src/end-to-end/colors/colors.test.ts deleted file mode 100644 index 760ab63bc7..0000000000 --- a/tests/src/end-to-end/colors/colors.test.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - BACKGROUND_COLOR_SELECTOR, - BASE_URL, - COLORS_BUTTON_SELECTOR, - DRAG_HANDLE_MENU_SELECTOR, - DRAG_HANDLE_SELECTOR, - H_TWO_BLOCK_SELECTOR, - TABLE_SELECTOR, - TEXT_COLOR_SELECTOR, -} from "../../utils/const.js"; -import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; -import { focusOnEditor } from "../../utils/editor.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL, { waitUntil: "networkidle" }); -}); - -test.describe("Check Background & Text Color Functionality", () => { - test("Should be able to apply a text color mark", async ({ page }) => { - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - await page.waitForTimeout(500); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ControlOrMeta+ArrowLeft"); - await page.keyboard.press("ControlOrMeta+Shift+ArrowRight"); - - await page.locator(COLORS_BUTTON_SELECTOR).click(); - await page.locator(TEXT_COLOR_SELECTOR("red")).click(); - - await page.keyboard.press("ArrowLeft"); - - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - - expect(await page.screenshot()).toMatchSnapshot("textColorMark.png"); - }); - test("Should be able to apply a background color mark", async ({ page }) => { - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ControlOrMeta+ArrowLeft"); - await page.keyboard.press("Control+Shift+ArrowRight"); - - await page.locator(COLORS_BUTTON_SELECTOR).click(); - await page.locator(BACKGROUND_COLOR_SELECTOR("red")).click(); - - await page.keyboard.press("ArrowLeft"); - - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - - expect(await page.screenshot()).toMatchSnapshot("backgroundColorMark.png"); - }); - test("Should be able to set block text color", async ({ page }) => { - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertParagraph(page); - await page.keyboard.press("Tab"); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - await page.keyboard.press("Shift+Tab"); - - await page.hover(H_TWO_BLOCK_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.waitForSelector(DRAG_HANDLE_MENU_SELECTOR); - await page.hover("text=Colors"); - - const element = await page.locator(TEXT_COLOR_SELECTOR("red")); - const boundingBox = (await element.boundingBox())!; - const { x, y } = boundingBox; - await page.mouse.click(x + 10, y + 10); - - // Waits for block side menu animation to finish. - await page.waitForTimeout(500); - - expect(await page.screenshot()).toMatchSnapshot("blockTextColor.png"); - }); - test("Should be able to set block background color", async ({ page }) => { - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertParagraph(page); - await page.keyboard.press("Tab"); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - await page.keyboard.press("Shift+Tab"); - - await page.hover(H_TWO_BLOCK_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.waitForSelector(DRAG_HANDLE_MENU_SELECTOR); - await page.hover("text=Colors"); - - const element = await page.locator(BACKGROUND_COLOR_SELECTOR("red")); - const boundingBox = (await element.boundingBox())!; - const { x, y } = boundingBox; - await page.mouse.click(x + 10, y + 10); - - // Waits for block side menu animation to finish. - await page.waitForTimeout(500); - - expect(await page.screenshot()).toMatchSnapshot("blockBackgroundColor.png"); - }); - // Regression test: prosemirror-tables' TableView.update() preserves the - // NodeView's DOM without re-applying node attrs, so prop changes (e.g. - // textColor) wouldn't propagate to the blockContent wrapper. BlockNoteTableView - // overrides update() to sync prop-derived data-* attributes. - test("Should be able to set block text color on a table", async ({ - page, - }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "table"); - await page.keyboard.type("Table Cell"); - - await page.hover(TABLE_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.waitForSelector(DRAG_HANDLE_MENU_SELECTOR); - await page.hover("text=Colors"); - - const element = page.locator(TEXT_COLOR_SELECTOR("red")); - const boundingBox = (await element.boundingBox())!; - await page.mouse.click(boundingBox.x + 10, boundingBox.y + 10); - - expect(await page.screenshot()).toMatchSnapshot("blockTextColorTable.png"); - }); -}); diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-chromium-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-chromium-linux.png deleted file mode 100644 index 2688142a71..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-firefox-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-firefox-linux.png deleted file mode 100644 index fca97dea62..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-webkit-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-webkit-linux.png deleted file mode 100644 index cf7b9b5617..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/backgroundColorMark-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-chromium-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-chromium-linux.png deleted file mode 100644 index 3a54510826..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-firefox-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-firefox-linux.png deleted file mode 100644 index 4a20c06b55..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-webkit-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-webkit-linux.png deleted file mode 100644 index 545885b893..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockBackgroundColor-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-chromium-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-chromium-linux.png deleted file mode 100644 index b64dc109f5..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-firefox-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-firefox-linux.png deleted file mode 100644 index 7bc56fa896..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-webkit-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-webkit-linux.png deleted file mode 100644 index 453c3fb678..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColor-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-chromium-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-chromium-linux.png deleted file mode 100644 index ae74e34095..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-firefox-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-firefox-linux.png deleted file mode 100644 index 950fd729a5..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-webkit-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-webkit-linux.png deleted file mode 100644 index e9dec2867c..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/blockTextColorTable-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-chromium-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-chromium-linux.png deleted file mode 100644 index 0c244842c3..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-firefox-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-firefox-linux.png deleted file mode 100644 index 0b551a0b41..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-webkit-linux.png b/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-webkit-linux.png deleted file mode 100644 index 08e90669f1..0000000000 Binary files a/tests/src/end-to-end/colors/colors.test.ts-snapshots/textColorMark-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/colors/colors.test.tsx b/tests/src/end-to-end/colors/colors.test.tsx new file mode 100644 index 0000000000..7fc6228998 --- /dev/null +++ b/tests/src/end-to-end/colors/colors.test.tsx @@ -0,0 +1,167 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { MOD, page, userEvent } from "../../utils/context.js"; +import { + BACKGROUND_COLOR_SELECTOR, + COLORS_BUTTON_SELECTOR, + DRAG_HANDLE_MENU_SELECTOR, + DRAG_HANDLE_SELECTOR, + EDITOR_SELECTOR, + H_TWO_BLOCK_SELECTOR, + TABLE_SELECTOR, + TEXT_COLOR_SELECTOR, +} from "../../utils/const.js"; +import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; +import { + focusOnEditor, + expectElement, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { clickAt, getRect, moveMouseOverElement } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Background & Text Color Functionality", () => { + test("Should be able to apply a text color mark", async () => { + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + await sleep(500); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard(`{${MOD}>}{ArrowLeft}{/${MOD}}`); + await userEvent.keyboard(`{${MOD}>}{Shift>}{ArrowRight}{/Shift}{/${MOD}}`); + + await userEvent.click(await waitForSelector(COLORS_BUTTON_SELECTOR)); + await userEvent.click(await waitForSelector(TEXT_COLOR_SELECTOR("red"))); + + await userEvent.keyboard("{ArrowLeft}"); + + // Waits for formatting toolbar animation to finish. + await sleep(500); + + await expectElement(document.body).toMatchScreenshot("textColorMark"); + }); + test("Should be able to apply a background color mark", async () => { + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard(`{${MOD}>}{ArrowLeft}{/${MOD}}`); + await userEvent.keyboard( + "{Control>}{Shift>}{ArrowRight}{/Shift}{/Control}", + ); + + await userEvent.click(await waitForSelector(COLORS_BUTTON_SELECTOR)); + await userEvent.click( + await waitForSelector(BACKGROUND_COLOR_SELECTOR("red")), + ); + + await userEvent.keyboard("{ArrowLeft}"); + + // Waits for formatting toolbar animation to finish. + await sleep(500); + + await expectElement(document.body).toMatchScreenshot("backgroundColorMark"); + }); + test("Should be able to set block text color", async () => { + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + await userEvent.keyboard("{Tab}"); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + await userEvent.keyboard("{Shift>}{Tab}{/Shift}"); + + await moveMouseOverElement(H_TWO_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await waitForSelector(DRAG_HANDLE_MENU_SELECTOR); + await moveMouseOverElement(page.getByText("Colors").element()); + // WebKit needs the submenu's open animation to settle before its + // children have non-zero bounding boxes — otherwise getRect() returns + // (0,0,0,0) and clickAt(10,10) hits empty viewport space. + await waitForSelector(TEXT_COLOR_SELECTOR("red")); + await sleep(200); + + const { x, y } = getRect(TEXT_COLOR_SELECTOR("red")); + await clickAt(x + 10, y + 10); + + // Waits for block side menu animation to finish. + await sleep(500); + + await expectElement(document.body).toMatchScreenshot("blockTextColor"); + }); + test("Should be able to set block background color", async () => { + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + await userEvent.keyboard("{Tab}"); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + await userEvent.keyboard("{Shift>}{Tab}{/Shift}"); + + await moveMouseOverElement(H_TWO_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await waitForSelector(DRAG_HANDLE_MENU_SELECTOR); + await moveMouseOverElement(page.getByText("Colors").element()); + // See blockTextColor for why this sleep is needed (WebKit submenu open). + await waitForSelector(BACKGROUND_COLOR_SELECTOR("red")); + await sleep(200); + + const { x, y } = getRect(BACKGROUND_COLOR_SELECTOR("red")); + await clickAt(x + 10, y + 10); + + // Waits for block side menu animation to finish. + await sleep(500); + + await expectElement(document.body).toMatchScreenshot( + "blockBackgroundColor", + ); + }); + // Regression test: prosemirror-tables' TableView.update() preserves the + // NodeView's DOM without re-applying node attrs, so prop changes (e.g. + // textColor) wouldn't propagate to the blockContent wrapper. BlockNoteTableView + // overrides update() to sync prop-derived data-* attributes. + test("Should be able to set block text color on a table", async () => { + await focusOnEditor(); + await executeSlashCommand("table"); + await userEvent.keyboard("Table Cell"); + + await moveMouseOverElement(TABLE_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await waitForSelector(DRAG_HANDLE_MENU_SELECTOR); + await moveMouseOverElement(page.getByText("Colors").element()); + // See blockTextColor for why this sleep is needed (WebKit submenu open). + await waitForSelector(TEXT_COLOR_SELECTOR("red")); + await sleep(200); + + const { x, y } = getRect(TEXT_COLOR_SELECTOR("red")); + await clickAt(x + 10, y + 10); + + await expectElement(document.body).toMatchScreenshot("blockTextColorTable"); + }); +}); diff --git a/tests/src/end-to-end/comments/comments.test.ts b/tests/src/end-to-end/comments/comments.test.ts deleted file mode 100644 index 198a8e1ced..0000000000 --- a/tests/src/end-to-end/comments/comments.test.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { COMMENTS_URL, LINK_BUTTON_SELECTOR } from "../../utils/const.js"; -import { focusOnEditor } from "../../utils/editor.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(COMMENTS_URL); -}); - -test.describe("Check Comments functionality", () => { - test("Should preserve existing comments when adding a link", async ({ - page, - }) => { - await focusOnEditor(page); - - await page.keyboard.type("hello"); - await page.locator("text=hello").dblclick(); - - await page.click('[data-test="addcomment"]'); - await page.waitForSelector(".bn-thread"); - - await page.keyboard.type("test comment"); - await page.click('button[data-test="save"]'); - - await page.locator("span.bn-thread-mark").first().dblclick(); - - await expect(page.locator(LINK_BUTTON_SELECTOR)).toBeVisible(); - await page.click(LINK_BUTTON_SELECTOR); - - await page.keyboard.type("https://example.com"); - await page.keyboard.press("Enter"); - - await expect(await page.locator("span.bn-thread-mark")).toBeVisible(); - }); - - test("Should select thread on first click and open link on second click", async ({ - browserName, - page, - }) => { - test.skip( - browserName === "webkit", - "WebKit causes absurd failures running in Docker which aren't reproducible anywhere else.", - ); - - await focusOnEditor(page); - - await page.keyboard.type("hello"); - await page.locator("text=hello").dblclick(); - - await page.click('[data-test="addcomment"]'); - await page.waitForSelector(".bn-thread"); - - await page.keyboard.type("test comment"); - await page.click('button[data-test="save"]'); - - await page.locator("span.bn-thread-mark").first().dblclick(); - - await expect(page.locator(LINK_BUTTON_SELECTOR)).toBeVisible(); - await page.click(LINK_BUTTON_SELECTOR); - - await page.keyboard.type("https://example.com"); - await page.keyboard.press("Enter"); - - await page.keyboard.press("ArrowDown"); - await page.waitForTimeout(500); - await expect(page.locator(".bn-thread-mark-selected")).toHaveCount(0); - - const link = page.locator('a[data-inline-content-type="link"]').first(); - - // First click selects the thread without navigating. - await link.click(); - await page.waitForTimeout(500); - await expect(page.locator(".bn-thread-mark-selected")).toBeVisible(); - - // Second click on the now-selected thread navigates to the link target. - const popupPromise = page.waitForEvent("popup"); - await link.click(); - await popupPromise; - }); -}); diff --git a/tests/src/end-to-end/comments/comments.test.tsx b/tests/src/end-to-end/comments/comments.test.tsx new file mode 100644 index 0000000000..7b39ce1749 --- /dev/null +++ b/tests/src/end-to-end/comments/comments.test.tsx @@ -0,0 +1,111 @@ +import App from "@examples/07-collaboration/09-comments-testing/src/App"; +import { beforeEach, describe, expect, test, vi } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { browserName, page, userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR, LINK_BUTTON_SELECTOR } from "../../utils/const.js"; +import { + expectElement, + focusOnEditor, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { clickAt, getRect } from "../../utils/mouse.js"; + +/** Double-clicks the centre of an element via the real Playwright mouse. */ +async function doubleClickElement(element: Element) { + const { x, y, width, height } = getRect(element); + await clickAt(x + width / 2, y + height / 2, 2); +} + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Comments functionality", () => { + test("Should preserve existing comments when adding a link", async () => { + await focusOnEditor(); + + await userEvent.keyboard("hello"); + await doubleClickElement(page.getByText("hello").element()); + + await userEvent.click(await waitForSelector('[data-test="addcomment"]')); + await waitForSelector(".bn-thread"); + + await userEvent.keyboard("test comment"); + await userEvent.click(await waitForSelector('button[data-test="save"]')); + + await doubleClickElement( + document.querySelectorAll("span.bn-thread-mark")[0] as HTMLElement, + ); + + await expectElement( + await waitForSelector(LINK_BUTTON_SELECTOR), + ).toBeVisible(); + await userEvent.click(await waitForSelector(LINK_BUTTON_SELECTOR)); + + await userEvent.keyboard("https://example.com"); + await userEvent.keyboard("{Enter}"); + + await expectElement( + await waitForSelector("span.bn-thread-mark"), + ).toBeVisible(); + }); + + test.skipIf(browserName === "webkit")( + "Should select thread on first click and open link on second click", + async () => { + await focusOnEditor(); + + await userEvent.keyboard("hello"); + await doubleClickElement(page.getByText("hello").element()); + + await userEvent.click(await waitForSelector('[data-test="addcomment"]')); + await waitForSelector(".bn-thread"); + + await userEvent.keyboard("test comment"); + await userEvent.click(await waitForSelector('button[data-test="save"]')); + + await doubleClickElement( + document.querySelectorAll("span.bn-thread-mark")[0] as HTMLElement, + ); + + await expectElement( + await waitForSelector(LINK_BUTTON_SELECTOR), + ).toBeVisible(); + await userEvent.click(await waitForSelector(LINK_BUTTON_SELECTOR)); + + await userEvent.keyboard("https://example.com"); + await userEvent.keyboard("{Enter}"); + + await userEvent.keyboard("{ArrowDown}"); + await sleep(500); + expect(document.querySelectorAll(".bn-thread-mark-selected").length).toBe( + 0, + ); + + const link = document.querySelectorAll( + 'a[data-inline-content-type="link"]', + )[0] as HTMLElement; + + // First click selects the thread without navigating. + await userEvent.click(link); + await sleep(500); + await expectElement( + await waitForSelector(".bn-thread-mark-selected"), + ).toBeVisible(); + + // Second click on the now-selected thread navigates to the link target. + const windowOpen = vi + .spyOn(window, "open") + .mockImplementation(() => null); + await userEvent.click(link); + await vi.waitFor(() => { + if (!windowOpen.mock.calls.length) { + throw new Error("window.open was not called"); + } + }); + windowOpen.mockRestore(); + }, + ); +}); diff --git a/tests/src/end-to-end/copypaste/__screenshots__/copypaste.test.tsx/Check-Copy-Paste-From-Non-Editable-Block-Should-be-able-to-copy-paste-text-from-a-non-editable-block-1.png b/tests/src/end-to-end/copypaste/__screenshots__/copypaste.test.tsx/Check-Copy-Paste-From-Non-Editable-Block-Should-be-able-to-copy-paste-text-from-a-non-editable-block-1.png new file mode 100644 index 0000000000..c8d64e9504 Binary files /dev/null and b/tests/src/end-to-end/copypaste/__screenshots__/copypaste.test.tsx/Check-Copy-Paste-From-Non-Editable-Block-Should-be-able-to-copy-paste-text-from-a-non-editable-block-1.png differ diff --git a/tests/src/end-to-end/copypaste/__screenshots__/copypaste.test.tsx/Check-Copy-Paste-Functionality-Images-should-keep-props-1.png b/tests/src/end-to-end/copypaste/__screenshots__/copypaste.test.tsx/Check-Copy-Paste-Functionality-Images-should-keep-props-1.png new file mode 100644 index 0000000000..ae731f2eba Binary files /dev/null and b/tests/src/end-to-end/copypaste/__screenshots__/copypaste.test.tsx/Check-Copy-Paste-Functionality-Images-should-keep-props-1.png differ diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/headings-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/headings.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/headings-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/headings.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/images-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/images.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/images-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/images.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedOrderedLists-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/nestedOrderedLists.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedOrderedLists-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/nestedOrderedLists.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedParagraphs-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/nestedParagraphs.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedParagraphs-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/nestedParagraphs.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedUnorderedLists-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/nestedUnorderedLists.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedUnorderedLists-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/nestedUnorderedLists.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nonEditableBlock-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/nonEditableBlock.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nonEditableBlock-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/nonEditableBlock.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/orderedLists-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/orderedLists.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/orderedLists-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/orderedLists.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/paragraphs-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/paragraphs.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/paragraphs-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/paragraphs.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/unorderedLists-json-chromium-linux.json b/tests/src/end-to-end/copypaste/__snapshots__/unorderedLists.json similarity index 100% rename from tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/unorderedLists-json-chromium-linux.json rename to tests/src/end-to-end/copypaste/__snapshots__/unorderedLists.json diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts b/tests/src/end-to-end/copypaste/copypaste.test.ts deleted file mode 100644 index f93d3cef6a..0000000000 --- a/tests/src/end-to-end/copypaste/copypaste.test.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* eslint-disable jest/valid-title */ -import { test } from "../../setup/setupScript.js"; -import { BASE_URL, NON_EDITABLE_BLOCK_URL } from "../../utils/const.js"; -import { - copyPaste, - copyPasteAll, - insertHeading, - insertListItems, - insertNestedListItems, - insertParagraph, - startList, -} from "../../utils/copypaste.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.describe.configure({ mode: "serial" }); - -test.describe("Check Copy/Paste Functionality", () => { - test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); - }); - - test("Paragraphs should stay separate", async ({ page, browserName }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await insertParagraph(page); - await copyPasteAll(page); - - await compareDocToSnapshot(page, "paragraphs.json"); - }); - - test("Headings should keep formatting", async ({ page, browserName }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - await copyPasteAll(page); - - await compareDocToSnapshot(page, "headings.json"); - }); - - test("Unordered lists should keep formatting", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await startList(page, false); - await insertListItems(page); - await copyPasteAll(page); - - await compareDocToSnapshot(page, "unorderedLists.json"); - }); - - test("Ordered lists should keep formatting", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await startList(page, true); - await insertListItems(page); - await copyPasteAll(page); - - await compareDocToSnapshot(page, "orderedLists.json"); - }); - - test("Nested paragraphs should stay nested", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await copyPasteAll(page); - - await compareDocToSnapshot(page, "nestedParagraphs.json"); - }); - - test("Nested unordered lists should stay nested", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await startList(page, false); - await insertNestedListItems(page); - await copyPasteAll(page); - - await compareDocToSnapshot(page, "nestedUnorderedLists.json"); - }); - - test("Nested ordered lists should stay nested", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await startList(page, true); - await insertNestedListItems(page); - await copyPasteAll(page); - - await compareDocToSnapshot(page, "nestedOrderedLists.json"); - }); - - test("Images should keep props", async ({ page, browserName }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - await focusOnEditor(page); - await page.keyboard.type("paragraph"); - - const IMAGE_EMBED_URL = "https://placehold.co/800x540.png"; - await executeSlashCommand(page, "image"); - - await page.click(`[data-test="embed-tab"]`); - await page.click(`[data-test="embed-input"]`); - await page.keyboard.type(IMAGE_EMBED_URL); - await page.click(`[data-test="embed-input-button"]`); - await page.waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); - - await page.click(`img`); - - await page.waitForSelector(`[class*="bn-resize-handle"][style*="right"]`); - const resizeHandle = page.locator( - `[class*="bn-resize-handle"][style*="right"]`, - ); - const resizeHandleBoundingBox = (await resizeHandle.boundingBox())!; - await page.mouse.move( - resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2, - resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, - { - steps: 5, - }, - ); - await page.mouse.down(); - - await page.mouse.move( - resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2 - 50, - resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, - { - steps: 5, - }, - ); - - await page.mouse.up(); - - await copyPaste(page); - - await compareDocToSnapshot(page, "images.json"); - }); -}); - -test.describe("Check Copy/Paste From Non-Editable Block", () => { - test.beforeEach(async ({ page }) => { - await page.goto(NON_EDITABLE_BLOCK_URL); - }); - - test("Should be able to copy/paste text from a non-editable block", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox" || browserName === "webkit", - "Firefox doesn't yet support the async clipboard API. Webkit copy/paste stopped working after updating to Playwright 1.33.", - ); - - // Click and drag across the non-editable block's text to select part of it. - const p = page.locator('[data-content-type="nonEditable"] p'); - const box = (await p.boundingBox())!; - await page.mouse.move(box.x + 2, box.y + box.height / 2); - await page.mouse.down(); - await page.mouse.move(box.x + box.width * 0.25, box.y + box.height / 2, { - steps: 5, - }); - await page.mouse.up(); - - await page.keyboard.press("ControlOrMeta+C"); - - // Click the trailing block to create a new empty paragraph and focus - // the editor there. - await page.locator(".bn-trailing-block").click(); - - await page.keyboard.press("ControlOrMeta+V"); - - await compareDocToSnapshot(page, "nonEditableBlock.json"); - }); -}); diff --git a/tests/src/end-to-end/copypaste/copypaste.test.tsx b/tests/src/end-to-end/copypaste/copypaste.test.tsx new file mode 100644 index 0000000000..4b531d3c1d --- /dev/null +++ b/tests/src/end-to-end/copypaste/copypaste.test.tsx @@ -0,0 +1,211 @@ +/* eslint-disable jest/valid-title */ +import TestingApp from "@examples/01-basic/testing/src/App"; +import NonEditableApp from "@examples/06-custom-schema/08-non-editable-block/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { browserName, MOD, userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { + copyPaste, + copyPasteAll, + insertHeading, + insertListItems, + insertNestedListItems, + insertParagraph, + startList, +} from "../../utils/copypaste.js"; +import { + compareDocToSnapshot, + focusOnEditor, + waitForSelector, +} from "../../utils/editor.js"; +import { getRect, mouseSequence } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +describe("Check Copy/Paste Functionality", () => { + beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + }); + + // Firefox doesn't yet support the async clipboard API. Webkit copy/paste + // stopped working after updating to Playwright 1.33. + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Paragraphs should stay separate", + async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + await copyPasteAll(); + + await compareDocToSnapshot("paragraphs"); + }, + ); + + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Headings should keep formatting", + async () => { + await focusOnEditor(); + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + await copyPasteAll(); + + await compareDocToSnapshot("headings"); + }, + ); + + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Unordered lists should keep formatting", + async () => { + await focusOnEditor(); + await startList(false); + await insertListItems(); + await copyPasteAll(); + + await compareDocToSnapshot("unorderedLists"); + }, + ); + + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Ordered lists should keep formatting", + async () => { + await focusOnEditor(); + await startList(true); + await insertListItems(); + await copyPasteAll(); + + await compareDocToSnapshot("orderedLists"); + }, + ); + + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Nested paragraphs should stay nested", + async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await copyPasteAll(); + + await compareDocToSnapshot("nestedParagraphs"); + }, + ); + + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Nested unordered lists should stay nested", + async () => { + await focusOnEditor(); + await startList(false); + await insertNestedListItems(); + await copyPasteAll(); + + await compareDocToSnapshot("nestedUnorderedLists"); + }, + ); + + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Nested ordered lists should stay nested", + async () => { + await focusOnEditor(); + await startList(true); + await insertNestedListItems(); + await copyPasteAll(); + + await compareDocToSnapshot("nestedOrderedLists"); + }, + ); + + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Images should keep props", + async () => { + await focusOnEditor(); + await userEvent.keyboard("paragraph"); + + const IMAGE_EMBED_URL = "https://placehold.co/800x540.png"; + await executeSlashCommand("image"); + + await userEvent.click(await waitForSelector(`[data-test="embed-tab"]`)); + await userEvent.click(await waitForSelector(`[data-test="embed-input"]`)); + await userEvent.keyboard(IMAGE_EMBED_URL); + await userEvent.click( + await waitForSelector(`[data-test="embed-input-button"]`), + ); + await waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); + + await userEvent.click(await waitForSelector(`img`)); + + await waitForSelector(`[class*="bn-resize-handle"][style*="right"]`); + const resizeHandleBoundingBox = getRect( + `[class*="bn-resize-handle"][style*="right"]`, + ); + await mouseSequence([ + { + type: "move", + x: resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2, + y: resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, + steps: 5, + }, + { type: "down" }, + { + type: "move", + x: resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2 - 50, + y: resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, + steps: 5, + }, + { type: "up" }, + ]); + + await copyPaste(); + + await compareDocToSnapshot("images"); + }, + ); +}); + +describe("Check Copy/Paste From Non-Editable Block", () => { + beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + }); + + // Firefox doesn't yet support the async clipboard API. Webkit copy/paste + // stopped working after updating to Playwright 1.33. + test.skipIf(browserName === "firefox" || browserName === "webkit")( + "Should be able to copy/paste text from a non-editable block", + async () => { + // Click and drag across the non-editable block's text to select part of it. + const box = getRect('[data-content-type="nonEditable"] p'); + await mouseSequence([ + { type: "move", x: box.x + 2, y: box.y + box.height / 2 }, + { type: "down" }, + { + type: "move", + x: box.x + box.width * 0.25, + y: box.y + box.height / 2, + steps: 5, + }, + { type: "up" }, + ]); + + await userEvent.keyboard(`{${MOD}>}c{/${MOD}}`); + + // Click the trailing block to create a new empty paragraph and focus + // the editor there. + await userEvent.click(await waitForSelector(".bn-trailing-block")); + + await userEvent.keyboard(`{${MOD}>}v{/${MOD}}`); + + await compareDocToSnapshot("nonEditableBlock"); + }, + ); +}); diff --git a/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-chromium-linux.png b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-chromium-linux.png new file mode 100644 index 0000000000..0c2be41909 Binary files /dev/null and b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-chromium-linux.png differ diff --git a/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-firefox-linux.png b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-firefox-linux.png new file mode 100644 index 0000000000..ee981202d7 Binary files /dev/null and b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-firefox-linux.png differ diff --git a/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-webkit-linux.png b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-webkit-linux.png new file mode 100644 index 0000000000..e340832eae Binary files /dev/null and b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/react-interactivity-webkit-linux.png differ diff --git a/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-chromium-linux.png b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-chromium-linux.png new file mode 100644 index 0000000000..1988b4b132 Binary files /dev/null and b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-chromium-linux.png differ diff --git a/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-firefox-linux.png b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-firefox-linux.png new file mode 100644 index 0000000000..ff79029c40 Binary files /dev/null and b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-firefox-linux.png differ diff --git a/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-webkit-linux.png b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-webkit-linux.png new file mode 100644 index 0000000000..e83678336d Binary files /dev/null and b/tests/src/end-to-end/customblocks/__screenshots__/customblocks.test.tsx/vanilla-interactivity-webkit-linux.png differ diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-chromium-linux.json b/tests/src/end-to-end/customblocks/__snapshots__/reactInteractivity.json similarity index 100% rename from tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-chromium-linux.json rename to tests/src/end-to-end/customblocks/__snapshots__/reactInteractivity.json diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-chromium-linux.json b/tests/src/end-to-end/customblocks/__snapshots__/vanillaInteractivity.json similarity index 100% rename from tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-chromium-linux.json rename to tests/src/end-to-end/customblocks/__snapshots__/vanillaInteractivity.json diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts b/tests/src/end-to-end/customblocks/customblocks.test.ts deleted file mode 100644 index d51e72922b..0000000000 --- a/tests/src/end-to-end/customblocks/customblocks.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - CUSTOM_BLOCKS_REACT_URL, - CUSTOM_BLOCKS_VANILLA_URL, -} from "../../utils/const.js"; -import { compareDocToSnapshot } from "../../utils/editor.js"; - -test.describe("Check custom block functionality", () => { - test("Should be able to interactively update vanilla custom blocks", async ({ - page, - }) => { - await page.goto(CUSTOM_BLOCKS_VANILLA_URL); - - await page.locator("select").selectOption("info"); - await page.waitForTimeout(500); - - await compareDocToSnapshot(page, "vanillaInteractivity"); - expect(await page.screenshot()).toMatchSnapshot( - "vanilla-interactivity.png", - ); - }); - - test("Should be able to interactively update React custom blocks", async ({ - page, - }) => { - await page.goto(CUSTOM_BLOCKS_REACT_URL); - - await page.locator("select").selectOption("info"); - await page.waitForTimeout(500); - - await compareDocToSnapshot(page, "reactInteractivity"); - expect(await page.screenshot()).toMatchSnapshot("react-interactivity.png"); - }); -}); diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-chromium-linux.png b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-chromium-linux.png deleted file mode 100644 index 21cc7976a7..0000000000 Binary files a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-firefox-linux.png b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-firefox-linux.png deleted file mode 100644 index 36ad4d5de3..0000000000 Binary files a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-webkit-linux.png b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-webkit-linux.png deleted file mode 100644 index 550866fdcc..0000000000 Binary files a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/react-interactivity-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-firefox-linux.json b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-firefox-linux.json deleted file mode 100644 index 5ba0610718..0000000000 --- a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-firefox-linux.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "default", - "type": "info" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "simpleImage", - "attrs": { - "src": "https://placehold.co/332x322.jpg" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "bracketsParagraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Brackets Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-webkit-linux.json b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-webkit-linux.json deleted file mode 100644 index 5ba0610718..0000000000 --- a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-webkit-linux.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "default", - "type": "info" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "simpleImage", - "attrs": { - "src": "https://placehold.co/332x322.jpg" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "bracketsParagraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Brackets Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-chromium-linux.png b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-chromium-linux.png deleted file mode 100644 index 5f1f6ccac2..0000000000 Binary files a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-firefox-linux.png b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-firefox-linux.png deleted file mode 100644 index 655557ece4..0000000000 Binary files a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-webkit-linux.png b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-webkit-linux.png deleted file mode 100644 index 5c03b67ee6..0000000000 Binary files a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanilla-interactivity-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-firefox-linux.json b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-firefox-linux.json deleted file mode 100644 index 26fa960ca9..0000000000 --- a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-firefox-linux.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "default", - "type": "info" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "simpleImage", - "attrs": { - "src": "https://placehold.co/800x540.png" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "bracketsParagraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Brackets Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-webkit-linux.json b/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-webkit-linux.json deleted file mode 100644 index 26fa960ca9..0000000000 --- a/tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-webkit-linux.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "alert", - "attrs": { - "textAlignment": "left", - "textColor": "default", - "type": "info" - }, - "content": [ - { - "type": "text", - "text": "Alert" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "simpleImage", - "attrs": { - "src": "https://placehold.co/800x540.png" - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "bracketsParagraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Brackets Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/customblocks/customblocks.test.tsx b/tests/src/end-to-end/customblocks/customblocks.test.tsx new file mode 100644 index 0000000000..f137a4c196 --- /dev/null +++ b/tests/src/end-to-end/customblocks/customblocks.test.tsx @@ -0,0 +1,38 @@ +import ReactCustomBlocksApp from "@examples/06-custom-schema/react-custom-blocks/src/App"; +import VanillaCustomBlocksApp from "@examples/vanilla-js/react-vanilla-custom-blocks/src/App"; +import { describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { + compareDocToSnapshot, + expectElement, + sleep, + waitForSelector, +} from "../../utils/editor.js"; + +describe("Check custom block functionality", () => { + test("Should be able to interactively update vanilla custom blocks", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + + await userEvent.selectOptions(await waitForSelector("select"), "info"); + await sleep(500); + + await compareDocToSnapshot("vanillaInteractivity"); + await expectElement(document.body).toMatchScreenshot( + "vanilla-interactivity", + ); + }); + + test("Should be able to interactively update React custom blocks", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + + await userEvent.selectOptions(await waitForSelector("select"), "info"); + await sleep(500); + + await compareDocToSnapshot("reactInteractivity"); + await expectElement(document.body).toMatchScreenshot("react-interactivity"); + }); +}); diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-chromium-linux.json b/tests/src/end-to-end/dragdrop/__snapshots__/dragImage.json similarity index 100% rename from tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-chromium-linux.json rename to tests/src/end-to-end/dragdrop/__snapshots__/dragImage.json diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragPdf-chromium-linux.json b/tests/src/end-to-end/dragdrop/__snapshots__/dragPdf.json similarity index 100% rename from tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragPdf-chromium-linux.json rename to tests/src/end-to-end/dragdrop/__snapshots__/dragPdf.json diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropnested-chromium-linux.json b/tests/src/end-to-end/dragdrop/__snapshots__/dragdropnested.json similarity index 100% rename from tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropnested-chromium-linux.json rename to tests/src/end-to-end/dragdrop/__snapshots__/dragdropnested.json diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropsingle-chromium-linux.json b/tests/src/end-to-end/dragdrop/__snapshots__/dragdropsingle.json similarity index 100% rename from tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropsingle-chromium-linux.json rename to tests/src/end-to-end/dragdrop/__snapshots__/dragdropsingle.json diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts b/tests/src/end-to-end/dragdrop/dragdrop.test.ts deleted file mode 100644 index eb8c17dd02..0000000000 --- a/tests/src/end-to-end/dragdrop/dragdrop.test.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - BASE_URL, - H_ONE_BLOCK_SELECTOR, - H_THREE_BLOCK_SELECTOR, - H_TWO_BLOCK_SELECTOR, - IMAGE_SELECTOR, - PARAGRAPH_SELECTOR, - PDF_FILE_BLOCK_URL, - PDF_SELECTOR, -} from "../../utils/const.js"; -import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; -import { dragAndDropBlock } from "../../utils/mouse.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.describe.configure({ mode: "serial" }); - -test.describe("Check Block Dragging Functionality", () => { - test("Should be able to drag & drop non-nested blocks", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox", - "Playwright doesn't correctly simulate drag events in Firefox.", - ); - await page.goto(BASE_URL, { waitUntil: "networkidle" }); - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - const dragTarget = await page.locator(H_ONE_BLOCK_SELECTOR); - const dropTarget = await page.locator(H_TWO_BLOCK_SELECTOR); - await dragAndDropBlock(page, dragTarget, dropTarget, false); - - await compareDocToSnapshot(page, "dragdropsingle"); - }); - - test("Should be able to drag & drop nested blocks", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox", - "Playwright doesn't correctly simulate drag events in Firefox.", - ); - await page.goto(BASE_URL, { waitUntil: "networkidle" }); - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 3); - await page.keyboard.press("Enter"); - await page.keyboard.press("Shift+Tab"); - await page.keyboard.press("Shift+Tab"); - - // Dragging first heading into next nested element. - let dragTarget = await page.locator(H_ONE_BLOCK_SELECTOR); - let dropTarget = await page.locator(H_TWO_BLOCK_SELECTOR); - await dragAndDropBlock(page, dragTarget, dropTarget, true); - - // Dragging second heading into next nested element. - dragTarget = await page.locator(H_TWO_BLOCK_SELECTOR); - dropTarget = await page.locator(H_THREE_BLOCK_SELECTOR); - await dragAndDropBlock(page, dragTarget, dropTarget, true); - - dragTarget = await page.locator(H_THREE_BLOCK_SELECTOR); - dropTarget = await page.locator(PARAGRAPH_SELECTOR).last(); - await dragAndDropBlock(page, dragTarget, dropTarget, true); - - await compareDocToSnapshot(page, "dragdropnested"); - }); - - test("Should be able to drag image", async ({ page, browserName }) => { - test.skip( - browserName === "firefox", - "Playwright doesn't correctly simulate drag events in Firefox.", - ); - await page.goto(BASE_URL, { waitUntil: "networkidle" }); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - await page.keyboard.press("Escape"); - await page.locator(".bn-trailing-block").click(); - await insertHeading(page, 1); - - const dragTarget = await page.locator(IMAGE_SELECTOR); - const dropTarget = await page.locator(H_ONE_BLOCK_SELECTOR); - await dragAndDropBlock(page, dragTarget, dropTarget, false); - - await compareDocToSnapshot(page, "dragImage"); - }); - - test("Formatting toolbar should not appear when dragging image block", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox", - "Playwright doesn't correctly simulate drag events in Firefox.", - ); - await page.goto(BASE_URL, { waitUntil: "networkidle" }); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - await page.keyboard.press("Escape"); - await page.locator(".bn-trailing-block").click(); - await insertHeading(page, 1); - - const dragTarget = page.locator(IMAGE_SELECTOR); - const dropTarget = page.locator(H_ONE_BLOCK_SELECTOR); - await dragAndDropBlock(page, dragTarget, dropTarget, false); - - const toolbar = page.locator(".bn-formatting-toolbar"); - await expect(toolbar).not.toBeVisible(); - }); - - test("Should be able to drag PDF block", async ({ page, browserName }) => { - test.skip( - browserName === "firefox", - "Playwright doesn't correctly simulate drag events in Firefox.", - ); - await page.goto(PDF_FILE_BLOCK_URL, { waitUntil: "networkidle" }); - await focusOnEditor(page); - await page.waitForSelector(PDF_SELECTOR); - - const dragTarget = page.locator(PDF_SELECTOR); - const dropTarget = page.locator(PARAGRAPH_SELECTOR).first(); - await dragAndDropBlock(page, dragTarget, dropTarget, false); - - await compareDocToSnapshot(page, "dragPdf"); - }); -}); diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-firefox-linux.json b/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-firefox-linux.json deleted file mode 100644 index 268c1d446b..0000000000 --- a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-firefox-linux.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "", - "url": "", - "caption": "", - "showPreview": true - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-webkit-linux.json b/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-webkit-linux.json deleted file mode 100644 index 221e2436bb..0000000000 --- a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-webkit-linux.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "", - "url": "", - "caption": "", - "showPreview": true - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragPdf-webkit-linux.json b/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragPdf-webkit-linux.json deleted file mode 100644 index 537116ea42..0000000000 --- a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragPdf-webkit-linux.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "pdf", - "attrs": { - "name": "", - "url": "https://pdfobject.com/pdf/sample.pdf", - "caption": "", - "showPreview": true - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Press the '/' key to open the Slash Menu and add another PDF" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropnested-webkit-linux.json b/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropnested-webkit-linux.json deleted file mode 100644 index 71d8b512ae..0000000000 --- a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropnested-webkit-linux.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "4" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropsingle-webkit-linux.json b/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropsingle-webkit-linux.json deleted file mode 100644 index 8a14f1ecea..0000000000 --- a/tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropsingle-webkit-linux.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/dragdrop/dragdrop.test.tsx b/tests/src/end-to-end/dragdrop/dragdrop.test.tsx new file mode 100644 index 0000000000..3c1395cc2f --- /dev/null +++ b/tests/src/end-to-end/dragdrop/dragdrop.test.tsx @@ -0,0 +1,149 @@ +import PdfFileApp from "@examples/06-custom-schema/04-pdf-file-block/src/App"; +import TestingApp from "@examples/01-basic/testing/src/App"; +import { describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { browserName, userEvent } from "../../utils/context.js"; +import { + EDITOR_SELECTOR, + H_ONE_BLOCK_SELECTOR, + H_THREE_BLOCK_SELECTOR, + H_TWO_BLOCK_SELECTOR, + IMAGE_SELECTOR, + PARAGRAPH_SELECTOR, + PDF_SELECTOR, +} from "../../utils/const.js"; +import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; +import { + compareDocToSnapshot, + focusOnEditor, + waitForSelector, +} from "../../utils/editor.js"; +import { dragAndDropBlock } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +// `expect.element` is augmented against the bare `vitest` module, but vite-plus +// types `expect` from an internal module, so the augmentation doesn't attach. +// Type the accessor locally. +type ElementMatchers = { + not: { toBeVisible(): Promise }; +}; +type ElementExpect = (element: Element | null) => ElementMatchers; +const expectElement = (expect as unknown as { element: ElementExpect }).element; + +describe("Check Block Dragging Functionality", () => { + // Playwright doesn't correctly simulate drag events in Firefox. + test.skipIf(browserName === "firefox")( + "Should be able to drag & drop non-nested blocks", + async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + await dragAndDropBlock(H_ONE_BLOCK_SELECTOR, H_TWO_BLOCK_SELECTOR, false); + + await compareDocToSnapshot("dragdropsingle"); + }, + ); + + test.skipIf(browserName === "firefox")( + "Should be able to drag & drop nested blocks", + async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(3); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Shift>}{Tab}{/Shift}"); + await userEvent.keyboard("{Shift>}{Tab}{/Shift}"); + + // Dragging first heading into next nested element. + await dragAndDropBlock(H_ONE_BLOCK_SELECTOR, H_TWO_BLOCK_SELECTOR, true); + + // Dragging second heading into next nested element. + await dragAndDropBlock( + H_TWO_BLOCK_SELECTOR, + H_THREE_BLOCK_SELECTOR, + true, + ); + + const lastParagraph = document.querySelectorAll(PARAGRAPH_SELECTOR); + await dragAndDropBlock( + H_THREE_BLOCK_SELECTOR, + lastParagraph[lastParagraph.length - 1] as HTMLElement, + true, + ); + + await compareDocToSnapshot("dragdropnested"); + }, + ); + + test.skipIf(browserName === "firefox")( + "Should be able to drag image", + async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + await userEvent.keyboard("{Escape}"); + await userEvent.click(await waitForSelector(".bn-trailing-block")); + await insertHeading(1); + + await dragAndDropBlock(IMAGE_SELECTOR, H_ONE_BLOCK_SELECTOR, false); + + await compareDocToSnapshot("dragImage"); + }, + ); + + test.skipIf(browserName === "firefox")( + "Formatting toolbar should not appear when dragging image block", + async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + await userEvent.keyboard("{Escape}"); + await userEvent.click(await waitForSelector(".bn-trailing-block")); + await insertHeading(1); + + await dragAndDropBlock(IMAGE_SELECTOR, H_ONE_BLOCK_SELECTOR, false); + + await expectElement( + document.querySelector(".bn-formatting-toolbar"), + ).not.toBeVisible(); + }, + ); + + test.skipIf(browserName === "firefox")( + "Should be able to drag PDF block", + async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await waitForSelector(PDF_SELECTOR); + + const firstParagraph = document.querySelector( + PARAGRAPH_SELECTOR, + ) as HTMLElement; + await dragAndDropBlock(PDF_SELECTOR, firstParagraph, false); + + await compareDocToSnapshot("dragPdf"); + }, + ); +}); diff --git a/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-chromium-linux.png b/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-chromium-linux.png new file mode 100644 index 0000000000..6dadb44197 Binary files /dev/null and b/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-chromium-linux.png differ diff --git a/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-firefox-linux.png b/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-firefox-linux.png new file mode 100644 index 0000000000..4591949eed Binary files /dev/null and b/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-firefox-linux.png differ diff --git a/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-webkit-linux.png b/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-webkit-linux.png new file mode 100644 index 0000000000..b869cfc7a5 Binary files /dev/null and b/tests/src/end-to-end/draghandle/__screenshots__/draghandle.test.tsx/draghandlemenu-webkit-linux.png differ diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-chromium-linux.json b/tests/src/end-to-end/draghandle/__snapshots__/addnonselectedemptyblock.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-chromium-linux.json rename to tests/src/end-to-end/draghandle/__snapshots__/addnonselectedemptyblock.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-chromium-linux.json b/tests/src/end-to-end/draghandle/__snapshots__/dragHandleDocStructure.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-chromium-linux.json rename to tests/src/end-to-end/draghandle/__snapshots__/dragHandleDocStructure.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-chromium-linux.json b/tests/src/end-to-end/draghandle/__snapshots__/draghandleadd.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-chromium-linux.json rename to tests/src/end-to-end/draghandle/__snapshots__/draghandleadd.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledelete-chromium-linux.json b/tests/src/end-to-end/draghandle/__snapshots__/draghandledelete.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledelete-chromium-linux.json rename to tests/src/end-to-end/draghandle/__snapshots__/draghandledelete.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-chromium-linux.json b/tests/src/end-to-end/draghandle/__snapshots__/draghandledeletehoveroutsideselection.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-chromium-linux.json rename to tests/src/end-to-end/draghandle/__snapshots__/draghandledeletehoveroutsideselection.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-chromium-linux.json b/tests/src/end-to-end/draghandle/__snapshots__/draghandledeletemultiselection.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-chromium-linux.json rename to tests/src/end-to-end/draghandle/__snapshots__/draghandledeletemultiselection.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-chromium-linux.json b/tests/src/end-to-end/draghandle/__snapshots__/draghandlenesteddelete.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-chromium-linux.json rename to tests/src/end-to-end/draghandle/__snapshots__/draghandlenesteddelete.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts b/tests/src/end-to-end/draghandle/draghandle.test.ts deleted file mode 100644 index 2da087f4fc..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { expect, Page } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - BASE_URL, - BULLET_LIST_SELECTOR, - DRAG_HANDLE_ADD_SELECTOR, - DRAG_HANDLE_MENU_SELECTOR, - DRAG_HANDLE_SELECTOR, - H_ONE_BLOCK_SELECTOR, - H_THREE_BLOCK_SELECTOR, - H_TWO_BLOCK_SELECTOR, - PARAGRAPH_SELECTOR, - SLASH_MENU_SELECTOR, -} from "../../utils/const.js"; -import { insertHeading } from "../../utils/copypaste.js"; -import { - getDragHandleYCoord, - hoverAndAddBlockFromDragHandle, -} from "../../utils/draghandle.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; -import { moveMouseOverElement } from "../../utils/mouse.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -let page: Page; - -test.describe("Check Draghandle functionality", () => { - test.beforeAll(async ({ browser }) => { - page = await browser.newPage(); - }); - - test.beforeEach(async () => { - await page.goto(BASE_URL, { waitUntil: "networkidle" }); - await focusOnEditor(page); - }); - - test.afterAll(async () => { - await page.close(); - }); - - test("Should show draghandle when hovering over block", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Hover over this text"); - const heading = await page.locator(H_ONE_BLOCK_SELECTOR); - await moveMouseOverElement(page, heading); - - await page.waitForSelector(DRAG_HANDLE_SELECTOR); - }); - - test("Draghandle should display next to correct block", async () => { - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - const h1y = await getDragHandleYCoord(page, H_ONE_BLOCK_SELECTOR); - const h2y = await getDragHandleYCoord(page, H_TWO_BLOCK_SELECTOR); - const h3y = await getDragHandleYCoord(page, H_THREE_BLOCK_SELECTOR); - - expect(h1y < h2y).toBeTruthy(); - expect(h2y < h3y).toBeTruthy(); - }); - - test("Draghandle should display next to correct nested block", async () => { - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 3); - - const h1y = await getDragHandleYCoord(page, H_ONE_BLOCK_SELECTOR); - const h2y = await getDragHandleYCoord(page, H_TWO_BLOCK_SELECTOR); - const h3y = await getDragHandleYCoord(page, H_THREE_BLOCK_SELECTOR); - - expect(h1y < h2y).toBeTruthy(); - expect(h2y < h3y).toBeTruthy(); - }); - - test("Clicking draghandle should open menu", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Hover over this text", { delay: 20 }); - const heading = await page.locator(H_ONE_BLOCK_SELECTOR).first(); - await moveMouseOverElement(page, heading); - await page.click(DRAG_HANDLE_SELECTOR); - await page.waitForSelector(DRAG_HANDLE_MENU_SELECTOR); - // Compare editor screenshot - - await page.waitForTimeout(1000); - expect(await page.screenshot()).toMatchSnapshot("draghandlemenu.png"); - }); - - test("Clicking add button should create new block", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Hover over this text"); - await hoverAndAddBlockFromDragHandle(page, H_ONE_BLOCK_SELECTOR, "h2"); - await page.keyboard.type("This is an h2"); - await page.waitForSelector(H_TWO_BLOCK_SELECTOR); - - await page.waitForTimeout(1000); - await compareDocToSnapshot(page, "draghandleadd"); - }); - - test("Clicking add button should open menu", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Hover over this text"); - const heading = await page.locator(H_ONE_BLOCK_SELECTOR); - await moveMouseOverElement(page, heading); - await page.click(DRAG_HANDLE_ADD_SELECTOR); - - await page.waitForSelector(SLASH_MENU_SELECTOR); - }); - - test("Click add button hides drag handle", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Hover over this text"); - await hoverAndAddBlockFromDragHandle(page, H_ONE_BLOCK_SELECTOR, "h2"); - await page.waitForSelector(DRAG_HANDLE_SELECTOR, { state: "detached" }); - - await page.waitForSelector(DRAG_HANDLE_ADD_SELECTOR, { state: "detached" }); - }); - - test("Click add button for non-selected empty block", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Heading 1"); - // Wait for animation to finish - await page.waitForTimeout(350); - await page.keyboard.press("Enter"); - await hoverAndAddBlockFromDragHandle(page, PARAGRAPH_SELECTOR, "h1"); - - await compareDocToSnapshot(page, "addnonselectedemptyblock"); - }); - - test("Clicking delete button should delete block", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Hover over this text"); - - await page.hover(H_ONE_BLOCK_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.waitForSelector(DRAG_HANDLE_MENU_SELECTOR); - await page.click("text=Delete"); - await page.locator(H_ONE_BLOCK_SELECTOR).waitFor({ state: "detached" }); - - await compareDocToSnapshot(page, "draghandledelete"); - }); - - test("Delete button should delete correct block", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("This is h1"); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("This is h2"); - await executeSlashCommand(page, "h3"); - await page.keyboard.type("This is h3"); - - await page.hover(H_TWO_BLOCK_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.click("text=Delete"); - await page.waitForSelector(H_ONE_BLOCK_SELECTOR); - await page.waitForSelector(H_TWO_BLOCK_SELECTOR, { state: "detached" }); - await page.waitForSelector(H_THREE_BLOCK_SELECTOR); - - await compareDocToSnapshot(page, "dragHandleDocStructure"); - }); - - test("Delete button should delete all blocks in multi-block selection when hovered block is in selection", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Heading 1"); - await page.keyboard.press("Enter", { delay: 10 }); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("Heading 2"); - await page.keyboard.press("Enter", { delay: 10 }); - await executeSlashCommand(page, "h3"); - await page.keyboard.type("Heading 3"); - await page.keyboard.press("Enter", { delay: 10 }); - await executeSlashCommand(page, "bullet"); - await page.keyboard.type("Bullet List"); - - await page.keyboard.down("Shift"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ControlOrMeta+ArrowLeft"); - await page.keyboard.up("Shift"); - - await page.hover(H_THREE_BLOCK_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.click("text=Delete"); - await page.waitForSelector(H_ONE_BLOCK_SELECTOR); - await page.waitForSelector(H_TWO_BLOCK_SELECTOR); - await page.waitForSelector(H_THREE_BLOCK_SELECTOR, { state: "detached" }); - await page.waitForSelector(BULLET_LIST_SELECTOR, { state: "detached" }); - - await compareDocToSnapshot(page, "draghandledeletemultiselection"); - }); - - test("Delete button should delete only hovered block when it is outside multi-block selection", async () => { - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Heading 1"); - await page.keyboard.press("Enter", { delay: 10 }); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("Heading 2"); - await page.keyboard.press("Enter", { delay: 10 }); - await executeSlashCommand(page, "h3"); - await page.keyboard.type("Heading 3"); - await page.keyboard.press("Enter", { delay: 10 }); - await executeSlashCommand(page, "bullet"); - await page.keyboard.type("Bullet List"); - - await page.keyboard.down("Shift"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ControlOrMeta+ArrowLeft"); - await page.keyboard.up("Shift"); - - await page.hover(H_ONE_BLOCK_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.click("text=Delete"); - await page.waitForSelector(H_ONE_BLOCK_SELECTOR, { state: "detached" }); - await page.waitForSelector(H_TWO_BLOCK_SELECTOR); - await page.waitForSelector(H_THREE_BLOCK_SELECTOR); - await page.waitForSelector(BULLET_LIST_SELECTOR); - - await compareDocToSnapshot(page, "draghandledeletehoveroutsideselection"); - }); - - test("Deleting block with children should delete all children", async () => { - await page.goto(BASE_URL, { waitUntil: "networkidle" }); - await focusOnEditor(page); - await executeSlashCommand(page, "h1"); - await page.keyboard.type("This is h1"); - await page.keyboard.press("Enter", { delay: 10 }); - await page.keyboard.press("Tab", { delay: 10 }); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("This is h2"); - await page.keyboard.press("Enter", { delay: 10 }); - await page.keyboard.press("Tab", { delay: 10 }); - await executeSlashCommand(page, "h3"); - await page.keyboard.type("This is h3"); - - await page.hover(H_TWO_BLOCK_SELECTOR); - await page.click(DRAG_HANDLE_SELECTOR); - await page.click("text=Delete"); - await page.waitForSelector(H_ONE_BLOCK_SELECTOR); - await page.waitForSelector(H_TWO_BLOCK_SELECTOR, { state: "detached" }); - await page.waitForSelector(H_THREE_BLOCK_SELECTOR, { state: "detached" }); - - await compareDocToSnapshot(page, "draghandlenesteddelete"); - }); -}); diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-firefox-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-firefox-linux.json deleted file mode 100644 index 5a5f969550..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-firefox-linux.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": true - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-webkit-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-webkit-linux.json deleted file mode 100644 index 5a5f969550..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-webkit-linux.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": true - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-firefox-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-firefox-linux.json deleted file mode 100644 index 66af467a19..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-firefox-linux.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is h1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is h3" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-webkit-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-webkit-linux.json deleted file mode 100644 index 66af467a19..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-webkit-linux.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is h1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is h3" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-firefox-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-firefox-linux.json deleted file mode 100644 index dc1c289d1d..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-firefox-linux.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Hover over this text" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": true - }, - "content": [ - { - "type": "text", - "text": "This is an h2" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-webkit-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-webkit-linux.json deleted file mode 100644 index dc1c289d1d..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-webkit-linux.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Hover over this text" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": true - }, - "content": [ - { - "type": "text", - "text": "This is an h2" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-firefox-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-firefox-linux.json deleted file mode 100644 index aa89413a83..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-firefox-linux.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 3" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Bullet List" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-webkit-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-webkit-linux.json deleted file mode 100644 index aa89413a83..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-webkit-linux.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 3" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Bullet List" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-firefox-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-firefox-linux.json deleted file mode 100644 index 454137b269..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-firefox-linux.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-webkit-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-webkit-linux.json deleted file mode 100644 index 454137b269..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-webkit-linux.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading 2" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-chromium-linux.png b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-chromium-linux.png deleted file mode 100644 index d084fd52dc..0000000000 Binary files a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-firefox-linux.png b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-firefox-linux.png deleted file mode 100644 index 75a5593ecf..0000000000 Binary files a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-webkit-linux.png b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-webkit-linux.png deleted file mode 100644 index 690378d0a8..0000000000 Binary files a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlemenu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-firefox-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-firefox-linux.json deleted file mode 100644 index 8b730cd435..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-firefox-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is h1" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-webkit-linux.json b/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-webkit-linux.json deleted file mode 100644 index 8b730cd435..0000000000 --- a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-webkit-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is h1" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/draghandle/draghandle.test.tsx b/tests/src/end-to-end/draghandle/draghandle.test.tsx new file mode 100644 index 0000000000..5b94510ca7 --- /dev/null +++ b/tests/src/end-to-end/draghandle/draghandle.test.tsx @@ -0,0 +1,240 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { MOD, page, userEvent } from "../../utils/context.js"; +import { + BULLET_LIST_SELECTOR, + DRAG_HANDLE_ADD_SELECTOR, + DRAG_HANDLE_MENU_SELECTOR, + DRAG_HANDLE_SELECTOR, + EDITOR_SELECTOR, + H_ONE_BLOCK_SELECTOR, + H_THREE_BLOCK_SELECTOR, + H_TWO_BLOCK_SELECTOR, + PARAGRAPH_SELECTOR, + SLASH_MENU_SELECTOR, +} from "../../utils/const.js"; +import { insertHeading } from "../../utils/copypaste.js"; +import { + getDragHandleYCoord, + hoverAndAddBlockFromDragHandle, +} from "../../utils/draghandle.js"; +import { + compareDocToSnapshot, + focusOnEditor, + expectElement, + sleep, + waitForSelector, + waitForSelectorDetached, +} from "../../utils/editor.js"; +import { moveMouseOverElement } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +describe("Check Draghandle functionality", () => { + beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + }); + + test("Should show draghandle when hovering over block", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Hover over this text"); + await moveMouseOverElement(H_ONE_BLOCK_SELECTOR); + + await waitForSelector(DRAG_HANDLE_SELECTOR); + }); + + test("Draghandle should display next to correct block", async () => { + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + const h1y = await getDragHandleYCoord(H_ONE_BLOCK_SELECTOR); + const h2y = await getDragHandleYCoord(H_TWO_BLOCK_SELECTOR); + const h3y = await getDragHandleYCoord(H_THREE_BLOCK_SELECTOR); + + expect(h1y < h2y).toBeTruthy(); + expect(h2y < h3y).toBeTruthy(); + }); + + test("Draghandle should display next to correct nested block", async () => { + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(3); + + const h1y = await getDragHandleYCoord(H_ONE_BLOCK_SELECTOR); + const h2y = await getDragHandleYCoord(H_TWO_BLOCK_SELECTOR); + const h3y = await getDragHandleYCoord(H_THREE_BLOCK_SELECTOR); + + expect(h1y < h2y).toBeTruthy(); + expect(h2y < h3y).toBeTruthy(); + }); + + test("Clicking draghandle should open menu", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Hover over this text"); + await moveMouseOverElement(H_ONE_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await waitForSelector(DRAG_HANDLE_MENU_SELECTOR); + // Compare editor screenshot + + await sleep(1000); + await expectElement(document.body).toMatchScreenshot("draghandlemenu"); + }); + + test("Clicking add button should create new block", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Hover over this text"); + await hoverAndAddBlockFromDragHandle(H_ONE_BLOCK_SELECTOR, "h2"); + await userEvent.keyboard("This is an h2"); + await waitForSelector(H_TWO_BLOCK_SELECTOR); + + await sleep(1000); + await compareDocToSnapshot("draghandleadd"); + }); + + test("Clicking add button should open menu", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Hover over this text"); + await moveMouseOverElement(H_ONE_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_ADD_SELECTOR)); + + await waitForSelector(SLASH_MENU_SELECTOR); + }); + + test("Click add button hides drag handle", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Hover over this text"); + await hoverAndAddBlockFromDragHandle(H_ONE_BLOCK_SELECTOR, "h2"); + await waitForSelectorDetached(DRAG_HANDLE_SELECTOR); + + await waitForSelectorDetached(DRAG_HANDLE_ADD_SELECTOR); + }); + + test("Click add button for non-selected empty block", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Heading 1"); + // Wait for animation to finish + await sleep(350); + await userEvent.keyboard("{Enter}"); + await hoverAndAddBlockFromDragHandle(PARAGRAPH_SELECTOR, "h1"); + + await compareDocToSnapshot("addnonselectedemptyblock"); + }); + + test("Clicking delete button should delete block", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Hover over this text"); + + await moveMouseOverElement(H_ONE_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await waitForSelector(DRAG_HANDLE_MENU_SELECTOR); + await page.getByText("Delete").click(); + await waitForSelectorDetached(H_ONE_BLOCK_SELECTOR); + + await compareDocToSnapshot("draghandledelete"); + }); + + test("Delete button should delete correct block", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("This is h1"); + await executeSlashCommand("h2"); + await userEvent.keyboard("This is h2"); + await executeSlashCommand("h3"); + await userEvent.keyboard("This is h3"); + + await moveMouseOverElement(H_TWO_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await page.getByText("Delete").click(); + await waitForSelector(H_ONE_BLOCK_SELECTOR); + await waitForSelectorDetached(H_TWO_BLOCK_SELECTOR); + await waitForSelector(H_THREE_BLOCK_SELECTOR); + + await compareDocToSnapshot("dragHandleDocStructure"); + }); + + test("Delete button should delete all blocks in multi-block selection when hovered block is in selection", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Heading 1"); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("h2"); + await userEvent.keyboard("Heading 2"); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("h3"); + await userEvent.keyboard("Heading 3"); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("bullet"); + await userEvent.keyboard("Bullet List"); + + await userEvent.keyboard( + `{Shift>}{ArrowUp}{${MOD}>}{ArrowLeft}{/${MOD}}{/Shift}`, + ); + + await moveMouseOverElement(H_THREE_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await page.getByText("Delete").click(); + await waitForSelector(H_ONE_BLOCK_SELECTOR); + await waitForSelector(H_TWO_BLOCK_SELECTOR); + await waitForSelectorDetached(H_THREE_BLOCK_SELECTOR); + await waitForSelectorDetached(BULLET_LIST_SELECTOR); + + await compareDocToSnapshot("draghandledeletemultiselection"); + }); + + test("Delete button should delete only hovered block when it is outside multi-block selection", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("Heading 1"); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("h2"); + await userEvent.keyboard("Heading 2"); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("h3"); + await userEvent.keyboard("Heading 3"); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("bullet"); + await userEvent.keyboard("Bullet List"); + + await userEvent.keyboard( + `{Shift>}{ArrowUp}{${MOD}>}{ArrowLeft}{/${MOD}}{/Shift}`, + ); + + await moveMouseOverElement(H_ONE_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await page.getByText("Delete").click(); + await waitForSelectorDetached(H_ONE_BLOCK_SELECTOR); + await waitForSelector(H_TWO_BLOCK_SELECTOR); + await waitForSelector(H_THREE_BLOCK_SELECTOR); + await waitForSelector(BULLET_LIST_SELECTOR); + + await compareDocToSnapshot("draghandledeletehoveroutsideselection"); + }); + + test("Deleting block with children should delete all children", async () => { + await executeSlashCommand("h1"); + await userEvent.keyboard("This is h1"); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await executeSlashCommand("h2"); + await userEvent.keyboard("This is h2"); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await executeSlashCommand("h3"); + await userEvent.keyboard("This is h3"); + + await moveMouseOverElement(H_TWO_BLOCK_SELECTOR); + await userEvent.click(await waitForSelector(DRAG_HANDLE_SELECTOR)); + await page.getByText("Delete").click(); + await waitForSelector(H_ONE_BLOCK_SELECTOR); + await waitForSelectorDetached(H_TWO_BLOCK_SELECTOR); + await waitForSelectorDetached(H_THREE_BLOCK_SELECTOR); + + await compareDocToSnapshot("draghandlenesteddelete"); + }); +}); diff --git a/tests/src/end-to-end/emojipicker/emojipicker.test.ts b/tests/src/end-to-end/emojipicker/emojipicker.test.ts deleted file mode 100644 index b729404e83..0000000000 --- a/tests/src/end-to-end/emojipicker/emojipicker.test.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { BASE_URL, EMOJI_PICKER_SELECTOR } from "../../utils/const.js"; -import { focusOnEditor, waitForTextInEditor } from "../../utils/editor.js"; -import { - executeEmojiCommand, - openEmojiPicker, -} from "../../utils/emojipicker.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); -}); - -test.describe("Check Emoji Picker Functionality", () => { - test("should not show emoji picker when : is typed", async ({ page }) => { - await focusOnEditor(page); - await openEmojiPicker(page); - await expect(page.locator(EMOJI_PICKER_SELECTOR)).toHaveCount(0); - }); - test("should show emoji picker when : and query is typed", async ({ - page, - }) => { - await focusOnEditor(page); - await openEmojiPicker(page); - await page.keyboard.type("sm"); - await page.waitForSelector(EMOJI_PICKER_SELECTOR); - }); - test("Should be able to insert emoji", async ({ page }) => { - await focusOnEditor(page); - await executeEmojiCommand(page, "sm"); - await waitForTextInEditor(page, "🛩️ "); - }); - test("Should be able to open emoji picker from slash menu", async ({ - page, - }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "emoji"); - await page.keyboard.type("sm"); - await page.waitForSelector(EMOJI_PICKER_SELECTOR); - }); - test("Should be able to insert emoji after slash command", async ({ - page, - }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "emoji"); - await page.keyboard.type("sm"); - await page.waitForSelector(EMOJI_PICKER_SELECTOR); - await page.waitForTimeout(500); - await page.keyboard.press("Enter"); - await waitForTextInEditor(page, "🛩️ "); - }); -}); diff --git a/tests/src/end-to-end/emojipicker/emojipicker.test.tsx b/tests/src/end-to-end/emojipicker/emojipicker.test.tsx new file mode 100644 index 0000000000..8e33c05e16 --- /dev/null +++ b/tests/src/end-to-end/emojipicker/emojipicker.test.tsx @@ -0,0 +1,55 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR, EMOJI_PICKER_SELECTOR } from "../../utils/const.js"; +import { + focusOnEditor, + sleep, + waitForSelector, + waitForTextInEditor, +} from "../../utils/editor.js"; +import { + executeEmojiCommand, + openEmojiPicker, +} from "../../utils/emojipicker.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Emoji Picker Functionality", () => { + test("should not show emoji picker when : is typed", async () => { + await focusOnEditor(); + await openEmojiPicker(); + expect(document.querySelectorAll(EMOJI_PICKER_SELECTOR).length).toBe(0); + }); + test("should show emoji picker when : and query is typed", async () => { + await focusOnEditor(); + await openEmojiPicker(); + await userEvent.keyboard("sm"); + await waitForSelector(EMOJI_PICKER_SELECTOR); + }); + test("Should be able to insert emoji", async () => { + await focusOnEditor(); + await executeEmojiCommand("sm"); + await waitForTextInEditor("🛩️ "); + }); + test("Should be able to open emoji picker from slash menu", async () => { + await focusOnEditor(); + await executeSlashCommand("emoji"); + await userEvent.keyboard("sm"); + await waitForSelector(EMOJI_PICKER_SELECTOR); + }); + test("Should be able to insert emoji after slash command", async () => { + await focusOnEditor(); + await executeSlashCommand("emoji"); + await userEvent.keyboard("sm"); + await waitForSelector(EMOJI_PICKER_SELECTOR); + await sleep(500); + await userEvent.keyboard("{Enter}"); + await waitForTextInEditor("🛩️ "); + }); +}); diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-chromium-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-chromium-linux.png new file mode 100644 index 0000000000..b84f05e44c Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-chromium-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-firefox-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-firefox-linux.png new file mode 100644 index 0000000000..179a8e942c Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-firefox-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-webkit-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-webkit-linux.png new file mode 100644 index 0000000000..0cdd1ca8d3 Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/create-image-webkit-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-chromium-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-chromium-linux.png new file mode 100644 index 0000000000..4fddbd3b9b Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-chromium-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-firefox-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-firefox-linux.png new file mode 100644 index 0000000000..4ecbbb860b Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-firefox-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-webkit-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-webkit-linux.png new file mode 100644 index 0000000000..0f4251b10a Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/embed-image-webkit-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-chromium-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-chromium-linux.png new file mode 100644 index 0000000000..f908dcbbfd Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-chromium-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-firefox-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-firefox-linux.png new file mode 100644 index 0000000000..f5e64ec07f Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-firefox-linux.png differ diff --git a/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-webkit-linux.png b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-webkit-linux.png new file mode 100644 index 0000000000..76c69d701b Binary files /dev/null and b/tests/src/end-to-end/images/__screenshots__/images.test.tsx/resize-image-webkit-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-chromium-linux.json b/tests/src/end-to-end/images/__snapshots__/createImage.json similarity index 100% rename from tests/src/end-to-end/images/images.test.ts-snapshots/createImage-chromium-linux.json rename to tests/src/end-to-end/images/__snapshots__/createImage.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledelete-firefox-linux.json b/tests/src/end-to-end/images/__snapshots__/deleteImage.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledelete-firefox-linux.json rename to tests/src/end-to-end/images/__snapshots__/deleteImage.json diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-chromium-linux.json b/tests/src/end-to-end/images/__snapshots__/embedImage.json similarity index 100% rename from tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-chromium-linux.json rename to tests/src/end-to-end/images/__snapshots__/embedImage.json diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-chromium-linux.json b/tests/src/end-to-end/images/__snapshots__/resizeImage.json similarity index 100% rename from tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-chromium-linux.json rename to tests/src/end-to-end/images/__snapshots__/resizeImage.json diff --git a/tests/src/end-to-end/images/images.test.ts b/tests/src/end-to-end/images/images.test.ts deleted file mode 100644 index 83f9045152..0000000000 --- a/tests/src/end-to-end/images/images.test.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { FileChooser, expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { BASE_URL, NO_TRAILING_BLOCK_URL } from "../../utils/const.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -const IMAGE_UPLOAD_PATH = "src/end-to-end/images/placeholder.png"; -const IMAGE_EMBED_URL = "https://placehold.co/800x540.png"; - -test.describe("Check Image Block and Toolbar functionality", () => { - test("Should be able to create image block", async ({ page }) => { - await page.goto(BASE_URL); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - await page.waitForTimeout(500); - await compareDocToSnapshot(page, "createImage"); - expect(await page.screenshot()).toMatchSnapshot("create-image.png"); - }); - test.skip("Should be able to upload image", async ({ page }) => { - await page.goto(BASE_URL); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - page.on("filechooser", (fileChooser: FileChooser) => { - fileChooser.setFiles([IMAGE_UPLOAD_PATH]); - }); - await page.click(`[data-test="upload-input"]`); - await page.waitForSelector(`img[src^="https://tmpfiles.org/"]`); - await page.waitForTimeout(500); - - await page.click(`img`); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("upload-image.png"); - }); - test("Should be able to embed image", async ({ page }) => { - await page.goto(BASE_URL); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - await page.click(`[data-test="embed-tab"]`); - await page.click(`[data-test="embed-input"]`); - await page.keyboard.type(IMAGE_EMBED_URL); - await page.click(`[data-test="embed-input-button"]`); - await page.waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); - await page.waitForTimeout(500); - - await page.click(`img`); - - await page.waitForTimeout(500); - await compareDocToSnapshot(page, "embedImage"); - expect(await page.screenshot()).toMatchSnapshot("embed-image.png"); - }); - test("Should be able to resize image", async ({ page }) => { - await page.goto(BASE_URL); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - await page.click(`[data-test="embed-tab"]`); - await page.click(`[data-test="embed-input"]`); - await page.keyboard.type(IMAGE_EMBED_URL); - await page.click(`[data-test="embed-input-button"]`); - await page.waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); - await page.waitForTimeout(500); - - await page.click(`img`); - - await page.waitForSelector(`[class*="bn-resize-handle"][style*="right"]`); - const resizeHandle = page.locator( - `[class*="bn-resize-handle"][style*="right"]`, - ); - const resizeHandleBoundingBox = (await resizeHandle.boundingBox())!; - await page.mouse.move( - resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2, - resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, - { - steps: 5, - }, - ); - await page.mouse.down(); - - await page.mouse.move( - resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2 - 50, - resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, - { - steps: 5, - }, - ); - - await page.mouse.up(); - - await page.waitForTimeout(500); - await compareDocToSnapshot(page, "resizeImage"); - expect(await page.screenshot()).toMatchSnapshot("resize-image.png"); - }); - test("Should be able to delete image with backspace", async ({ page }) => { - await page.goto(BASE_URL); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - await page.click(`[data-test="embed-tab"]`); - await page.click(`[data-test="embed-input"]`); - await page.keyboard.type(IMAGE_EMBED_URL); - await page.click(`[data-test="embed-input-button"]`); - await page.waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); - - await page.click(`img`); - await page.keyboard.press("Backspace"); - - await compareDocToSnapshot(page, "deleteImage"); - }); - test("Should open file panel but not formatting toolbar when inserting image with no trailing block", async ({ - page, - }) => { - await page.goto(NO_TRAILING_BLOCK_URL); - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - const filePanel = page.locator(".bn-panel"); - await expect(filePanel).toBeVisible(); - - const formattingToolbar = page.locator(".bn-formatting-toolbar"); - await expect(formattingToolbar).not.toBeVisible(); - }); -}); diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-chromium-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-chromium-linux.png deleted file mode 100644 index e53ec627da..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-firefox-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-firefox-linux.png deleted file mode 100644 index f9d71df5b4..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-webkit-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-webkit-linux.png deleted file mode 100644 index ae6ca2b82a..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/create-image-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json deleted file mode 100644 index 5e40c74d39..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "", - "url": "", - "caption": "", - "showPreview": true - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json deleted file mode 100644 index 5e40c74d39..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "", - "url": "", - "caption": "", - "showPreview": true - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-chromium-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-chromium-linux.json deleted file mode 100644 index f56b777a4c..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-chromium-linux.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-firefox-linux.json deleted file mode 100644 index f56b777a4c..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-firefox-linux.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-webkit-linux.json deleted file mode 100644 index f56b777a4c..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/deleteImage-webkit-linux.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-chromium-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-chromium-linux.png deleted file mode 100644 index 2f7a993820..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-firefox-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-firefox-linux.png deleted file mode 100644 index 92442464aa..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-webkit-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-webkit-linux.png deleted file mode 100644 index 8c9b5090d3..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json deleted file mode 100644 index a37d07751a..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "800x540.png", - "url": "https://placehold.co/800x540.png", - "caption": "", - "showPreview": true - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json deleted file mode 100644 index a37d07751a..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "800x540.png", - "url": "https://placehold.co/800x540.png", - "caption": "", - "showPreview": true - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-chromium-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-chromium-linux.png deleted file mode 100644 index 41e5da9eef..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-firefox-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-firefox-linux.png deleted file mode 100644 index 3ecb54f456..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png deleted file mode 100644 index 10a5040fba..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json deleted file mode 100644 index 6c4b8deddf..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "800x540.png", - "url": "https://placehold.co/800x540.png", - "caption": "", - "showPreview": true, - "previewWidth": 573 - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json deleted file mode 100644 index 6c4b8deddf..0000000000 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "image", - "attrs": { - "textAlignment": "left", - "backgroundColor": "default", - "name": "800x540.png", - "url": "https://placehold.co/800x540.png", - "caption": "", - "showPreview": true, - "previewWidth": 573 - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-chromium-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-chromium-linux.png deleted file mode 100644 index 368ab649a8..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-firefox-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-firefox-linux.png deleted file mode 100644 index 800fc4f0b5..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-webkit-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-webkit-linux.png deleted file mode 100644 index e9337209a8..0000000000 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/images/images.test.tsx b/tests/src/end-to-end/images/images.test.tsx new file mode 100644 index 0000000000..3b3dbdf8e0 --- /dev/null +++ b/tests/src/end-to-end/images/images.test.tsx @@ -0,0 +1,149 @@ +import NoTrailingBlockApp from "@examples/01-basic/17-no-trailing-block/src/App"; +import TestingApp from "@examples/01-basic/testing/src/App"; +import { describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { + compareDocToSnapshot, + expectElement, + focusOnEditor, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { getRect, mouseSequence } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +const IMAGE_EMBED_URL = "https://placehold.co/800x540.png"; + +describe("Check Image Block and Toolbar functionality", () => { + test("Should be able to create image block", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + + await sleep(500); + await compareDocToSnapshot("createImage"); + await expectElement(document.body).toMatchScreenshot("create-image"); + }); + test.skip("Should be able to upload image", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + + const uploadInput = (await waitForSelector( + `[data-test="upload-input"]`, + )) as HTMLInputElement; + const file = new File(["placeholder"], "placeholder.png", { + type: "image/png", + }); + await userEvent.upload(uploadInput, file); + await waitForSelector(`img[src^="https://tmpfiles.org/"]`); + await sleep(500); + + await userEvent.click(await waitForSelector(`img`)); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("upload-image"); + }); + test("Should be able to embed image", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + + await userEvent.click(await waitForSelector(`[data-test="embed-tab"]`)); + await userEvent.click(await waitForSelector(`[data-test="embed-input"]`)); + await userEvent.keyboard(IMAGE_EMBED_URL); + await userEvent.click( + await waitForSelector(`[data-test="embed-input-button"]`), + ); + await waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); + await sleep(500); + + await userEvent.click(await waitForSelector(`img`)); + + await sleep(500); + await compareDocToSnapshot("embedImage"); + await expectElement(document.body).toMatchScreenshot("embed-image"); + }); + test("Should be able to resize image", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + + await userEvent.click(await waitForSelector(`[data-test="embed-tab"]`)); + await userEvent.click(await waitForSelector(`[data-test="embed-input"]`)); + await userEvent.keyboard(IMAGE_EMBED_URL); + await userEvent.click( + await waitForSelector(`[data-test="embed-input-button"]`), + ); + await waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); + await sleep(500); + + await userEvent.click(await waitForSelector(`img`)); + + await waitForSelector(`[class*="bn-resize-handle"][style*="right"]`); + const resizeHandleBoundingBox = getRect( + `[class*="bn-resize-handle"][style*="right"]`, + ); + await mouseSequence([ + { + type: "move", + x: resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2, + y: resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, + steps: 5, + }, + { type: "down" }, + { + type: "move", + x: resizeHandleBoundingBox.x + resizeHandleBoundingBox.width / 2 - 50, + y: resizeHandleBoundingBox.y + resizeHandleBoundingBox.height / 2, + steps: 5, + }, + { type: "up" }, + ]); + + await sleep(500); + await compareDocToSnapshot("resizeImage"); + await expectElement(document.body).toMatchScreenshot("resize-image"); + }); + test("Should be able to delete image with backspace", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + + await userEvent.click(await waitForSelector(`[data-test="embed-tab"]`)); + await userEvent.click(await waitForSelector(`[data-test="embed-input"]`)); + await userEvent.keyboard(IMAGE_EMBED_URL); + await userEvent.click( + await waitForSelector(`[data-test="embed-input-button"]`), + ); + await waitForSelector(`img[src="${IMAGE_EMBED_URL}"]`); + + await userEvent.click(await waitForSelector(`img`)); + await userEvent.keyboard("{Backspace}"); + + await compareDocToSnapshot("deleteImage"); + }); + test("Should open file panel but not formatting toolbar when inserting image with no trailing block", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await focusOnEditor(); + await executeSlashCommand("image"); + + const filePanel = await waitForSelector(".bn-panel"); + await expectElement(filePanel).toBeVisible(); + + // The toolbar may either be absent from the DOM or present-but-hidden; + // expectElement().not.toBeVisible() errors on null, so handle both. + const toolbar = document.querySelector(".bn-formatting-toolbar"); + if (toolbar) { + await expectElement(toolbar).not.toBeVisible(); + } + }); +}); diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-chromium-linux.json b/tests/src/end-to-end/indentation/__snapshots__/decreaseIndentMultipleBlocks.json similarity index 100% rename from tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-chromium-linux.json rename to tests/src/end-to-end/indentation/__snapshots__/decreaseIndentMultipleBlocks.json diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-chromium-linux.json b/tests/src/end-to-end/indentation/__snapshots__/decreaseIndentSingleBlock.json similarity index 100% rename from tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-chromium-linux.json rename to tests/src/end-to-end/indentation/__snapshots__/decreaseIndentSingleBlock.json diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-chromium-linux.json b/tests/src/end-to-end/indentation/__snapshots__/increaseIndentMultipleBlocks.json similarity index 100% rename from tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-chromium-linux.json rename to tests/src/end-to-end/indentation/__snapshots__/increaseIndentMultipleBlocks.json diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-chromium-linux.json b/tests/src/end-to-end/indentation/__snapshots__/increaseIndentSingleBlock.json similarity index 100% rename from tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-chromium-linux.json rename to tests/src/end-to-end/indentation/__snapshots__/increaseIndentSingleBlock.json diff --git a/tests/src/end-to-end/indentation/indentation.test.ts b/tests/src/end-to-end/indentation/indentation.test.ts deleted file mode 100644 index d509d6827c..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { test } from "../../setup/setupScript.js"; -import { - BASE_URL, - H_THREE_BLOCK_SELECTOR, - H_TWO_BLOCK_SELECTOR, - NEST_BLOCK_BUTTON_SELECTOR, - UNNEST_BLOCK_BUTTON_SELECTOR, -} from "../../utils/const.js"; -import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL, { waitUntil: "networkidle" }); -}); - -test.describe("Check Block Indentation Functionality", () => { - test("Should be able to increase indentation for single block", async ({ - page, - }) => { - await focusOnEditor(page); - - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - const element = await page.locator(H_TWO_BLOCK_SELECTOR); - const boundingBox = (await element.boundingBox())!; - const { x, y, height } = boundingBox; - - await page.mouse.click(x + 10, y + height / 2, { clickCount: 2 }); - - await page.locator(NEST_BLOCK_BUTTON_SELECTOR).click(); - - await page.waitForTimeout(350); - await page.mouse.click(x + 10, y + height / 2); - - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - - await compareDocToSnapshot(page, "increaseIndentSingleBlock"); - }); - test("Should be able to decrease indentation for single block", async ({ - page, - }) => { - await focusOnEditor(page); - - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - const element = await page.locator(H_TWO_BLOCK_SELECTOR); - const boundingBox = (await element.boundingBox())!; - const { x, y, height } = boundingBox; - - await page.mouse.click(x + 10, y + height / 2, { clickCount: 2 }); - - await page.locator(UNNEST_BLOCK_BUTTON_SELECTOR).click(); - - await page.waitForTimeout(350); - await page.mouse.click(x + 10, y + height / 2); - - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - - await compareDocToSnapshot(page, "decreaseIndentSingleBlock"); - }); - test("Should be able to increase indentation for multiple blocks", async ({ - page, - }) => { - await focusOnEditor(page); - - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - const firstElement = await page.locator(H_TWO_BLOCK_SELECTOR); - const firstElementBoundingBox = (await firstElement.boundingBox())!; - await page.mouse.click( - firstElementBoundingBox.x + 20, - firstElementBoundingBox.y + firstElementBoundingBox.height / 2, - ); - - const secondElement = await page.locator(H_THREE_BLOCK_SELECTOR); - const secondElementBoundingBox = (await secondElement.boundingBox())!; - await page.keyboard.down("Shift"); - await page.mouse.click( - secondElementBoundingBox.x + 20, - secondElementBoundingBox.y + secondElementBoundingBox.height / 2, - ); - await page.keyboard.up("Shift"); - - await page.locator(NEST_BLOCK_BUTTON_SELECTOR).click(); - - await page.waitForTimeout(350); - await page.mouse.click( - secondElementBoundingBox.x + secondElementBoundingBox.width - 20, - secondElementBoundingBox.y + secondElementBoundingBox.height / 2, - ); - - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - - await compareDocToSnapshot(page, "increaseIndentMultipleBlocks"); - }); - test("Should be able to decrease indentation for multiple blocks", async ({ - page, - }) => { - await focusOnEditor(page); - - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - const firstElement = await page.locator(H_TWO_BLOCK_SELECTOR); - const firstElementBoundingBox = (await firstElement.boundingBox())!; - await page.mouse.click( - firstElementBoundingBox.x + 20, - firstElementBoundingBox.y + firstElementBoundingBox.height / 2, - ); - - const secondElement = await page.locator(H_THREE_BLOCK_SELECTOR); - const secondElementBoundingBox = (await secondElement.boundingBox())!; - await page.keyboard.down("Shift"); - await page.mouse.click( - secondElementBoundingBox.x + 20, - secondElementBoundingBox.y + secondElementBoundingBox.height / 2, - ); - await page.keyboard.up("Shift"); - - await page.locator(UNNEST_BLOCK_BUTTON_SELECTOR).click(); - - await page.waitForTimeout(350); - await page.mouse.click( - secondElementBoundingBox.x + secondElementBoundingBox.width - 20, - secondElementBoundingBox.y + secondElementBoundingBox.height / 2, - ); - - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - - await compareDocToSnapshot(page, "decreaseIndentMultipleBlocks"); - }); -}); diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-firefox-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-firefox-linux.json deleted file mode 100644 index fb6a7d8419..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-firefox-linux.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-webkit-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-webkit-linux.json deleted file mode 100644 index fb6a7d8419..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-webkit-linux.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-firefox-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-firefox-linux.json deleted file mode 100644 index 3821bc9d8f..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-firefox-linux.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-webkit-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-webkit-linux.json deleted file mode 100644 index 3821bc9d8f..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-webkit-linux.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-firefox-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-firefox-linux.json deleted file mode 100644 index 3d73b77ab7..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-firefox-linux.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-webkit-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-webkit-linux.json deleted file mode 100644 index 3d73b77ab7..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-webkit-linux.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-firefox-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-firefox-linux.json deleted file mode 100644 index b6395b3112..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-firefox-linux.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-webkit-linux.json b/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-webkit-linux.json deleted file mode 100644 index b6395b3112..0000000000 --- a/tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-webkit-linux.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/indentation/indentation.test.tsx b/tests/src/end-to-end/indentation/indentation.test.tsx new file mode 100644 index 0000000000..04011da0bd --- /dev/null +++ b/tests/src/end-to-end/indentation/indentation.test.tsx @@ -0,0 +1,157 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { + EDITOR_SELECTOR, + H_THREE_BLOCK_SELECTOR, + H_TWO_BLOCK_SELECTOR, + NEST_BLOCK_BUTTON_SELECTOR, + UNNEST_BLOCK_BUTTON_SELECTOR, +} from "../../utils/const.js"; +import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; +import { + compareDocToSnapshot, + focusOnEditor, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { clickAt, getRect } from "../../utils/mouse.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Block Indentation Functionality", () => { + test("Should be able to increase indentation for single block", async () => { + await focusOnEditor(); + + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + const { x, y, height } = getRect(H_TWO_BLOCK_SELECTOR); + + await clickAt(x + 10, y + height / 2, 2); + + await userEvent.click(await waitForSelector(NEST_BLOCK_BUTTON_SELECTOR)); + + await sleep(350); + await clickAt(x + 10, y + height / 2); + + // Waits for formatting toolbar animation to finish. + await sleep(500); + + await compareDocToSnapshot("increaseIndentSingleBlock"); + }); + test("Should be able to decrease indentation for single block", async () => { + await focusOnEditor(); + + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + const { x, y, height } = getRect(H_TWO_BLOCK_SELECTOR); + + await clickAt(x + 10, y + height / 2, 2); + + await userEvent.click(await waitForSelector(UNNEST_BLOCK_BUTTON_SELECTOR)); + + await sleep(350); + await clickAt(x + 10, y + height / 2); + + // Waits for formatting toolbar animation to finish. + await sleep(500); + + await compareDocToSnapshot("decreaseIndentSingleBlock"); + }); + test("Should be able to increase indentation for multiple blocks", async () => { + await focusOnEditor(); + + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + const firstElementBoundingBox = getRect(H_TWO_BLOCK_SELECTOR); + await clickAt( + firstElementBoundingBox.x + 20, + firstElementBoundingBox.y + firstElementBoundingBox.height / 2, + ); + + const secondElementBoundingBox = getRect(H_THREE_BLOCK_SELECTOR); + await userEvent.keyboard("{Shift>}"); + await clickAt( + secondElementBoundingBox.x + 20, + secondElementBoundingBox.y + secondElementBoundingBox.height / 2, + ); + await userEvent.keyboard("{/Shift}"); + + await userEvent.click(await waitForSelector(NEST_BLOCK_BUTTON_SELECTOR)); + + await sleep(350); + await clickAt( + secondElementBoundingBox.x + secondElementBoundingBox.width - 20, + secondElementBoundingBox.y + secondElementBoundingBox.height / 2, + ); + + // Waits for formatting toolbar animation to finish. + await sleep(500); + + await compareDocToSnapshot("increaseIndentMultipleBlocks"); + }); + test("Should be able to decrease indentation for multiple blocks", async () => { + await focusOnEditor(); + + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + const firstElementBoundingBox = getRect(H_TWO_BLOCK_SELECTOR); + await clickAt( + firstElementBoundingBox.x + 20, + firstElementBoundingBox.y + firstElementBoundingBox.height / 2, + ); + + const secondElementBoundingBox = getRect(H_THREE_BLOCK_SELECTOR); + await userEvent.keyboard("{Shift>}"); + await clickAt( + secondElementBoundingBox.x + 20, + secondElementBoundingBox.y + secondElementBoundingBox.height / 2, + ); + await userEvent.keyboard("{/Shift}"); + + await userEvent.click(await waitForSelector(UNNEST_BLOCK_BUTTON_SELECTOR)); + + await sleep(350); + await clickAt( + secondElementBoundingBox.x + secondElementBoundingBox.width - 20, + secondElementBoundingBox.y + secondElementBoundingBox.height / 2, + ); + + // Waits for formatting toolbar animation to finish. + await sleep(500); + + await compareDocToSnapshot("decreaseIndentMultipleBlocks"); + }); +}); diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/arrowUpChecklistItem.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/arrowUpChecklistItem.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/backspacePreservesMarks.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/backspacePreservesMarks.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/backspacePreservesNestedBlocks.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/backspacePreservesNestedBlocks.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/backspacePreservesNestedBlocksEmpty.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/backspacePreservesNestedBlocksEmpty.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/backspaceStartOfBlock.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/backspaceStartOfBlock.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/bulletListItemInputRulePreservesContent.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/bulletListItemInputRulePreservesContent.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/bulletListItemShortcut.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/bulletListItemShortcut.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/checkListItemInputRuleCheckedPreservesContent.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/checkListItemInputRuleCheckedPreservesContent.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/checkListItemInputRulePreservesContent.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/checkListItemInputRulePreservesContent.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/checkedListItemShortcut.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/checkedListItemShortcut.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteEndOfBlock.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteEndOfBlock.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteImage.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-firefox-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteImage.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteImageChild.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-webkit-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteImageChild.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteInlineContent.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteInlineContent.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteInlineContentChild.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-firefox-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteInlineContentChild.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteMultipleChildren.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteMultipleChildren.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteNestedChildren.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-firefox-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteNestedChildren.json diff --git a/tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledelete-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteSelectedImage.json similarity index 100% rename from tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledelete-webkit-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteSelectedImage.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteSelection.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteSelection.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteShallowerBlock.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteShallowerBlock.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteShallowerBlockWithChildren.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteShallowerBlockWithChildren.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteTable.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteTable.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteTableChild.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-firefox-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/deleteTableChild.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/enterPreservesMarks.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/enterPreservesMarks.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/enterPreservesNestedBlocks.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/enterPreservesNestedBlocks.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/enterPreservesNestedBlocksEmpty.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/enterPreservesNestedBlocksEmpty.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/enterSelectionNotEmpty.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/enterSelectionNotEmpty.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/heading1Shortcut.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/heading1Shortcut.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/heading2Shortcut.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/heading2Shortcut.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/heading3Shortcut.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/heading3Shortcut.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/numberedListItemInputRulePreservesContent.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/numberedListItemInputRulePreservesContent.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/__snapshots__/numberedListItemShortcut.json similarity index 100% rename from tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-chromium-linux.json rename to tests/src/end-to-end/keyboardhandlers/__snapshots__/numberedListItemShortcut.json diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts deleted file mode 100644 index 3213e2fd65..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts +++ /dev/null @@ -1,458 +0,0 @@ -import { test } from "../../setup/setupScript.js"; -import { - BASE_URL, - H_ONE_BLOCK_SELECTOR, - ITALIC_BUTTON_SELECTOR, -} from "../../utils/const.js"; -import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.describe.configure({ mode: "serial" }); - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); -}); - -test.describe("Check Keyboard Handlers' Behaviour", () => { - test("Check Enter when selection is not empty", async ({ page }) => { - await focusOnEditor(page); - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - - await page.waitForTimeout(500); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ControlOrMeta+ArrowLeft"); - await page.keyboard.press("ArrowRight"); - await page.keyboard.down("Shift"); - await page.keyboard.press("ArrowDown"); - await page.keyboard.press("ControlOrMeta+ArrowRight"); - await page.keyboard.press("ArrowLeft"); - await page.keyboard.up("Shift"); - - await page.keyboard.press("Enter"); - - await compareDocToSnapshot(page, "enterSelectionNotEmpty.json"); - }); - test("Check Enter preserves marks", async ({ page }) => { - await focusOnEditor(page); - await insertHeading(page, 1); - - await page.waitForTimeout(500); - const element = await page.locator(H_ONE_BLOCK_SELECTOR); - const boundingBox = (await element.boundingBox())!; - const { x, y, height } = boundingBox; - - await page.mouse.click(x + 35, y + height / 2, { clickCount: 2 }); - await page.locator(ITALIC_BUTTON_SELECTOR).click(); - await page.keyboard.press("Escape"); - await page.waitForTimeout(500); - await page.keyboard.press("Control+ArrowLeft"); - await page.keyboard.press("ArrowRight"); - await page.keyboard.press("Enter"); - - await compareDocToSnapshot(page, "enterPreservesMarks.json"); - }); - test("Check Enter preserves nested blocks", async ({ page }) => { - await focusOnEditor(page); - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - await page.waitForTimeout(500); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Control+ArrowLeft"); - await page.keyboard.press("ArrowRight"); - await page.keyboard.press("Enter"); - - await compareDocToSnapshot(page, "enterPreservesNestedBlocks.json"); - }); - test("Check Enter preserves nested blocks for empty block", async ({ - page, - }) => { - await focusOnEditor(page); - await page.keyboard.press("#"); - await page.keyboard.press(" "); - await page.keyboard.press("Enter", { delay: 10 }); - await page.keyboard.press("Tab"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - await page.waitForTimeout(500); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Enter"); - - await compareDocToSnapshot(page, "enterPreservesNestedBlocksEmpty.json"); - }); - test("Check Backspace at the start of a block", async ({ page }) => { - await focusOnEditor(page); - await insertHeading(page, 1); - - await page.keyboard.press("Control+ArrowLeft"); - await page.keyboard.press("Backspace"); - - await compareDocToSnapshot(page, "backspaceStartOfBlock.json"); - }); - test("Check Backspace preserves marks", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await insertParagraph(page); - - await page.keyboard.press("Control+ArrowLeft"); - - for (let i = 0; i < 2; i++) { - await page.keyboard.press("ArrowRight"); - } - - for (let i = 0; i < 5; i++) { - await page.keyboard.press("Shift+ArrowRight"); - } - - await page.locator(ITALIC_BUTTON_SELECTOR).click(); - await page.keyboard.press("Escape"); - await page.waitForTimeout(500); - - await page.keyboard.press("ArrowLeft"); - await page.keyboard.press("Control+ArrowLeft"); - await page.keyboard.press("Backspace"); - - await compareDocToSnapshot(page, "backspacePreservesMarks.json"); - }); - test("Check Backspace preserves nested blocks", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - - for (let i = 0; i < 2; i++) { - await page.keyboard.press("ArrowUp"); - } - - await page.keyboard.press("Control+ArrowLeft"); - await page.keyboard.press("Backspace"); - - await compareDocToSnapshot(page, "backspacePreservesNestedBlocks.json"); - }); - test("Check Backspace preserves nested blocks for empty block", async ({ - page, - }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter", { delay: 10 }); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - - for (let i = 0; i < 2; i++) { - await page.keyboard.press("ArrowUp"); - } - - await page.keyboard.press("Backspace"); - - await compareDocToSnapshot( - page, - "backspacePreservesNestedBlocksEmpty.json", - ); - }); - test("Check Delete at the end of a block", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteEndOfBlock.json"); - }); - test("Check Delete while selection not empty", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - - await page.keyboard.press("Shift+ArrowLeft"); - await page.keyboard.press("Shift+ArrowLeft"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteSelection.json"); - }); - test("Check Delete before inline content block", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await insertParagraph(page); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteInlineContent.json"); - }); - test("Check Delete before image block", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await executeSlashCommand(page, "image"); - await page.keyboard.press("Escape"); // Close file panel - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteImage.json"); - }); - test("Check Delete before table", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await executeSlashCommand(page, "table"); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteTable.json"); - }); - test("Check Delete selected image block", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - await page.keyboard.press("Escape"); // Close file panel - - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteSelectedImage.json"); - }); - test("Check Delete end of block with inline content child", async ({ - page, - }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteInlineContentChild.json"); - }); - test("Check Delete end of block with image child", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await executeSlashCommand(page, "image"); - await page.keyboard.press("Escape"); // Close file panel - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteImageChild.json"); - }); - test("Check Delete end of block with table child", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await executeSlashCommand(page, "table"); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteTableChild.json"); - }); - test("Check Delete end of block with multiple children", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await insertParagraph(page); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteMultipleChildren.json"); - }); - test("Check Delete end of block with nested children", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteNestedChildren.json"); - }); - test("Check Delete before shallower block", async ({ page }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Shift+Tab"); - await insertParagraph(page); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteShallowerBlock.json"); - }); - test("Check Delete before shallower block with children", async ({ - page, - }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Shift+Tab"); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("Tab"); - await insertParagraph(page); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ControlOrMeta+ArrowLeft"); - await page.keyboard.press("ControlOrMeta+ArrowRight"); - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteShallowerBlockWithChildren.json"); - }); - test("Check heading 1 shortcut", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("ControlOrMeta+Alt+1"); - - await compareDocToSnapshot(page, "heading1Shortcut.json"); - }); - test("Check heading 2 shortcut", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("ControlOrMeta+Alt+2"); - - await compareDocToSnapshot(page, "heading2Shortcut.json"); - }); - test("Check heading 3 shortcut", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("ControlOrMeta+Alt+3"); - - await compareDocToSnapshot(page, "heading3Shortcut.json"); - }); - test("Check numbered list item shortcut", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("ControlOrMeta+Shift+7"); - - await compareDocToSnapshot(page, "numberedListItemShortcut.json"); - }); - test("Check bullet list item shortcut", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("ControlOrMeta+Shift+8"); - - await compareDocToSnapshot(page, "bulletListItemShortcut.json"); - }); - test("Check checked list item shortcut", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("ControlOrMeta+Shift+9"); - - await compareDocToSnapshot(page, "checkedListItemShortcut.json"); - }); - test("Check arrow up on checklist item moves to element above", async ({ - page, - }) => { - await focusOnEditor(page); - await insertParagraph(page); - await page.keyboard.press("Enter"); - await page.keyboard.press("ControlOrMeta+Shift+9"); - await page.keyboard.type("Checklist item"); - - await page.waitForTimeout(150); - // Move cursor to the start of the checklist item - await page.keyboard.press("Control+ArrowLeft"); - // Press arrow up - should move to the paragraph above - await page.keyboard.press("ArrowUp"); - // Type to verify cursor is in the paragraph above - await page.keyboard.type("Above"); - - await compareDocToSnapshot(page, "arrowUpChecklistItem.json"); - }); - - test("Check checkListItem inputRule preserves content", async ({ page }) => { - await focusOnEditor(page); - // Type [ ] followed by space at the start to trigger inputRule, then add content - // The inputRule should convert the paragraph to a checkListItem and preserve the content we type after - await page.keyboard.type("[ ] My task"); - await page.waitForTimeout(500); - - await compareDocToSnapshot( - page, - "checkListItemInputRulePreservesContent.json", - ); - }); - test("Check checkListItem inputRule with checked preserves content", async ({ - page, - }) => { - await focusOnEditor(page); - // Type [x] followed by space at the start to trigger inputRule with checked=true, then add content - // This should convert the paragraph to a checkListItem with checked=true and preserve the content - await page.keyboard.type("[x] Completed task"); - await page.waitForTimeout(150); - - await compareDocToSnapshot( - page, - "checkListItemInputRuleCheckedPreservesContent.json", - ); - }); - test("Check bulletListItem inputRule preserves content", async ({ page }) => { - await focusOnEditor(page); - // Type - followed by space at the start to trigger inputRule, then add content - // The inputRule should convert the paragraph to a bulletListItem and preserve the content - await page.keyboard.type("- My task"); - await page.waitForTimeout(500); - - await compareDocToSnapshot( - page, - "bulletListItemInputRulePreservesContent.json", - ); - }); - test("Check numberedListItem inputRule preserves content", async ({ - page, - }) => { - await focusOnEditor(page); - // Type 1. followed by space at the start to trigger inputRule, then add content - // The inputRule should convert the paragraph to a numberedListItem and preserve the content - await page.keyboard.type("1. My task"); - await page.waitForTimeout(500); - - await compareDocToSnapshot( - page, - "numberedListItemInputRulePreservesContent.json", - ); - }); -}); diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-firefox-linux.json deleted file mode 100644 index 3219dd5c11..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-firefox-linux.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphAbove" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": false - }, - "content": [ - { - "type": "text", - "text": "Checklist item" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-webkit-linux.json deleted file mode 100644 index 3219dd5c11..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-webkit-linux.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphAbove" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": false - }, - "content": [ - { - "type": "text", - "text": "Checklist item" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-firefox-linux.json deleted file mode 100644 index cb52f526a2..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-firefox-linux.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphPa" - }, - { - "type": "text", - "marks": [ - { - "type": "italic" - } - ], - "text": "ragra" - }, - { - "type": "text", - "text": "ph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-webkit-linux.json deleted file mode 100644 index cb52f526a2..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-webkit-linux.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphPa" - }, - { - "type": "text", - "marks": [ - { - "type": "italic" - } - ], - "text": "ragra" - }, - { - "type": "text", - "text": "ph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-firefox-linux.json deleted file mode 100644 index 3f10691703..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-firefox-linux.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-webkit-linux.json deleted file mode 100644 index 3f10691703..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-webkit-linux.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-firefox-linux.json deleted file mode 100644 index f4b7dba967..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-firefox-linux.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-webkit-linux.json deleted file mode 100644 index f4b7dba967..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-webkit-linux.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-firefox-linux.json deleted file mode 100644 index 0ab31249ca..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-webkit-linux.json deleted file mode 100644 index 0ab31249ca..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-firefox-linux.json deleted file mode 100644 index b1c5b45c75..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "My task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-webkit-linux.json deleted file mode 100644 index b1c5b45c75..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "My task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-firefox-linux.json deleted file mode 100644 index cffbd5ba01..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-webkit-linux.json deleted file mode 100644 index cffbd5ba01..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-firefox-linux.json deleted file mode 100644 index 36510e4b41..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-firefox-linux.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": true - }, - "content": [ - { - "type": "text", - "text": "Completed task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-webkit-linux.json deleted file mode 100644 index 36510e4b41..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-webkit-linux.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": true - }, - "content": [ - { - "type": "text", - "text": "Completed task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-firefox-linux.json deleted file mode 100644 index baa8395e00..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-firefox-linux.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": false - }, - "content": [ - { - "type": "text", - "text": "My task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-webkit-linux.json deleted file mode 100644 index baa8395e00..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-webkit-linux.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": false - }, - "content": [ - { - "type": "text", - "text": "My task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-firefox-linux.json deleted file mode 100644 index ab700e2d8a..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-firefox-linux.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-webkit-linux.json deleted file mode 100644 index ab700e2d8a..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-webkit-linux.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "checkListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "checked": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-webkit-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-chromium-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-chromium-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-firefox-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-webkit-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-webkit-linux.json deleted file mode 100644 index 35e3ba0c06..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-chromium-linux.json deleted file mode 100644 index 35e3ba0c06..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-chromium-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-firefox-linux.json deleted file mode 100644 index 35e3ba0c06..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-webkit-linux.json deleted file mode 100644 index 35e3ba0c06..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-webkit-linux.json deleted file mode 100644 index f27381c614..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-webkit-linux.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-chromium-linux.json deleted file mode 100644 index f27381c614..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-chromium-linux.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-firefox-linux.json deleted file mode 100644 index f27381c614..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-firefox-linux.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-webkit-linux.json deleted file mode 100644 index f27381c614..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-webkit-linux.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-chromium-linux.json deleted file mode 100644 index f56b777a4c..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-chromium-linux.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-firefox-linux.json deleted file mode 100644 index f56b777a4c..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-firefox-linux.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-webkit-linux.json deleted file mode 100644 index f56b777a4c..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-webkit-linux.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-firefox-linux.json deleted file mode 100644 index df5285cd6d..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragra" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-webkit-linux.json deleted file mode 100644 index df5285cd6d..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragra" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-firefox-linux.json deleted file mode 100644 index cd4cc5ec45..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-firefox-linux.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-webkit-linux.json deleted file mode 100644 index cd4cc5ec45..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-webkit-linux.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-firefox-linux.json deleted file mode 100644 index 33bae7f25e..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-firefox-linux.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-webkit-linux.json deleted file mode 100644 index 33bae7f25e..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-webkit-linux.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "ParagraphParagraph" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-chromium-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-chromium-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-firefox-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-webkit-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-chromium-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-chromium-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-firefox-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-webkit-linux.json deleted file mode 100644 index 6744f59493..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-firefox-linux.json deleted file mode 100644 index 341ce8c988..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-firefox-linux.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "marks": [ - { - "type": "italic" - } - ], - "text": "H" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "marks": [ - { - "type": "italic" - } - ], - "text": "eading" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-webkit-linux.json deleted file mode 100644 index 341ce8c988..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-webkit-linux.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "marks": [ - { - "type": "italic" - } - ], - "text": "H" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "marks": [ - { - "type": "italic" - } - ], - "text": "eading" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-firefox-linux.json deleted file mode 100644 index fe2cca639a..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-firefox-linux.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "H" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "eading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-webkit-linux.json deleted file mode 100644 index fe2cca639a..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-webkit-linux.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "H" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "eading" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-firefox-linux.json deleted file mode 100644 index 2bc95508b6..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-firefox-linux.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-webkit-linux.json deleted file mode 100644 index 2bc95508b6..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-webkit-linux.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - } - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - } - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Heading" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-firefox-linux.json deleted file mode 100644 index 15be5828e8..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-firefox-linux.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "H" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "g" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-webkit-linux.json deleted file mode 100644 index 15be5828e8..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-webkit-linux.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "H" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "g" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-firefox-linux.json deleted file mode 100644 index 71bec4c80d..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-firefox-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-webkit-linux.json deleted file mode 100644 index 71bec4c80d..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-webkit-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-firefox-linux.json deleted file mode 100644 index 6c3530cc0e..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-firefox-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-webkit-linux.json deleted file mode 100644 index 6c3530cc0e..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-webkit-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-firefox-linux.json deleted file mode 100644 index cb051e11ba..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-firefox-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-webkit-linux.json deleted file mode 100644 index cb051e11ba..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-webkit-linux.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-firefox-linux.json deleted file mode 100644 index 554d3a9815..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "My task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-webkit-linux.json deleted file mode 100644 index 554d3a9815..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "My task" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-firefox-linux.json deleted file mode 100644 index 679af6f8da..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-firefox-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-webkit-linux.json deleted file mode 100644 index 679af6f8da..0000000000 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-webkit-linux.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.tsx b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.tsx new file mode 100644 index 0000000000..396daa6853 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.tsx @@ -0,0 +1,436 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { MOD, userEvent } from "../../utils/context.js"; +import { + EDITOR_SELECTOR, + H_ONE_BLOCK_SELECTOR, + ITALIC_BUTTON_SELECTOR, +} from "../../utils/const.js"; +import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; +import { + compareDocToSnapshot, + focusOnEditor, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { clickAt, getRect } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Keyboard Handlers' Behaviour", () => { + test("Check Enter when selection is not empty", async () => { + await focusOnEditor(); + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + + await sleep(500); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard(`{${MOD}>}{ArrowLeft}{/${MOD}}`); + await userEvent.keyboard("{ArrowRight}"); + await userEvent.keyboard( + `{Shift>}{ArrowDown}{${MOD}>}{ArrowRight}{/${MOD}}{ArrowLeft}{/Shift}`, + ); + + await userEvent.keyboard("{Enter}"); + + await compareDocToSnapshot("enterSelectionNotEmpty"); + }); + test("Check Enter preserves marks", async () => { + await focusOnEditor(); + await insertHeading(1); + + await sleep(500); + const { x, y, height } = getRect(H_ONE_BLOCK_SELECTOR); + + await clickAt(x + 35, y + height / 2, 2); + await userEvent.click(await waitForSelector(ITALIC_BUTTON_SELECTOR)); + await userEvent.keyboard("{Escape}"); + await sleep(500); + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + await userEvent.keyboard("{ArrowRight}"); + await userEvent.keyboard("{Enter}"); + + await compareDocToSnapshot("enterPreservesMarks"); + }); + test("Check Enter preserves nested blocks", async () => { + await focusOnEditor(); + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + await sleep(500); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + await userEvent.keyboard("{ArrowRight}"); + await userEvent.keyboard("{Enter}"); + + await compareDocToSnapshot("enterPreservesNestedBlocks"); + }); + test("Check Enter preserves nested blocks for empty block", async () => { + await focusOnEditor(); + await userEvent.keyboard("#"); + await userEvent.keyboard(" "); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + await sleep(500); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Enter}"); + + await compareDocToSnapshot("enterPreservesNestedBlocksEmpty"); + }); + test("Check Backspace at the start of a block", async () => { + await focusOnEditor(); + await insertHeading(1); + + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + await userEvent.keyboard("{Backspace}"); + + await compareDocToSnapshot("backspaceStartOfBlock"); + }); + test("Check Backspace preserves marks", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + + for (let i = 0; i < 2; i++) { + await userEvent.keyboard("{ArrowRight}"); + } + + for (let i = 0; i < 5; i++) { + await userEvent.keyboard("{Shift>}{ArrowRight}{/Shift}"); + } + + await userEvent.click(await waitForSelector(ITALIC_BUTTON_SELECTOR)); + await userEvent.keyboard("{Escape}"); + await sleep(500); + + await userEvent.keyboard("{ArrowLeft}"); + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + await userEvent.keyboard("{Backspace}"); + + await compareDocToSnapshot("backspacePreservesMarks"); + }); + test("Check Backspace preserves nested blocks", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + + for (let i = 0; i < 2; i++) { + await userEvent.keyboard("{ArrowUp}"); + } + + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + await userEvent.keyboard("{Backspace}"); + + await compareDocToSnapshot("backspacePreservesNestedBlocks"); + }); + test("Check Backspace preserves nested blocks for empty block", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + + for (let i = 0; i < 2; i++) { + await userEvent.keyboard("{ArrowUp}"); + } + + await userEvent.keyboard("{Backspace}"); + + await compareDocToSnapshot("backspacePreservesNestedBlocksEmpty"); + }); + test("Check Delete at the end of a block", async () => { + await focusOnEditor(); + await insertParagraph(); + + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteEndOfBlock"); + }); + test("Check Delete while selection not empty", async () => { + await focusOnEditor(); + await insertParagraph(); + + // Hold Shift across BOTH ArrowLefts in a single keyboard call so the + // selection actually extends to 2 characters. Splitting into two calls + // releases Shift between them, leaving a 1-char selection and producing + // the wrong doc. + await userEvent.keyboard("{Shift>}{ArrowLeft}{ArrowLeft}{/Shift}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteSelection"); + }); + test("Check Delete before inline content block", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteInlineContent"); + }); + test("Check Delete before image block", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("image"); + await userEvent.keyboard("{Escape}"); // Close file panel + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteImage"); + }); + test("Check Delete before table", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await executeSlashCommand("table"); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteTable"); + }); + test("Check Delete selected image block", async () => { + await focusOnEditor(); + await executeSlashCommand("image"); + await userEvent.keyboard("{Escape}"); // Close file panel + + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteSelectedImage"); + }); + test("Check Delete end of block with inline content child", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteInlineContentChild"); + }); + test("Check Delete end of block with image child", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await executeSlashCommand("image"); + await userEvent.keyboard("{Escape}"); // Close file panel + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteImageChild"); + }); + test("Check Delete end of block with table child", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await executeSlashCommand("table"); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteTableChild"); + }); + test("Check Delete end of block with multiple children", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await insertParagraph(); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteMultipleChildren"); + }); + test("Check Delete end of block with nested children", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteNestedChildren"); + }); + test("Check Delete before shallower block", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Shift>}{Tab}{/Shift}"); + await insertParagraph(); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteShallowerBlock"); + }); + test("Check Delete before shallower block with children", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Shift>}{Tab}{/Shift}"); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await insertParagraph(); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard(`{${MOD}>}{ArrowLeft}{/${MOD}}`); + await userEvent.keyboard(`{${MOD}>}{ArrowRight}{/${MOD}}`); + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteShallowerBlockWithChildren"); + }); + test("Check heading 1 shortcut", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard(`{${MOD}>}{Alt>}1{/Alt}{/${MOD}}`); + + await compareDocToSnapshot("heading1Shortcut"); + }); + test("Check heading 2 shortcut", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard(`{${MOD}>}{Alt>}2{/Alt}{/${MOD}}`); + + await compareDocToSnapshot("heading2Shortcut"); + }); + test("Check heading 3 shortcut", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard(`{${MOD}>}{Alt>}3{/Alt}{/${MOD}}`); + + await compareDocToSnapshot("heading3Shortcut"); + }); + test("Check numbered list item shortcut", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard(`{${MOD}>}{Shift>}7{/Shift}{/${MOD}}`); + + await compareDocToSnapshot("numberedListItemShortcut"); + }); + test("Check bullet list item shortcut", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard(`{${MOD}>}{Shift>}8{/Shift}{/${MOD}}`); + + await compareDocToSnapshot("bulletListItemShortcut"); + }); + test("Check checked list item shortcut", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard(`{${MOD}>}{Shift>}9{/Shift}{/${MOD}}`); + + await compareDocToSnapshot("checkedListItemShortcut"); + }); + test("Check arrow up on checklist item moves to element above", async () => { + await focusOnEditor(); + await insertParagraph(); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard(`{${MOD}>}{Shift>}9{/Shift}{/${MOD}}`); + await userEvent.keyboard("Checklist item"); + + await sleep(150); + // Move cursor to the start of the checklist item + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + // Press arrow up - should move to the paragraph above + await userEvent.keyboard("{ArrowUp}"); + // Type to verify cursor is in the paragraph above + await userEvent.keyboard("Above"); + + await compareDocToSnapshot("arrowUpChecklistItem"); + }); + + test("Check checkListItem inputRule preserves content", async () => { + await focusOnEditor(); + // Type [ ] followed by space at the start to trigger inputRule, then add content + // The inputRule should convert the paragraph to a checkListItem and preserve the content we type after + await userEvent.keyboard("[[ ] My task"); + await sleep(500); + + await compareDocToSnapshot("checkListItemInputRulePreservesContent"); + }); + test("Check checkListItem inputRule with checked preserves content", async () => { + await focusOnEditor(); + // Type [x] followed by space at the start to trigger inputRule with checked=true, then add content + // This should convert the paragraph to a checkListItem with checked=true and preserve the content + await userEvent.keyboard("[[x] Completed task"); + await sleep(150); + + await compareDocToSnapshot("checkListItemInputRuleCheckedPreservesContent"); + }); + test("Check bulletListItem inputRule preserves content", async () => { + await focusOnEditor(); + // Type - followed by space at the start to trigger inputRule, then add content + // The inputRule should convert the paragraph to a bulletListItem and preserve the content + await userEvent.keyboard("- My task"); + await sleep(500); + + await compareDocToSnapshot("bulletListItemInputRulePreservesContent"); + }); + test("Check numberedListItem inputRule preserves content", async () => { + await focusOnEditor(); + // Type 1. followed by space at the start to trigger inputRule, then add content + // The inputRule should convert the paragraph to a numberedListItem and preserve the content + await userEvent.keyboard("1. My task"); + await sleep(500); + + await compareDocToSnapshot("numberedListItemInputRulePreservesContent"); + }); +}); diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/__snapshots__/deleteBeforeColumn.json similarity index 100% rename from tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-chromium-linux.json rename to tests/src/end-to-end/multicolumn/__snapshots__/deleteBeforeColumn.json diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/__snapshots__/deleteBeforeColumnList.json similarity index 100% rename from tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-chromium-linux.json rename to tests/src/end-to-end/multicolumn/__snapshots__/deleteBeforeColumnList.json diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/__snapshots__/deleteBeforeColumnWithSingleBlock.json similarity index 100% rename from tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-chromium-linux.json rename to tests/src/end-to-end/multicolumn/__snapshots__/deleteBeforeColumnWithSingleBlock.json diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/__snapshots__/deleteEndOfColumnList.json similarity index 100% rename from tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-chromium-linux.json rename to tests/src/end-to-end/multicolumn/__snapshots__/deleteEndOfColumnList.json diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts b/tests/src/end-to-end/multicolumn/multicolumn.test.ts deleted file mode 100644 index 2ad46fa1d9..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { test } from "../../setup/setupScript.js"; -import { MULTI_COLUMN_URL } from "../../utils/const.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; - -test.describe.configure({ mode: "serial" }); - -test.beforeEach(async ({ page }) => { - await page.goto(MULTI_COLUMN_URL); -}); - -test.describe("Check Multi-Column Behaviour", () => { - test("Check Delete before column", async ({ page }) => { - await focusOnEditor(page); - - await page - // eslint-disable-next-line testing-library/prefer-screen-queries - .getByText("You can have multiple blocks in a column too") - .click({ position: { x: 1, y: 1 } }); - await page.keyboard.press("ArrowLeft"); - - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteBeforeColumn.json"); - }); - test("Check Delete before column with single block", async ({ page }) => { - await focusOnEditor(page); - - await page.locator(".bn-block-column").first().click(); - - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteBeforeColumnWithSingleBlock.json"); - }); - test("Check Delete before column list", async ({ page }) => { - await focusOnEditor(page); - - await page.locator(".bn-block-content").first().click(); - - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteBeforeColumnList.json"); - }); - test("Check Delete end of column list", async ({ page }) => { - await focusOnEditor(page); - - await page.locator(".bn-trailing-block").click(); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("ControlOrMeta+ArrowLeft"); - await page.keyboard.press("ArrowLeft"); - - await page.keyboard.press("Delete"); - - await compareDocToSnapshot(page, "deleteEndOfColumnList.json"); - }); -}); diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-firefox-linux.json deleted file mode 100644 index d12517aed8..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-firefox-linux.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "2", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "4", - "width": 1.4 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-webkit-linux.json deleted file mode 100644 index d12517aed8..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-webkit-linux.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "2", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "4", - "width": 1.4 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-firefox-linux.json deleted file mode 100644 index fa14a7cf41..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-firefox-linux.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "4", - "width": 1.4 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-webkit-linux.json deleted file mode 100644 index fa14a7cf41..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-webkit-linux.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "4", - "width": 1.4 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-firefox-linux.json deleted file mode 100644 index 439fe63047..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-firefox-linux.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "2", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-webkit-linux.json deleted file mode 100644 index 439fe63047..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-webkit-linux.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "2", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-firefox-linux.json deleted file mode 100644 index d9b5ae20a3..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-firefox-linux.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "2", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "4", - "width": 1.4 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "11" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-webkit-linux.json deleted file mode 100644 index d9b5ae20a3..0000000000 --- a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-webkit-linux.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Welcome to this demo!" - } - ] - } - ] - }, - { - "type": "columnList", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "column", - "attrs": { - "id": "2", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This paragraph is in a column!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "4", - "width": 1.4 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "So is this heading!" - } - ] - } - ] - } - ] - }, - { - "type": "column", - "attrs": { - "id": "6", - "width": 0.8 - }, - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "7" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "You can have multiple blocks in a column too" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "8" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "9" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 2" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "10" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Block 3" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "11" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "Paragraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.tsx b/tests/src/end-to-end/multicolumn/multicolumn.test.tsx new file mode 100644 index 0000000000..a01dd6e771 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.tsx @@ -0,0 +1,63 @@ +import App from "@examples/01-basic/03-multi-column/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { MOD, page, userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { + compareDocToSnapshot, + focusOnEditor, + waitForSelector, +} from "../../utils/editor.js"; +import { clickAt, getRect } from "../../utils/mouse.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Multi-Column Behaviour", () => { + test("Check Delete before column", async () => { + await focusOnEditor(); + + const target = page + .getByText("You can have multiple blocks in a column too") + .element(); + const targetRect = getRect(target); + await clickAt(targetRect.x + 1, targetRect.y + 1); + await userEvent.keyboard("{ArrowLeft}"); + + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteBeforeColumn"); + }); + test("Check Delete before column with single block", async () => { + await focusOnEditor(); + + await userEvent.click(await waitForSelector(".bn-block-column")); + + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteBeforeColumnWithSingleBlock"); + }); + test("Check Delete before column list", async () => { + await focusOnEditor(); + + await userEvent.click(await waitForSelector(".bn-block-content")); + + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteBeforeColumnList"); + }); + test("Check Delete end of column list", async () => { + await focusOnEditor(); + + await userEvent.click(await waitForSelector(".bn-trailing-block")); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard(`{${MOD}>}{ArrowLeft}{/${MOD}}`); + await userEvent.keyboard("{ArrowLeft}"); + + await userEvent.keyboard("{Delete}"); + + await compareDocToSnapshot("deleteEndOfColumnList"); + }); +}); diff --git a/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-chromium-linux.png b/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-chromium-linux.png new file mode 100644 index 0000000000..91a1b182cc Binary files /dev/null and b/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-chromium-linux.png differ diff --git a/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-firefox-linux.png b/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-firefox-linux.png new file mode 100644 index 0000000000..7e0301a680 Binary files /dev/null and b/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-firefox-linux.png differ diff --git a/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-webkit-linux.png b/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-webkit-linux.png new file mode 100644 index 0000000000..6224d25d7b Binary files /dev/null and b/tests/src/end-to-end/placeholder/__screenshots__/placeholder.test.tsx/initial-placeholder-webkit-linux.png differ diff --git a/tests/src/end-to-end/placeholder/placeholder.test.ts b/tests/src/end-to-end/placeholder/placeholder.test.ts deleted file mode 100644 index 79fe753fd1..0000000000 --- a/tests/src/end-to-end/placeholder/placeholder.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { BASE_URL, EDITOR_SELECTOR } from "../../utils/const.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); -}); - -test.describe("Basic placeholder functionality", () => { - test("should show placeholder on load", async ({ page }) => { - // const editor = await page.waitForSelector("[data-test='editor']"); - await page - .locator(EDITOR_SELECTOR + " div") - .nth(3) - .hover(); - - // TODO: doesn't work. No way to access text of ::before element? - // expect(await editor.textContent()).toBe( - // "Enter text or type '/' for commands" - // ); - await new Promise((r) => setTimeout(r, 1000)); - expect(await page.screenshot()).toMatchSnapshot("initial-placeholder.png"); - }); -}); diff --git a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-chromium-darwin.png b/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-chromium-darwin.png deleted file mode 100644 index 0db1f521f8..0000000000 Binary files a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-chromium-darwin.png and /dev/null differ diff --git a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-chromium-linux.png b/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-chromium-linux.png deleted file mode 100644 index 30fbfb2686..0000000000 Binary files a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-firefox-darwin.png b/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-firefox-darwin.png deleted file mode 100644 index dcd2acd425..0000000000 Binary files a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-firefox-darwin.png and /dev/null differ diff --git a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-firefox-linux.png b/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-firefox-linux.png deleted file mode 100644 index ca5f86c61b..0000000000 Binary files a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-webkit-darwin.png b/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-webkit-darwin.png deleted file mode 100644 index 64751fd2b1..0000000000 Binary files a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-webkit-darwin.png and /dev/null differ diff --git a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-webkit-linux.png b/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-webkit-linux.png deleted file mode 100644 index 50318e79d1..0000000000 Binary files a/tests/src/end-to-end/placeholder/placeholder.test.ts-snapshots/initial-placeholder-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/placeholder/placeholder.test.tsx b/tests/src/end-to-end/placeholder/placeholder.test.tsx new file mode 100644 index 0000000000..3c85b73cf8 --- /dev/null +++ b/tests/src/end-to-end/placeholder/placeholder.test.tsx @@ -0,0 +1,26 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { expectElement, sleep, waitForSelector } from "../../utils/editor.js"; +import { moveMouseOverElement } from "../../utils/mouse.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Basic placeholder functionality", () => { + test("should show placeholder on load", async () => { + await moveMouseOverElement( + document.querySelectorAll(`${EDITOR_SELECTOR} div`)[3] as HTMLElement, + ); + + // TODO: doesn't work. No way to access text of ::before element? + // expect(editor.textContent).toBe( + // "Enter text or type '/' for commands" + // ); + await sleep(1000); + await expectElement(document.body).toMatchScreenshot("initial-placeholder"); + }); +}); diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-chromium-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-chromium-linux.png new file mode 100644 index 0000000000..e85b090811 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-firefox-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-firefox-linux.png new file mode 100644 index 0000000000..18af9a9127 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-webkit-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-webkit-linux.png new file mode 100644 index 0000000000..cac04b4026 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-drag-handle-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-chromium-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-chromium-linux.png new file mode 100644 index 0000000000..e7ba13ee46 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-firefox-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-firefox-linux.png new file mode 100644 index 0000000000..7d9574bbba Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-webkit-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-webkit-linux.png new file mode 100644 index 0000000000..ea9097c69e Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-emoji-picker-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-chromium-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-chromium-linux.png new file mode 100644 index 0000000000..c9582d8542 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-firefox-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-firefox-linux.png new file mode 100644 index 0000000000..395e7f394d Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-webkit-linux.png new file mode 100644 index 0000000000..2eda907576 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-formatting-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-chromium-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-chromium-linux.png new file mode 100644 index 0000000000..7643c0ab30 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-firefox-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-firefox-linux.png new file mode 100644 index 0000000000..fdacc22113 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-webkit-linux.png new file mode 100644 index 0000000000..065b092fb1 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-image-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-chromium-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-chromium-linux.png new file mode 100644 index 0000000000..58ddcde796 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-firefox-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-firefox-linux.png new file mode 100644 index 0000000000..ee7dcc68e2 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-webkit-linux.png new file mode 100644 index 0000000000..4afb4bfd80 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-link-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-chromium-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-chromium-linux.png new file mode 100644 index 0000000000..e25f8ebc4c Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-firefox-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-firefox-linux.png new file mode 100644 index 0000000000..97b3c65019 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-webkit-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-webkit-linux.png new file mode 100644 index 0000000000..a46febd0b6 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-side-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-chromium-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-chromium-linux.png new file mode 100644 index 0000000000..fdd4879ee3 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-firefox-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-firefox-linux.png new file mode 100644 index 0000000000..8c9aeb3b88 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-webkit-linux.png b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-webkit-linux.png new file mode 100644 index 0000000000..c850876292 Binary files /dev/null and b/tests/src/end-to-end/shadcn/__screenshots__/shadcn.test.tsx/shadcn-slash-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts b/tests/src/end-to-end/shadcn/shadcn.test.ts deleted file mode 100644 index fe1a2e385f..0000000000 --- a/tests/src/end-to-end/shadcn/shadcn.test.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - DRAG_HANDLE_SELECTOR, - LINK_BUTTON_SELECTOR, - PARAGRAPH_SELECTOR, - SHADCN_URL, -} from "../../utils/const.js"; -import { focusOnEditor } from "../../utils/editor.js"; -import { moveMouseOverElement } from "../../utils/mouse.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(SHADCN_URL); -}); - -test.describe("Check ShadCN UI", () => { - test("Check formatting toolbar", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("Shift+Home"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot( - "shadcn-formatting-toolbar.png", - ); - }); - test("Check link toolbar", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("Shift+Home"); - - await page.waitForSelector(LINK_BUTTON_SELECTOR); - await page.click(LINK_BUTTON_SELECTOR, { position: { x: 5, y: 5 } }); - - await page.keyboard.type("link"); - await page.keyboard.press("Enter"); - await page.waitForTimeout(500); - await page.keyboard.press("ArrowLeft"); - await page.keyboard.press("ArrowRight"); - - await page.waitForTimeout(700); - expect(await page.screenshot()).toMatchSnapshot("shadcn-link-toolbar.png"); - }); - test("Check slash menu", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.press("/"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("shadcn-slash-menu.png"); - }); - test("Check emoji picker", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.press(":"); - await page.keyboard.type("sm"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("shadcn-emoji-picker.png"); - }); - test("Check side menu", async ({ page }) => { - await focusOnEditor(page); - await page.waitForSelector(PARAGRAPH_SELECTOR); - await moveMouseOverElement(page, page.locator(PARAGRAPH_SELECTOR)); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("shadcn-side-menu.png"); - }); - test("Check drag handle menu", async ({ page }) => { - await focusOnEditor(page); - await page.waitForSelector(PARAGRAPH_SELECTOR); - await moveMouseOverElement(page, page.locator(PARAGRAPH_SELECTOR)); - - await page.waitForTimeout(500); - await page.waitForSelector(DRAG_HANDLE_SELECTOR); - await moveMouseOverElement(page, page.locator(DRAG_HANDLE_SELECTOR)); - await page.mouse.down(); - await page.mouse.up(); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot( - "shadcn-drag-handle-menu.png", - ); - }); - test("Check image toolbar", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("shadcn-image-toolbar.png"); - }); -}); diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-chromium-linux.png deleted file mode 100644 index 73e9edbfcc..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-firefox-linux.png deleted file mode 100644 index d2e513b1e7..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-webkit-linux.png deleted file mode 100644 index b46604784c..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-drag-handle-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-chromium-linux.png deleted file mode 100644 index 1b5e0f7bc2..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-firefox-linux.png deleted file mode 100644 index 39fb731d23..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-webkit-linux.png deleted file mode 100644 index c087f1e2c7..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-emoji-picker-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-chromium-linux.png deleted file mode 100644 index daf78ebeae..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-firefox-linux.png deleted file mode 100644 index a64b1c1da0..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-webkit-linux.png deleted file mode 100644 index 8c28457cb7..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-formatting-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-chromium-linux.png deleted file mode 100644 index d0ded3650b..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-firefox-linux.png deleted file mode 100644 index ea2b3dcdd4..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png deleted file mode 100644 index dfad9e8123..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-chromium-linux.png deleted file mode 100644 index e575209417..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-firefox-linux.png deleted file mode 100644 index b189d72a30..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-webkit-linux.png deleted file mode 100644 index 1f2da97909..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-link-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-chromium-linux.png deleted file mode 100644 index 9d6184cabb..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-firefox-linux.png deleted file mode 100644 index 9603953080..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-webkit-linux.png deleted file mode 100644 index 9a96c88e30..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-side-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-chromium-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-chromium-linux.png deleted file mode 100644 index a8092107da..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-firefox-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-firefox-linux.png deleted file mode 100644 index 2d8d62515d..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-webkit-linux.png b/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-webkit-linux.png deleted file mode 100644 index 8d118038d6..0000000000 Binary files a/tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-slash-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/shadcn/shadcn.test.tsx b/tests/src/end-to-end/shadcn/shadcn.test.tsx new file mode 100644 index 0000000000..72790a8845 --- /dev/null +++ b/tests/src/end-to-end/shadcn/shadcn.test.tsx @@ -0,0 +1,110 @@ +import App from "@examples/01-basic/09-shadcn/src/App"; +// The shadcn example's `main.tsx` (which we don't load in tests) imports this +// to bootstrap Tailwind v4 + the ShadCN theme variables. Without it the +// ShadCN UI components render unstyled (no popovers, no borders, no theme). +import "@examples/01-basic/09-shadcn/tailwind.css"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { + DRAG_HANDLE_SELECTOR, + EDITOR_SELECTOR, + LINK_BUTTON_SELECTOR, + PARAGRAPH_SELECTOR, +} from "../../utils/const.js"; +import { + focusOnEditor, + expectElement, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { + clickAt, + getRect, + mouseSequence, + moveMouseOverElement, +} from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check ShadCN UI", () => { + test("Check formatting toolbar", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard("{Shift>}{Home}{/Shift}"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "shadcn-formatting-toolbar", + ); + }); + test("Check link toolbar", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard("{Shift>}{Home}{/Shift}"); + + const linkButton = await waitForSelector(LINK_BUTTON_SELECTOR); + const linkButtonRect = getRect(linkButton); + await clickAt(linkButtonRect.x + 5, linkButtonRect.y + 5); + + await userEvent.keyboard("link"); + await userEvent.keyboard("{Enter}"); + await sleep(500); + await userEvent.keyboard("{ArrowLeft}"); + await userEvent.keyboard("{ArrowRight}"); + + await sleep(700); + await expectElement(document.body).toMatchScreenshot("shadcn-link-toolbar"); + }); + test("Check slash menu", async () => { + await focusOnEditor(); + await userEvent.keyboard("/"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("shadcn-slash-menu"); + }); + test("Check emoji picker", async () => { + await focusOnEditor(); + await userEvent.keyboard(":"); + await userEvent.keyboard("sm"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("shadcn-emoji-picker"); + }); + test("Check side menu", async () => { + await focusOnEditor(); + await waitForSelector(PARAGRAPH_SELECTOR); + await moveMouseOverElement(PARAGRAPH_SELECTOR); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("shadcn-side-menu"); + }); + test("Check drag handle menu", async () => { + await focusOnEditor(); + await waitForSelector(PARAGRAPH_SELECTOR); + await moveMouseOverElement(PARAGRAPH_SELECTOR); + + await sleep(500); + await waitForSelector(DRAG_HANDLE_SELECTOR); + await moveMouseOverElement(DRAG_HANDLE_SELECTOR); + await mouseSequence([{ type: "down" }, { type: "up" }]); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "shadcn-drag-handle-menu", + ); + }); + test("Check image toolbar", async () => { + await focusOnEditor(); + await executeSlashCommand("image"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "shadcn-image-toolbar", + ); + }); +}); diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-chromium-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-chromium-linux.png new file mode 100644 index 0000000000..069912778f Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-chromium-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-firefox-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-firefox-linux.png new file mode 100644 index 0000000000..f07ab46609 Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-firefox-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-webkit-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-webkit-linux.png new file mode 100644 index 0000000000..daef374b8b Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_end_product-webkit-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-chromium-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-chromium-linux.png new file mode 100644 index 0000000000..e1efe0e03c Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-chromium-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-firefox-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-firefox-linux.png new file mode 100644 index 0000000000..dafa559cc4 Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-firefox-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-webkit-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-webkit-linux.png new file mode 100644 index 0000000000..6d1de2ca1c Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_down-webkit-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-chromium-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-chromium-linux.png new file mode 100644 index 0000000000..b647cc183f Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-chromium-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-firefox-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-firefox-linux.png new file mode 100644 index 0000000000..a55c42d12a Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-firefox-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-webkit-linux.png b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-webkit-linux.png new file mode 100644 index 0000000000..30b8af8814 Binary files /dev/null and b/tests/src/end-to-end/slashmenu/__screenshots__/slashmenu.test.tsx/slash_menu_page_up-webkit-linux.png differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-chromium-linux.json b/tests/src/end-to-end/slashmenu/__snapshots__/docStructureSnapshot.json similarity index 100% rename from tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-chromium-linux.json rename to tests/src/end-to-end/slashmenu/__snapshots__/docStructureSnapshot.json diff --git a/tests/src/end-to-end/slashmenu/slashmenu-customblock.test.ts b/tests/src/end-to-end/slashmenu/slashmenu-customblock.test.ts deleted file mode 100644 index 55aef164bc..0000000000 --- a/tests/src/end-to-end/slashmenu/slashmenu-customblock.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { ALERT_BLOCK_URL, SLASH_MENU_SELECTOR } from "../../utils/const.js"; - -// Regression test for https://github.com/TypeCellOS/BlockNote/issues/2531 -// The slash menu should open when "/" is typed after a space inside a custom -// block (isolating: true, separate contentDOM). Previously the menu failed to -// open in this scenario. -test.describe("Slash menu in custom (alert) block – issue #2531", () => { - test.beforeEach(async ({ page }) => { - await page.goto(ALERT_BLOCK_URL); - await page.waitForSelector(".bn-editor"); - }); - - test("opens slash menu when / is typed at end of alert block content (no preceding space)", async ({ - page, - }) => { - // Click into the editable content area of the alert block - const alertContent = page - .locator('[data-content-type="alert"]') - .first() - .locator(".bn-inline-content"); - await alertContent.click(); - await page.keyboard.press("End"); - - await page.keyboard.type("/"); - await expect(page.locator(SLASH_MENU_SELECTOR)).toBeVisible(); - }); - - test("opens slash menu when / is typed after a space inside alert block (the regression)", async ({ - page, - }) => { - // Click into the editable content area of the alert block - const alertContent = page - .locator('[data-content-type="alert"]') - .first() - .locator(".bn-inline-content"); - await alertContent.click(); - await page.keyboard.press("End"); - - // Type a space first — this is the scenario that broke the menu - await page.keyboard.type(" "); - await page.keyboard.type("/"); - await expect(page.locator(SLASH_MENU_SELECTOR)).toBeVisible(); - }); -}); diff --git a/tests/src/end-to-end/slashmenu/slashmenu-customblock.test.tsx b/tests/src/end-to-end/slashmenu/slashmenu-customblock.test.tsx new file mode 100644 index 0000000000..22d204b028 --- /dev/null +++ b/tests/src/end-to-end/slashmenu/slashmenu-customblock.test.tsx @@ -0,0 +1,57 @@ +import App from "@examples/06-custom-schema/01-alert-block/src/App"; +import { beforeEach, describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR, SLASH_MENU_SELECTOR } from "../../utils/const.js"; +import { waitForSelector } from "../../utils/editor.js"; + +// `expect.element` is augmented against the bare `vitest` module, but vite-plus +// types `expect` from an internal module, so the augmentation doesn't attach. +// Type the accessor locally. +type ElementMatchers = { + toBeVisible(): Promise; + not: { toBeVisible(): Promise }; +}; +type ElementExpect = (element: Element | null) => ElementMatchers; +const expectElement = (expect as unknown as { element: ElementExpect }).element; + +// Regression test for https://github.com/TypeCellOS/BlockNote/issues/2531 +// The slash menu should open when "/" is typed after a space inside a custom +// block (isolating: true, separate contentDOM). Previously the menu failed to +// open in this scenario. +describe("Slash menu in custom (alert) block – issue #2531", () => { + beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + }); + + test("opens slash menu when / is typed at end of alert block content (no preceding space)", async () => { + // Click into the editable content area of the alert block + const alertContent = document.querySelector( + '[data-content-type="alert"] .bn-inline-content', + ) as HTMLElement; + await userEvent.click(alertContent); + await userEvent.keyboard("{End}"); + + await userEvent.keyboard("/"); + await expectElement( + await waitForSelector(SLASH_MENU_SELECTOR), + ).toBeVisible(); + }); + + test("opens slash menu when / is typed after a space inside alert block (the regression)", async () => { + // Click into the editable content area of the alert block + const alertContent = document.querySelector( + '[data-content-type="alert"] .bn-inline-content', + ) as HTMLElement; + await userEvent.click(alertContent); + await userEvent.keyboard("{End}"); + + // Type a space first — this is the scenario that broke the menu + await userEvent.keyboard(" "); + await userEvent.keyboard("/"); + await expectElement( + await waitForSelector(SLASH_MENU_SELECTOR), + ).toBeVisible(); + }); +}); diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts b/tests/src/end-to-end/slashmenu/slashmenu.test.ts deleted file mode 100644 index 53bf6febbb..0000000000 --- a/tests/src/end-to-end/slashmenu/slashmenu.test.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - BASE_URL, - BLOCK_CONTAINER_SELECTOR, - BLOCK_GROUP_SELECTOR, - BULLET_LIST_SELECTOR, - H_ONE_BLOCK_SELECTOR, - H_THREE_BLOCK_SELECTOR, - H_TWO_BLOCK_SELECTOR, - NUMBERED_LIST_SELECTOR, - TYPE_DELAY, -} from "../../utils/const.js"; -import { - compareDocToSnapshot, - focusOnEditor, - waitForSelectorInEditor, -} from "../../utils/editor.js"; -import { executeSlashCommand, openSlashMenu } from "../../utils/slashmenu.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); -}); - -test.describe("Check SlashMenu Functionality", () => { - test("should show slash menu when / is typed", async ({ page }) => { - await focusOnEditor(page); - await openSlashMenu(page); - }); - test("Should be able to use PageUp/Down to navigate", async ({ page }) => { - await focusOnEditor(page); - await openSlashMenu(page); - await page.waitForTimeout(500); - await page.keyboard.press("PageDown"); - expect(await page.screenshot()).toMatchSnapshot("slash_menu_page_down.png"); - await page.keyboard.press("PageUp"); - expect(await page.screenshot()).toMatchSnapshot("slash_menu_page_up.png"); - }); - test("Should be able to create h1", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "h1"); - await page.keyboard.type("This is a H1"); - await waitForSelectorInEditor(page, H_ONE_BLOCK_SELECTOR); - }); - test("Should be able to create h2", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("This is a H2"); - await waitForSelectorInEditor(page, H_TWO_BLOCK_SELECTOR); - }); - test("Should be able to create h3", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "h3"); - await page.keyboard.type("This is a H3"); - await waitForSelectorInEditor(page, H_THREE_BLOCK_SELECTOR); - }); - test("Should be able to create numbered list", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "numbered"); - await page.keyboard.type("This is a numbered list"); - await waitForSelectorInEditor(page, NUMBERED_LIST_SELECTOR); - }); - test("Should be able to create bullet list", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "bullet"); - await page.keyboard.type("This is a bullet list"); - await waitForSelectorInEditor(page, BULLET_LIST_SELECTOR); - }); - test("Should be able to create paragraph", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "paragraph"); - await page.keyboard.type("This is a Paragraph"); - const block = page.locator(BLOCK_CONTAINER_SELECTOR).nth(0); - const blockHeadingType = await block.getAttribute("data-heading-type"); - expect(blockHeadingType).toBeFalsy(); - }); - test("Should add block as sibling of current block if block has content", async ({ - page, - }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "h1"); - await page.keyboard.type("Hello"); - await executeSlashCommand(page, "h2"); - // If done correctly all blocks should be in the same block group - // resulting in a total of 1 block group. - const blockGroupCount = await page.locator(BLOCK_GROUP_SELECTOR).count(); - expect(blockGroupCount).toBe(1); - }); - test("Should add new block after current blocks children", async ({ - page, - }) => { - // BLOCK_A /(create Block_C) - // BLOCK_B - // - // When adding a new block after Block_A, it should be added - // As a sibling of Block_A, beneath it - // - // BLOCK_A - // BLOCK_B - // BLOCK_C - await focusOnEditor(page); - await page.keyboard.type("A"); - await page.keyboard.press("Enter", { delay: TYPE_DELAY }); - await page.keyboard.press("Tab", { delay: TYPE_DELAY }); - await page.keyboard.type("B"); - await page.keyboard.press("ArrowUp", { delay: TYPE_DELAY }); - await executeSlashCommand(page, "h1"); - await page.waitForSelector(H_ONE_BLOCK_SELECTOR); - // If done correctly there should be a total on 2 block groups - // a total of 3 blocks and the 3rd block should have no blockgroup - // and BLOCK_A should have one child - const blockGroupCount = await page.locator(BLOCK_GROUP_SELECTOR).count(); - expect(blockGroupCount).toBe(2); - const blockCount = await page.locator(BLOCK_CONTAINER_SELECTOR).count(); - expect(blockCount).toBe(3); - const thirdBlock = page.locator(BLOCK_CONTAINER_SELECTOR).nth(2); - await thirdBlock - .locator(BLOCK_GROUP_SELECTOR) - .waitFor({ state: "detached" }); - const firstBlock = page.locator(BLOCK_CONTAINER_SELECTOR).nth(0); - const firstBlockChildren = await firstBlock - .locator(BLOCK_CONTAINER_SELECTOR) - .count(); - expect(firstBlockChildren).toBe(1); - }); - test("Should be able to create complex documents that match snapshots", async ({ - page, - }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "h1"); - await page.keyboard.type("This is a h1"); - await executeSlashCommand(page, "h2"); - await page.keyboard.type("This is a h2"); - await page.keyboard.press("Enter", { delay: TYPE_DELAY }); - await page.keyboard.press("Tab", { delay: TYPE_DELAY }); - await executeSlashCommand(page, "h3"); - await page.keyboard.type("This is a h3"); - await executeSlashCommand(page, "paragraph"); - await page.keyboard.type("This is a paragraph"); - await page.keyboard.press("Tab", { delay: TYPE_DELAY }); - await page.keyboard.press("ArrowUp", { delay: TYPE_DELAY }); - await executeSlashCommand(page, "numbered"); - await page.keyboard.type("This is"); - await page.keyboard.press("Enter", { delay: TYPE_DELAY }); - await page.keyboard.type("a numbered list"); - await executeSlashCommand(page, "bullet"); - await page.keyboard.type("And this is a bullet list"); - await page.waitForTimeout(1000); - // Compare doc object snapshot - await compareDocToSnapshot(page, "docStructureSnapshot"); - // Compare editor screenshot - expect(await page.screenshot()).toMatchSnapshot( - "slash_menu_end_product.png", - ); - }); -}); diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-firefox-linux.json b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-firefox-linux.json deleted file mode 100644 index f7203b9fb9..0000000000 --- a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-firefox-linux.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is a h1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is a h2" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is a h3" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This is a paragraph" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "4" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This is" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "a numbered list" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "And this is a bullet list" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-webkit-linux.json b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-webkit-linux.json deleted file mode 100644 index f7203b9fb9..0000000000 --- a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-webkit-linux.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 1, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is a h1" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "1" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 2, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is a h2" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "2" - }, - "content": [ - { - "type": "heading", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left", - "level": 3, - "isToggleable": false - }, - "content": [ - { - "type": "text", - "text": "This is a h3" - } - ] - }, - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "3" - }, - "content": [ - { - "type": "paragraph", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This is a paragraph" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "4" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "This is" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "5" - }, - "content": [ - { - "type": "numberedListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "a numbered list" - } - ] - } - ] - }, - { - "type": "blockContainer", - "attrs": { - "id": "6" - }, - "content": [ - { - "type": "bulletListItem", - "attrs": { - "backgroundColor": "default", - "textColor": "default", - "textAlignment": "left" - }, - "content": [ - { - "type": "text", - "text": "And this is a bullet list" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-chromium-darwin.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-chromium-darwin.png deleted file mode 100644 index dc2ab128db..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-chromium-darwin.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-chromium-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-chromium-linux.png deleted file mode 100644 index dc2b31a702..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-firefox-darwin.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-firefox-darwin.png deleted file mode 100644 index aaa746ed93..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-firefox-darwin.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-firefox-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-firefox-linux.png deleted file mode 100644 index 5cec092d61..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-webkit-darwin.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-webkit-darwin.png deleted file mode 100644 index 610d2db9fb..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-webkit-darwin.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-webkit-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-webkit-linux.png deleted file mode 100644 index 5acb91ed8e..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-end-product-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-chromium-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-chromium-linux.png deleted file mode 100644 index cc14c0d3ba..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-firefox-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-firefox-linux.png deleted file mode 100644 index 9ceb747632..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-webkit-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-webkit-linux.png deleted file mode 100644 index 0c3003b0f9..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-down-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-chromium-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-chromium-linux.png deleted file mode 100644 index 9ed62d57c0..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-firefox-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-firefox-linux.png deleted file mode 100644 index c1cdd5fd35..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-webkit-linux.png b/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-webkit-linux.png deleted file mode 100644 index d24128a5c5..0000000000 Binary files a/tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/slash-menu-page-up-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/slashmenu/slashmenu.test.tsx b/tests/src/end-to-end/slashmenu/slashmenu.test.tsx new file mode 100644 index 0000000000..d52a8b46c5 --- /dev/null +++ b/tests/src/end-to-end/slashmenu/slashmenu.test.tsx @@ -0,0 +1,159 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, expect, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { + BLOCK_CONTAINER_SELECTOR, + BLOCK_GROUP_SELECTOR, + BULLET_LIST_SELECTOR, + EDITOR_SELECTOR, + H_ONE_BLOCK_SELECTOR, + H_THREE_BLOCK_SELECTOR, + H_TWO_BLOCK_SELECTOR, + NUMBERED_LIST_SELECTOR, +} from "../../utils/const.js"; +import { + compareDocToSnapshot, + focusOnEditor, + expectElement, + sleep, + waitForSelector, + waitForSelectorInEditor, +} from "../../utils/editor.js"; +import { executeSlashCommand, openSlashMenu } from "../../utils/slashmenu.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check SlashMenu Functionality", () => { + test("should show slash menu when / is typed", async () => { + await focusOnEditor(); + await openSlashMenu(); + }); + test("Should be able to use PageUp/Down to navigate", async () => { + await focusOnEditor(); + await openSlashMenu(); + await sleep(500); + await userEvent.keyboard("{PageDown}"); + await expectElement(document.body).toMatchScreenshot( + "slash_menu_page_down", + ); + await userEvent.keyboard("{PageUp}"); + await expectElement(document.body).toMatchScreenshot("slash_menu_page_up"); + }); + test("Should be able to create h1", async () => { + await focusOnEditor(); + await executeSlashCommand("h1"); + await userEvent.keyboard("This is a H1"); + await waitForSelectorInEditor(H_ONE_BLOCK_SELECTOR); + }); + test("Should be able to create h2", async () => { + await focusOnEditor(); + await executeSlashCommand("h2"); + await userEvent.keyboard("This is a H2"); + await waitForSelectorInEditor(H_TWO_BLOCK_SELECTOR); + }); + test("Should be able to create h3", async () => { + await focusOnEditor(); + await executeSlashCommand("h3"); + await userEvent.keyboard("This is a H3"); + await waitForSelectorInEditor(H_THREE_BLOCK_SELECTOR); + }); + test("Should be able to create numbered list", async () => { + await focusOnEditor(); + await executeSlashCommand("numbered"); + await userEvent.keyboard("This is a numbered list"); + await waitForSelectorInEditor(NUMBERED_LIST_SELECTOR); + }); + test("Should be able to create bullet list", async () => { + await focusOnEditor(); + await executeSlashCommand("bullet"); + await userEvent.keyboard("This is a bullet list"); + await waitForSelectorInEditor(BULLET_LIST_SELECTOR); + }); + test("Should be able to create paragraph", async () => { + await focusOnEditor(); + await executeSlashCommand("paragraph"); + await userEvent.keyboard("This is a Paragraph"); + const block = document.querySelectorAll(BLOCK_CONTAINER_SELECTOR)[0]; + const blockHeadingType = block.getAttribute("data-heading-type"); + expect(blockHeadingType).toBeFalsy(); + }); + test("Should add block as sibling of current block if block has content", async () => { + await focusOnEditor(); + await executeSlashCommand("h1"); + await userEvent.keyboard("Hello"); + await executeSlashCommand("h2"); + // If done correctly all blocks should be in the same block group + // resulting in a total of 1 block group. + const blockGroupCount = + document.querySelectorAll(BLOCK_GROUP_SELECTOR).length; + expect(blockGroupCount).toBe(1); + }); + test("Should add new block after current blocks children", async () => { + // BLOCK_A /(create Block_C) + // BLOCK_B + // + // When adding a new block after Block_A, it should be added + // As a sibling of Block_A, beneath it + // + // BLOCK_A + // BLOCK_B + // BLOCK_C + await focusOnEditor(); + await userEvent.keyboard("A"); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await userEvent.keyboard("B"); + await userEvent.keyboard("{ArrowUp}"); + await executeSlashCommand("h1"); + await waitForSelector(H_ONE_BLOCK_SELECTOR); + // If done correctly there should be a total on 2 block groups + // a total of 3 blocks and the 3rd block should have no blockgroup + // and BLOCK_A should have one child + const blockGroupCount = + document.querySelectorAll(BLOCK_GROUP_SELECTOR).length; + expect(blockGroupCount).toBe(2); + const blockCount = document.querySelectorAll( + BLOCK_CONTAINER_SELECTOR, + ).length; + expect(blockCount).toBe(3); + const thirdBlock = document.querySelectorAll(BLOCK_CONTAINER_SELECTOR)[2]; + expect(thirdBlock.querySelector(BLOCK_GROUP_SELECTOR)).toBeNull(); + const firstBlock = document.querySelectorAll(BLOCK_CONTAINER_SELECTOR)[0]; + const firstBlockChildren = firstBlock.querySelectorAll( + BLOCK_CONTAINER_SELECTOR, + ).length; + expect(firstBlockChildren).toBe(1); + }); + test("Should be able to create complex documents that match snapshots", async () => { + await focusOnEditor(); + await executeSlashCommand("h1"); + await userEvent.keyboard("This is a h1"); + await executeSlashCommand("h2"); + await userEvent.keyboard("This is a h2"); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("{Tab}"); + await executeSlashCommand("h3"); + await userEvent.keyboard("This is a h3"); + await executeSlashCommand("paragraph"); + await userEvent.keyboard("This is a paragraph"); + await userEvent.keyboard("{Tab}"); + await userEvent.keyboard("{ArrowUp}"); + await executeSlashCommand("numbered"); + await userEvent.keyboard("This is"); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("a numbered list"); + await executeSlashCommand("bullet"); + await userEvent.keyboard("And this is a bullet list"); + await sleep(1000); + // Compare doc object snapshot + await compareDocToSnapshot("docStructureSnapshot"); + // Compare editor screenshot + await expectElement(document.body).toMatchScreenshot( + "slash_menu_end_product", + ); + }); +}); diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-1.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-1.png new file mode 100644 index 0000000000..2152a03f16 Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-1.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-2.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-2.png new file mode 100644 index 0000000000..82c78d0c7d Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-2.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-3.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-3.png new file mode 100644 index 0000000000..82c78d0c7d Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/Check-static-rendering-Check-static-rendering-visually-matches-live-editor-3.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-chromium-linux.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-chromium-linux.png new file mode 100644 index 0000000000..1d21913e9f Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-chromium-linux.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-chromium-linux.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-chromium-linux.png new file mode 100644 index 0000000000..0ec4f36e63 Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-chromium-linux.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-firefox-linux.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-firefox-linux.png new file mode 100644 index 0000000000..a5fa44338a Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-firefox-linux.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-webkit-linux.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-webkit-linux.png new file mode 100644 index 0000000000..254253e600 Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-equality-webkit-linux.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-firefox-linux.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-firefox-linux.png new file mode 100644 index 0000000000..1b105bfda9 Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-firefox-linux.png differ diff --git a/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-webkit-linux.png b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-webkit-linux.png new file mode 100644 index 0000000000..b24e871943 Binary files /dev/null and b/tests/src/end-to-end/static/__screenshots__/static.test.tsx/static-rendering-webkit-linux.png differ diff --git a/tests/src/end-to-end/static/static.test.ts b/tests/src/end-to-end/static/static.test.ts deleted file mode 100644 index 5508faab3b..0000000000 --- a/tests/src/end-to-end/static/static.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - BASIC_BLOCKS_STATIC_URL, - BASIC_BLOCKS_URL, - STATIC_URL, -} from "../../utils/const.js"; - -test.describe("Check static rendering", () => { - test("Check static rendering", async ({ page }) => { - await page.goto(STATIC_URL); - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("static-rendering.png"); - }); - - test("Check static rendering visually matches live editor", async ({ - page, - }) => { - await page.goto(BASIC_BLOCKS_URL); - await page.waitForLoadState("networkidle"); - // Hide the trailing block widget so the live editor's page height matches - // the static export, which doesn't render it. - await page.addStyleTag({ - content: ".bn-trailing-block { display: none !important; }", - }); - expect( - await page.screenshot({ - fullPage: true, - mask: [ - // Mask video and audio elements as these will look different as they - // load, causing test failures as the amount loaded isn't consistent - // across test runs. - await page.locator("video"), - await page.locator("audio"), - // Mask elements which we expect to be different between the live - // editor and static screenshots. - await page.locator('input[type="checkbox"]'), - await page.locator(".bn-toggle-button"), - ], - scale: "css", - }), - ).toMatchSnapshot("static-rendering-equality.png", { - // Allowance for variations in the image caption text. The placehold.co - // URL renders differently (e.g., '×' vs 'x' character) between runs. - maxDiffPixels: 200, - }); - - await page.goto(BASIC_BLOCKS_STATIC_URL); - await page.waitForLoadState("networkidle"); - expect( - await page.screenshot({ - fullPage: true, - mask: [ - await page.locator("video"), - await page.locator("audio"), - await page.locator('input[type="checkbox"]'), - await page.locator(".bn-toggle-button"), - ], - scale: "css", - }), - ).toMatchSnapshot("static-rendering-equality.png", { - // Allowance for variations in the image caption text. The placehold.co - // URL renders differently (e.g., '×' vs 'x' character) between the live - // editor and static screenshots. - maxDiffPixels: 200, - }); - }); -}); diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-chromium-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-chromium-linux.png deleted file mode 100644 index cfb0881993..0000000000 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png deleted file mode 100644 index 498bbc0736..0000000000 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png deleted file mode 100644 index 60315234f8..0000000000 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png deleted file mode 100644 index 4b7a3755f5..0000000000 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-firefox-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-firefox-linux.png deleted file mode 100644 index e9e6b1dd60..0000000000 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-webkit-linux.png b/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-webkit-linux.png deleted file mode 100644 index c6c2b8279e..0000000000 Binary files a/tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/static/static.test.tsx b/tests/src/end-to-end/static/static.test.tsx new file mode 100644 index 0000000000..586b22c810 --- /dev/null +++ b/tests/src/end-to-end/static/static.test.tsx @@ -0,0 +1,48 @@ +import BasicBlocksApp from "@examples/01-basic/04-default-blocks/src/App"; +import BasicBlocksStaticApp from "@examples/05-interoperability/10-static-html-render/src/App"; +import StaticApp from "@examples/02-backend/04-rendering-static-documents/src/App"; +import { describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { EDITOR_SELECTOR } from "../../utils/const.js"; +import { expectElement, sleep, waitForSelector } from "../../utils/editor.js"; + +describe("Check static rendering", () => { + test("Check static rendering", async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); + await sleep(500); + await expectElement(document.body).toMatchScreenshot("static-rendering"); + }); + + // Renders two editors back-to-back and screenshots each. Heavy enough that + // even the suite-wide 30s testTimeout is tight when 3 browsers contend in + // one Docker container — bump to 60s to absorb the contention. + test( + "Check static rendering visually matches live editor", + { timeout: 60000 }, + async () => { + const liveEditor = await render(); + await waitForSelector(EDITOR_SELECTOR); + // Hide the trailing block widget so the live editor's page height matches + // the static export, which doesn't render it. + const style = document.createElement("style"); + style.textContent = ".bn-trailing-block { display: none !important; }"; + document.head.appendChild(style); + await sleep(500); + + await expectElement(document.body).toMatchScreenshot( + "static-rendering-equality", + ); + + liveEditor.unmount(); + style.remove(); + + render(); + await waitForSelector(EDITOR_SELECTOR); + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "static-rendering-equality", + ); + }, + ); +}); diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-chromium-linux.json b/tests/src/end-to-end/tables/__snapshots__/arrowKeyCells.json similarity index 100% rename from tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-chromium-linux.json rename to tests/src/end-to-end/tables/__snapshots__/arrowKeyCells.json diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-chromium-linux.json b/tests/src/end-to-end/tables/__snapshots__/cellTyping.json similarity index 100% rename from tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-chromium-linux.json rename to tests/src/end-to-end/tables/__snapshots__/cellTyping.json diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-chromium-linux.json b/tests/src/end-to-end/tables/__snapshots__/enterMovesToCellBelow.json similarity index 100% rename from tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-chromium-linux.json rename to tests/src/end-to-end/tables/__snapshots__/enterMovesToCellBelow.json diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-chromium-linux.json b/tests/src/end-to-end/tables/__snapshots__/shiftEnterNewLineInCell.json similarity index 100% rename from tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-chromium-linux.json rename to tests/src/end-to-end/tables/__snapshots__/shiftEnterNewLineInCell.json diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-firefox-linux.json b/tests/src/end-to-end/tables/__snapshots__/tabCells.json similarity index 100% rename from tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-firefox-linux.json rename to tests/src/end-to-end/tables/__snapshots__/tabCells.json diff --git a/tests/src/end-to-end/tables/tables.test.ts b/tests/src/end-to-end/tables/tables.test.ts deleted file mode 100644 index caed60b14a..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { BASE_URL, TABLE_SELECTOR } from "../../utils/const.js"; -import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); -}); - -test.describe("Check Table interactions", () => { - test("Should be able to type in cell", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "table"); - await page.keyboard.type("Table Cell"); - - await compareDocToSnapshot(page, "cellTyping.json"); - }); - test("Tab should cycle cells", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "table"); - // Cycle to sixth (last) cell. - for (let i = 0; i < 5; i++) { - await page.keyboard.press("Tab"); - } - await page.keyboard.type("Table Cell"); - // Cycle back to first cell. - for (let i = 0; i < 5; i++) { - await page.keyboard.press("Shift+Tab"); - } - await page.keyboard.type("Table Cell"); - - await compareDocToSnapshot(page, "tabCells.json"); - }); - test("Arrow keys should move cells", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "table"); - // Move down to second (last) cell in column and third (last) cell in row. - page.keyboard.press("ArrowDown"); - for (let i = 0; i < 2; i++) { - await page.keyboard.press("ArrowRight"); - } - await page.keyboard.type("Table Cell"); - // Cycle back to first cell. - page.keyboard.press("ArrowUp"); - for (let i = 0; i < 2; i++) { - await page.keyboard.press("ArrowLeft"); - } - await page.keyboard.type("Table Cell"); - - await compareDocToSnapshot(page, "arrowKeyCells.json"); - }); - test("Enter should move to cell below", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "table"); - await page.keyboard.type("Top"); - await page.keyboard.press("Enter"); - await page.keyboard.type("Bottom"); - - await compareDocToSnapshot(page, "enterMovesToCellBelow.json"); - }); - test("Shift+Enter should create a new line within cell", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "table"); - await page.keyboard.type("Line 1"); - await page.keyboard.press("Shift+Enter"); - await page.keyboard.type("Line 2"); - - await compareDocToSnapshot(page, "shiftEnterNewLineInCell.json"); - }); - // Regression test for https://github.com/TypeCellOS/BlockNote/issues/2691. - // Drops the dragged row to the LEFT of `.bn-block-group` (where the side - // menu sits). SideMenuView re-dispatches drops outside `.bn-block-group` - // (within 250px) as synthetic events; without the guard in - // TableHandles.dropHandler, the synthetic drop AND the original drop both - // run the row-move logic, dragging an adjacent row along with the target. - test("Row drag should move only the dragged row", async ({ - page, - browserName, - }) => { - test.skip( - browserName === "firefox", - "Playwright doesn't correctly simulate drag events in Firefox.", - ); - - await focusOnEditor(page); - await executeSlashCommand(page, "table"); - - // Replace the default table with a deterministic 5-row × 1-col table. - await page.evaluate(() => { - const cellAttrs = { - textColor: "default", - backgroundColor: "default", - textAlignment: "left", - colspan: 1, - rowspan: 1, - colwidth: null, - }; - const rows = ["R1", "R2", "R3", "R4", "R5"].map((label) => ({ - type: "tableRow", - content: [ - { - type: "tableCell", - attrs: cellAttrs, - content: [ - { - type: "tableParagraph", - content: [{ type: "text", text: label }], - }, - ], - }, - ], - })); - ( - window as unknown as { - ProseMirror: { - commands: { setContent: (doc: unknown) => void }; - }; - } - ).ProseMirror.commands.setContent({ - type: "doc", - content: [ - { - type: "blockGroup", - content: [ - { - type: "blockContainer", - attrs: { id: "0" }, - content: [ - { - type: "table", - attrs: { textColor: "default" }, - content: rows, - }, - ], - }, - ], - }, - ], - }); - }); - await page.waitForFunction( - () => document.querySelectorAll(".bn-editor tbody tr").length === 5, - ); - - // Hover R2's first cell so its row drag handle becomes visible. The - // row handle has no rotate transform (the column handle does). - const rows = page.locator(`${TABLE_SELECTOR} tbody tr`); - await rows.nth(1).locator("td").first().hover(); - const handle = page - .locator(".bn-table-handle") - .filter({ hasNot: page.locator(`[style*="rotate"]`) }) - .first(); - await handle.waitFor({ state: "visible" }); - const handleBox = (await handle.boundingBox())!; - - // Drop into the side-menu area: LEFT of `.bn-block-group`, vertically - // aligned with the last row. This is outside the block-group rect but - // well within the 250px range that triggers SideMenuView's synthetic - // drop re-dispatch — the same condition that surfaces the bug for - // real users dragging onto the side gutter. - const blockGroup = (await page - .locator(".bn-block-group") - .first() - .boundingBox())!; - const lastRowBox = (await rows.nth(4).locator("td").first().boundingBox())!; - const dropX = blockGroup.x - 50; - const dropY = lastRowBox.y + lastRowBox.height / 2; - - await page.mouse.move( - handleBox.x + handleBox.width / 2, - handleBox.y + handleBox.height / 2, - { steps: 5 }, - ); - await page.mouse.down(); - await page.mouse.move(dropX, dropY, { steps: 10 }); - await page.mouse.up(); - - const order = ( - await page - .locator(`${TABLE_SELECTOR} tbody tr td:first-child`) - .allInnerTexts() - ).map((t) => t.trim()); - // Expected: only R2 moved. Buggy (#2691): R3 follows along. - expect(order).toEqual(["R1", "R3", "R4", "R5", "R2"]); - }); -}); diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-webkit-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-webkit-linux.json deleted file mode 100644 index bc3542e2ae..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-webkit-linux.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-firefox-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-firefox-linux.json deleted file mode 100644 index b8d1e35903..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-firefox-linux.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-webkit-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-webkit-linux.json deleted file mode 100644 index b8d1e35903..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-webkit-linux.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-firefox-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-firefox-linux.json deleted file mode 100644 index d2b917cc02..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-firefox-linux.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Top" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Bottom" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-webkit-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-webkit-linux.json deleted file mode 100644 index d2b917cc02..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-webkit-linux.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Top" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Bottom" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-firefox-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-firefox-linux.json deleted file mode 100644 index 8b95de67cb..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-firefox-linux.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Line 1" - }, - { - "type": "hardBreak" - }, - { - "type": "text", - "text": "Line 2" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-webkit-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-webkit-linux.json deleted file mode 100644 index 8b95de67cb..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-webkit-linux.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Line 1" - }, - { - "type": "hardBreak" - }, - { - "type": "text", - "text": "Line 2" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-chromium-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-chromium-linux.json deleted file mode 100644 index bc3542e2ae..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-chromium-linux.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-firefox-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-firefox-linux.json deleted file mode 100644 index bc3542e2ae..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-firefox-linux.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-webkit-linux.json b/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-webkit-linux.json deleted file mode 100644 index bc3542e2ae..0000000000 --- a/tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-webkit-linux.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "type": "doc", - "content": [ - { - "type": "blockGroup", - "content": [ - { - "type": "blockContainer", - "attrs": { - "id": "0" - }, - "content": [ - { - "type": "table", - "attrs": { - "textColor": "default" - }, - "content": [ - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - } - ] - }, - { - "type": "tableRow", - "content": [ - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph" - } - ] - }, - { - "type": "tableCell", - "attrs": { - "textColor": "default", - "backgroundColor": "default", - "textAlignment": "left", - "colspan": 1, - "rowspan": 1, - "colwidth": null - }, - "content": [ - { - "type": "tableParagraph", - "content": [ - { - "type": "text", - "text": "Table Cell" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/tests/src/end-to-end/tables/tables.test.tsx b/tests/src/end-to-end/tables/tables.test.tsx new file mode 100644 index 0000000000..d9d1dbbfa4 --- /dev/null +++ b/tests/src/end-to-end/tables/tables.test.tsx @@ -0,0 +1,198 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, expect, test, vi } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { browserName, userEvent } from "../../utils/context.js"; +import { EDITOR_SELECTOR, TABLE_SELECTOR } from "../../utils/const.js"; +import { + compareDocToSnapshot, + focusOnEditor, + waitForSelector, +} from "../../utils/editor.js"; +import { mouseSequence, moveMouseOverElement } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Table interactions", () => { + test("Should be able to type in cell", async () => { + await focusOnEditor(); + await executeSlashCommand("table"); + await userEvent.keyboard("Table Cell"); + + await compareDocToSnapshot("cellTyping"); + }); + test("Tab should cycle cells", async () => { + await focusOnEditor(); + await executeSlashCommand("table"); + // Cycle to sixth (last) cell. + for (let i = 0; i < 5; i++) { + await userEvent.keyboard("{Tab}"); + } + await userEvent.keyboard("Table Cell"); + // Cycle back to first cell. + for (let i = 0; i < 5; i++) { + await userEvent.keyboard("{Shift>}{Tab}{/Shift}"); + } + await userEvent.keyboard("Table Cell"); + + await compareDocToSnapshot("tabCells"); + }); + test("Arrow keys should move cells", async () => { + await focusOnEditor(); + await executeSlashCommand("table"); + // Move down to second (last) cell in column and third (last) cell in row. + await userEvent.keyboard("{ArrowDown}"); + for (let i = 0; i < 2; i++) { + await userEvent.keyboard("{ArrowRight}"); + } + await userEvent.keyboard("Table Cell"); + // Cycle back to first cell. + await userEvent.keyboard("{ArrowUp}"); + for (let i = 0; i < 2; i++) { + await userEvent.keyboard("{ArrowLeft}"); + } + await userEvent.keyboard("Table Cell"); + + await compareDocToSnapshot("arrowKeyCells"); + }); + test("Enter should move to cell below", async () => { + await focusOnEditor(); + await executeSlashCommand("table"); + await userEvent.keyboard("Top"); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("Bottom"); + + await compareDocToSnapshot("enterMovesToCellBelow"); + }); + test("Shift+Enter should create a new line within cell", async () => { + await focusOnEditor(); + await executeSlashCommand("table"); + await userEvent.keyboard("Line 1"); + await userEvent.keyboard("{Shift>}{Enter}{/Shift}"); + await userEvent.keyboard("Line 2"); + + await compareDocToSnapshot("shiftEnterNewLineInCell"); + }); + // Regression test for https://github.com/TypeCellOS/BlockNote/issues/2691. + // Drops the dragged row to the LEFT of `.bn-block-group` (where the side + // menu sits). SideMenuView re-dispatches drops outside `.bn-block-group` + // (within 250px) as synthetic events; without the guard in + // TableHandles.dropHandler, the synthetic drop AND the original drop both + // run the row-move logic, dragging an adjacent row along with the target. + // Playwright doesn't correctly simulate drag events in Firefox. + test.skipIf(browserName === "firefox")( + "Row drag should move only the dragged row", + async () => { + await focusOnEditor(); + await executeSlashCommand("table"); + + // Replace the default table with a deterministic 5-row × 1-col table. + const cellAttrs = { + textColor: "default", + backgroundColor: "default", + textAlignment: "left", + colspan: 1, + rowspan: 1, + colwidth: null, + }; + const rowsContent = ["R1", "R2", "R3", "R4", "R5"].map((label) => ({ + type: "tableRow", + content: [ + { + type: "tableCell", + attrs: cellAttrs, + content: [ + { + type: "tableParagraph", + content: [{ type: "text", text: label }], + }, + ], + }, + ], + })); + ( + window as unknown as { + ProseMirror: { + commands: { setContent: (doc: unknown) => void }; + }; + } + ).ProseMirror.commands.setContent({ + type: "doc", + content: [ + { + type: "blockGroup", + content: [ + { + type: "blockContainer", + attrs: { id: "0" }, + content: [ + { + type: "table", + attrs: { textColor: "default" }, + content: rowsContent, + }, + ], + }, + ], + }, + ], + }); + await vi.waitFor(() => { + if (document.querySelectorAll(".bn-editor tbody tr").length !== 5) { + throw new Error("Table not yet replaced"); + } + }); + + // Hover R2's first cell so its row drag handle becomes visible. The + // row handle has no rotate transform (the column handle does). + const rows = document.querySelectorAll(`${TABLE_SELECTOR} tbody tr`); + const r2FirstCell = rows[1].querySelector("td") as HTMLElement; + await moveMouseOverElement(r2FirstCell); + const handle = await vi.waitFor(() => { + const candidate = Array.from( + document.querySelectorAll(".bn-table-handle"), + ).find((el) => !el.querySelector(`[style*="rotate"]`)); + if (!candidate) { + throw new Error("Row drag handle not visible"); + } + return candidate as HTMLElement; + }); + const handleBox = handle.getBoundingClientRect(); + + // Drop into the side-menu area: LEFT of `.bn-block-group`, vertically + // aligned with the last row. This is outside the block-group rect but + // well within the 250px range that triggers SideMenuView's synthetic + // drop re-dispatch — the same condition that surfaces the bug for + // real users dragging onto the side gutter. + const blockGroup = ( + document.querySelector(".bn-block-group") as HTMLElement + ).getBoundingClientRect(); + const lastRowBox = ( + rows[4].querySelector("td") as HTMLElement + ).getBoundingClientRect(); + const dropX = blockGroup.x - 50; + const dropY = lastRowBox.y + lastRowBox.height / 2; + + await mouseSequence([ + { + type: "move", + x: handleBox.x + handleBox.width / 2, + y: handleBox.y + handleBox.height / 2, + steps: 5, + }, + { type: "down" }, + { type: "move", x: dropX, y: dropY, steps: 10 }, + { type: "up" }, + ]); + + const order = Array.from( + document.querySelectorAll(`${TABLE_SELECTOR} tbody tr td:first-child`), + ).map((t) => (t.textContent ?? "").trim()); + // Expected: only R2 moved. Buggy (#2691): R3 follows along. + expect(order).toEqual(["R1", "R3", "R4", "R5", "R2"]); + }, + ); +}); diff --git a/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-chromium-linux.png b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-chromium-linux.png new file mode 100644 index 0000000000..c0bf496e6f Binary files /dev/null and b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-chromium-linux.png differ diff --git a/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-firefox-linux.png b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-firefox-linux.png new file mode 100644 index 0000000000..fadd2016e0 Binary files /dev/null and b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-firefox-linux.png differ diff --git a/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-webkit-linux.png b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-webkit-linux.png new file mode 100644 index 0000000000..e479d6c9e4 Binary files /dev/null and b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextMultipleBlocks-webkit-linux.png differ diff --git a/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-chromium-linux.png b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-chromium-linux.png new file mode 100644 index 0000000000..fd814ecce5 Binary files /dev/null and b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-chromium-linux.png differ diff --git a/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-firefox-linux.png b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-firefox-linux.png new file mode 100644 index 0000000000..d63f9dd081 Binary files /dev/null and b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-firefox-linux.png differ diff --git a/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-webkit-linux.png b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-webkit-linux.png new file mode 100644 index 0000000000..ffdffa1861 Binary files /dev/null and b/tests/src/end-to-end/textalignment/__screenshots__/textAlignment.test.tsx/alignTextSingleBlock-webkit-linux.png differ diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.ts b/tests/src/end-to-end/textalignment/textAlignment.test.ts deleted file mode 100644 index eaecc4ce18..0000000000 --- a/tests/src/end-to-end/textalignment/textAlignment.test.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - ALIGN_TEXT_RIGHT_BUTTON_SELECTOR, - BASE_URL, -} from "../../utils/const.js"; -import { insertHeading } from "../../utils/copypaste.js"; -import { focusOnEditor } from "../../utils/editor.js"; - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL, { waitUntil: "networkidle" }); -}); - -test.describe("Check Text Alignment Functionality", () => { - test("Should be able to set text alignment on single block", async ({ - page, - }) => { - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Control+ArrowLeft"); - await page.keyboard.press("Shift+ArrowRight"); - - await page.locator(ALIGN_TEXT_RIGHT_BUTTON_SELECTOR).click(); - await page.waitForTimeout(350); - - await page.keyboard.press("Escape"); - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - await page.keyboard.press("ArrowLeft"); - - expect(await page.screenshot()).toMatchSnapshot("alignTextSingleBlock.png"); - }); - test("Should be able to set text alignment on multiple blocks", async ({ - page, - }) => { - await focusOnEditor(page); - - await insertHeading(page, 1); - await page.keyboard.press("Enter"); - await insertHeading(page, 2); - await page.keyboard.press("Enter"); - await insertHeading(page, 3); - - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("ArrowUp"); - await page.keyboard.press("Control+ArrowLeft"); - await page.keyboard.press("Shift+ArrowDown"); - await page.keyboard.press("Shift+ArrowRight"); - - await page.locator(ALIGN_TEXT_RIGHT_BUTTON_SELECTOR).click(); - await page.waitForTimeout(350); - - await page.keyboard.press("Escape"); - // Waits for formatting toolbar animation to finish. - await page.waitForTimeout(500); - await page.keyboard.press("ArrowLeft"); - - expect(await page.screenshot()).toMatchSnapshot( - "alignTextMultipleBlocks.png", - ); - }); -}); diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-chromium-linux.png b/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-chromium-linux.png deleted file mode 100644 index e56e1626c9..0000000000 Binary files a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-firefox-linux.png b/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-firefox-linux.png deleted file mode 100644 index 4907eb9eaf..0000000000 Binary files a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-webkit-linux.png b/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-webkit-linux.png deleted file mode 100644 index 76d5760774..0000000000 Binary files a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextMultipleBlocks-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-chromium-linux.png b/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-chromium-linux.png deleted file mode 100644 index c3acec922a..0000000000 Binary files a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-firefox-linux.png b/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-firefox-linux.png deleted file mode 100644 index 3d18d06677..0000000000 Binary files a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-webkit-linux.png b/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-webkit-linux.png deleted file mode 100644 index 76ad8d6bca..0000000000 Binary files a/tests/src/end-to-end/textalignment/textAlignment.test.ts-snapshots/alignTextSingleBlock-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/textalignment/textAlignment.test.tsx b/tests/src/end-to-end/textalignment/textAlignment.test.tsx new file mode 100644 index 0000000000..ac2a04efe9 --- /dev/null +++ b/tests/src/end-to-end/textalignment/textAlignment.test.tsx @@ -0,0 +1,79 @@ +import App from "@examples/01-basic/testing/src/App"; +import { beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { + ALIGN_TEXT_RIGHT_BUTTON_SELECTOR, + EDITOR_SELECTOR, +} from "../../utils/const.js"; +import { insertHeading } from "../../utils/copypaste.js"; +import { + focusOnEditor, + expectElement, + sleep, + waitForSelector, +} from "../../utils/editor.js"; + +beforeEach(async () => { + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +describe("Check Text Alignment Functionality", () => { + test("Should be able to set text alignment on single block", async () => { + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + await userEvent.keyboard("{Shift>}{ArrowRight}{/Shift}"); + + await userEvent.click( + await waitForSelector(ALIGN_TEXT_RIGHT_BUTTON_SELECTOR), + ); + await sleep(350); + + await userEvent.keyboard("{Escape}"); + // Waits for formatting toolbar animation to finish. + await sleep(500); + await userEvent.keyboard("{ArrowLeft}"); + + await expectElement(document.body).toMatchScreenshot( + "alignTextSingleBlock", + ); + }); + test("Should be able to set text alignment on multiple blocks", async () => { + await focusOnEditor(); + + await insertHeading(1); + await userEvent.keyboard("{Enter}"); + await insertHeading(2); + await userEvent.keyboard("{Enter}"); + await insertHeading(3); + + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{ArrowUp}"); + await userEvent.keyboard("{Control>}{ArrowLeft}{/Control}"); + await userEvent.keyboard("{Shift>}{ArrowDown}{/Shift}"); + await userEvent.keyboard("{Shift>}{ArrowRight}{/Shift}"); + + await userEvent.click( + await waitForSelector(ALIGN_TEXT_RIGHT_BUTTON_SELECTOR), + ); + await sleep(350); + + await userEvent.keyboard("{Escape}"); + // Waits for formatting toolbar animation to finish. + await sleep(500); + await userEvent.keyboard("{ArrowLeft}"); + + await expectElement(document.body).toMatchScreenshot( + "alignTextMultipleBlocks", + ); + }); +}); diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-chromium-linux.png new file mode 100644 index 0000000000..73a330e138 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-firefox-linux.png new file mode 100644 index 0000000000..7edc711d1d Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-webkit-linux.png new file mode 100644 index 0000000000..f3c6f7cad2 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-drag-handle-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-chromium-linux.png new file mode 100644 index 0000000000..7f4d1c382a Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-firefox-linux.png new file mode 100644 index 0000000000..4145f55968 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-webkit-linux.png new file mode 100644 index 0000000000..1e08a488ef Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-editor-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-chromium-linux.png new file mode 100644 index 0000000000..bb8c003727 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-firefox-linux.png new file mode 100644 index 0000000000..eebb7f84b5 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-webkit-linux.png new file mode 100644 index 0000000000..5f04aef7e7 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-emoji-picker-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-chromium-linux.png new file mode 100644 index 0000000000..c41258a230 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-firefox-linux.png new file mode 100644 index 0000000000..f5d855ee54 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-webkit-linux.png new file mode 100644 index 0000000000..59cc925b65 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-formatting-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-chromium-linux.png new file mode 100644 index 0000000000..6cf374cf43 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-firefox-linux.png new file mode 100644 index 0000000000..7ea0d22ea1 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-webkit-linux.png new file mode 100644 index 0000000000..74186332e6 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-image-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-chromium-linux.png new file mode 100644 index 0000000000..5cbd25ccf4 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-firefox-linux.png new file mode 100644 index 0000000000..e5ebfb1766 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-webkit-linux.png new file mode 100644 index 0000000000..5fa6c2daf0 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-link-toolbar-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-chromium-linux.png new file mode 100644 index 0000000000..4ae86472da Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-firefox-linux.png new file mode 100644 index 0000000000..7e826efbf4 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-webkit-linux.png new file mode 100644 index 0000000000..30a65c1650 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-side-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-chromium-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-chromium-linux.png new file mode 100644 index 0000000000..a0d2313f26 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-chromium-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-firefox-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-firefox-linux.png new file mode 100644 index 0000000000..92e6454bb6 Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-firefox-linux.png differ diff --git a/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-webkit-linux.png b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-webkit-linux.png new file mode 100644 index 0000000000..56f530165a Binary files /dev/null and b/tests/src/end-to-end/theming/__screenshots__/theming.test.tsx/dark-slash-menu-webkit-linux.png differ diff --git a/tests/src/end-to-end/theming/theming.test.ts b/tests/src/end-to-end/theming/theming.test.ts deleted file mode 100644 index 1647cda1a9..0000000000 --- a/tests/src/end-to-end/theming/theming.test.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { expect } from "@playwright/test"; -import { test } from "../../setup/setupScript.js"; -import { - BASE_URL, - DRAG_HANDLE_SELECTOR, - LINK_BUTTON_SELECTOR, - PARAGRAPH_SELECTOR, -} from "../../utils/const.js"; -import { focusOnEditor } from "../../utils/editor.js"; -import { moveMouseOverElement } from "../../utils/mouse.js"; -import { executeSlashCommand } from "../../utils/slashmenu.js"; - -test.use({ - colorScheme: "dark", -}); - -test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); -}); - -test.describe("Check Dark Theme is Automatically Applied", () => { - test("Should show dark editor", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - - expect(await page.screenshot()).toMatchSnapshot("dark-editor.png"); - }); - test("Should show dark formatting toolbar", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("Shift+Home"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot( - "dark-formatting-toolbar.png", - ); - }); - test("Should show dark link toolbar", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.type("Paragraph"); - await page.keyboard.press("Shift+Home"); - - await page.waitForSelector(LINK_BUTTON_SELECTOR); - await page.click(LINK_BUTTON_SELECTOR); - - await page.waitForTimeout(500); - await page.keyboard.type("link"); - await page.keyboard.press("Enter"); - await page.waitForTimeout(500); - await page.keyboard.press("ArrowLeft"); - await page.keyboard.press("ArrowRight"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("dark-link-toolbar.png"); - }); - test("Should show dark slash menu", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.press("/"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("dark-slash-menu.png"); - }); - test("Should show dark emoji picker", async ({ page }) => { - await focusOnEditor(page); - await page.keyboard.press(":"); - await page.keyboard.type("sm"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("dark-emoji-picker.png"); - }); - test("Should show dark side menu", async ({ page }) => { - await focusOnEditor(page); - await page.waitForSelector(PARAGRAPH_SELECTOR); - await moveMouseOverElement(page, page.locator(PARAGRAPH_SELECTOR)); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("dark-side-menu.png"); - }); - test("Should show drag handle menu", async ({ page }) => { - await focusOnEditor(page); - await page.waitForSelector(PARAGRAPH_SELECTOR); - await moveMouseOverElement(page, page.locator(PARAGRAPH_SELECTOR)); - - await page.waitForTimeout(500); - await page.waitForSelector(DRAG_HANDLE_SELECTOR); - await moveMouseOverElement(page, page.locator(DRAG_HANDLE_SELECTOR)); - await page.mouse.down(); - await page.mouse.up(); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot( - "dark-drag-handle-menu.png", - ); - }); - test("Should show dark image toolbar", async ({ page }) => { - await focusOnEditor(page); - await executeSlashCommand(page, "image"); - - await page.waitForTimeout(500); - expect(await page.screenshot()).toMatchSnapshot("dark-image-toolbar.png"); - }); -}); diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-chromium-linux.png deleted file mode 100644 index 350a80fd75..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-firefox-linux.png deleted file mode 100644 index acb0b85c09..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-webkit-linux.png deleted file mode 100644 index 22afa45951..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-drag-handle-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-chromium-linux.png deleted file mode 100644 index 8eb8cb30e9..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-firefox-linux.png deleted file mode 100644 index da72d2f9fe..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-webkit-linux.png deleted file mode 100644 index 99e936e826..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-editor-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-chromium-linux.png deleted file mode 100644 index 6a0bb64c86..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-firefox-linux.png deleted file mode 100644 index 55de0038a4..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-webkit-linux.png deleted file mode 100644 index 068f8604a0..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-emoji-picker-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-chromium-linux.png deleted file mode 100644 index c9eccf35b8..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-firefox-linux.png deleted file mode 100644 index 0349ea700e..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-webkit-linux.png deleted file mode 100644 index 0b0a6eaceb..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-formatting-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-chromium-linux.png deleted file mode 100644 index 85c744c8f6..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-firefox-linux.png deleted file mode 100644 index 4ef1daa636..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-webkit-linux.png deleted file mode 100644 index a662f1e345..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-chromium-linux.png deleted file mode 100644 index 15dfa1a2e0..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-firefox-linux.png deleted file mode 100644 index 8ddbc80ad1..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-webkit-linux.png deleted file mode 100644 index 1907eec391..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-link-toolbar-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-chromium-linux.png deleted file mode 100644 index 88c19396c0..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-firefox-linux.png deleted file mode 100644 index 794059e4d4..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-webkit-linux.png deleted file mode 100644 index f0f51be34f..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-side-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-chromium-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-chromium-linux.png deleted file mode 100644 index 1f1fdcbe8b..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-chromium-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-firefox-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-firefox-linux.png deleted file mode 100644 index 2f2b968c0a..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-firefox-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-webkit-linux.png b/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-webkit-linux.png deleted file mode 100644 index 644b440fdd..0000000000 Binary files a/tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-slash-menu-webkit-linux.png and /dev/null differ diff --git a/tests/src/end-to-end/theming/theming.test.tsx b/tests/src/end-to-end/theming/theming.test.tsx new file mode 100644 index 0000000000..ee4ac14c2e --- /dev/null +++ b/tests/src/end-to-end/theming/theming.test.tsx @@ -0,0 +1,127 @@ +import App from "@examples/01-basic/testing/src/App"; +import { afterEach, beforeEach, describe, test } from "vite-plus/test"; +import { render } from "vitest-browser-react"; +import { userEvent } from "../../utils/context.js"; +import { + DRAG_HANDLE_SELECTOR, + EDITOR_SELECTOR, + LINK_BUTTON_SELECTOR, + PARAGRAPH_SELECTOR, +} from "../../utils/const.js"; +import { + focusOnEditor, + expectElement, + sleep, + waitForSelector, +} from "../../utils/editor.js"; +import { moveMouseOverElement, mouseSequence } from "../../utils/mouse.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; + +// Vitest browser mode has no per-test `colorScheme` knob (the playwright +// provider only takes it on the instance level via contextOptions). The editor +// detects scheme by querying `window.matchMedia('(prefers-color-scheme: dark)')` +// at mount (see packages/react/src/hooks/usePrefersColorScheme.ts), so we stub +// matchMedia before rendering. Restored in afterEach so other files aren't +// affected. +let originalMatchMedia: typeof window.matchMedia; + +beforeEach(async () => { + originalMatchMedia = window.matchMedia; + window.matchMedia = ((query: string) => ({ + matches: query.includes("prefers-color-scheme: dark"), + media: query, + onchange: null, + addListener: () => {}, + removeListener: () => {}, + addEventListener: () => {}, + removeEventListener: () => {}, + dispatchEvent: () => false, + })) as typeof window.matchMedia; + render(); + await waitForSelector(EDITOR_SELECTOR); +}); + +afterEach(() => { + window.matchMedia = originalMatchMedia; +}); + +describe("Check Dark Theme is Automatically Applied", () => { + test("Should show dark editor", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + + await expectElement(document.body).toMatchScreenshot("dark-editor"); + }); + test("Should show dark formatting toolbar", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard("{Shift>}{Home}{/Shift}"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "dark-formatting-toolbar", + ); + }); + test("Should show dark link toolbar", async () => { + await focusOnEditor(); + await userEvent.keyboard("Paragraph"); + await userEvent.keyboard("{Shift>}{Home}{/Shift}"); + + await userEvent.click(await waitForSelector(LINK_BUTTON_SELECTOR)); + + await sleep(500); + await userEvent.keyboard("link"); + await userEvent.keyboard("{Enter}"); + await sleep(500); + await userEvent.keyboard("{ArrowLeft}"); + await userEvent.keyboard("{ArrowRight}"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("dark-link-toolbar"); + }); + test("Should show dark slash menu", async () => { + await focusOnEditor(); + await userEvent.keyboard("/"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("dark-slash-menu"); + }); + test("Should show dark emoji picker", async () => { + await focusOnEditor(); + await userEvent.keyboard(":"); + await userEvent.keyboard("sm"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("dark-emoji-picker"); + }); + test("Should show dark side menu", async () => { + await focusOnEditor(); + await waitForSelector(PARAGRAPH_SELECTOR); + await moveMouseOverElement(PARAGRAPH_SELECTOR); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("dark-side-menu"); + }); + test("Should show drag handle menu", async () => { + await focusOnEditor(); + await waitForSelector(PARAGRAPH_SELECTOR); + await moveMouseOverElement(PARAGRAPH_SELECTOR); + + await sleep(500); + await waitForSelector(DRAG_HANDLE_SELECTOR); + await moveMouseOverElement(DRAG_HANDLE_SELECTOR); + await mouseSequence([{ type: "down" }, { type: "up" }]); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot( + "dark-drag-handle-menu", + ); + }); + test("Should show dark image toolbar", async () => { + await focusOnEditor(); + await executeSlashCommand("image"); + + await sleep(500); + await expectElement(document.body).toMatchScreenshot("dark-image-toolbar"); + }); +}); diff --git a/tests/src/examples.d.ts b/tests/src/examples.d.ts new file mode 100644 index 0000000000..2e54a52de3 --- /dev/null +++ b/tests/src/examples.d.ts @@ -0,0 +1,12 @@ +// e2e tests mount example apps via `import App from "@examples///src/App"`. +// The `@examples` alias is resolved by Vite at runtime (see vite.config.browser.ts). +// We declare it ambiently as a React component so `tsc` resolves the import to a +// type WITHOUT descending into the example sources (which live outside the tests +// rootDir and would otherwise break the composite build with TS6059). A tsconfig +// `paths` entry would do the opposite — resolve to the real files — so we use this +// ambient module instead. +declare module "@examples/*" { + import type { ComponentType } from "react"; + const App: ComponentType; + export default App; +} diff --git a/tests/src/setup/setupScript.ts b/tests/src/setup/setupScript.ts deleted file mode 100644 index 1eb448aa0a..0000000000 --- a/tests/src/setup/setupScript.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - BrowserContext, - BrowserContextOptions, - test as base, -} from "@playwright/test"; - -export type TestOptions = { - mockID: number | undefined; -}; - -export const test = base.extend({ - browser: async ({ browser }, use) => { - const oldFunc = browser.newContext; - browser.newContext = async (options?: BrowserContextOptions) => { - const ret: BrowserContext = await oldFunc.call(browser, options); - - await ret.addInitScript({ - content: `window.__TEST_OPTIONS = window.__TEST_OPTIONS || {}`, - }); - - return ret; - }; - await use(browser); - }, - context: async ({ context }, use) => { - await context.addInitScript({ - content: `window.__TEST_OPTIONS = window.__TEST_OPTIONS || {}`, - }); - await use(context); - }, -}); - -export { expect } from "@playwright/test"; diff --git a/tests/src/setup/setupScriptComponent.ts b/tests/src/setup/setupScriptComponent.ts deleted file mode 100644 index b850190409..0000000000 --- a/tests/src/setup/setupScriptComponent.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { test as base } from "@playwright/experimental-ct-react"; - -export type TestOptions = { - mockID: number | undefined; -}; - -export const test: typeof base = base.extend({ - browser: async ({ browser }, use) => { - const oldFunc = browser.newContext; - browser.newContext = async (options?) => { - const ret = await oldFunc.call(browser, options); - - await ret.addInitScript({ - content: `window.__TEST_OPTIONS = window.__TEST_OPTIONS || {};`, - }); - - return ret; - }; - await use(browser); - }, - context: async ({ context }, use) => { - await context.addInitScript({ - content: `window.__TEST_OPTIONS = window.__TEST_OPTIONS || {};`, - }); - await use(context); - }, -}); - -export { expect } from "@playwright/experimental-ct-react"; diff --git a/tests/src/utils/components/Editor.module.css b/tests/src/utils/components/Editor.module.css deleted file mode 100644 index fa3b3dc346..0000000000 --- a/tests/src/utils/components/Editor.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.editor { - padding: 0 calc((100% - 731px) / 2); - height: 100%; -} diff --git a/tests/src/utils/components/Editor.tsx b/tests/src/utils/components/Editor.tsx deleted file mode 100644 index 459920ed2a..0000000000 --- a/tests/src/utils/components/Editor.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { BlockNoteSchema } from "@blocknote/core"; -import { filterSuggestionItems } from "@blocknote/core/extensions"; -import "@blocknote/core/style.css"; -import { BlockNoteView } from "@blocknote/mantine"; -import "@blocknote/mantine/style.css"; -import { - BlockNoteDefaultUI, - SuggestionMenuController, - getDefaultReactSlashMenuItems, - useCreateBlockNote, -} from "@blocknote/react"; - -import { Alert, insertAlert } from "../customblocks/Alert.js"; -import { Button } from "../customblocks/Button.js"; - -type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any }; - -const schema = BlockNoteSchema.create({ - blockSpecs: { - alert: Alert, - button: Button, - }, -}); - -export default function Editor() { - const editor = useCreateBlockNote({ schema }); - - // Give tests a way to get prosemirror instance - (window as WindowWithProseMirror).ProseMirror = editor?._tiptapEditor; - // editor.insertBlocks([{ - // type:"" - // }]) - // TODO: how to customize slashmenu - return ( - - - - filterSuggestionItems( - [...getDefaultReactSlashMenuItems(editor), insertAlert(editor)], - query, - ) - } - // suggestionMenuComponent={MantineSuggestionMenu} - triggerCharacter="/" - /> - - ); -} diff --git a/tests/src/utils/components/EditorWithTextArea.tsx b/tests/src/utils/components/EditorWithTextArea.tsx deleted file mode 100644 index 2aa56ecd5a..0000000000 --- a/tests/src/utils/components/EditorWithTextArea.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import "@blocknote/core/style.css"; -import Editor from "./Editor.js"; -import styles from "./TextArea.module.css"; - -export default function EditorWithTextArea() { - return ( - <> - -