Browse Source

fix: Integrated new locked mode changes to isLocked

pull/7067/head
Muhammed Mustafa 1 year ago
parent
commit
26aa0c285c
  1. 2
      tests/playwright/pages/Dashboard/Grid/index.ts
  2. 2
      tests/playwright/pages/Dashboard/common/Footbar/index.ts
  3. 3
      tests/playwright/pages/Dashboard/common/Toolbar/ViewMenu.ts
  4. 4
      tests/playwright/tests/db/general/viewMenu.spec.ts

2
tests/playwright/pages/Dashboard/Grid/index.ts

@ -55,7 +55,7 @@ export class GridPage extends BasePage {
async verifyLockMode() {
// add new row button
expect(await this.btn_addNewRow.count()).toBe(0);
expect(await this.btn_addNewRow.count()).toBe(1);
await this.toolbar.verifyLockMode();
await this.footbar.verifyLockMode();

2
tests/playwright/pages/Dashboard/common/Footbar/index.ts

@ -45,7 +45,7 @@ export class FootbarPage extends BasePage {
async verifyLockMode() {
// add record button
await expect(this.btn_addNewRow).toBeVisible({ visible: false });
await expect(this.btn_addNewRow).toBeVisible({ visible: true });
}
async verifyCollaborativeMode() {

3
tests/playwright/pages/Dashboard/common/Toolbar/ViewMenu.ts

@ -86,6 +86,9 @@ export class ToolbarViewMenuPage extends BasePage {
// todo: Move verification out of the click method
async click({ menu, subMenu, verificationInfo }: { menu: string; subMenu?: string; verificationInfo?: any }) {
await this.viewsMenuBtn.click();
await this.rootPage.waitForTimeout(1000);
await this.get().locator(`.ant-dropdown-menu-title-content:has-text("${menu}")`).first().click();
if (subMenu) {
// for CSV download, pass locator instead of clicking it here

4
tests/playwright/tests/db/general/viewMenu.spec.ts

@ -23,7 +23,7 @@ test.describe('Grid view locked', () => {
// enable view lock
await dashboard.grid.toolbar.viewsMenu.click({
menu: 'Collaborative',
menu: 'View Mode',
subMenu: 'Locked',
});
@ -32,7 +32,7 @@ test.describe('Grid view locked', () => {
// enable collaborative view
await dashboard.grid.toolbar.viewsMenu.click({
menu: 'Locked',
menu: 'View Mode',
subMenu: 'Collaborative',
});

Loading…
Cancel
Save