mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-01 22:51:10 -04:00
Add comments to JS and improve selector in test
After talking with the reviewer, it was decided that: 1. the JS could do with some comments to explain its structure and what various functions do better 2. some CSS selectors in the tests don't need to be as complex and simplifying them makes the test easier to read
This commit is contained in:
@@ -304,7 +304,7 @@ describe('RadioSelect', () => {
|
||||
|
||||
test("focus the selected option", () => {
|
||||
|
||||
selectedOption = document.querySelector('.radio-select__column:nth-child(2) input[checked=checked]');
|
||||
selectedOption = document.querySelector('.radio-select__column input[checked=checked]');
|
||||
|
||||
expect(document.activeElement).toBe(selectedOption);
|
||||
|
||||
@@ -349,7 +349,7 @@ describe('RadioSelect', () => {
|
||||
|
||||
test("focus the selected option", () => {
|
||||
|
||||
selectedOption = document.querySelector('.radio-select__column:nth-child(2) input[checked=checked]');
|
||||
selectedOption = document.querySelector('.radio-select__column input[checked=checked]');
|
||||
|
||||
expect(document.activeElement).toBe(selectedOption);
|
||||
|
||||
@@ -408,7 +408,7 @@ describe('RadioSelect', () => {
|
||||
|
||||
test("focus the selected option", () => {
|
||||
|
||||
selectedOption = document.querySelector('.radio-select__column:nth-child(2) input[checked=checked]');
|
||||
selectedOption = document.querySelector('.radio-select__column input[checked=checked]');
|
||||
|
||||
expect(document.activeElement).toBe(selectedOption);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user