implemented basic e2e testing
This commit is contained in:
parent
705617abe7
commit
a2ed7164e4
11 changed files with 1540 additions and 0 deletions
32
front/src/Cypress/CypressAsserter.ts
Normal file
32
front/src/Cypress/CypressAsserter.ts
Normal file
|
@ -0,0 +1,32 @@
|
|||
declare let window:any;
|
||||
|
||||
//this class is used to communicate with cypress, our e2e testing client
|
||||
//Since cypress cannot manipulate canvas, we notified it with console logs
|
||||
class CypressAsserter {
|
||||
|
||||
constructor() {
|
||||
window.cypressAsserter = this
|
||||
}
|
||||
|
||||
gameStarted() {
|
||||
console.log('Started the game')
|
||||
}
|
||||
|
||||
preloadStarted() {
|
||||
console.log('Preloading')
|
||||
}
|
||||
|
||||
preloadFinished() {
|
||||
console.log('Preloading done')
|
||||
}
|
||||
|
||||
initStarted() {
|
||||
console.log('startInit')
|
||||
}
|
||||
|
||||
initFinished() {
|
||||
console.log('startInit done')
|
||||
}
|
||||
}
|
||||
|
||||
export const cypressAsserter = new CypressAsserter()
|
Loading…
Add table
Add a link
Reference in a new issue