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!
30 lines (25 loc) • 751 B
text/typescript
<% if (props.auth) { -%>
import { LoginPage } from './page-objects/login.po';
<% } -%>
import { AppSharedPage } from './page-objects/app-shared.po';
import { HomePage } from './page-objects/home.po';
describe('when the app loads', () => {
<% if (props.auth) { -%>
const login = new LoginPage();
<% } -%>
const app = new AppSharedPage();
const home = new HomePage();
before(() => {
app.navigateAndSetLanguage();
});
<% if (props.auth) { -%>
it('should display the login page and log in', () => {
cy.url().should('include', login.url);
login.login();
});
<% } -%>
it('should display the home page and say hello', () => {
cy.url().should('include', home.url);
home.welcomeText.contains('Hello world !');
});
});