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

Add Automated Tests for Bug/Feedback Form and Bug Archive Page - User Story 2 #56

Merged
merged 6 commits into from
Oct 20, 2024

Conversation

galishaq
Copy link

Description
This pull request is for automatically testing the bug/feedback form submission and the bug archive page in the admin dashboard. These tests verify that both the form and archive page function as intended and handle different scenarios effectively.

Changes

New Test Files:

  • test/bug-archive.js: Contains unit tests for the bug archive feature.
  • test/bug-form.js: Contains unit tests for the bug/feedback form submission feature.

Bug/Feedback Form Tests:

  • Simulate user input for the form fields (title, description, and CSRF token).
  • Verify the form submission logic is executed correctly.
  • Check if appropriate success and failure alert messages are displayed.
  • Ensure form data (title, description, and CSRF token) is properly passed in the fetch request.

Bug Archive Page Tests:

  • retrieving the bug archive.
  • Simulate API calls and verify the data retrieval process.
  • Verify the retrieved data is correctly rendered in the UI.
  • test the refresh button for refreshing the page when a new bug is added
  • Check if appropriate error messages are displayed when API calls fail.

resolves #54
resolves #55

Ghalya AL-Eshaq added 6 commits October 20, 2024 01:27
…ared in the new branch auto-test-us2 under the path test/bug-archive.js
…test the bug archive page in the admin dashboared
…e new branch auto-test-us2 under the path test/bug-archive.js
…e sidebar-left in the new branch auto-test-us2 under the path test/bug-form.js
…t the bug form and the submit bug button in the left sidebar on the UI
@galishaq galishaq added this to the Sprint 2 milestone Oct 20, 2024
@galishaq galishaq self-assigned this Oct 20, 2024
@galishaq galishaq changed the base branch from f24 to sprint2 October 20, 2024 12:52
@galishaq galishaq merged commit e0c9ca6 into sprint2 Oct 20, 2024
1 check failed
@galishaq galishaq requested a review from AlAnoud2003 October 20, 2024 19:22
Copy link

@AlAnoud2003 AlAnoud2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants