-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Remove beta gate, deprecate MVP site (#565)
* Redirect all routes to beta pages or 404 * Remove beta banner from layout * Remove betaContext from app * Use redirects instead of rewrites, remove beta context use * Removing join beta from e2e tests * Update auth test * Update e2e tests * Remove test for canonical link tag
- Loading branch information
Suzanne Rozier
authored
Mar 23, 2022
1 parent
2e8b3ae
commit d0f180f
Showing
13 changed files
with
235 additions
and
393 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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,86 @@ | ||
import logging from '../plugins/logging' | ||
|
||
describe('Routes & navigation', () => { | ||
describe('logged in pages', () => { | ||
before(() => { | ||
cy.loginTestIDP() | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.preserveLoginCookies() | ||
}) | ||
|
||
it('can navigate to the home page', () => { | ||
cy.visit('/') | ||
cy.injectAxe() | ||
cy.contains('Welcome, BERNADETTE CAMPBELL') | ||
cy.contains('Welcome to the new Space Force Service Portal!') | ||
cy.contains('My Space') | ||
|
||
// Check a11y | ||
cy.checkA11y(null, null, logging, { skipFailures: true }) | ||
|
||
// Check meta data | ||
cy.document() | ||
cy.get('head title').should('contain', 'Space Force Portal') | ||
}) | ||
|
||
it('can navigate to the News page', () => { | ||
cy.visit('/news') | ||
cy.injectAxe() | ||
cy.contains('Latest news') | ||
cy.checkA11y(null, null, logging, { skipFailures: true }) | ||
}) | ||
|
||
it('can navigate to the About Us page', () => { | ||
cy.visit('/about-us') | ||
cy.injectAxe() | ||
cy.contains('About the Space Force') | ||
cy.checkA11y(null, null, logging, { skipFailures: true }) | ||
}) | ||
|
||
it('can navigate to the Sites & Applications page', () => { | ||
cy.visit('/sites-and-applications') | ||
cy.injectAxe() | ||
cy.contains('Sites & Applications') | ||
cy.checkA11y(null, null, logging, { skipFailures: true }) | ||
}) | ||
|
||
describe('redirects', () => { | ||
it('redirects deprecated MVP routes to the 404 page', () => { | ||
const routes = [ | ||
'/about-us/accomplishments', | ||
'/training-and-education', | ||
'/training-and-education/force-multiplier-program', | ||
] | ||
|
||
routes.forEach((url) => { | ||
cy.visit(url, { failOnStatusCode: false }) | ||
cy.url().should('eq', Cypress.config().baseUrl + '/404') | ||
}) | ||
}) | ||
|
||
it('redirects deprecated beta routes to the home page', () => { | ||
const routes = ['/joinbeta', '/leavebeta'] | ||
|
||
routes.forEach((url) => { | ||
cy.visit(url) | ||
cy.url().should('eq', Cypress.config().baseUrl + '/') | ||
}) | ||
}) | ||
}) | ||
}) | ||
|
||
describe('logged out pages', () => { | ||
beforeEach(() => { | ||
cy.clearCookies() | ||
}) | ||
|
||
it('can visit the login page', () => { | ||
cy.visit('/login') | ||
cy.injectAxe() | ||
cy.contains('Space Force Portal Login') | ||
cy.checkA11y(null, null, logging, { skipFailures: true }) | ||
}) | ||
}) | ||
}) |
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
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
Oops, something went wrong.