Previously: #18662 (comment)
Most of our end-to-end tests are written with a beforeEach or before lifecycle method to create a new post, in order to assure an isolated environment in which the test cases can be run. Naturally, since createNewPost requires a full page navigation, this setup work can contribute significantly to the overall runtime of the test suite.
Since most all of the editor state should be contained within the data module, it may be possible to track the initial state of a new post the first time a navigation occurs, then subsequent calls to createNewPost would simply reset to that initial state, rather than perform their own full page navigation.
Not all state can be accounted-for in data, and may need to be manually adjusted:
- Scroll position
- Active focus element
- [...others?]
Previously: #18662 (comment)
Most of our end-to-end tests are written with a
beforeEachorbeforelifecycle method to create a new post, in order to assure an isolated environment in which the test cases can be run. Naturally, sincecreateNewPostrequires a full page navigation, this setup work can contribute significantly to the overall runtime of the test suite.Since most all of the editor state should be contained within the
datamodule, it may be possible to track the initial state of a new post the first time a navigation occurs, then subsequent calls tocreateNewPostwould simply reset to that initial state, rather than perform their own full page navigation.Not all state can be accounted-for in
data, and may need to be manually adjusted: