@@ -830,29 +830,7 @@ export class QueryBuilderFunctions {
830830 fix . detectChanges ( ) ;
831831 }
832832
833- public static addChildGroup ( fix : ComponentFixture < any > , groupType : number , level : number ) {
834- // Click the initial 'Add Or Group' button.
835- QueryBuilderFunctions . clickQueryBuilderInitialAddGroupButton ( fix , groupType , level ) ;
836- tick ( 100 ) ;
837- fix . detectChanges ( ) ;
838-
839- QueryBuilderFunctions . selectEntityInEditModeExpression ( fix , 0 , level ) ; // Select 'Products' entity
840- tick ( 100 ) ;
841- fix . detectChanges ( ) ;
842-
843- QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 1 , level ) ; // Select 'ProductName' column.
844- QueryBuilderFunctions . selectOperatorInEditModeExpression ( fix , 0 , level ) ; // Select 'Contains' operator.
845- const input = QueryBuilderFunctions . getQueryBuilderValueInput ( fix , false , level ) . querySelector ( 'input' ) ;
846- UIInteractions . clickAndSendInputElementValue ( input , 'a' ) ;
847- tick ( 100 ) ;
848- fix . detectChanges ( ) ;
849-
850- //Commit the populated expression.
851- QueryBuilderFunctions . clickQueryBuilderExpressionCommitButton ( fix , level ) ;
852- fix . detectChanges ( ) ;
853- }
854-
855- public static addAndValidateChildGroup ( fix : ComponentFixture < any > , groupType : number , level : number ) {
833+ public static addAndValidateChildGroup ( fix : ComponentFixture < any > , groupType : number , level : number ) {
856834 // Enter values in the nested query
857835 QueryBuilderFunctions . selectEntityInEditModeExpression ( fix , 0 , level ) ; // Select 'Products' entity
858836 tick ( 100 ) ;
@@ -908,4 +886,16 @@ export class QueryBuilderFunctions {
908886 tick ( ) ;
909887 fix . detectChanges ( ) ;
910888 }
889+
890+ public static selectEntityAndClickInitialAddGroup ( fix : ComponentFixture < any > , entityIndex : number , groupIndex : number ) {
891+ // Select 'Orders' entity
892+ QueryBuilderFunctions . selectEntityInEditModeExpression ( fix , entityIndex ) ;
893+ tick ( 100 ) ;
894+ fix . detectChanges ( ) ;
895+
896+ // Click the initial 'Add Or Group' button.
897+ QueryBuilderFunctions . clickQueryBuilderInitialAddGroupButton ( fix , groupIndex ) ;
898+ tick ( 100 ) ;
899+ fix . detectChanges ( ) ;
900+ }
911901}
0 commit comments