mempool/frontend/cypress/integration/bisq/bisq.spec.ts
Felipe Knorr Kuhn 1bd0c40c15
New e2e test suite (#555)
* add @cypress/schematic as a dev dependency

* replace protractor with cypress

* remove the boilerplate test

* add the cypress-wait-until helper library

* add cypress-wait-until to all tests

* add signet to stg proxy config

* add proxy config for production

* add environment configs to angular.json

* update e2e target to use the production proxy

* update serve and start scripts to use the new environment config

* add the concurrently lib to the dev dependencies

* fix missing import

* ignore videos and screenshots saved by the e2e suite

* add fixtures for the tests

* update cypress npm scripts to use concurrently

* add some e2e tests
2021-06-07 10:36:41 -04:00

52 lines
1.5 KiB
TypeScript

describe('Bisq', () => {
beforeEach(() => {
cy.intercept('/sockjs-node/info*').as('socket')
cy.intercept('/bisq/api/markets/hloc?market=btc_usd&interval=day').as('hloc')
cy.intercept('/bisq/api/markets/ticker').as('ticker')
cy.intercept('/bisq/api/markets/markets').as('markets')
cy.intercept('/bisq/api/markets/volumes/7d').as('7d')
cy.intercept('/bisq/api/markets/trades?market=all').as('trades')
cy.intercept('/bisq/api/txs/*/*').as('txs')
cy.intercept('/bisq/api/blocks/*/*').as('blocks')
cy.intercept('/bisq/api/stats').as('stats')
})
it('loads the dashboard', () => {
cy.visit('/bisq')
cy.wait('@socket')
cy.wait('@hloc')
cy.wait('@ticker')
cy.wait('@markets')
cy.wait('@7d')
cy.wait('@trades')
})
it('loads the transactions screen', () => {
cy.visit('/bisq')
cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.wait('@txs')
})
})
it('loads the blocks screen', () => {
cy.visit('/bisq')
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait('@blocks')
})
})
it('loads the stats screen', () => {
cy.visit('/bisq')
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.wait('@stats')
})
})
it('loads the api screen', () => {
cy.visit('/bisq')
cy.get('li:nth-of-type(5) > a').click().then(() => {
})
})
})