Change record status: 
Project: 
Introduced in branch: 
8.4.x
Introduced in version: 
8.4.0
Description: 

JavascriptTestBase must test browser interaction and in preparation of a driver change (#2775653: JavascriptTests with webDriver) the methods that inspect the headers now throw exceptions for JavaScriptTestBase tests.

The following methods should not be used anymore for JavascriptTestBase tests and will throw exceptions if called:
- statusCodeEquals
- statusCodeNotEquals
- responseHeaderEquals
- responseHeaderNotEquals
- responseHeaderContains
- responseHeaderNotContains
- responseHeaderMatches
- responseHeaderNotMatches

As alternative you can extend LegacyJavascriptTestBase and carry on, but its highly recommended to convert it over.

All assertions within these tests must be done by checking the UI. Assertions that don't relate to UI should be added to other types of tests, a BrowserTestBase for example.

For example, if a statusCodeEquals(200) was used, change it to assert the availability of an element on the page that you'd only expect on a successful page load.

Impacts: 
Module developers