-
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
Fix tests #29
base: main
Are you sure you want to change the base?
Fix tests #29
Conversation
WalkthroughThe recent updates primarily focused on refining test files and dependencies. Error messages were clarified, and import statements were streamlined with added semicolons. Additionally, some test cases were modified to enhance clarity and accuracy. The Changes
Poem
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (24)
- package.json (1 hunks)
- test/dispute/raiseDispute.test.ts (1 hunks)
- test/dispute/resolveDispute.test.ts (2 hunks)
- test/e2e/derivativeIP.comUsePIL.test.ts (1 hunks)
- test/e2e/derivativeIP.nonComPIL.test.ts (11 hunks)
- test/e2e/dispute.test.ts (4 hunks)
- test/e2e/licenseTerms.nonComPIL.test.ts (2 hunks)
- test/e2e/multiLIcenseTerms.test.ts (3 hunks)
- test/e2e/royalty.comRemixPIL.test.ts (1 hunks)
- test/e2e/royalty.comUsePIL.test.ts (1 hunks)
- test/e2e/setPermissions.test.ts (4 hunks)
- test/ipAccount/executeWithSig.test.ts (1 hunks)
- test/ipAsset/mintAndRegisterIpAssetWithPilTerms.test.ts (3 hunks)
- test/ipAsset/register.test.ts (1 hunks)
- test/ipAsset/registerDerivative.test.ts (2 hunks)
- test/ipAsset/registerDerivativeIp.test.ts (2 hunks)
- test/ipAsset/registerDerivativeWithLicenseTokens.test.ts (3 hunks)
- test/ipAsset/registerIpAndAttachPilTerms.test.ts (4 hunks)
- test/license/attachLicenseTerms.test.ts (4 hunks)
- test/license/mintLicenseTokens.test.ts (3 hunks)
- test/nftClient/createNFTCollection.test.ts (2 hunks)
- test/permission/permission.test.ts (1 hunks)
- test/royalty/payRoyaltyOnBehalf.test.ts (1 hunks)
- test/testUtils.ts (1 hunks)
Files skipped from review due to trivial changes (13)
- package.json
- test/dispute/raiseDispute.test.ts
- test/e2e/derivativeIP.comUsePIL.test.ts
- test/e2e/derivativeIP.nonComPIL.test.ts
- test/e2e/multiLIcenseTerms.test.ts
- test/e2e/royalty.comRemixPIL.test.ts
- test/e2e/royalty.comUsePIL.test.ts
- test/ipAccount/executeWithSig.test.ts
- test/ipAsset/register.test.ts
- test/ipAsset/registerDerivativeIp.test.ts
- test/nftClient/createNFTCollection.test.ts
- test/royalty/payRoyaltyOnBehalf.test.ts
- test/testUtils.ts
Additional comments not posted (33)
test/dispute/resolveDispute.test.ts (8)
54-54
: LGTM!The updated error message provides clear information about the failure.
60-60
: LGTM!The updated error message provides clear information about the failure.
66-67
: LGTM!The updated error message provides clear information about the failure.
74-74
: LGTM!The updated error message provides clear information about the failure.
80-81
: LGTM!The updated error message provides clear information about the failure.
87-88
: LGTM!The updated error message provides clear information about the failure.
97-98
: LGTM!The updated error message provides clear information about the failure.
104-105
: LGTM!The updated error message provides clear information about the failure.
test/e2e/licenseTerms.nonComPIL.test.ts (3)
2-2
: LGTM! Import statement updated correctly.The import statement for
registerIpAndAttachPilTerms
has been replaced withregisterIpAsset
, which aligns with the function usage in the code.
114-123
: LGTM! Function usage updated correctly.The function
registerIpAndAttachPilTerms
has been replaced withregisterIpAsset
, which aligns with the updated import statement and the intended functionality.
Line range hint
195-195
:
LGTM! Parameter updated correctly.The parameter
nonComLicenseTermsId
has been replaced with0n
, which aligns with the standardized handling of license terms in the code.test/ipAsset/mintAndRegisterIpAssetWithPilTerms.test.ts (2)
93-93
: LGTM! Parameters updated correctly.The parameters of the
mintAndRegisterIpAssetWithPilTerms
function have been updated to include additional optional parameters, which aligns with the intended functionality and test coverage.
130-133
: LGTM! Parameters updated correctly.The parameters of the
mintAndRegisterIpAssetWithPilTerms
function have been updated to include additional optional parameters, which aligns with the intended functionality and test coverage.test/ipAsset/registerDerivativeWithLicenseTokens.test.ts (2)
4-4
: LGTM! Import statement updated correctly.The import statement for
registerIpAndAttachPilTerms
has been replaced withregisterIpAsset
, which aligns with the function usage in the code.
203-203
: LGTM! Parameters updated correctly.The parameters of the
registerDerivativeWithLicenseTokens
function have been updated to include additional optional parameters, which aligns with the intended functionality and test coverage.test/license/attachLicenseTerms.test.ts (1)
114-117
: LGTM! Parameters updated correctly.The parameters of the
attachLicenseTerms
function have been updated to include additional optional parameters, which aligns with the intended functionality and test coverage.test/license/mintLicenseTokens.test.ts (2)
101-102
: LGTM! Error message update is correct.The updated error message accurately reflects the correct license terms ID.
176-186
: LGTM! New test case adds valuable coverage.The new test case enhances the test coverage by verifying the minting of license tokens with multiple license terms attached to an IP asset.
test/ipAsset/registerIpAndAttachPilTerms.test.ts (2)
129-129
: LGTM! Error message update is correct.The updated error message accurately reflects the correct size of the bytes.
138-138
: LGTM! Error message update is correct.The updated error message accurately reflects the correct function signature.
test/e2e/dispute.test.ts (4)
62-62
: LGTM! Error message update is correct.The updated error message accurately reflects the correct license terms ID.
290-290
: LGTM! Error message update is correct.The updated error message accurately reflects the correct function signature.
312-322
: LGTM! Error message update is correct.The updated error message accurately reflects the correct function signature.
383-383
: LGTM! Error message update is correct.The updated error message accurately reflects the correct function signature.
test/e2e/setPermissions.test.ts (5)
7-7
: LGTM! Import statement is correctly added.The import statement for
comUseLicenseTermsId1
is correctly added to support the test steps.
65-67
: LGTM!The step correctly updates the test to use the new license terms ID
0n
and checks for a successful transaction.
112-114
: LGTM!The step correctly updates the test to use the new license terms ID
0n
and checks for a successful transaction.
49-51
: LGTM! But verify the error message consistency.The step correctly updates the test to use the new license terms ID
0n
and improves error message clarity.However, ensure that the error message
"Failed to attach license terms: The contract function \"attachLicenseTerms\" reverted with the following signature:"
is consistent across the codebase.Verification successful
Let's modify the script to search for the error message across all files without specifying a file type.
Verified: Error message consistency
The error message
"Failed to attach license terms: The contract function "attachLicenseTerms" reverted with the following signature:"
is used consistently in the codebase.
test/e2e/licenseTerms.nonComPIL.test.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the error message consistency across the codebase. # Test: Search for the error message. Expect: Consistent usage. rg --type javascript -A 5 $'Failed to attach license terms: The contract function "attachLicenseTerms" reverted with the following signature:'Length of output: 178
Script:
#!/bin/bash # Description: Verify the error message consistency across the codebase. # Test: Search for the error message. Expect: Consistent usage. rg -A 5 $'Failed to attach license terms: The contract function "attachLicenseTerms" reverted with the following signature:'Length of output: 612
75-77
: LGTM! But verify the error message consistency.The step correctly updates the test to use the new license terms ID
0n
and improves error message clarity.However, ensure that the error message
"Failed to attach license terms: The contract function \"attachLicenseTerms\" reverted with the following signature:"
is consistent across the codebase.Verification successful
The error message is consistent across the codebase.
The error message
"Failed to attach license terms: The contract function \"attachLicenseTerms\" reverted with the following signature:"
is used consistently in the codebase, as found intest/e2e/licenseTerms.nonComPIL.test.ts
.
test/e2e/licenseTerms.nonComPIL.test.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the error message consistency across the codebase. # Test: Search for the error message. Expect: Consistent usage. rg --type javascript -A 5 $'Failed to attach license terms: The contract function "attachLicenseTerms" reverted with the following signature:'Length of output: 178
Script:
#!/bin/bash # Description: Verify the error message consistency across the codebase. # Test: Search for the error message. Expect: Consistent usage. rg -A 5 $'Failed to attach license terms: The contract function "attachLicenseTerms" reverted with the following signature:'Length of output: 612
test/ipAsset/registerDerivative.test.ts (4)
4-4
: LGTM! Import statement is correctly added.The import statement for
expect
fromchai
is correctly added to support the test steps.
55-55
: LGTM!The step correctly updates the test to use the new license terms ID
0n
and checks for a successful transaction.
49-50
: LGTM! But verify the error message consistency.The step correctly updates the test to use the new license terms ID
0n
and improves error message clarity.However, ensure that the error message
"Failed to register derivative: License terms id 0 must be attached to the parent ipId"
is consistent across the codebase.Verification successful
The error message is consistent across the codebase.
The error message
"Failed to register derivative: License terms id 0 must be attached to the parent ipId"
appears consistently in the following test files:
test/ipAsset/registerDerivative.test.ts
test/e2e/multiLIcenseTerms.test.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the error message consistency across the codebase. # Test: Search for the error message. Expect: Consistent usage. rg --type javascript -A 5 $'Failed to register derivative: License terms id 0 must be attached to the parent ipId'Length of output: 150
Script:
#!/bin/bash # Description: Verify the error message consistency across the codebase. # Test: Search for the error message. Expect: Consistent usage. rg 'Failed to register derivative: License terms id 0 must be attached to the parent ipId' --glob '*.js' -A 5Length of output: 260
Script:
#!/bin/bash # Description: Verify the error message consistency across the codebase. # Test: Search for the error message. Expect: Consistent usage. rg 'Failed to register derivative: License terms id 0 must be attached to the parent ipId' -A 5Length of output: 1443
60-60
: LGTM! But verify the error message consistency.The step correctly updates the test to use the new license terms ID
0n
and improves error message clarity.However, ensure that the error message
"Failed to register derivative: The contract function \"registerDerivative\" reverted with the following signature:"
is consistent across the codebase.
This PR is to fix the test scripts as the IP asset is default attached non-commercial PIL.
Summary by CodeRabbit
Bug Fixes
Refactor
Style
Chores
@story-protocol/core-sdk
dependency from1.0.0-rc.14
to1.0.0-rc.15
.