mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Add additional e2e tests
This commit is contained in:
parent
a9983fbc3d
commit
cdaac965b1
|
@ -5,7 +5,28 @@ describe('Login', () => {
|
|||
cy.get('li').should('contain', 'No bot selected');
|
||||
cy.get('button').contains('Login').click();
|
||||
cy.get('.modal-title').contains('Login to your bot');
|
||||
// Check for prefill
|
||||
// Test prefilled URL
|
||||
cy.get('input[id=url-input]').should('have.value', 'http://localhost:8080');
|
||||
cy.get('#name-input').should('exist');
|
||||
cy.get('#username-input').should('exist');
|
||||
cy.get('#password-input').should('exist');
|
||||
});
|
||||
it('Explicit login page', () => {
|
||||
cy.visit('/login');
|
||||
cy.get('button').should('contain', 'Login');
|
||||
cy.get('li').should('contain', 'No bot selected');
|
||||
cy.get('.card-header').contains('Freqtrade bot Login');
|
||||
// Test prefilled URL
|
||||
cy.get('input[id=url-input]').should('have.value', 'http://localhost:8080');
|
||||
cy.get('#name-input').should('exist');
|
||||
cy.get('#username-input').should('exist');
|
||||
cy.get('#password-input').should('exist');
|
||||
});
|
||||
it('Redirect when not logged in', () => {
|
||||
cy.visit('/trade');
|
||||
cy.location().should((loc) => {
|
||||
expect(loc.pathname).to.eq('/login');
|
||||
expect(loc.search).to.eq('?redirect=%2Ftrade');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user