@@ -438,7 +438,7 @@ test("Question and page collapse button title", async (t) => {
438
438
await t . click ( qCollapseButton ) ;
439
439
await t . expect ( qCollapseButton . getAttribute ( "title" ) ) . eql ( "Expand" ) ;
440
440
441
- const pCollapseButton = Selector ( ".svc-page__content #collapse button" ) ;
441
+ const pCollapseButton = Selector ( ".svc-page__content > .svc-question__drag-area #collapse button" ) ;
442
442
await t . expect ( pCollapseButton . getAttribute ( "title" ) ) . eql ( "Collapse" ) ;
443
443
await t . click ( pCollapseButton ) ;
444
444
await t . expect ( pCollapseButton . getAttribute ( "title" ) ) . eql ( "Expand" ) ;
@@ -586,31 +586,31 @@ test("Page adorner - collapse button in differen modes", async (t) => {
586
586
} ;
587
587
await setJSON ( json ) ;
588
588
await t . hover ( getToolboxItemByText ( "Single-Line Input" ) ) ;
589
- const qContent = Selector ( ".svc-page__content" ) ;
590
- const qCollapseButton = Selector ( ".svc-page__content #collapse" ) ;
589
+ const pContent = Selector ( ".svc-page__content" ) ;
590
+ const pCollapseButton = Selector ( ".svc-page__content > .svc-question__drag-area #collapse button " ) ;
591
591
const actions = Selector ( ".svc-page__content-actions" ) ;
592
- await t . hover ( qContent , { offsetX : 10 , offsetY : 10 } ) ;
592
+ await t . hover ( pContent , { offsetX : 10 , offsetY : 10 } ) ;
593
593
await t . expect ( Selector ( ".svc-page__content" ) . hasClass ( "svc-hovered" ) ) . ok ( { timeout : 3000 } ) ;
594
- await t . expect ( qCollapseButton . visible ) . notOk ( ) ;
595
- await t . click ( qContent , { offsetX : 10 , offsetY : 10 } ) ;
596
- await t . expect ( qContent . hasClass ( "svc-page__content--selected" ) ) . ok ( ) ;
597
- await t . expect ( qCollapseButton . visible ) . notOk ( ) ;
594
+ await t . expect ( pCollapseButton . visible ) . notOk ( ) ;
595
+ await t . click ( pContent , { offsetX : 10 , offsetY : 10 } ) ;
596
+ await t . expect ( pContent . hasClass ( "svc-page__content--selected" ) ) . ok ( ) ;
597
+ await t . expect ( pCollapseButton . visible ) . notOk ( ) ;
598
598
599
599
await ClientFunction ( ( ) => { window [ "creator" ] . expandCollapseButtonVisibility = "onhover" ; } ) ( ) ;
600
600
json . elements [ 0 ] . name = "question2" ;
601
601
await setJSON ( json ) ;
602
602
await t . hover ( getToolboxItemByText ( "Single-Line Input" ) ) ;
603
603
await t . expect ( actions . getStyleProperty ( "opacity" ) ) . eql ( "0" ) ;
604
- await t . hover ( qContent , { offsetX : 10 , offsetY : 10 } ) ;
605
- await t . expect ( qCollapseButton . visible ) . ok ( ) ;
606
- await t . click ( qContent , { offsetX : 10 , offsetY : 10 } ) ;
607
- await t . expect ( qContent . hasClass ( "svc-page__content--selected" ) ) . ok ( ) ;
608
- await t . expect ( qCollapseButton . visible ) . ok ( ) ;
604
+ await t . hover ( pContent , { offsetX : 10 , offsetY : 10 } ) ;
605
+ await t . expect ( pCollapseButton . visible ) . ok ( ) ;
606
+ await t . click ( pContent , { offsetX : 10 , offsetY : 10 } ) ;
607
+ await t . expect ( pContent . hasClass ( "svc-page__content--selected" ) ) . ok ( ) ;
608
+ await t . expect ( pCollapseButton . visible ) . ok ( ) ;
609
609
610
610
await ClientFunction ( ( ) => { window [ "creator" ] . expandCollapseButtonVisibility = "always" ; } ) ( ) ;
611
611
json . elements [ 0 ] . name = "question3" ;
612
612
await t . hover ( getToolboxItemByText ( "Single-Line Input" ) ) ;
613
613
await setJSON ( json ) ;
614
- await t . expect ( qCollapseButton . visible ) . ok ( ) ;
614
+ await t . expect ( pCollapseButton . visible ) . ok ( ) ;
615
615
await ClientFunction ( ( ) => { window [ "creator" ] . expandCollapseButtonVisibility = "never" ; } ) ( ) ;
616
616
} ) ;
0 commit comments