Simplify and standardize testing structure

This commit is contained in:
adilallo
2026-01-28 14:04:04 -07:00
parent e7a31789e3
commit 7ea724a8d9
95 changed files with 1534 additions and 15485 deletions
+27
View File
@@ -0,0 +1,27 @@
import React from "react";
import Toggle from "../../app/components/Toggle";
import { componentTestSuite } from "../utils/componentTestSuite";
type ToggleProps = React.ComponentProps<typeof Toggle>;
componentTestSuite<ToggleProps>({
component: Toggle,
name: "Toggle",
props: {
label: "Notifications",
checked: false,
} as ToggleProps,
requiredProps: [],
primaryRole: "switch",
testCases: {
renders: true,
accessibility: true,
keyboardNavigation: true,
disabledState: true,
errorState: false,
},
states: {
disabledProps: { disabled: true },
},
});