-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port exit this page from 4.7 #3953
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done @owenatgov
Few minor snags but nothing big at all. I think we'd best split out non-port changes (like renaming selector properties) unless it was for consistency with v5
packages/govuk-frontend-review/src/views/full-page-examples/child-maintenance/index.njk
Outdated
Show resolved
Hide resolved
packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.yaml
Outdated
Show resolved
Hide resolved
packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.test.js
Outdated
Show resolved
Hide resolved
it('navigates to the href of the button', async () => { | ||
await goToComponent(page, 'exit-this-page') | ||
|
||
const pathname = await page.$eval(buttonClass, el => el.getAttribute('href')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for using Element
APIs here versus HTMLAnchorElement.href
The const href
pathname
change makes good sense too
I know the compiler can be annoyingly pedantic 😣
packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.mjs
Outdated
Show resolved
Hide resolved
packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.mjs
Outdated
Show resolved
Hide resolved
/** | ||
* Initialise component | ||
*/ | ||
init () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for moving this higher up 😊
packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.mjs
Show resolved
Hide resolved
exampleNames = Object.keys(await getExamples('exit-this-page')) | ||
}) | ||
|
||
it('passes accessibility tests', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fab work. Cheers for moving the accessibility tests into the new format 🙌
2720429
to
e311884
Compare
e311884
to
fbe9a4e
Compare
fbe9a4e
to
1eb79e7
Compare
1eb79e7
to
a97c54f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Ports the exit this page component from the 4.7.0 release to
main
, including refactoring the js to ES2015 in line with #3771Includes changes from the following PRs:
html
parameter to Exit this Page button #3878Additionally supersedes #3880
Fixes #3840