From 7f8695fe3b53789f26fb65ad2463c1417bdffffa Mon Sep 17 00:00:00 2001 From: cgonzalez Date: Mon, 29 Nov 2021 22:08:25 +0000 Subject: [PATCH 1/4] Fix call to debounce --- .../dashboard/components/table-grants/table-grants-view.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js b/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js index f22a781314..7ca7bc7363 100644 --- a/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js +++ b/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js @@ -121,5 +121,5 @@ module.exports = CoreView.extend({ _onSearchChanged: _.debounce(function (event) { this._userTablesModel.setQuery(event.target.value); - }, 500, this) + }, 500) }); diff --git a/package-lock.json b/package-lock.json index bf3adbad15..6ecdfdff25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cartodb-ui", - "version": "1.0.0-assets.278", + "version": "1.0.0-assets.279", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 16a71bbe3c..4165da4749 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cartodb-ui", - "version": "1.0.0-assets.278", + "version": "1.0.0-assets.279", "description": "CARTO UI frontend", "repository": { "type": "git", From 4dce50c39b9eede8a0838f390f3c9af9e143f843 Mon Sep 17 00:00:00 2001 From: cgonzalez Date: Tue, 30 Nov 2021 14:29:05 +0000 Subject: [PATCH 2/4] Fix tests and update NEWS.md --- NEWS.md | 1 + .../spec/dashboard/components/table-grants-view.spec.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/NEWS.md b/NEWS.md index c86ea7db4d..0eba588e4f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -51,6 +51,7 @@ Development - Fix verification process for active users [#16337](https://github.com/CartoDB/cartodb/pull/16337) - Avoid updating analysis nodes more than once when moving layers in Builder [#16279](https://github.com/CartoDB/cartodb/pull/16279) - Fix subscription/sample filter for datasets [#16254](https://github.com/CartoDB/cartodb/pull/16254) +- Fix form to search dataset when generating a new API key [#16378](https://github.com/CartoDB/cartodb/pull/16378) - Use fully qualified table name while creating a new map from a shared dataset [#16241](https://github.com/CartoDB/cartodb/pull/16241) - Render tileset viewer features in front of basemap [#16333](https://github.com/CartoDB/cartodb/pull/16333) - Rake task to migrate legacy synchronizations [#16353](https://github.com/CartoDB/cartodb/pull/16353) diff --git a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js index 259ed7732a..234018e22c 100644 --- a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js +++ b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js @@ -208,6 +208,11 @@ describe('dashboard/components/table-grants/table-grants-view', function () { describe('._onSearchChanged', function () { beforeEach(function () { view = createViewFn(); + jasmine.clock().install(); + }); + + afterEach(function() { + jasmine.clock().uninstall(); }); it('should call userTablesModel.setQuery', function () { @@ -220,6 +225,7 @@ describe('dashboard/components/table-grants/table-grants-view', function () { }; view._onSearchChanged(event); + jasmine.clock().tick(600); expect(userTablesModel.setQuery).toHaveBeenCalledWith(event.target.value); }); From f85a0f11bbd8f8324b764415f42ab8765b4b9a70 Mon Sep 17 00:00:00 2001 From: cgonzalez Date: Fri, 3 Dec 2021 21:13:41 +0000 Subject: [PATCH 3/4] Fix tests (again) --- .../dashboard/components/table-grants-view.spec.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js index 234018e22c..d37cddddb1 100644 --- a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js +++ b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js @@ -208,11 +208,6 @@ describe('dashboard/components/table-grants/table-grants-view', function () { describe('._onSearchChanged', function () { beforeEach(function () { view = createViewFn(); - jasmine.clock().install(); - }); - - afterEach(function() { - jasmine.clock().uninstall(); }); it('should call userTablesModel.setQuery', function () { @@ -225,9 +220,10 @@ describe('dashboard/components/table-grants/table-grants-view', function () { }; view._onSearchChanged(event); - jasmine.clock().tick(600); - expect(userTablesModel.setQuery).toHaveBeenCalledWith(event.target.value); + setTimeout(function() { + expect(userTablesModel.setQuery).toHaveBeenCalledWith(event.target.value); + }, 600); }); }); }); From 82f20a3f5e8c22f346c4ff5c52551a481aed2e57 Mon Sep 17 00:00:00 2001 From: cgonzalez Date: Fri, 3 Dec 2021 21:22:26 +0000 Subject: [PATCH 4/4] Fix Hound issues --- .../test/spec/dashboard/components/table-grants-view.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js index d37cddddb1..2740aab714 100644 --- a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js +++ b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js @@ -221,7 +221,7 @@ describe('dashboard/components/table-grants/table-grants-view', function () { view._onSearchChanged(event); - setTimeout(function() { + setTimeout(function () { expect(userTablesModel.setQuery).toHaveBeenCalledWith(event.target.value); }, 600); });