diff --git a/packages/nc-gui/composables/useExpandedFormStore.ts b/packages/nc-gui/composables/useExpandedFormStore.ts
index 5402b68320..d0df5b65d0 100644
--- a/packages/nc-gui/composables/useExpandedFormStore.ts
+++ b/packages/nc-gui/composables/useExpandedFormStore.ts
@@ -190,7 +190,8 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
}
} else {
// No columns to update
- return message.info(t('msg.info.noColumnsToUpdate'))
+ message.info(t('msg.info.noColumnsToUpdate'))
+ return
}
}
diff --git a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts
index 608fd5fb4a..fa66bebd0c 100644
--- a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts
+++ b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts
@@ -7,7 +7,8 @@ export class ExpandedFormPage extends BasePage {
readonly addNewTableButton: Locator;
readonly copyUrlButton: Locator;
readonly toggleCommentsButton: Locator;
- readonly moreOptionsButton: Locator;
+ readonly duplicateRowButton: Locator;
+ readonly deleteRowButton: Locator;
constructor(dashboard: DashboardPage) {
super(dashboard.rootPage);
@@ -15,7 +16,8 @@ export class ExpandedFormPage extends BasePage {
this.addNewTableButton = this.dashboard.get().locator('.nc-add-new-table');
this.copyUrlButton = this.dashboard.get().locator('.nc-copy-row-url:visible');
this.toggleCommentsButton = this.dashboard.get().locator('.nc-toggle-comments:visible');
- this.moreOptionsButton = this.dashboard.get().locator('.nc-actions-menu-btn:visible').last();
+ this.duplicateRowButton = this.dashboard.get().locator('.nc-duplicate-row:visible');
+ this.deleteRowButton = this.dashboard.get().locator('.nc-delete-row:visible');
}
get() {
@@ -23,10 +25,7 @@ export class ExpandedFormPage extends BasePage {
}
async clickDuplicateRow() {
- await this.moreOptionsButton.click();
- // wait for the menu to appear
- await this.rootPage.waitForTimeout(1000);
- await this.rootPage.locator('.nc-menu-item:has-text("Duplicate Row")').click();
+ await this.duplicateRowButton.click();
// wait for loader to disappear
// await this.dashboard.waitForLoaderToDisappear();
@@ -34,22 +33,17 @@ export class ExpandedFormPage extends BasePage {
}
async clickDeleteRow() {
- await this.moreOptionsButton.click();
- // wait for the menu to appear
- await this.rootPage.waitForTimeout(1000);
- await this.rootPage.locator('.nc-menu-item:has-text("Delete Row")').click();
+ await this.deleteRowButton.click();
await this.rootPage.locator('.ant-btn-primary:has-text("OK")').click();
}
async isDisabledDuplicateRow() {
- await this.moreOptionsButton.click();
- const isDisabled = await this.rootPage.locator('.nc-menu-item.disabled:has-text("Duplicate Row")');
+ const isDisabled = await this.duplicateRowButton;
return await isDisabled.count();
}
async isDisabledDeleteRow() {
- await this.moreOptionsButton.click();
- const isDisabled = await this.rootPage.locator('.nc-menu-item.disabled:has-text("Delete Row")');
+ const isDisabled = await this.deleteRowButton;
return await isDisabled.count();
}
@@ -139,7 +133,7 @@ export class ExpandedFormPage extends BasePage {
}
async close() {
- await this.get().locator('button:has-text("Close")').last().click();
+ await this.get().locator('.nc-close-form').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 d0863b85ac..685a125998 100644
--- a/tests/playwright/tests/expandedFormUrl.spec.ts
+++ b/tests/playwright/tests/expandedFormUrl.spec.ts
@@ -174,7 +174,7 @@ test.describe('Expanded record duplicate & delete options', () => {
// expand row, duplicate & verify menu
await dashboard.grid.openExpandedRow({ index: 0 });
await dashboard.expandedForm.clickDuplicateRow();
- expect(await dashboard.expandedForm.isDisabledDeleteRow()).toBe(1);
- expect(await dashboard.expandedForm.isDisabledDuplicateRow()).toBe(1);
+ expect(await dashboard.expandedForm.isDisabledDeleteRow()).toBe(0);
+ expect(await dashboard.expandedForm.isDisabledDuplicateRow()).toBe(0);
});
});