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

Refactor: Project Samples Test #869

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

ChrisHuynh333
Copy link
Collaborator

@ChrisHuynh333 ChrisHuynh333 commented Dec 12, 2024

What does this PR do and why?

This PR refactors system/projects/samples_test.rb.

Upon revision, there were many aspects of the testing file that needed cleanup and/or fixing.
This is including but not limited to:

  1. Ensuring assertions are actually testing what the test title states
  2. Removing redundancies between tests (eg: no need to check for a header every time we visit a page unless we're testing a redirect). Note: There are cases where tests are flaky, and the resolution is to add additional asserts (such as anything with select2). These cases will have repetitive assertions and should be commented on.
  3. Split larger tests into multiple tests so tests are shorter and more focused.
  4. Use of ID selectors as much as possible

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.

How to set up and validate locally

  1. Verify tests pass locally

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

This comment has been minimized.

@ChrisHuynh333 ChrisHuynh333 force-pushed the refactor/project-samples-test branch 3 times, most recently from 713784f to 2376ede Compare December 16, 2024 15:29

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@ChrisHuynh333 ChrisHuynh333 force-pushed the refactor/project-samples-test branch from b0cefc6 to 973859e Compare December 20, 2024 15:33

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@ChrisHuynh333 ChrisHuynh333 marked this pull request as ready for review December 20, 2024 17:05
Copy link

Code Metrics Report

Coverage Test Execution Time
92.6% 10m42s

Reported by octocov

@ChrisHuynh333 ChrisHuynh333 added ready for review Pull request is ready for review and removed on hold labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant