mirror of https://github.com/sgoudham/carbon.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
729 B
JavaScript
29 lines
729 B
JavaScript
/* global cy,before,after */
|
|
import { environment } from '../../util'
|
|
describe('Visual Regression Testing', () => {
|
|
before(() => {
|
|
cy.eyesOpen({
|
|
appName: 'Carbon',
|
|
testName: 'Themes',
|
|
browser: environment
|
|
})
|
|
cy.visit('/')
|
|
})
|
|
after(() => {
|
|
cy.eyesClose()
|
|
})
|
|
|
|
it('themes test', () => {
|
|
for (let childIndex = 1; childIndex < 28; childIndex++) {
|
|
cy.get('[data-cy="themes-container"] [data-cy="theme-selector-button"]').click()
|
|
cy.get(
|
|
`[data-cy="themes-container"] [data-cy="dropdown-item"]:nth-child(${childIndex + 1})`
|
|
).click({ force: true })
|
|
cy.eyesCheckWindow({
|
|
sizeMode: 'selector', //mode
|
|
selector: '.page'
|
|
})
|
|
}
|
|
})
|
|
})
|