Skip to content
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

Open
wants to merge 89 commits into
base: develop
Choose a base branch
from

Conversation

Ad96el
Copy link
Member

@Ad96el Ad96el commented Jan 7, 2025

fixes #3252

@Ad96el Ad96el marked this pull request as ready for review January 22, 2025 16:03
@Ad96el Ad96el requested a review from ntn-x2 January 23, 2025 08:55
@Ad96el Ad96el changed the base branch from ag_chopsticks_design to develop January 23, 2025 09:30
@Ad96el Ad96el changed the title Ag chopsticks design switch fix: ci integration tests chopsticks Jan 25, 2025
Copy link
Member

@ntn-x2 ntn-x2 left a 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.

integration-tests/chopsticks/src/tests/types.ts Outdated Show resolved Hide resolved
const { desc, precision } = config

beforeEach(async () => {
const { network, storage } = config
Copy link
Member

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))
Copy link
Member

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`] = `
Copy link
Member

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?

.github/workflows/check-code.yml Show resolved Hide resolved
.github/workflows/check-code.yml Outdated Show resolved Hide resolved
@Ad96el Ad96el mentioned this pull request Jan 27, 2025
@Ad96el Ad96el added the ci-skip-docs-pr ci-skip-docs-pr label Jan 31, 2025
@Ad96el Ad96el requested review from abdulmth and rflechtner January 31, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-skip-docs-pr ci-skip-docs-pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants