-
Notifications
You must be signed in to change notification settings - Fork 35
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
Transaction Tests #569
Transaction Tests #569
Conversation
CHANGELOG.md
Outdated
@@ -2,6 +2,7 @@ | |||
|
|||
## 0.6.0 (TBD) | |||
|
|||
* Add Transaction Integration Tests for Web Client (#569). |
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.
We should use past tense in the changelog:
* Add Transaction Integration Tests for Web Client (#569). | |
* Added Transaction Integration Tests for Web Client (#569). |
let transactions = await client.get_transactions(window.TransactionFilter.all()); | ||
let uncomittedTransactions = await client.get_transactions(window.TransactionFilter.uncomitted()); | ||
let transactionIds = transactions.map(transaction => transaction.id().to_hex()); | ||
let uncomittedTransactionIds = uncomittedTransactions.map(transaction => transaction.id().to_hex()); |
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.
Are we able to call getAllTransaction
here? The one defined 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.
Yes we are! I also changed the "no transactions" test to just use that as well.
compileTxScript(script) | ||
).to.be.rejectedWith(`Failed to compile transaction script: Transaction script error: AssemblyError("invalid syntax")`); | ||
}); | ||
}); |
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.
End of file is missing here
d9874db
to
95842ea
Compare
Once 0xPolygonMiden/miden-base#951 gets merged, the CI can be re-run since the WASM build should be fixed |
@igamigo sounds good thanks for the heads up! In the meantime, the rest of the feedback has been addressed @tomyrd @SantiagoPittella 🙌 |
@dagarcia7 can you rebase your fork from |
e6b971f
to
3570c3a
Compare
@igamigo rebased and all looks good now! 🙌 Thanks! |
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.
Looks good! Thanks for the changes.
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.
LGTM! Leaving one small comment
await new Promise((r) => setTimeout(r, 20000)); // TODO: Replace this with loop of sync -> check uncommitted transactions -> sleep | ||
await client.sync_state(); | ||
if (_sync) { | ||
await new Promise((r) => setTimeout(r, 20000)); // TODO: Replace this with loop of sync -> check uncommitted transactions -> sleep |
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.
Would be very nice to address this with a function that the whole test suite can call, in order to minimize execution time.
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.
Yes! This has been on my mind a lot as well. Let me merge in this PR, and will follow up with this immediately 🫡
Summary
This PR adds integration tests for the
get_transactions
andcompile_tx_script
web client calls intransactions.rs
.