mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 21:38:24 -04:00
Fix use of querySelector in radioSelect tests
This commit is contained in:
committed by
Chris Hill-Scott
parent
83156bd16e
commit
636cb6825b
@@ -114,7 +114,7 @@ describe('RadioSelect', () => {
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>`;
|
</fieldset>`;
|
||||||
|
|
||||||
originalOptionsForAllCategories = Array.from(document.querySelector('.radio-select__column:nth-child(2) .multiple-choice'))
|
originalOptionsForAllCategories = Array.from(document.querySelectorAll('.radio-select__column:nth-child(2) .multiple-choice'))
|
||||||
.map(option => getDataFromOption(option));
|
.map(option => getDataFromOption(option));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ describe('RadioSelect', () => {
|
|||||||
test("show the options for it, with the right label and value", () => {
|
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
|
// check options this reveals against those originally in the page for this category
|
||||||
const options = document.querySelector('.radio-select__column:nth-child(2) .multiple-choice');
|
const options = document.querySelectorAll('.radio-select__column:nth-child(2) .multiple-choice');
|
||||||
|
|
||||||
const optionsThatMatchOriginals = Array.from(options).filter((option, idx) => {
|
const optionsThatMatchOriginals = Array.from(options).filter((option, idx) => {
|
||||||
const optionData = getDataFromOption(option);
|
const optionData = getDataFromOption(option);
|
||||||
|
|||||||
Reference in New Issue
Block a user