Add test for Performance view

This commit is contained in:
Matthias 2023-11-11 18:22:01 +01:00
parent 28128519aa
commit 19b77e915b
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,6 @@ function tradeMocks() {
cy.intercept('GET', '**/api/v1/whitelist', { fixture: 'whitelist.json' }).as('Whitelist');
cy.intercept('GET', '**/api/v1/blacklist', { fixture: 'blacklist.json' }).as('Blacklist');
cy.intercept('GET', '**/api/v1/locks', { fixture: 'locks_empty.json' }).as('Locks');
cy.intercept('GET', '**/api/v1/performance', { fixture: 'performance.json' }).as('Performance');
}
describe('Chart', () => {
@ -27,7 +26,6 @@ describe('Chart', () => {
cy.wait('@Whitelist');
cy.wait('@Blacklist');
cy.wait('@Locks');
cy.wait('@Performance');
cy.wait('@PairCandles');
// Disable autorefresh
cy.get('input[title="AutoRefresh"]').click();

View File

@ -8,7 +8,6 @@ function tradeMocks() {
cy.intercept('GET', '**/api/v1/whitelist', { fixture: 'whitelist.json' }).as('Whitelist');
cy.intercept('GET', '**/api/v1/blacklist', { fixture: 'blacklist.json' }).as('Blacklist');
cy.intercept('GET', '**/api/v1/locks', { fixture: 'locks_empty.json' }).as('Locks');
cy.intercept('GET', '**/api/v1/performance', { fixture: 'performance.json' }).as('Performance');
// TODO: Daily mock is missing.
// cy.intercept('GET', '**/api/v1/daily', { fixture: 'performance.json' }).as('Performance');
}
@ -28,7 +27,6 @@ describe('Dashboard', () => {
cy.wait('@Whitelist');
cy.wait('@Blacklist');
cy.wait('@Locks');
cy.wait('@Performance');
cy.get('.drag-header').contains('Bot comparison').should('be.visible');
cy.get('.drag-header').contains('Daily Profit').should('be.visible');
cy.get('.drag-header').contains('Open Trades').should('be.visible');

View File

@ -30,13 +30,17 @@ describe('Trade', () => {
cy.wait('@Whitelist');
cy.wait('@Blacklist');
cy.wait('@Locks');
cy.wait('@Performance');
cy.get('.drag-header').contains('Multi Pane').should('be.visible');
cy.get('.drag-header').contains('Chart').should('be.visible');
cy.get('button').should('contain', 'BTC/USDT');
cy.get('button').should('contain', 'ETH/USDT').should('be.visible');
cy.get('button').contains('ETH/USDT').should('be.visible');
cy.get('button').contains('Performance').should('be.visible').click();
cy.wait('@Performance');
cy.get('th').contains('Profit USDT').should('be.visible');
// Test messageBox behavior
// No modal visible
cy.get('.modal-dialog > .modal-content > .modal-footer > .btn-secondary')