ui: Service Instance forwards/backwards/forwards navigation test #9532
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.
aka the 'in/out/in' test, aka 'The Hokey Cokey Test ™️ '
This PR is additional to #9524 and is the base branch for this PR.
Here we add a test for clicking forwards and backwards, and then forwards again between the Service Detail page and the Service Instance detail page, to prove that the fix in #9524 works.
I undid the fix to verify that this was failing with a 404 before the fix, redoing the fix makes the tests pass.
Notes:
We cheated a little here as in the app we call the same endpoint in quick succession one after the other and we have no generic way of mocking this absolutely realistically from within our acceptance tests. We rely on the fact that the list of instances from consul are then filtered by the UI to only give us the instance we are interested in. This means we can put as many different instances in the mocked response as we like, with all different ids, from all different services (which would never happen in Consul), and this will then satisfy the mocks we need for the test.
Alternatively we could have included some conditionals in the mock-api template, but this I'm not sure how generically we would have done that.
Longer term some sort of 'Given 1 instance model on request.0 from yaml', 'Given 2 instance models on request.1 from yaml' or similar might be a nice addition.