Skip to content

Add an extension point for optional wait operation before TriggerAfterPageChangeEventAsync is called (OSOE-972) #445

@sarahelsaig

Description

@sarahelsaig

Sometimes frontend code immediately triggers an asynchronous fetch to get data after the page has loaded. One example is Lombiq.DataTables, where the data is delivered through a separate JSON-returning web request. To achieve the correct, repeatable behavior post-navigation events such as html-validate and Axe checks should only be called when this secondary loading has finished, so a page with useful content can be evaluated.

Unfortunately, there is no universal way to tell when is a site ready, so you'd want to write specific wait logic for each test that accommodates the frontend technologies used in that specific test. We should add some property to the configuration property (e.g. context.Configuration.Events.WaitAfterPageChange : Func<UITestContext, Task>) which can wait for the page state to indicate no loading.

Also implement such a wait for Lombiq.OSOCE.Tests.UI.Tests.ModuleTests.BehaviorDataTablesTests.RecipeDataShouldBeDisplayedCorrectly.

For more context see in Jira.

Jira issue

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions