-
Notifications
You must be signed in to change notification settings - Fork 325
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
Update back link template tests to use jsdom #5026
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The next commit will refactor the tests to make use of jsdom which requires us to update the filename so that we get the jsdom test environment. Doing this in two commits so that git shows the changes to the file rather than treating it as an addition and a deletion.
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 33a613a |
Other changes to npm packageThe diff could not be posted as a comment. You can download it from the workflow artifacts. Action run for 33a613a |
36degrees
force-pushed
the
jsdom-back-link-template-tests
branch
from
May 31, 2024 15:43
58e1a84
to
af3de3e
Compare
owenatgov
approved these changes
Jun 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One non-blocker. Approving now so you can just merge it©️ when you wanna.
The template already uses a default href of ‘#’ if no href is provided, which we want to test – passing ‘#’ as an option defeats the point of the test.
There’s already an expectation for the default text of ‘Back’ in the ‘renders the default example with an anchor, href and text correctly’ test. The template has no option for inverse colours – the example just passes an additional class, so the test has no value over the existing test for additional classes.
36degrees
force-pushed
the
jsdom-back-link-template-tests
branch
from
June 10, 2024 15:26
af3de3e
to
33a613a
Compare
Rendered HTML changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html b/packages/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html
new file mode 100644
index 000000000..9ffb06ea9
--- /dev/null
+++ b/packages/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html
@@ -0,0 +1 @@
+<a href="/home" class="govuk-back-link">Back to home</a>
Action run for 33a613a |
owenatgov
approved these changes
Jun 10, 2024
domoscargin
pushed a commit
that referenced
this pull request
Jun 19, 2024
Update back link template tests to use jsdom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Plus some tidying up of the existing tests and a couple of simplifications of the template – see individual commits for details.
Part of #5010.