-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5063 from valor-software/feat-applitools
tests(common): snapshot visual tests with applitools
- Loading branch information
Showing
7 changed files
with
387 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ module.exports = (on, config) => { | |
|
||
return config | ||
}; | ||
|
||
require('@applitools/eyes.cypress')(module); |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { DatepickerPo } from '../support/datepicker.po'; | ||
import { DropdownsPo } from '../support/dropdowns.po'; | ||
import { ModalsPo } from '../support/modals.po'; | ||
import { TabsPo } from '../support/tabs.po'; | ||
import { TypeaheadPo } from '../support/typeahead.po'; | ||
|
||
describe('Snapshot test', () => { | ||
const componentsArray = [ | ||
new DatepickerPo(), | ||
new DropdownsPo(), | ||
new ModalsPo(), | ||
new TypeaheadPo(), | ||
new TabsPo() | ||
]; | ||
|
||
componentsArray.forEach(page => { | ||
it(`navigate to each Demo and check example: ${page.pageUrl}`, () => { | ||
page.navigateTo(); | ||
cy.get('ng-sample-box').each(demo => { | ||
const subtitle = demo.parent().find('h3').text(); | ||
|
||
cy.wrap(demo).find(`.bd-example`) | ||
.eyesOpen({ | ||
appName: 'NGX-bootstrap', | ||
concurrency: 5, | ||
matchLevel: 'Strict', | ||
showLogs: true, | ||
testName: `${page.pageUrl} - ${subtitle}`, | ||
browser: [{ | ||
name: 'chrome', | ||
browserVersion: 'latest', | ||
width: 360, | ||
height: 640 | ||
}, { | ||
name: 'firefox', | ||
browserVersion: 'latest', | ||
width: 360, | ||
height: 640 | ||
}, | ||
{ | ||
name: 'firefox', | ||
browserVersion: 'latest', | ||
width: 1366, | ||
height: 768 | ||
}] | ||
}) | ||
.eyesCheckWindow({ | ||
sizeMode: 'selector', | ||
selector: `.bd-example`, | ||
tag: `${page.pageUrl}-${subtitle}`, | ||
sendDom: false, | ||
}) | ||
.eyesClose(); | ||
}); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
}, | ||
"include": [ | ||
"integration/*.ts", | ||
"snapshot/*.ts", | ||
"full/*.ts", | ||
"full/**/*.ts", | ||
"support/*.ts", | ||
|
Oops, something went wrong.