-
Notifications
You must be signed in to change notification settings - Fork 332
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 breadcrumbs template tests to use jsdom #5027
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.
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.
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 4e53a39 |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json b/packages/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json
index 16b5d1226..866d1c709 100644
--- a/packages/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json
@@ -209,32 +209,36 @@
"options": {
"items": [
{
- "text": "<span>Section 1</span>"
+ "text": "<span>Section 1</span>",
+ "href": "/section-1"
+ },
+ {
+ "text": "<span>Section 2</span>"
}
]
},
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><span>Section 1</span></li>\n </ol>\n</div>"
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-1\"><span>Section 1</span></a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><span>Section 2</span></li>\n </ol>\n</div>"
},
{
"name": "html",
"options": {
"items": [
{
- "html": "<em>Section 1</em>"
+ "html": "<em>Section 1</em>",
+ "href": "/section-1"
},
{
- "html": "<em>Section 2</em>",
- "href": "/section-2"
+ "html": "<em>Section 2</em>"
}
]
},
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
- "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 1</em></li>\n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-2\"><em>Section 2</em></a>\n </li>\n </ol>\n</div>"
+ "html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-1\"><em>Section 1</em></a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 2</em></li>\n </ol>\n</div>"
}
]
}
Action run for 4e53a39 |
owenatgov
approved these changes
Jun 10, 2024
domoscargin
pushed a commit
that referenced
this pull request
Jun 19, 2024
Update breadcrumbs 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.
Part of #5010.