There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat: upload 0.7.0-canary.18 static output (#2883)
Alex Yang20fd9b65743b
diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.ymlindex b3fd946c4b..02efa4063a 100644--- a/.github/actions/setup-node/action.yml+++ b/.github/actions/setup-node/action.yml@@ -82,7 +82,7 @@ runs:id: playwright-versionif: ${{ inputs.playwright-install == 'true' }}shell: bash- run: echo "version=$(yarn why --json @playwright/test | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://')" >> $GITHUB_OUTPUT+ run: echo "version=$(yarn why --json @playwright/test | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://' | head -n 1)" >> $GITHUB_OUTPUT# Attempt to restore the correct Playwright browser binaries based on the# currently installed version of Playwright (The browser binary versionsdiff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex ad53f7579e..9d9a686c66 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -273,6 +273,26 @@ jobs:path: ./test-resultsif-no-files-found: ignore+ e2e-migration-test:+ name: E2E Migration Test+ runs-on: ubuntu-latest+ environment: development++ steps:+ - uses: actions/checkout@v3+ - name: Setup Node.js+ uses: ./.github/actions/setup-node+ with:+ playwright-install: true++ - name: Unzip+ run: yarn unzip+ working-directory: ./tests/affine-legacy/0.7.0-canary.18++ - name: Run legacy playwright tests+ run: yarn e2e --forbid-only+ working-directory: ./tests/affine-legacy/0.7.0-canary.18+desktop-test:name: Desktop Testruns-on: ${{ matrix.spec.os }}diff --git a/package.json b/package.jsonindex 324cd420b8..14d558eae0 100644--- a/package.json+++ b/package.json@@ -10,7 +10,8 @@"plugins/*","packages/*","tests/fixtures",- "tests/kit"+ "tests/kit",+ "tests/affine-legacy/*"],"scripts": {"dev": "dev-web",diff --git a/tests/affine-legacy/0.7.0-canary.18/.gitignore b/tests/affine-legacy/0.7.0-canary.18/.gitignorenew file mode 100644index 0000000000..afadae9297--- /dev/null+++ b/tests/affine-legacy/0.7.0-canary.18/.gitignore@@ -0,0 +1,2 @@+static+tests/fixtures/*.ydocdiff --git a/tests/affine-legacy/0.7.0-canary.18/README.md b/tests/affine-legacy/0.7.0-canary.18/README.mdnew file mode 100644index 0000000000..a69605476c--- /dev/null+++ b/tests/affine-legacy/0.7.0-canary.18/README.md@@ -0,0 +1,7 @@+# AFFiNE Legacy 0.7.0-canary.18++> This package is static output of AFFiNE 0.7.0-canary.18+>+> **This package is for debug only**.+>+> DO NOT MODIFY `affine-web.zip`diff --git a/tests/affine-legacy/0.7.0-canary.18/affine-web.zip b/tests/affine-legacy/0.7.0-canary.18/affine-web.zipnew file mode 100644index 0000000000..66d36ef0c8Binary files /dev/null and b/tests/affine-legacy/0.7.0-canary.18/affine-web.zip differdiff --git a/tests/affine-legacy/0.7.0-canary.18/package.json b/tests/affine-legacy/0.7.0-canary.18/package.jsonnew file mode 100644index 0000000000..1ab98386e0--- /dev/null+++ b/tests/affine-legacy/0.7.0-canary.18/package.json@@ -0,0 +1,16 @@+{+ "name": "@affine-legacy/0.7.0-canary.18",+ "description": "AFFiNE 0.7.0-canary.18 static output",+ "scripts": {+ "unzip": "unzip affine-web -d static",+ "start": "yarn exec serve -s static -l 8081",+ "e2e": "playwright test"+ },+ "devDependencies": {+ "@affine-test/fixtures": "workspace:*",+ "@affine-test/kit": "workspace:*",+ "@playwright/test": "=1.33.0",+ "playwright": "=1.33.0",+ "serve": "^14.2.0"+ }+}diff --git a/tests/affine-legacy/0.7.0-canary.18/playwright.config.ts b/tests/affine-legacy/0.7.0-canary.18/playwright.config.tsnew file mode 100644index 0000000000..1aec9a1442--- /dev/null+++ b/tests/affine-legacy/0.7.0-canary.18/playwright.config.ts@@ -0,0 +1,41 @@+import type {+ PlaywrightTestConfig,+ PlaywrightWorkerOptions,+} from '@playwright/test';++const config: PlaywrightTestConfig = {+ testDir: './tests',+ 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 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.7.0-canary.18/tests/basic.spec.ts b/tests/affine-legacy/0.7.0-canary.18/tests/basic.spec.tsnew file mode 100644index 0000000000..dd9bb207d6--- /dev/null+++ b/tests/affine-legacy/0.7.0-canary.18/tests/basic.spec.ts@@ -0,0 +1,22 @@+import { resolve } from 'node:path';++import { test } from '@playwright/test';++test('init page', async ({ page }) => {+ await page.goto('http://localhost:8081/');+ await page.waitForSelector('v-line');++ const currentWorkspaceId: string = await page.evaluate(+ () => (globalThis.currentWorkspace as any).id+ );++ const downloadPromise = page.waitForEvent('download');+ await page.evaluate(() => {+ const workspace = (globalThis.currentWorkspace as any).blockSuiteWorkspace;+ workspace.exportYDoc();+ });++ const download = await downloadPromise;+ const output = resolve(__dirname, 'fixtures', currentWorkspaceId + '.ydoc');+ await download.saveAs(output);+});diff --git a/yarn.lock b/yarn.lockindex 611f3eda04..0e80e1e0f6 100644--- a/yarn.lock+++ b/yarn.lock@@ -12,6 +12,18 @@ __metadata:languageName: nodelinkType: hard+"@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"+ dependencies:+ "@affine-test/fixtures": "workspace:*"+ "@affine-test/kit": "workspace:*"+ "@playwright/test": =1.33.0+ playwright: =1.33.0+ serve: ^14.2.0+ languageName: unknown+ linkType: soft+"@affine-test/fixtures@workspace:*, @affine-test/fixtures@workspace:tests/fixtures":version: 0.0.0-use.localresolution: "@affine-test/fixtures@workspace:tests/fixtures"