Financial-Times / n-test

A CLI tool and module for lightweight testing of web applications in browsers, designed for FT.com
4 stars 2 forks source link

Fix logging user tests #160

Closed leannecornish-ft closed 3 years ago

leannecornish-ft commented 3 years ago

When the 'user' option is used to test logging-in behaviour, the original URL is overwritten with a .ft.com host (with the original in the FT-Test-Host header). This is necessary to obtain a user token.

Because of this, the test results print the .ft.com address rather than the original, as they're referencing 'testpage.url'.

This pull request is to check for the presence of the FT-Test-Host header, and, if it exists, print the original URL instead. This should remove any confusion when interpreting the test results.