Skip to content
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

chore(PPDSC-1581): upgrade to cypress 12 #549

Merged
merged 19 commits into from
Jan 10, 2023

Conversation

mstuartf
Copy link
Contributor

@mstuartf mstuartf commented Jan 5, 2023

PPDSC-1581

What

  1. Background - why this is needed
  2. What did you do
  • Renamed all files as required / updated extensions
  • Moved config files to root dir
  • Added handler to stop uncaught exceptions failing tests
  • Updated setup for test_newskit_in_nextjs_app job
  1. What does the reviewers should expect
  • Existing cypress tests pass

I have done:

  • Written unit tests against changes
  • Written functional tests against the component and/or NewsKit site
  • Updated relevant documentation

I have tested manually:

  • The feature's functionality is working as expected on Chrome, Firefox, Safari and Edge
  • The screen reader reads and flows through the elements as expected.
  • There are no new errors in the browser console coming from this PR.
  • When visual test is not added, it renders correctly on different browsers and mobile viewports (Safari, Firefox, small mobile viewport, tablet)
  • The Playground feature is working as expected

Before:

After:

Who should review this PR:

How to test:

@mstuartf mstuartf added the draft This is a draft PR and not intended for formal review yet label Jan 5, 2023
@mstuartf mstuartf requested a review from a team as a code owner January 5, 2023 14:19
@newskit-engineering
Copy link
Collaborator

JohnTParsons
JohnTParsons previously approved these changes Jan 5, 2023
Copy link
Collaborator

@JohnTParsons JohnTParsons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In search.cy.js, please remove "cy.contains('Search').click({force: true});" and bring back "cy.get(${DESKTOP_NAV} ${SEARCH_BTN}).click();"

This was just a temporary hack I needed to do to keep the tests running after the recent upgrade of next.js to v.13

@mstuartf mstuartf added ready for review Please assist in getting this reviewed and removed draft This is a draft PR and not intended for formal review yet labels Jan 6, 2023
JohnTParsons
JohnTParsons previously approved these changes Jan 6, 2023
Xin00163
Xin00163 previously approved these changes Jan 6, 2023
Copy link
Contributor

@Xin00163 Xin00163 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Do you think it's worth using the component testing feature or it's not needed for now?


export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
Copy link
Contributor

@Xin00163 Xin00163 Jan 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this plugin for docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do but you make a good point as we don't need it for any of the others. Will remove!


export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be OK just to import the file const setupNodeEvents = require('./cypress/plugins/index.js')? https://docs.cypress.io/guides/references/migration-guide#Config-Option-Changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to match the intended new structure. Will just check the pipeline is ok then ready for another look. Thanks!

@mstuartf mstuartf dismissed stale reviews from Xin00163 and JohnTParsons via a4627db January 9, 2023 10:48
Copy link
Contributor

@mutebg mutebg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another great one 👏

@mstuartf mstuartf merged commit 740f2d7 into main Jan 10, 2023
@mstuartf mstuartf deleted the chore/PPDSC-1581-cypress-upgrade branch January 10, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Please assist in getting this reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants