fix: sqlite provider import sub doc db file (#2991)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-07-05 01:47:42 +08:00
committed by Alex Yang
parent c5f5e606b0
commit 093851ec0c
7 changed files with 49 additions and 39 deletions

View File

@@ -16,6 +16,8 @@ function generateUUID() {
return crypto.randomUUID();
}
type RoutePath = 'setting';
export const test = base.extend<{
page: Page;
electronApp: ElectronApplication;
@@ -28,6 +30,9 @@ export const test = base.extend<{
// get current workspace
current: () => Promise<any>; // todo: type
};
router: {
goto: (path: RoutePath) => Promise<void>;
};
}>({
page: async ({ electronApp }, use) => {
const page = await electronApp.firstWindow();
@@ -41,10 +46,6 @@ export const test = base.extend<{
});
});
}
const logFilePath = await page.evaluate(async () => {
// @ts-expect-error
return window.apis?.debug.logFilePath();
});
// wat for blocksuite to be loaded
await page.waitForSelector('v-line');
if (enableCoverage) {
@@ -71,10 +72,6 @@ export const test = base.extend<{
);
}
await page.close();
if (logFilePath) {
const logs = await fs.readFile(logFilePath, 'utf-8');
console.log(logs);
}
},
electronApp: async ({}, use) => {
// a random id to avoid conflicts between tests

View File

@@ -5,7 +5,7 @@ import fs from 'fs-extra';
import { test } from './fixture';
test.skip('check workspace has a DB file', async ({ appInfo, workspace }) => {
test('check workspace has a DB file', async ({ appInfo, workspace }) => {
const w = await workspace.current();
const dbPath = path.join(
appInfo.sessionData,

View File

@@ -30,7 +30,7 @@ const buildPreset = {
enablePreloading: true,
enableNewSettingModal: true,
enableNewSettingUnstableApi: false,
enableSQLiteProvider: false,
enableSQLiteProvider: true,
enableNotificationCenter: false,
enableCloud: false,
},
@@ -47,7 +47,7 @@ const buildPreset = {
enablePreloading: true,
enableNewSettingModal: true,
enableNewSettingUnstableApi: false,
enableSQLiteProvider: false,
enableSQLiteProvider: true,
enableNotificationCenter: true,
enableCloud: false,
},