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

fix: make ScriptError display at full height in Runner #21653

Merged
merged 9 commits into from
May 31, 2022

Conversation

marktnoonan
Copy link
Contributor

@marktnoonan marktnoonan commented May 27, 2022

User facing changelog

Corrects the height of the ScriptError component in Cypress 10. Not really a user facing change since this hasn't been released.

Additional details

This component ended up too short as a result of changes to the surrounding elements in a previous PR. The change wasn't noticed at the time since there was not an e2e test for this state, and the component test wasn't affected by the DOM changes so it looked fine in Percy.

This PR corrects the height by changing some CSS classes, and uses the AUT header store to correctly react to wrapping in the header. It also adds a test that confirms the state does appear when the runner attempts to load file with a syntax error.

Steps to test

Run yarn dev to open the test runner for this branch, and visit an end-to-end spec that works. Make a syntax error in the spec that's open so that the ScriptError will appear. Example of a spec that triggers this state is this one, where the closing parenthesis is missing:

describe('Bad spec', () => { it('has a syntax error', () => { expect(true).to.be.true }) }

Once you see the error, please resize the reporter and the window, open and close the specs list etc. The error display area should always be fully visible, never get cut off and never get too small.

How has the user experience changed?

Before this PR:
script error display too short

After this PR:
script error

PR Tasks

  • Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 27, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented May 27, 2022



Test summary

4921 0 59 0Flakiness 1


Run details

Project cypress
Status Passed
Commit c301f8e
Started May 31, 2022 2:43 PM
Ended May 31, 2022 3:03 PM
Duration 19:41 💡
OS Linux Debian - 10.11
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/e2e/next.cy.ts Flakiness
1 Working with next-12.1.6 > should detect new spec

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@marktnoonan marktnoonan marked this pull request as ready for review May 27, 2022 13:51
@marktnoonan marktnoonan requested review from ZachJW34 and tbiethman May 27, 2022 13:51
Copy link
Contributor

@tbiethman tbiethman left a comment

Choose a reason for hiding this comment

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

Tested as described, error renders with expected height 👍

@marktnoonan marktnoonan requested a review from lmiller1990 May 30, 2022 16:52
Copy link
Contributor

@ZachJW34 ZachJW34 left a comment

Choose a reason for hiding this comment

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

Works great!

@mjhenkes mjhenkes merged commit a937e4c into develop May 31, 2022
@mjhenkes mjhenkes deleted the marktnoonan/script-error-height branch May 31, 2022 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants