-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve default child mechanism #610
Improve default child mechanism #610
Conversation
…lt-child-mechanism
…lt-child-mechanism # Conflicts: # core/test/services/routing.spec.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! I just left some small comments regarding the unit tests.
core/test/services/routing.spec.js
Outdated
@@ -467,6 +471,7 @@ describe('Routing', () => { | |||
|
|||
assert.equal(singleStateWithPath.path, expectedRoute); | |||
assert.equal(pushStateCallsNum + 1, expectedPushStateCallsNum); | |||
assert.equal(replaceStateCallsNum, 0, 'replaceState not been called'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use here notCalled as above and then we don't need the extra variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
assert.isFalse(NavigationHelpers.isNodeAccessPermitted(checkNode)); | ||
}); | ||
|
||
it('logged out, exclusive anonymousAccess', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the mocks for this tests, as they are the same as in the test above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, we need to check if the exclusive anonymous access implementation is valid, since it also calls the permission checker function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bring this topic to the next Scrum meeting ;)
…arkus/luigi into 216-improve-default-child-mechanism
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment
assert.isTrue(NavigationHelpers.isNodeAccessPermitted(checkNode)); | ||
}); | ||
|
||
it('logged out, exclusive anonymousAccess, with permissionCheckerFn', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is confusing IMHO since the mock of the function call returns false
value, which is explicitly being returned above. It is also a little bit too much testing from my point of view. I would replace it with a test for the part where we are actually returning false
, most precisely for the 2nd condition of the if
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. done
…arkus/luigi into 216-improve-default-child-mechanism
* improved default child mechanism and added e2e tets for it
You can now click on Browser back button to go to the last node, even if you were redirected by default child mechanism.