acteng / update-your-capital-schemes

Update your capital schemes service.
https://update-your-capital-schemes.activetravelengland.gov.uk/
MIT License
4 stars 0 forks source link

Use pytest-base-url plugin for page object URLs #21

Open markhobson opened 1 year ago

markhobson commented 1 year ago

We currently derive the app's base URL from the Flask app in e2e tests. This would be simplified if we used pytest-base-url to automatically configure Playwright with the app's base URL.

markhobson commented 1 year ago

Currently blocked in doing this by #20 as pytest-base-url's _verify_url fixture is fixed to session scope.

markhobson commented 1 year ago

Decided upon package scope for e2e live servers, but this is still problematic for pytest-base-url which is hardcoded to session.

markhobson commented 11 months ago

Raised https://github.com/pytest-dev/pytest-base-url/issues/39 to support dynamic scopes.

There is also a similar issue with pytest-playwright's browser_context_args fixture being fixed to session scope. This also needs to be dynamic.