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

[#133] Added show_path configuration to extension to allow adding current URL to screenshot files. #140

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

richardgaunt
Copy link
Collaborator

@richardgaunt richardgaunt commented Jan 11, 2025

Closes: #133

Checklist before requesting a review

  • I have formatted the subject to include ticket number as [#123] Verb in past tense with dot at the end.
  • I have added a link to the issue tracker
  • I have provided information in Changed section about WHY something was done if this was not a normal implementation
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have run new and existing relevant tests locally with my changes, and they passed
  • I have provided screenshots, where applicable

Changed

  1. Added configuration flag: current_path so that:
extensions:
    DrevOps\BehatScreenshotExtension:
      dir: '%paths.base%/.logs/screenshots'
      purge: true
      show_path: true # Change to 'false' to not include the path on html screenshots.

will output the current_path to the screenshot html before the opening tag.
3. Updated tests

Not implemented

  1. Watermark of screenshots with current path - deemed too difficult with different sized screens.
  2. Hook allowing clients to alter the debug information, I have written the class to allow easier implementation but there does not seem to be an easy way to manage the order of hooks of @AfterStep or an easy way to get access to extensions (without DI) etc - if you have ideas let me know,

Screenshots

image

@AlexSkrypnyk
Copy link
Member

@richardgaunt
Thanks a bunch for all your hard work on this and for making such a fantastic pull request!

@AlexSkrypnyk AlexSkrypnyk merged commit b9a77c8 into drevops:main Jan 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inject current path into HTML screenshots
2 participants