-
Notifications
You must be signed in to change notification settings - Fork 962
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: e2e flakyness #1961
fix: e2e flakyness #1961
Conversation
The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌 |
Thank you for following the naming conventions for pull request titles! 馃檹 |
apps/web/playwright/survey.spec.tsWhile the current implementation is good, it can be further improved by using a variable for the file content instead of hardcoding it. This will make it easier to change the file content for different tests. const fileContent = "this is test";
await page.locator("input[type=file]").setInputFiles({
name: "file.txt",
mimeType: "text/plain",
buffer: Buffer.from(fileContent),
});
|
await page.locator("input[type=file]").setInputFiles({ | ||
name: "file.txt", | ||
mimeType: "text/plain", | ||
buffer: Buffer.from("this is test"), | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded file content in the file upload test has been replaced with a variable. This allows for easier modification of the file content for different tests.
await page.locator("input[type=file]").setInputFiles({ | |
name: "file.txt", | |
mimeType: "text/plain", | |
buffer: Buffer.from("this is test"), | |
}); | |
const fileContent = 'this is test'; | |
await page.locator('input[type=file]').setInputFiles({ | |
name: 'file.txt', | |
mimeType: 'text/plain', | |
buffer: Buffer.from(fileContent), | |
}); |
What does this PR do?
Fixes flaky e2e tests, implements strategies like waiting for response and so on
Fixes # (issue)
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated