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($browser): add screen-capture on error #86

Merged
merged 2 commits into from
Feb 22, 2021
Merged

feat($browser): add screen-capture on error #86

merged 2 commits into from
Feb 22, 2021

Conversation

RABrown1986
Copy link
Contributor

@RABrown1986 RABrown1986 commented Feb 21, 2021

add screen-capture on error for username, password, and post-login behavior

Description

Added try/catches around username, password, and post-login events that, on an error, call a screen-capture function. I was going to make the directory variable, but ESLint didn't like that a directory could be editable by the user so I dropped that.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Related Issue

#85

Motivation and Context

When running cypress-social-login with a headed pop-up remotely any errors are not caught by Cypress screen captures. Local runs may not catch CAPTCHA requests or MFA which are occurring remotely and these are difficult to verify from the normal Cypress "missing locator" error.

How Has This Been Tested?

local runs for my tests

Screenshots (if appropriate):

Checklist:

  • I have updated the documentation (if required).
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I added a picture of a cute animal cause it's fun (I don't have one, sorry!)

add screencapture on error for username, password, and post-login behavior
@RABrown1986 RABrown1986 changed the title feat(screenshot): add screen-capture feat($browser): add screen-capture on error Feb 21, 2021
@lirantal
Copy link
Owner

Thanks @RABrown1986
This essentially helps to debug the problem when it happens if I understand the intention correctly?

@lirantal lirantal self-requested a review February 22, 2021 16:50
@lirantal lirantal added the enhancement New feature or request label Feb 22, 2021
@lirantal
Copy link
Owner

This PR shows that we've done a better job at re-use based on the number of changes across all social login strategies, but we can leave that off for a future work :-)

Thanks again @RABrown1986, looks good 👍🏼

@lirantal lirantal merged commit a1a7443 into lirantal:master Feb 22, 2021
@lirantal
Copy link
Owner

🎉 This PR is included in version 1.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@RABrown1986
Copy link
Contributor Author

Thanks @RABrown1986
This essentially helps to debug the problem when it happens if I understand the intention correctly?

That's correct!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants