refactor(electron): create electron api package (#5334)

This commit is contained in:
EYHN
2023-12-27 06:38:37 +00:00
parent ce17daba42
commit 4e861d8118
53 changed files with 307 additions and 690 deletions
@@ -1,10 +1,17 @@
import path from 'node:path';
import type { apis } from '@affine/electron-api';
import { test } from '@affine-test/kit/electron';
import { clickSideBarCurrentWorkspaceBanner } from '@affine-test/kit/utils/sidebar';
import { expect } from '@playwright/test';
import fs from 'fs-extra';
declare global {
interface Window {
apis: typeof apis;
}
}
test('check workspace has a DB file', async ({ appInfo, workspace }) => {
const w = await workspace.current();
const dbPath = path.join(
+1
View File
@@ -7,6 +7,7 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@affine/electron-api": "workspace:*",
"@playwright/test": "^1.39.0",
"@types/fs-extra": "^11.0.2",
"fs-extra": "^11.1.1",
+3
View File
@@ -11,6 +11,9 @@
},
{
"path": "../../tests/fixtures"
},
{
"path": "../../packages/frontend/electron-api"
}
]
}