@noctuatech/uswds 1.3.2 → 1.3.4
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/package.json +5 -5
- package/src/lib/accordion/{accordion.test.ts → accordion.element.test.ts} +28 -31
- package/src/lib/accordion/accordion.element.ts +9 -7
- package/src/lib/alert/{alert.test.ts → alert.element.test.ts} +5 -6
- package/src/lib/alert/alert.element.ts +6 -4
- package/src/lib/breadcrumbs/breadcrumb/breadcrumb.element.ts +10 -10
- package/src/lib/breadcrumbs/breadcrumbs.element.test.ts +23 -0
- package/src/lib/button/button.element.test.ts +15 -0
- package/src/lib/button/button.element.ts +37 -42
- package/src/lib/button-group/button-group.element.test.ts +13 -0
- package/src/lib/card/{card.test.ts → card.element.test.ts} +12 -12
- package/src/lib/checkbox/{checkbox.test.ts → checkbox.element.test.ts} +15 -17
- package/src/lib/checkbox/checkbox.element.ts +28 -32
- package/src/lib/checkbox/checkbox.stories.ts +17 -33
- package/src/lib/collection/collection-item/collection-item.element.test.ts +15 -0
- package/src/lib/collection/collection.element.test.ts +13 -0
- package/src/lib/combo-box/{combo-box.test.ts → combo-box.element.test.ts} +64 -93
- package/src/lib/config/config.element.test.ts +13 -0
- package/src/lib/description/description.element.test.ts +13 -0
- package/src/lib/file-input/file-input-preview/file-input-preview.element.test.ts +93 -0
- package/src/lib/file-input/file-input-preview/file-input-preview.element.ts +15 -13
- package/src/lib/file-input/file-input.element.test.ts +73 -0
- package/src/lib/file-input/file-input.element.ts +10 -20
- package/src/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.ts +20 -20
- package/src/lib/in-page-nav/{in-page-nav.test.ts → in-page-nav.element.test.ts} +18 -21
- package/src/lib/input/{input.test.ts → input.element.test.ts} +11 -0
- package/src/lib/input/input.element.ts +57 -41
- package/src/lib/input-mask/input-mask.element.ts +1 -1
- package/src/lib/input-mask/input-mask.stories.ts +2 -0
- package/src/lib/link/link.element.ts +18 -25
- package/src/lib/modal/modal-close/modal-close.element.test.ts +13 -0
- package/src/lib/modal/modal-heading/modal-heading.element.test.ts +15 -0
- package/src/lib/modal/modal.element.test.ts +23 -0
- package/src/lib/pagination/pagination-item/pagination-item.element.ts +9 -6
- package/src/lib/pagination/pagination-no/pagination-no.element.ts +17 -17
- package/src/lib/pagination/pagination.element.test.ts +13 -0
- package/src/lib/process-list/{process-list.test.ts → process-list.element.test.ts} +19 -12
- package/src/lib/radio/radio-option/radio-option.element.test.ts +20 -0
- package/src/lib/radio/radio.element.test.ts +121 -0
- package/src/lib/range-slider/range-slider.element.test.ts +57 -0
- package/src/lib/range-slider/range-slider.element.ts +48 -33
- package/src/lib/search/search.element.test.ts +71 -0
- package/src/lib/select/{select.test.ts → select.element.test.ts} +23 -26
- package/src/lib/select/select.element.ts +31 -32
- package/src/lib/side-nav/{side-nav.test.ts → side-nav.element.test.ts} +13 -23
- package/src/lib/step-indicator/step/step.element.ts +16 -16
- package/src/lib/step-indicator/{step-indicator.test.ts → step-indicator.element.test.ts} +6 -6
- package/src/lib/summary-box/summary-box.element.test.ts +13 -0
- package/src/lib/tag/tag.element.test.ts +13 -0
- package/src/lib/textarea/{textarea.test.ts → textarea.element.test.ts} +13 -13
- package/src/lib/textarea/textarea.element.ts +23 -24
- package/target/lib/accordion/accordion.element.js +4 -2
- package/target/lib/accordion/accordion.element.js.map +1 -1
- package/target/lib/accordion/accordion.element.test.d.ts +1 -0
- package/target/lib/accordion/{accordion.test.js → accordion.element.test.js} +19 -19
- package/target/lib/accordion/accordion.element.test.js.map +1 -0
- package/target/lib/alert/alert.element.js +4 -2
- package/target/lib/alert/alert.element.js.map +1 -1
- package/target/lib/alert/alert.element.test.d.ts +1 -0
- package/target/lib/alert/{alert.test.js → alert.element.test.js} +5 -5
- package/target/lib/alert/alert.element.test.js.map +1 -0
- package/target/lib/breadcrumbs/breadcrumb/breadcrumb.element.d.ts +1 -1
- package/target/lib/breadcrumbs/breadcrumb/breadcrumb.element.js +6 -6
- package/target/lib/breadcrumbs/breadcrumbs.element.test.d.ts +2 -0
- package/target/lib/breadcrumbs/{breadcrumbs.test.js → breadcrumbs.element.test.js} +6 -6
- package/target/lib/breadcrumbs/breadcrumbs.element.test.js.map +1 -0
- package/target/lib/button/button.element.d.ts +3 -3
- package/target/lib/button/button.element.js +17 -23
- package/target/lib/button/button.element.js.map +1 -1
- package/target/lib/button/button.element.test.d.ts +1 -0
- package/target/lib/button/button.element.test.js +12 -0
- package/target/lib/button/button.element.test.js.map +1 -0
- package/target/lib/button-group/button-group.element.test.d.ts +1 -0
- package/target/lib/button-group/button-group.element.test.js +9 -0
- package/target/lib/button-group/button-group.element.test.js.map +1 -0
- package/target/lib/card/card.element.test.d.ts +6 -0
- package/target/lib/card/{card.test.js → card.element.test.js} +10 -10
- package/target/lib/card/card.element.test.js.map +1 -0
- package/target/lib/checkbox/checkbox.element.d.ts +3 -2
- package/target/lib/checkbox/checkbox.element.js +21 -22
- package/target/lib/checkbox/checkbox.element.js.map +1 -1
- package/target/lib/checkbox/checkbox.element.test.d.ts +1 -0
- package/target/lib/checkbox/{checkbox.test.js → checkbox.element.test.js} +13 -12
- package/target/lib/checkbox/checkbox.element.test.js.map +1 -0
- package/target/lib/checkbox/checkbox.stories.d.ts +2 -2
- package/target/lib/checkbox/checkbox.stories.js +6 -6
- package/target/lib/checkbox/checkbox.stories.js.map +1 -1
- package/target/lib/collection/collection-item/collection-item.element.test.d.ts +1 -0
- package/target/lib/collection/collection-item/collection-item.element.test.js +9 -0
- package/target/lib/collection/collection-item/collection-item.element.test.js.map +1 -0
- package/target/lib/collection/collection.element.test.d.ts +1 -0
- package/target/lib/collection/collection.element.test.js +9 -0
- package/target/lib/collection/collection.element.test.js.map +1 -0
- package/target/lib/combo-box/combo-box.element.test.d.ts +3 -0
- package/target/lib/combo-box/{combo-box.test.js → combo-box.element.test.js} +60 -60
- package/target/lib/combo-box/combo-box.element.test.js.map +1 -0
- package/target/lib/config/config.element.test.d.ts +1 -0
- package/target/lib/config/config.element.test.js +9 -0
- package/target/lib/config/config.element.test.js.map +1 -0
- package/target/lib/description/description.element.test.d.ts +1 -0
- package/target/lib/description/description.element.test.js +9 -0
- package/target/lib/description/description.element.test.js.map +1 -0
- package/target/lib/file-input/file-input-preview/file-input-preview.element.js +12 -10
- package/target/lib/file-input/file-input-preview/file-input-preview.element.js.map +1 -1
- package/target/lib/file-input/file-input-preview/file-input-preview.element.test.d.ts +2 -0
- package/target/lib/file-input/file-input-preview/{file-input-preview.test.js → file-input-preview.element.test.js} +24 -24
- package/target/lib/file-input/file-input-preview/file-input-preview.element.test.js.map +1 -0
- package/target/lib/file-input/file-input.element.js +5 -6
- package/target/lib/file-input/file-input.element.js.map +1 -1
- package/target/lib/file-input/file-input.element.test.d.ts +1 -0
- package/target/lib/file-input/{file-input.test.js → file-input.element.test.js} +16 -16
- package/target/lib/file-input/file-input.element.test.js.map +1 -0
- package/target/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.d.ts +2 -3
- package/target/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.js +15 -13
- package/target/lib/in-page-nav/in-page-nav-item/in-page-nav-item.element.js.map +1 -1
- package/target/lib/in-page-nav/in-page-nav.element.test.d.ts +2 -0
- package/target/lib/in-page-nav/{in-page-nav.test.js → in-page-nav.element.test.js} +6 -6
- package/target/lib/in-page-nav/in-page-nav.element.test.js.map +1 -0
- package/target/lib/input/input.element.d.ts +4 -5
- package/target/lib/input/input.element.js +54 -48
- package/target/lib/input/input.element.js.map +1 -1
- package/target/lib/input/{input.test.js → input.element.test.js} +6 -1
- package/target/lib/input/input.element.test.js.map +1 -0
- package/target/lib/input-mask/input-mask.element.d.ts +1 -1
- package/target/lib/input-mask/input-mask.element.js +1 -1
- package/target/lib/input-mask/input-mask.element.js.map +1 -1
- package/target/lib/input-mask/{input-mask.test.js → input-mask.element.test.js} +1 -1
- package/target/lib/input-mask/input-mask.element.test.js.map +1 -0
- package/target/lib/input-mask/input-mask.stories.js +1 -1
- package/target/lib/input-mask/input-mask.stories.js.map +1 -1
- package/target/lib/link/link.element.d.ts +3 -5
- package/target/lib/link/link.element.js +14 -26
- package/target/lib/link/link.element.js.map +1 -1
- package/target/lib/modal/modal-close/modal-close.element.test.d.ts +1 -0
- package/target/lib/modal/modal-close/modal-close.element.test.js +9 -0
- package/target/lib/modal/modal-close/modal-close.element.test.js.map +1 -0
- package/target/lib/modal/modal-heading/modal-heading.element.test.d.ts +1 -0
- package/target/lib/modal/modal-heading/modal-heading.element.test.js +9 -0
- package/target/lib/modal/modal-heading/modal-heading.element.test.js.map +1 -0
- package/target/lib/modal/modal.element.test.d.ts +3 -0
- package/target/lib/modal/modal.element.test.js +11 -0
- package/target/lib/modal/modal.element.test.js.map +1 -0
- package/target/lib/pagination/pagination-item/pagination-item.element.d.ts +1 -1
- package/target/lib/pagination/pagination-item/pagination-item.element.js +3 -3
- package/target/lib/pagination/pagination-item/pagination-item.element.js.map +1 -1
- package/target/lib/pagination/pagination-no/pagination-no.element.d.ts +2 -3
- package/target/lib/pagination/pagination-no/pagination-no.element.js +10 -8
- package/target/lib/pagination/pagination-no/pagination-no.element.js.map +1 -1
- package/target/lib/pagination/pagination.element.test.d.ts +1 -0
- package/target/lib/pagination/pagination.element.test.js +9 -0
- package/target/lib/pagination/pagination.element.test.js.map +1 -0
- package/target/lib/process-list/process-list.element.test.d.ts +2 -0
- package/target/lib/process-list/{process-list.test.js → process-list.element.test.js} +6 -6
- package/target/lib/process-list/process-list.element.test.js.map +1 -0
- package/target/lib/radio/radio-option/radio-option.element.test.d.ts +2 -0
- package/target/lib/radio/radio-option/radio-option.element.test.js +11 -0
- package/target/lib/radio/radio-option/radio-option.element.test.js.map +1 -0
- package/target/lib/radio/radio.element.test.d.ts +2 -0
- package/target/lib/radio/{radio.test.js → radio.element.test.js} +19 -28
- package/target/lib/radio/radio.element.test.js.map +1 -0
- package/target/lib/range-slider/range-slider.element.d.ts +4 -2
- package/target/lib/range-slider/range-slider.element.js +34 -29
- package/target/lib/range-slider/range-slider.element.js.map +1 -1
- package/target/lib/range-slider/range-slider.element.test.d.ts +1 -0
- package/target/lib/range-slider/range-slider.element.test.js +26 -0
- package/target/lib/range-slider/range-slider.element.test.js.map +1 -0
- package/target/lib/search/search.element.test.d.ts +3 -0
- package/target/lib/search/search.element.test.js +52 -0
- package/target/lib/search/search.element.test.js.map +1 -0
- package/target/lib/select/select.element.d.ts +4 -3
- package/target/lib/select/select.element.js +25 -26
- package/target/lib/select/select.element.js.map +1 -1
- package/target/lib/select/select.element.test.d.ts +2 -0
- package/target/lib/select/{select.test.js → select.element.test.js} +23 -27
- package/target/lib/select/select.element.test.js.map +1 -0
- package/target/lib/services/{icon.service.test.js → icon.service.element.test.js} +1 -1
- package/target/lib/services/icon.service.element.test.js.map +1 -0
- package/target/lib/side-nav/side-nav.element.test.d.ts +3 -0
- package/target/lib/side-nav/{side-nav.test.js → side-nav.element.test.js} +11 -11
- package/target/lib/side-nav/side-nav.element.test.js.map +1 -0
- package/target/lib/step-indicator/step/step.element.d.ts +2 -2
- package/target/lib/step-indicator/step/step.element.js +8 -8
- package/target/lib/step-indicator/step-indicator.element.test.d.ts +2 -0
- package/target/lib/step-indicator/{step-indicator.test.js → step-indicator.element.test.js} +6 -6
- package/target/lib/step-indicator/step-indicator.element.test.js.map +1 -0
- package/target/lib/summary-box/summary-box.element.test.d.ts +1 -0
- package/target/lib/summary-box/summary-box.element.test.js +9 -0
- package/target/lib/summary-box/summary-box.element.test.js.map +1 -0
- package/target/lib/tag/tag.element.test.d.ts +1 -0
- package/target/lib/tag/tag.element.test.js +9 -0
- package/target/lib/tag/tag.element.test.js.map +1 -0
- package/target/lib/textarea/textarea.element.d.ts +2 -2
- package/target/lib/textarea/textarea.element.js +19 -24
- package/target/lib/textarea/textarea.element.js.map +1 -1
- package/target/lib/textarea/textarea.element.test.d.ts +1 -0
- package/target/lib/textarea/{textarea.test.js → textarea.element.test.js} +14 -14
- package/target/lib/textarea/textarea.element.test.js.map +1 -0
- package/src/lib/breadcrumbs/breadcrumbs.test.ts +0 -21
- package/src/lib/button/button.test.ts +0 -17
- package/src/lib/button-group/button-group.test.ts +0 -15
- package/src/lib/collection/collection-item/collection-item.test.ts +0 -15
- package/src/lib/collection/collection.test.ts +0 -15
- package/src/lib/config/config.test.ts +0 -15
- package/src/lib/description/description.test.ts +0 -15
- package/src/lib/file-input/file-input-preview/file-input-preview.test.ts +0 -95
- package/src/lib/file-input/file-input.test.ts +0 -79
- package/src/lib/modal/modal-close/modal-close.test.ts +0 -15
- package/src/lib/modal/modal-heading/modal-heading.test.ts +0 -15
- package/src/lib/modal/modal.test.ts +0 -25
- package/src/lib/pagination/pagination.test.ts +0 -15
- package/src/lib/radio/radio-option/radio-option.test.ts +0 -20
- package/src/lib/radio/radio.test.ts +0 -174
- package/src/lib/range-slider/range-slider.test.ts +0 -52
- package/src/lib/search/search.test.ts +0 -81
- package/src/lib/summary-box/summary-box.test.ts +0 -15
- package/src/lib/tag/tag.test.ts +0 -15
- package/target/lib/accordion/accordion.test.d.ts +0 -1
- package/target/lib/accordion/accordion.test.js.map +0 -1
- package/target/lib/alert/alert.test.d.ts +0 -1
- package/target/lib/alert/alert.test.js.map +0 -1
- package/target/lib/breadcrumbs/breadcrumbs.test.d.ts +0 -2
- package/target/lib/breadcrumbs/breadcrumbs.test.js.map +0 -1
- package/target/lib/button/button.test.d.ts +0 -1
- package/target/lib/button/button.test.js +0 -12
- package/target/lib/button/button.test.js.map +0 -1
- package/target/lib/button-group/button-group.test.d.ts +0 -1
- package/target/lib/button-group/button-group.test.js +0 -9
- package/target/lib/button-group/button-group.test.js.map +0 -1
- package/target/lib/card/card.test.d.ts +0 -6
- package/target/lib/card/card.test.js.map +0 -1
- package/target/lib/checkbox/checkbox.test.d.ts +0 -1
- package/target/lib/checkbox/checkbox.test.js.map +0 -1
- package/target/lib/collection/collection-item/collection-item.test.d.ts +0 -1
- package/target/lib/collection/collection-item/collection-item.test.js +0 -9
- package/target/lib/collection/collection-item/collection-item.test.js.map +0 -1
- package/target/lib/collection/collection.test.d.ts +0 -1
- package/target/lib/collection/collection.test.js +0 -9
- package/target/lib/collection/collection.test.js.map +0 -1
- package/target/lib/combo-box/combo-box.test.d.ts +0 -3
- package/target/lib/combo-box/combo-box.test.js.map +0 -1
- package/target/lib/config/config.test.d.ts +0 -1
- package/target/lib/config/config.test.js +0 -9
- package/target/lib/config/config.test.js.map +0 -1
- package/target/lib/description/description.test.d.ts +0 -1
- package/target/lib/description/description.test.js +0 -9
- package/target/lib/description/description.test.js.map +0 -1
- package/target/lib/file-input/file-input-preview/file-input-preview.test.d.ts +0 -2
- package/target/lib/file-input/file-input-preview/file-input-preview.test.js.map +0 -1
- package/target/lib/file-input/file-input.test.d.ts +0 -1
- package/target/lib/file-input/file-input.test.js.map +0 -1
- package/target/lib/in-page-nav/in-page-nav.test.d.ts +0 -2
- package/target/lib/in-page-nav/in-page-nav.test.js.map +0 -1
- package/target/lib/input/input.test.js.map +0 -1
- package/target/lib/input-mask/input-mask.test.js.map +0 -1
- package/target/lib/modal/modal-close/modal-close.test.d.ts +0 -1
- package/target/lib/modal/modal-close/modal-close.test.js +0 -9
- package/target/lib/modal/modal-close/modal-close.test.js.map +0 -1
- package/target/lib/modal/modal-heading/modal-heading.test.d.ts +0 -1
- package/target/lib/modal/modal-heading/modal-heading.test.js +0 -9
- package/target/lib/modal/modal-heading/modal-heading.test.js.map +0 -1
- package/target/lib/modal/modal.test.d.ts +0 -3
- package/target/lib/modal/modal.test.js +0 -11
- package/target/lib/modal/modal.test.js.map +0 -1
- package/target/lib/pagination/pagination.test.d.ts +0 -1
- package/target/lib/pagination/pagination.test.js +0 -9
- package/target/lib/pagination/pagination.test.js.map +0 -1
- package/target/lib/process-list/process-list.test.d.ts +0 -2
- package/target/lib/process-list/process-list.test.js.map +0 -1
- package/target/lib/radio/radio-option/radio-option.test.d.ts +0 -2
- package/target/lib/radio/radio-option/radio-option.test.js +0 -11
- package/target/lib/radio/radio-option/radio-option.test.js.map +0 -1
- package/target/lib/radio/radio.test.d.ts +0 -2
- package/target/lib/radio/radio.test.js.map +0 -1
- package/target/lib/range-slider/range-slider.test.d.ts +0 -1
- package/target/lib/range-slider/range-slider.test.js +0 -25
- package/target/lib/range-slider/range-slider.test.js.map +0 -1
- package/target/lib/search/search.test.d.ts +0 -3
- package/target/lib/search/search.test.js +0 -52
- package/target/lib/search/search.test.js.map +0 -1
- package/target/lib/select/select.test.d.ts +0 -2
- package/target/lib/select/select.test.js.map +0 -1
- package/target/lib/services/icon.service.test.js.map +0 -1
- package/target/lib/side-nav/side-nav.test.d.ts +0 -3
- package/target/lib/side-nav/side-nav.test.js.map +0 -1
- package/target/lib/step-indicator/step-indicator.test.d.ts +0 -2
- package/target/lib/step-indicator/step-indicator.test.js.map +0 -1
- package/target/lib/summary-box/summary-box.test.d.ts +0 -1
- package/target/lib/summary-box/summary-box.test.js +0 -9
- package/target/lib/summary-box/summary-box.test.js.map +0 -1
- package/target/lib/tag/tag.test.d.ts +0 -1
- package/target/lib/tag/tag.test.js +0 -9
- package/target/lib/tag/tag.test.js.map +0 -1
- package/target/lib/textarea/textarea.test.d.ts +0 -1
- package/target/lib/textarea/textarea.test.js.map +0 -1
- /package/src/lib/input-mask/{input-mask.test.ts → input-mask.element.test.ts} +0 -0
- /package/src/lib/services/{icon.service.test.ts → icon.service.element.test.ts} +0 -0
- /package/target/lib/input/{input.test.d.ts → input.element.test.d.ts} +0 -0
- /package/target/lib/input-mask/{input-mask.test.d.ts → input-mask.element.test.d.ts} +0 -0
- /package/target/lib/services/{icon.service.test.d.ts → icon.service.element.test.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.element.js","sourceRoot":"","sources":["../../../src/lib/textarea/textarea.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"textarea.element.js","sourceRoot":"","sources":["../../../src/lib/textarea/textarea.element.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './textarea.element.js';
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { assert, fixture, html } from
|
|
3
|
-
import { userEvent } from
|
|
4
|
-
describe(
|
|
5
|
-
it(
|
|
1
|
+
import './textarea.element.js';
|
|
2
|
+
import { assert, fixture, html } from '@open-wc/testing';
|
|
3
|
+
import { userEvent } from '@testing-library/user-event';
|
|
4
|
+
describe('usa-textarea', () => {
|
|
5
|
+
it('should be accessible', async () => {
|
|
6
6
|
const form = await fixture(html `<usa-textarea name="fname" value="Foo">Hello World</usa-textarea>`);
|
|
7
7
|
return assert.isAccessible(form);
|
|
8
8
|
});
|
|
9
|
-
it(
|
|
9
|
+
it('should submit form with default values', async () => {
|
|
10
10
|
const form = await fixture(html `<form><usa-textarea name="fname" value="Foo">Hello World</usa-textarea><button>Submit</button></form>`);
|
|
11
11
|
const value = new FormData(form);
|
|
12
|
-
assert.equal(value.get(
|
|
12
|
+
assert.equal(value.get('fname'), 'Foo');
|
|
13
13
|
});
|
|
14
|
-
it(
|
|
14
|
+
it('should update form value as input value changed', async () => {
|
|
15
15
|
const form = await fixture(html `<form><usa-textarea name="fname">Hello World</usa-textarea><button>Submit</button></form>`);
|
|
16
|
-
const input = form.querySelector(
|
|
17
|
-
const nativeInput = input?.shadowRoot?.querySelector(
|
|
16
|
+
const input = form.querySelector('usa-textarea');
|
|
17
|
+
const nativeInput = input?.shadowRoot?.querySelector('textarea');
|
|
18
18
|
if (nativeInput) {
|
|
19
|
-
await userEvent.type(nativeInput,
|
|
19
|
+
await userEvent.type(nativeInput, 'Bar');
|
|
20
20
|
}
|
|
21
21
|
const value = new FormData(form);
|
|
22
|
-
assert.equal(value.get(
|
|
22
|
+
assert.equal(value.get('fname'), 'Bar');
|
|
23
23
|
});
|
|
24
|
-
it(
|
|
24
|
+
it('should not submit when not valid', async () => {
|
|
25
25
|
const form = await fixture(html `<form><usa-textarea name="fname" required>Hello World</usa-textarea><button>Submit</button></form>`);
|
|
26
26
|
assert.equal(form.checkValidity(), false);
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
|
-
//# sourceMappingURL=textarea.test.js.map
|
|
29
|
+
//# sourceMappingURL=textarea.element.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.element.test.js","sourceRoot":"","sources":["../../../src/lib/textarea/textarea.element.test.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAkB,IAAI,CAAA;;KAE/C,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAkB,IAAI,CAAA;;;;;;KAM/C,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEjC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,MAAM,IAAI,GAAG,MAAM,OAAO,CAAkB,IAAI,CAAA;;;;;;KAM/C,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QACjD,MAAM,WAAW,GAAG,KAAK,EAAE,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;QAEjE,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEjC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAkB,IAAI,CAAA;;;;;;KAM/C,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import "./breadcrumbs.element.js";
|
|
2
|
-
import "./breadcrumb/breadcrumb.element.js";
|
|
3
|
-
|
|
4
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
5
|
-
|
|
6
|
-
import type { USABreadcrumbsElement } from "./breadcrumbs.element.js";
|
|
7
|
-
|
|
8
|
-
describe("usa-breadcrumbs", () => {
|
|
9
|
-
it("should be accessible", async () => {
|
|
10
|
-
const breadcrumbs = await fixture<USABreadcrumbsElement>(html`
|
|
11
|
-
<usa-breadcrumbs>
|
|
12
|
-
<usa-breadcrumb href="/">Home</usa-breadcrumb>
|
|
13
|
-
<usa-breadcrumb href="/">Federal Contracting</usa-breadcrumb>
|
|
14
|
-
<usa-breadcrumb href="/">Contracting assistance programs</usa-breadcrumb>
|
|
15
|
-
<usa-breadcrumb>Economically disadvantaged women-owned small business federal contracting program</usa-breadcrumb>
|
|
16
|
-
</usa-breadcrumbs>
|
|
17
|
-
`);
|
|
18
|
-
|
|
19
|
-
return assert.isAccessible(breadcrumbs);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "./button.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import { BUTTON_VARIANTS, type USAButtonElement } from "./button.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-button", () => {
|
|
8
|
-
for (const variant of BUTTON_VARIANTS) {
|
|
9
|
-
it("should be accessible", async () => {
|
|
10
|
-
const button = await fixture<USAButtonElement>(html`
|
|
11
|
-
<usa-button variant=${variant}>Hello World</usa-button>
|
|
12
|
-
`);
|
|
13
|
-
|
|
14
|
-
return assert.isAccessible(button);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./button-group.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USAButtonGroupElement } from "./button-group.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-button-group", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const buttonGroup = await fixture<USAButtonGroupElement>(html`
|
|
10
|
-
<usa-button-group>Hello World</usa-button-group>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(buttonGroup);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./collection-item.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USACollectionItemElement } from "./collection-item.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-collection-item", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const collectionItem = await fixture<USACollectionItemElement>(html`
|
|
10
|
-
<usa-collection-item>Hello World</usa-collection-item>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(collectionItem);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./collection.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USACollectionElement } from "./collection.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-collection", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const collection = await fixture<USACollectionElement>(html`
|
|
10
|
-
<usa-collection>Hello World</usa-collection>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(collection);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./config.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USAConfigElement } from "./config.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-config", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const config = await fixture<USAConfigElement>(html`
|
|
10
|
-
<usa-config>Hello World</usa-config>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(config);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./description.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USADescriptionElement } from "./description.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-description", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const description = await fixture<USADescriptionElement>(html`
|
|
10
|
-
<usa-description>Hello World</usa-description>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(description);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import "./file-input-preview.element.js";
|
|
2
|
-
import "../../link/link.element.js";
|
|
3
|
-
|
|
4
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
5
|
-
|
|
6
|
-
import type { USAFileInputPreviewElement } from "./file-input-preview.element.js";
|
|
7
|
-
|
|
8
|
-
describe("usa-file-input-preview", () => {
|
|
9
|
-
it("should be accessible with no files", async () => {
|
|
10
|
-
const fileInputPreview = await fixture<USAFileInputPreviewElement>(html`
|
|
11
|
-
<usa-file-input-preview>
|
|
12
|
-
Selected file <usa-link>Change file</usa-link>
|
|
13
|
-
</usa-file-input-preview>
|
|
14
|
-
`);
|
|
15
|
-
|
|
16
|
-
return assert.isAccessible(fileInputPreview);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it("should be accessible with files", async () => {
|
|
20
|
-
const data = new DataTransfer();
|
|
21
|
-
data.items.add(new File([], "image1.jpg"));
|
|
22
|
-
data.items.add(new File([], "image2.jpg"));
|
|
23
|
-
|
|
24
|
-
const fileInputPreview = await fixture<USAFileInputPreviewElement>(html`
|
|
25
|
-
<usa-file-input-preview .files=${data.files}>
|
|
26
|
-
Selected file <usa-link>Change file</usa-link>
|
|
27
|
-
</usa-file-input-preview>
|
|
28
|
-
`);
|
|
29
|
-
|
|
30
|
-
return assert.isAccessible(fileInputPreview);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it("should display file preview for images", async () => {
|
|
34
|
-
const data = new DataTransfer();
|
|
35
|
-
data.items.add(new File([], "image1.jpg"));
|
|
36
|
-
data.items.add(new File([], "image2.jpg"));
|
|
37
|
-
|
|
38
|
-
const { shadowRoot } = await fixture<USAFileInputPreviewElement>(html`
|
|
39
|
-
<usa-file-input-preview .files=${data.files}>
|
|
40
|
-
Selected file <usa-link>Change file</usa-link>
|
|
41
|
-
</usa-file-input-preview>
|
|
42
|
-
`);
|
|
43
|
-
|
|
44
|
-
const previewItems = Array.from(
|
|
45
|
-
shadowRoot?.querySelectorAll(".preview-item") ?? [],
|
|
46
|
-
).map((item) => item.textContent?.trim());
|
|
47
|
-
|
|
48
|
-
assert.deepEqual(previewItems, ["image1.jpg", "image2.jpg"]);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("should display fewer previews when the number of items decreases", async () => {
|
|
52
|
-
const data = new DataTransfer();
|
|
53
|
-
data.items.add(new File([], "image1.jpg"));
|
|
54
|
-
data.items.add(new File([], "image2.jpg"));
|
|
55
|
-
|
|
56
|
-
const fileInputPreview = await fixture<USAFileInputPreviewElement>(html`
|
|
57
|
-
<usa-file-input-preview .files=${data.files}>
|
|
58
|
-
Selected file <usa-link>Change file</usa-link>
|
|
59
|
-
</usa-file-input-preview>
|
|
60
|
-
`);
|
|
61
|
-
|
|
62
|
-
const data2 = new DataTransfer();
|
|
63
|
-
data2.items.add(new File([], "image1.jpg"));
|
|
64
|
-
|
|
65
|
-
fileInputPreview.files = data2.files;
|
|
66
|
-
|
|
67
|
-
// need this to wait for effects to resolve
|
|
68
|
-
await Promise.resolve();
|
|
69
|
-
|
|
70
|
-
const previewItems = Array.from(
|
|
71
|
-
fileInputPreview.shadowRoot?.querySelectorAll(".preview-item") ?? [],
|
|
72
|
-
).map((item) => item.textContent?.trim());
|
|
73
|
-
|
|
74
|
-
assert.deepEqual(previewItems, ["image1.jpg"]);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it("should create preview images for each file", async () => {
|
|
78
|
-
const data = new DataTransfer();
|
|
79
|
-
data.items.add(new File(["Image1"], "image1.jpg", { type: "image/jpg" }));
|
|
80
|
-
data.items.add(new File(["Image2"], "image2.jpg", { type: "image/jpg" }));
|
|
81
|
-
|
|
82
|
-
const { shadowRoot } = await fixture<USAFileInputPreviewElement>(html`
|
|
83
|
-
<usa-file-input-preview .files=${data.files}>
|
|
84
|
-
Selected file <usa-link>Change file</usa-link>
|
|
85
|
-
</usa-file-input-preview>
|
|
86
|
-
`);
|
|
87
|
-
|
|
88
|
-
const [first, second] = Array.from(
|
|
89
|
-
shadowRoot?.querySelectorAll<HTMLImageElement>(".preview-item img") ?? [],
|
|
90
|
-
).map((item) => item.src.substring(29));
|
|
91
|
-
|
|
92
|
-
// we are just testing that the two hashes are in fact different
|
|
93
|
-
assert.isFalse(first === second);
|
|
94
|
-
});
|
|
95
|
-
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import "./file-input.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USAFileInputElement } from "./file-input.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-file-input", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const fileInput = await fixture<USAFileInputElement>(html`
|
|
10
|
-
<usa-file-input>Hello World</usa-file-input>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(fileInput);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it("should submit files with the form", async () => {
|
|
17
|
-
const data = new DataTransfer();
|
|
18
|
-
data.items.add(new File([], "first.txt"));
|
|
19
|
-
data.items.add(new File([], "second.txt"));
|
|
20
|
-
|
|
21
|
-
const form = await fixture<HTMLFormElement>(html`
|
|
22
|
-
<form>
|
|
23
|
-
<usa-file-input name="upload" .files=${data.files}>
|
|
24
|
-
Input accepts a single file
|
|
25
|
-
|
|
26
|
-
<div slot="description">
|
|
27
|
-
Drag file here or <usa-link>choose from folder</usa-link>
|
|
28
|
-
</div>
|
|
29
|
-
</usa-file-input>
|
|
30
|
-
|
|
31
|
-
<button>Submit</button>
|
|
32
|
-
</form>
|
|
33
|
-
`);
|
|
34
|
-
|
|
35
|
-
const formData = new FormData(form);
|
|
36
|
-
|
|
37
|
-
const fileNames = formData.getAll("upload").map((file) => {
|
|
38
|
-
if (file instanceof File) {
|
|
39
|
-
return file.name;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return "";
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
assert.deepEqual(fileNames, ["first.txt", "second.txt"]);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it("should show file preview after drag and drop", async () => {
|
|
49
|
-
const fileInput = await fixture<USAFileInputElement>(html`
|
|
50
|
-
<usa-file-input>
|
|
51
|
-
Input accepts a single file
|
|
52
|
-
</usa-file-input>
|
|
53
|
-
`);
|
|
54
|
-
|
|
55
|
-
const nativeInput = fileInput.shadowRoot?.querySelector("input");
|
|
56
|
-
|
|
57
|
-
assert.isOk(nativeInput);
|
|
58
|
-
|
|
59
|
-
// Simulate drag and drop with a file
|
|
60
|
-
const data = new DataTransfer();
|
|
61
|
-
data.items.add(new File([], "test.txt"));
|
|
62
|
-
|
|
63
|
-
const dropEvent = new DragEvent("drop", {
|
|
64
|
-
dataTransfer: data,
|
|
65
|
-
bubbles: true,
|
|
66
|
-
cancelable: true,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
nativeInput.dispatchEvent(dropEvent);
|
|
70
|
-
|
|
71
|
-
// Wait for effects to resolve
|
|
72
|
-
await Promise.resolve();
|
|
73
|
-
|
|
74
|
-
// Verify that filesVisible is true and files are set
|
|
75
|
-
assert.isTrue(fileInput.filesVisible);
|
|
76
|
-
assert.equal(fileInput.files?.length, 1);
|
|
77
|
-
assert.equal(fileInput.files?.[0].name, "test.txt");
|
|
78
|
-
});
|
|
79
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./modal-close.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USAModalCloseElement } from "./modal-close.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-modal-close", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const modalClose = await fixture<USAModalCloseElement>(html`
|
|
10
|
-
<usa-modal-close>Hello World</usa-modal-close>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(modalClose);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./modal-heading.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USAModalHeadingElement } from "./modal-heading.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-modal-heading", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const modalHeading = await fixture<USAModalHeadingElement>(html`
|
|
10
|
-
<usa-modal-heading>Hello World</usa-modal-heading>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(modalHeading);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import "./modal.element.js";
|
|
2
|
-
import "./modal-heading/modal-heading.element.js";
|
|
3
|
-
import "./modal-close/modal-close.element.js";
|
|
4
|
-
|
|
5
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
6
|
-
|
|
7
|
-
import type { USAModalElement } from "./modal.element.js";
|
|
8
|
-
|
|
9
|
-
describe("usa-modal", () => {
|
|
10
|
-
it("should be accessible", async () => {
|
|
11
|
-
const modal = await fixture<USAModalElement>(html`
|
|
12
|
-
<usa-modal open>
|
|
13
|
-
<usa-modal-close></usa-modal-close>
|
|
14
|
-
|
|
15
|
-
<usa-modal-heading>
|
|
16
|
-
Are you sure you want to continue?
|
|
17
|
-
</usa-modal-heading>
|
|
18
|
-
|
|
19
|
-
<p>This is some other example of content</p>
|
|
20
|
-
</usa-modal>
|
|
21
|
-
`);
|
|
22
|
-
|
|
23
|
-
return assert.isAccessible(modal);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./pagination.element.js";
|
|
2
|
-
|
|
3
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
4
|
-
|
|
5
|
-
import type { USAPaginationElement } from "./pagination.element.js";
|
|
6
|
-
|
|
7
|
-
describe("usa-pagination", () => {
|
|
8
|
-
it("should be accessible", async () => {
|
|
9
|
-
const pagination = await fixture<USAPaginationElement>(html`
|
|
10
|
-
<usa-pagination>Hello World</usa-pagination>
|
|
11
|
-
`);
|
|
12
|
-
|
|
13
|
-
return assert.isAccessible(pagination);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "../radio.element.js";
|
|
2
|
-
import "./radio-option.element.js";
|
|
3
|
-
|
|
4
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
5
|
-
|
|
6
|
-
import type { USARadioOptionElement } from "./radio-option.element.js";
|
|
7
|
-
|
|
8
|
-
describe("usa-radio-option", () => {
|
|
9
|
-
it("should map value to slot", async () => {
|
|
10
|
-
const radio = await fixture<USARadioOptionElement>(html`
|
|
11
|
-
<usa-radio>
|
|
12
|
-
<usa-radio-option value="first">First</usa-radio-option>
|
|
13
|
-
</usa-radio>
|
|
14
|
-
`);
|
|
15
|
-
|
|
16
|
-
const option = radio.querySelectorAll("usa-radio-option");
|
|
17
|
-
|
|
18
|
-
assert.equal(option[0].value, option[0].slot);
|
|
19
|
-
});
|
|
20
|
-
});
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import "./radio.element.js";
|
|
2
|
-
import "./radio-option/radio-option.element.js";
|
|
3
|
-
|
|
4
|
-
import { assert, fixture, html } from "@open-wc/testing";
|
|
5
|
-
|
|
6
|
-
import type { USARadioElement } from "./radio.element.js";
|
|
7
|
-
|
|
8
|
-
describe("usa-radio", () => {
|
|
9
|
-
it("should be accessible", async () => {
|
|
10
|
-
const radio = await fixture<USARadioElement>(html`
|
|
11
|
-
<usa-radio name="historical-figures" value="frederick-douglass" tiled>
|
|
12
|
-
<usa-radio-option value="sojourner-truth">
|
|
13
|
-
Sojourner Truth
|
|
14
|
-
</usa-radio-option>
|
|
15
|
-
|
|
16
|
-
<usa-radio-option value="frederick-douglass">
|
|
17
|
-
Frederick Douglass
|
|
18
|
-
</usa-radio-option>
|
|
19
|
-
|
|
20
|
-
<usa-radio-option value="booker-t-washington">
|
|
21
|
-
Booker T. Washington
|
|
22
|
-
</usa-radio-option>
|
|
23
|
-
|
|
24
|
-
<usa-radio-option value="george-washington-carver">
|
|
25
|
-
George Washington Carver
|
|
26
|
-
</usa-radio-option>
|
|
27
|
-
</usa-radio>
|
|
28
|
-
`);
|
|
29
|
-
|
|
30
|
-
return assert.isAccessible(radio);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it("should create local inputs for each option", async () => {
|
|
34
|
-
const form = await fixture<HTMLFormElement>(html`
|
|
35
|
-
<form>
|
|
36
|
-
<usa-radio name="historical-figures" value="frederick-douglass">
|
|
37
|
-
<usa-radio-option value="sojourner-truth">
|
|
38
|
-
Sojourner Truth
|
|
39
|
-
</usa-radio-option>
|
|
40
|
-
|
|
41
|
-
<usa-radio-option value="frederick-douglass">
|
|
42
|
-
Frederick Douglass
|
|
43
|
-
</usa-radio-option>
|
|
44
|
-
|
|
45
|
-
<usa-radio-option value="booker-t-washington">
|
|
46
|
-
Booker T. Washington
|
|
47
|
-
</usa-radio-option>
|
|
48
|
-
|
|
49
|
-
<usa-radio-option value="george-washington-carver">
|
|
50
|
-
George Washington Carver
|
|
51
|
-
</usa-radio-option>
|
|
52
|
-
</usa-radio>
|
|
53
|
-
</form>
|
|
54
|
-
`);
|
|
55
|
-
|
|
56
|
-
const nativeInputs =
|
|
57
|
-
form.querySelector("usa-radio")?.shadowRoot?.querySelectorAll("input") ??
|
|
58
|
-
[];
|
|
59
|
-
|
|
60
|
-
assert.deepEqual(
|
|
61
|
-
Array.from(nativeInputs).map((input) => input.value),
|
|
62
|
-
[
|
|
63
|
-
"sojourner-truth",
|
|
64
|
-
"frederick-douglass",
|
|
65
|
-
"booker-t-washington",
|
|
66
|
-
"george-washington-carver",
|
|
67
|
-
],
|
|
68
|
-
);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it("should remove inputs when options are removed", async () => {
|
|
72
|
-
const form = await fixture<HTMLFormElement>(html`
|
|
73
|
-
<form>
|
|
74
|
-
<usa-radio name="historical-figures" value="frederick-douglass">
|
|
75
|
-
<usa-radio-option value="sojourner-truth">
|
|
76
|
-
Sojourner Truth
|
|
77
|
-
</usa-radio-option>
|
|
78
|
-
|
|
79
|
-
<usa-radio-option value="frederick-douglass">
|
|
80
|
-
Frederick Douglass
|
|
81
|
-
</usa-radio-option>
|
|
82
|
-
|
|
83
|
-
<usa-radio-option value="booker-t-washington">
|
|
84
|
-
Booker T. Washington
|
|
85
|
-
</usa-radio-option>
|
|
86
|
-
|
|
87
|
-
<usa-radio-option value="george-washington-carver">
|
|
88
|
-
George Washington Carver
|
|
89
|
-
</usa-radio-option>
|
|
90
|
-
</usa-radio>
|
|
91
|
-
</form>
|
|
92
|
-
`);
|
|
93
|
-
|
|
94
|
-
const options = form.querySelectorAll("usa-radio-option");
|
|
95
|
-
|
|
96
|
-
options[2].remove();
|
|
97
|
-
|
|
98
|
-
const nativeInputs =
|
|
99
|
-
form.querySelector("usa-radio")?.shadowRoot?.querySelectorAll("input") ??
|
|
100
|
-
[];
|
|
101
|
-
|
|
102
|
-
assert.deepEqual(
|
|
103
|
-
Array.from(nativeInputs).map((input) => input.value),
|
|
104
|
-
["sojourner-truth", "frederick-douglass", "george-washington-carver"],
|
|
105
|
-
);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
it("should submit form with default values", async () => {
|
|
109
|
-
const form = await fixture<HTMLFormElement>(html`
|
|
110
|
-
<form>
|
|
111
|
-
<usa-radio name="historical-figures" value="frederick-douglass">
|
|
112
|
-
<usa-radio-option value="sojourner-truth">
|
|
113
|
-
Sojourner Truth
|
|
114
|
-
</usa-radio-option>
|
|
115
|
-
|
|
116
|
-
<usa-radio-option value="frederick-douglass">
|
|
117
|
-
Frederick Douglass
|
|
118
|
-
</usa-radio-option>
|
|
119
|
-
|
|
120
|
-
<usa-radio-option value="booker-t-washington">
|
|
121
|
-
Booker T. Washington
|
|
122
|
-
</usa-radio-option>
|
|
123
|
-
|
|
124
|
-
<usa-radio-option value="george-washington-carver">
|
|
125
|
-
George Washington Carver
|
|
126
|
-
</usa-radio-option>
|
|
127
|
-
</usa-radio>
|
|
128
|
-
</form>
|
|
129
|
-
`);
|
|
130
|
-
|
|
131
|
-
const value = new FormData(form);
|
|
132
|
-
|
|
133
|
-
const nativeInputs =
|
|
134
|
-
form.querySelector("usa-radio")?.shadowRoot?.querySelectorAll("input") ??
|
|
135
|
-
[];
|
|
136
|
-
|
|
137
|
-
assert.equal(nativeInputs[1].checked, true);
|
|
138
|
-
assert.equal(value.get("historical-figures"), "frederick-douglass");
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
it("should submit form with changed value", async () => {
|
|
142
|
-
const form = await fixture<HTMLFormElement>(html`
|
|
143
|
-
<form>
|
|
144
|
-
<usa-radio name="historical-figures" value="frederick-douglass">
|
|
145
|
-
<usa-radio-option value="sojourner-truth">
|
|
146
|
-
Sojourner Truth
|
|
147
|
-
</usa-radio-option>
|
|
148
|
-
|
|
149
|
-
<usa-radio-option value="frederick-douglass">
|
|
150
|
-
Frederick Douglass
|
|
151
|
-
</usa-radio-option>
|
|
152
|
-
|
|
153
|
-
<usa-radio-option value="booker-t-washington">
|
|
154
|
-
Booker T. Washington
|
|
155
|
-
</usa-radio-option>
|
|
156
|
-
|
|
157
|
-
<usa-radio-option value="george-washington-carver">
|
|
158
|
-
George Washington Carver
|
|
159
|
-
</usa-radio-option>
|
|
160
|
-
</usa-radio>
|
|
161
|
-
</form>
|
|
162
|
-
`);
|
|
163
|
-
|
|
164
|
-
const nativeInputs =
|
|
165
|
-
form.querySelector("usa-radio")?.shadowRoot?.querySelectorAll("input") ??
|
|
166
|
-
[];
|
|
167
|
-
|
|
168
|
-
nativeInputs[3].click();
|
|
169
|
-
|
|
170
|
-
const value = new FormData(form);
|
|
171
|
-
|
|
172
|
-
assert.equal(value.get("historical-figures"), "george-washington-carver");
|
|
173
|
-
});
|
|
174
|
-
});
|