From 4cf6d72ea056af701198ab1de95bbf58a301cb7d Mon Sep 17 00:00:00 2001 From: silver Date: Mon, 26 Oct 2026 13:00:19 +0100 Subject: [PATCH 1/2] chore(tests): add tests Signed-off-by: silver Assisted-by: ClaudeCode:claude-opus-5.5 [skip ci] --- playwright/e2e/mobile.spec.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/playwright/e2e/mobile.spec.ts b/playwright/e2e/mobile.spec.ts index 4e030421ef2..91746192e52 100644 --- a/playwright/e2e/mobile.spec.ts +++ b/playwright/e2e/mobile.spec.ts @@ -23,3 +23,33 @@ test('Formatting help', async ({ editor }) => { await editor.formattingHelp.getByLabel('Close').click() await expect(editor.formattingHelp).not.toBeVisible() }) + +test.describe('Actions with their own menu in remaining actions', () => { + test.beforeEach(async ({ page }) => { + // Narrow enough to move link, attachment and emoji into the remaining actions + await page.setViewportSize({ width: 280, height: 640 }) + }) + + test('Insert emoji', async ({ editor }) => { + await editor.clickMenu('Remain', 'Insert emoji') + const picker = editor.el.getByRole('dialog', { name: 'Emoji picker' }) + await expect(picker).toBeVisible() + const search = picker.getByRole('textbox', { name: 'Search' }) + await search.fill('cat') + await expect(picker.getByLabel('🐱, cat')).toHaveClass(/emoji-mart-emoji-selected/) + await search.press('Enter') + await expect(editor.content).toContainText('🐱') + await expect(editor.content).not.toContainText('undefined') + }) + + test('Insert attachment', async ({ editor }) => { + await editor.clickMenu('Remain', 'Insert attachment') + await expect(editor.getMenuItem('Upload from computer')).toBeVisible() + await expect(editor.getMenuItem('Insert from Files')).toBeVisible() + }) + + test('Insert link', async ({ editor }) => { + await editor.clickMenu('Remain', 'Insert link') + await expect(editor.getMenuItem('Link to website')).toBeVisible() + }) +}) From d11a6a507fa6147353513346e05051721f58129a Mon Sep 17 00:00:00 2001 From: silver Date: Tue, 27 Oct 2026 11:18:21 +0100 Subject: [PATCH 2/2] fix(backport): add missing changes Signed-off-by: silver Assisted-by: ClaudeCode:claude-opus-5.5 --- playwright/e2e/mobile.spec.ts | 13 +++++--- src/components/Menu/ActionList.vue | 2 +- src/components/Menu/BaseActionEntry.js | 27 +++++++++------- src/components/Menu/MenuBar.vue | 43 +++++++++++++++++++++++--- src/components/Menu/entries.js | 10 ++---- 5 files changed, 68 insertions(+), 27 deletions(-) diff --git a/playwright/e2e/mobile.spec.ts b/playwright/e2e/mobile.spec.ts index 91746192e52..a6b8ddd44e7 100644 --- a/playwright/e2e/mobile.spec.ts +++ b/playwright/e2e/mobile.spec.ts @@ -27,7 +27,7 @@ test('Formatting help', async ({ editor }) => { test.describe('Actions with their own menu in remaining actions', () => { test.beforeEach(async ({ page }) => { // Narrow enough to move link, attachment and emoji into the remaining actions - await page.setViewportSize({ width: 280, height: 640 }) + await page.setViewportSize({ width: 240, height: 640 }) }) test('Insert emoji', async ({ editor }) => { @@ -36,8 +36,7 @@ test.describe('Actions with their own menu in remaining actions', () => { await expect(picker).toBeVisible() const search = picker.getByRole('textbox', { name: 'Search' }) await search.fill('cat') - await expect(picker.getByLabel('🐱, cat')).toHaveClass(/emoji-mart-emoji-selected/) - await search.press('Enter') + await picker.getByLabel('🐱, cat').click() await expect(editor.content).toContainText('🐱') await expect(editor.content).not.toContainText('undefined') }) @@ -49,7 +48,13 @@ test.describe('Actions with their own menu in remaining actions', () => { }) test('Insert link', async ({ editor }) => { - await editor.clickMenu('Remain', 'Insert link') + await editor.getMenu('Remain').click() + // Insert link toggles with the link mark, so depending on the version of + // @nextcloud/vue it is rendered as a checkbox + await editor + .getMenuItem('Insert link') + .or(editor.el.getByRole('menuitemcheckbox', { name: 'Insert link' })) + .click() await expect(editor.getMenuItem('Link to website')).toBeVisible() }) }) diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index 011f3787f0f..9cfb4969243 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -22,7 +22,7 @@