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

Better Phoenix.Ecto.SQL.Sandbox setup #7

Open
michallepicki opened this issue Nov 6, 2021 · 2 comments
Open

Better Phoenix.Ecto.SQL.Sandbox setup #7

michallepicki opened this issue Nov 6, 2021 · 2 comments

Comments

@michallepicki
Copy link

michallepicki commented Nov 6, 2021

Hi!

I managed to get the Phoenix sandbox set up, and wrote about it on my blog. I found that the existing PlaywrightTest.Case module, the Playwright.Browser.new_context function and Playwright.Browser.new_page were not sufficient for my needs so I had to copy and modify them. Maybe this can be improved by changing the library?

As a note, I think it may be better to configure the user-agent header instead of a separate one like I did, but then I think the metadata should be appended to existing user agent that Playwright would use, and I couldn't find a way to read it. Maybe there's a way, or maybe such feature can be requested from upstream. Ideally the user could do either one, by making the library flexible and allowing to configure both the user-agent and additional headers.

@coreyti
Copy link
Member

coreyti commented Nov 8, 2021

Hi @michallepicki,

Thanks for pointing this out. In fact, I was just starting to rework the two (external and internal) test case modules yesterday.

It's great to have your use case to consider, and I'll continue on that today. It's great to see your blog post out there. Thanks for that!

@coreyti
Copy link
Member

coreyti commented Nov 9, 2021

Hi @michallepicki,

@woodward and I started working on this today. You can see the initial change, to add handling of custom options (incl. extra_http_headers) to calls to Browser.new_context in "Add support for options to Browser.new_context".

Still more to come in order to get to what you're looking for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants