Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
fix(WDIO): Fix visual regression tests to work with updated Theme Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ketch committed Apr 6, 2020
1 parent 7ca7b88 commit c08ed62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/screenshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('visual regressions: ', () => {
describe(`runs over examples and themes: `, () => {
EXAMPLES.forEach(example => {
THEMES.forEach(theme => {
const path = `?example=${example}&theme=${theme}&header=false`
const path = `/editor?example=${example}&theme=${theme}&ui=false`

// A pseudo-test that is helpful for debugging the page
// that the screen-shotting actually sees. To use it un-skip it.
Expand All @@ -61,6 +61,12 @@ describe('visual regressions: ', () => {
it(`${theme}/${example}: screenshots have not changed`, async () => {
// @ts-ignore
await browser.url(path)
// Tell WDIO to take control of preview iframe content, instead of Theme Editor
// @ts-ignore
const frame = await browser.$('#preview')
// @ts-ignore
await browser.switchToFrame(frame)

// @ts-ignore
const results = await browser.checkDocument()

Expand Down

0 comments on commit c08ed62

Please sign in to comment.