ember-inspector 4.10.4 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/.github/workflows/build.yml +9 -9
  2. package/CHANGELOG.md +19 -0
  3. package/app/services/adapters/web-extension.js +5 -0
  4. package/dist/bookmarklet/panes-3-16-0/assets/{chunk.143.19ad6fbd35ab48abdce5.js → chunk.143.1816c95b481be6c0f8ef.js} +4 -4
  5. package/dist/{firefox/panes-3-16-0/assets/chunk.178.80c8fe8e9f921589de61.js → bookmarklet/panes-3-16-0/assets/chunk.178.0ffaf1f84f8bdf2ef148.js} +3 -3
  6. package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.js +3 -3
  7. package/dist/bookmarklet/panes-3-16-0/ember_debug.js +124 -152
  8. package/dist/bookmarklet/panes-3-16-0/index.html +2 -2
  9. package/dist/chrome/manifest.json +1 -1
  10. package/dist/{firefox/panes-3-16-0/assets/chunk.143.19ad6fbd35ab48abdce5.js → chrome/panes-3-16-0/assets/chunk.143.1816c95b481be6c0f8ef.js} +4 -4
  11. package/dist/{bookmarklet/panes-3-16-0/assets/chunk.178.80c8fe8e9f921589de61.js → chrome/panes-3-16-0/assets/chunk.178.0ffaf1f84f8bdf2ef148.js} +3 -3
  12. package/dist/chrome/panes-3-16-0/assets/ember-inspector.js +3 -3
  13. package/dist/chrome/panes-3-16-0/ember_debug.js +124 -152
  14. package/dist/chrome/panes-3-16-0/index.html +2 -2
  15. package/dist/firefox/manifest.json +1 -1
  16. package/dist/{chrome/panes-3-16-0/assets/chunk.143.19ad6fbd35ab48abdce5.js → firefox/panes-3-16-0/assets/chunk.143.1816c95b481be6c0f8ef.js} +4 -4
  17. package/dist/{websocket/assets/chunk.178.80c8fe8e9f921589de61.js → firefox/panes-3-16-0/assets/chunk.178.0ffaf1f84f8bdf2ef148.js} +3 -3
  18. package/dist/firefox/panes-3-16-0/assets/ember-inspector.js +3 -3
  19. package/dist/firefox/panes-3-16-0/ember_debug.js +124 -152
  20. package/dist/firefox/panes-3-16-0/index.html +2 -2
  21. package/dist/websocket/assets/{chunk.143.19ad6fbd35ab48abdce5.js → chunk.143.1816c95b481be6c0f8ef.js} +4 -4
  22. package/dist/{chrome/panes-3-16-0/assets/chunk.178.80c8fe8e9f921589de61.js → websocket/assets/chunk.178.0ffaf1f84f8bdf2ef148.js} +3 -3
  23. package/dist/websocket/assets/ember-inspector.js +3 -3
  24. package/dist/websocket/ember_debug.js +124 -152
  25. package/dist/websocket/index.html +2 -2
  26. package/ember_debug/libs/render-tree.js +108 -148
  27. package/ember_debug/object-inspector.js +25 -19
  28. package/ember_debug/utils/base-object.js +3 -1
  29. package/ember_debug/view-debug.js +1 -1
  30. package/package.json +1 -1
  31. package/tests/ember_debug/object-inspector-test.js +17 -1
  32. package/tests/ember_debug/view-debug-test.js +22 -3
  33. package/tests/index.html +1 -1
@@ -6,10 +6,8 @@ class InElementSupportProvider {
6
6
  constructor(owner) {
7
7
  this.nodeMap = new Map();
8
8
  this.remoteRoots = [];
9
- this.currentNode = null;
10
- this.nodeStack = [];
11
- this.remoteNodeStack = [];
12
9
  this.runtime = this.require('@glimmer/runtime');
10
+ this.reference = this.require('@glimmer/reference');
13
11
  try {
14
12
  this.Wormhole = requireModule('ember-wormhole/components/ember-wormhole');
15
13
  } catch (e) {
@@ -27,112 +25,122 @@ class InElementSupportProvider {
27
25
  reset() {
28
26
  this.nodeMap.clear();
29
27
  this.remoteRoots.length = 0;
30
- this.nodeStack.length = 0;
31
- this.remoteNodeStack.length = 0;
32
- this.currentRemoteNode = null;
33
- this.currentNode = null;
34
- }
35
-
36
- buildInElementNode(node) {
37
- const obj = Object.create(null);
38
- obj.index = this.currentNode?.refs?.size || 0;
39
- obj.name = 'in-element';
40
- obj.type = 'component';
41
- obj.template = null;
42
- obj.isRemote = true;
43
- obj.args = {
44
- positional: [],
45
- named: {
46
- destination: node,
47
- },
48
- };
49
- obj.instance = {
50
- args: obj.args.named,
51
- constructor: {
52
- name: 'InElement',
53
- },
54
- };
55
- obj.bounds = {
56
- firstNode: node,
57
- lastNode: node,
58
- parentElement: node.parentElement,
59
- };
60
- obj.children = [];
61
- return obj;
62
28
  }
63
29
 
64
30
  patch() {
65
31
  const self = this;
66
32
 
67
- const captureNode = this.debugRenderTree.captureNode;
68
- this.debugRenderTree.captureNode = function (...args) {
69
- const capture = captureNode.call(this, ...args);
70
- const [id, state] = args;
71
- const node = this.nodeFor(state);
72
- self.setupNodeRemotes(node, id, capture);
73
- return capture;
74
- };
33
+ const NewElementBuilder = this.NewElementBuilder;
34
+ const remoteStack = [];
35
+ const componentStack = [];
75
36
 
76
- const enter = this.debugRenderTree.enter;
77
- this.debugRenderTree.enter = function (...args) {
78
- const state = args[0];
79
- self.enter(this.nodeFor(state));
80
- return enter.call(this, ...args);
37
+ function createRef(value) {
38
+ if (self.reference.createUnboundRef) {
39
+ return self.reference.createUnboundRef(value);
40
+ } else {
41
+ return value;
42
+ }
43
+ }
44
+
45
+ const appendChild = this.debugRenderTree.appendChild;
46
+ this.debugRenderTree.appendChild = function (node, state) {
47
+ if (node.type === 'component') {
48
+ componentStack.push(node);
49
+ }
50
+ return appendChild.call(this, node, state);
81
51
  };
82
52
 
83
53
  const exit = this.debugRenderTree.exit;
84
- this.debugRenderTree.exit = function (...args) {
85
- self.exit();
86
- return exit.call(this, ...args);
54
+ this.debugRenderTree.exit = function (state) {
55
+ const node = this.nodeFor(this.stack.current);
56
+ if (node?.type === 'component') {
57
+ componentStack.pop();
58
+ }
59
+ exit.call(this, state);
87
60
  };
88
61
 
89
- const NewElementBuilder = this.NewElementBuilder;
90
62
  const didAppendNode = NewElementBuilder.prototype.didAppendNode;
91
63
  NewElementBuilder.prototype.didAppendNode = function (...args) {
92
- args[0].__emberInspectorParentNode = self.currentNode;
64
+ args[0].__emberInspectorParentNode = componentStack.at(-1);
93
65
  return didAppendNode.call(this, ...args);
94
66
  };
95
67
 
96
68
  const pushElement = NewElementBuilder.prototype.pushElement;
97
69
  NewElementBuilder.prototype.pushElement = function (...args) {
98
- args[0].__emberInspectorParentNode = self.currentNode;
99
- return pushElement.call(this, ...args);
70
+ pushElement.call(this, ...args);
71
+ args[0].__emberInspectorParentNode = componentStack.at(-1);
100
72
  };
101
73
 
102
74
  const pushRemoteElement = NewElementBuilder.prototype.pushRemoteElement;
103
- NewElementBuilder.prototype.pushRemoteElement = function (...args) {
104
- const block = pushRemoteElement.call(this, ...args);
105
- self.registerRemote(block, ...args);
106
- self.nodeStack.push(self.currentNode);
107
- self.remoteNodeStack.push(self.currentNode);
108
- self.currentRemoteNode = self.currentNode;
109
- return block;
75
+ NewElementBuilder.prototype.pushRemoteElement = function (
76
+ element,
77
+ guid,
78
+ insertBefore
79
+ ) {
80
+ remoteStack.push({ element });
81
+ const ref = createRef(element);
82
+ const capturedArgs = {
83
+ positional: [ref],
84
+ named: {},
85
+ };
86
+ if (insertBefore) {
87
+ capturedArgs.named.insertBefore = insertBefore;
88
+ }
89
+ const inElementArgs = self.reference.createUnboundRef
90
+ ? capturedArgs
91
+ : {
92
+ value() {
93
+ return capturedArgs;
94
+ },
95
+ };
96
+ const debugRenderTree = self.debugRenderTree;
97
+ debugRenderTree?.create(remoteStack.at(-1), {
98
+ type: 'keyword',
99
+ name: 'in-element',
100
+ args: inElementArgs,
101
+ instance: {
102
+ args: {
103
+ named: {
104
+ insertBefore,
105
+ },
106
+ positional: [element],
107
+ },
108
+ constructor: {
109
+ name: 'InElement',
110
+ },
111
+ },
112
+ });
113
+ return pushRemoteElement.call(this, element, guid, insertBefore);
110
114
  };
111
115
 
112
116
  const popRemoteElement = NewElementBuilder.prototype.popRemoteElement;
113
117
  NewElementBuilder.prototype.popRemoteElement = function (...args) {
114
- const block = popRemoteElement.call(this, ...args);
115
- self.remoteNodeStack.pop();
116
- self.nodeStack.pop();
117
- self.currentRemoteNode =
118
- self.remoteNodeStack[self.remoteNodeStack.length - 1];
119
- return block;
118
+ const element = this.element;
119
+ popRemoteElement.call(this, ...args);
120
+ const parentElement = this.element;
121
+ const debugRenderTree = self.debugRenderTree;
122
+ debugRenderTree?.didRender(remoteStack.at(-1), {
123
+ parentElement: () => parentElement,
124
+ firstNode: () => element,
125
+ lastNode: () => element,
126
+ });
127
+ remoteStack.pop();
120
128
  };
121
129
 
122
130
  this.debugRenderTreeFunctions = {
131
+ appendChild,
123
132
  exit,
124
- enter,
125
- captureNode,
126
133
  };
127
134
  this.NewElementBuilderFunctions = {
128
135
  pushElement,
129
136
  pushRemoteElement,
137
+ popRemoteElement,
130
138
  didAppendNode,
131
139
  };
132
140
  }
133
141
 
134
142
  teardown() {
135
- if (!this.debugRenderTreeFunctions) {
143
+ if (!this.NewElementBuilderFunctions) {
136
144
  return;
137
145
  }
138
146
  Object.assign(this.debugRenderTree, this.debugRenderTreeFunctions);
@@ -147,77 +155,6 @@ class InElementSupportProvider {
147
155
  ? requireModule(req)
148
156
  : EmberLoader.require(req);
149
157
  }
150
-
151
- enter(node) {
152
- if (this.currentNode && this.currentNode === this.currentRemoteNode) {
153
- this.currentRemoteNode.children.push(node);
154
- node.remoteParent = this.currentRemoteNode;
155
- }
156
- this.currentNode = node;
157
- this.nodeStack.push(this.currentNode);
158
- }
159
-
160
- exit() {
161
- this.nodeStack.pop();
162
- this.currentNode = this.nodeStack[this.nodeStack.length - 1];
163
- }
164
-
165
- registerRemote(block, node) {
166
- const obj = this.buildInElementNode(node);
167
- if (this.currentNode) {
168
- this.currentNode.remotes = this.currentNode.remotes || [];
169
- this.currentNode.remotes.push(obj);
170
- }
171
- this.remoteRoots.push(obj);
172
- this.currentNode = obj;
173
- }
174
-
175
- setupNodeRemotes(node, id, capture) {
176
- capture.isInRemote = !!node.remoteParent;
177
- this.nodeMap.set(node, id);
178
- if (node.remoteParent) {
179
- const idx = node.remoteParent.children.indexOf(node);
180
- if (idx >= 0) {
181
- node.remoteParent.children[idx] = capture;
182
- }
183
- }
184
- capture.children = capture.children.filter((c) => !c.isInRemote);
185
- node.remotes?.forEach((remote) => {
186
- remote.id = 'remote-render-node:' + this.remoteRoots.length;
187
- this.nodeMap.set(remote, remote.id);
188
- this.remoteRoots.push(remote);
189
- capture.children.splice(remote.index, 0, remote);
190
- });
191
- if (capture.instance?.__emberInspectorTargetNode) {
192
- Object.defineProperty(capture, 'bounds', {
193
- get() {
194
- return {
195
- firstNode: capture.instance.__emberInspectorTargetNode,
196
- lastNode: capture.instance.__emberInspectorTargetNode,
197
- parentElement:
198
- capture.instance.__emberInspectorTargetNode.parentElement,
199
- };
200
- },
201
- });
202
- }
203
- if (this.Wormhole && capture.instance instanceof this.Wormhole.default) {
204
- this.remoteRoots.push(capture);
205
- const bounds = capture.bounds;
206
- Object.defineProperty(capture, 'bounds', {
207
- get() {
208
- if (capture.instance._destination) {
209
- return {
210
- firstNode: capture.instance._destination,
211
- lastNode: capture.instance._destination,
212
- parentElement: capture.instance._destination.parentElement,
213
- };
214
- }
215
- return bounds;
216
- },
217
- });
218
- }
219
- return capture;
220
- }
221
158
  }
222
159
 
223
160
  export default class RenderTree {
@@ -238,6 +175,7 @@ export default class RenderTree {
238
175
  try {
239
176
  this.inElementSupport = new InElementSupportProvider(owner);
240
177
  } catch (e) {
178
+ console.error('failed to setup in element support', e);
241
179
  // not supported
242
180
  }
243
181
 
@@ -321,7 +259,7 @@ export default class RenderTree {
321
259
  let hintNode = this._findUp(this.nodes[hint]);
322
260
  let hints = [hintNode];
323
261
  if (node.__emberInspectorParentNode) {
324
- const remoteNode = this.inElementSupport.nodeMap.get(node);
262
+ const remoteNode = this.inElementSupport?.nodeMap.get(node);
325
263
  const n = remoteNode && this.nodes[remoteNode];
326
264
  hints.push(n);
327
265
  }
@@ -492,6 +430,31 @@ export default class RenderTree {
492
430
 
493
431
  if (serialized === undefined) {
494
432
  this.nodes[node.id] = node;
433
+ if (node.type === 'keyword') {
434
+ node.type = 'component';
435
+ this.inElementSupport?.nodeMap.set(node, node.id);
436
+ this.inElementSupport?.remoteRoots.push(node);
437
+ }
438
+
439
+ if (
440
+ this.inElementSupport?.Wormhole &&
441
+ node.instance instanceof this.inElementSupport.Wormhole.default
442
+ ) {
443
+ this.inElementSupport?.remoteRoots.push(node);
444
+ const bounds = node.bounds;
445
+ Object.defineProperty(node, 'bounds', {
446
+ get() {
447
+ if (node.instance._destination) {
448
+ return {
449
+ firstNode: node.instance._destination,
450
+ lastNode: node.instance._destination,
451
+ parentElement: node.instance._destination.parentElement,
452
+ };
453
+ }
454
+ return bounds;
455
+ },
456
+ });
457
+ }
495
458
 
496
459
  if (parentNode) {
497
460
  this.parentNodes[node.id] = parentNode;
@@ -679,11 +642,8 @@ function isSingleNode({ firstNode, lastNode }) {
679
642
  return firstNode === lastNode;
680
643
  }
681
644
 
682
- function isAttached({ parentElement, firstNode, lastNode }) {
683
- return (
684
- parentElement === firstNode.parentElement &&
685
- parentElement === lastNode.parentElement
686
- );
645
+ function isAttached({ firstNode, lastNode }) {
646
+ return firstNode.isConnected && lastNode.isConnected;
687
647
  }
688
648
 
689
649
  function isEmptyRect({ x, y, width, height }) {
@@ -217,27 +217,22 @@ function getTagTrackedProps(tag, ownTag, level = 0) {
217
217
  }
218
218
  const subtags = tag.subtags || (Array.isArray(tag.subtag) ? tag.subtag : []);
219
219
  if (tag.subtag && !Array.isArray(tag.subtag)) {
220
- if (tag.subtag._propertyKey)
221
- props.push(
222
- (tag.subtag._object ? getObjectName(tag.subtag._object) + '.' : '') +
223
- tag.subtag._propertyKey
224
- );
220
+ if (tag.subtag._propertyKey) props.push(tag.subtag);
221
+
225
222
  props.push(...getTagTrackedProps(tag.subtag, ownTag, level + 1));
226
223
  }
227
224
  if (subtags) {
228
225
  subtags.forEach((t) => {
229
226
  if (t === ownTag) return;
230
- if (t._propertyKey)
231
- props.push(
232
- (t._object ? getObjectName(t._object) + '.' : '') + t._propertyKey
233
- );
227
+ if (t._propertyKey) props.push(t);
234
228
  props.push(...getTagTrackedProps(t, ownTag, level + 1));
235
229
  });
236
230
  }
237
231
  return props;
238
232
  }
239
233
 
240
- function getTrackedDependencies(object, property, tag) {
234
+ function getTrackedDependencies(object, property, tagInfo) {
235
+ const tag = tagInfo.tag;
241
236
  const proto = Object.getPrototypeOf(object);
242
237
  if (!proto) return [];
243
238
  const cpDesc = emberMeta(object).peekDescriptors(property);
@@ -249,21 +244,32 @@ function getTrackedDependencies(object, property, tag) {
249
244
  const ownTag = tagForProperty(object, property);
250
245
  const props = getTagTrackedProps(tag, ownTag);
251
246
  const mapping = {};
252
- props.forEach((p) => {
247
+ let maxRevision = tagInfo.revision ?? 0;
248
+ let minRevision = Infinity;
249
+ props.forEach((t) => {
250
+ const p =
251
+ (t._object ? getObjectName(t._object) + '.' : '') + t._propertyKey;
253
252
  const [objName, ...props] = p.split('.');
254
253
  mapping[objName] = mapping[objName] || new Set();
255
- props.forEach((p) => mapping[objName].add(p));
254
+ maxRevision = Math.max(maxRevision, t.revision);
255
+ minRevision = Math.min(minRevision, t.revision);
256
+ props.forEach((p) => mapping[objName].add([p, t.revision]));
256
257
  });
257
258
 
259
+ const hasChange = maxRevision !== minRevision;
260
+
258
261
  Object.entries(mapping).forEach(([objName, props]) => {
259
262
  if (props.size > 1) {
260
263
  dependentKeys.push(objName);
261
264
  props.forEach((p) => {
262
- dependentKeys.push(' • -- ' + p);
265
+ const changed = hasChange && p[1] >= maxRevision ? ' 🔸' : '';
266
+ dependentKeys.push(' • -- ' + p[0] + changed);
263
267
  });
264
268
  }
265
269
  if (props.size === 1) {
266
- dependentKeys.push(objName + '.' + [...props][0]);
270
+ const p = [...props][0];
271
+ const changed = hasChange && p[1] >= maxRevision ? ' 🔸' : '';
272
+ dependentKeys.push(objName + '.' + p[0] + changed);
267
273
  }
268
274
  if (props.size === 0) {
269
275
  dependentKeys.push(objName);
@@ -325,7 +331,6 @@ export default class extends DebugPort {
325
331
  tagInfo.tag = track(() => {
326
332
  value = object.get?.(item.name) || object[item.name];
327
333
  });
328
- tagInfo.revision = tagValue(tagInfo.tag);
329
334
  }
330
335
  tracked[item.name] = tagInfo;
331
336
  } else {
@@ -344,8 +349,9 @@ export default class extends DebugPort {
344
349
  dependentKeys = getTrackedDependencies(
345
350
  object,
346
351
  item.name,
347
- tracked[item.name].tag
352
+ tracked[item.name]
348
353
  );
354
+ tracked[item.name].revision = tagValue(tracked[item.name].tag);
349
355
  }
350
356
  this.sendMessage('updateProperty', {
351
357
  objectId,
@@ -1121,12 +1127,12 @@ function calculateCPs(
1121
1127
  item.isTracked = true;
1122
1128
  }
1123
1129
  }
1124
- tagInfo.revision = tagValue(tagInfo.tag);
1125
1130
  item.dependentKeys = getTrackedDependencies(
1126
1131
  object,
1127
1132
  item.name,
1128
- tagInfo.tag
1133
+ tagInfo
1129
1134
  );
1135
+ tagInfo.revision = tagValue(tagInfo.tag);
1130
1136
  } else {
1131
1137
  value = calculateCP(object, item, errorsForObject);
1132
1138
  }
@@ -1317,7 +1323,7 @@ function calculateCP(object, item, errorsForObject) {
1317
1323
  if (object instanceof Ember.ArrayProxy && property == parseInt(property)) {
1318
1324
  return object.objectAt(property);
1319
1325
  }
1320
- return item.isGetter || property.includes('.')
1326
+ return item.isGetter || property.includes?.('.')
1321
1327
  ? object[property]
1322
1328
  : object.get?.(property) || object[property]; // need to use `get` to be able to detect tracked props
1323
1329
  } catch (error) {
@@ -6,7 +6,9 @@ export default class BaseObject {
6
6
  }
7
7
 
8
8
  init() {}
9
- willDestroy() {}
9
+ willDestroy() {
10
+ this.isDestroying = true;
11
+ }
10
12
 
11
13
  destroy() {
12
14
  this.willDestroy();
@@ -152,7 +152,7 @@ export default class extends DebugPort {
152
152
  }
153
153
 
154
154
  send() {
155
- if (this.isDestroying) {
155
+ if (this.isDestroying || this.isDestroyed) {
156
156
  return;
157
157
  }
158
158
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-inspector",
3
- "version": "4.10.4",
3
+ "version": "4.11.0",
4
4
  "description": "Extends developer tools to allow you to better inspect your Ember.js apps.",
5
5
  "repository": "https://github.com/emberjs/ember-inspector",
6
6
  "license": "MIT",
@@ -278,7 +278,7 @@ module('Ember Debug - Object Inspector', function (hooks) {
278
278
  assert.strictEqual(prop.name, 'getterWithTracked');
279
279
  assert.strictEqual(prop.value.type, 'type-string');
280
280
  assert.strictEqual(prop.value.inspect, '"item1item2tracked"');
281
- const dependentKeys =
281
+ let dependentKeys =
282
282
  compareVersion(VERSION, '3.16.10') === 0
283
283
  ? 'item1,item2,trackedProperty'
284
284
  : 'ObjectWithTracked, • -- item1, • -- item2,Object:My Object.trackedProperty';
@@ -292,6 +292,22 @@ module('Ember Debug - Object Inspector', function (hooks) {
292
292
  assert.strictEqual(prop.name, 'aCP');
293
293
  assert.strictEqual(prop.value.type, 'type-boolean');
294
294
  assert.strictEqual(prop.dependentKeys.toString(), '');
295
+
296
+ inspected.objectWithTracked.item1 = 'item1-changed';
297
+ message = await captureMessage('objectInspector:updateObject', () => {
298
+ objectInspector.sendObject(inspected);
299
+ });
300
+
301
+ secondDetail = message.details[1];
302
+ prop = secondDetail.properties[1];
303
+ assert.strictEqual(prop.name, 'getterWithTracked');
304
+ assert.strictEqual(prop.value.type, 'type-string');
305
+ assert.strictEqual(prop.value.inspect, '"item1-changeditem2tracked"');
306
+ dependentKeys =
307
+ compareVersion(VERSION, '3.16.10') === 0
308
+ ? 'item1,item2,trackedProperty'
309
+ : 'ObjectWithTracked, • -- item1 🔸, • -- item2,Object:My Object.trackedProperty';
310
+ assert.strictEqual(prop.dependentKeys.toString(), dependentKeys);
295
311
  });
296
312
 
297
313
  skip('Correct mixin order with es6 class', async function (assert) {
@@ -73,6 +73,14 @@ async function digDeeper(objectId, property) {
73
73
  });
74
74
  }
75
75
 
76
+ async function inspectById(objectId) {
77
+ return await captureMessage('objectInspector:updateObject', async () => {
78
+ EmberDebug.port.trigger('objectInspector:inspectById', {
79
+ objectId,
80
+ });
81
+ });
82
+ }
83
+
76
84
  async function getRenderTree() {
77
85
  let message = await captureMessage('view:renderTree', async () => {
78
86
  EmberDebug.port.trigger('view:getTree', {});
@@ -652,7 +660,18 @@ module('Ember Debug - View', function (hooks) {
652
660
  Component(
653
661
  {
654
662
  name: 'in-element',
655
- args: Args({ names: ['destination'], positionals: 0 }),
663
+ args: (actual) => {
664
+ QUnit.assert.ok(actual.positional[0]);
665
+ async function testArgsValue() {
666
+ const value = await inspectById(actual.positional[0].id);
667
+ QUnit.assert.equal(
668
+ value.details[1].name,
669
+ 'HTMLDivElement',
670
+ 'in-element args value inspect should be correct'
671
+ );
672
+ }
673
+ argsTestPromise = testArgsValue();
674
+ },
656
675
  template: null,
657
676
  },
658
677
  Component({
@@ -712,7 +731,7 @@ module('Ember Debug - View', function (hooks) {
712
731
  Component(
713
732
  {
714
733
  name: 'in-element',
715
- args: Args({ names: ['destination'], positionals: 0 }),
734
+ args: Args({ names: [], positionals: 1 }),
716
735
  template: null,
717
736
  },
718
737
  Component({
@@ -951,7 +970,7 @@ module('Ember Debug - View', function (hooks) {
951
970
 
952
971
  assert
953
972
  .dom('.ember-inspector-tooltip-header', tooltip)
954
- .hasText('<InElement>');
973
+ .hasText('{{in-element}}');
955
974
 
956
975
  let actual = highlight.getBoundingClientRect();
957
976
  let expected = inElement.getBoundingClientRect();
package/tests/index.html CHANGED
@@ -41,7 +41,7 @@
41
41
  <div id="ember-testing"></div>
42
42
  </div>
43
43
  </div>
44
-
44
+
45
45
  <script src="/testem.js" integrity="" data-embroider-ignore></script>
46
46
  <script src="{{rootURL}}assets/vendor.js"></script>
47
47
  <script src="{{rootURL}}assets/test-support.js"></script>