1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

Merge pull request #173 from oceanprotocol/feature/integration-test-switch

run tests against Aquarius & Brizo pacific test instances
This commit is contained in:
Matthias Kretschmann 2019-07-12 15:41:49 +02:00 committed by GitHub
commit a5919ff69d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 30 deletions

View File

@ -14,11 +14,11 @@ env:
global: global:
# run E2E tests against these values # run E2E tests against these values
- REACT_APP_NODE_URI="https://pacific.oceanprotocol.com" - REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
- REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com" - REACT_APP_AQUARIUS_URI="https://aquarius.test.oceanprotocol.com"
- REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com" - REACT_APP_BRIZO_URI="https://brizo.test.oceanprotocol.com"
- REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com" - REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
- REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com" - REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
- REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea" - REACT_APP_BRIZO_ADDRESS="0x0474ed05ba757dde575dfaaaa267d9e7f3643abc"
before_install: before_install:
- npm install -g npm - npm install -g npm
@ -32,8 +32,8 @@ script:
# executing `npm test` scripts individually here, so first one failing will exit the build # executing `npm test` scripts individually here, so first one failing will exit the build
- npm run lint || travis_terminate 1 - npm run lint || travis_terminate 1
- ./scripts/test.sh || travis_terminate 1 - ./scripts/test.sh || travis_terminate 1
- npm run test:e2e || travis_terminate 1
- ./scripts/coverage.sh - ./scripts/coverage.sh
- npm run test:e2e || travis_terminate 1
- ./scripts/build.sh - ./scripts/build.sh
notifications: notifications:

View File

@ -7,21 +7,30 @@
# Connect to Pacific # Connect to Pacific
# #
REACT_APP_NODE_URI="https://pacific.oceanprotocol.com" REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com"
REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com"
REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com" REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com" REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea" # Pacific Test instances
REACT_APP_AQUARIUS_URI="https://aquarius.test.oceanprotocol.com"
REACT_APP_BRIZO_URI="https://brizo.test.oceanprotocol.com"
REACT_APP_BRIZO_ADDRESS="0x0474ed05ba757dde575dfaaaa267d9e7f3643abc"
# Pacific Commons instances
# REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com"
# REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com"
# REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
# #
# Connect to Nile # Connect to Nile
# #
# REACT_APP_NODE_URI="https://nile.dev-ocean.com" # REACT_APP_NODE_URI="https://nile.dev-ocean.com"
# REACT_APP_AQUARIUS_URI="https://aquarius.nile.dev-ocean.com"
# REACT_APP_BRIZO_URI="https://brizo.nile.dev-ocean.com"
# REACT_APP_SECRET_STORE_URI="https://secret-store.nile.dev-ocean.com" # REACT_APP_SECRET_STORE_URI="https://secret-store.nile.dev-ocean.com"
# REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com" # REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
# REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972" # REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
# Nile Test instances
# REACT_APP_AQUARIUS_URI="https://aquarius.nile.dev-ocean.com"
# REACT_APP_BRIZO_URI="https://brizo.nile.dev-ocean.com"
# Nile Commons instances
# REACT_APP_AQUARIUS_URI="https://aquarius.marketplace.dev-ocean.com"
# REACT_APP_BRIZO_URI="https://brizo.marketplace.dev-ocean.com"
# #
# Connect to Duero # Connect to Duero
@ -33,16 +42,6 @@ REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
# REACT_APP_FAUCET_URI="https://faucet.duero.dev-ocean.com" # REACT_APP_FAUCET_URI="https://faucet.duero.dev-ocean.com"
# REACT_APP_BRIZO_ADDRESS="0x9d4ed58293f71122ad6a733c1603927a150735d0" # REACT_APP_BRIZO_ADDRESS="0x9d4ed58293f71122ad6a733c1603927a150735d0"
#
# Connect to Nile Commons instances
#
# REACT_APP_NODE_URI="https://nile.dev-ocean.com"
# REACT_APP_AQUARIUS_URI="https://aquarius.marketplace.dev-ocean.com"
# REACT_APP_BRIZO_URI="https://brizo.marketplace.dev-ocean.com"
# REACT_APP_SECRET_STORE_URI="https://secret-store.dev-ocean.com"
# REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
# REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
# #
# Connect to Spree (local with Barge) # Connect to Spree (local with Barge)
# #

View File

@ -3,6 +3,6 @@
"env": { "env": {
"NODE_URI": "https://pacific.oceanprotocol.com", "NODE_URI": "https://pacific.oceanprotocol.com",
"SEEDPHRASE": "taxi music thumb unique chat sand crew more leg another off lamp", "SEEDPHRASE": "taxi music thumb unique chat sand crew more leg another off lamp",
"CONSUME_ASSET": "did:op:8f0086cf21e84389ad69b3272c56bd0ddc12cd7d98db4e02b4075c481fc2d32d" "CONSUME_ASSET": "did:op:3fa4721ad643489bad77e0e52ecefe9b73166873faaf4661a02486b735eea0c8"
} }
} }

View File

@ -9,21 +9,18 @@ context('Consume', () => {
.should('have.length', 1) .should('have.length', 1)
}) })
beforeEach(() => {
cy.get('button[name="Download"]')
.first()
.as('button')
})
it('Download button is clickable when user is connected.', () => { it('Download button is clickable when user is connected.', () => {
cy.get('@button').should('not.be.disabled') cy.get('button[name="Download"]').should('not.be.disabled')
}) })
it('Consume asset and check if there is no error', () => { it('Consume asset and check if there is no error', () => {
// Click consume button // Click consume button
cy.get('@button').click() cy.get('button[name="Download"]').click()
// Wait consume process to end // Wait consume process to end
cy.get('@button', { timeout: 150000 }).should('contain', 'Get file') cy.get('button[name="Download"]', { timeout: 600000 }).should(
'contain',
'Get file'
)
// check if there is no error // check if there is no error
cy.get('article>div').should( cy.get('article>div').should(
'not.contain', 'not.contain',

View File

@ -11,7 +11,7 @@ context('Publish', () => {
it('Publish flow', () => { it('Publish flow', () => {
// Fill title // Fill title
cy.get('input#name').type('Title test') cy.get('input#name').type('Commons Integration Test')
// Open Add a file form // Open Add a file form
cy.get('button') cy.get('button')
.contains('+ Add a file') .contains('+ Add a file')