Skip to content

E2E Test Utils: createNewPost should reset to an initial state, avoid navigation #18668

@aduth

Description

@aduth

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?]

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Tool] E2E Test Utils/packages/e2e-test-utils[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] PerformanceRelated to performance efforts

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions