tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject [tez] branch branch-0.9 updated: TEZ-4034. Column selector filter should be case-insensitive (Jacob Tolar via jeagles)
Date Fri, 15 Feb 2019 22:30:36 GMT
This is an automated email from the ASF dual-hosted git repository.

jeagles pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/tez.git


The following commit(s) were added to refs/heads/branch-0.9 by this push:
     new 62ada7a  TEZ-4034. Column selector filter should be case-insensitive (Jacob Tolar
via jeagles)
62ada7a is described below

commit 62ada7af9879fc3a75d5f397d9ff677df687da43
Author: Jonathan Eagles <jeagles@gmail.com>
AuthorDate: Fri Feb 15 16:29:21 2019 -0600

    TEZ-4034. Column selector filter should be case-insensitive (Jacob Tolar via jeagles)
    
    (cherry picked from commit 1234c028b5c088a4d3492a2aab6c91f4f0d3d19b)
---
 .../main/webapp/app/components/column-selector.js    |  2 +-
 .../integration/components/column-selector-test.js   | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/tez-ui/src/main/webapp/app/components/column-selector.js b/tez-ui/src/main/webapp/app/components/column-selector.js
index 8f9ac13..94739f3 100644
--- a/tez-ui/src/main/webapp/app/components/column-selector.js
+++ b/tez-ui/src/main/webapp/app/components/column-selector.js
@@ -65,7 +65,7 @@ export default Ember.Component.extend({
     }
 
     return options.filter(function (option) {
-      return option.get('displayText').match(searchText);
+      return option.get('displayText').match(new RegExp(searchText, 'i'));
     });
   }),
 
diff --git a/tez-ui/src/main/webapp/tests/integration/components/column-selector-test.js b/tez-ui/src/main/webapp/tests/integration/components/column-selector-test.js
index 0034059..9fe7d8a 100644
--- a/tez-ui/src/main/webapp/tests/integration/components/column-selector-test.js
+++ b/tez-ui/src/main/webapp/tests/integration/components/column-selector-test.js
@@ -85,3 +85,23 @@ test('searchText test', function(assert) {
 
   assert.equal(this.$(".select-option").text().trim(), '');
 });
+
+test('case-insensitive searchText test', function(assert) {
+
+  this.setProperties({
+    searchText: "test",
+    content: {
+      visibleColumnIDs: {
+        testID: true,
+      },
+      columns: [Ember.Object.create({
+        id: "testID",
+        headerTitle: "Test Column"
+      })]
+    }
+  });
+
+  this.render(hbs`{{column-selector content=content searchText=searchText}}`);
+
+  assert.equal(this.$(".select-option").text().trim(), 'Test Column');
+});


Mime
View raw message