Stubbing out methods with the “alreadyFailed” switchboard key
A framework with a single point of exit can use the switchboard to track the number of pass, fail, and skipped steps. By embedding the alreadyFailed
switch in the ASB switchboard, methods can be written to be stubbed out, reporting only what the action had been intended to do:
ASB.set(`alreadyFailed`, !found) if (ASB.get(`alreadyFailed`) === true)) { allure.addStep(`Click '${selector}'`, undefined, 'skipped'); ASB.set(`skipped`, ASB.get(`skipped`)++) return; }
This skips all page sync time and delays while incrementing a counter for the number of steps needed to get the test to its destination.