diff --git a/src/components/scene/xr-mode-ui.js b/src/components/scene/xr-mode-ui.js index 4399fc5a979..32c5d8bf9e0 100644 --- a/src/components/scene/xr-mode-ui.js +++ b/src/components/scene/xr-mode-ui.js @@ -154,7 +154,7 @@ module.exports.Component = registerComponent('xr-mode-ui', { }, remove: function () { - [this.enterVREl, this.enterAREl, this.orientationModalEl].forEach(function (uiElement) { + [this.enterVREl, this.enterAREl, this.enterXREl, this.orientationModalEl].forEach(function (uiElement) { if (uiElement && uiElement.parentNode) { uiElement.parentNode.removeChild(uiElement); } diff --git a/tests/components/scene/vr-mode-ui.test.js b/tests/components/scene/xr-mode-ui.test.js similarity index 88% rename from tests/components/scene/vr-mode-ui.test.js rename to tests/components/scene/xr-mode-ui.test.js index abf1811d9d2..b9edaa9d0ba 100644 --- a/tests/components/scene/vr-mode-ui.test.js +++ b/tests/components/scene/xr-mode-ui.test.js @@ -2,9 +2,9 @@ var entityFactory = require('../../helpers').entityFactory; var utils = require('index').utils; -var UI_CLASSES = ['.a-orientation-modal', '.a-enter-vr-button']; +var UI_CLASSES = ['.a-orientation-modal', '.a-enter-xr-button']; -suite('vr-mode-ui', function () { +suite.only('xr-mode-ui', function () { setup(function (done) { this.entityEl = entityFactory(); var el = this.el = this.entityEl.parentNode; @@ -25,7 +25,7 @@ suite('vr-mode-ui', function () { test('can disable UI', function () { var scene = this.el; - scene.setAttribute('vr-mode-ui', 'enabled', false); + scene.setAttribute('xr-mode-ui', 'enabled', false); UI_CLASSES.forEach(function (uiClass) { assert.notOk(scene.querySelector(uiClass)); }); @@ -57,7 +57,7 @@ suite('vr-mode-ui', function () { scene.exitVR(); process.nextTick(function () { - assert.equal(scene.querySelector('.a-enter-vr-button').className.indexOf('a-hidden'), + assert.equal(scene.querySelector('.a-enter-xr-button').className.indexOf('a-hidden'), -1); done(); });