If you’re using Playwright for end-to-end testing, you should check out Playwright Check Suites and start testing in production.
Steps
Account properties to verify can run the gamut from simple text to connected third party services. In this example, we will focus on a popular case: changing a profile image by uploading one of our own. On our test site, such a test could look as follows:file-upload.ts
Takeaways
- Use environment variables to inject secrets.
- Use
setInputFiles(Playwright) to upload the file. - If possible, download the file from the platform and compare it with the one that was just uploaded.
Further reading
- Official documentation from Playwright