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

Docs? buttons/action buttons with "special buttons" are not distinguishable #848

Open
plocket opened this issue Jan 3, 2024 · 1 comment
Labels
deep dive question Further information is requested

Comments

@plocket
Copy link
Collaborator

plocket commented Jan 3, 2024

[IDEA for random input tests: Should we just avoid danger and warning and info buttons in random tests?]

"Special buttons" don't seem to have a useful way to differentiate what they're going to do in the DOM or other front end data. [Actually, Exit seems to have a danger style and Restart seems to have a warning style, but I don't think that can be guaranteed to be unique or to be uncustomized.] Not sure that random tests can avoid this without the user being able to specify either the labels of buttons to avoid clicking (and to do so in multiple languages) or the [literal HTML] value of the buttons, (which they would need to know how to do, either with counting or by looking in the DOM), all of which would be very fragile to changes.

We at least need to document this and also maybe (in a separate issue) try to figure out how to let people do this.

YAML:

question: We are all done.
buttons:
  - Exit: exit
  - Restart: restart

HTML:

<fieldset class="da-button-set da-field-buttons">
  <legend class="visually-hidden">Press one of the following buttons:</legend>
  <button type="submit" class="btn btn-da btn-danger" name="X211bHRpcGxlX2Nob2ljZQ" value="0">Exit</button>
  <button type="submit" class="btn btn-da btn-warning" name="X211bHRpcGxlX2Nob2ljZQ" value="1">Restart</button>
</fieldset>

There is no more useful info in the DOM [or in the data available to the front end].

Special button types:
restart
new_session
exit
logout
exit_logout
leave
continue
refresh
signin

@plocket plocket changed the title Docs? buttons/action buttons with "special buttons" are not distinguishable in the DOM Docs? buttons/action buttons with "special buttons" are not distinguishable Jan 3, 2024
@plocket
Copy link
Collaborator Author

plocket commented Jan 3, 2024

Also, devs can only press these with selectors by looking at the DOM. We could try to let users press buttons based on labels too since we now know how to let them do tests for different translations (with cucumber Examples).

@plocket plocket added question Further information is requested deep dive labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deep dive question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant