File tree Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ permissions:
11
11
jobs :
12
12
test :
13
13
name : Test Cases
14
- runs-on : ubuntu-20 .04
14
+ runs-on : ubuntu-22 .04
15
15
strategy :
16
16
matrix :
17
17
node-version : ['16.x']
18
+ firefox-version : ['latest']
18
19
steps :
19
20
- name : Checkout Repo
20
21
uses : actions/checkout@v3
@@ -31,29 +32,36 @@ jobs:
31
32
- name : Install dependencies
32
33
run : npm install
33
34
35
+ - name : Check Lint
36
+ run : npm run lint
37
+
38
+ - name : Check Build Minified
39
+ run : npm run dist
40
+
41
+ - name : Check Docs
42
+ run : npm run test:docs
43
+
34
44
- name : Test Cases Using Chrome
35
45
uses : GabrielBB/xvfb-action@v1
36
46
env :
37
47
TEST_ENV : ci
38
48
with :
39
49
run : npm run test:chrome -- --single-run
40
50
51
+ - name : Install Firefox
52
+ uses : browser-actions/setup-firefox@latest
53
+ with :
54
+ firefox-version : ${{ matrix['firefox-version'] }}
55
+
56
+ - run : firefox --version
57
+
41
58
- name : Test Cases Using Firefox
42
59
uses : GabrielBB/xvfb-action@v1
43
60
env :
44
61
TEST_ENV : ci
45
62
with :
46
63
run : npm run test:firefox -- --single-run
47
64
48
- - name : Check Lint
49
- run : npm run lint
50
-
51
- - name : Check Build Minified
52
- run : npm run dist
53
-
54
- - name : Check Docs
55
- run : npm run test:docs
56
-
57
65
- name : Upload coverage to Codecov
58
66
uses : codecov/codecov-action@v3
59
67
with :
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ suite('vr-mode-ui', function () {
38
38
el : { object3D : { } } ,
39
39
updateProjectionMatrix : function ( ) { }
40
40
} ;
41
+ window . hasNativeWebVRImplementation = false ;
41
42
scene . enterVR ( ) ;
42
43
UI_CLASSES . forEach ( function ( uiClass ) {
43
44
assert . ok ( scene . querySelector ( uiClass ) . className . indexOf ( 'a-hidden' ) ) ;
@@ -51,6 +52,7 @@ suite('vr-mode-ui', function () {
51
52
el : { object3D : { } , getAttribute : function ( ) { return { spectator : false } ; } } ,
52
53
updateProjectionMatrix : function ( ) { }
53
54
} ;
55
+ window . hasNativeWebVRImplementation = false ;
54
56
scene . enterVR ( ) ;
55
57
scene . exitVR ( ) ;
56
58
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ suite('a-scene (without renderer)', function () {
182
182
test ( 'calls requestPresent if headset connected' , function ( done ) {
183
183
var sceneEl = this . el ;
184
184
this . sinon . stub ( sceneEl , 'checkHeadsetConnected' ) . returns ( true ) ;
185
+ window . hasNativeWebVRImplementation = false ;
185
186
sceneEl . enterVR ( ) . then ( function ( ) {
186
187
assert . ok ( sceneEl . renderer . xr . enabled ) ;
187
188
done ( ) ;
@@ -203,6 +204,7 @@ suite('a-scene (without renderer)', function () {
203
204
test ( 'does not call requestPresent if flat desktop' , function ( done ) {
204
205
var sceneEl = this . el ;
205
206
this . sinon . stub ( sceneEl , 'checkHeadsetConnected' ) . returns ( false ) ;
207
+ window . hasNativeWebVRImplementation = false ;
206
208
sceneEl . enterVR ( ) . then ( function ( ) {
207
209
assert . notOk ( sceneEl . renderer . xr . enabled ) ;
208
210
done ( ) ;
@@ -248,6 +250,7 @@ suite('a-scene (without renderer)', function () {
248
250
}
249
251
250
252
this . sinon . stub ( sceneEl , 'checkHeadsetConnected' ) . returns ( false ) ;
253
+ window . hasNativeWebVRImplementation = false ;
251
254
sceneEl . enterVR ( ) . then ( function ( ) {
252
255
assert . ok ( fullscreenSpy . called ) ;
253
256
done ( ) ;
You can’t perform that action at this time.
0 commit comments