Fix login cypress errors

This commit is contained in:
Matthias 2022-11-27 19:38:00 +01:00
parent 9d68db7b56
commit 9cfaf29275
2 changed files with 6 additions and 2 deletions

View File

@ -31,12 +31,13 @@ describe('Login', () => {
cy.visit('/trade');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/login');
expect(loc.search).to.eq('?redirect=%2Ftrade');
expect(loc.search).to.eq('?redirect=/trade');
});
});
it('Test Login', () => {
cy.visit('/login');
cy.get('.card-header').contains('Freqtrade bot Login');
cy.get('input[id=name-input]').type('TestBot');
cy.get('input[id=username-input]').type('Freqtrader');
cy.get('input[id=password-input]').type('SuperDuperBot');
@ -93,6 +94,7 @@ describe('Login', () => {
it('Test Login failed - wrong api url', () => {
cy.visit('/login');
cy.get('.card-header').contains('Freqtrade bot Login');
cy.get('input[id=name-input]').type('TestBot');
cy.get('input[id=username-input]').type('Freqtrader');
cy.get('input[id=password-input]').type('SuperDuperBot');
@ -123,6 +125,7 @@ describe('Login', () => {
it('Test Login failed - wrong password url', () => {
cy.visit('/login');
cy.get('.card-header').contains('Freqtrade bot Login');
cy.get('input[id=name-input]').type('TestBot');
cy.get('input[id=username-input]').type('Freqtrader');
cy.get('input[id=password-input]').type('SuperDuperBot');

View File

@ -114,7 +114,7 @@
</li>
<li v-else>
<!-- should open Modal window! -->
<LoginModal />
<LoginModal v-if="route?.path !== '/login'" />
</li>
</b-navbar-nav>
</b-collapse>
@ -235,6 +235,7 @@ export default defineComponent({
layoutStore,
botStore,
settingsStore,
route,
};
},
});