diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index fd9aae2ee8..73c2c8a0c3 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -236,7 +236,7 @@ a { } .nc-base-menu-item { - @apply cursor-pointer flex items-center gap-2 py-2 after:(content-[''] absolute top-0 left-0 bottom-0 right-0 w-full h-full bg-current opacity-0 transition transition-opacity duration-100) hover:(after:(opacity-5)); + @apply cursor-pointer flex items-center gap-2 py-2; // &:hover { // .nc-icon { diff --git a/packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue b/packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue index 3a4b726dfe..aa673e068e 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ExportSubActions.vue @@ -102,26 +102,30 @@ const exportFile = async (exportType: ExportTypes) => { diff --git a/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vue b/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vue index f910f6c7de..5fc6045d9f 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/OpenedViewAction.vue @@ -75,6 +75,8 @@ async function changeLockType(type: LockType) { } catch (e: any) { message.error(await extractSdkResponseErrorMsg(e)) } + + isDropdownOpen.value = false } const { copy } = useCopy() @@ -221,7 +223,7 @@ watch(isDropdownOpen, () => {
{ diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Actions/index.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Actions/index.ts index 1efd54edbf..8a5522983d 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Actions/index.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Actions/index.ts @@ -22,6 +22,6 @@ export class ToolbarActionsPage extends BasePage { } async clickDownloadSubmenu(label: string) { - await this.rootPage.locator(`div[class="nc-base-menu-item"]:has-text("${label}")`).first().click(); + await this.rootPage.locator(`div.nc-base-menu-item:has-text("${label}")`).first().click(); } } diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/ViewMenu.ts b/tests/playwright/pages/Dashboard/common/Toolbar/ViewMenu.ts index 09c4abe126..4fb459ceef 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/ViewMenu.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/ViewMenu.ts @@ -12,7 +12,7 @@ export class ToolbarViewMenuPage extends BasePage { constructor(toolbar: ToolbarPage) { super(toolbar.rootPage); this.toolbar = toolbar; - this.viewsMenuBtn = this.toolbar.get().locator(`.nc-actions-menu-btn`); + this.viewsMenuBtn = this.rootPage.locator('.nc-view-context-btn'); } get() { diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/index.ts b/tests/playwright/pages/Dashboard/common/Toolbar/index.ts index e9fc84fb1f..6aaf54d1db 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/index.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/index.ts @@ -65,7 +65,7 @@ export class ToolbarPage extends BasePage { async clickActions() { const menuOpen = await this.actions.get().isVisible(); - await this.get().locator(`button.nc-actions-menu-btn`).click(); + await this.rootPage.locator(`div.nc-view-context-btn`).click(); // Wait for the menu to close if (menuOpen) await this.fields.get().waitFor({ state: 'hidden' }); @@ -161,7 +161,7 @@ export class ToolbarPage extends BasePage { } async clickDownload(type: string, verificationFile = 'expectedData.txt') { - await this.get().locator(`.nc-actions-menu-btn`).click(); + await this.rootPage.locator(`.nc-view-context-btn`).click(); const [download] = await Promise.all([ // Start waiting for the download @@ -195,7 +195,13 @@ export class ToolbarPage extends BasePage { } async verifyDownloadDisabled() { - await this.get().locator(`nc-actions-menu-btn`).waitFor({ state: 'hidden' }); + await this.rootPage.locator(`.nc-view-context-btn`).click(); + + await this.rootPage.waitForTimeout(500); + + await this.rootPage.locator(`.nc-view-context-download-option`).waitFor({ state: 'hidden' }); + + await this.rootPage.locator(`.nc-view-context-btn`).click(); } async clickAddEditStack() {