Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Unable to take screenshot in afterEach hook #733

Closed
Matthematic opened this issue Feb 28, 2022 · 1 comment
Closed

Unable to take screenshot in afterEach hook #733

Matthematic opened this issue Feb 28, 2022 · 1 comment

Comments

@Matthematic
Copy link

Bug Report

Description

I would like to take a screenshot in an afterEach hook so that I can reduce repeated code, however when I try this I get the error "Cannot read property 'file' of undefined". This is because of the following line: https://github.com/cerner/terra-toolkit/blob/main/packages/terra-functional-testing/src/services/wdio-visual-regression-service/methods/BaseCompare.js#L106

Steps to Reproduce

  1. Run a spec with an afterEach() method of a describe() that takes a screenshot using the terra api.

Additional Context / Screenshots

image

Expected Behavior

I expect the screenshot to succeed.

Possible Solution

It appears these hooks hold the file path in context.suite instead, so I think the offending line of code above should be updated to check for that.

Environment

  • Component Name and Version:
  • Browser Name and Version:
  • Node/npm Version: [e.g. Node 8/npm 5]
  • Webpack Version:
  • Operating System and version (desktop or mobile):

@ Mentions

@stale
Copy link

stale bot commented Apr 29, 2022

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed in seven days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Apr 29, 2022
@stale stale bot closed this as completed May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant