diff --git a/change/@microsoft-fast-web-utilities-14b2f190-1571-4498-ba72-68bbafb26a20.json b/change/@microsoft-fast-web-utilities-3092275f-0c7e-4bf4-be96-424047357621.json similarity index 70% rename from change/@microsoft-fast-web-utilities-14b2f190-1571-4498-ba72-68bbafb26a20.json rename to change/@microsoft-fast-web-utilities-3092275f-0c7e-4bf4-be96-424047357621.json index 1b240f217f9..f54362f8d75 100644 --- a/change/@microsoft-fast-web-utilities-14b2f190-1571-4498-ba72-68bbafb26a20.json +++ b/change/@microsoft-fast-web-utilities-3092275f-0c7e-4bf4-be96-424047357621.json @@ -1,6 +1,6 @@ { "type": "none", - "comment": "fix RtlScrollConverter test for high dpi systems", + "comment": "fix RtlScrollConverter test", "packageName": "@microsoft/fast-web-utilities", "email": "863023+radium-v@users.noreply.github.com", "dependentChangeType": "none" diff --git a/packages/utilities/fast-web-utilities/karma.conf.ts b/packages/utilities/fast-web-utilities/karma.conf.ts index 6ab584050c4..26925a87c51 100644 --- a/packages/utilities/fast-web-utilities/karma.conf.ts +++ b/packages/utilities/fast-web-utilities/karma.conf.ts @@ -16,6 +16,7 @@ const commonChromeFlags = [ "--disable-extensions", "--disable-infobars", "--disable-translate", + "--force-device-scale-factor=1", ]; module.exports = function (config: any) { diff --git a/packages/utilities/fast-web-utilities/src/rtl-scroll-converter.spec.ts b/packages/utilities/fast-web-utilities/src/rtl-scroll-converter.spec.ts index 32aa42934e4..3402e0bd9a9 100644 --- a/packages/utilities/fast-web-utilities/src/rtl-scroll-converter.spec.ts +++ b/packages/utilities/fast-web-utilities/src/rtl-scroll-converter.spec.ts @@ -102,15 +102,14 @@ describe("RtlScrollConverter", (): void => { ); }); - it("invertedGetRtlScrollConverter returns correct value", () => { - const scale = window.devicePixelRatio; + it("invertedGetRtlScrollConverter returns a value <= 0", () => { const testElement: HTMLDivElement = getDummyDiv(); document.body.appendChild(testElement); testElement.scrollLeft = 1; - expect(RtlScrollConverter["invertedGetRtlScrollConverter"](testElement)).to.equal( - -1 / scale - ); + expect( + RtlScrollConverter["invertedGetRtlScrollConverter"](testElement) + ).to.be.lessThanOrEqual(0); }); it("reverseGetRtlScrollConverter returns correct value", () => {