[M2-5044] [M2-4793] 'outside of' rule for slider works incorrectly #635
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
🔗 Jira Ticket M2-5044
🔗 Jira Ticket M2-4793
This PR fixes the logic within
AnswerValidator.isOutsideOfValues
which was usingConditionalLogicModel.isBetweenValues
instead ofConditionalLogicModel.isOutsideOfValues
.I also took the opportunity to update the logic for the
Next
button because I noticed while testing that the respondent may discover the logic for how to unlock some steps that they may other not have, just by playing with the slider. This brings the mobile app in line with web (see ChildMindInstitute/mindlogger-web-refactor#358).📸 Screenshots
Before
The logic is incorrect. It advances to the next question on the value 3, when it should only advance when the value is outside the range 2 - 4
before.mov
After
The logic is correct. It advances to the next question on the value 1
after.mov
🪤 Peer Testing
A slider with values 0 to 10
Your slider preview should look like this:
A text item
Expected outcome: The activity should proceed to the text item
Expected outcome: The activity should complete and submit the answers