@@ -494,6 +494,7 @@ frameworks.forEach((framework) => {
494494 fixture `${ framework } ${ title } ` . page `${ url } ${ framework } ` ;
495495
496496 test ( "Focus remove or add button removing" , async ( t ) => {
497+ await t . resizeWindow ( 1920 , 1080 ) ;
497498 await initSurvey ( framework , {
498499 focusFirstQuestionAutomatic : true ,
499500 elements : [
@@ -526,6 +527,7 @@ frameworks.forEach((framework) => {
526527 await t . expect ( await getSurveyResult ( ) ) . eql ( { matrix : [ { name : "abc123" } ] } ) ;
527528 } ) ;
528529 test ( "Focus remove or add button removing for horizontal columns layout" , async ( t ) => {
530+ await t . resizeWindow ( 1920 , 1080 ) ;
529531 await initSurvey ( framework , {
530532 focusFirstQuestionAutomatic : true ,
531533 elements : [
@@ -559,6 +561,7 @@ frameworks.forEach((framework) => {
559561 await t . expect ( await getSurveyResult ( ) ) . eql ( { matrix : [ { name : "abc123" } ] } ) ;
560562 } ) ;
561563 test ( "Editing cell loses focus when a dependent column appears, Bug#9233" , async ( t ) => {
564+ await t . resizeWindow ( 1920 , 1080 ) ;
562565 await initSurvey ( framework , {
563566 textUpdateMode : "onTyping" ,
564567 elements : [
@@ -596,4 +599,52 @@ frameworks.forEach((framework) => {
596599
597600 await t . expect ( await getSurveyResult ( ) ) . eql ( { matrix : [ { col2 : "abc" } ] } ) ;
598601 } ) ;
602+ test ( "show/hide details mobile" , async ( t ) => {
603+ await initSurvey ( framework , {
604+ "title" : "TEST" ,
605+ "description" : "TEST" ,
606+ "logoPosition" : "right" ,
607+ "pages" : [
608+ {
609+ "name" : "page1" ,
610+ "elements" : [
611+ {
612+ "type" : "matrixdynamic" ,
613+ "name" : "matrix" ,
614+ "titleLocation" : "hidden" ,
615+ "verticalAlign" : "top" ,
616+ "columns" : [
617+ {
618+ "name" : "header" ,
619+ "cellType" : "text" ,
620+ } ,
621+ ] ,
622+ "detailElements" : [
623+ {
624+ "name" : "detail" ,
625+ "type" : "text" ,
626+ } ,
627+ ] ,
628+ "detailPanelMode" : "underRowSingle" ,
629+ "cellType" : "text" ,
630+ "rowCount" : 1 ,
631+ "addRowLocation" : "top" ,
632+ "hideColumnsIfEmpty" : true ,
633+ "detailPanelShowOnAdding" : true
634+ }
635+ ]
636+ }
637+ ] ,
638+ "showNavigationButtons" : "none" ,
639+ "showQuestionNumbers" : "off"
640+ } ) ;
641+ await t . resizeWindow ( 600 , 1080 ) ;
642+ await t . click ( Selector ( "button" ) . withText ( "Add Row" ) ) ;
643+ await t . expect ( Selector ( "#show-detail-mobile" ) . filterVisible ( ) . nth ( 0 ) . innerText ) . contains ( "Show Details" ) ;
644+ await t . expect ( Selector ( "#show-detail-mobile" ) . filterVisible ( ) . nth ( 1 ) . innerText ) . contains ( "Hide Details" ) ;
645+
646+ await t . click ( Selector ( "#show-detail-mobile button" ) . filterVisible ( ) . nth ( 0 ) ) ;
647+ await t . expect ( Selector ( "#show-detail-mobile" ) . filterVisible ( ) . nth ( 0 ) . innerText ) . contains ( "Hide Details" ) ;
648+ await t . expect ( Selector ( "#show-detail-mobile" ) . filterVisible ( ) . nth ( 1 ) . innerText ) . contains ( "Show Details" ) ;
649+ } ) ;
599650} ) ;
0 commit comments