Created
June 26, 2017 23:06
-
-
Save griffinmyers/56a505fba5dca33feadd16a6f766b0e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// `name`: The image filename | |
// `done`: A function provided by jasmine to invoke when we're finished | |
// rendering | |
window.renderScreen = function renderScreen(name, done) { | |
setTimeout(function() { | |
window.top.callPhantom({ type: 'render', name: name }); | |
done(); | |
}, 500); | |
} | |
beforeEach(function() { | |
this.container = document.createElement('div'); | |
this.container.style.width = '100%'; | |
this.container.style.border = '1px solid gray'; | |
this.container.style.padding = '10px'; | |
this.container.style.backgroundColor = 'white'; | |
this.container.style.boxSizing = 'border-box'; | |
document.body.appendChild(this.container); | |
}); | |
afterEach(function() { | |
this.container.remove(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment