-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix: ci integration tests chopsticks #839
base: develop
Are you sure you want to change the base?
Conversation
…ode into ag_chopsticks_design
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.
Nice! This is already a big big improvement.
What I would still like to see, is 1. an updated README with instructions on how to add more test cases, perhaps with a couple of distinct but sufficiently informative examples, and 2. a better visual separation of setup + pre-conditions, action, and post-conditions for each test case. It can be as simple as having a nicely formatted comment line, but right now my eyes cross each other if I try to understand what are the relevant lines to review, since I'm mostly interested in seeing what is being tested and only skim over setup steps and similar, which seem to be the same for all test cases. Might also be a separate function that encapsulates the setup logic, wich each test case only containing the actual operation + post-condition checks.
const { desc, precision } = config | ||
|
||
beforeEach(async () => { | ||
const { network, storage } = config |
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 line can be done in a beforeAll
. Anything that is not setup for this specific test case, really. It's a nitpick tho, not that important.
balanceToTransfer.foreign.toString() | ||
) | ||
|
||
const events1 = await sendTransaction(txSendForeignAsset.signAsync(senderAccount)) |
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.
Can you please use more descriptive names, at least for the thing we're actually testing?
] | ||
`; | ||
|
||
exports[`Switch KILTs full flow > V4 LIVE > Transfer native funds to foreign chain {"section":"fungibles","method":"Burned"} 1`] = ` |
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.
Apparently there's two instances of snapshots that start with Switch KILTs full flow > V4 LIVE > Transfer native funds to foreign chain
, which makes it hard to understand which test is which. Can you maybe add some details besides the pallet name that would uniquely identify each test case, and can be easily compared to the test source code?
fixes #3252