Deferred from the codebase convergence work. Every fix here renames or reshapes a published symbol of this library, so it is a backward-compatibility break and was deliberately left out of the non-breaking follow-up.
Summary
printLastResponseOnError() does not print anything. It saves an HTML and an image screenshot when a step fails. The name is a leftover and actively misleads anyone reading the class.
Details
The docblock was corrected to describe the real behaviour, but the method name itself is public API and could not be changed without a break.
The hook methods also follow three different naming shapes:
| Shape |
Methods |
| phase-prefixed |
beforeScenarioCheckScreenshotsTag, beforeScenarioInit, beforeStepInit, afterScenarioAnimate |
| phase-suffixed |
captureScreenshotAfterStep |
| phase-absent, and misnamed |
printLastResponseOnError |
Phase-prefixed has a clear majority. Renaming printLastResponseOnError is the highest-value item here: it is the only name in the codebase that states something the method does not do.
All six are public methods on a class consumers extend, so any rename is a break.
Deferred from the codebase convergence work. Every fix here renames or reshapes a published symbol of this library, so it is a backward-compatibility break and was deliberately left out of the non-breaking follow-up.
Summary
printLastResponseOnError()does not print anything. It saves an HTML and an image screenshot when a step fails. The name is a leftover and actively misleads anyone reading the class.Details
The docblock was corrected to describe the real behaviour, but the method name itself is public API and could not be changed without a break.
The hook methods also follow three different naming shapes:
beforeScenarioCheckScreenshotsTag,beforeScenarioInit,beforeStepInit,afterScenarioAnimatecaptureScreenshotAfterStepprintLastResponseOnErrorPhase-prefixed has a clear majority. Renaming
printLastResponseOnErroris the highest-value item here: it is the only name in the codebase that states something the method does not do.All six are public methods on a class consumers extend, so any rename is a break.