CruGlobal / conf-registration-web

Event Registration Tool
https://www.eventregistrationtool.com
MIT License
2 stars 1 forks source link

Fix-Skip-Next-Page-Bug #789

Closed TheNoodleMoose closed 2 years ago

TheNoodleMoose commented 2 years ago

Interesting bug, basically a page now only renders if it has valid questions based on registrant type after my rework. But the question and answer rules also affect this. If an answer to a question causes another question to be visible on another page and the page wasn't valid before, AND that page is the next page, it basically would be skipped if you pressed 'Next Page'. But now we are continually checking valid pages as they navigate to the next page. I don't think this is needed for navigating back as rules shouldn't apply to previous pages.

wrandall22 commented 2 years ago

Seems like this new function might warrant a test.

TheNoodleMoose commented 2 years ago

@wrandall22 This whole controller actually didn't have any tests so went ahead and created a spec for it.

TheNoodleMoose commented 2 years ago

@wrandall22 thanks for the review and comments! This is on staging and working, so if everything looks good I can merge.