difftreelog
Refactor the rest of nest.tests
in: master
7 files changed
tests/src/nesting/nest.test.tsdiffbeforeafterbothno changes
tests/src/sub/nesting/admin.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import {expect, itSub, Pallets, usingPlaygrounds} from '../../util';18import {expect, itSub, usingPlaygrounds} from '../../util';191920describe('Collection admin', () => {20describe('Collection admin', () => {21 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/sub/nesting/e2e.test.tsdiffbeforeafterboth102 ]).and.has.length(1);102 ]).and.has.length(1);103 });103 });104105 /// TODO review this test106 itSub('Performs the full suite: bundles a token, transfers, and unnests', async ({helper}) => {107 const collection = await helper.nft.mintCollection(alice, {permissions: {nesting: {tokenOwner: true}}});108 const targetToken = await collection.mintToken(alice);109110 // Create an immediately nested token111 const nestedToken = await collection.mintToken(alice, targetToken.nestingAccount());112 expect(await nestedToken.getTopmostOwner()).to.be.deep.equal({Substrate: alice.address});113 expect(await nestedToken.getOwner()).to.be.deep.equal(targetToken.nestingAccount().toLowerCase());114115 // Create a token to be nested116 const newToken = await collection.mintToken(alice);117118 // Nest119 await newToken.nest(alice, targetToken);120 expect(await newToken.getTopmostOwner()).to.be.deep.equal({Substrate: alice.address});121 expect(await newToken.getOwner()).to.be.deep.equal(targetToken.nestingAccount().toLowerCase());122123 // Move bundle to different user124 await targetToken.transfer(alice, {Substrate: bob.address});125 expect(await nestedToken.getTopmostOwner()).to.be.deep.equal({Substrate: bob.address});126 expect(await nestedToken.getOwner()).to.be.deep.equal(targetToken.nestingAccount().toLowerCase());127 expect(await newToken.getTopmostOwner()).to.be.deep.equal({Substrate: bob.address});128 expect(await newToken.getOwner()).to.be.deep.equal(targetToken.nestingAccount().toLowerCase());129130 // Unnest131 await newToken.unnest(bob, targetToken, {Substrate: bob.address});132 expect(await newToken.getTopmostOwner()).to.be.deep.equal({Substrate: bob.address});133 expect(await newToken.getOwner()).to.be.deep.equal({Substrate: bob.address});134 });104});135});105136tests/src/sub/nesting/negative.test.tsdiffbeforeafterbothno changes
tests/src/sub/nesting/nesting.negative.test.tsdiffbeforeafterbothno changes
tests/src/sub/nesting/refungible.test.tsdiffbeforeafterbothno changes
tests/src/sub/nesting/unnesting.negative.test.tsdiffbeforeafterbothno changes