OzFramework / oz

Oz is a behavioral web-ui testing framework developed to reduce test maintenance by using a predictive model rather than a scriptive model when writing tests.
Apache License 2.0
23 stars 7 forks source link

Router should have the ability to recalculate routes just-in-time #41

Closed greenarrowdb closed 5 years ago

greenarrowdb commented 6 years ago

Right now routing happens in a static manner and if you need to change the route part way through, it can't happen.

PanoramicPanda commented 5 years ago

Care to share some thoughts on how you might have this work-shopped in your brain-space? It's moved up on our priority list to have and I'd like to take a crack at it soon.

Castone22 commented 5 years ago

In short, the goal here is to remove the majority of cases that we'd use proceed by way of logic if i'm understanding this correctly.

I've been mulling over a solution for this, and i'm thinking that a good start would be, in the event we land on an unexpected page, before we raise the unexpected page error, do the following:

  1. Check if the previous page had any routes registered from the detected page.
  2. Check if from the current page, we can resolve a route to the end page
  3. Exit the old routing loop and start a new one with the new calculated route.
  4. Raise an UnableToRoute error in the event that no route could be calculated.