implemented basic e2e testing

This commit is contained in:
kharhamel 2020-04-14 20:04:55 +02:00
parent 705617abe7
commit a2ed7164e4
11 changed files with 1540 additions and 0 deletions

View 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()