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

test: e2e testing of NVM App flows #585

Merged
merged 9 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,32 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- feat: subscription by credits api [`f97aa61`](https://github.com/nevermined-io/sdk-js/commit/f97aa61c4328a7bc8ea1f14f584b3664876970db)
- chore: adapting nft 1155 to duration and transfer params [`a133315`](https://github.com/nevermined-io/sdk-js/commit/a133315c8b217cec7d41e6f863277dfe94fce98a)

#### [v2.0.0-rc2](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc1...v2.0.0-rc2)
#### [v2.0.0-rc2](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc10...v2.0.0-rc2)

> 26 July 2023

#### [v2.0.0-rc10](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc1...v2.0.0-rc10)

> 2 October 2023

- updating for contracts 3.5.0 [`#584`](https://github.com/nevermined-io/sdk-js/pull/584)
- Feat/node 18 [`#580`](https://github.com/nevermined-io/sdk-js/pull/580)
- Getting url from DDO when claiming NFT [`#582`](https://github.com/nevermined-io/sdk-js/pull/582)
- Fix/arbitrum fees [`#577`](https://github.com/nevermined-io/sdk-js/pull/577)
- Making Curve & Aave contracts optional [`#576`](https://github.com/nevermined-io/sdk-js/pull/576)
- Allowing to update files and services private stuff (SDKv1) [`#575`](https://github.com/nevermined-io/sdk-js/pull/575)
- fix: allowing to update files and services private metadata [`#574`](https://github.com/nevermined-io/sdk-js/pull/574)
- Allow off-chain register and resolve methods [`#573`](https://github.com/nevermined-io/sdk-js/pull/573)
- chore(deps): bump whatwg-url from 7.1.0 to 13.0.0 [`#527`](https://github.com/nevermined-io/sdk-js/pull/527)
- test: validating downloads by owner without access service [`#570`](https://github.com/nevermined-io/sdk-js/pull/570)
- Adapting to contracts v3.3.x [`#566`](https://github.com/nevermined-io/sdk-js/pull/566)
- E2E integration with Credit Subscriptions [`#563`](https://github.com/nevermined-io/sdk-js/pull/563)
- Feat/update mocha [`#564`](https://github.com/nevermined-io/sdk-js/pull/564)
- feat: reduce number of calls to chainId [`#560`](https://github.com/nevermined-io/sdk-js/pull/560)
- Support of assets with multiple services of the same type [`#555`](https://github.com/nevermined-io/sdk-js/pull/555)
- feat: make keeper network info static [`89511f1`](https://github.com/nevermined-io/sdk-js/commit/89511f11140398c146246a19438e958938b83376)
- fix: bring back network info getters [`1ef0547`](https://github.com/nevermined-io/sdk-js/commit/1ef05470e53cbe91fcba5aa6e951bbd10b60decc)
- chore: coming back to original attribute name [`941f96f`](https://github.com/nevermined-io/sdk-js/commit/941f96f485fee18398fe7e1517e8a43e85361754)
- test: e2e tests for credit subscriptions [`5070f31`](https://github.com/nevermined-io/sdk-js/commit/5070f319baaa7fa361e103c6e1a4ffac2548012f)
- fix: resolving integration problems [`87d7beb`](https://github.com/nevermined-io/sdk-js/commit/87d7beb3eb3897bcf7b5babb510d118f05d36c73)
- test: e2e testing of NVM App flows [`886f0ae`](https://github.com/nevermined-io/sdk-js/commit/886f0ae27dab2dc6b1205f6b35c5861a5efaf9e2)

#### [v2.0.0-rc1](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc0...v2.0.0-rc1)

Expand Down
2 changes: 1 addition & 1 deletion integration/nevermined/Assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ describe('Assets', () => {
})

it('should be able to download the updated files', async () => {
const folder = fs.mkdirSync('/tmp/sdk-js/updated-files', { recursive: true })
const folder = '/tmp/sdk-js/updated-files'

const path = (await nevermined.assets.download(ddo.id, publisher, folder, -1)) as string
assert.include(path, folder, 'The storage path is not correct.')
Expand Down
2 changes: 1 addition & 1 deletion integration/nevermined/Credits.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('Credit Subscriptions using NFT ERC-1155 End-to-End', () => {

it('should grant Nevermined the operator role', async () => {
assert.isTrue(
await nevermined.nfts1155.isOperator(
await nevermined.nfts1155.isOperatorOfDID(
subscriptionDDO.id,
nevermined.keeper.conditions.transferNftCondition.address,
),
Expand Down
3 changes: 1 addition & 2 deletions integration/nevermined/CreditsWithDuration.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ describe('Credit and Duration Subscriptions with Multiple services using NFT ERC

it('should grant Nevermined the operator role', async () => {
assert.isTrue(
await nevermined.nfts1155.isOperator(
await nevermined.nfts1155.isOperatorOfDID(
subscriptionDDO.id,
nevermined.keeper.conditions.transferNftCondition.address,
),
Expand Down Expand Up @@ -341,7 +341,6 @@ describe('Credit and Duration Subscriptions with Multiple services using NFT ERC
assert.isTrue(balanceAfter === subscriptionCredits1 - accessCostInCredits1)
})

// TODO: Enable this test when the TransferNFTCondition allow minting NFT-1155 with duration
it('After the credits expire the user can not get access', async () => {
await mineBlocks(nevermined, subscriber, subscriptionDuration1 + 1)

Expand Down
2 changes: 1 addition & 1 deletion integration/nevermined/NFT1155Api.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function makeTest(isCustom) {

it('should give Nevermined the operator role', async () => {
assert.isTrue(
await nevermined.nfts1155.isOperator(
await nevermined.nfts1155.isOperatorOfDID(
ddo.id,
nevermined.keeper.conditions.transferNftCondition.address,
),
Expand Down
2 changes: 1 addition & 1 deletion integration/nevermined/NFT721Api.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('NFTs721 Api End-to-End', () => {

it('should give operator role to Nevermined', async () => {
assert.isTrue(
await nevermined.nfts721.isOperator(
await nevermined.nfts721.isOperatorOfDID(
ddo.id,
nevermined.keeper.conditions.transferNft721Condition.address,
),
Expand Down
Loading
Loading