Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: defaultPrepare should be exported #488

Open
NotWoods opened this issue Jun 28, 2024 · 0 comments
Open

[Feature request]: defaultPrepare should be exported #488

NotWoods opened this issue Jun 28, 2024 · 0 comments
Labels
feature request New feature or request needs triage

Comments

@NotWoods
Copy link

Is your feature request related to a problem? Please describe.

If I want to run some page setup with Playwright before page.goto, there's no good way to do so without rewriting everything the default prepare hook does.

Describe the solution you'd like

I'd like defaultPrepare to be exported or made available to the test runner config in some way, so I could write a config like:

export default {
  async prepare(args) {
    await args.page.addInitScript(...);
    await defaultPrepare(args);
  }
}

Describe alternatives you've considered

This could also be done as a prePrepare/postPrepare hook but then starts to balloon the config options available.

Are you able to assist to bring the feature to reality?

yes, I can

Additional context

No response

@NotWoods NotWoods added feature request New feature or request needs triage labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

1 participant