-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
9 changed files
with
80 additions
and
21 deletions.
There are no files selected for viewing
19 changes: 15 additions & 4 deletions
19
cypress/e2e/certificate-provider/certificate-provided.cy.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 |
---|---|---|
@@ -1,10 +1,21 @@ | ||
describe('Certificate provided', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures/certificate-provider?redirect=/certificate-provided'); | ||
it('has a print this page link', () => { | ||
cy.on('window:before:load', (win) => { | ||
cy.stub(win, 'print') | ||
}) | ||
|
||
cy.visit('/fixtures/certificate-provider?redirect=/certificate-provided') | ||
|
||
cy.checkA11yApp(); | ||
|
||
cy.contains('a', 'Print this page').click(); | ||
cy.window().its('print').should('be.called') | ||
}); | ||
|
||
it('has a button to the dashboard', () => { | ||
cy.checkA11yApp(); | ||
cy.contains('a', 'Go to your dashboard'); | ||
cy.visit('/fixtures/certificate-provider?redirect=/certificate-provided') | ||
|
||
cy.contains('a', 'Go to your dashboard').click(); | ||
cy.url().should('contain', '/dashboard'); | ||
}); | ||
}) |
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
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
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,19 @@ | ||
{{ define "print-this-page" }} | ||
<p class="govuk-body"> | ||
<svg width="20" height="23" viewBox="0 0 20 23" fill="none" xmlns="http://www.w3.org/2000/svg" aria-labelledby="printer-icon-title"> | ||
<title id="printer-icon-title">{{ tr .App "printerIcon"}}</title> | ||
<g id="Printer_icon 1" clip-path="url(#clip0_66_310)"> | ||
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M20 9H15V0H9C8.23612 1.4641 7.37904 2.3923 6.29231 3.56922C5.89454 4 5.466 4.4641 5 5V9H0V18H5V23H15V18L20 17.8529V9ZM14 22H6V15H14V22ZM16 11H18V13H16V11ZM14 1H9V5H6V9H14V1Z" fill="black"/> | ||
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M7 16H13V17H7V16Z" fill="#0B0C0C"/> | ||
<path id="Vector_3" fill-rule="evenodd" clip-rule="evenodd" d="M7 18H13V19H7V18Z" fill="#0B0C0C"/> | ||
<path id="Vector_4" fill-rule="evenodd" clip-rule="evenodd" d="M7 20H13V21H7V20Z" fill="#0B0C0C"/> | ||
</g> | ||
<defs> | ||
<clipPath id="clip0_66_310"> | ||
<rect width="20" height="23" fill="white"/> | ||
</clipPath> | ||
</defs> | ||
</svg> | ||
<a href="#" class="govuk-link" onclick="window.print()">{{ tr .App "printThisPage"}}</a> | ||
</p> | ||
{{ end }} |