From 48fb3c0804e1e02d80be47dbfca91c473cc07267 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 9 Oct 2023 15:57:17 +0000 Subject: [PATCH] fix(nc-gui): Fixed shared base editor issue --- .../tests/db/features/baseShare.spec.ts | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/tests/playwright/tests/db/features/baseShare.spec.ts b/tests/playwright/tests/db/features/baseShare.spec.ts index ed675f5b32..08e3918d36 100644 --- a/tests/playwright/tests/db/features/baseShare.spec.ts +++ b/tests/playwright/tests/db/features/baseShare.spec.ts @@ -67,34 +67,36 @@ test.describe('Shared base', () => { let url = ''; // share button visible only if a table is opened await dashboard.treeView.openTable({ title: 'Country' }); - url = await dashboard.grid.topbar.getSharedBaseUrl({ role: 'editor', enableSharedBase: true }); - - await dashboard.rootPage.waitForTimeout(2000); - // access shared base link - await dashboard.signOut(); - await dashboard.rootPage.waitForTimeout(2000); - // todo: Move this to a page object - await dashboard.rootPage.goto(url); - - await roleTest('editor'); + if (!isEE()) { + url = await dashboard.grid.topbar.getSharedBaseUrl({ role: 'editor', enableSharedBase: true }); + + await dashboard.rootPage.waitForTimeout(2000); + // access shared base link + await dashboard.signOut(); + await dashboard.rootPage.waitForTimeout(2000); + // todo: Move this to a page object + await dashboard.rootPage.goto(url); + + await roleTest('editor'); + + await loginPage.signIn({ + email: `user-${process.env.TEST_PARALLEL_INDEX}@nocodb.com`, + password: getDefaultPwd(), + withoutPrefix: true, + }); - await loginPage.signIn({ - email: `user-${process.env.TEST_PARALLEL_INDEX}@nocodb.com`, - password: getDefaultPwd(), - withoutPrefix: true, - }); + await dashboard.rootPage.waitForTimeout(1000); - await dashboard.rootPage.waitForTimeout(1000); + if (isEE()) { + await dashboard.grid.workspaceMenu.switchWorkspace({ + workspaceTitle: context.workspace.title, + }); + } - if (isEE()) { - await dashboard.grid.workspaceMenu.switchWorkspace({ - workspaceTitle: context.workspace.title, - }); + await dashboard.treeView.openProject({ title: context.base.title, context }); + await dashboard.treeView.openTable({ title: 'Country' }); } - await dashboard.treeView.openProject({ title: context.base.title, context }); - await dashboard.treeView.openTable({ title: 'Country' }); - url = await dashboard.grid.topbar.getSharedBaseUrl({ role: 'viewer', enableSharedBase: false }); await dashboard.rootPage.waitForTimeout(2000);