forked from cypress-io/cypress-react-unit-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChart.spec.js
29 lines (26 loc) · 787 Bytes
/
Chart.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/// <reference types="cypress" />
import React from 'react'
import { mount } from 'cypress-react-unit-test'
import { CustomTheme } from './Chart'
describe('Chart', () => {
it('shows the chart', () => {
// Applitools commands like "cy.eyes*"
// https://www.npmjs.com/package/@applitools/eyes-cypress
cy.eyesOpen({
appName: 'cypress-react-unit-test',
testName: 'Chart example',
browser: [
{
width: Cypress.config('viewportWidth'),
height: Cypress.config('viewportHeight'),
name: 'firefox',
},
],
// ignore "cy.eyes*" commands when using "cypress open"
isDisabled: Cypress.config('isInteractive'),
})
mount(<CustomTheme />)
cy.eyesCheckWindow('Chart')
cy.eyesClose()
})
})