-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f9fa0d
commit d85f335
Showing
29 changed files
with
2,927 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
cypress/integration/routed-app-guards-resolve-route/app.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* global describe cy before it */ | ||
describe('Guards - resolveRoute', () => { | ||
before(() => { | ||
cy.visit('routed-app-guards-resolve-route') | ||
}) | ||
|
||
it('has rendered the home page', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to the home page!') | ||
}) | ||
|
||
it('home page navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Home') | ||
}) | ||
|
||
describe('route to page one', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(2)').click() | ||
}) | ||
|
||
it('has rendered page one', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to page one!') | ||
}) | ||
|
||
it('page one navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Page one') | ||
}) | ||
}) | ||
|
||
describe('route to cancelled page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(3)').click() | ||
}) | ||
|
||
it('has remained on page one', () => { | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/test/e2e/routed-app-guards-resolve-route/one') | ||
}) | ||
}) | ||
}) | ||
|
||
describe('route to error page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(4)').click() | ||
}) | ||
|
||
it('has rendered an error', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'An error occurred: Action error') | ||
}) | ||
}) | ||
|
||
describe('route to page two', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(5)').click() | ||
}) | ||
|
||
it('has redirected to page one', () => { | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/test/e2e/routed-app-guards-resolve-route/one') | ||
}) | ||
}) | ||
|
||
it('has rendered page one', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to page one!') | ||
}) | ||
|
||
it('page one navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Page one') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* global describe cy before it */ | ||
describe('Guards', () => { | ||
before(() => { | ||
cy.visit('routed-app-guards') | ||
}) | ||
|
||
it('has rendered the home page', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to the home page!') | ||
}) | ||
|
||
it('home page navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Home') | ||
}) | ||
|
||
describe('route to page one', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(2)').click() | ||
}) | ||
|
||
it('has rendered page one', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to page one!') | ||
}) | ||
|
||
it('page one navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Page one') | ||
}) | ||
}) | ||
|
||
describe('route to cancelled page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(3)').click() | ||
}) | ||
|
||
it('has remained on page one', () => { | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/test/e2e/routed-app-guards/one') | ||
}) | ||
}) | ||
}) | ||
|
||
describe('route to error page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(4)').click() | ||
}) | ||
|
||
it('has rendered an error', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'An error occurred: Action error') | ||
}) | ||
}) | ||
}) |
77 changes: 77 additions & 0 deletions
77
cypress/integration/routed-app-hash-guards-resolve-route/app.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* global describe cy before it */ | ||
describe('Hash guards - resolveRoute', () => { | ||
before(() => { | ||
cy.visit('routed-app-hash-guards-resolve-route') | ||
}) | ||
|
||
it('has rendered the home page', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to the home page!') | ||
}) | ||
|
||
it('home page navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Home') | ||
}) | ||
|
||
describe('route to page one', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(2)').click() | ||
}) | ||
|
||
it('has rendered page one', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to page one!') | ||
}) | ||
|
||
it('page one navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Page one') | ||
}) | ||
}) | ||
|
||
describe('route to cancelled page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(3)').click() | ||
}) | ||
|
||
it('has remained on page one', () => { | ||
cy.location().should((loc) => { | ||
expect(loc.hash).to.eq('#/one') | ||
}) | ||
}) | ||
}) | ||
|
||
describe('route to error page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(4)').click() | ||
}) | ||
|
||
it('has rendered an error', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'An error occurred: Action error') | ||
}) | ||
}) | ||
|
||
describe('route to page two', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(5)').click() | ||
}) | ||
|
||
it('has redirected to page one', () => { | ||
cy.location().should((loc) => { | ||
expect(loc.hash).to.eq('#/one') | ||
}) | ||
}) | ||
|
||
it('has rendered page one', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to page one!') | ||
}) | ||
|
||
it('page one navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Page one') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* global describe cy before it */ | ||
describe('Hash Ggards', () => { | ||
before(() => { | ||
cy.visit('routed-app-hash-guards') | ||
}) | ||
|
||
it('has rendered the home page', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to the home page!') | ||
}) | ||
|
||
it('home page navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Home') | ||
}) | ||
|
||
describe('route to page one', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(2)').click() | ||
}) | ||
|
||
it('has rendered page one', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'Welcome to page one!') | ||
}) | ||
|
||
it('page one navigation is active', () => { | ||
cy.get('button.active') | ||
.should('have.text', 'Page one') | ||
}) | ||
}) | ||
|
||
describe('route to cancelled page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(3)').click() | ||
}) | ||
|
||
it('has remained on page one', () => { | ||
cy.location().should((loc) => { | ||
expect(loc.hash).to.eq('#/one') | ||
}) | ||
}) | ||
}) | ||
|
||
describe('route to error page', () => { | ||
before(() => { | ||
cy.get('button:nth-of-type(4)').click() | ||
}) | ||
|
||
it('has rendered an error', () => { | ||
cy.get('#router-outlet') | ||
.should('contain.text', 'An error occurred: Action error') | ||
}) | ||
}) | ||
}) |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.