diff --git a/playwright/e2e/mobile.spec.ts b/playwright/e2e/mobile.spec.ts index c64d4114bb1..f7b7af5ca9b 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() + }) +}) diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index 293dbaac6b4..577c5eac3fe 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -19,10 +19,11 @@ -