-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(DIST-136): Increase resilience for visual tests in firefox
test(DIST-136): Fixes firefox75 bug test(DIST-136): Fixes firefox version test(DIST-136): Reverts functional tests test(DIST-136): Split tests in separate jobs test(DIST-136): Split tests in separate jobs Update .travis.yml Co-Authored-By: Matej Lednicky <matej.lednicky@typeform.com> test(DIST-136): Run functional tests in parallel Update .travis.yml Co-Authored-By: Matej Lednicky <matej.lednicky@typeform.com>
- Loading branch information
1 parent
70a80ee
commit c2c8e1c
Showing
15 changed files
with
126 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,85 @@ | ||
const { resizeWindow } = require('../codeceptjs-utils') | ||
|
||
const clickOnLink = (I, n = 1) => { | ||
const clickOnLink = async (I, n = 1) => { | ||
const cssLinkSelector = `[data-mode="${n}"]` | ||
I.click({ css: cssLinkSelector }) | ||
await I.click({ css: cssLinkSelector }) | ||
} | ||
|
||
const waitForIFrame = async (I) => { | ||
await I.waitForVisible({ css: 'iframe' }, WAITING_TIME) | ||
await I.waitForIFrameMessage() | ||
} | ||
const WAITING_TIME = 5 | ||
|
||
Feature('Embed Widget') | ||
|
||
Scenario('Basic Widget', async (I) => { | ||
I.amOnPage('widget.html') | ||
I.waitForVisible({ css: 'iframe' }, 5) | ||
Scenario('Basic Widget @desktop', async (I) => { | ||
await I.amOnPage('widget.html') | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Embed Basic Widget') | ||
}) | ||
|
||
Scenario('Full Page Widget', async (I) => { | ||
I.amOnPage('full.html') | ||
I.waitForVisible({ css: 'iframe' }, 5) | ||
Scenario('Full Page Widget @desktop', async (I) => { | ||
await I.amOnPage('full.html') | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Embed Full Page Widget') | ||
}) | ||
|
||
Scenario('Basic Widget on Mobile', async (I) => { | ||
resizeWindow(I) | ||
I.amOnPage('widget.html') | ||
Scenario('Basic Widget @mobile', async (I) => { | ||
await resizeWindow(I) | ||
await I.amOnPage('widget.html') | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Embed Basic Widget - Mobile') | ||
}) | ||
|
||
Scenario('Full Page Widget on Mobile', async (I) => { | ||
resizeWindow(I) | ||
I.amOnPage('full.html') | ||
Scenario('Full Page Widget @mobile', async (I) => { | ||
await resizeWindow(I) | ||
await I.amOnPage('full.html') | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Embed Full Page Widget - Mobile') | ||
}) | ||
|
||
Scenario('Popup Widget', async (I) => { | ||
I.amOnPage('popup.html') | ||
clickOnLink(I, 1) | ||
I.waitForVisible({ css: 'iframe' }, 10) | ||
Scenario('Popup Widget @desktop', async (I) => { | ||
await I.amOnPage('popup.html') | ||
await clickOnLink(I, 1) | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Popup Widget') | ||
}) | ||
|
||
Scenario('Popup Widget on Mobile', async (I) => { | ||
resizeWindow(I) | ||
I.amOnPage('popup.html') | ||
clickOnLink(I, 1) | ||
Scenario('Popup Widget @mobile', async (I) => { | ||
await resizeWindow(I) | ||
await I.amOnPage('popup.html') | ||
await clickOnLink(I, 1) | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Popup Widget') | ||
}) | ||
|
||
Scenario('Drawer Widget', async (I) => { | ||
I.amOnPage('popup.html') | ||
clickOnLink(I, 2) | ||
I.waitForVisible({ css: 'iframe' }, 10) | ||
Scenario('Drawer Widget @desktop', async (I) => { | ||
await I.amOnPage('popup.html') | ||
await clickOnLink(I, 2) | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Drawer Widget') | ||
}) | ||
|
||
Scenario('Drawer Widget on Mobile', async (I) => { | ||
resizeWindow(I) | ||
I.amOnPage('popup.html') | ||
clickOnLink(I, 2) | ||
Scenario('Drawer Widget @mobile', async (I) => { | ||
await resizeWindow(I) | ||
await I.amOnPage('popup.html') | ||
await clickOnLink(I, 2) | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Drawer Widget - Mobile') | ||
}) | ||
|
||
Scenario('Right Drawer Widget', async (I) => { | ||
I.amOnPage('popup.html') | ||
clickOnLink(I, 3) | ||
I.waitForVisible({ css: 'iframe' }, 10) | ||
Scenario('Right Drawer Widget @desktop', async (I) => { | ||
await I.amOnPage('popup.html') | ||
await clickOnLink(I, 3) | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Popup Widget') | ||
}) | ||
|
||
Scenario('Right Drawer Widget on Mobile', async (I) => { | ||
resizeWindow(I) | ||
I.amOnPage('popup.html') | ||
clickOnLink(I, 3) | ||
Scenario('Right Drawer Widget @mobile', async (I) => { | ||
await resizeWindow(I) | ||
await I.amOnPage('popup.html') | ||
await clickOnLink(I, 3) | ||
await waitForIFrame(I) | ||
await I.eyesCheck('Right Drawer Widget - Mobile') | ||
}) |
Oops, something went wrong.