This repository has been archived by the owner on May 22, 2024. It is now read-only.
[terra-functional-testing] Add cloudRegion as a namespace for screenshot directories #657
Labels
📦 terra-functional-testing
Size: 3
Story
Up Next - KC
Issues that are ready to pull into an iteration for the KC team
Milestone
Feature Request
As a developer, when using orion-full-stack-testing, I want to not overwrite my screenshots and have correctly namespaced screenshot directories that correspond to the test run, in order to have correct tests artifacts and validations. I will know I am done when I run tests via orion-full-stack-testing, and generate different screenshots per cloudRegion.
Details
orion-full-stack-testing has the ability to run tests per
cloudRegion
. If someone usesTerra.validates.screenshot
in a full stack context, they may potentially override their screenshots if a test combination has the equivalent browser and locale values.For example,
dev | chrome | en
andstaging | chrome | en
test runs will generate screenshots in the same directory,en/form-factor/chrome_form-factor/spec
. We should account for thecloudRegion
and namespace the screenshots one more level,dev/en/form-factor/chrome_form-factor/spec
This will prevent overwrites and be consistent with the test combinations that orion-full-stack-testing supports.orion-full-stack-testing already follows our
getConfigurationOptions
pattern, and passes in alauncherOptions.cloudRegion
to its test runner options. This property exposes the cloudRegion value (dev, staging). These options are already being passed into the visual regression service [src]Proposed Changes
I believe the changes necessary to enable this involve small changes with the BaseCompare.js:
cloudRegion
from options: 1this.cloudRegion = cloudRegion || '';
2this.cloudRegion
to the path.join call: 3Description
Additional Context / Screenshots
@ Mentions
The text was updated successfully, but these errors were encountered: