Browse Source

test: fix for account list access from non admin roles

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5903/head
Raju Udava 1 year ago
parent
commit
074ba67686
  1. 14
      tests/playwright/tests/db/users&Accounts/accountUserManagement.spec.ts
  2. 7
      tests/playwright/tests/db/views/viewForm.spec.ts

14
tests/playwright/tests/db/users&Accounts/accountUserManagement.spec.ts

@ -5,6 +5,7 @@ import { ProjectsPage } from '../../../pages/ProjectsPage';
import { SignupPage } from '../../../pages/SignupPage';
import setup from '../../../setup';
import { getDefaultPwd } from '../../utils/general';
import { LoginPage } from '../../../pages/LoginPage';
const roleDb = [
{ email: 'creator@nocodb.com', role: 'Organization Level Creator', url: '' },
@ -31,20 +32,27 @@ test.describe('User roles', () => {
test('Invite user, update role and delete user', async () => {
test.slow();
await accountUsersPage.goto();
// invite user
for (let i = 0; i < roleDb.length; i++) {
await accountUsersPage.goto();
roleDb[i].url = await accountUsersPage.invite({
email: roleDb[i].email,
role: roleDb[i].role,
});
await accountUsersPage.closeInvite();
await signupAndVerify(i);
await accountUsersPage.goto();
await accountPage.signOut();
const loginPage = new LoginPage(accountPage.rootPage);
await loginPage.fillEmail({ email: 'user@nocodb.com', withoutPrefix: true });
await loginPage.fillPassword(getDefaultPwd());
await loginPage.submit();
}
// update role
await accountUsersPage.goto();
for (let i = 0; i < roleDb.length; i++) {
await accountUsersPage.updateRole({
email: roleDb[i].email,

7
tests/playwright/tests/db/views/viewForm.spec.ts

@ -349,6 +349,9 @@ test.describe('Form view with LTAR', () => {
await sharedForm.verifySuccessMessage();
await dashboard.rootPage.goto(url);
// kludge- reload
await dashboard.rootPage.reload();
await dashboard.viewSidebar.openView({ title: 'Country' });
await dashboard.grid.cell.verify({
@ -444,7 +447,11 @@ test.describe('Form view', () => {
await sharedForm.cell.selectOption.select({ ...multiSelectParams, option: 'mar' });
await sharedForm.submit();
await dashboard.rootPage.goto(url);
// kludge- reload
await dashboard.rootPage.reload();
await dashboard.viewSidebar.openView({ title: 'selectBased' });
await dashboard.grid.cell.selectOption.verify({

Loading…
Cancel
Save