improve bisq tests
This commit is contained in:
@@ -10,32 +10,41 @@ describe('Bisq', () => {
|
|||||||
cy.intercept('/bisq/api/txs/*/*').as('txs');
|
cy.intercept('/bisq/api/txs/*/*').as('txs');
|
||||||
cy.intercept('/bisq/api/blocks/*/*').as('blocks');
|
cy.intercept('/bisq/api/blocks/*/*').as('blocks');
|
||||||
cy.intercept('/bisq/api/stats').as('stats');
|
cy.intercept('/bisq/api/stats').as('stats');
|
||||||
});
|
|
||||||
it('loads the dashboard', () => {
|
|
||||||
cy.visit('/bisq');
|
|
||||||
|
|
||||||
cy.wait('@socket');
|
Cypress.Commands.add('waitForDashboard', (label) => {
|
||||||
cy.wait('@hloc');
|
cy.wait('@socket');
|
||||||
cy.wait('@ticker');
|
cy.wait('@hloc');
|
||||||
cy.wait('@markets');
|
cy.wait('@ticker');
|
||||||
cy.wait('@7d');
|
cy.wait('@markets');
|
||||||
cy.wait('@trades');
|
cy.wait('@7d');
|
||||||
|
cy.wait('@trades');
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
it('loads the dashboard', () => {
|
||||||
|
cy.visit('/bisq');
|
||||||
|
cy.waitForDashboard();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('loads the transactions screen', () => {
|
it('loads the transactions screen', () => {
|
||||||
cy.visit('/bisq');
|
cy.visit('/bisq');
|
||||||
|
cy.waitForDashboard();
|
||||||
cy.get('li:nth-of-type(2) > a').click().then(() => {
|
cy.get('li:nth-of-type(2) > a').click().then(() => {
|
||||||
cy.wait('@txs');
|
cy.get('.table > tr').should('have.length', 50);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('loads the blocks screen', () => {
|
it('loads the blocks screen', () => {
|
||||||
cy.visit('/bisq');
|
cy.visit('/bisq');
|
||||||
|
cy.waitForDashboard();
|
||||||
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
||||||
cy.wait('@blocks');
|
cy.wait('@blocks');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('loads the stats screen', () => {
|
it('loads the stats screen', () => {
|
||||||
cy.visit('/bisq');
|
cy.visit('/bisq');
|
||||||
|
cy.waitForDashboard();
|
||||||
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
||||||
cy.wait('@stats');
|
cy.wait('@stats');
|
||||||
});
|
});
|
||||||
@@ -43,8 +52,11 @@ describe('Bisq', () => {
|
|||||||
|
|
||||||
it('loads the api screen', () => {
|
it('loads the api screen', () => {
|
||||||
cy.visit('/bisq');
|
cy.visit('/bisq');
|
||||||
|
cy.waitForDashboard();
|
||||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||||
|
cy.get('.card').should('have.length.at.least', 1);
|
||||||
|
cy.get('.card').first().click();
|
||||||
|
cy.get('.card-body');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user