diff --git a/apps/website/next.config.js b/apps/website/next.config.js index 2f78fb96bd..9fbd271ae1 100644 --- a/apps/website/next.config.js +++ b/apps/website/next.config.js @@ -13,8 +13,8 @@ module.exports = { return config; }, reactStrictMode: true, - assetPrefix: process.env.NODE_ENV === "production" ? `/halstack/${process.env.NEXT_PUBLIC_SITE_VERSION}` : undefined, - basePath: process.env.NODE_ENV === "production" ? `/halstack/${process.env.NEXT_PUBLIC_SITE_VERSION}` : undefined, + assetPrefix: process.env.NODE_ENV === "production" ? `/halstack/${process.env.SITE_VERSION}` : undefined, + basePath: process.env.NODE_ENV === "production" ? `/halstack/${process.env.SITE_VERSION}` : undefined, transpilePackages: [ "@cloudscape-design/components", "@cloudscape-design/component-toolkit", diff --git a/packages/lib/.storybook/test-runner.ts b/packages/lib/.storybook/test-runner.ts index d78475f9f8..a22495b816 100644 --- a/packages/lib/.storybook/test-runner.ts +++ b/packages/lib/.storybook/test-runner.ts @@ -58,35 +58,4 @@ const a11yConfig: TestRunnerConfig = { }, }; -module.exports = a11yConfig; - -// // UNCOMMENT TO EXPORT RESULTS AS JSON IN __ACCESSIBILITY -// const { injectAxe, getViolations } = require("axe-playwright"); -// const fs = require("fs"); - -// module.exports = { -// setup() { -// fs.mkdir(process.cwd() + "/src/__accessibility__/", { recursive: true }, (err) => { -// if (err) throw err; -// }); -// }, -// async preVisit(page, context) { -// await injectAxe(page); -// }, -// async postVisit(page, context) { -// const violations = await getViolations(page, "#storybook-root", { -// detailedReport: true, -// }); - -// await new Promise((resolve, reject) => { -// fs.writeFile( -// process.cwd() + `/src/__accessibility__/${context.id}.json`, -// JSON.stringify(violations, null, 2), -// (err) => { -// if (err) reject(err); -// resolve(); -// } -// ); -// }); -// }, -// }; +module.exports = a11yConfig; \ No newline at end of file diff --git a/packages/lib/src/table/Table.accessibility.test.tsx b/packages/lib/src/table/Table.accessibility.test.tsx index 33ac593800..f0c44cac2d 100644 --- a/packages/lib/src/table/Table.accessibility.test.tsx +++ b/packages/lib/src/table/Table.accessibility.test.tsx @@ -12,6 +12,7 @@ const disabledRules = { }, {}), }; +// Mocking DOMRect for Radix Primitive Popover (global as any).globalThis = global; (global as any).DOMRect = { fromRect: () => ({ top: 0, left: 0, bottom: 0, right: 0, width: 0, height: 0 }), diff --git a/packages/lib/src/table/Table.test.tsx b/packages/lib/src/table/Table.test.tsx index d335e8311c..beda12ee5c 100644 --- a/packages/lib/src/table/Table.test.tsx +++ b/packages/lib/src/table/Table.test.tsx @@ -3,6 +3,7 @@ import userEvent from "@testing-library/user-event"; import DxcTable from "./Table"; import { ActionCellsPropsType } from "./types"; +// Mocking DOMRect for Radix Primitive Popover (global as any).globalThis = global; (global as any).DOMRect = { fromRect: () => ({ top: 0, left: 0, bottom: 0, right: 0, width: 0, height: 0 }), diff --git a/packages/lib/src/tooltip/Tooltip.accessibility.test.tsx b/packages/lib/src/tooltip/Tooltip.accessibility.test.tsx index cbcaf75986..29e9c9210f 100644 --- a/packages/lib/src/tooltip/Tooltip.accessibility.test.tsx +++ b/packages/lib/src/tooltip/Tooltip.accessibility.test.tsx @@ -3,6 +3,7 @@ import { axe } from "../../test/accessibility/axe-helper.js"; import DxcButton from "../button/Button"; import DxcTooltip from "./Tooltip"; +// Mocking DOMRect for Radix Primitive Popover (global as any).globalThis = global; (global as any).DOMRect = { fromRect: () => ({ top: 0, left: 0, bottom: 0, right: 0, width: 0, height: 0, x: 0, y: 0 }), diff --git a/packages/lib/src/tooltip/Tooltip.test.tsx b/packages/lib/src/tooltip/Tooltip.test.tsx index 852e8f8ef9..4aa79f1b27 100644 --- a/packages/lib/src/tooltip/Tooltip.test.tsx +++ b/packages/lib/src/tooltip/Tooltip.test.tsx @@ -4,6 +4,7 @@ import userEvent from "@testing-library/user-event"; import DxcButton from "../button/Button"; import DxcTooltip from "./Tooltip"; +// Mocking DOMRect for Radix Primitive Popover (global as any).globalThis = global; (global as any).DOMRect = { fromRect: () => ({ top: 0, left: 0, bottom: 0, right: 0, width: 0, height: 0, x: 0, y: 0 }), diff --git a/scripts/release-website.js b/scripts/release-website.js index e551bdb27f..9e9b95153d 100644 --- a/scripts/release-website.js +++ b/scripts/release-website.js @@ -56,7 +56,7 @@ const buildSite = (version) => { return new Promise((resolve, reject) => { console.log(`Building site with version ${version}`); exec( - `cd apps/website && NEXT_PUBLIC_SITE_VERSION=${version} npm run build`, + `cd apps/website && SITE_VERSION=${version} npm run build`, (error, stdout, stderr) => { if (error) { throw new Error(error.message);