kpmck / cypress-ag-grid

Cypress plugin for interacting with ag grid
30 stars 17 forks source link

Multiple filter conditions do not accept multiple operators #41

Closed gdeo closed 1 year ago

gdeo commented 1 year ago
image

Trying to test the above filter with multiple operators. 'agGridColumnFilterTextFloating' fails since it finds 2 dropdowns and it's only looking for 1.

cy.get(#mygrid).agGridColumnFilterTextFloating({
            searchCriteria: 
            {
              columnName: column1,
              operator: “Starts with”,
              filterValue: 'A',
              searchInputIndex: 0,
            },

            multiple: true,
            hasApplyButton: false,
          });

          cy.get(#mygrid).agGridColumnFilterTextFloating({
            searchCriteria: 
            {
              columnName: column1,
              operator: “Ends with”,
              filterValue: ‘ed’,
              searchInputIndex: 1,
            },

            multiple: true,
            hasApplyButton: false,
          });
        });

This is the error I got -

image

The same code works if I don't specify the operator in the second condition, leaving it as 'Contains' which is default. Also, is there a way to select the radio buttons AND/OR?

kpmck commented 1 year ago

Thanks for pointing this out, @gdeo, and apologies for the delayed response! I haven't had much free time this year to dig into some issues, but will work on some outstanding tickets this week. I will take a look at this and get back to you as soon as possible. Thank you for your patience.

kpmck commented 1 year ago

Thanks for your patience @gdeo! This has been fixed and is part of v.2.0.3. I also included a new test that shows this behavior if you need a reference: able to filter by agTextColumnFilter with join operator.