diff --git a/main/tests/cypress/cypress/integration/project/grid/column/text_filter.spec.js b/main/tests/cypress/cypress/integration/project/grid/column/text_filter.spec.js index 1622bcfde..375441333 100644 --- a/main/tests/cypress/cypress/integration/project/grid/column/text_filter.spec.js +++ b/main/tests/cypress/cypress/integration/project/grid/column/text_filter.spec.js @@ -57,6 +57,16 @@ describe('Checks Text-filter + Case Sensitive + Regex', () => { ); }); + it('check multiple regex option', () => { + cy.loadAndVisitProject('food.mini'); + cy.columnActionClick('Shrt_Desc', ['Text filter']); + cy.columnActionClick('Shrt_Desc', ['Text filter']); + cy.get('#regexCheckbox0').should('be.visible'); + cy.get('#regexCheckbox1').should('be.visible').click(); + cy.get('#regexCheckbox0').should('not.be.checked'); + cy.get('#regexCheckbox1').should('be.checked'); + }); + it('check Invert option and Reset Option', () => { cy.loadAndVisitProject('food.small'); cy.columnActionClick('Shrt_Desc', ['Text filter']); diff --git a/main/webapp/modules/core/scripts/facets/text-search-facet.js b/main/webapp/modules/core/scripts/facets/text-search-facet.js index 23168d5ff..aa8bcb5fa 100644 --- a/main/webapp/modules/core/scripts/facets/text-search-facet.js +++ b/main/webapp/modules/core/scripts/facets/text-search-facet.js @@ -41,12 +41,12 @@ class TextSearchFacet extends Facet { this._query = config.query || null; this._timerID = null; - this.textSearchFacetCounterForLabels = 0; - this._initializeUI(); this._update(); }; + static textSearchFacetCounterForLabels = 0; + reset() { this._query = null; this._div.find(".input-container input").each(function() { this.value = ""; }); @@ -203,9 +203,9 @@ class TextSearchFacet extends Facet { }; _uniqueIdForLabels() { - return this.textSearchFacetCounterForLabels++; + return TextSearchFacet.textSearchFacetCounterForLabels++; }; -}; +} TextSearchFacet.reconstruct = function(div, uiState) {