Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/website/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
33 changes: 1 addition & 32 deletions packages/lib/.storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 1 addition & 0 deletions packages/lib/src/table/Table.accessibility.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/table/Table.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/tooltip/Tooltip.accessibility.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
1 change: 1 addition & 0 deletions packages/lib/src/tooltip/Tooltip.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-website.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down