-
Notifications
You must be signed in to change notification settings - Fork 6
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
Addition of End-to-End Tests for Evolution Flow #138
Conversation
/describe |
/review |
PR Analysis
PR Feedback
How to use
|
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.
some nitpicks
}); | ||
|
||
step("when collection does not exist owner of call should fail", async function () { | ||
const collectionId = "0"; | ||
try { | ||
await contract.methods.ownerOfCollection(collectionId).call(); | ||
expect.fail("Expected error was not thrown"); // Ensure an error is thrown | ||
} catch (error) { | ||
expect(error.message).to.be.eq( | ||
"Returned error: VM Exception while processing transaction: revert" |
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 a generic error message, is there any way to expect more specific message?
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 included specific message https://github.com/freeverseio/laos/blob/feature/add_evolution_e2e_test/ownership-chain/precompile/laos-evolution/src/lib.rs#L93-L94 but still generic revert message is shown. Any idea?
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.
could this be a solution? https://ethereum.stackexchange.com/a/84551
…volution_e2e_test
…io/laos into feature/add_evolution_e2e_test
PR Type:
Tests
PR Description:
This PR introduces end-to-end tests for the evolution flow. It includes refactoring of the test-create-collection file and addition of the test-evolution file. The PR also modifies the Solidity selector of the EvolvedWithExternalURI log and updates the test to reflect this change. Additionally, it includes updates to the configuration file for the tests.
PR Main Files Walkthrough:
files:
ownership-chain/precompile/laos-evolution/src/lib.rs
: The Solidity selector of the EvolvedWithExternalURI log has been updated.ownership-chain/precompile/laos-evolution/src/tests.rs
: The test for the selector of the EvolvedWithExternalURI log has been updated to match the new selector.ownership-chain/e2e-tests/tests/config.ts
: The configuration file for the tests has been updated with new constants related to the LAOS Evolution Contract and the chain configuration.ownership-chain/e2e-tests/tests/test-create-collection.ts
: The test-create-collection file has been refactored to improve the structure and readability of the tests.ownership-chain/e2e-tests/tests/test-evolution.ts
: A new file has been added to test the evolution flow. It includes tests for minting and evolving assets.ownership-chain/e2e-tests/tests/util.ts
: A new function has been added to convert a slot and owner to a token ID.