Browse Source

fix(nc-gui): Fixed shared base editor issue

pull/6622/head
Muhammed Mustafa 1 year ago
parent
commit
48fb3c0804
  1. 48
      tests/playwright/tests/db/features/baseShare.spec.ts

48
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);

Loading…
Cancel
Save