-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test in react sdk (#214)
* Modify calling signTypedData by wallet client * Upload pnpm-lock.yaml * Remove useless code * Set up test env * Modify error handle logic * Modify timeout time * Add util methods and wrapper * Add dispute integration test * Make test serially execute * Add ipAsset integration test * Add ipAccount integration * Add useLicense integration test * Add permission, royalty, nftClient integration test in react sdk * Modify test description * Add nftClient integration test * Move babel config into package.json * Return false when license Terms are already attached to IP Asset
- Loading branch information
Showing
31 changed files
with
2,807 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { expect } from "chai"; | ||
import { StoryClient } from "../../src"; | ||
import { getStoryClientInSepolia } from "./utils/util"; | ||
|
||
describe("nftClient Functions", () => { | ||
let client: StoryClient; | ||
before(async () => { | ||
client = getStoryClientInSepolia(); | ||
}); | ||
it("should success when create nft collection", async () => { | ||
const txData = await client.nftClient.createNFTCollection({ | ||
name: "test-collection", | ||
symbol: "TEST", | ||
maxSupply: 100, | ||
txOptions: { | ||
waitForTransaction: true, | ||
}, | ||
}); | ||
expect(txData.nftContract).to.be.a("string").and.not.empty; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SEPOLIA_TEST_WALLET_ADDRESS = 0x0000000000000000000000000000000000000000 | ||
SEPOLIA_WALLET_PRIVATE_KEY = 0x0000000000000000000000000000000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @type {import('jest').Config} */ | ||
const config = { | ||
verbose: true, | ||
testEnvironment: "./test/jest-environment-jsdom.ts", | ||
setupFiles: ["./test/jest-setup.ts"], | ||
testTimeout: 1000 * 60, | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.