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

e2e test for best practice content pages #2074

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

heyitsmebev
Copy link
Contributor

@heyitsmebev heyitsmebev commented Oct 31, 2024

As part of the end2end epic, this issue is to create testing for the new Best Practice content pages side nav

In my implementation, I'm using an endpoint to retrieve feature flags in E2E tests because Playwright runs in a browser environment and can't access Flask's server-side configuration (current_app.config). This endpoint allows Playwright to check feature flags dynamically, enabling conditional tests based on the feature's state.

@heyitsmebev heyitsmebev linked an issue Oct 31, 2024 that may be closed by this pull request
@heyitsmebev heyitsmebev self-assigned this Oct 31, 2024
Copy link
Contributor

@ccostino ccostino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @heyitsmebev! I had just one quick question to double check on, everything else looks good to me.

page.wait_for_load_state("domcontentloaded")
check_axe_report(page)

response = page.request.get(f"{E2E_TEST_URI}/test/feature-flags")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checking my understanding: this is just getting the response of the feature-flags URI, not actually going to the page, right?

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

Successfully merging this pull request may close these issues.

E2E- New best practice side nav
2 participants