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

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav300 committed Apr 29, 2021
1 parent 1f7eecf commit b4c3235
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/terra-functional-testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Unreleased

* Fixed
* Update specPath in BaseCompare to replace `node_modules` with `tests/wdio/__snapshot__`
* Update specPath in BaseCompare to replace `node_modules` with `tests/wdio`.

## 1.2.0 - (April 23, 2021)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class BaseCompare {

// Added to allow for test reusability from terra repositories
if (specPath.includes('node_modules')) {
specPath = specPath.replace('node_modules', path.join('tests', 'wdio', '__snapshots__'));
specPath = specPath.replace('node_modules', path.join('tests', 'wdio'));
}

const baseScreenshotPath = path.join(this.baseScreenshotDir, specPath, '__snapshots__');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ describe('BaseCompare', () => {
},
};
const result = baseCompare.getScreenshotPaths(updatedContext);
expect(result.referencePath).toEqual(path.join(process.cwd(), 'tests', 'wdio', '__snapshots__', 'packageName', 'test', 'wdio', '__snapshots__', 'reference', 'screenshotDir', 'screenshotName.png'));
expect(result.latestPath).toEqual(path.join(process.cwd(), 'tests', 'wdio', '__snapshots__', 'packageName', 'test', 'wdio', '__snapshots__', 'latest', 'screenshotDir', 'screenshotName.png'));
expect(result.diffPath).toEqual(path.join(process.cwd(), 'tests', 'wdio', '__snapshots__', 'packageName', 'test', 'wdio', '__snapshots__', 'diff', 'screenshotDir', 'screenshotName.png'));
expect(result.referencePath).toEqual(path.join(process.cwd(), 'tests', 'wdio', 'packageName', 'test', 'wdio', '__snapshots__', 'reference', 'screenshotDir', 'screenshotName.png'));
expect(result.latestPath).toEqual(path.join(process.cwd(), 'tests', 'wdio', 'packageName', 'test', 'wdio', '__snapshots__', 'latest', 'screenshotDir', 'screenshotName.png'));
expect(result.diffPath).toEqual(path.join(process.cwd(), 'tests', 'wdio', 'packageName', 'test', 'wdio', '__snapshots__', 'diff', 'screenshotDir', 'screenshotName.png'));
});
});

Expand Down

0 comments on commit b4c3235

Please sign in to comment.