Skip to content

Commit

Permalink
Fix xr-mode-ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarcos committed Oct 24, 2023
1 parent d4c9306 commit 470d750
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/scene/xr-mode-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
});
Expand Down Expand Up @@ -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();
});
Expand Down

0 comments on commit 470d750

Please sign in to comment.