Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve run test form #461

Merged
merged 11 commits into from
Jun 3, 2024

Conversation

hannaeko
Copy link
Member

@hannaeko hannaeko commented Feb 22, 2024

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

@hannaeko hannaeko added this to the v2024.1 milestone Feb 22, 2024
@hannaeko hannaeko linked an issue Feb 27, 2024 that may be closed by this pull request
@hannaeko hannaeko added the V-Minor Versioning: The change gives an update of minor in version. label Feb 29, 2024
marc-vanderwal
marc-vanderwal previously approved these changes Mar 6, 2024
hannaeko added 2 commits March 6, 2024 15:35
Wait until the user has input something before showing the "domain
required" error
Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have built a GUI package based on 3b64b4f but I do not see any "clear domain input" button. Where is that?

@matsduf
Copy link
Contributor

matsduf commented May 24, 2024

image

@marc-vanderwal
Copy link
Contributor

What if you type something in the domain text field? Shouldn’t a button appear in the right hand side of the text box?

@matsduf
Copy link
Contributor

matsduf commented May 24, 2024

What if you type something in the domain text field? Shouldn’t a button appear in the right hand side of the text box?

Do you mean the "(x)" button?

@marc-vanderwal
Copy link
Contributor

Do you mean the "(x)" button?

Yes, that’s the button.

@matsduf
Copy link
Contributor

matsduf commented May 24, 2024

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

It is not.

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

It is not.

* 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

Unclear.

@matsduf
Copy link
Contributor

matsduf commented May 24, 2024

Do you mean the "(x)" button?

Yes, that’s the button.

I was looking for a button with that name. Anyway, it is not working. I am not sure how important it is.

@MichaelTimbert
Copy link

I have checked this PR and everything is good for me.

@hannaeko
Copy link
Member Author

@matsduf when you say "it is not working" can you describe a bit more what does or does not happen (is the input not being cleared or the focus not being in the right place, etc.)? Also which browser are you using (I doubt that it matters but we never know)?

I have retested those parts on both Firefox and Chromium without issue.

As for the test that is "unclear", what information is lacking for you to do it?

@matsduf
Copy link
Contributor

matsduf commented May 31, 2024

@matsduf when you say "it is not working" can you describe a bit more what does or does not happen (is the input not being cleared or the focus not being in the right place, etc.)? Also which browser are you using (I doubt that it matters but we never know)?

I write something in the domain field and press tab to the (x) and press enter. After that the "cursor" is in some undefined place. I have to click the mouse button to get into the field gain to be able to write.

I am using Firefox, and now testing Chrome gives the same result.

As for the test that is "unclear", what information is lacking for you to do it?

Since it did not behave well it was hard to follow the instructions.

@matsduf matsduf dismissed their stale review May 31, 2024 12:50

I cannot confirm, but I do not want to block the PR.

@hannaeko
Copy link
Member Author

I write something in the domain field and press tab to the (x) and press enter. After that the "cursor" is in some undefined place. I have to click the mouse button to get into the field gain to be able to write.

This PR should be correcting this behaviour (it is the current one), is your test instance/VPS publicly available if I want to check?

@matsduf
Copy link
Contributor

matsduf commented May 31, 2024

This PR should be correcting this behaviour (it is the current one), is your test instance/VPS publicly available if I want to check?

It is on AWS and if you could provide an IP address (or both v4 and v6) I can open for you in the firewall.

@hannaeko
Copy link
Member Author

It is on AWS and if you could provide an IP address (or both v4 and v6) I can open for you in the firewall.

I've sent you an email with my IP addresses.

@hannaeko
Copy link
Member Author

It looks that the code that you are testing is not the one from this PR

Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it looks right. Maybe I forgot to reload or something.

@matsduf matsduf merged commit e45341e into zonemaster:develop Jun 3, 2024
1 check passed
@MichaelTimbert MichaelTimbert self-requested a review June 3, 2024 12:54
@tgreenx
Copy link
Contributor

tgreenx commented Jun 25, 2024

v2024.1 Release testing

Followed the "How to Test" section, and it works as advertised.

@tgreenx tgreenx added the S-ReleaseTested Status: The PR has been successfully tested in release testing label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-ReleaseTested Status: The PR has been successfully tested in release testing V-Minor Versioning: The change gives an update of minor in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus repositionning in form
5 participants