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

Test wyszukiwania (3.8) wymusza użycie encodeURIComponent #3

Open
norin89 opened this issue Feb 28, 2024 · 0 comments
Open

Test wyszukiwania (3.8) wymusza użycie encodeURIComponent #3

norin89 opened this issue Feb 28, 2024 · 0 comments

Comments

@norin89
Copy link

norin89 commented Feb 28, 2024

Chciałem użyć do encodowania "search query" URLSearchParams by mieć w URL-u spacje zamienione na + bo uważam, że URL jest wtedy czytelniejszy. Natomiast testy wymagają by w query spacje były enkodowane na %20 czyli niejako wymusza użycie endoceURICompoent i wyklucza użycie URLSearchParams.

Screenshot 2024-02-28 at 22 30 32

await page.waitForURL(`**/search?query=${encodeURIComponent(productName!)}`);

P.S. Nawet Next.js w swoim "Learn Next.js" sugeruje użycie tego URLSearchParams - https://nextjs.org/learn/dashboard-app/adding-search-and-pagination#2-update-the-url-with-the-search-params

@norin89 norin89 changed the title Test wyszukiwania wymusza użycie encodeURIComponent Test wyszukiwania (3.8) wymusza użycie encodeURIComponent Feb 28, 2024
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

1 participant