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

(WIP) feat(PT-3508): fix e2e tests #521

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ scripts
# packages
packages
!packages/transaction-backend
packages/transaction-backend/node_modules
packages/transaction-backend/node_modules
packages/e2e-tests/allure-results
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
**/esm
**/docs
packages/sdk/example
packages/e2e-tests/allure-results
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ storybook-static
yarn-error.log
lerna-debug.log
.env
packages/e2e-tests/allure-results
6 changes: 3 additions & 3 deletions packages/connectors/connector-beacon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -30,5 +27,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-fcl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -29,5 +26,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-fortmatic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -29,5 +26,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down Expand Up @@ -38,5 +35,8 @@
"peerDependencies": {
"rxjs": ">= 6.6.7 < 8.0.0",
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-iframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -29,5 +26,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-immutablex-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -31,5 +28,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-mattel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand Down Expand Up @@ -34,5 +31,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-mew/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -31,5 +28,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-nfid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"license": "ISC",
"main": "build/index.js",
"types": "build/index.d.ts",
"publishConfig": {
"access": "public"
},
"files": [
"build"
],
Expand All @@ -31,5 +28,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-phantom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -30,5 +27,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-portis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -29,5 +26,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-solflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -31,5 +28,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-torus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -31,5 +28,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-walletconnect-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -30,5 +27,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-walletconnect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -29,5 +26,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector-walletlink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -29,5 +26,8 @@
},
"peerDependencies": {
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
6 changes: 3 additions & 3 deletions packages/connectors/connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.13.50-beta.1",
"homepage": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
Expand All @@ -32,5 +29,8 @@
"peerDependencies": {
"rxjs": ">= 6.6.7 < 8.0.0",
"tslib": "^2.3.1"
},
"publishConfig": {
"access": "public"
}
}
2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rarible/sdk-e2e-tests",
"version": "0.13.50-beta.1",
"private": true,
"homepage": "",
"license": "ISC",
"private": true,
"scripts": {
"test": "echo run e2e-test to run e2e-tests",
"e2e-tests": "jest --runInBand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function getActivitiesByItem(sdk: IRaribleSdk, itemId: string,
})
expect(activities).not.toBe(null)
if (typeof shouldPresent !== "undefined") {
Logger.log(activities.activities)
Logger.log(activities.activities)
expect(activities.activities.map(a => a["@type"]).sort()).toEqual(shouldPresent.sort())
}
return activities
Expand Down
4 changes: 4 additions & 0 deletions packages/e2e-tests/tests/common/api-helpers/item-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,7 @@ export async function verifyItemsContainsItem(items: Items, itemId: ItemId): Pro
const ids = items.items.map(c => c.id)
expect(ids).toContain(itemId)
}

export function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms))
}
22 changes: 22 additions & 0 deletions packages/e2e-tests/tests/common/config/settings-factory.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { CreateCollectionRequestSimplified } from "@rarible/sdk/build/types/nft/deploy/simplified"
import { Blockchain } from "@rarible/api-client"

export const ERC_721_REQUEST = {
blockchain: Blockchain.ETHEREUM,
type: "ERC721",
name: "erc721",
symbol: "rari",
baseURI: "https://ipfs.rarible.com",
contractURI: "https://ipfs.rarible.com",
isPublic: true,
} as CreateCollectionRequestSimplified

export const ERC_1155_REQUEST = {
blockchain: Blockchain.ETHEREUM,
type: "ERC1155",
name: "name",
symbol: "RARI",
baseURI: "https://ipfs.rarible.com",
contractURI: "https://ipfs.rarible.com",
isPublic: true,
} as CreateCollectionRequestSimplified
Loading