@@ -3478,7 +3478,7 @@ QUnit.test("panel.showQuestionNumbers: 'recursive'", function (assert) {
34783478 assert . equal ( survey . getQuestionByName ( "q6" ) . no , "2.2." , "q6.no" ) ;
34793479 assert . equal ( survey . getQuestionByName ( "q7" ) . no , "3." , "q7.no" ) ;
34803480} ) ;
3481- QUnit . test ( "panel .showQuestionNumbers: 'recursive'" , function ( assert ) {
3481+ QUnit . test ( "survey .showQuestionNumbers: 'recursive' & panels " , function ( assert ) {
34823482 const survey = new SurveyModel ( {
34833483 showQuestionNumbers : "recursive" ,
34843484 elements : [
@@ -3520,6 +3520,61 @@ QUnit.test("panel.showQuestionNumbers: 'recursive'", function (assert) {
35203520 assert . equal ( survey . getQuestionByName ( "q6" ) . no , "2.2." , "q6.no" ) ;
35213521 assert . equal ( survey . getQuestionByName ( "q7" ) . no , "3." , "q7.no" ) ;
35223522} ) ;
3523+ QUnit . test ( "survey.showQuestionNumbers: 'recursive' & panels & questionStartIndex 1.1, Issue#10456" , function ( assert ) {
3524+ const survey = new SurveyModel ( ) ;
3525+ survey . fromJSON ( {
3526+ showQuestionNumbers : "recursive" ,
3527+ questionStartIndex : "1.1." ,
3528+ pages : [ {
3529+ elements : [
3530+ {
3531+ type : "panel" , name : "panel1" , title : "Panel 1" ,
3532+ showNumber : true ,
3533+ elements : [
3534+ {
3535+ type : "panel" , name : "panel2" ,
3536+ title : "Panel 2" ,
3537+ elements : [
3538+ { type : "text" , name : "q1" } ,
3539+ { type : "text" , name : "q2" }
3540+ ]
3541+ } ,
3542+ { type : "text" , name : "q3" } ,
3543+ { type : "text" , name : "q4" }
3544+ ]
3545+ } ,
3546+ { type : "panel" , name : "panel3" , showNumber : true , title : "Panel 4" , elements : [
3547+ { type : "text" , name : "q5" }
3548+ ] } ,
3549+ { type : "text" , name : "q6" }
3550+ ] } ,
3551+ {
3552+ elements : [
3553+ {
3554+ type : "panel" , name : "panel4" ,
3555+ showNumber : true , title : "Panel 3" ,
3556+ elements : [
3557+ { type : "text" , name : "q7" } ,
3558+ { type : "text" , name : "q8" }
3559+ ]
3560+ } ,
3561+ { type : "text" , name : "q9" }
3562+ ] } ]
3563+ } ) ;
3564+ assert . equal ( survey . getPanelByName ( "panel1" ) . no , "1.1." , "panel1.no" ) ;
3565+ assert . equal ( survey . getPanelByName ( "panel2" ) . no , "1.1.1." , "panel2.no" ) ;
3566+ assert . equal ( survey . getPanelByName ( "panel3" ) . no , "1.2." , "panel2.no" ) ;
3567+ assert . equal ( survey . getPanelByName ( "panel4" ) . no , "2.1." , "panel4.no" ) ;
3568+ assert . equal ( survey . getQuestionByName ( "q1" ) . no , "1.1.1.1." , "q1.no" ) ;
3569+ assert . equal ( survey . getQuestionByName ( "q2" ) . no , "1.1.1.2." , "q2.no" ) ;
3570+ assert . equal ( survey . getQuestionByName ( "q3" ) . no , "1.1.2." , "q3.no" ) ;
3571+ assert . equal ( survey . getQuestionByName ( "q4" ) . no , "1.1.3." , "q4.no" ) ;
3572+ assert . equal ( survey . getQuestionByName ( "q5" ) . no , "1.2.1." , "q5.no" ) ;
3573+ assert . equal ( survey . getQuestionByName ( "q6" ) . no , "1.3." , "q6.no" ) ;
3574+ assert . equal ( survey . getQuestionByName ( "q7" ) . no , "2.1.1." , "q7.no" ) ;
3575+ assert . equal ( survey . getQuestionByName ( "q8" ) . no , "2.1.2." , "q8.no" ) ;
3576+ assert . equal ( survey . getQuestionByName ( "q9" ) . no , "2.2." , "q9.no" ) ;
3577+ } ) ;
35233578QUnit . test ( "Check that startWithNewLine doesn't trigger animation" , ( assert ) => {
35243579 settings . animationEnabled = true ;
35253580 const survey = new SurveyModel ( {
0 commit comments