Currently I believe the button just says "Next". We should be able to override this default in the treatment definition to make it say things like "I'm ready", etc. Should be a pretty easy fix.
For example, say that the treatment file has this syntax:
- type: submitButton
buttonText: Continue with experiment
displayTime: 1590
Implementing notes:
[ ] Need to parse in client/src/elements/Element.jsx in the submitButton case should take the buttonText attribute from the treatment file using syntax element.buttonText and pass to object.
[ ] in client/src/elements/SubmitButton need to set the inner HTML that currently says Next with the optional text,
[ ] if there is no optional text, default to Next
Testing
Update the test to check that this works
[ ] deliberation-assets/projects/example/treatments.test.yaml - add a button component with some custom text
[ ] cypress/e2e/01_Normal_Paths... need to check that the button custom text is displayed on the page at the appropriate time.
Currently I believe the button just says "Next". We should be able to override this default in the treatment definition to make it say things like "I'm ready", etc. Should be a pretty easy fix.
For example, say that the treatment file has this syntax:
Implementing notes:
client/src/elements/Element.jsx
in thesubmitButton
case should take thebuttonText
attribute from the treatment file using syntaxelement.buttonText
and pass toclient/src/elements/SubmitButton
need to set the inner HTML that currently saysNext
with the optional text,Next
Testing
Update the test to check that this works
deliberation-assets/projects/example/treatments.test.yaml
- add a button component with some custom textcypress/e2e/01_Normal_Paths...
need to check that the button custom text is displayed on the page at the appropriate time.