mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
Fixing tests with nft.owner and nft.creator
This commit is contained in:
parent
a40997f006
commit
1bf645541f
@ -125,8 +125,8 @@ describe('Dispenser tests', async () => {
|
||||
symbol,
|
||||
name,
|
||||
tokenUri,
|
||||
owner,
|
||||
creator,
|
||||
owner{id},
|
||||
creator{id},
|
||||
address,
|
||||
providerUrl,
|
||||
assetState,
|
||||
@ -153,8 +153,8 @@ describe('Dispenser tests', async () => {
|
||||
assert(nft.symbol === nftSymbol, 'incorrect value for: symbol')
|
||||
assert(nft.name === nftName, 'incorrect value for: name')
|
||||
assert(nft.tokenUri === tokenURI, 'incorrect value for: tokenUri')
|
||||
assert(nft.owner === publisher, 'incorrect value for: owner')
|
||||
assert(nft.creator === publisher, 'incorrect value for: creator')
|
||||
assert(nft.owner.id === publisher, 'incorrect value for: owner')
|
||||
assert(nft.creator.id === publisher, 'incorrect value for: creator')
|
||||
assert(nft.managerRole[0] === publisher, 'incorrect value for: managerRole')
|
||||
assert(
|
||||
nft.erc20DeployerRole[0] === factoryAddress,
|
||||
|
@ -138,8 +138,8 @@ describe('Fixed Rate Exchange tests', async () => {
|
||||
symbol,
|
||||
name,
|
||||
tokenUri,
|
||||
owner,
|
||||
creator,
|
||||
owner{id},
|
||||
creator{id},
|
||||
address,
|
||||
providerUrl,
|
||||
assetState,
|
||||
@ -166,8 +166,8 @@ describe('Fixed Rate Exchange tests', async () => {
|
||||
assert(nft.symbol === nftSymbol, 'incorrect value for: symbol')
|
||||
assert(nft.name === nftName, 'incorrect value for: name')
|
||||
assert(nft.tokenUri === tokenURI, 'incorrect value for: tokenUri')
|
||||
assert(nft.owner === publisher, 'incorrect value for: owner')
|
||||
assert(nft.creator === publisher, 'incorrect value for: creator')
|
||||
assert(nft.owner.id === publisher, 'incorrect value for: owner')
|
||||
assert(nft.creator.id === publisher, 'incorrect value for: creator')
|
||||
assert(nft.managerRole[0] === publisher, 'incorrect value for: managerRole')
|
||||
assert(
|
||||
nft.erc20DeployerRole[0] === factoryAddress,
|
||||
|
@ -130,8 +130,8 @@ describe('NFT tests', async () => {
|
||||
symbol,
|
||||
name,
|
||||
tokenUri,
|
||||
owner,
|
||||
creator,
|
||||
owner{id},
|
||||
creator{id},
|
||||
address,
|
||||
providerUrl,
|
||||
assetState,
|
||||
@ -157,8 +157,8 @@ describe('NFT tests', async () => {
|
||||
assert(nft.symbol === nftSymbol, 'incorrect value for: symbol')
|
||||
assert(nft.name === nftName, 'incorrect value for: name')
|
||||
assert(nft.tokenUri === tokenURI, 'incorrect value for: tokenUri')
|
||||
assert(nft.owner === publisher, 'incorrect value for: owner')
|
||||
assert(nft.creator === publisher, 'incorrect value for: creator')
|
||||
assert(nft.owner.id === publisher, 'incorrect value for: owner')
|
||||
assert(nft.creator.id === publisher, 'incorrect value for: creator')
|
||||
assert(nft.managerRole[0] === publisher, 'incorrect value for: managerRole')
|
||||
assert(
|
||||
nft.erc20DeployerRole[0] === factoryAddress,
|
||||
@ -219,8 +219,8 @@ describe('NFT tests', async () => {
|
||||
symbol,
|
||||
name,
|
||||
tokenUri,
|
||||
owner,
|
||||
creator,
|
||||
owner{id},
|
||||
creator{id},
|
||||
address,
|
||||
providerUrl,
|
||||
assetState,
|
||||
@ -247,8 +247,8 @@ describe('NFT tests', async () => {
|
||||
assert(updatedNft.symbol === nftSymbol, 'incorrect value for: symbol')
|
||||
assert(updatedNft.name === nftName, 'incorrect value for: name')
|
||||
assert(updatedNft.tokenUri === tokenURI, 'incorrect value for: tokenUri')
|
||||
assert(updatedNft.owner === publisher, 'incorrect value for: owner')
|
||||
assert(updatedNft.creator === publisher, 'incorrect value for: creator')
|
||||
assert(updatedNft.owner.id === publisher, 'incorrect value for: owner')
|
||||
assert(updatedNft.creator.id === publisher, 'incorrect value for: creator')
|
||||
assert(
|
||||
updatedNft.managerRole[0] === publisher,
|
||||
'incorrect value for: managerRole'
|
||||
|
@ -191,7 +191,7 @@ describe('Simple Publish & consume test', async () => {
|
||||
|
||||
const queryOriginalOwner = {
|
||||
query: `query {
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner}}`
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner{id}}}`
|
||||
}
|
||||
const initialResponse = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
@ -200,7 +200,7 @@ describe('Simple Publish & consume test', async () => {
|
||||
const initialResult = await initialResponse.json()
|
||||
// Checking original owner account has been set correctly
|
||||
assert(
|
||||
initialResult.data.nft.owner.toLowerCase() ===
|
||||
initialResult.data.nft.owner.id.toLowerCase() ===
|
||||
publisherAccount.toLowerCase()
|
||||
)
|
||||
|
||||
@ -235,14 +235,14 @@ describe('Simple Publish & consume test', async () => {
|
||||
await sleep(2000)
|
||||
const query2 = {
|
||||
query: `query {
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner, transferable}}`
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner{id}, transferable}}`
|
||||
}
|
||||
const response = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(query2)
|
||||
})
|
||||
const queryResult = await response.json()
|
||||
assert(queryResult.data.nft.owner === newOwnerAccount)
|
||||
assert(queryResult.data.nft.owner.id === newOwnerAccount)
|
||||
})
|
||||
|
||||
it('should save provider fees after startOrder is called', async () => {
|
||||
|
@ -112,13 +112,13 @@ describe('Tests coverage without provider/aquarius', async () => {
|
||||
await sleep(2000)
|
||||
const query2 = {
|
||||
query: `query {
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner, transferable}}`
|
||||
nft(id:"${graphNftToken}"){symbol,id,owner{id}, transferable}}`
|
||||
}
|
||||
const response = await fetch(subgraphUrl, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(query2)
|
||||
})
|
||||
const queryResult = await response.json()
|
||||
assert(queryResult.data.nft.owner === newOwnerAccount)
|
||||
assert(queryResult.data.nft.owner.id === newOwnerAccount)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user