-
-
Notifications
You must be signed in to change notification settings - Fork 146
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 - /my-posts page - Multiple issues available #1169
Comments
Uh oh! @JohnAllenTech, the image you shared is missing helpful alt text. Check #1169 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
Fantastic issue write up btw @John-Paul-Larkin |
Hey, I would love to help with testing @John-Paul-Larkin |
I actually think the details turned people off taking this issue 🤣 |
@JohnAllenTech Have you written any of these tests yet? PS Patrick, you can do these incrementally if you prefer. |
I just started with a simple test for the unauthenticated user that visits the 'my-posts' page. |
…#1169) - Implement tests to ensure the delete modal can be closed with both 'Cancel' and 'Close' buttons. - Add test to verify deletion of a published article through the delete modal. - Introduce utility functions `openPublishedTab` and `openDeleteModal` to streamline modal interactions in tests.
* test: add e2e tests for managing delete modal interactions (#1169) - Implement tests to ensure the delete modal can be closed with both 'Cancel' and 'Close' buttons. - Add test to verify deletion of a published article through the delete modal. - Introduce utility functions `openPublishedTab` and `openDeleteModal` to streamline modal interactions in tests. * feat(utils): add createArticle function for setting up test articles * feat: enhance test setup with additional articles in setup.ts * fix: improve selectors and function names, update delete test * fix: code style issue in types/types.ts --------- Co-authored-by: Niall Maher <[email protected]>
Context
We need to ensure that our core application features and user flows are fully covered by end-to-end (E2E) tests. We are using Playwright for these tests, and the workflow framework for E2E testing is already in place.
If you navigate to the e2e folder in the root of the project, you'll find that @JohnAllenTech has written numerous tests for the article page. These tests have been grouped into two categories: authenticated and unauthenticated. Please ensure that this pattern is followed when adding new tests.
Expected Behavior
Below is a list of possible tests for the
/my-posts
page. These are suggested tests generated with the help of ChatGPT, meant to provide a starting point. You should use your discretion to refine these tests and account for relevant edge cases.Additionally, feel free to propose other valid tests that might apply specifically to the functionality of the '/my-posts' page.
Tests should be standalone and focus on a single purpose, ensuring each test verifies only one specific behavior or functionality.
Test should be added to e2e/my-posts.spec.ts
Please leave a comment specifying the tests you plan to write, so others don't duplicate the same efforts.
All PRs are accepted for Hacktoberfest.
Note: For this page, the unauthenticated test is only necessary to verify that the user is correctly redirected to the
/get-started
page.Note: As multiple people may contribute to this issue, please ensure you pull the latest changes from the upstream and resolve any conflicts. Sync the upstream
Tests
Here are some suggested E2E tests for the page based on your provided details:
General Tests:
For the "Published" Tab:
Display Published Date
Sorting by Published Date
updatedAt
field.Note Refer to issue [fix] Post Sorting and Timestamp Display in Your Posts Section #1095 by @HarshitT00 to see how the "Published posts" should be sorted.
In published posts section as the post is published update post is done so updatedAt is set to slightly greater time than published so use 1 minute time difference to distinguish between a published post and a post that published but updated later
Edit Published Post
Delete Published Post
For the "Drafts" Tab:
Sorting by Last Updated
Edit Draft Post
Delete Draft Post
For the "Scheduled" Tab:
Sorting by Nearest Scheduled Date
Edit Scheduled Post
Additional Edge Case Tests:
Screenshots
The text was updated successfully, but these errors were encountered: