|
1 | 1 | /// <reference types="cypress" /> |
2 | 2 | import React from 'react' |
3 | 3 | import { mount } from 'cypress-react-unit-test' |
4 | | -// import MaterialUIPickers from './DatePicker' |
| 4 | +import MaterialUIPickers from './DatePicker' |
5 | 5 |
|
6 | 6 | describe('Material UI date picker', () => { |
7 | 7 | it('sanity', () => { |
8 | 8 | expect(mount).to.be.a('function') |
9 | 9 | }) |
10 | 10 |
|
11 | | - // https://github.com/bahmutov/cypress-react-unit-test/issues/507 |
12 | | - // SKIP https://github.com/bahmutov/cypress-react-unit-test/pull/506#issuecomment-714124015 |
13 | | - // it.skip('works', () => { |
14 | | - // mount(<MaterialUIPickers />) |
15 | | - // // confirm the DOM has rendered the widget |
16 | | - // cy.get('#date-picker-inline').should('have.value', '08/18/2014') |
17 | | - // // then take visual snapshot |
18 | | - // cy.percySnapshot('Datepicker initial') |
| 11 | + it('works', () => { |
| 12 | + mount(<MaterialUIPickers />) |
| 13 | + // confirm the DOM has rendered the widget |
| 14 | + cy.get('#date-picker-inline').should('have.value', '08/18/2014') |
| 15 | + // then take visual snapshot |
| 16 | + cy.percySnapshot('Datepicker initial') |
19 | 17 |
|
20 | | - // cy.get('button[aria-label="change date"]').click() |
21 | | - // // confirm the DOM has rendered the widget |
22 | | - // cy.get('.MuiPickersBasePicker-container').should('be.visible') |
23 | | - // // then take visual snapshot |
24 | | - // cy.percySnapshot('Datepicker opened') |
25 | | - // }) |
| 18 | + cy.get('button[aria-label="change date"]').click() |
| 19 | + // confirm the DOM has rendered the widget |
| 20 | + cy.get('.MuiPickersBasePicker-container').should('be.visible') |
| 21 | + // then take visual snapshot |
| 22 | + cy.percySnapshot('Datepicker opened') |
| 23 | + }) |
26 | 24 | }) |
0 commit comments