feat(e2e): add test.pgOnly (#2923)

This commit is contained in:
被雨水过滤的空气-Rain 2023-10-27 16:54:11 +08:00 committed by GitHub
parent 29bf187fbf
commit 1ec2d00208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,7 @@ class NocoPage {
}
}
export const test = base.extend<{
const _test = base.extend<{
mockPage: (config?: PageConfig) => NocoPage;
createCollections: (collectionSettings: CollectionSetting | CollectionSetting[]) => Promise<void>;
}>({
@ -206,6 +206,11 @@ export const test = base.extend<{
},
});
export const test = Object.assign(_test, {
/** 只运行在 postgres 数据库中 */
pgOnly: process.env.DB_DIALECT == 'postgres' ? _test : _test.skip,
});
const getStorageItem = (key: string, storageState: any) => {
return storageState.origins
.find((item) => item.origin === `http://localhost:${process.env.APP_PORT}`)