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:
parent
b320e31858
commit
1c0f009d3e
@ -8,7 +8,6 @@ addons:
|
||||
packages:
|
||||
# for Cypress
|
||||
- libgconf-2-4
|
||||
chrome: stable
|
||||
|
||||
env:
|
||||
global:
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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(
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
})
|
||||
})
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user