zonemaster-gui
zonemaster-gui copied to clipboard
Improve run test form
Purpose
Reposition the focus on various action and fix NS and DS new row handling.
Context
Addresses #446
Changes
- Move the focus back to the domain input when the "clear domain input" button is pressed
- Move the focus to the next "delete" button for NS and DS form rows or the previous one if the last one has been pressed
- Replace disclosure logic with a HTML native
detail
element (equivalent behaviour) - Improve visual appearance of the "clear domain input" button when focused
- Fix: Ensure always one empty row is displayed
How to reproduce bug:
- Enter "1" in the first nameserver name input
- Delete second row by pressing the delete row button
- There is only one row left, and no way to add more row
- Fix: Changing the last empty row always add a new row
How to reproduce the bug:
- Enter "1" in the first nameserver name input
- Enter "2" in the second nameserver name input
- Clear input of namerserver name input "2"
- Delete last (third) row by pressing the delete row button
- Enter "2" in the second nameserver name input again
- No new row appears
- Move the focus to first invalid input on error
- Add missing error message for keytag field
- Fix: Domain input has a error message description ("Domain name required") before the user has a chance to fill the input.
How to test this PR
Move the focus back to the domain input
- Enter "domain" in the domain input
- Tab to the "Clear domain input" button
- Press Enter
- Check that the domain input is now empty and that the focus is back to the domain input
Move the focus to the delete button
- Enter "1" in the first nameserver name input
- Enter "2" in the second nameserver name input
- Tab to the second delete button
- Press Enter
- Check that the focus is still on the second delete button but there are only two row now
- Press Enter
- Check that nothing has changed (the last row is not deleted to ensure that an empty row is alway present)
- Tab back to the first delete button
- Press Enter
- Check that the focus is still on first delete button, there is now only one row and it is empty
- Repeat for the DS form section
Move the focus to first invalid input (client side validation, keyboard navigation)
- Make sure that the domain input is empty
- Expand the form options
- Click on an nameserver or ds input to focus it
- Press enter to submit
- Check that the domain input is now focused
Move the focus to first invalid input (client side validation, mouse navigation)
- Make sure that the domain input is empty
- Make sure that the focus is not on the input field by clicking somewhere else on the page
- Press the submit button
- Check that the domain input is now focused
Move the focus to first invalid input (server side validation)
- Input "test" in the domain input
- Expand the form options
- Enter "
" in the Nameserver's Name field - Press the submit button
- Check that the Nameserver's Name field is focused
Missing error message for keytag
- Input "bad keytag" in the DS keytag field
- Check that a error message describing the error (not a numeric value) is displayed
- Using Firefox Accessibility inspector, check that the description of the input matches the displayed message