generator-ngx-rocket
Version:
Extensible Angular 13+ enterprise-grade project generator based on angular-cli with best practices from the community. Includes PWA/Cordova/Electron support, coding guides and more!
20 lines (17 loc) • 394 B
text/typescript
/*
* Use the Page Object pattern to define the page under test.
* See docs/coding-guide/e2e-tests.md for more info.
*/
export class AppSharedPage {
async navigateAndSetLanguage() {
// Forces default language
this.visit();
cy.window()
.then(window => {
window.eval(`localStorage.setItem('language', 'en-US')`);
});
}
visit() {
cy.visit('/');
}
}