From e164712907cb51d1bcdf153dda771114241b8c23 Mon Sep 17 00:00:00 2001 From: Andre Wiggins <459878+andrewiggins@users.noreply.github.com> Date: Mon, 13 Nov 2023 21:35:15 -0800 Subject: [PATCH] Fix tests in IE11 (#4211) * Fix tests in IE11 * Add workflow_dispatch trigger to Saucelabs workflow --------- Co-authored-by: Jovi De Croock --- .github/workflows/saucelabs.yml | 1 + compat/test/browser/render.test.js | 8 +++++++- test/browser/keys.test.js | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/saucelabs.yml b/.github/workflows/saucelabs.yml index 72748b8559..8b7058ac70 100644 --- a/.github/workflows/saucelabs.yml +++ b/.github/workflows/saucelabs.yml @@ -1,6 +1,7 @@ name: Saucelabs on: + workflow_dispatch: push: branches: - main diff --git a/compat/test/browser/render.test.js b/compat/test/browser/render.test.js index 7187589997..2384788ac4 100644 --- a/compat/test/browser/render.test.js +++ b/compat/test/browser/render.test.js @@ -263,7 +263,13 @@ describe('compat render', () => { />, scratch ); - expect(sortAttributes(scratch.innerHTML)).to.equal( + + let html = sortAttributes(scratch.innerHTML); + if (/Trident/.test(navigator.userAgent)) { + html = html.toLowerCase(); + } + + expect(html).to.equal( '' ); }); diff --git a/test/browser/keys.test.js b/test/browser/keys.test.js index d3a7ebbf68..8d5a185b91 100644 --- a/test/browser/keys.test.js +++ b/test/browser/keys.test.js @@ -709,7 +709,7 @@ describe('keys', () => { function listener(mutations) { for (const { addedNodes } of mutations) { - for (const node of addedNodes) { + for (const node of Array.from(addedNodes)) { mutatedNodes.push(node); } } @@ -772,7 +772,7 @@ describe('keys', () => { function listener(mutations) { for (const { addedNodes } of mutations) { - for (const node of addedNodes) { + for (const node of Array.from(addedNodes)) { mutatedNodes.push(node); } }