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.
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
Adding Selecting Chain Interaction And Flow Improvements #21
Adding Selecting Chain Interaction And Flow Improvements #21
Changes from all commits
4665470
c4bf858
a39daad
7f1a482
a5713d7
aee18bf
0cff640
f1c1068
85c95cb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
dont think we need to do this internally. in most cases this will not be needed
in cases when it is needed, a user will know that tokens are not currently present and can call it themselves explicitly
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.
I don't think that is reliable. We should not assume that the user knows. A flow should be capable of handling all edge cases.
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 is not an edge case, the writer of a test should know if the wallet address is present or not before writing the test.
There can be cases where user does not want to press the 'add new token' button until a later test. and since our code is forcing him to add new tokens, it might ruin their flow.
Plus all our interactions should have a single fuctionality/responsibility. here we are performing two different function together which a user can always perform separately
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 is an edge case.
Scenario:
The user want's agoric wallet address. Goes to copy the address but the agoric chain isn't present there ==> Mainly because the user did not include new tokens ==> Output is the user never got the address when they should've gotten it.
Also, assumptions lead to incorrect behaviour and unreliable software.
As for SRP, I am all in for it. But then we should apply it consistently and where it's required.
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.
i think we should always be switching screens regardless.
currently we're building our flows with the mindset that every interaction/command will switch to the keplr window, perform its interaction, and switch back to the cypress window.
if we start performing interactions that deviate from that, it could break the flow of subsequent interactions
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.
I needed to reuse this implementation in a flow I was implementing without the screen-switching part. All the tests were passed and now flow was broken.
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.
what flow was this? i dont see it being used anywhere
the
should get the accurate values for the tokens in the wallet
spec usesgetTokenAmount
twice in succession and it doesn't have any issues.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 see the
getWalletAddress
functionThere 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.
@rabi-siddique we have two sets of these test cases. both which don't technically run the addNewTokensFound flow. we should fix this in a later PR
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.
@frazarshad The test cases you're referring to are working fine.
addNewTokensFound
flow is essential for reliable results.