Affects Version/s: None
Fix Version/s: 0.7.1
As of recent, there have been multiple unpredictable Cypress failures in Travis. While looking into these failures, I noticed a few anti-patterns we have in place that could definitely cause these failures:
1) We currently run `ng serve --aot` as a test server for Cypress. We are running this command in parallel with the command that starts Cypress. As you could imagine, this presents a race condition where Cypress could start running before the server starts. Instead of using Angular CLI to build and serve our project for Cypress to test against, we should first build the project, then serve the built project with the Express server we have in place already. Serving an already built project with Express is so fast we should be able to confidently run it in parallel with the Cypress test script and not worry about any race conditions failing our tests. This is the standard practice that has been shown in other Angular/Cypress test examples.
2) Per the Cypress team's best practice recommendations, we should remove the command to logout in the afterEach hook since it's unnecessary for our needs and may be the cause for our failures regarding the logout link.
3) Again per the Cypress team's best practices, we should set a baseUrl in our cypress.json config file.