@@ -217,13 +217,38 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
217217 compareSnapshot ( image , 'toggle' ) ;
218218 } ) ;
219219
220+ function getPopulatedProperties ( elementStyles ) {
221+ for ( const prop in elementStyles ) {
222+ if (
223+ // Check the property belongs to the CSSStyleProperties instance
224+ // Check property has a numeric index (indicates inline/dash-named style)
225+ Object . hasOwn ( elementStyles , prop ) &&
226+ ! Number . isNaN ( Number . parseInt ( prop , 10 ) )
227+ ) {
228+ console . log (
229+ `${ elementStyles [ prop ] } = '${ elementStyles . getPropertyValue (
230+ elementStyles [ prop ] ,
231+ ) } '`,
232+ ) ;
233+ }
234+ }
235+ }
236+
220237 it ( 'User panel' , async ( ) => {
221238 await openPage ( getPageURL ( 'profile' ) ) ;
222239 const isCompact = await page . $ ( '.dx-toolbar-item-invisible .user-button' ) ;
223240 await page . click ( isCompact ? '.dx-dropdownmenu-button' : '.user-button' ) ;
224241 // NOTE: Wait for animation complete
225242 await new Promise ( r => setTimeout ( r , 2000 ) ) ;
226243 await page . waitForSelector ( '.dx-toolbar-item div::-p-text(My App)' ) ;
244+ if ( env . engine . startsWith ( 'nextjs' ) ) {
245+ const html = await page . $eval ( '.header-component .dx-toolbar-before' , el => el . innerHTML ) ;
246+ console . log ( '********** Toolbar Inner HTML' , html ) ;
247+ // eslint-disable-next-line
248+ const styles = await page . $eval ( '.header-component .dx-toolbar .dx-item div::-p-text(My App)' , el => window . getComputedStyle ( el ) ) ;
249+ console . log ( '********** Title Styles' ) ;
250+ getPopulatedProperties ( styles ) ;
251+ }
227252 const image = await takeScreenshot ( {
228253 clip : {
229254 x : viewport . width - 300 ,
0 commit comments