Repository navigation
Custom Steps
Users can scaffold test stories basing on Handow built-in steps library, but these steps just cover the common requirements. Sometime users have to create additional step functions and add them to steps library.
- Developers want to customize the label of the built-in steps to make them friendly in stories and reports.
- Developers want to join multiple built-in steps into one compounded step to make the statements clean.
- The required operation not available, e.g., there isn't Hightligh Content & Copy To Clipboard action step in built-in library, so the developers have to create one.
There are 2 files defined in handow-seed project, /project/steps/actSteps.step.js and /project/steps/factSteps.step.js. Developers can add custom steps to relevant file, Handow will build them and install them to steps library.
In fact, you cannot change the label of a built-in step. But you can copy a built-in step function and paste it to relevant custom step file and then refactor its label. These "twins-steps" have same functions but with different labels, you can choose the custom label to scaffold your stories.
Developers have to write code to add a step function to relevant custom step file. It should be easy if you write code by simulating the existed steps. Refer Step Specification to learn how to write a step.
This is similar with creating a new step. The difference is all the code is available in the candidate steps, you just reorganize them in sync and async ways.
Before adding new steps, developers should know the Handow Engine
Supported by Handow team support@handow.org