diff --git a/src/components/DownloadDropdowns/index.tsx b/src/components/DownloadDropdowns/index.tsx
index f647c5f4e..44f290859 100644
--- a/src/components/DownloadDropdowns/index.tsx
+++ b/src/components/DownloadDropdowns/index.tsx
@@ -127,7 +127,7 @@ const DownloadDropdowns = ({updaterAction, marketplace, Table}) => {
// @ts-ignore
let ext = gl && gl.getExtension('WEBGL_debug_renderer_info');
// @ts-ignore
- let param = ext && ext.getParameter(d.UNMASKED_RENDERER_WEBGL) || "";
+ let param = ext && gl.getParameter(ext.UNMASKED_RENDERER_WEBGL) || "";
if (param.match(/Apple/) && !param.match(/Apple GPU/)) {
defaultSelectedArch = 'aarch64'
}
diff --git a/src/components/LatestTemurin/__tests__/LatestTemurin.test.tsx b/src/components/LatestTemurin/__tests__/LatestTemurin.test.tsx
index 21019e4cd..c4eeaf7e2 100644
--- a/src/components/LatestTemurin/__tests__/LatestTemurin.test.tsx
+++ b/src/components/LatestTemurin/__tests__/LatestTemurin.test.tsx
@@ -52,4 +52,18 @@ describe('RandomContributor component', () => {
const { container } = render();
expect(container).toMatchSnapshot();
});
+
+ it('should render correctly - MAC', () => {
+ vi.spyOn(detectOSModule, 'detectOS').mockReturnValue(UserOS.MAC);
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ useOnScreen.mockReturnValue(true);
+
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ fetchLatestForOS.mockReturnValue(createRandomLatestForOSData());
+
+ const { container } = render();
+ expect(container).toMatchSnapshot();
+ });
});
\ No newline at end of file
diff --git a/src/components/LatestTemurin/__tests__/__snapshots__/LatestTemurin.test.tsx.snap b/src/components/LatestTemurin/__tests__/__snapshots__/LatestTemurin.test.tsx.snap
index 1e3c9a5d5..3fd9ae360 100644
--- a/src/components/LatestTemurin/__tests__/__snapshots__/LatestTemurin.test.tsx.snap
+++ b/src/components/LatestTemurin/__tests__/__snapshots__/LatestTemurin.test.tsx.snap
@@ -86,6 +86,92 @@ exports[`RandomContributor component > should render correctly - Linux 1`] = `
`;
+exports[`RandomContributor component > should render correctly - MAC 1`] = `
+
+`;
+
exports[`RandomContributor component > should render correctly - Windows 1`] = `
{
userOSName = 'macOS'
userOSAPIName = 'mac'
if (typeof document !== 'undefined') {
- let w = document.createElement("canvas").getContext("webgl");
+ let gl = document.createElement("canvas").getContext("webgl");
// @ts-ignore
- let d = w.getExtension('WEBGL_debug_renderer_info');
+ let ext = gl && gl.getExtension('WEBGL_debug_renderer_info');
// @ts-ignore
- let g = d && w.getParameter(d.UNMASKED_RENDERER_WEBGL) || "";
+ let param = ext && gl.getParameter(ext.UNMASKED_RENDERER_WEBGL) || "";
isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
//Detect if the user is using a Apple GPU (M1)
- if (isSafari || (g.match(/Apple/) && !g.match(/Apple GPU/))) {
+ if (isSafari || (param.match(/Apple/) && !param.match(/Apple GPU/))) {
arch = 'aarch64'
}
}