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

load wallet via support file for all tests, more Travis tweaks

This commit is contained in:
Matthias Kretschmann 2019-06-26 11:52:28 +02:00
parent b320e31858
commit 1c0f009d3e
Signed by: m
GPG Key ID: 606EEEF3C479A91F
7 changed files with 15 additions and 50 deletions

View File

@ -8,7 +8,6 @@ addons:
packages:
# for Cypress
- libgconf-2-4
chrome: stable
env:
global:

View File

@ -1,18 +1,6 @@
/// <reference types="Cypress" />
import Web3 from 'web3'
import HDWalletProvider from 'truffle-hdwallet-provider'
context('Consume', () => {
before(() => {
cy.on('window:before:load', win => {
const provider = new HDWalletProvider(
Cypress.env('SEEDPHRASE'),
Cypress.env('NODE_URI')
)
win.web3 = new Web3(provider)
win.ethereum = win.web3
})
cy.visit(Cypress.env('CONSUME_ASSET'))
// Wait for end of loading

View File

@ -1,18 +1,6 @@
/// <reference types="Cypress" />
import Web3 from 'web3'
import HDWalletProvider from 'truffle-hdwallet-provider'
context('Faucet', () => {
before(() => {
cy.on('window:before:load', win => {
const provider = new HDWalletProvider(
Cypress.env('SEEDPHRASE'),
Cypress.env('NODE_URI')
)
win.web3 = new Web3(provider)
win.ethereum = win.web3
})
cy.visit('/faucet')
// Wait for end of loading
cy.get('button', { timeout: 60000 }).should('have.length', 1)

View File

@ -1,18 +1,6 @@
/// <reference types="Cypress" />
import Web3 from 'web3'
import HDWalletProvider from 'truffle-hdwallet-provider'
context('Publish', () => {
before(() => {
cy.on('window:before:load', win => {
const provider = new HDWalletProvider(
Cypress.env('SEEDPHRASE'),
Cypress.env('NODE_URI')
)
win.web3 = new Web3(provider)
win.ethereum = win.web3
})
cy.visit('/publish')
cy.get('article>div', { timeout: 60000 }).should(

View File

@ -1,18 +1,6 @@
/// <reference types="Cypress" />
import Web3 from 'web3'
import HDWalletProvider from 'truffle-hdwallet-provider'
context('Search', () => {
before(() => {
cy.on('window:before:load', win => {
const provider = new HDWalletProvider(
Cypress.env('SEEDPHRASE'),
Cypress.env('NODE_URI')
)
win.web3 = new Web3(provider)
win.ethereum = win.web3
})
cy.visit('/')
// Wait for end of loading
cy.get('button', { timeout: 60000 }).should('have.length', 1)

View File

@ -0,0 +1,14 @@
/// <reference types="Cypress" />
import Web3 from 'web3'
import HDWalletProvider from 'truffle-hdwallet-provider'
before(function() {
cy.on('window:before:load', win => {
const provider = new HDWalletProvider(
Cypress.env('SEEDPHRASE'),
Cypress.env('NODE_URI')
)
win.web3 = new Web3(provider)
win.ethereum = win.web3
})
})

View File

@ -21,7 +21,7 @@
"lint": "npm run lint:js && npm run lint:css",
"release": "release-it --non-interactive",
"changelog": "auto-changelog -p",
"cypress:run": "cypress run --browser chrome",
"cypress:run": "cypress run",
"cypress:open": "cypress open"
},
"dependencies": {