Skip to content

[Feature]: Search params page assertion #32708

@joshuajaco

Description

@joshuajaco

🚀 Feature Request

There should be an API to test search params of the page, something like:

await expect(page).toHaveSearchParams({ foo: "bar" });

Example

No response

Motivation

toHaveURL is not sufficient for testing search params for multiple reasons:

  • Params need to be URL escaped
  • Param order needs to be consistent
  • The path needs to be known

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions