diff --git a/tests/components/hand-tracking-controls.test.js b/tests/components/hand-tracking-controls.test.js index a58acf237fd..19e5ad92230 100644 --- a/tests/components/hand-tracking-controls.test.js +++ b/tests/components/hand-tracking-controls.test.js @@ -68,8 +68,6 @@ suite('tracked-controls-webxr', function () { suite('children entities', function () { test('attached to the wrist joint', function (done) { var boxEl = document.createElement('a-box'); - el.setAttribute('hand-tracking-controls', {hand: 'left'}); - el.components['hand-tracking-controls'].checkIfControllerPresent(); el.addEventListener('child-attached', function () { assert.equal(boxEl.object3D.parent, el.components['hand-tracking-controls'].wristObject3D); done(); @@ -78,6 +76,8 @@ suite('tracked-controls-webxr', function () { assert.ok(el.components['hand-tracking-controls'].wristObject3D); el.appendChild(boxEl); }); + el.setAttribute('hand-tracking-controls', {hand: 'left'}); + el.components['hand-tracking-controls'].checkIfControllerPresent(); }); });