generated from ministryofjustice/hmpps-template-typescript
-
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.
MAN-270 update primary nav links, add tests
- Loading branch information
1 parent
a3fe731
commit ee5a710
Showing
7 changed files
with
49 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Page from '../pages/page' | ||
import SearchPage from '../pages/search' | ||
|
||
context('Search', () => { | ||
it('Search page is rendered', () => { | ||
cy.visit('/search') | ||
const page = Page.verifyOnPage(SearchPage) | ||
page.getNavigationLink(1).should('contain.text', 'Home') | ||
page.getNavigationLink(1).should('not.have.attr', 'aria-current', 'home') | ||
page.getNavigationLink(2).should('contain.text', 'Cases') | ||
page.getNavigationLink(2).should('not.have.attr', 'aria-current', 'cases') | ||
page.getNavigationLink(3).should('contain.text', 'Search') | ||
page.getNavigationLink(3).should('have.attr', 'aria-current', 'search') | ||
}) | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Page from './page' | ||
|
||
export default class SearchPage extends Page { | ||
constructor() { | ||
super('Find a person on probation') | ||
} | ||
} |
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 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