Browse Source

test: trigger soft delete instead of full project delete

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5937/head
Raju Udava 1 year ago
parent
commit
8fe8449071
  1. 21
      packages/nocodb/src/controllers/test/TestResetService/index.ts
  2. 4
      tests/playwright/tests/db/filters.spec.ts

21
packages/nocodb/src/controllers/test/TestResetService/index.ts

@ -116,14 +116,19 @@ export class TestResetService {
if (project) {
await removeProjectUsersFromCache(project);
const bases = await project.getBases();
for (const base of bases) {
await NcConnectionMgrv2.deleteAwait(base);
await base.delete(Noco.ncMeta, { force: true });
}
await Project.delete(project.id);
// Kludge: Soft reset to support PG as root DB in PW tests
// Revisit to fix this later
// const bases = await project.getBases();
//
// for (const base of bases) {
// await NcConnectionMgrv2.deleteAwait(base);
// await base.delete(Noco.ncMeta, { force: true });
// }
//
// await Project.delete(project.id);
await Project.softDelete(project.id);
}
if (dbType == 'sqlite') {

4
tests/playwright/tests/db/filters.spec.ts

@ -1163,10 +1163,6 @@ test.describe('Filter Tests: Filter groups', () => {
});
test('Filter: Empty filters', async () => {
if (isPg(context)) {
test.skip();
}
await dashboard.closeTab({ title: 'Team & Auth' });
await dashboard.treeView.openTable({ title: 'Country', networkResponse: false });

Loading…
Cancel
Save