The storybook generator we invoked earlier also generated some e2e tests. Let's try them out!
- Take advantage of the e2e tests Nx generated earlier to test your app
-
Our previous command generated a new
apps/store-ui-shared-e2e
folder. Let's run them:nx e2e store-ui-shared-e2e
- The tests should pass!
- The tests should pass!
-
Open
apps/store-ui-shared-e2e/src/integration/header/header.component.spec.ts
and give the title a value:cy.visit( '/iframe.html?id=headercomponent--primary&args=title:BoardGameHoard;' )
-
Now add a test to check if it contains that value
it('should show the title', () => { cy.get('bg-hoard-header').contains('BoardGameHoard'); });
-
Re-run the tests
-
Inspect what changed from the last time you committed, then commit your changes