From 845081e871afe1e099ae14493b42f1abc7a1efe6 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 4 Dec 2018 17:01:59 +0000 Subject: [PATCH] ui: Resolve bad rebase and add in KV test for change of GET for KVs (#5000) --- ui-v2/app/routes/application.js | 6 +++++- ui-v2/tests/unit/adapters/kv-test.js | 4 ++-- ui-v2/tests/unit/routes/application-test.js | 9 ++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ui-v2/app/routes/application.js b/ui-v2/app/routes/application.js index 7645d51c75..61f78c2274 100644 --- a/ui-v2/app/routes/application.js +++ b/ui-v2/app/routes/application.js @@ -3,10 +3,14 @@ import { inject as service } from '@ember/service'; import { hash } from 'rsvp'; import { get } from '@ember/object'; import { next } from '@ember/runloop'; +import { Promise } from 'rsvp'; + +import WithBlockingActions from 'consul-ui/mixins/with-blocking-actions'; + const removeLoading = function($from) { return $from.classList.remove('ember-loading'); }; -export default Route.extend({ +export default Route.extend(WithBlockingActions, { dom: service('dom'), init: function() { this._super(...arguments); diff --git a/ui-v2/tests/unit/adapters/kv-test.js b/ui-v2/tests/unit/adapters/kv-test.js index 82efbe1b37..07d7e8868f 100644 --- a/ui-v2/tests/unit/adapters/kv-test.js +++ b/ui-v2/tests/unit/adapters/kv-test.js @@ -85,11 +85,11 @@ module('Unit | Adapter | kv', function(hooks) { }); }); // not included in the above forEach as it's a slightly different concept - it('returns string KV object when calling queryRecord (or anything else) record', function() { + it('returns string KV object when calling queryRecord (or anything else) record', function(message) { const actual = adapter.dataForRequest({ requestType: 'queryRecord', }); - assert.equal(actual, null); + assert.deepEqual(actual, deep); }); }); test('methodForRequest returns the correct method', function(assert) { diff --git a/ui-v2/tests/unit/routes/application-test.js b/ui-v2/tests/unit/routes/application-test.js index e5bf49c9d4..185737a913 100644 --- a/ui-v2/tests/unit/routes/application-test.js +++ b/ui-v2/tests/unit/routes/application-test.js @@ -2,7 +2,14 @@ import { moduleFor, test } from 'ember-qunit'; moduleFor('route:application', 'Unit | Route | application', { // Specify the other units that are required for this test. - needs: ['service:repository/dc', 'service:settings', 'service:dom'], + needs: [ + 'service:repository/dc', + 'service:settings', + 'service:feedback', + 'service:flashMessages', + 'service:logger', + 'service:dom', + ], }); test('it exists', function(assert) {