test: add workspace ref in e2e (#3217)

This commit is contained in:
Alex Yang
2023-07-13 20:41:46 +08:00
committed by GitHub
parent 64cf297399
commit d18df12951
18 changed files with 140 additions and 101 deletions

View File

@@ -26,10 +26,6 @@ export const test = base.extend<{
appData: string;
sessionData: string;
};
workspace: {
// get current workspace
current: () => Promise<any>; // todo: type
};
router: {
goto: (path: RoutePath) => Promise<void>;
};
@@ -121,14 +117,4 @@ export const test = base.extend<{
});
await use(appInfo);
},
workspace: async ({ page }, use) => {
await use({
current: async () => {
return await page.evaluate(async () => {
// @ts-expect-error
return globalThis.currentWorkspace;
});
},
});
},
});