Skip to content

Commit

Permalink
test(spatial-navigation): verify if on player error updateFocusableCo…
Browse files Browse the repository at this point in the history
…mponents is called
  • Loading branch information
CarlosVillasenor committed Jul 22, 2024
1 parent dd1c5c5 commit e211ac3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unit/spatial-navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,3 +492,13 @@ QUnit.test('should call `searchForTrackSelect()` if spatial navigation is enable

assert.ok(trackSelectSpy.calledOnce);
});

QUnit.test('error on player calls updateFocusableComponents', function(assert) {
const updateFocusableComponentsSpy = sinon.spy(this.spatialNav, 'updateFocusableComponents');

this.spatialNav.start();

this.player.error('Error 1');

assert.ok(updateFocusableComponentsSpy.calledOnce, 'on error event spatial navigation should call "updateFocusableComponents"');
});

0 comments on commit e211ac3

Please sign in to comment.