mirror of
https://github.com/mempool/mempool.git
synced 2025-01-01 03:04:27 +01:00
1bd0c40c15
* 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
82 lines
2.4 KiB
TypeScript
82 lines
2.4 KiB
TypeScript
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()
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|