diff --git a/packages/eslint-plugin-pf-codemods/src/rules/v6/cardUpdatedClickableMarkup/card-updated-clickable-markup.test.ts b/packages/eslint-plugin-pf-codemods/src/rules/v6/cardUpdatedClickableMarkup/card-updated-clickable-markup.test.ts
index d61619ae..01765df2 100644
--- a/packages/eslint-plugin-pf-codemods/src/rules/v6/cardUpdatedClickableMarkup/card-updated-clickable-markup.test.ts
+++ b/packages/eslint-plugin-pf-codemods/src/rules/v6/cardUpdatedClickableMarkup/card-updated-clickable-markup.test.ts
@@ -20,6 +20,7 @@ ruleTester.run("card-updated-clickable-markup", rule, {
},
],
invalid: [
+ // No invalid properties
{
code: `import { Card, CardHeader } from '@patternfly/react-core'; `,
output: `import { Card, CardHeader } from '@patternfly/react-core'; `,
@@ -30,6 +31,19 @@ ruleTester.run("card-updated-clickable-markup", rule, {
},
],
},
+ // 1 valid property + 1 invalid property
+ {
+ code: `import { Card, CardHeader } from '@patternfly/react-core'; `,
+ output: `import { Card, CardHeader } from '@patternfly/react-core'; `,
+ errors: [
+ {
+ message:
+ "The markup for clickable-only cards has been updated.Additionally, the `selectableActions.selectableActionId` and `selectableActions.name` props are no longer necessary to pass to CardHeader for clickable-only cards.",
+ type: "JSXElement",
+ },
+ ],
+ },
+ // 2 invalid properties
{
code: `import { Card, CardHeader } from '@patternfly/react-core'; `,
output: `import { Card, CardHeader } from '@patternfly/react-core'; `,
@@ -41,6 +55,7 @@ ruleTester.run("card-updated-clickable-markup", rule, {
},
],
},
+ // 1 valid property + 2 invalid properties
{
code: `import { Card, CardHeader } from '@patternfly/react-core'; `,
output: `import { Card, CardHeader } from '@patternfly/react-core'; `,
@@ -53,6 +68,7 @@ ruleTester.run("card-updated-clickable-markup", rule, {
},
],
},
+ // Passed as a variable reference
{
code: `import { Card, CardHeader } from '@patternfly/react-core'; const obj = {name: 'Test', selectableActionId: 'Id'}; `,
output: `import { Card, CardHeader } from '@patternfly/react-core'; const obj = {}; `,
@@ -64,6 +80,7 @@ ruleTester.run("card-updated-clickable-markup", rule, {
},
],
},
+ // Passed as a variable reference with 2 valid and 2 invalid properties
{
code: `import { Card, CardHeader } from '@patternfly/react-core'; const obj = {to: "#", name: 'Test', extra: "thing", selectableActionId: 'Id'}; `,
output: `import { Card, CardHeader } from '@patternfly/react-core'; const obj = {to: "#", extra: "thing"}; `,