-
Notifications
You must be signed in to change notification settings - Fork 0
Feature toggle
It is possible to turn off any step in the app using a feature toggle key:
Adding a toggle property to a step definition will remove the step from the application. This ensures that all toggled steps are disabled by default:
const myStep = {
path: '/my-step',
template: 'my-step',
toggle: 'MY_STEP_ENABLED'
...
}
If a step is disabled ensure there are no direct references to the steps path property. i.e. the next property of another step does not reference the disabled step.
Adding a feature toggle key to features.json allows the step to be enabled or disabled by setting the value of the key to true or false respectively. e.g. the following json will disable any step with the feature toggle key MY_STEP_ENABLED:
{
"MY_STEP_ENABLED": false
}
Adding the feature toggle key to the associated step in ./src/test/a11y/tests ensures that the a11y tests use the same feature toggles as the application:
{
url: URLS['MY_STEP'],
formData: () => ({
someValue: SOME_VALID_DATA
}),
toggle: 'MY_STEP_ENABLED'
}