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

Sensitive state is shared between tests #4233

Open
obulat opened this issue Apr 30, 2024 · 1 comment
Open

Sensitive state is shared between tests #4233

obulat opened this issue Apr 30, 2024 · 1 comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend

Comments

@obulat
Copy link
Contributor

obulat commented Apr 30, 2024

Description

In the Playwright tests, sometimes tests fetch sensitive data even if no features are set for them. No cookies are set when we do not alter any feature in preparePageForTests, so it seems that the tests are reading the cookie from another test.

Issue based on the comment

I don't know how, but it seems that the sensitive tests are changing the state for other tests, and make them add mature=true to requests. To prevent that, we always set fetch_sensitive to false if no features are passed here.

Originally posted by @obulat in #4222 (comment)

@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Apr 30, 2024
@obulat obulat added 🟩 priority: low Low priority and doesn't need to be rushed 🛠 goal: fix Bug fix 🧱 stack: frontend Related to the Nuxt frontend 💻 aspect: code Concerns the software code in the repository labels Apr 30, 2024
@obulat
Copy link
Contributor Author

obulat commented May 2, 2024

I think I found the reason for this issue and added a fix in #4231: the fetch_sensitive should be saved in the sessionFeatures cookie, not in the features cookie where the preparePageForTests was saving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant