mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
test: add case for navigation
This commit is contained in:
@@ -17,5 +17,12 @@ describe('App', () => {
|
|||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
|
|
||||||
cy.title().should('equal', 'StApps');
|
cy.title().should('equal', 'StApps');
|
||||||
})
|
});
|
||||||
|
|
||||||
|
it('should have a proper working navigation', () => {
|
||||||
|
cy.visit('/');
|
||||||
|
|
||||||
|
cy.contains('Settings').click();
|
||||||
|
cy.get('ion-title').contains('Einstellungen');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,5 +17,5 @@ describe('Settings Page', () => {
|
|||||||
cy.visit('/settings');
|
cy.visit('/settings');
|
||||||
|
|
||||||
cy.get('ion-title').contains('Einstellungen');
|
cy.get('ion-title').contains('Einstellungen');
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,4 +19,12 @@ Cypress.on('window:before:load', window => {
|
|||||||
// Fake that user is using its browser in german language
|
// Fake that user is using its browser in german language
|
||||||
Object.defineProperty(window.navigator, 'language', {value: 'de-DE'});
|
Object.defineProperty(window.navigator, 'language', {value: 'de-DE'});
|
||||||
Object.defineProperty(window.navigator, 'languages', [{value: 'de-DE'}]);
|
Object.defineProperty(window.navigator, 'languages', [{value: 'de-DE'}]);
|
||||||
|
|
||||||
|
// Fail tests on console error
|
||||||
|
cy.stub(window.console, 'error').callsFake(message => {
|
||||||
|
// log out to the terminal
|
||||||
|
cy.now('task', 'error', message);
|
||||||
|
// log to Command Log and fail the test
|
||||||
|
throw new Error(message);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user