-
Notifications
You must be signed in to change notification settings - Fork 38
[terra-functional-testing] Remove axe option from the Terra Service #466
Conversation
const globalRuleArray = Object.keys(Terra.axe.rules).map((rule) => ( | ||
{ ...Terra.axe.rules[rule], id: rule } | ||
)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const globalRuleArray = Object.keys(Terra.axe.rules).map((rule) => ( | |
{ ...Terra.axe.rules[rule], id: rule } | |
)); | |
const globalRuleArray = Object.entries(Terra.axe.rules).map((rule, settings) => ( | |
{ ...settings, id: rule } | |
)); |
const { formFactor, theme } = options; | ||
|
||
this.formFactor = formFactor; | ||
this.theme = theme || 'terra-default-theme'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #464 I'm exposing the entire service options object thru Terra.serviceOptions
. I should probably default Terra.serviceOptions.theme
to terrra-default-theme
to keep them in sync. Would it be better to default the theme to terrra-default-theme
in wdio.config.js or are we concerned that this config may get overridden by consumers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the TerraService should default the option if it needs a default rather than requiring a theme be set in the wdio.config
Summary
This PR removes the
axe
override from the Terra Service configuration options. These rules are now set explicitly by the service.Resolves #463
Additional Details
To remove the
axe
option atheme
option was required to properly configure the axe rules based on the current theme. The theme is currently used for the lowlight theme to adjust the color contrast rules.https://github.com/cerner/terra-toolkit-boneyard/blob/main/config/wdio/wdio.conf.js#L100-L102
@cerner/terra