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.
30 lines
657 B
JavaScript
30 lines
657 B
JavaScript
/* global cy, before ,after */
|
|
import { environment } from '../../util'
|
|
import { THEMES } from '../../../lib/constants'
|
|
|
|
describe('Visual Regression Testing', () => {
|
|
before(() => {
|
|
cy.eyesOpen({
|
|
appName: 'Carbon',
|
|
testName: 'Themes',
|
|
browser: environment
|
|
})
|
|
cy.visit('/')
|
|
})
|
|
|
|
after(() => {
|
|
cy.eyesClose()
|
|
})
|
|
|
|
THEMES.forEach(t => {
|
|
it(`Test theme: "${t.name}"`, () => {
|
|
cy.get('[data-cy="themes-container"] [data-cy="theme-selector-button"]').click()
|
|
cy.contains(t.name).click({ force: true })
|
|
cy.eyesCheckWindow({
|
|
target: 'region',
|
|
selector: '.page'
|
|
})
|
|
})
|
|
})
|
|
})
|