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

Added two tests to SettingsPage.test.js #134

Merged

Conversation

thegreatzoidberg
Copy link
Contributor

@thegreatzoidberg thegreatzoidberg commented Apr 23, 2024

Overview

Added two tests regarding account deletion and unauthorized user errors. These two tests cover lines 28 - 39, leaving only line 27 as uncovered.

ChatGPT was used to develop these tests.
https://chat.openai.com/share/4bea6d17-2817-454e-94ad-04bd2e9f0c8d

Related Issue(s)

Closes #111.

Added

  • Two new tests in SettingsPage.test.js.
    • Lines 82-120
  • Two imports (axios, waitFor from react)

Fixed

  • SettingsPage Line Coverage is now 93%.
    • Up from 66%.
    • Total Line Coverage 91.9% -> 93.52%

Screenshots

image

Checklist before Merging

  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate).
  • I have ensured the changes adhere to the project's coding standards and guidelines.

Additional Comments

  • If anyone wants to suggest an edit to cover 27, feel free to let me know.

Copy link
Contributor

@dusek2 dusek2 left a comment

Choose a reason for hiding this comment

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

Pull Request Review

  • Readability:
    Code modifications are well-documented and structured clearly.

  • Code Quality:
    Includes proper mocking and structured test cases. Good adherence to testing standards.

  • Testing:
    Enhanced coverage significantly; still, one line remains untested.

  • Functionality:
    Tests critical user actions effectively, ensuring system robustness.

  • Housekeeping:
    Well maintained with clear links to related issues and conversation logs.

Thank you our test coverage is looking healthy now!

Copy link
Contributor

@barkangel barkangel left a comment

Choose a reason for hiding this comment

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

Pull Request Review

  • Readability:
    Code is readable and comments included help me understand the code

  • Code Quality:
    Axios testing in Settingspage.test.js is quality and follows test structure,

  • Testing:
    Testing coverage increase as shown in coverage report actions!

  • Functionality:
    PR modified one file, and increases test coverage, thus works as intended!

  • Housekeeping:
    ChatGPT noted and included properly with code comments
    Good to merge!

@thegreatzoidberg thegreatzoidberg merged commit 78863c7 into UNLV-CS472-672:main Apr 23, 2024
1 check passed
@thegreatzoidberg thegreatzoidberg deleted the SettingsPageCoverage branch April 23, 2024 22:54
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 this pull request may close these issues.

SettingsPage.js Test Coverage Low
3 participants