Browse Source

test(playwright): update Save Row button text

pull/4436/head
Wing-Kam Wong 2 years ago
parent
commit
6e153b7bfc
  1. 6
      tests/playwright/pages/Dashboard/ExpandedForm/index.ts

6
tests/playwright/pages/Dashboard/ExpandedForm/index.ts

@ -57,7 +57,7 @@ export class ExpandedFormPage extends BasePage {
}: { }: {
waitForRowsData?: boolean; waitForRowsData?: boolean;
} = {}) { } = {}) {
const saveRowAction = this.get().locator('button:has-text("Save Row")').click(); const saveRowAction = this.get().locator('button:has-text("Save & Exit")').click();
if (waitForRowsData) { if (waitForRowsData) {
await this.waitForResponse({ await this.waitForResponse({
uiAction: saveRowAction, uiAction: saveRowAction,
@ -104,9 +104,9 @@ export class ExpandedFormPage extends BasePage {
async validateRoleAccess(param: { role: string }) { async validateRoleAccess(param: { role: string }) {
if (param.role === 'commenter' || param.role === 'viewer') { if (param.role === 'commenter' || param.role === 'viewer') {
await expect(await this.get().locator('button:has-text("Save Row")')).toBeDisabled(); await expect(await this.get().locator('button:has-text("Save & Exit")')).toBeDisabled();
} else { } else {
await expect(await this.get().locator('button:has-text("Save Row")')).toBeEnabled(); await expect(await this.get().locator('button:has-text("Save & Exit")')).toBeEnabled();
} }
if (param.role === 'viewer') { if (param.role === 'viewer') {
await expect(await this.toggleCommentsButton).toHaveCount(0); await expect(await this.toggleCommentsButton).toHaveCount(0);

Loading…
Cancel
Save