Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `webpack` ^5.8.22 --> ^5.97.1
- `whatwg-fetch` ^3.0.0 --> ^3.6.20
- Add Muted properties to Sound Plugin Type. [Part of ticket](https://pbskids.atlassian.net/browse/WEB-109)
- Updated Pause Plugin unit tests to reflect updated Pause functionality.

### Removed

Expand Down
27 changes: 0 additions & 27 deletions src/plugins/PausePlugin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,6 @@ describe('PausePlugin', () => {
});

describe('manageFocus()', () => {
it('should set pause to false if only app is blurred', async () => {
pp.onPauseToggle(); //reset the manual pause state which was being set to true for some reason.
pp._containerBlurred = false;
pp._appBlurred = true;

pp.manageFocus();
await sleep(150);
expect(pp.pause).to.be.false;
});

it('should set pause to false if only container is blurred', async () => {
pp._containerBlurred = true;
pp._appBlurred = false;

pp.manageFocus();
await sleep(150);
expect(pp.pause).to.be.false;
});

it('should set pause to true if app and container are blurred', async () => {
pp._containerBlurred = true;
pp._appBlurred = true;
Expand All @@ -122,14 +103,6 @@ describe('PausePlugin', () => {
});

it('should not change the pause state if the app was manually paused', async () => {
pp._appBlurred = false;
pp.manageFocus();
await sleep(150);
expect(pp.pause).to.be.false;

pp.onPauseToggle();
expect(pp.pause).to.be.true;

//when app and container are both blurred the pause state should be set to true, ignored if the pause state is already true via manual pause
pp._appBlurred = true;
pp._containerBlurred = true;
Expand Down