@@ -1520,7 +1520,7 @@ describe('IgxGrid - Advanced Filtering #grid - ', () => {
15201520 fix . detectChanges ( ) ;
15211521 } ) ) ;
15221522
1523- it ( `Should have 'In'/'Not-In' operators for fields with chilld entities.` , fakeAsync ( ( ) => {
1523+ it ( `Should NOT have 'In'/'Not-In' operators for not chilld entities fields .` , fakeAsync ( ( ) => {
15241524 // Populate edit inputs.
15251525 QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 0 ) ; // Select 'ID' column.
15261526
@@ -1530,7 +1530,7 @@ describe('IgxGrid - Advanced Filtering #grid - ', () => {
15301530 const queryBuilderElement : HTMLElement = fix . debugElement . queryAll ( By . css ( `.${ QueryBuilderSelectors . QUERY_BUILDER_TREE } ` ) ) [ 0 ] . nativeElement ;
15311531 const dropdownValues : string [ ] = QueryBuilderFunctions . getQueryBuilderSelectDropdownItems ( queryBuilderElement ) . map ( ( x : any ) => x . innerText ) ;
15321532 const expectedValues = [ 'Contains' , 'Does Not Contain' , 'Starts With' , 'Ends With' , 'Equals' ,
1533- 'Does Not Equal' , 'Empty' , 'Not Empty' , 'Null' , 'Not Null' , 'In' , 'Not In' ] ; ;
1533+ 'Does Not Equal' , 'Empty' , 'Not Empty' , 'Null' , 'Not Null' ] ; ;
15341534 expect ( dropdownValues ) . toEqual ( expectedValues ) ;
15351535
15361536 // Close Advanced Filtering dialog.
@@ -1539,60 +1539,33 @@ describe('IgxGrid - Advanced Filtering #grid - ', () => {
15391539 fix . detectChanges ( ) ;
15401540 } ) ) ;
15411541
1542- it ( `Should NOT have 'In'/'Not-In' operators for fields without chilld entities.` , fakeAsync ( ( ) => {
1542+ it ( `Should have 'In'/'Not-In' operators for chilld entities fields .` , fakeAsync ( ( ) => {
15431543 // Populate edit inputs.
1544- QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 0 ) ; // Select 'ID' column.
1545- QueryBuilderFunctions . selectOperatorInEditModeExpression ( fix , 10 ) ; // Select 'In' operator.
1546-
1547- // Select entity in nested level
1548- QueryBuilderFunctions . selectEntityAndClickInitialAddCondition ( fix , 0 , 1 ) ;
1549- // Populate edit inputs on level 1.
1550- QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 0 , 1 ) ; // Select 'ID' column.
1551- QueryBuilderFunctions . selectOperatorInEditModeExpression ( fix , 11 , 1 ) ; // Select 'Not In' operator.
1544+ QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 3 ) ; // Select 'Child Data'.
15521545
1553- // Select entity in nested level
1554- QueryBuilderFunctions . selectEntityAndClickInitialAddCondition ( fix , 0 , 2 ) ;
1555- QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 0 , 2 ) ; // Select 'ID' column.
1556- // Open the operator dropdown and verify they are 'string' specific + 'In'/'Not In'.
1557- QueryBuilderFunctions . clickQueryBuilderOperatorSelect ( fix , 2 ) ;
1546+ // Open the operator dropdown and verify they are only 'In'/'Not In'.
1547+ QueryBuilderFunctions . clickQueryBuilderOperatorSelect ( fix ) ;
15581548 fix . detectChanges ( ) ;
1559- const queryBuilderElement : HTMLElement = fix . debugElement . queryAll ( By . css ( `.${ QueryBuilderSelectors . QUERY_BUILDER_TREE } ` ) ) [ 2 ] . nativeElement ;
1549+ const queryBuilderElement : HTMLElement = fix . debugElement . queryAll ( By . css ( `.${ QueryBuilderSelectors . QUERY_BUILDER_TREE } ` ) ) [ 0 ] . nativeElement ;
15601550 const dropdownValues : string [ ] = QueryBuilderFunctions . getQueryBuilderSelectDropdownItems ( queryBuilderElement ) . map ( ( x : any ) => x . innerText ) ;
1561- const expectedValues = [ 'Contains' , 'Does Not Contain' , 'Starts With' , 'Ends With' , 'Equals' ,
1562- 'Does Not Equal' , 'Empty' , 'Not Empty' , 'Null' , 'Not Null' ] ; ;
1551+ const expectedValues = [ 'In' , 'Not In' ] ; ;
15631552 expect ( dropdownValues ) . toEqual ( expectedValues ) ;
15641553
15651554 // Close Advanced Filtering dialog.
15661555 hgrid . closeAdvancedFilteringDialog ( false ) ;
15671556 tick ( 200 ) ;
1568- fix . detectChanges ( ) ;
1569- } ) ) ;
1570-
1571- it ( 'Should have correct entities depending on the hierarchy level.' , fakeAsync ( ( ) => {
1572- // Populate edit inputs.
1573- QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 0 ) ; // Select 'ID' column.
1574- QueryBuilderFunctions . selectOperatorInEditModeExpression ( fix , 10 ) ; // Select 'In' operator.
1575-
1576- QueryBuilderFunctions . clickQueryBuilderEntitySelect ( fix , 1 ) ;
15771557 fix . detectChanges ( ) ;
1578- const queryBuilderElement : HTMLElement = fix . debugElement . queryAll ( By . css ( `.${ QueryBuilderSelectors . QUERY_BUILDER_TREE } ` ) ) [ 1 ] . nativeElement ;
1579- const dropdownValues : string [ ] = QueryBuilderFunctions . getQueryBuilderSelectDropdownItems ( queryBuilderElement ) . map ( ( x : any ) => x . innerText ) ;
1580- const expectedValues = [ 'childData' ] ;
1581- expect ( dropdownValues ) . toEqual ( expectedValues ) ;
1582-
1583- // Close Advanced Filtering dialog.
1584- hgrid . closeAdvancedFilteringDialog ( false ) ;
1585- tick ( 200 ) ;
1586- fix . detectChanges ( ) ;
15871558 } ) ) ;
15881559
15891560 it ( `Should apply 'In'/'Not-In' operators for each level properly.` , fakeAsync ( ( ) => {
15901561 // Populate edit inputs.
1591- QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 0 ) ; // Select 'ID' column .
1592- QueryBuilderFunctions . selectOperatorInEditModeExpression ( fix , 10 ) ; // Select 'In' operator.
1562+ QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 3 ) ; // Select 'childData' entity .
1563+ QueryBuilderFunctions . selectOperatorInEditModeExpression ( fix , 0 ) ; // Select 'In' operator.
15931564
1594- // Select entity in nested level
1595- QueryBuilderFunctions . selectEntityAndClickInitialAddCondition ( fix , 0 , 1 ) ;
1565+ // Click the initial 'Add Condition' button.
1566+ QueryBuilderFunctions . clickQueryBuilderInitialAddConditionBtn ( fix , 1 ) ;
1567+ tick ( 100 ) ;
1568+ fix . detectChanges ( ) ;
15961569 // Populate edit inputs on level 1.
15971570 QueryBuilderFunctions . selectColumnInEditModeExpression ( fix , 0 , 1 ) ; // Select 'ID' column.
15981571 QueryBuilderFunctions . selectOperatorInEditModeExpression ( fix , 0 , 1 ) ; // Select 'Contains' operator.
0 commit comments