mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-17 21:20:32 -04:00
Radio buttons and list edits
This commit is contained in:
@@ -71,9 +71,9 @@ describe('RadioSelect', () => {
|
||||
const num = idx + 1;
|
||||
|
||||
result +=
|
||||
`<div class="govuk-radios__item">
|
||||
<input class="govuk-radios__input" id="scheduled_for-${num}" name="scheduled_for" type="radio" value="2019-05-${dayAsNumber}T${hour}:00:00.459156">
|
||||
<label class="govuk-label govuk-radios__label" for="scheduled_for-${num}">
|
||||
`<div class="usa-radio">
|
||||
<input class="usa-radio__input" id="scheduled_for-${num}" name="scheduled_for" type="radio" value="2019-05-${dayAsNumber}T${hour}:00:00.459156">
|
||||
<label class="usa-radio__label" for="scheduled_for-${num}">
|
||||
${day} at ${hourLabel}
|
||||
</label>
|
||||
</div>`;
|
||||
@@ -101,9 +101,9 @@ describe('RadioSelect', () => {
|
||||
When should Notify send these messages?
|
||||
</legend>
|
||||
<div class="radio-select" data-module="radio-select" data-categories="${CATEGORIES.join(',')}" data-show-now-as-default="true">
|
||||
<div class="govuk-radios__item">
|
||||
<input class="govuk-radios__input" checked="" id="scheduled_for-0" name="scheduled_for" type="radio" value="">
|
||||
<label class="govuk-label govuk-radios__label" for="scheduled_for-0">
|
||||
<div class="usa-radio">
|
||||
<input class="usa-radio__input" checked="" id="scheduled_for-0" name="scheduled_for" type="radio" value="">
|
||||
<label class="usa-radio__label" for="scheduled_for-0">
|
||||
Now
|
||||
</label>
|
||||
</div>
|
||||
@@ -111,7 +111,7 @@ describe('RadioSelect', () => {
|
||||
</div>
|
||||
</fieldset>`;
|
||||
|
||||
originalOptionsForAllCategories = Array.from(document.querySelectorAll('.govuk-radios__item:not(:first-of-type)'))
|
||||
originalOptionsForAllCategories = Array.from(document.querySelectorAll('.usa-radio:not(:first-of-type)'))
|
||||
.map(option => getDataFromOption(option));
|
||||
});
|
||||
|
||||
@@ -211,7 +211,7 @@ describe('RadioSelect', () => {
|
||||
test("show the options for it, with the right label and value", () => {
|
||||
|
||||
// check options this reveals against those originally in the page for this category
|
||||
const options = document.querySelectorAll('.radio-select__column:nth-child(2) .govuk-radios__item');
|
||||
const options = document.querySelectorAll('.radio-select__column:nth-child(2) .usa-radio');
|
||||
|
||||
const optionsThatMatchOriginals = Array.from(options).filter((option, idx) => {
|
||||
const optionData = getDataFromOption(option);
|
||||
|
||||
Reference in New Issue
Block a user