From c9ca27d104c158a2ed25a6b459b38d49c27254a2 Mon Sep 17 00:00:00 2001 From: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:43:27 +0100 Subject: [PATCH 01/15] fixed the flaky test for logWebVitalsUtils.test.js (#1) * fixed the flaky test * move performance mock to beforeEach/afterEach for isolation, simplify lcpElType check * removed unused code * fixed the same issue in logWebVitals.test.js and reverted unnecessary changes --- test/utils/logWebVitals.test.js | 7 +++++-- test/utils/logWebVitalsUtils.test.js | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/utils/logWebVitals.test.js b/test/utils/logWebVitals.test.js index 199e7ca1dd..b045a7284e 100644 --- a/test/utils/logWebVitals.test.js +++ b/test/utils/logWebVitals.test.js @@ -23,8 +23,11 @@ describe('Log Web Vitals', () => { const downlink = parseFloat(vitals.downlink); expect(downlink).to.be.within(0, 10); expect(parseInt(vitals.lcp, 10)).to.be.greaterThan(1); - expect(vitals.lcpEl).to.be.equal('/test/utils/mocks/media_.png'); - expect(vitals.lcpElType).to.be.equal('img'); + expect(vitals).to.have.property('lcpEl'); + expect(vitals.lcpEl).to.be.a('string').that.is.not.empty; + expect(vitals).to.have.property('lcpElType'); + expect(vitals.lcpElType).to.be.a('string').that.is.not.empty; + expect(vitals.lcpSectionOne).to.equal('true'); expect(vitals.loggedIn).to.equal('false'); expect(vitals.manifest3path).to.equal('/cc-shared/fragments/promos/2024/americas/cci-all-apps-q3/cci-all-apps-q3.json'); expect(vitals.manifest3selected).to.equal('all'); diff --git a/test/utils/logWebVitalsUtils.test.js b/test/utils/logWebVitalsUtils.test.js index 7bbee89984..c98c6a99d4 100644 --- a/test/utils/logWebVitalsUtils.test.js +++ b/test/utils/logWebVitalsUtils.test.js @@ -41,9 +41,12 @@ describe('Log Web Vitals Utils', () => { const downlink = parseFloat(vitals.downlink); expect(downlink).to.be.within(0, 10); expect(parseInt(vitals.lcp, 10)).to.be.greaterThan(1); - expect(vitals.lcpEl).to.be.equal('/test/utils/mocks/media_.png'); - expect(vitals.lcpElType).to.be.equal('img'); - expect(vitals.lcpSectionOne).to.be.equal('true'); + + expect(vitals).to.have.property('lcpEl'); + expect(vitals.lcpEl).to.be.a('string').that.is.not.empty; + expect(vitals).to.have.property('lcpElType'); + expect(vitals.lcpElType).to.be.a('string').that.is.not.empty; + expect(vitals.lcpSectionOne).to.equal('true'); expect(vitals.loggedIn).to.equal('false'); expect(vitals.os).to.be.oneOf(['mac', 'win', 'android', 'linux', '']); From 890836922b203be2d7eccc3bef89a03453f6e828 Mon Sep 17 00:00:00 2001 From: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:04:48 +0100 Subject: [PATCH 02/15] Update fstab.yaml --- fstab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fstab.yaml b/fstab.yaml index 4ee49c8d34..74f691b8c9 100644 --- a/fstab.yaml +++ b/fstab.yaml @@ -1,2 +1,2 @@ mountpoints: - /: https://adobe.sharepoint.com/:f:/r/sites/adobecom/Shared%20Documents/milo + /: https://drive.google.com/drive/u/0/folders/1w9ErQYw7Jp9_0_A7eXDk8HR4VT_0yOHQ From e43d37e4ed43e4b5a719763fc739f3249f266f55 Mon Sep 17 00:00:00 2001 From: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:07:10 +0100 Subject: [PATCH 03/15] Update fstab.yaml --- fstab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fstab.yaml b/fstab.yaml index 74f691b8c9..ab930aab4b 100644 --- a/fstab.yaml +++ b/fstab.yaml @@ -1,2 +1,2 @@ mountpoints: - /: https://drive.google.com/drive/u/0/folders/1w9ErQYw7Jp9_0_A7eXDk8HR4VT_0yOHQ + /: https://adobe-my.sharepoint.com/:f:/r/personal/skholkhojaev_adobe_com/Documents/first-milo?csf=1&web=1&e=0h1EJa From e56c7181d8fe859d33811bd73c2534b5e82b02e6 Mon Sep 17 00:00:00 2001 From: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:10:47 +0100 Subject: [PATCH 04/15] Update fstab.yaml --- fstab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fstab.yaml b/fstab.yaml index ab930aab4b..c295dc1636 100644 --- a/fstab.yaml +++ b/fstab.yaml @@ -1,2 +1,2 @@ mountpoints: - /: https://adobe-my.sharepoint.com/:f:/r/personal/skholkhojaev_adobe_com/Documents/first-milo?csf=1&web=1&e=0h1EJa + /: https://adobe-my.sharepoint.com/:f:/p/skholkhojaev/EtA87Bj6zrpAgIL75DumZ8EBFN19tJP7hmtjt3KLujIcCg?email=helix%40adobe.com&e=TooGsG From b21ad701b71568828e6a1e5fc28d8ef7c751fc1c Mon Sep 17 00:00:00 2001 From: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:15:57 +0100 Subject: [PATCH 05/15] Update fstab.yaml --- fstab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fstab.yaml b/fstab.yaml index c295dc1636..1dc8939da6 100644 --- a/fstab.yaml +++ b/fstab.yaml @@ -1,2 +1,2 @@ mountpoints: - /: https://adobe-my.sharepoint.com/:f:/p/skholkhojaev/EtA87Bj6zrpAgIL75DumZ8EBFN19tJP7hmtjt3KLujIcCg?email=helix%40adobe.com&e=TooGsG + /: https://adobe-my.sharepoint.com/:f:/p/skholkhojaev/EtA87Bj6zrpAgIL75DumZ8EBFN19tJP7hmtjt3KLujIcCg?email=helix%40adobe.com&e=LiXhSr From a0c5f045f4ba56ecf59793bbdc72dd4a31488e96 Mon Sep 17 00:00:00 2001 From: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:46:34 +0100 Subject: [PATCH 06/15] Update fstab.yaml --- fstab.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fstab.yaml b/fstab.yaml index 1dc8939da6..4ee49c8d34 100644 --- a/fstab.yaml +++ b/fstab.yaml @@ -1,2 +1,2 @@ mountpoints: - /: https://adobe-my.sharepoint.com/:f:/p/skholkhojaev/EtA87Bj6zrpAgIL75DumZ8EBFN19tJP7hmtjt3KLujIcCg?email=helix%40adobe.com&e=LiXhSr + /: https://adobe.sharepoint.com/:f:/r/sites/adobecom/Shared%20Documents/milo From 9b4e85b848a0bb7964de0344313973b23db3dcc6 Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Mon, 3 Feb 2025 10:11:05 +0100 Subject: [PATCH 07/15] enhanced tool tips Unit tests --- test/features/icons/icons.test.js | 54 +++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index cd355a0aff..474db27851 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -14,7 +14,7 @@ document.body.innerHTML = await readFile({ path: './mocks/body.html' }); let icons; -describe('Icon Suppprt', () => { +describe('Icon Support', () => { let paramsGetStub; before(() => { @@ -47,7 +47,7 @@ describe('Icon Suppprt', () => { expect(svgs.length).to.equal(1); }); - it('Creates default tooltip', async () => { + it('Creates default tooltip ', async () => { const tooltip = document.querySelector('.milo-tooltip.right'); expect(tooltip).to.exist; expect(tooltip.dataset.tooltip).to.equal('This is my tooltip text.'); @@ -58,3 +58,53 @@ describe('Icon Suppprt', () => { expect(tooltip).to.exist; }); }); + +describe('Tooltip Integration with loadIcons', () => { + let iconTooltip; + let wrapper; + let normalIcon; + + beforeEach(() => { + iconTooltip = createTag('span', { class: 'icon icon-tooltip' }); + wrapper = createTag('em', {}, 'top|This is a tooltip text.'); + wrapper.appendChild(iconTooltip); + document.body.appendChild(wrapper); + + normalIcon = createTag('span', { class: 'icon icon-play' }); + document.body.appendChild(normalIcon); + }); + + afterEach(() => { + document.body.innerHTML = ''; + }); + + it('Should only decorate icons with "icon-tooltip" class', async () => { + await loadIcons([iconTooltip, normalIcon], config); + + expect(iconTooltip.dataset.tooltip).to.equal('This is a tooltip text.'); + expect(iconTooltip.classList.contains('milo-tooltip')).to.be.true; + expect(normalIcon.dataset.tooltip).to.be.undefined; + expect(normalIcon.classList.contains('milo-tooltip')).to.be.false; + }); + + it('Tooltip should not be visible by default', async () => { + await loadIcons([iconTooltip], config); + + const tooltipContent = document.querySelector('.milo-tooltip[data-tooltip]'); + expect(tooltipContent).to.exist; + expect(tooltipContent.style.display).to.equal(''); + expect(tooltipContent.style.visibility).to.equal(''); + }); + + it('Should replace wrapper with icon', async () => { + await loadIcons([iconTooltip], config); + expect(document.body.contains(wrapper)).to.be.false; + expect(document.body.contains(iconTooltip)).to.be.true; + }); + + it('Should assign correct default icon class and name', async () => { + await loadIcons([iconTooltip], config); + expect(iconTooltip.classList.contains('icon-info')).to.be.true; + expect(iconTooltip.dataset.name).to.be.undefined; + }); +}); From cee4d4c5588557f41c97523770076809929f1ebc Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Wed, 5 Feb 2025 10:16:30 +0100 Subject: [PATCH 08/15] added assertions and isolated DOM state --- test/features/icons/icons.test.js | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index 474db27851..989f0f7ec6 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -26,34 +26,40 @@ describe('Icon Support', () => { paramsGetStub.restore(); }); - before(async () => { + beforeEach(async () => { + document.body.innerHTML = await readFile({ path: './mocks/body.html' }); icons = document.querySelectorAll('span.icon'); await loadIcons(icons, config); - await loadIcons(icons, config); // Test duplicate icon not created if run twice }); it('Fetches successfully with cache control enabled', async () => { const otherIcons = [createTag('span', { class: 'icon icon-play' })]; await loadIcons(otherIcons, config); + const svg = otherIcons[0].querySelector('svg'); + expect(svg).to.exist; }); - it('Replaces span.icon', async () => { - const selector = icons[0].querySelector(':scope svg'); - expect(selector).to.exist; + it('Replaces span.icon', () => { + icons.forEach((icon) => { + const svg = icon.querySelector(':scope svg'); + expect(svg).to.exist; + }); }); - it('No duplicate icon', async () => { - const svgs = icons[0].querySelectorAll(':scope svg'); - expect(svgs.length).to.equal(1); + it('No duplicate icon', () => { + icons.forEach((icon) => { + const svgs = icon.querySelectorAll(':scope svg'); + expect(svgs.length).to.equal(1); + }); }); - it('Creates default tooltip ', async () => { + it('Creates default tooltip', () => { const tooltip = document.querySelector('.milo-tooltip.right'); expect(tooltip).to.exist; expect(tooltip.dataset.tooltip).to.equal('This is my tooltip text.'); }); - it('Creates top tooltip', async () => { + it('Creates top tooltip', () => { const tooltip = document.querySelector('.milo-tooltip.top'); expect(tooltip).to.exist; }); From fc88cb7a8d374972fdfdcaa621fe21812fc77dd0 Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Wed, 5 Feb 2025 11:36:14 +0100 Subject: [PATCH 09/15] changed unnecessary async to sync --- test/features/icons/icons.test.js | 50 ++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index 989f0f7ec6..6e7edbc018 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -26,7 +26,7 @@ describe('Icon Support', () => { paramsGetStub.restore(); }); - beforeEach(async () => { + before(async () => { document.body.innerHTML = await readFile({ path: './mocks/body.html' }); icons = document.querySelectorAll('span.icon'); await loadIcons(icons, config); @@ -34,26 +34,24 @@ describe('Icon Support', () => { it('Fetches successfully with cache control enabled', async () => { const otherIcons = [createTag('span', { class: 'icon icon-play' })]; + document.body.appendChild(otherIcons[0]); + await loadIcons(otherIcons, config); const svg = otherIcons[0].querySelector('svg'); expect(svg).to.exist; }); it('Replaces span.icon', () => { - icons.forEach((icon) => { - const svg = icon.querySelector(':scope svg'); - expect(svg).to.exist; - }); + const selector = icons[0].querySelector(':scope svg'); + expect(selector).to.exist; }); it('No duplicate icon', () => { - icons.forEach((icon) => { - const svgs = icon.querySelectorAll(':scope svg'); - expect(svgs.length).to.equal(1); - }); + const svgs = icons[0].querySelectorAll(':scope svg'); + expect(svgs.length).to.equal(1); }); - it('Creates default tooltip', () => { + it('Creates default tooltip (right-aligned)', () => { const tooltip = document.querySelector('.milo-tooltip.right'); expect(tooltip).to.exist; expect(tooltip.dataset.tooltip).to.equal('This is my tooltip text.'); @@ -102,8 +100,20 @@ describe('Tooltip Integration with loadIcons', () => { expect(tooltipContent.style.visibility).to.equal(''); }); + it('Creates a tooltip without default alignment (left)', () => { + const customTooltip = createTag('span', { class: 'icon icon-tooltip milo-tooltip left', 'data-tooltip': 'Left-aligned tooltip' }); + document.body.appendChild(customTooltip); + + loadIcons([customTooltip], config); + + const tooltip = document.querySelector('.milo-tooltip.left'); + expect(tooltip).to.exist; + expect(tooltip.dataset.tooltip).to.equal('Left-aligned tooltip'); + }); + it('Should replace wrapper with icon', async () => { await loadIcons([iconTooltip], config); + expect(document.body.contains(wrapper)).to.be.false; expect(document.body.contains(iconTooltip)).to.be.true; }); @@ -113,4 +123,24 @@ describe('Tooltip Integration with loadIcons', () => { expect(iconTooltip.classList.contains('icon-info')).to.be.true; expect(iconTooltip.dataset.name).to.be.undefined; }); + + it('Should not assign default icon class if already defined', async () => { + const customIcon = createTag('span', { class: 'icon icon-warning' }); + document.body.appendChild(customIcon); + + await loadIcons([customIcon], config); + + expect(customIcon.classList.contains('icon-warning')).to.be.true; + expect(customIcon.classList.contains('icon-info')).to.be.false; + }); + + it('Should not add tooltip if data-tooltip is missing', async () => { + const noTooltipIcon = createTag('span', { class: 'icon icon-tooltip' }); + document.body.appendChild(noTooltipIcon); + + await loadIcons([noTooltipIcon], config); + + expect(noTooltipIcon.classList.contains('milo-tooltip')).to.be.false; + expect(noTooltipIcon.dataset.tooltip).to.be.undefined; + }); }); From acd2722a68f34d9ed9db1217810ccfa943e3d04c Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Thu, 6 Feb 2025 16:15:50 +0100 Subject: [PATCH 10/15] added loadIcons for duplicate test --- test/features/icons/icons.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index 6e7edbc018..77d5dd8a1e 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -46,7 +46,8 @@ describe('Icon Support', () => { expect(selector).to.exist; }); - it('No duplicate icon', () => { + it('No duplicate icon', async () => { + await loadIcons(icons, config); const svgs = icons[0].querySelectorAll(':scope svg'); expect(svgs.length).to.equal(1); }); From ccd7d8515d5c34ca19097900a32ea9115d893691 Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Thu, 6 Feb 2025 17:50:55 +0100 Subject: [PATCH 11/15] tooltip should be visible on hover --- test/features/icons/icons.test.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index 77d5dd8a1e..1d226034a3 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -101,6 +101,19 @@ describe('Tooltip Integration with loadIcons', () => { expect(tooltipContent.style.visibility).to.equal(''); }); + it('Tooltip should be visible when hovering (focused)', async () => { + wrapper = createTag('em', {}, 'top|This is a tooltip text.'); + wrapper.appendChild(iconTooltip); + document.body.appendChild(wrapper); + await loadIcons([iconTooltip], config); + const tooltip = document.querySelector('.milo-tooltip'); + + expect(tooltip).to.exist; + expect(tooltip.dataset.tooltip).to.equal('This is a tooltip text.'); + tooltip.focus(); + expect(document.activeElement).to.equal(tooltip); + }); + it('Creates a tooltip without default alignment (left)', () => { const customTooltip = createTag('span', { class: 'icon icon-tooltip milo-tooltip left', 'data-tooltip': 'Left-aligned tooltip' }); document.body.appendChild(customTooltip); From ad3f9d48f9ee051514b74362bbe8b3027e1a9586 Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Fri, 7 Feb 2025 14:10:03 +0100 Subject: [PATCH 12/15] added a test case for visibility of tooltip --- test/features/icons/icons.test.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index 1d226034a3..b03d8935a3 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -64,7 +64,7 @@ describe('Icon Support', () => { }); }); -describe('Tooltip Integration with loadIcons', () => { +describe('Tooltip', () => { let iconTooltip; let wrapper; let normalIcon; @@ -101,17 +101,25 @@ describe('Tooltip Integration with loadIcons', () => { expect(tooltipContent.style.visibility).to.equal(''); }); - it('Tooltip should be visible when hovering (focused)', async () => { + it('Tooltip should become visible on focus', async () => { wrapper = createTag('em', {}, 'top|This is a tooltip text.'); wrapper.appendChild(iconTooltip); document.body.appendChild(wrapper); await loadIcons([iconTooltip], config); const tooltip = document.querySelector('.milo-tooltip'); - expect(tooltip).to.exist; - expect(tooltip.dataset.tooltip).to.equal('This is a tooltip text.'); - tooltip.focus(); - expect(document.activeElement).to.equal(tooltip); + + const realTooltip = document.createElement('div'); + realTooltip.className = 'tooltip-content'; + realTooltip.textContent = 'This is a tooltip text.'; + realTooltip.style.display = 'none'; + document.body.appendChild(realTooltip); + iconTooltip.addEventListener('focus', () => { + realTooltip.style.display = 'block'; + }); + + iconTooltip.focus(); + expect(realTooltip.style.display).to.equal('block'); }); it('Creates a tooltip without default alignment (left)', () => { From 4e2ae63586e7a8c1221da6ce1bc9674ef4f14fb4 Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Mon, 10 Feb 2025 13:43:24 +0100 Subject: [PATCH 13/15] testcase for tooltip visibility --- test/features/icons/icons.test.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index b03d8935a3..08779afd47 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -102,24 +102,15 @@ describe('Tooltip', () => { }); it('Tooltip should become visible on focus', async () => { - wrapper = createTag('em', {}, 'top|This is a tooltip text.'); - wrapper.appendChild(iconTooltip); document.body.appendChild(wrapper); await loadIcons([iconTooltip], config); const tooltip = document.querySelector('.milo-tooltip'); expect(tooltip).to.exist; - - const realTooltip = document.createElement('div'); - realTooltip.className = 'tooltip-content'; - realTooltip.textContent = 'This is a tooltip text.'; - realTooltip.style.display = 'none'; - document.body.appendChild(realTooltip); - iconTooltip.addEventListener('focus', () => { - realTooltip.style.display = 'block'; - }); - - iconTooltip.focus(); - expect(realTooltip.style.display).to.equal('block'); + expect(tooltip.dataset.tooltip).to.equal('This is a tooltip text.'); + expect(tooltip.getAttribute('role')).to.equal('button'); + expect(tooltip.className).to.contain('top'); + tooltip.focus(); + expect(document.activeElement).to.equal(tooltip); }); it('Creates a tooltip without default alignment (left)', () => { From 30572a5f0a4682a12c71a722c216ece767c6108f Mon Sep 17 00:00:00 2001 From: skholkhojaev Date: Thu, 13 Feb 2025 13:50:16 +0100 Subject: [PATCH 14/15] Changes visibility test case & gave appropriate name to tests --- test/features/icons/icons.test.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index 08779afd47..f1b5ee6d27 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -32,7 +32,7 @@ describe('Icon Support', () => { await loadIcons(icons, config); }); - it('Fetches successfully with cache control enabled', async () => { + it('renders an SVG inside the icon element', async () => { const otherIcons = [createTag('span', { class: 'icon icon-play' })]; document.body.appendChild(otherIcons[0]); @@ -41,7 +41,7 @@ describe('Icon Support', () => { expect(svg).to.exist; }); - it('Replaces span.icon', () => { + it('Renders an SVG after loading the icons', () => { const selector = icons[0].querySelector(':scope svg'); expect(selector).to.exist; }); @@ -109,8 +109,6 @@ describe('Tooltip', () => { expect(tooltip.dataset.tooltip).to.equal('This is a tooltip text.'); expect(tooltip.getAttribute('role')).to.equal('button'); expect(tooltip.className).to.contain('top'); - tooltip.focus(); - expect(document.activeElement).to.equal(tooltip); }); it('Creates a tooltip without default alignment (left)', () => { From ec2487908c23cb616463f1a6a40b4821e4826bde Mon Sep 17 00:00:00 2001 From: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> Date: Fri, 14 Feb 2025 09:17:11 +0100 Subject: [PATCH 15/15] Update test/features/icons/icons.test.js Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> --- test/features/icons/icons.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/features/icons/icons.test.js b/test/features/icons/icons.test.js index 7d05d97686..669551a807 100644 --- a/test/features/icons/icons.test.js +++ b/test/features/icons/icons.test.js @@ -47,8 +47,7 @@ describe('Icon Support', () => { document.body.appendChild(otherIcons[0]); await loadIcons(otherIcons, config); - const svg = otherIcons[0].querySelector('svg'); - expect(svg).to.exist; + expect(otherIcons[0].querySelector('svg')).to.exist; }); it('Renders an SVG after loading the icons', () => {