@ons/design-system 68.0.0 → 70.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/components/access-code/_macro.njk +1 -1
- package/components/access-code/_macro.spec.js +2 -10
- package/components/access-code/access-code.dom.js +1 -1
- package/components/access-code/access-code.spec.js +2 -2
- package/components/access-code/example-access-code-error.njk +9 -14
- package/components/access-code/example-access-code.njk +3 -5
- package/components/accordion/accordion.js +4 -4
- package/components/address-input/_macro.spec.js +3 -15
- package/components/address-input/autosuggest.address.dom.js +1 -1
- package/components/address-input/autosuggest.address.js +3 -2
- package/components/address-input/autosuggest.address.setter.js +3 -3
- package/components/address-input/autosuggest.address.spec.js +66 -69
- package/components/address-output/_macro.spec.js +6 -30
- package/components/autosuggest/_autosuggest.scss +1 -1
- package/components/autosuggest/autosuggest.dom.js +1 -1
- package/components/autosuggest/autosuggest.helpers.js +1 -1
- package/components/back-to-top/_back-to-top.scss +34 -0
- package/components/back-to-top/_macro.njk +17 -0
- package/components/back-to-top/_macro.spec.js +60 -0
- package/components/back-to-top/back-to-top.dom.js +12 -0
- package/components/back-to-top/back-to-top.js +58 -0
- package/components/back-to-top/back-to-top.spec.js +117 -0
- package/components/back-to-top/example-back-to-top.njk +37 -0
- package/components/back-to-top/example-full-page-back-to-top.njk +192 -0
- package/components/browser-banner/_macro.spec.js +4 -12
- package/components/button/_macro.njk +6 -6
- package/components/button/_macro.spec.js +1 -5
- package/components/button/button.js +7 -8
- package/components/button/button.spec.js +17 -39
- package/components/call-to-action/_macro.spec.js +2 -6
- package/components/card/_macro.njk +25 -25
- package/components/card/_macro.spec.js +10 -34
- package/components/char-check-limit/_macro.njk +1 -1
- package/components/char-check-limit/_macro.spec.js +3 -7
- package/components/char-check-limit/character-check.spec.js +24 -20
- package/components/checkboxes/_checkbox-macro.njk +1 -1
- package/components/checkboxes/_checkbox.scss +0 -3
- package/components/checkboxes/_macro.spec.js +1 -5
- package/components/checkboxes/checkbox-with-autoselect.js +3 -3
- package/components/checkboxes/checkbox-with-fieldset.js +2 -2
- package/components/checkboxes/checkboxes-with-reveal.js +4 -2
- package/components/checkboxes/checkboxes.dom.js +2 -2
- package/components/checkboxes/checkboxes.spec.js +13 -13
- package/components/content-pagination/_macro.spec.js +2 -2
- package/components/cookies-banner/cookies-banner.dom.js +1 -1
- package/components/cookies-banner/cookies-banner.js +1 -1
- package/components/cookies-banner/cookies-banner.spec.js +7 -7
- package/components/date-input/_macro.njk +71 -69
- package/components/date-input/_macro.spec.js +20 -5
- package/components/date-input/example-date-input-double-field.njk +27 -0
- package/components/date-input/example-date-input-single-field.njk +18 -0
- package/components/details/details.spec.js +12 -12
- package/components/details/example-details-with-warning.njk +5 -7
- package/components/document-list/_macro.spec.js +9 -27
- package/components/document-list/document-list.scss +1 -1
- package/components/document-list/example-document-list-downloads.njk +3 -3
- package/components/document-list/example-document-list-search-result-featured.njk +1 -1
- package/components/document-list/example-document-list-search-results.njk +3 -3
- package/components/download-resources/download-resources.js +54 -54
- package/components/download-resources/download-resources.spec.js +3 -1
- package/components/duration/_macro.njk +52 -48
- package/components/duration/_macro.spec.js +112 -4
- package/components/duration/example-duration-error-for-single-field.njk +1 -1
- package/components/duration/example-duration-single-field.njk +24 -0
- package/components/error/_macro.njk +1 -1
- package/components/error/_macro.spec.js +2 -6
- package/components/feedback/_macro.njk +1 -1
- package/components/feedback/_macro.spec.js +4 -20
- package/components/field/_macro.spec.js +1 -3
- package/components/fieldset/_fieldset.scss +1 -2
- package/components/fieldset/_macro.spec.js +3 -9
- package/components/footer/_footer.scss +8 -0
- package/components/footer/_macro.njk +8 -7
- package/components/footer/_macro.spec.js +14 -2
- package/components/header/_macro.njk +1 -1
- package/components/header/_macro.spec.js +1 -1
- package/components/helpers/grid.njk +15 -15
- package/components/icon/_macro.njk +15 -11
- package/components/icon/_macro.spec.js +8 -16
- package/components/image/_macro.spec.js +1 -5
- package/components/input/_macro.njk +22 -23
- package/components/input/_macro.spec.js +1 -1
- package/components/input/character-check.dom.js +1 -1
- package/components/input/input.spec.js +1 -4
- package/components/label/_label.scss +1 -0
- package/components/label/_macro.njk +2 -2
- package/components/label/_macro.spec.js +4 -13
- package/components/list/_macro.spec.js +4 -12
- package/components/message/_macro.njk +17 -17
- package/components/message/_macro.spec.js +9 -33
- package/components/message-list/_macro.spec.js +7 -39
- package/components/metadata/_macro.njk +10 -10
- package/components/modal/_macro.spec.js +3 -9
- package/components/modal/modal.dom.js +1 -1
- package/components/modal/modal.spec.js +5 -5
- package/components/multiple-input-fields/_macro.njk +49 -0
- package/components/mutually-exclusive/_macro.spec.js +2 -10
- package/components/mutually-exclusive/mutually-exclusive.checkboxes.spec.js +26 -26
- package/components/mutually-exclusive/mutually-exclusive.date.spec.js +9 -9
- package/components/mutually-exclusive/mutually-exclusive.dom.js +1 -1
- package/components/mutually-exclusive/mutually-exclusive.duration.spec.js +8 -8
- package/components/mutually-exclusive/mutually-exclusive.email.spec.js +7 -7
- package/components/mutually-exclusive/mutually-exclusive.js +13 -13
- package/components/mutually-exclusive/mutually-exclusive.multiple-options.checkboxes.spec.js +29 -29
- package/components/mutually-exclusive/mutually-exclusive.number.spec.js +7 -7
- package/components/mutually-exclusive/mutually-exclusive.textarea.spec.js +8 -8
- package/components/navigation/navigation.spec.js +0 -2
- package/components/pagination/_macro.spec.js +11 -53
- package/components/panel/_macro.njk +17 -17
- package/components/panel/_macro.spec.js +25 -25
- package/components/panel/_panel.scss +10 -9
- package/components/panel/example-panel-bare.njk +3 -4
- package/components/panel/example-panel-with-announcement.njk +6 -10
- package/components/panel/example-panel-with-error-summary.njk +2 -2
- package/components/panel/example-panel-with-information.njk +0 -1
- package/components/panel/example-panel-with-success-message.njk +1 -1
- package/components/panel/example-panel-with-warning.njk +2 -3
- package/components/password/password.dom.js +1 -1
- package/components/phase-banner/_macro.spec.js +3 -9
- package/components/question/_macro.njk +1 -1
- package/components/question/_macro.spec.js +5 -19
- package/components/question/_question.scss +1 -4
- package/components/question/example-question-interviewer-note.njk +1 -1
- package/components/quote/_macro.spec.js +2 -10
- package/components/radios/clear-radios.js +3 -3
- package/components/radios/radio-with-fieldset.js +4 -4
- package/components/radios/radios.dom.js +1 -1
- package/components/radios/radios.spec.js +26 -26
- package/components/related-content/_macro.spec.js +2 -4
- package/components/related-content/_section-macro.spec.js +2 -8
- package/components/relationships/example-relationships-error.njk +16 -18
- package/components/relationships/relationships.dom.js +1 -1
- package/components/relationships/relationships.js +2 -2
- package/components/reply/_macro.spec.js +3 -3
- package/components/reply/reply.dom.js +1 -1
- package/components/reply/reply.spec.js +3 -3
- package/components/section-navigation/_macro.njk +12 -12
- package/components/section-navigation/_macro.spec.js +13 -21
- package/components/select/_macro.spec.js +6 -6
- package/components/share-page/_macro.spec.js +6 -14
- package/components/skip-to-content/_macro.spec.js +3 -11
- package/components/skip-to-content/skip-to-content.dom.js +1 -1
- package/components/skip-to-content/skip-to-content.js +1 -1
- package/components/skip-to-content/skip-to-content.spec.js +2 -2
- package/components/status/_macro.njk +2 -2
- package/components/status/_macro.spec.js +5 -9
- package/components/status/example-status-dead.njk +1 -1
- package/components/status/example-status-error.njk +1 -1
- package/components/status/example-status-pending.njk +1 -1
- package/components/status/example-status-small.njk +1 -1
- package/components/status/example-status-success.njk +1 -1
- package/components/summary/_macro.njk +7 -8
- package/components/summary/_macro.spec.js +27 -9
- package/components/table/_macro.spec.js +6 -10
- package/components/table/scrollable-table.dom.js +1 -1
- package/components/table/scrollable-table.js +1 -1
- package/components/table/sortable-table.js +4 -4
- package/components/table/table.spec.js +21 -17
- package/components/table-of-contents/_macro.njk +31 -31
- package/components/table-of-contents/_macro.spec.js +3 -11
- package/components/table-of-contents/toc.dom.js +1 -1
- package/components/table-of-contents/toc.spec.js +36 -32
- package/components/tabs/example-tabs-details.njk +1 -1
- package/components/tabs/tabs.dom.js +1 -1
- package/components/tabs/tabs.js +8 -8
- package/components/text-indent/_macro.spec.js +2 -6
- package/components/textarea/textarea.dom.js +1 -1
- package/components/textarea/textarea.spec.js +8 -8
- package/components/timeout-modal/_macro.spec.js +1 -3
- package/components/timeout-modal/timeout-modal.dom.js +1 -1
- package/components/timeout-modal/timeout-modal.spec.js +10 -10
- package/components/timeout-panel/_macro.njk +16 -17
- package/components/timeout-panel/_macro.spec.js +1 -1
- package/components/timeout-panel/timeout-panel.dom.js +1 -1
- package/components/timeout-panel/timeout-panel.spec.js +8 -8
- package/components/video/_macro.spec.js +1 -5
- package/components/video/video.dom.js +1 -1
- package/components/video/video.spec.js +16 -12
- package/css/main.css +1 -1
- package/favicons/safari-pinned-tab.svg +23 -23
- package/js/analytics.js +15 -14
- package/js/cookies-settings.dom.js +1 -1
- package/js/cookies-settings.spec.js +19 -19
- package/js/domready.js +1 -1
- package/js/fetch.js +1 -1
- package/js/inpagelink.js +3 -3
- package/js/main.js +1 -0
- package/js/print-button.js +1 -1
- package/js/timeout.js +1 -1
- package/package.json +2 -1
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
- package/scss/base/_typography.scss +8 -2
- package/scss/main.scss +1 -0
- package/scss/overrides/hcm.scss +8 -1
- package/scss/vars/_colors.scss +2 -1
- package/components/date-field-input/_macro.njk +0 -86
|
@@ -107,7 +107,7 @@ const EXAMPLE_YEAR_FIELD_WITH_ERROR = {
|
|
|
107
107
|
},
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
const
|
|
110
|
+
const EXAMPLE_YEAR_FIELD_WITH_ERROR_FALSE = {
|
|
111
111
|
year: {
|
|
112
112
|
label: {
|
|
113
113
|
text: 'Year',
|
|
@@ -148,9 +148,9 @@ const EXAMPLE_DATE_MULTIPLE_FIELDS_WITH_ERROR = {
|
|
|
148
148
|
...EXAMPLE_YEAR_FIELD_WITH_ERROR,
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
const
|
|
151
|
+
const EXAMPLE_DATE_SINGLE_FIELD_WITH_ERROR_FALSE = {
|
|
152
152
|
...EXAMPLE_DATE_INPUT_BASE,
|
|
153
|
-
...
|
|
153
|
+
...EXAMPLE_YEAR_FIELD_WITH_ERROR_FALSE,
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
describe('macro: date input', () => {
|
|
@@ -177,6 +177,7 @@ describe('macro: date input', () => {
|
|
|
177
177
|
max: 31,
|
|
178
178
|
maxLength: 2,
|
|
179
179
|
classes: '',
|
|
180
|
+
error: '',
|
|
180
181
|
label: {
|
|
181
182
|
text: 'Day',
|
|
182
183
|
description: 'The day',
|
|
@@ -204,6 +205,7 @@ describe('macro: date input', () => {
|
|
|
204
205
|
max: 12,
|
|
205
206
|
maxLength: 2,
|
|
206
207
|
classes: '',
|
|
208
|
+
error: '',
|
|
207
209
|
label: {
|
|
208
210
|
text: 'Month',
|
|
209
211
|
description: 'The month',
|
|
@@ -231,6 +233,7 @@ describe('macro: date input', () => {
|
|
|
231
233
|
max: 3000,
|
|
232
234
|
maxLength: 4,
|
|
233
235
|
classes: '',
|
|
236
|
+
error: '',
|
|
234
237
|
label: {
|
|
235
238
|
text: 'Year',
|
|
236
239
|
description: 'The year',
|
|
@@ -249,6 +252,12 @@ describe('macro: date input', () => {
|
|
|
249
252
|
expect($(div).hasClass('ons-field-group')).toBe(true);
|
|
250
253
|
});
|
|
251
254
|
|
|
255
|
+
it('has the correct number of inputs', () => {
|
|
256
|
+
const $ = cheerio.load(renderComponent('date-input', EXAMPLE_DATE_MULTIPLE_FIELDS));
|
|
257
|
+
const $inputs = $('.ons-input');
|
|
258
|
+
expect($inputs.length).toBe(3);
|
|
259
|
+
});
|
|
260
|
+
|
|
252
261
|
it('has the expected `fieldset` output', () => {
|
|
253
262
|
const faker = templateFaker();
|
|
254
263
|
const fieldsetSpy = faker.spy('fieldset');
|
|
@@ -356,6 +365,12 @@ describe('macro: date input', () => {
|
|
|
356
365
|
});
|
|
357
366
|
});
|
|
358
367
|
|
|
368
|
+
it('has the correct number of inputs', () => {
|
|
369
|
+
const $ = cheerio.load(renderComponent('date-input', EXAMPLE_DATE_SINGLE_FIELD));
|
|
370
|
+
const $inputs = $('.ons-input');
|
|
371
|
+
expect($inputs.length).toBe(1);
|
|
372
|
+
});
|
|
373
|
+
|
|
359
374
|
it('has the expected `error` output', () => {
|
|
360
375
|
const faker = templateFaker();
|
|
361
376
|
const errorSpy = faker.spy('error');
|
|
@@ -371,7 +386,7 @@ describe('macro: date input', () => {
|
|
|
371
386
|
});
|
|
372
387
|
});
|
|
373
388
|
|
|
374
|
-
describe('mode: multiple fields with
|
|
389
|
+
describe('mode: multiple fields with errors', () => {
|
|
375
390
|
it('passes jest-axe checks', async () => {
|
|
376
391
|
const $ = cheerio.load(renderComponent('date-input', EXAMPLE_DATE_MULTIPLE_FIELDS_WITH_SINGLE_ERROR));
|
|
377
392
|
|
|
@@ -394,7 +409,7 @@ describe('macro: date input', () => {
|
|
|
394
409
|
});
|
|
395
410
|
|
|
396
411
|
it('does not provide error class when error parameter set to false', async () => {
|
|
397
|
-
const $ = cheerio.load(renderComponent('date-input',
|
|
412
|
+
const $ = cheerio.load(renderComponent('date-input', EXAMPLE_DATE_SINGLE_FIELD_WITH_ERROR_FALSE));
|
|
398
413
|
const $errorContent = $('.ons-input--error');
|
|
399
414
|
|
|
400
415
|
expect($errorContent.length).toBe(0);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{% from "components/date-input/_macro.njk" import onsDateInput %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsDateInput({
|
|
5
|
+
"id": "date-input-example-double",
|
|
6
|
+
"legendOrLabel": "Month and year of last MOT",
|
|
7
|
+
"description": "For example, 3 2023",
|
|
8
|
+
"month": {
|
|
9
|
+
"label": {
|
|
10
|
+
"text": "Month"
|
|
11
|
+
},
|
|
12
|
+
"name": "month",
|
|
13
|
+
"attributes": {
|
|
14
|
+
"autocomplete": "mot-month"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"year": {
|
|
18
|
+
"label": {
|
|
19
|
+
"text": "Year"
|
|
20
|
+
},
|
|
21
|
+
"name": "year",
|
|
22
|
+
"attributes": {
|
|
23
|
+
"autocomplete": "mot-year"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{% from "components/date-input/_macro.njk" import onsDateInput %}
|
|
2
|
+
|
|
3
|
+
{{
|
|
4
|
+
onsDateInput({
|
|
5
|
+
"id": "date-input-example-single",
|
|
6
|
+
"legendOrLabel": "Year of birth",
|
|
7
|
+
"description": "For example, 1980",
|
|
8
|
+
"year": {
|
|
9
|
+
"label": {
|
|
10
|
+
"text": "Year"
|
|
11
|
+
},
|
|
12
|
+
"name": "year",
|
|
13
|
+
"attributes": {
|
|
14
|
+
"autocomplete": "bday-year"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
}}
|
|
@@ -7,18 +7,18 @@ const EXAMPLE_DETAILS_BASIC = {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
const EXAMPLE_PAGE = `
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
${renderComponent('details', {
|
|
11
|
+
id: 'details-id',
|
|
12
|
+
title: 'Title for details',
|
|
13
|
+
content: 'Content for details',
|
|
14
|
+
})}
|
|
15
|
+
|
|
16
|
+
${renderComponent('details', {
|
|
17
|
+
id: 'details-id-2',
|
|
18
|
+
title: 'Title for details',
|
|
19
|
+
content: 'Content for details',
|
|
20
|
+
})}
|
|
21
|
+
`;
|
|
22
22
|
|
|
23
23
|
const RENDERED_EXAMPLE_PAGE = renderTemplate(EXAMPLE_PAGE);
|
|
24
24
|
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
3
3
|
|
|
4
4
|
{% call onsDetails({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
%}
|
|
5
|
+
"id": "details-example-with-warning",
|
|
6
|
+
"title": "Need to answer separately from your household?"
|
|
7
|
+
}) %}
|
|
9
8
|
|
|
10
9
|
<p>If you need to answer separately from the people you live with, you can <a href="#0">request an individual access code</a> to start a separate survey.</p>
|
|
11
10
|
{% call onsPanel({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
%}
|
|
11
|
+
"variant": "warn"
|
|
12
|
+
}) %}
|
|
15
13
|
Someone in your household must still complete a survey using a household access code
|
|
16
14
|
{% endcall %}
|
|
17
15
|
|
|
@@ -167,9 +167,7 @@ describe('macro: document list', () => {
|
|
|
167
167
|
|
|
168
168
|
it('has expected `title`', () => {
|
|
169
169
|
const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_BASIC] }));
|
|
170
|
-
const title = $('.ons-document-list__item-title a')
|
|
171
|
-
.html()
|
|
172
|
-
.trim();
|
|
170
|
+
const title = $('.ons-document-list__item-title a').html().trim();
|
|
173
171
|
expect(title).toBe('Crime and justice');
|
|
174
172
|
});
|
|
175
173
|
|
|
@@ -180,9 +178,7 @@ describe('macro: document list', () => {
|
|
|
180
178
|
|
|
181
179
|
it('has expected `description`', () => {
|
|
182
180
|
const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_BASIC] }));
|
|
183
|
-
const title = $('.ons-document-list__item-description')
|
|
184
|
-
.html()
|
|
185
|
-
.trim();
|
|
181
|
+
const title = $('.ons-document-list__item-description').html().trim();
|
|
186
182
|
expect(title).toBe('Some description');
|
|
187
183
|
});
|
|
188
184
|
});
|
|
@@ -244,9 +240,7 @@ describe('macro: document list', () => {
|
|
|
244
240
|
}),
|
|
245
241
|
);
|
|
246
242
|
|
|
247
|
-
const hiddenText = $('.ons-document-list__item-title a .ons-u-vh')
|
|
248
|
-
.text()
|
|
249
|
-
.trim();
|
|
243
|
+
const hiddenText = $('.ons-document-list__item-title a .ons-u-vh').text().trim();
|
|
250
244
|
expect(hiddenText).toBe(', PDF document download, 499KB, 1 page');
|
|
251
245
|
});
|
|
252
246
|
|
|
@@ -257,9 +251,7 @@ describe('macro: document list', () => {
|
|
|
257
251
|
}),
|
|
258
252
|
);
|
|
259
253
|
|
|
260
|
-
const hiddenText = $('.ons-document-list__item-attribute')
|
|
261
|
-
.text()
|
|
262
|
-
.trim();
|
|
254
|
+
const hiddenText = $('.ons-document-list__item-attribute').text().trim();
|
|
263
255
|
expect(hiddenText).toBe('PDF, 499KB, 1 page');
|
|
264
256
|
});
|
|
265
257
|
});
|
|
@@ -289,17 +281,13 @@ describe('macro: document list', () => {
|
|
|
289
281
|
|
|
290
282
|
it('has expected `text`', () => {
|
|
291
283
|
const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_TYPE] }));
|
|
292
|
-
const text = $('.ons-document-list__attribute-link > span')
|
|
293
|
-
.text()
|
|
294
|
-
.trim();
|
|
284
|
+
const text = $('.ons-document-list__attribute-link > span').text().trim();
|
|
295
285
|
expect(text).toBe('Poster:');
|
|
296
286
|
});
|
|
297
287
|
|
|
298
288
|
it('has expected `ref`', () => {
|
|
299
289
|
const $ = cheerio.load(renderComponent('document-list', { documents: [EXAMPLE_DOCUMENT_LIST_WITH_METADATA_TYPE] }));
|
|
300
|
-
const text = $('.ons-document-list__attribute-link + span')
|
|
301
|
-
.text()
|
|
302
|
-
.trim();
|
|
290
|
+
const text = $('.ons-document-list__attribute-link + span').text().trim();
|
|
303
291
|
expect(text).toBe('some ref');
|
|
304
292
|
});
|
|
305
293
|
});
|
|
@@ -343,9 +331,7 @@ describe('macro: document list', () => {
|
|
|
343
331
|
}),
|
|
344
332
|
);
|
|
345
333
|
|
|
346
|
-
const text = $('.ons-document-list__item-attribute > span')
|
|
347
|
-
.text()
|
|
348
|
-
.trim();
|
|
334
|
+
const text = $('.ons-document-list__item-attribute > span').text().trim();
|
|
349
335
|
expect(text).toBe('Published:');
|
|
350
336
|
});
|
|
351
337
|
|
|
@@ -386,9 +372,7 @@ describe('macro: document list', () => {
|
|
|
386
372
|
}),
|
|
387
373
|
);
|
|
388
374
|
|
|
389
|
-
const text = $('.ons-document-list__item-attribute > span')
|
|
390
|
-
.text()
|
|
391
|
-
.trim();
|
|
375
|
+
const text = $('.ons-document-list__item-attribute > span').text().trim();
|
|
392
376
|
expect(text).toBe('Released:');
|
|
393
377
|
});
|
|
394
378
|
|
|
@@ -449,9 +433,7 @@ describe('macro: document list', () => {
|
|
|
449
433
|
}),
|
|
450
434
|
);
|
|
451
435
|
|
|
452
|
-
const time = $('.ons-document-list__item-attribute time')
|
|
453
|
-
.text()
|
|
454
|
-
.trim();
|
|
436
|
+
const time = $('.ons-document-list__item-attribute time').text().trim();
|
|
455
437
|
expect(time).toBe('1 January 2022');
|
|
456
438
|
});
|
|
457
439
|
});
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
width: 100%;
|
|
63
63
|
|
|
64
64
|
&:focus {
|
|
65
|
-
background-color: var(--ons-color-placeholder) !important;
|
|
65
|
+
background-color: var(--ons-color-image-placeholder) !important;
|
|
66
66
|
border: 2px solid var(--ons-color-borders-document-image-focus);
|
|
67
67
|
box-shadow: none;
|
|
68
68
|
outline: 4px solid var(--ons-color-focus) !important;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"documents": [
|
|
4
4
|
{
|
|
5
5
|
"thumbnail": true,
|
|
6
|
-
"url": '#',
|
|
6
|
+
"url": '#',
|
|
7
7
|
"title": 'Including everyone in Census 2021',
|
|
8
8
|
"metadata": {
|
|
9
9
|
"type": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"thumbnail": true,
|
|
22
|
-
"url": '#',
|
|
22
|
+
"url": '#',
|
|
23
23
|
"title": 'Community handbook for Census 2021',
|
|
24
24
|
"metadata": {
|
|
25
25
|
"type": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"thumbnail": true,
|
|
38
|
-
"url": '#',
|
|
38
|
+
"url": '#',
|
|
39
39
|
"title": 'Census 2021 matters to everyone',
|
|
40
40
|
"metadata": {
|
|
41
41
|
"type": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"text": 'Topic'
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"description": '<p>Figures on <
|
|
15
|
+
"description": '<p>Figures on <mark>crime</mark> levels and trends for England and Wales based primarily on two sets of statistics: the <mark>Crime</mark> Survey for England and Wales (CSEW) and police recorded crime data.</p>
|
|
16
16
|
<p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
|
|
17
17
|
}
|
|
18
18
|
]
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"text": 'Topic'
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"description": '<p>Figures on <
|
|
15
|
+
"description": '<p>Figures on <mark>crime</mark> levels and trends for England and Wales based primarily on two sets of statistics: the <mark>Crime</mark> Survey for England and Wales (CSEW) and police recorded <mark>crime</mark> data.</p>
|
|
16
16
|
<p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"short": '18 February 2021'
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
"description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <
|
|
32
|
+
"description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <mark>Crime</mark> Survey for England and Wales (CSEW) data.</p>'
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"url": '#0',
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"short": '2 December 2019'
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
"description": '<p>An overview of published data on disability and <
|
|
48
|
+
"description": '<p>An overview of published data on disability and <mark>crime</mark> in the UK and analysis of the experience of domestic abuse and sexual assault for disabled adults aged 16 to 59 years in England and Wales. Analysis by age, sex and impairment type.</p>'
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"url": '#0',
|