-
Notifications
You must be signed in to change notification settings - Fork 833
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate cypress component tests (#1922)
* Integrate cypress component tests * Install latest cypress version * Fix new tests * Skip TimePicker tests
- Loading branch information
1 parent
e98eb44
commit 88cb622
Showing
15 changed files
with
688 additions
and
246 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as React from 'react'; | ||
import { mountStaticPicker } from '../test-utils'; | ||
import { StaticDatePicker } from '@material-ui/pickers'; | ||
|
||
describe('<DatePicker />', () => { | ||
it('Renders and show todays date', () => { | ||
mountStaticPicker(defaultProps => <StaticDatePicker {...defaultProps} />); | ||
|
||
cy.findByTestId('datepicker-toolbar-date').contains('Sat, Oct 7'); | ||
}); | ||
|
||
it('Switches between months', () => { | ||
mountStaticPicker(defaultProps => <StaticDatePicker {...defaultProps} />); | ||
|
||
cy.findByTestId('calendar-month-text').contains('October'); | ||
|
||
cy.findByTestId('previous-arrow-button') | ||
.click() | ||
.click(); | ||
cy.findByTestId('next-arrow-button') | ||
.click() | ||
.click() | ||
.click(); | ||
|
||
cy.wait(350); | ||
|
||
cy.findByTestId('calendar-month-text').contains('November'); | ||
}); | ||
}); |
Oops, something went wrong.
88cb622
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: