Titles a page after the test that made it
All 12 scenarios hold
A page needs two names: the title a reader sees, and the file name the URL ends in. Both come from the test that produced the page. A class or method that carries a @DisplayName supplies its own title, and the rules below are what happens when it does not.
The name is read as words and written back with a space between them. A run of capital letters is one word, so an acronym survives. A run that ends the name joins the word before it, which is why getHTTPSURL reads as it does.
Only the first letter of the title is capitalised. No other letter changes case, which is why the underscore name reads Snake name and not Snake Name. A name already written with spaces is left alone.
expected outcome
broken scenario
| Name | Title? |
|---|---|
| LeapYearRules | Leap Year Rules |
| simpleTest | Simple Test |
| XMLParser | XML Parser |
| parseHTMLDocument | Parse HTML Document |
| getHTTPSURL | Get HTTPSURL |
| test123Method | Test123 Method |
| A | A |
| ABC | ABC |
| snake_name | Snake name |
| name with spaces | name with spaces |
| “” | “” |