From 636cb6825b09ae7af2665c9d4f1e2a927981cf2b Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Thu, 16 Jul 2020 16:03:13 +0100 Subject: [PATCH] Fix use of querySelector in radioSelect tests --- tests/javascripts/radioSelect.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/javascripts/radioSelect.test.js b/tests/javascripts/radioSelect.test.js index c41481208..d8227e865 100644 --- a/tests/javascripts/radioSelect.test.js +++ b/tests/javascripts/radioSelect.test.js @@ -114,7 +114,7 @@ describe('RadioSelect', () => { `; - 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)); }); @@ -173,7 +173,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.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 optionData = getDataFromOption(option);