diff --git a/app/controllers/model-types.js b/app/controllers/model-types.js index 0a61599cf3..a9ec0d80d8 100644 --- a/app/controllers/model-types.js +++ b/app/controllers/model-types.js @@ -1,5 +1,5 @@ import Controller from '@ember/controller'; -import { get, computed } from '@ember/object'; +import { action, get, computed } from '@ember/object'; import { sort } from '@ember/object/computed'; import { inject as service } from '@ember/service'; @@ -48,9 +48,14 @@ export default Controller.extend({ return true; } }); - }) -}); + }), + getStore: action(function() { + this.port.send('objectInspector:inspectByContainerLookup', { + name: 'service:store' + }); + }), +}); /** * Returns whether or not a given key has been set in storage. * @param {*} storage diff --git a/app/templates/model-types-toolbar.hbs b/app/templates/model-types-toolbar.hbs index 8d5af0775f..3843c49350 100644 --- a/app/templates/model-types-toolbar.hbs +++ b/app/templates/model-types-toolbar.hbs @@ -26,4 +26,7 @@ Order Models By Record Count + diff --git a/tests/acceptance/data-test.js b/tests/acceptance/data-test.js index 1d280ed2d8..01893ebe13 100644 --- a/tests/acceptance/data-test.js +++ b/tests/acceptance/data-test.js @@ -219,6 +219,22 @@ module('Data Tab', function(outer) { assert.dom('.js-model-type').exists({ count: 2 }); }); + + test('Can inspect store in data pane', async function(assert) { + respondWith('data:getModelTypes', { + type: 'data:modelTypesAdded', + modelTypes: getModelTypes() + }); + + await visit('/data/model-types'); + + respondWith('objectInspector:inspectByContainerLookup', ({ name }) => { + assert.equal(name, 'service:store'); + return false; + }); + + await click('[data-test-inspect-store]'); + }); }); module('Records', function(inner) {