-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pause player #50
base: master
Are you sure you want to change the base?
Pause player #50
Conversation
addon/index.js
Outdated
@@ -44,6 +44,8 @@ export function testStart(context) { | |||
} | |||
|
|||
export function testEnd() { | |||
// After all the animations finished, we call destroy method in order to clean up elements and events | |||
player().destroy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test if player()
is null first
addon/player.js
Outdated
@@ -52,11 +52,54 @@ class Player extends BasePlayer { | |||
this.moduleName = moduleName; | |||
this.testName = testName; | |||
this.success = true; | |||
this.pausePromise = null; | |||
QUnit.config.testTimeout = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep QUnit configurarion on the vendor file only, so the code is independent of the testing franework
addon/player.js
Outdated
} | ||
|
||
// Singleton instance of Player | ||
let current = null; | ||
var tsCurrentPlayer = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variables inside ES6 modules are private to the module so it's not necessary to give it a globally unique name, just a module unique name, I guess current
or currentPlayer
is enough.
Allow to pause and resume test execution.