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
This commit is contained in:
committed by
GitHub
parent
57b6f2f612
commit
5b4b5c9bb0
81
frontend/cypress/integration/liquid/liquid.spec.ts
Normal file
81
frontend/cypress/integration/liquid/liquid.spec.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
describe('Liquid', () => {
|
||||
beforeEach(() => {
|
||||
//TODO: Fix ng serve to deliver these files
|
||||
cy.fixture('assets.minimal').then((json) => {
|
||||
cy.intercept('/resources/assets.minimal.json', json)
|
||||
})
|
||||
|
||||
cy.fixture('assets').then((json) => {
|
||||
cy.intercept('/resources/assets.json', json)
|
||||
})
|
||||
})
|
||||
|
||||
it('loads the dashboard', () => {
|
||||
cy.visit('/liquid')
|
||||
})
|
||||
|
||||
it('loads the blocks page', () => {
|
||||
cy.visit('/liquid/blocks')
|
||||
})
|
||||
|
||||
it('loads a specific block page', () => {
|
||||
cy.visit('/liquid/blocks')
|
||||
})
|
||||
|
||||
it('loads the graphs page', () => {
|
||||
cy.visit('/liquid/graphs')
|
||||
})
|
||||
|
||||
it('loads the tv page - desktop', () => {
|
||||
cy.visit('/liquid')
|
||||
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
||||
cy.wait(1000)
|
||||
})
|
||||
})
|
||||
|
||||
it('loads the graphs page - mobile', () => {
|
||||
cy.visit('/liquid')
|
||||
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
||||
cy.viewport('iphone-6')
|
||||
cy.wait(1000)
|
||||
//TODO: Should we really support TV Mode in Mobile for Bisq?
|
||||
//cy.get('.tv-only').should('be.visible')
|
||||
})
|
||||
})
|
||||
|
||||
describe('assets', () => {
|
||||
it('shows the assets screen', () => {
|
||||
cy.visit('/liquid')
|
||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||
cy.get('table tr').should('have.length', 5)
|
||||
})
|
||||
})
|
||||
|
||||
it('allows searching assets', () => {
|
||||
cy.visit('/liquid')
|
||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||
cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
|
||||
cy.get('table tr').should('have.length', 1)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('shows a specific asset ID', () => {
|
||||
cy.visit('/liquid')
|
||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
|
||||
cy.get('table tr td:nth-of-type(4) a').click()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('shows a specific asset issuance TX', () => {
|
||||
cy.visit('/liquid')
|
||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
|
||||
cy.get('table tr td:nth-of-type(5) a').click()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user