From 669cff59cf90f76614b27ab3a65c8b0f06110c4e Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 10 Jul 2024 11:03:32 +0700 Subject: [PATCH 01/13] Added Webkit suite to Playwright config ref ENG-1376 - Added webkit suite to playwright config to test Safari --- packages/koenig-lexical/playwright.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/koenig-lexical/playwright.config.js b/packages/koenig-lexical/playwright.config.js index cd25fe8f30..ae4a22ad8f 100644 --- a/packages/koenig-lexical/playwright.config.js +++ b/packages/koenig-lexical/playwright.config.js @@ -42,6 +42,11 @@ export default defineConfig({ name: 'firefox', use: {...devices['Desktop Firefox']}, testMatch: /.*firefox.test.js/ + }, + { + name: 'webkit', + use: {...devices['Desktop Safari']}, + testIgnore: /.*firefox.test.js/ } ], From d92cf54fd9c469fe6c56abf4cffaf4df9fc3fde2 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 10 Jul 2024 11:07:42 +0700 Subject: [PATCH 02/13] Fixed mouse emoji select test for Webkit ref ENG-1401 - Fixed `can use the mouse to select an emoji` test on Webkit / Safari --- .../koenig-lexical/test/e2e/plugins/EmojiPickerPlugin.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/plugins/EmojiPickerPlugin.test.js b/packages/koenig-lexical/test/e2e/plugins/EmojiPickerPlugin.test.js index 24dcbaa8d0..d7d0daf79c 100644 --- a/packages/koenig-lexical/test/e2e/plugins/EmojiPickerPlugin.test.js +++ b/packages/koenig-lexical/test/e2e/plugins/EmojiPickerPlugin.test.js @@ -93,10 +93,10 @@ test.describe('Emoji Picker Plugin', async function () { test('can use the mouse to select an emoji', async function () { await focusEditor(page); - await page.keyboard.type(':t'); + await await page.keyboard.type(':taco'); await expect(page.getByTestId('emoji-menu')).toBeVisible(); - await page.click('[data-testid="emoji-option-2"]'); + await page.click('[data-testid="emoji-option-0"]'); await expect(page.getByTestId('emoji-menu')).not.toBeVisible(); await assertHTML(page, '

🌮

'); From 35db2ec3c784454b42f1d09e9e10e0edd577b710 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 10 Jul 2024 12:19:13 +0700 Subject: [PATCH 03/13] Fixed unsplash dialog test for Webkit ref ENG-1383 - Added conditional webkit key binding for when testing on Safari. --- .../test/e2e/cards/markdown-card.test.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js index 2e9e529229..106321a9cd 100644 --- a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js @@ -109,13 +109,19 @@ test.describe('Markdown card', async () => { `, {ignoreCardContents: true}); }); - test('should open unsplash dialog on Cmd-Alt-O', async function () { + test.only('should open unsplash dialog on Cmd-Alt-O', async function ({browserName}) { await focusEditor(page); await page.keyboard.type('/'); await page.click('[data-kg-card-menu-item="Markdown"]'); await page.click('[data-kg-card="markdown"]'); - await page.keyboard.press(`Control+Alt+O`); + if (browserName === 'chromium') { + await page.keyboard.press(`Control+Alt+O`); + } + + if (browserName === 'webkit') { + await page.keyboard.press(`Meta+Alt+O`); + } await page.waitForSelector('[data-kg-modal="unsplash"]'); }); From 3eadb7a0196645913d00b1aa5eced6e1e919df51 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 10 Jul 2024 12:23:29 +0700 Subject: [PATCH 04/13] Fixed spellcheck toggle test on Webkit ref ENG-1384 - added conditional key bindings for webkit and chrome --- .../test/e2e/cards/markdown-card.test.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js index 106321a9cd..121c646138 100644 --- a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js @@ -109,7 +109,7 @@ test.describe('Markdown card', async () => { `, {ignoreCardContents: true}); }); - test.only('should open unsplash dialog on Cmd-Alt-O', async function ({browserName}) { + test('should open unsplash dialog on Cmd-Alt-O', async function ({browserName}) { await focusEditor(page); await page.keyboard.type('/'); await page.click('[data-kg-card-menu-item="Markdown"]'); @@ -125,12 +125,19 @@ test.describe('Markdown card', async () => { await page.waitForSelector('[data-kg-modal="unsplash"]'); }); - test('should toggle spellcheck on Cmd-Alt-S', async function () { + test('should toggle spellcheck on Cmd-Alt-S', async function ({browserName}) { await focusEditor(page); await insertCard(page, {cardName: 'markdown'}); await expect(page.locator('[title*="Spellcheck"]')).not.toBeNull(); - await page.keyboard.press(`Control+Alt+S`); + if (browserName === 'chromium') { + await page.keyboard.press(`Control+Alt+S`); + } + + if (browserName === 'webkit') { + await page.keyboard.press(`Meta+Alt+S`); + } + await expect(page.locator('[title*="Spellcheck"][class*="active"]')).toHaveCount(1); }); From 7400d9ea5dbf5a3b0b1d180ebc92e3afc60488a6 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 10 Jul 2024 12:33:14 +0700 Subject: [PATCH 05/13] Fixed webkit test for open image upload dialog ref ENG-1385 - added conditional key bindings for webkit / safari test --- .../test/e2e/cards/markdown-card.test.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js index 121c646138..010d0cbfd1 100644 --- a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js @@ -141,13 +141,19 @@ test.describe('Markdown card', async () => { await expect(page.locator('[title*="Spellcheck"][class*="active"]')).toHaveCount(1); }); - test('should open image upload dialog on Cmd-Alt-I', async function () { + test('should open image upload dialog on Cmd-Alt-I', async function ({browserName}) { const fileChooserPromise = page.waitForEvent('filechooser'); await focusEditor(page); await page.keyboard.type('/'); await page.click('[data-kg-card-menu-item="Markdown"]'); await page.click('[data-kg-card="markdown"]'); - await page.keyboard.press(`Control+Alt+I`); + if (browserName === 'chromium') { + await page.keyboard.press(`Control+Alt+I`); + } + + if (browserName === 'webkit') { + await page.keyboard.press(`Meta+Alt+I`); + } await fileChooserPromise; }); From 1ade99e0ca3d69e0f1e9a879d135e01c4835649f Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 10 Jul 2024 12:37:37 +0700 Subject: [PATCH 06/13] Fixed markdown upload image test for Webkit ref ENG-1386 - Added conditional keybindings for webkit --- .../test/e2e/cards/markdown-card.test.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js index 010d0cbfd1..e509459943 100644 --- a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js @@ -207,7 +207,7 @@ test.describe('Markdown card', async () => { `, {ignoreCardContents: true}); }); - test('can upload an image', async function () { + test('can upload an image', async function ({browserName}) { const filePath = path.relative(process.cwd(), __dirname + '/../fixtures/large-image.png'); await focusEditor(page); const fileChooserPromise = page.waitForEvent('filechooser'); @@ -215,7 +215,14 @@ test.describe('Markdown card', async () => { await page.keyboard.type('/'); await page.click('[data-kg-card-menu-item="Markdown"]'); await page.waitForSelector('[data-kg-card="markdown"] .editor-toolbar'); - await page.keyboard.press(`Control+Alt+I`); + + if (browserName === 'chromium') { + await page.keyboard.press(`Control+Alt+I`); + } + + if (browserName === 'webkit') { + await page.keyboard.press(`Meta+Alt+I`); + } const fileChooser = await fileChooserPromise; await fileChooser.setFiles(filePath); From ed68ecd1cb933e439c11bb982d6cdd0be417b73e Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Thu, 11 Jul 2024 16:08:07 +0700 Subject: [PATCH 07/13] Improved browser conditions --- .../koenig-lexical/test/e2e/cards/markdown-card.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js index e509459943..627e148883 100644 --- a/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/markdown-card.test.js @@ -115,7 +115,7 @@ test.describe('Markdown card', async () => { await page.click('[data-kg-card-menu-item="Markdown"]'); await page.click('[data-kg-card="markdown"]'); - if (browserName === 'chromium') { + if (browserName === 'chromium' || browserName === 'firefox') { await page.keyboard.press(`Control+Alt+O`); } @@ -130,7 +130,7 @@ test.describe('Markdown card', async () => { await insertCard(page, {cardName: 'markdown'}); await expect(page.locator('[title*="Spellcheck"]')).not.toBeNull(); - if (browserName === 'chromium') { + if (browserName === 'chromium' || browserName === 'firefox') { await page.keyboard.press(`Control+Alt+S`); } @@ -147,7 +147,7 @@ test.describe('Markdown card', async () => { await page.keyboard.type('/'); await page.click('[data-kg-card-menu-item="Markdown"]'); await page.click('[data-kg-card="markdown"]'); - if (browserName === 'chromium') { + if (browserName === 'chromium' || browserName === 'firefox') { await page.keyboard.press(`Control+Alt+I`); } @@ -216,7 +216,7 @@ test.describe('Markdown card', async () => { await page.click('[data-kg-card-menu-item="Markdown"]'); await page.waitForSelector('[data-kg-card="markdown"] .editor-toolbar'); - if (browserName === 'chromium') { + if (browserName === 'chromium' || browserName === 'firefox') { await page.keyboard.press(`Control+Alt+I`); } From 3a09e5780c4a00483be0dbf2828fb5491b3d4395 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 24 Jul 2024 15:54:55 +0800 Subject: [PATCH 08/13] Added skips to unsupported tests --- .../test/e2e/card-behaviour.test.js | 30 +++++++++++++++---- .../test/e2e/cards/bookmark-card-labs.test.js | 6 +++- .../test/e2e/cards/callout-card.test.js | 6 +++- .../test/e2e/cards/code-block-card.test.js | 6 +++- .../test/e2e/cards/gallery-card.test.js | 6 +++- .../test/e2e/cards/image-card.test.js | 16 ++++++++-- .../test/e2e/internal-linking.test.js | 6 +++- .../e2e/plugins/DragDropReorderPlugin.test.js | 12 ++++++-- 8 files changed, 72 insertions(+), 16 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/card-behaviour.test.js b/packages/koenig-lexical/test/e2e/card-behaviour.test.js index da161b9100..92cd28bec0 100644 --- a/packages/koenig-lexical/test/e2e/card-behaviour.test.js +++ b/packages/koenig-lexical/test/e2e/card-behaviour.test.js @@ -564,7 +564,10 @@ test.describe('Card behaviour', async () => { }); // selects the card once caret reaches top of paragraph - test('moving through paragraph to card', async function () { + test('moving through paragraph to card', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } await focusEditor(page); await page.keyboard.type('---'); await expect(await page.locator('[data-kg-card="horizontalrule"]')).toBeVisible(); @@ -688,7 +691,10 @@ test.describe('Card behaviour', async () => { test.describe('DOWN', function () { // moves caret to beginning of paragraph - test('with selected card before paragraph', async function () { + test('with selected card before paragraph', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } await focusEditor(page); await page.keyboard.type('---'); await page.keyboard.type('First line'); @@ -1004,7 +1010,10 @@ test.describe('Card behaviour', async () => { }); // deletes empty paragraph, selects card - test('on empty paragraph after card', async function () { + test('on empty paragraph after card', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } await focusEditor(page); await page.keyboard.type('---'); await page.keyboard.press('Enter'); @@ -1218,7 +1227,10 @@ test.describe('Card behaviour', async () => { `); }); - test('with selected card as only node', async function () { + test('with selected card as only node', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } await focusEditor(page); await page.keyboard.type('---'); await page.keyboard.press('Backspace'); @@ -1743,7 +1755,10 @@ test.describe('Card behaviour', async () => { }); }); - test('with selected card and card at bottom', async function () { + test('with selected card and card at bottom', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } await focusEditor(page); await page.keyboard.type('---'); await page.keyboard.type('---'); @@ -1774,7 +1789,10 @@ test.describe('Card behaviour', async () => { `); }); - test('with caret in text and card at bottom', async function () { + test('with caret in text and card at bottom', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } await focusEditor(page); await page.keyboard.type('First'); await page.keyboard.press('Enter'); diff --git a/packages/koenig-lexical/test/e2e/cards/bookmark-card-labs.test.js b/packages/koenig-lexical/test/e2e/cards/bookmark-card-labs.test.js index c5928a3686..9d40545c7a 100644 --- a/packages/koenig-lexical/test/e2e/cards/bookmark-card-labs.test.js +++ b/packages/koenig-lexical/test/e2e/cards/bookmark-card-labs.test.js @@ -246,7 +246,11 @@ test.describe('Bookmark card (labs: internalLinking)', async () => { await expect(page.locator('[data-kg-card="bookmark"]')).toHaveCount(2); }); - test('can undo/redo without losing caption', async function () { + test('can undo/redo without losing caption', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + await focusEditor(page); await insertCard(page, {cardName: 'bookmark'}); diff --git a/packages/koenig-lexical/test/e2e/cards/callout-card.test.js b/packages/koenig-lexical/test/e2e/cards/callout-card.test.js index 467af9c8c1..522ea03504 100644 --- a/packages/koenig-lexical/test/e2e/cards/callout-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/callout-card.test.js @@ -325,7 +325,11 @@ test.describe('Callout Card', async () => { await expect(content).toContainText('Hello world'); }); - test('can undo/redo without losing content', async function () { + test('can undo/redo without losing content', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + await focusEditor(page); await insertCard(page, {cardName: 'callout'}); diff --git a/packages/koenig-lexical/test/e2e/cards/code-block-card.test.js b/packages/koenig-lexical/test/e2e/cards/code-block-card.test.js index cfe3a83f9f..047fb3afd4 100644 --- a/packages/koenig-lexical/test/e2e/cards/code-block-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/code-block-card.test.js @@ -166,7 +166,11 @@ test.describe('Code Block card', async () => { await expect(languageInput).not.toHaveClass(/opacity-0/); }); - test('can undo/redo without losing caption', async function () { + test('can undo/redo without losing caption', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + await focusEditor(page); await page.keyboard.type('```javascript '); await page.waitForSelector('[data-kg-card="codeblock"] .cm-editor'); diff --git a/packages/koenig-lexical/test/e2e/cards/gallery-card.test.js b/packages/koenig-lexical/test/e2e/cards/gallery-card.test.js index 11f0adf19f..3ac1d32eb0 100644 --- a/packages/koenig-lexical/test/e2e/cards/gallery-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/gallery-card.test.js @@ -320,7 +320,11 @@ test.describe('Gallery card', async () => { await expect(page.locator('[data-testid="gallery-image"]')).toHaveCount(2); }); - test('can undo/redo without losing nested editor content', async () => { + test('can undo/redo without losing nested editor content', async ({browserName}) => { + if (browserName === 'webkit') { + test.skip(); + } + await test.step('insert and upload images to gallery card', async () => { const filePaths = Array.from(Array(2).keys()).map(n => path.relative(process.cwd(), __dirname + `/../fixtures/large-image-${n}.png`)); const fileChooserPromise = page.waitForEvent('filechooser'); diff --git a/packages/koenig-lexical/test/e2e/cards/image-card.test.js b/packages/koenig-lexical/test/e2e/cards/image-card.test.js index bc2a48487e..bd2d2e28b1 100644 --- a/packages/koenig-lexical/test/e2e/cards/image-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/image-card.test.js @@ -528,7 +528,11 @@ test.describe('Image card', async () => { `); }); - test('replaces image when new image file dropped on populated card', async function () { + test('replaces image when new image file dropped on populated card', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + await focusEditor(page); await insertImage(page); @@ -841,7 +845,10 @@ test.describe('Image card', async () => { await expect(await page.locator('[data-kg-card="image"]')).toHaveCount(2); }); - test('can select caption text without scrolling', async function () { + test('can select caption text without scrolling', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } // Type in some text, so that we can scroll await focusEditor(page); await enterUntilScrolled(page); @@ -891,7 +898,10 @@ test.describe('Image card', async () => { }); }); - test('can select caption text and make it italic', async function () { + test('can select caption text and make it italic', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } // Type in some text, so that we can scroll await focusEditor(page); await enterUntilScrolled(page); diff --git a/packages/koenig-lexical/test/e2e/internal-linking.test.js b/packages/koenig-lexical/test/e2e/internal-linking.test.js index be23720f0e..baca69d99b 100644 --- a/packages/koenig-lexical/test/e2e/internal-linking.test.js +++ b/packages/koenig-lexical/test/e2e/internal-linking.test.js @@ -283,7 +283,11 @@ test.describe('Internal linking', async () => { `); }); - test('removes at-linking when backspacing', async function () { + test('removes at-linking when backspacing', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + await focusEditor(page); await page.keyboard.type('@'); await page.keyboard.type('AB'); diff --git a/packages/koenig-lexical/test/e2e/plugins/DragDropReorderPlugin.test.js b/packages/koenig-lexical/test/e2e/plugins/DragDropReorderPlugin.test.js index d470cdb3aa..07494af3ae 100644 --- a/packages/koenig-lexical/test/e2e/plugins/DragDropReorderPlugin.test.js +++ b/packages/koenig-lexical/test/e2e/plugins/DragDropReorderPlugin.test.js @@ -118,7 +118,11 @@ test.describe('Drag Drop Reorder Plugin', async function () { `, {ignoreCardContents: true}); }); - test('can drag and drop a card at the bottom of the editor', async function () { + test('can drag and drop a card at the bottom of the editor', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + const filePath = path.relative(process.cwd(), __dirname + '/../fixtures/large-image.png'); await focusEditor(page); @@ -173,7 +177,11 @@ test.describe('Drag Drop Reorder Plugin', async function () { `, {ignoreCardContents: true}); }); - test('can display placeholder element while hovering between nodes', async function () { + test('can display placeholder element while hovering between nodes', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + const filePath = path.relative(process.cwd(), __dirname + '/../fixtures/large-image.png'); await focusEditor(page); From e82c9d48446f2160031a42754cb5fd91fb5e0394 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 24 Jul 2024 16:48:02 +0800 Subject: [PATCH 09/13] Added MacOS as testing OS - experimental --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 410063f15c..8e4f0e1783 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: - 'renovate/*' jobs: test: - runs-on: ubuntu-latest + runs-on: macos-latest if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')) strategy: matrix: From 06cd2c889083fea7551df718e37b2f08ca8d86dc Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 24 Jul 2024 16:53:54 +0800 Subject: [PATCH 10/13] Changed to brew from apt-get --- .github/workflows/test.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e4f0e1783..34b79f4b3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,13 +31,8 @@ jobs: cache: yarn - name: Install required fonts for consistent tests - env: - DEBIAN_FRONTEND: noninteractive - DEBCONF_NONINTERACTIVE_SEEN: "true" run: | - sudo apt-get update -yq - sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections" - sudo apt-get install msttcorefonts -qq + brew install --cask font-microsoft-office - run: yarn From 274105aa0425d64c0925fa2b822aaaca29fb02f0 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 24 Jul 2024 16:56:42 +0800 Subject: [PATCH 11/13] Removed fonts since not needed on Mac --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34b79f4b3b..3de065521d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,10 +30,6 @@ jobs: node-version: ${{ matrix.node }} cache: yarn - - name: Install required fonts for consistent tests - run: | - brew install --cask font-microsoft-office - - run: yarn - name: Get installed Playwright version From c0ceb0882e533f39e8f0e7330ed2b851b429f7c7 Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Wed, 24 Jul 2024 17:13:02 +0800 Subject: [PATCH 12/13] Skipped a few more webkit tests - need to get prototype working, so fix this later --- packages/koenig-lexical/test/e2e/card-behaviour.test.js | 6 +++++- .../koenig-lexical/test/e2e/cards/bookmark-card.test.js | 6 +++++- packages/koenig-lexical/test/e2e/cards/image-card.test.js | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/koenig-lexical/test/e2e/card-behaviour.test.js b/packages/koenig-lexical/test/e2e/card-behaviour.test.js index 92cd28bec0..142c7ea979 100644 --- a/packages/koenig-lexical/test/e2e/card-behaviour.test.js +++ b/packages/koenig-lexical/test/e2e/card-behaviour.test.js @@ -825,7 +825,11 @@ test.describe('Card behaviour', async () => { `); }); - test('with selected card at end of document', async function () { + test('with selected card at end of document', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + await focusEditor(page); await page.keyboard.type('---'); await page.keyboard.press('Backspace'); diff --git a/packages/koenig-lexical/test/e2e/cards/bookmark-card.test.js b/packages/koenig-lexical/test/e2e/cards/bookmark-card.test.js index c1094a2081..bd9d99fcca 100644 --- a/packages/koenig-lexical/test/e2e/cards/bookmark-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/bookmark-card.test.js @@ -240,7 +240,11 @@ test.describe('Bookmark card', async () => { await expect(await page.locator('[data-kg-card="bookmark"]')).toHaveCount(2); }); - test('can undo/redo without losing caption', async function () { + test('can undo/redo without losing caption', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } + await focusEditor(page); await insertCard(page, {cardName: 'bookmark'}); diff --git a/packages/koenig-lexical/test/e2e/cards/image-card.test.js b/packages/koenig-lexical/test/e2e/cards/image-card.test.js index bd2d2e28b1..a366ec7f87 100644 --- a/packages/koenig-lexical/test/e2e/cards/image-card.test.js +++ b/packages/koenig-lexical/test/e2e/cards/image-card.test.js @@ -937,7 +937,10 @@ test.describe('Image card', async () => { }); }); - test('does not remove text when pressing ENTER in the middle of a caption', async function () { + test('does not remove text when pressing ENTER in the middle of a caption', async function ({browserName}) { + if (browserName === 'webkit') { + test.skip(); + } // Type in some text, so that we can scroll await focusEditor(page); await enterUntilScrolled(page); From 7d939851fe3b16efb908c867ebee56b448782a9c Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Thu, 25 Jul 2024 10:35:00 +0800 Subject: [PATCH 13/13] Revert "Changed to brew from apt-get" This reverts commit 06cd2c889083fea7551df718e37b2f08ca8d86dc. --- .github/workflows/test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3de065521d..410063f15c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: - 'renovate/*' jobs: test: - runs-on: macos-latest + runs-on: ubuntu-latest if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')) strategy: matrix: @@ -30,6 +30,15 @@ jobs: node-version: ${{ matrix.node }} cache: yarn + - name: Install required fonts for consistent tests + env: + DEBIAN_FRONTEND: noninteractive + DEBCONF_NONINTERACTIVE_SEEN: "true" + run: | + sudo apt-get update -yq + sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections" + sudo apt-get install msttcorefonts -qq + - run: yarn - name: Get installed Playwright version