This repository has been archived by the owner on Mar 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
17 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
28 changes: 13 additions & 15 deletions
28
examples/visual-testing-with-percy/src/DatePicker.cy-spec.js
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 |
---|---|---|
@@ -1,26 +1,24 @@ | ||
/// <reference types="cypress" /> | ||
import React from 'react' | ||
import { mount } from 'cypress-react-unit-test' | ||
// import MaterialUIPickers from './DatePicker' | ||
import MaterialUIPickers from './DatePicker' | ||
|
||
describe('Material UI date picker', () => { | ||
it('sanity', () => { | ||
expect(mount).to.be.a('function') | ||
}) | ||
|
||
// https://github.com/bahmutov/cypress-react-unit-test/issues/507 | ||
// SKIP https://github.com/bahmutov/cypress-react-unit-test/pull/506#issuecomment-714124015 | ||
// it.skip('works', () => { | ||
// mount(<MaterialUIPickers />) | ||
// // confirm the DOM has rendered the widget | ||
// cy.get('#date-picker-inline').should('have.value', '08/18/2014') | ||
// // then take visual snapshot | ||
// cy.percySnapshot('Datepicker initial') | ||
it('works', () => { | ||
mount(<MaterialUIPickers />) | ||
// confirm the DOM has rendered the widget | ||
cy.get('#date-picker-inline').should('have.value', '08/18/2014') | ||
// then take visual snapshot | ||
cy.percySnapshot('Datepicker initial') | ||
|
||
// cy.get('button[aria-label="change date"]').click() | ||
// // confirm the DOM has rendered the widget | ||
// cy.get('.MuiPickersBasePicker-container').should('be.visible') | ||
// // then take visual snapshot | ||
// cy.percySnapshot('Datepicker opened') | ||
// }) | ||
cy.get('button[aria-label="change date"]').click() | ||
// confirm the DOM has rendered the widget | ||
cy.get('.MuiPickersBasePicker-container').should('be.visible') | ||
// then take visual snapshot | ||
cy.percySnapshot('Datepicker opened') | ||
}) | ||
}) |