mempool/frontend/cypress/integration/liquid/liquid.spec.ts

82 lines
2.4 KiB
TypeScript
Raw Normal View History

describe('Liquid', () => {
beforeEach(() => {
2021-06-07 21:48:27 +02:00
// TODO: Fix ng serve to deliver these files
cy.fixture('assets.minimal').then((json) => {
2021-06-07 21:48:27 +02:00
cy.intercept('/resources/assets.minimal.json', json);
});
cy.fixture('assets').then((json) => {
2021-06-07 21:48:27 +02:00
cy.intercept('/resources/assets.json', json);
});
});
it('loads the dashboard', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid');
});
it('loads the blocks page', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid/blocks');
});
it('loads a specific block page', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid/blocks');
});
it('loads the graphs page', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid/graphs');
});
it('loads the tv page - desktop', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid');
cy.get('li:nth-of-type(3) > a').click().then(() => {
2021-06-07 21:48:27 +02:00
cy.wait(1000);
});
});
it('loads the graphs page - mobile', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid');
cy.get('li:nth-of-type(3) > a').click().then(() => {
2021-06-07 21:48:27 +02:00
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', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
2021-06-07 21:48:27 +02:00
cy.get('table tr').should('have.length', 5);
});
});
it('allows searching assets', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
2021-06-07 21:48:27 +02:00
cy.get('table tr').should('have.length', 1);
});
});
});
it('shows a specific asset ID', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
2021-06-07 21:48:27 +02:00
cy.get('table tr td:nth-of-type(4) a').click();
});
});
});
it('shows a specific asset issuance TX', () => {
2021-06-07 21:48:27 +02:00
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
2021-06-07 21:48:27 +02:00
cy.get('table tr td:nth-of-type(5) a').click();
});
});
});
});
});