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