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

feat: Add before:spec event #9646

Merged
merged 15 commits into from
Dec 16, 2020
Merged

feat: Add before:spec event #9646

merged 15 commits into from
Dec 16, 2020

Conversation

chrisbreiding
Copy link
Contributor

@chrisbreiding chrisbreiding commented Dec 11, 2020

User facing changelog

  • You can now listen to a before:spec event in the plugins file. See the documentation for more information (TODO: link to doc).

Additional details

  • The event fires before a spec is run.

  • It only fires in run mode.

  • The event handler receives one argument, an object with different versions of the spec file/path.

     {
       name: 'login_spec.js',
       relative: 'cypress/integration/login_spec.js',
       absolute: '/Users/janelane/app/cypress/integration/login_spec.js',
     }

PR Tasks

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 11, 2020

Thanks for taking the time to open a PR!

@chrisbreiding chrisbreiding changed the title Add before:spec event feat: Add before:spec event Dec 11, 2020
@cypress
Copy link

cypress bot commented Dec 11, 2020



Test summary

9156 0 118 3Flakiness 1


Run details

Project cypress
Status Passed
Commit 876e8f2
Started Dec 16, 2020 8:55 PM
Ended Dec 16, 2020 9:08 PM
Duration 12:56 💡
OS Linux Debian - 10.5
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes

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

@jennifer-shehane
Copy link
Member

@chrisbreiding I'd like some clarification on how this event runs when run via cypress open and selecting 'Run all interactive specs' because this will trip some people up I think.

@chrisbreiding chrisbreiding mentioned this pull request Dec 16, 2020
3 tasks
flotwig
flotwig previously approved these changes Dec 16, 2020
Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

looks good

suggested fixes

Co-authored-by: Zach Bloomquist <[email protected]>
@chrisbreiding chrisbreiding merged commit f47d5c0 into develop Dec 16, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 21, 2020

Released in 6.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.2.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 21, 2020
@chrisbreiding chrisbreiding deleted the TR-543-before-spec-event branch April 5, 2022 18:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants