This repository was archived by the owner on Mar 5, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,23 @@ Cypress.Commands.add('copyComponentStyles', component => {
101
101
export const mount = ( jsx , alias ) => {
102
102
// Get the display name property via the component constructor
103
103
const displayname = alias || jsx . type . prototype . constructor . name
104
+
105
+ let cmd
106
+
104
107
cy . injectReactDOM ( )
105
- . log ( `ReactDOM.render(<${ displayname } ... />)` , jsx . props )
106
108
. window ( { log : false } )
109
+ . then ( ( ) => {
110
+ cmd = Cypress . log ( {
111
+ name : 'mount' ,
112
+ // @ts -ignore
113
+ message : [ `ReactDOM.render(<${ displayname } ... />)` ] ,
114
+ consoleProps ( ) {
115
+ return {
116
+ props : jsx . props
117
+ }
118
+ }
119
+ } )
120
+ } )
107
121
. then ( setXMLHttpRequest )
108
122
. then ( setAlert )
109
123
. then ( win => {
@@ -116,6 +130,9 @@ export const mount = (jsx, alias) => {
116
130
cy . wrap ( component , { log : false } ) . as ( displayname )
117
131
} )
118
132
cy . copyComponentStyles ( jsx )
133
+ . then ( ( ) => {
134
+ cmd . snapshot ( ) . end ( )
135
+ } )
119
136
}
120
137
121
138
Cypress . Commands . add ( 'mount' , mount )
@@ -174,8 +191,7 @@ before(() => {
174
191
cy . log ( 'Initializing UMD module cache' ) . then ( ( ) => {
175
192
for ( const module of moduleNames ) {
176
193
let { name, type, location } = module
177
- cy . log ( `Loading ${ name } via ${ type } ` )
178
- . readFile ( location )
194
+ cy . readFile ( location , { log :false } )
179
195
. then ( source => Cypress . modules . push ( { name, type, location, source } ) )
180
196
}
181
197
} )
You can’t perform that action at this time.
0 commit comments