mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
871 B
30 lines
871 B
2 years ago
|
import { expect, Locator } from '@playwright/test';
|
||
|
import { SettingsPage } from '.';
|
||
|
import BasePage from '../../Base';
|
||
2 years ago
|
|
||
|
export class AclPage extends BasePage {
|
||
|
private readonly settings: SettingsPage;
|
||
|
|
||
|
constructor(settings: SettingsPage) {
|
||
|
super(settings.rootPage);
|
||
|
this.settings = settings;
|
||
|
}
|
||
|
|
||
|
get() {
|
||
2 years ago
|
return this.settings.get().locator(`[data-testid="nc-settings-subtab-UI Access Control"]`);
|
||
2 years ago
|
}
|
||
|
|
||
|
async toggle({ table, role }: { table: string; role: string }) {
|
||
|
await this.get().locator(`.nc-acl-${table}-${role}-chkbox`).click();
|
||
|
}
|
||
|
|
||
|
async save() {
|
||
2 years ago
|
await this.waitForResponse({
|
||
|
uiAction: this.get().locator(`button:has-text("Save")`).click(),
|
||
2 years ago
|
httpMethodsToMatch: ['POST'],
|
||
|
requestUrlPathToMatch: '/visibility-rules',
|
||
|
});
|
||
|
await this.verifyToast({ message: 'Updated UI ACL for tables successfully' });
|
||
2 years ago
|
}
|
||
|
}
|