diff --git a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts index c5039f86d8..05ba80d9c7 100644 --- a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts +++ b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts @@ -98,13 +98,13 @@ export class ExpandedFormPage extends BasePage { await expect.poll(() => this.rootPage.url()).toContain(url); } - async close() { + async escape() { await this.rootPage.keyboard.press('Escape'); await this.get().waitFor({ state: 'hidden' }); } - async cancel() { - await this.get().locator('button:has-text("Cancel")').last().click(); + async close() { + await this.get().locator('button:has-text("Close")').last().click(); } async openChildCard(param: { column: string; title: string }) { diff --git a/tests/playwright/tests/expandedFormUrl.spec.ts b/tests/playwright/tests/expandedFormUrl.spec.ts index e8e9d61e8a..8195920eca 100644 --- a/tests/playwright/tests/expandedFormUrl.spec.ts +++ b/tests/playwright/tests/expandedFormUrl.spec.ts @@ -37,7 +37,7 @@ test.describe('Expanded form URL', () => { // expand row & verify URL await viewObj.openExpandedRow({ index: 0 }); const url = await dashboard.expandedForm.getShareRowUrl(); - await dashboard.expandedForm.close(); + await dashboard.expandedForm.escape(); await dashboard.rootPage.goto(url); await dashboard.expandedForm.verify({ @@ -81,13 +81,13 @@ test.describe('Expanded form URL', () => { // expect(expandedFormUrl).toContain("rowId=1"); // access a new rowID using URL - await dashboard.expandedForm.close(); + await dashboard.expandedForm.escape(); await dashboard.expandedForm.gotoUsingUrlAndRowId({ rowId: '2' }); await dashboard.expandedForm.verify({ header: 'Algeria', url: 'rowId=2', }); - await dashboard.expandedForm.close(); + await dashboard.expandedForm.escape(); // visit invalid rowID await dashboard.expandedForm.gotoUsingUrlAndRowId({ rowId: '999' }); @@ -114,12 +114,12 @@ test.describe('Expanded form URL', () => { await dashboard.expandedForm.verifyCount({ count: 2 }); // close child card - await dashboard.expandedForm.cancel(); + await dashboard.expandedForm.close(); await dashboard.expandedForm.verify({ header: 'Afghanistan', url: 'rowId=1', }); - await dashboard.expandedForm.cancel(); + await dashboard.expandedForm.close(); } test('Grid', async () => {