From 589396b6292e3058ef8a84616551ae65f0ab6f03 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 7645d51c7..61f78c227 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 82efbe1b3..07d7e8868 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 e5bf49c9d..185737a91 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) {