const ruleTester = require("../../ruletester"); import * as rule from "./pageSection-update-variant-values"; ruleTester.run("pageSection-update-variant-values", rule, { valid: [ { code: ``, }, { code: `import { PageSection } from '@patternfly/react-core'; `, }, { code: `import { PageSection } from '@patternfly/react-core'; `, }, { code: `import { PageSection } from '@patternfly/react-core'; `, }, { code: `import { PageSection } from '@patternfly/react-core'; `, }, { code: `import { PageSection, PageSectionVariants } from '@patternfly/react-core'; `, }, { code: `import { PageSection, PageSectionVariants } from '@patternfly/react-core'; `, }, ], invalid: [ { code: `import { PageSection } from '@patternfly/react-core'; `, output: `import { PageSection } from '@patternfly/react-core'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection } from '@patternfly/react-core'; `, output: `import { PageSection } from '@patternfly/react-core'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection as CustomPageSection } from '@patternfly/react-core'; `, output: `import { PageSection as CustomPageSection } from '@patternfly/react-core'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection, PageSectionVariants } from '@patternfly/react-core'; `, output: `import { PageSection, PageSectionVariants } from '@patternfly/react-core'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection, PageSectionVariants as CustomVariant } from '@patternfly/react-core'; `, output: `import { PageSection, PageSectionVariants as CustomVariant } from '@patternfly/react-core'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection } from '@patternfly/react-core/dist/esm/components/Page/index.js'; `, output: `import { PageSection } from '@patternfly/react-core/dist/esm/components/Page/index.js'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection } from '@patternfly/react-core/dist/js/components/Page/index.js'; `, output: `import { PageSection } from '@patternfly/react-core/dist/js/components/Page/index.js'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page/index.js'; `, output: `import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page/index.js'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/esm/components/Page/index.js'; `, output: `import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/esm/components/Page/index.js'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/js/components/Page/index.js'; `, output: `import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/js/components/Page/index.js'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, { code: `import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/dynamic/components/Page/index.js'; `, output: `import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/dynamic/components/Page/index.js'; `, errors: [ { message: `The \`variant\` prop for PageSection now only accepts a value of "default" or "secondary". Running the fix for this rule will remove the prop so it uses the default value of "default".`, type: "JSXOpeningElement", }, ], }, ], });