File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,22 @@ yarn install
113113yarn start
114114```
115115
116+ ### Testing
117+
118+ #### Debug Cypress
119+
120+ Starts cypress in ` --headed ` and ` --no-exit `
121+
122+ ```
123+ test:cypress:debug
124+ ```
125+
126+ Test and debug single cypress file:
127+
128+ ```
129+ yarn test:cypress:debug --spec "cypress/integration/close.js"
130+ ```
131+
116132### Release
117133
118134```
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ describe('close ReactDialog', () => {
110110 } )
111111 } )
112112
113- it ( 'does not close when set user clicks within the inner dialog content' , ( ) => {
113+ it ( 'does not close when set user clicks the dialog content' , ( ) => {
114114
115115 cy . visit ( 'cypress/test.html' ) . then ( ( contentWindow ) => {
116116 cy . document ( ) . then ( ( document ) => {
@@ -123,7 +123,7 @@ describe('close ReactDialog', () => {
123123 React . createElement (
124124 'div' ,
125125 {
126- className : 'ReactDialogInner ' ,
126+ className : 'ReactDialogContent ' ,
127127 style : {
128128 position : 'relative'
129129 }
@@ -140,7 +140,7 @@ describe('close ReactDialog', () => {
140140 cy . get ( 'h1' ) . should ( 'exist' ) ;
141141 cy . get ( '.ReactDialog.ReactDialogOpen' ) . should ( 'exist' ) ;
142142
143- cy . get ( '.ReactDialogCell .ReactDialogInner ' ) . trigger ( 'click' ) ;
143+ cy . get ( '.ReactDialogContent ' ) . trigger ( 'click' ) ;
144144
145145 cy . get ( 'h1' ) . should ( 'exist' ) ;
146146 cy . get ( '.ReactDialog.ReactDialogOpen' ) . should ( 'exist' ) ;
Original file line number Diff line number Diff line change 1515 "prepublishOnly" : " yarn build" ,
1616 "dev" : " rollup -c rollup.dev.config.js -w" ,
1717 "test:integration" : " yarn cypress run" ,
18+ "test:cypress:debug" : " yarn cypress run --headed --no-exit" ,
1819 "test" : " yarn test:integration"
1920 },
2021 "repository" : " git@github.com:DePayFi/react-dialog.git" ,
You can’t perform that action at this time.
0 commit comments