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

Update breadcrumbs template tests to use jsdom #5027

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

36degrees
Copy link
Contributor

Part of #5010.

36degrees added 3 commits May 31, 2024 16:38
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.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5027 May 31, 2024 16:24 Inactive
Copy link

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.37 KiB
dist/govuk-frontend-development.min.js 42.34 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 88.16 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 82.83 KiB
packages/govuk-frontend/dist/govuk/all.mjs 981 B
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.36 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.33 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 4.86 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 78.45 KiB 40.31 KiB
accordion.mjs 22.71 KiB 12.85 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for 4e53a39

Copy link

Other changes to npm package

diff --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\">&lt;span&gt;Section 1&lt;/span&gt;</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\">&lt;span&gt;Section 1&lt;/span&gt;</a>\n    </li>\n    <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">&lt;span&gt;Section 2&lt;/span&gt;</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

@36degrees 36degrees merged commit 2690509 into main Jun 10, 2024
49 checks passed
@36degrees 36degrees deleted the jsdom-breadcrumbs-template-tests branch June 10, 2024 15:27
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
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants