Repository navigation
Holds a Journey press to authored checks - #281
Merged
Merged
Conversation
Riddler's resolve drops a question's checks, so a check authored in the screen editor or the patron registration fixture never held a patron at a screen. Journey submit now puts each shown question's checks back from the screens document and validates against a root of the typed responses, what the chart holds for the other screens (no secret question's) and a context the host builds: today, from the submit's today option or the UTC date. Validation takes that context in validate/3 and check/3 and words a failing check in its author's message. The refused view carries riddler's findings as refusals, which the Journey page's host now draws, since re-checking the check-less nodes there found nothing. Refs: se-b3n0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes
Riddler's resolve drops a question's
checksfrom the elements it answers, so a check authored in the screen editor or in the patron registration fixture never held a patron at a screen, and the validation root carried nocontextfor a check to read.StatifierExamples.Signup.Journey.submit/4puts each shown question's checks back from the screens document (authored_checks/2) and validates against a root of the typed responses, what the chart holds for the other screens with this screen's own keys and every secret question's left out (elsewhere/2), and acontextthe host builds (context/1):today, from the new:todayoption, aDate, or today's UTC date. Nothing the press sends reachescontext.StatifierExamples.Signup.Validationgainsvalidate/3andcheck/3, which take that context;validate/2andcheck/2pass an empty one. A failing check is worded in its author'smessage.refusals, andStatifierExamplesWeb.JourneyHost.submit/2draws them. It used to re-runValidation.check/2over the view's nodes, which carry no checks, so a check refusal would have reached the page with no finding.Tests
ScreenEditor.TryTest, "holds the date of birth to its check, against the host's today": the patron registration fixture, run as a Journey, refuses a date of birth after the host's today and accepts the same date once today is past it.ScreenEditor.TryTest, "takes its today from the host's clock, never from the press": a press carrying its owncontextandtodaykeys is still refused on the host's clock.Signup.ValidationTest, "a question's checks": a check is decided against the context it is handed, and decides nothing without one.Provenance
lib/statifier_examples_web/journey_host.exis edited (one call and its moduledoc sentence) because the refused view's findings could no longer be recomputed there; its existing refusal test carries a new sabotage line.mix.lockresolves.Gate: full
mix qualitygreen on the committed tree.