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

[terra-functional-testing] non-reference screenshots are not deleted on projects with nested screenshot directories. #668

Closed
benbcai opened this issue Jun 4, 2021 · 0 comments · Fixed by #670
Assignees
Labels
bug 📦 terra-functional-testing Size: 1 Up Next - KC Issues that are ready to pull into an iteration for the KC team
Milestone

Comments

@benbcai
Copy link
Contributor

benbcai commented Jun 4, 2021

Bug Report

Description

Projects that have error, latest, or diff screenshot folders nested are not cleaned when WDIO test starts.

As a consumer of terra-functional-testing I want the error, latest, and diff screenshot directories to be deleted before each WDIO test run

Motivation

So that screenshots in these folders from previous runs are deleted and any new screenshots are only for the current test run.

Definition of Done

We'll know we're done when the error, latest, or diff screenshot folders are deleted for projects where these folders are nested several levels deep.

Steps to Reproduce

  1. Using terra-application as an example, Create three folders named error, latest, and diff inside any of the __snapshots__ folder in terra-application. For example: https://github.com/cerner/terra-application/tree/main/tests/wdio/application-base/private/__snapshots__
  2. Run wdio test
  3. Notice that these folders are not deleted.

Additional Context / Screenshots

Screen Shot 2021-06-04 at 1 17 21 PM

Expected Behavior

Possible Solution

This logic resolves the paths for the error, latest, and diff at the top level. We should add /**/ to make it search all nested directories.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 📦 terra-functional-testing Size: 1 Up Next - KC Issues that are ready to pull into an iteration for the KC team
Projects
None yet
3 participants