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 component testing #3042

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Add component testing #3042

merged 2 commits into from
Jan 11, 2024

Conversation

andysellick
Copy link
Contributor

@andysellick andysellick commented Jan 11, 2024

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

What

Improve component testing, specifically:

  • remove an unused component (heading)
  • add components test to check for required file existence and filename consistency

Why

Relates to alphagov/govuk_publishing_components#3369

Visual changes

None.

- no reference to it in the application
- no YML file, no test file
- already have a far more detailed heading component in the gem
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3042 January 11, 2024 09:48 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3042 January 11, 2024 10:09 Inactive
@andysellick andysellick marked this pull request as ready for review January 11, 2024 10:14
@andysellick andysellick requested a review from AshGDS January 11, 2024 10:15
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3042 January 11, 2024 11:24 Inactive
- checks for component files and their correct naming conventions
- 'context' requires `shoulda-context` gem for minitest (copying from `frontend`)
@andysellick andysellick force-pushed the add-component-testing branch from a7da498 to 0731dbc Compare January 11, 2024 11:33
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3042 January 11, 2024 11:33 Inactive
Copy link
Contributor

@AshGDS AshGDS left a comment

Choose a reason for hiding this comment

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

LGTM but had a question...

Why does this PR add shoulda-context to use should, but then the collections one didn't need it, and just used it?

EDIT: Ah, I'm guessing it's because one uses RSpec and one uses a different testing method?

@andysellick
Copy link
Contributor Author

@AshGDS yes - collections uses rspec, and frontend uses minitest. I find it all very confusing, personally.

@AshGDS
Copy link
Contributor

AshGDS commented Jan 11, 2024

@andysellick Same here 😅

@andysellick andysellick merged commit 5d05814 into main Jan 11, 2024
12 checks passed
@andysellick andysellick deleted the add-component-testing branch January 11, 2024 14:36
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.

3 participants