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

QA TESTING: CREATING 2 TEST #575

Closed
el-riber opened this issue Nov 13, 2024 · 0 comments · Fixed by #576
Closed

QA TESTING: CREATING 2 TEST #575

el-riber opened this issue Nov 13, 2024 · 0 comments · Fixed by #576
Assignees

Comments

@el-riber
Copy link
Contributor

Test Cases
We’ll create two test files, archivedEvents.test.tsx and myEvents.test.tsx, in the tests/unit directory. These tests will use React Testing Library to verify the rendering of components based on user authorization and the presence of data.

  1. archivedEvents.test.tsx
    The tests for the ArchivedEvents page will cover the following scenarios:

The page renders the unauthorized message if the user is not authenticated or does not have the correct role.
The page displays a list of archived events for authorized users.
The "Load more events" button works as expected to load additional events.

  1. myEvents.test.tsx
    The tests for the MyEvents page will cover:
Screenshot 2024-11-11 at 11 39 51 PM

Displaying the unauthorized message if the user is not authorized.
Rendering the "My Created Events" title for authorized users.
Checking if the component MyEventsList is rendered for authorized users.

Screenshot 2024-11-11 at 11 39 36 PM
@el-riber el-riber linked a pull request Nov 13, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant