diff --git a/tests/affine-legacy/0.6.1-beta.1/.gitignore b/tests/affine-legacy/0.6.1-beta.1/.gitignore new file mode 100644 index 0000000000..a70fd94c37 --- /dev/null +++ b/tests/affine-legacy/0.6.1-beta.1/.gitignore @@ -0,0 +1,4 @@ +static +fixtures/*.ydoc +test-results +*.zip diff --git a/tests/affine-legacy/0.6.1-beta.1/README.md b/tests/affine-legacy/0.6.1-beta.1/README.md new file mode 100644 index 0000000000..61cbabcfa9 --- /dev/null +++ b/tests/affine-legacy/0.6.1-beta.1/README.md @@ -0,0 +1,12 @@ +# AFFiNE Legacy 0.6.1-beta.1 + +This package is used to record legacy data of 0.6.1-beta.1. +Run following commands locally to record data to `tests/fixtures/legacy/0.6.1-beta.1`. + +```sh +cd tests/affine-legacy/0.6.1-beta.1 +yarn run unzip +yarn run e2e +``` + +If you want to debug, running `yarn run e2e --ui` is ok. Or using https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright is more better. diff --git a/tests/affine-legacy/0.6.1-beta.1/e2e/basic.spec.ts b/tests/affine-legacy/0.6.1-beta.1/e2e/basic.spec.ts new file mode 100644 index 0000000000..72bfe4fef5 --- /dev/null +++ b/tests/affine-legacy/0.6.1-beta.1/e2e/basic.spec.ts @@ -0,0 +1,36 @@ +import { patchDataEnhancement } from '@affine-test/kit/e2e-enhance/initializer'; +import { SnapshotStorage } from '@affine-test/kit/e2e-enhance/snapshot'; +import { test } from '@affine-test/kit/playwright'; +import { + clickNewPageButton, + waitForEditorLoad, +} from '@affine-test/kit/utils/page-logic'; + +test.beforeEach(async ({ page }) => { + await patchDataEnhancement(page); +}); + +test('record 0.6.1-beta.1 legacy data', async ({ page }) => { + await page.goto('http://localhost:8081/'); + await waitForEditorLoad(page); + await clickNewPageButton(page); + const locator = page.locator('v-line').nth(0); + await locator.fill('hello'); + + await page.keyboard.press('Enter'); + await page.keyboard.type('TEST CONTENT', { delay: 50 }); + + const localStorageData = await page.evaluate(() => + window.readAffineLocalStorage() + ); + const { idbData, binaries } = await page.evaluate(() => + window.readAffineDatabase() + ); + + const snapshotStorage = new SnapshotStorage('0.6.1-beta.1'); + await snapshotStorage.write({ + idbData, + localStorageData, + binaries, + }); +}); diff --git a/tests/affine-legacy/0.6.1-beta.1/package.json b/tests/affine-legacy/0.6.1-beta.1/package.json new file mode 100644 index 0000000000..9186b183b2 --- /dev/null +++ b/tests/affine-legacy/0.6.1-beta.1/package.json @@ -0,0 +1,22 @@ +{ + "name": "@affine-legacy/0.6.1-beta.1", + "description": "AFFiNE 0.6.1-beta.1 static output", + "scripts": { + "unzip": "wget -O static.zip https://github.com/toeverything/AFFiNE/releases/download/v0.6.1-beta.1/web-static.zip && unzip static.zip -d static", + "start": "yarn exec serve -s static -l 8081", + "e2e": "yarn playwright test" + }, + "devDependencies": { + "@affine-test/fixtures": "workspace:*", + "@affine-test/kit": "workspace:*", + "@blocksuite/block-std": "0.0.0-20231110042432-4fdac4dc-nightly", + "@blocksuite/blocks": "0.0.0-20231110042432-4fdac4dc-nightly", + "@blocksuite/global": "0.0.0-20231110042432-4fdac4dc-nightly", + "@blocksuite/store": "0.0.0-20231110042432-4fdac4dc-nightly", + "@playwright/test": "^1.39.0", + "express": "^4.18.2", + "http-proxy-middleware": "^3.0.0-beta.1", + "serve": "^14.2.1" + }, + "version": "0.10.0" +} diff --git a/tests/affine-legacy/0.6.1-beta.1/playwright.config.ts b/tests/affine-legacy/0.6.1-beta.1/playwright.config.ts new file mode 100644 index 0000000000..5bc51cec56 --- /dev/null +++ b/tests/affine-legacy/0.6.1-beta.1/playwright.config.ts @@ -0,0 +1,41 @@ +import type { + PlaywrightTestConfig, + PlaywrightWorkerOptions, +} from '@playwright/test'; + +const config: PlaywrightTestConfig = { + testDir: './e2e', + fullyParallel: true, + timeout: process.env.CI ? 50_000 : 30_000, + use: { + baseURL: 'http://localhost:8081/', + browserName: + (process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ?? + 'chromium', + permissions: ['clipboard-read', 'clipboard-write'], + viewport: { width: 1440, height: 800 }, + actionTimeout: 5 * 1000, + locale: 'en-US', + trace: 'on-first-retry', + video: 'on-first-retry', + }, + forbidOnly: !!process.env.CI, + workers: 4, + retries: 1, + reporter: process.env.CI ? 'github' : 'list', + webServer: [ + { + command: 'yarn run start', + port: 8081, + timeout: 120 * 1000, + reuseExistingServer: !process.env.CI, + }, + ], +}; + +if (process.env.CI) { + config.retries = 3; + config.workers = '50%'; +} + +export default config; diff --git a/tests/affine-legacy/0.6.1-beta.1/tsconfig.json b/tests/affine-legacy/0.6.1-beta.1/tsconfig.json new file mode 100644 index 0000000000..3c5d0565c0 --- /dev/null +++ b/tests/affine-legacy/0.6.1-beta.1/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "esModuleInterop": true, + "outDir": "lib" + }, + "include": ["e2e"], + "references": [ + { + "path": "../../../tests/kit" + }, + { + "path": "../../../tests/fixtures" + } + ] +} diff --git a/tests/affine-migration/e2e/basic.spec.ts b/tests/affine-migration/e2e/basic.spec.ts index 65ea737df1..51c9351998 100644 --- a/tests/affine-migration/e2e/basic.spec.ts +++ b/tests/affine-migration/e2e/basic.spec.ts @@ -120,3 +120,41 @@ test('v3 to v4, surface migration', async ({ page }) => { expect(workspace.version).toBe(4); } }); + +test('v0 to v4, subdoc migration', async ({ page }) => { + await open404PageToInitData(page, '0.6.1-beta.1'); + + await page.goto(coreUrl); + await page.waitForTimeout(5000); + + // go to all page + await clickSideBarAllPageButton(page); + + // find if page name with "hello" exists and click it + await page + .locator('[data-testid="page-list-item-title-text"]:has-text("hello")') + .click(); + + await waitForEditorLoad(page); + + // check if content is correct + expect(await page.locator('v-line').nth(0).textContent()).toBe('hello'); + expect(await page.locator('v-line').nth(1).textContent()).toBe( + 'TEST CONTENT' + ); + + // check edgeless mode is correct + await clickEdgelessModeButton(page); + await expect(page.locator('edgeless-toolbar')).toBeVisible(); + await expect(page.locator('affine-edgeless-page')).toBeVisible(); + + const changedLocalStorageData = await page.evaluate(() => + window.readAffineLocalStorage() + ); + const workspaces = JSON.parse( + changedLocalStorageData['jotai-workspaces'] + ) as any[]; + for (const workspace of workspaces) { + expect(workspace.version).toBe(4); + } +}); diff --git a/tests/fixtures/legacy/0.6.1-beta.1/idb.bin b/tests/fixtures/legacy/0.6.1-beta.1/idb.bin new file mode 100644 index 0000000000..2453007192 Binary files /dev/null and b/tests/fixtures/legacy/0.6.1-beta.1/idb.bin differ diff --git a/tests/fixtures/legacy/0.6.1-beta.1/idb.json b/tests/fixtures/legacy/0.6.1-beta.1/idb.json new file mode 100644 index 0000000000..baceedc69a --- /dev/null +++ b/tests/fixtures/legacy/0.6.1-beta.1/idb.json @@ -0,0 +1,530 @@ +[ + { + "name": "affine-local", + "version": 1, + "stores": [ + { + "name": "milestone", + "keyPath": "id", + "values": [] + }, + { + "name": "workspace", + "keyPath": "id", + "values": [ + { + "id": "sdI1qQamsV", + "updates": [ + { + "timestamp": 1699853753756, + "update": "__BINARY__1" + }, + { + "timestamp": 1699853753757, + "update": "__BINARY__2" + }, + { + "timestamp": 1699853753757, + "update": "__BINARY__3" + }, + { + "timestamp": 1699853753757, + "update": "__BINARY__4" + }, + { + "timestamp": 1699853753757, + "update": "__BINARY__5" + }, + { + "timestamp": 1699853753757, + "update": "__BINARY__6" + }, + { + "timestamp": 1699853753758, + "update": "__BINARY__7" + }, + { + "timestamp": 1699853753758, + "update": "__BINARY__8" + }, + { + "timestamp": 1699853753758, + "update": "__BINARY__9" + }, + { + "timestamp": 1699853753759, + "update": "__BINARY__10" + }, + { + "timestamp": 1699853753760, + "update": "__BINARY__11" + }, + { + "timestamp": 1699853753760, + "update": "__BINARY__12" + }, + { + "timestamp": 1699853753761, + "update": "__BINARY__13" + }, + { + "timestamp": 1699853753762, + "update": "__BINARY__14" + }, + { + "timestamp": 1699853753767, + "update": "__BINARY__15" + }, + { + "timestamp": 1699853753768, + "update": "__BINARY__16" + }, + { + "timestamp": 1699853753770, + "update": "__BINARY__17" + }, + { + "timestamp": 1699853753770, + "update": "__BINARY__18" + }, + { + "timestamp": 1699853753771, + "update": "__BINARY__19" + }, + { + "timestamp": 1699853753772, + "update": "__BINARY__20" + }, + { + "timestamp": 1699853753773, + "update": "__BINARY__21" + }, + { + "timestamp": 1699853753774, + "update": "__BINARY__22" + }, + { + "timestamp": 1699853753775, + "update": "__BINARY__23" + }, + { + "timestamp": 1699853753776, + "update": "__BINARY__24" + }, + { + "timestamp": 1699853753777, + "update": "__BINARY__25" + }, + { + "timestamp": 1699853753778, + "update": "__BINARY__26" + }, + { + "timestamp": 1699853753778, + "update": "__BINARY__27" + }, + { + "timestamp": 1699853753779, + "update": "__BINARY__28" + }, + { + "timestamp": 1699853753780, + "update": "__BINARY__29" + }, + { + "timestamp": 1699853753781, + "update": "__BINARY__30" + }, + { + "timestamp": 1699853753782, + "update": "__BINARY__31" + }, + { + "timestamp": 1699853753783, + "update": "__BINARY__32" + }, + { + "timestamp": 1699853753783, + "update": "__BINARY__33" + }, + { + "timestamp": 1699853753784, + "update": "__BINARY__34" + }, + { + "timestamp": 1699853753785, + "update": "__BINARY__35" + }, + { + "timestamp": 1699853753786, + "update": "__BINARY__36" + }, + { + "timestamp": 1699853753787, + "update": "__BINARY__37" + }, + { + "timestamp": 1699853753787, + "update": "__BINARY__38" + }, + { + "timestamp": 1699853753788, + "update": "__BINARY__39" + }, + { + "timestamp": 1699853753789, + "update": "__BINARY__40" + }, + { + "timestamp": 1699853753790, + "update": "__BINARY__41" + }, + { + "timestamp": 1699853753791, + "update": "__BINARY__42" + }, + { + "timestamp": 1699853753792, + "update": "__BINARY__43" + }, + { + "timestamp": 1699853753793, + "update": "__BINARY__44" + }, + { + "timestamp": 1699853753794, + "update": "__BINARY__45" + }, + { + "timestamp": 1699853753794, + "update": "__BINARY__46" + }, + { + "timestamp": 1699853753795, + "update": "__BINARY__47" + }, + { + "timestamp": 1699853753796, + "update": "__BINARY__48" + }, + { + "timestamp": 1699853753797, + "update": "__BINARY__49" + }, + { + "timestamp": 1699853753798, + "update": "__BINARY__50" + }, + { + "timestamp": 1699853753799, + "update": "__BINARY__51" + }, + { + "timestamp": 1699853753800, + "update": "__BINARY__52" + }, + { + "timestamp": 1699853753801, + "update": "__BINARY__53" + }, + { + "timestamp": 1699853753802, + "update": "__BINARY__54" + }, + { + "timestamp": 1699853753802, + "update": "__BINARY__55" + }, + { + "timestamp": 1699853753803, + "update": "__BINARY__56" + }, + { + "timestamp": 1699853753804, + "update": "__BINARY__57" + }, + { + "timestamp": 1699853753805, + "update": "__BINARY__58" + }, + { + "timestamp": 1699853753806, + "update": "__BINARY__59" + }, + { + "timestamp": 1699853753807, + "update": "__BINARY__60" + }, + { + "timestamp": 1699853753807, + "update": "__BINARY__61" + }, + { + "timestamp": 1699853753808, + "update": "__BINARY__62" + }, + { + "timestamp": 1699853753809, + "update": "__BINARY__63" + }, + { + "timestamp": 1699853753810, + "update": "__BINARY__64" + }, + { + "timestamp": 1699853753811, + "update": "__BINARY__65" + }, + { + "timestamp": 1699853753811, + "update": "__BINARY__66" + }, + { + "timestamp": 1699853753812, + "update": "__BINARY__67" + }, + { + "timestamp": 1699853753813, + "update": "__BINARY__68" + }, + { + "timestamp": 1699853753814, + "update": "__BINARY__69" + }, + { + "timestamp": 1699853753815, + "update": "__BINARY__70" + }, + { + "timestamp": 1699853753816, + "update": "__BINARY__71" + }, + { + "timestamp": 1699853753817, + "update": "__BINARY__72" + }, + { + "timestamp": 1699853753818, + "update": "__BINARY__73" + }, + { + "timestamp": 1699853753818, + "update": "__BINARY__74" + }, + { + "timestamp": 1699853753819, + "update": "__BINARY__75" + }, + { + "timestamp": 1699853753820, + "update": "__BINARY__76" + }, + { + "timestamp": 1699853754053, + "update": "__BINARY__77" + }, + { + "timestamp": 1699853755314, + "update": "__BINARY__78" + }, + { + "timestamp": 1699853755516, + "update": "__BINARY__79" + }, + { + "timestamp": 1699853755920, + "update": "__BINARY__80" + }, + { + "timestamp": 1699853755921, + "update": "__BINARY__81" + }, + { + "timestamp": 1699853755922, + "update": "__BINARY__82" + }, + { + "timestamp": 1699853755923, + "update": "__BINARY__83" + }, + { + "timestamp": 1699853755924, + "update": "__BINARY__84" + }, + { + "timestamp": 1699853755925, + "update": "__BINARY__85" + }, + { + "timestamp": 1699853755926, + "update": "__BINARY__86" + }, + { + "timestamp": 1699853755930, + "update": "__BINARY__87" + }, + { + "timestamp": 1699853755932, + "update": "__BINARY__88" + }, + { + "timestamp": 1699853755933, + "update": "__BINARY__89" + }, + { + "timestamp": 1699853755934, + "update": "__BINARY__90" + }, + { + "timestamp": 1699853755935, + "update": "__BINARY__91" + }, + { + "timestamp": 1699853756122, + "update": "__BINARY__92" + }, + { + "timestamp": 1699853756123, + "update": "__BINARY__93" + }, + { + "timestamp": 1699853756124, + "update": "__BINARY__94" + }, + { + "timestamp": 1699853756125, + "update": "__BINARY__95" + }, + { + "timestamp": 1699853756129, + "update": "__BINARY__96" + }, + { + "timestamp": 1699853756130, + "update": "__BINARY__97" + }, + { + "timestamp": 1699853756131, + "update": "__BINARY__98" + }, + { + "timestamp": 1699853756132, + "update": "__BINARY__99" + }, + { + "timestamp": 1699853756134, + "update": "__BINARY__100" + }, + { + "timestamp": 1699853756135, + "update": "__BINARY__101" + }, + { + "timestamp": 1699853756146, + "update": "__BINARY__102" + }, + { + "timestamp": 1699853756154, + "update": "__BINARY__103" + }, + { + "timestamp": 1699853756155, + "update": "__BINARY__104" + }, + { + "timestamp": 1699853756158, + "update": "__BINARY__105" + }, + { + "timestamp": 1699853756161, + "update": "__BINARY__106" + }, + { + "timestamp": 1699853756162, + "update": "__BINARY__107" + }, + { + "timestamp": 1699853756163, + "update": "__BINARY__108" + }, + { + "timestamp": 1699853756164, + "update": "__BINARY__109" + }, + { + "timestamp": 1699853756165, + "update": "__BINARY__110" + }, + { + "timestamp": 1699853756212, + "update": "__BINARY__111" + }, + { + "timestamp": 1699853756266, + "update": "__BINARY__112" + }, + { + "timestamp": 1699853756321, + "update": "__BINARY__113" + }, + { + "timestamp": 1699853756375, + "update": "__BINARY__114" + }, + { + "timestamp": 1699853756435, + "update": "__BINARY__115" + }, + { + "timestamp": 1699853756490, + "update": "__BINARY__116" + }, + { + "timestamp": 1699853756546, + "update": "__BINARY__117" + }, + { + "timestamp": 1699853756607, + "update": "__BINARY__118" + }, + { + "timestamp": 1699853756672, + "update": "__BINARY__119" + }, + { + "timestamp": 1699853756734, + "update": "__BINARY__120" + }, + { + "timestamp": 1699853756806, + "update": "__BINARY__121" + } + ] + } + ] + } + ] + }, + { + "name": "page-view", + "version": 1, + "stores": [ + { + "name": "view", + "keyPath": "id", + "values": [] + } + ] + }, + { + "name": "sdI1qQamsV_blob", + "version": 1, + "stores": [ + { + "name": "blob", + "keyPath": null, + "values": [] + } + ] + } +] diff --git a/tests/fixtures/legacy/0.6.1-beta.1/idb_index.json b/tests/fixtures/legacy/0.6.1-beta.1/idb_index.json new file mode 100644 index 0000000000..e5370677f4 --- /dev/null +++ b/tests/fixtures/legacy/0.6.1-beta.1/idb_index.json @@ -0,0 +1,607 @@ +[ + { + "name": "__BINARY__1", + "start": 0, + "end": 189 + }, + { + "name": "__BINARY__2", + "start": 189, + "end": 251 + }, + { + "name": "__BINARY__3", + "start": 251, + "end": 564 + }, + { + "name": "__BINARY__4", + "start": 564, + "end": 626 + }, + { + "name": "__BINARY__5", + "start": 626, + "end": 923 + }, + { + "name": "__BINARY__6", + "start": 923, + "end": 985 + }, + { + "name": "__BINARY__7", + "start": 985, + "end": 1280 + }, + { + "name": "__BINARY__8", + "start": 1280, + "end": 1342 + }, + { + "name": "__BINARY__9", + "start": 1342, + "end": 126036 + }, + { + "name": "__BINARY__10", + "start": 126036, + "end": 126099 + }, + { + "name": "__BINARY__11", + "start": 126099, + "end": 126402 + }, + { + "name": "__BINARY__12", + "start": 126402, + "end": 126467 + }, + { + "name": "__BINARY__13", + "start": 126467, + "end": 126769 + }, + { + "name": "__BINARY__14", + "start": 126769, + "end": 126834 + }, + { + "name": "__BINARY__15", + "start": 126834, + "end": 127137 + }, + { + "name": "__BINARY__16", + "start": 127137, + "end": 127202 + }, + { + "name": "__BINARY__17", + "start": 127202, + "end": 127504 + }, + { + "name": "__BINARY__18", + "start": 127504, + "end": 127569 + }, + { + "name": "__BINARY__19", + "start": 127569, + "end": 127873 + }, + { + "name": "__BINARY__20", + "start": 127873, + "end": 127938 + }, + { + "name": "__BINARY__21", + "start": 127938, + "end": 128261 + }, + { + "name": "__BINARY__22", + "start": 128261, + "end": 128326 + }, + { + "name": "__BINARY__23", + "start": 128326, + "end": 128647 + }, + { + "name": "__BINARY__24", + "start": 128647, + "end": 128712 + }, + { + "name": "__BINARY__25", + "start": 128712, + "end": 129034 + }, + { + "name": "__BINARY__26", + "start": 129034, + "end": 129099 + }, + { + "name": "__BINARY__27", + "start": 129099, + "end": 129370 + }, + { + "name": "__BINARY__28", + "start": 129370, + "end": 129435 + }, + { + "name": "__BINARY__29", + "start": 129435, + "end": 129895 + }, + { + "name": "__BINARY__30", + "start": 129895, + "end": 129960 + }, + { + "name": "__BINARY__31", + "start": 129960, + "end": 130307 + }, + { + "name": "__BINARY__32", + "start": 130307, + "end": 130372 + }, + { + "name": "__BINARY__33", + "start": 130372, + "end": 130738 + }, + { + "name": "__BINARY__34", + "start": 130738, + "end": 130803 + }, + { + "name": "__BINARY__35", + "start": 130803, + "end": 131698 + }, + { + "name": "__BINARY__36", + "start": 131698, + "end": 131763 + }, + { + "name": "__BINARY__37", + "start": 131763, + "end": 131916 + }, + { + "name": "__BINARY__38", + "start": 131916, + "end": 131981 + }, + { + "name": "__BINARY__39", + "start": 131981, + "end": 132435 + }, + { + "name": "__BINARY__40", + "start": 132435, + "end": 132500 + }, + { + "name": "__BINARY__41", + "start": 132500, + "end": 132730 + }, + { + "name": "__BINARY__42", + "start": 132730, + "end": 132795 + }, + { + "name": "__BINARY__43", + "start": 132795, + "end": 133172 + }, + { + "name": "__BINARY__44", + "start": 133172, + "end": 133237 + }, + { + "name": "__BINARY__45", + "start": 133237, + "end": 133466 + }, + { + "name": "__BINARY__46", + "start": 133466, + "end": 133531 + }, + { + "name": "__BINARY__47", + "start": 133531, + "end": 133935 + }, + { + "name": "__BINARY__48", + "start": 133935, + "end": 134000 + }, + { + "name": "__BINARY__49", + "start": 134000, + "end": 134228 + }, + { + "name": "__BINARY__50", + "start": 134228, + "end": 134293 + }, + { + "name": "__BINARY__51", + "start": 134293, + "end": 134626 + }, + { + "name": "__BINARY__52", + "start": 134626, + "end": 134691 + }, + { + "name": "__BINARY__53", + "start": 134691, + "end": 134921 + }, + { + "name": "__BINARY__54", + "start": 134921, + "end": 134986 + }, + { + "name": "__BINARY__55", + "start": 134986, + "end": 135372 + }, + { + "name": "__BINARY__56", + "start": 135372, + "end": 135437 + }, + { + "name": "__BINARY__57", + "start": 135437, + "end": 135679 + }, + { + "name": "__BINARY__58", + "start": 135679, + "end": 135744 + }, + { + "name": "__BINARY__59", + "start": 135744, + "end": 136129 + }, + { + "name": "__BINARY__60", + "start": 136129, + "end": 136194 + }, + { + "name": "__BINARY__61", + "start": 136194, + "end": 136417 + }, + { + "name": "__BINARY__62", + "start": 136417, + "end": 136482 + }, + { + "name": "__BINARY__63", + "start": 136482, + "end": 136758 + }, + { + "name": "__BINARY__64", + "start": 136758, + "end": 136823 + }, + { + "name": "__BINARY__65", + "start": 136823, + "end": 137319 + }, + { + "name": "__BINARY__66", + "start": 137319, + "end": 137384 + }, + { + "name": "__BINARY__67", + "start": 137384, + "end": 137538 + }, + { + "name": "__BINARY__68", + "start": 137538, + "end": 137603 + }, + { + "name": "__BINARY__69", + "start": 137603, + "end": 139400 + }, + { + "name": "__BINARY__70", + "start": 139400, + "end": 139465 + }, + { + "name": "__BINARY__71", + "start": 139465, + "end": 139692 + }, + { + "name": "__BINARY__72", + "start": 139692, + "end": 139757 + }, + { + "name": "__BINARY__73", + "start": 139757, + "end": 139980 + }, + { + "name": "__BINARY__74", + "start": 139980, + "end": 140045 + }, + { + "name": "__BINARY__75", + "start": 140045, + "end": 140266 + }, + { + "name": "__BINARY__76", + "start": 140266, + "end": 140331 + }, + { + "name": "__BINARY__77", + "start": 140331, + "end": 278777 + }, + { + "name": "__BINARY__78", + "start": 278777, + "end": 278804 + }, + { + "name": "__BINARY__79", + "start": 278804, + "end": 417260 + }, + { + "name": "__BINARY__80", + "start": 417260, + "end": 417300 + }, + { + "name": "__BINARY__81", + "start": 417300, + "end": 417388 + }, + { + "name": "__BINARY__82", + "start": 417388, + "end": 417475 + }, + { + "name": "__BINARY__83", + "start": 417475, + "end": 417565 + }, + { + "name": "__BINARY__84", + "start": 417565, + "end": 417655 + }, + { + "name": "__BINARY__85", + "start": 417655, + "end": 417743 + }, + { + "name": "__BINARY__86", + "start": 417743, + "end": 417832 + }, + { + "name": "__BINARY__87", + "start": 417832, + "end": 417922 + }, + { + "name": "__BINARY__88", + "start": 417922, + "end": 418014 + }, + { + "name": "__BINARY__89", + "start": 418014, + "end": 418103 + }, + { + "name": "__BINARY__90", + "start": 418103, + "end": 418193 + }, + { + "name": "__BINARY__91", + "start": 418193, + "end": 418230 + }, + { + "name": "__BINARY__92", + "start": 418230, + "end": 418344 + }, + { + "name": "__BINARY__93", + "start": 418344, + "end": 418493 + }, + { + "name": "__BINARY__94", + "start": 418493, + "end": 418523 + }, + { + "name": "__BINARY__95", + "start": 418523, + "end": 418676 + }, + { + "name": "__BINARY__96", + "start": 418676, + "end": 418706 + }, + { + "name": "__BINARY__97", + "start": 418706, + "end": 418979 + }, + { + "name": "__BINARY__98", + "start": 418979, + "end": 419009 + }, + { + "name": "__BINARY__99", + "start": 419009, + "end": 419210 + }, + { + "name": "__BINARY__100", + "start": 419210, + "end": 419240 + }, + { + "name": "__BINARY__101", + "start": 419240, + "end": 419281 + }, + { + "name": "__BINARY__102", + "start": 419281, + "end": 419323 + }, + { + "name": "__BINARY__103", + "start": 419323, + "end": 419360 + }, + { + "name": "__BINARY__104", + "start": 419360, + "end": 419397 + }, + { + "name": "__BINARY__105", + "start": 419397, + "end": 419438 + }, + { + "name": "__BINARY__106", + "start": 419438, + "end": 419473 + }, + { + "name": "__BINARY__107", + "start": 419473, + "end": 419673 + }, + { + "name": "__BINARY__108", + "start": 419673, + "end": 419708 + }, + { + "name": "__BINARY__109", + "start": 419708, + "end": 419729 + }, + { + "name": "__BINARY__110", + "start": 419729, + "end": 419772 + }, + { + "name": "__BINARY__111", + "start": 419772, + "end": 419792 + }, + { + "name": "__BINARY__112", + "start": 419792, + "end": 419812 + }, + { + "name": "__BINARY__113", + "start": 419812, + "end": 419832 + }, + { + "name": "__BINARY__114", + "start": 419832, + "end": 419852 + }, + { + "name": "__BINARY__115", + "start": 419852, + "end": 419872 + }, + { + "name": "__BINARY__116", + "start": 419872, + "end": 419892 + }, + { + "name": "__BINARY__117", + "start": 419892, + "end": 419912 + }, + { + "name": "__BINARY__118", + "start": 419912, + "end": 419932 + }, + { + "name": "__BINARY__119", + "start": 419932, + "end": 419952 + }, + { + "name": "__BINARY__120", + "start": 419952, + "end": 419972 + }, + { + "name": "__BINARY__121", + "start": 419972, + "end": 419992 + } +] diff --git a/tests/fixtures/legacy/0.6.1-beta.1/local-storage.json b/tests/fixtures/legacy/0.6.1-beta.1/local-storage.json new file mode 100644 index 0000000000..d9dbdd97fe --- /dev/null +++ b/tests/fixtures/legacy/0.6.1-beta.1/local-storage.json @@ -0,0 +1,7 @@ +{ + "jotai-workspaces": "[{\"id\":\"sdI1qQamsV\",\"flavour\":\"local\"}]", + "last_page_id": "-RlV_W_Ey1", + "last_workspace_id": "sdI1qQamsV", + "affine-local-workspace": "[\"sdI1qQamsV\"]", + "is-first-open": "false" +} diff --git a/tsconfig.json b/tsconfig.json index f5fe164de3..0439ba2331 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -190,6 +190,9 @@ { "path": "./tests/affine-legacy/0.8.4" }, + { + "path": "./tests/affine-legacy/0.6.1-beta.1" + }, // Others { "path": "./tsconfig.node.json" diff --git a/yarn.lock b/yarn.lock index ed763c9e86..5dcf5d2005 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,6 +19,23 @@ __metadata: languageName: node linkType: hard +"@affine-legacy/0.6.1-beta.1@workspace:tests/affine-legacy/0.6.1-beta.1": + version: 0.0.0-use.local + resolution: "@affine-legacy/0.6.1-beta.1@workspace:tests/affine-legacy/0.6.1-beta.1" + dependencies: + "@affine-test/fixtures": "workspace:*" + "@affine-test/kit": "workspace:*" + "@blocksuite/block-std": "npm:0.0.0-20231110042432-4fdac4dc-nightly" + "@blocksuite/blocks": "npm:0.0.0-20231110042432-4fdac4dc-nightly" + "@blocksuite/global": "npm:0.0.0-20231110042432-4fdac4dc-nightly" + "@blocksuite/store": "npm:0.0.0-20231110042432-4fdac4dc-nightly" + "@playwright/test": "npm:^1.39.0" + express: "npm:^4.18.2" + http-proxy-middleware: "npm:^3.0.0-beta.1" + serve: "npm:^14.2.1" + languageName: unknown + linkType: soft + "@affine-legacy/0.7.0-canary.18@workspace:tests/affine-legacy/0.7.0-canary.18": version: 0.0.0-use.local resolution: "@affine-legacy/0.7.0-canary.18@workspace:tests/affine-legacy/0.7.0-canary.18"