Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a507cfa
really run all tests and fix broken tests
vincentfretin Sep 24, 2022
c5dfd55
fix sinon spy
vincentfretin Sep 26, 2022
993ad4a
fix some asynchronous tests
vincentfretin Sep 26, 2022
9ff44b8
fix camera mock
vincentfretin Sep 26, 2022
ca2df2a
use elFactory instead of deprecated entityFactory
vincentfretin Sep 26, 2022
93467da
fail test if there is an error between tests
vincentfretin Sep 26, 2022
2e78b49
properly call done() if el.hasLoaded
vincentfretin Sep 26, 2022
df45581
fix mobile test that calls screen.orientation.lock
vincentfretin Sep 26, 2022
da99fa2
fix error with requestFullscreen
vincentfretin Sep 26, 2022
8cfe27a
fix camera test
vincentfretin Sep 26, 2022
87e6936
skip one raycaster test and all a-assets test suite for now
vincentfretin Sep 26, 2022
73f05c6
skip only a-assets test related to error and timeout
vincentfretin Sep 26, 2022
35172d6
fix 4 a-assets tests by using Promise.allSettled
vincentfretin Sep 26, 2022
3875098
add a comment about the global pattern
vincentfretin Sep 26, 2022
28fdfd7
use a glob to find the folders instead of hard coding the list
vincentfretin Sep 27, 2022
94efb79
increase mocha timeout from 2s to 3s
vincentfretin Sep 27, 2022
2c6984f
avoid some TypeError setting image on null during tests
vincentfretin Sep 27, 2022
fe149ab
don't make assumption of init order in those two tests, they were pas…
vincentfretin Sep 27, 2022
8fba06f
be sure we don't have a second raycaster-intersected fired in test te…
vincentfretin Sep 27, 2022
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use elFactory instead of deprecated entityFactory
  • Loading branch information
vincentfretin committed Sep 26, 2022
commit ca2df2a889a04bc3f78dc1d0d27e6c422db4bfe3
8 changes: 4 additions & 4 deletions tests/components/tracked-controls.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* global assert, process, setup, suite, test */
const entityFactory = require('../helpers').entityFactory;
var elFactory = require('../helpers').elFactory;

suite('tracked-controls', function () {
var el;

setup(function (done) {
el = entityFactory();
setTimeout(() => {
el.sceneEl.addEventListener('loaded', function () { done(); });
elFactory().then(_el => {
el = _el;
done();
});
});

Expand Down
13 changes: 6 additions & 7 deletions tests/components/visible.test.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
/* global assert, process, setup, suite, test */
var entityFactory = require('../helpers').entityFactory;
var elFactory = require('../helpers').elFactory;

suite('visible', function () {
var el;

setup(function (done) {
var el = this.el = entityFactory();
el.setAttribute('visible', '');
el.addEventListener('loaded', function () {
elFactory().then(_el => {
el = _el;
el.setAttribute('visible', '');
done();
});
});

suite('update', function () {
test('treats empty as true', function () {
var el = this.el;
el.setAttribute('visible', '');
assert.ok(el.object3D.visible);
});

test('can set to visible', function () {
var el = this.el;
el.setAttribute('visible', true);
assert.ok(el.object3D.visible);
});

test('can set to not visible', function () {
var el = this.el;
el.setAttribute('visible', false);
assert.notOk(el.object3D.visible);
});
Expand Down