mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-14 06:20:25 +01:00
10b9764fb3
Changes Emscripten SDK version to match that used to compile the default export templates used by Godot 3.5 (in this case 3.1.14 as can be seen here: https://github.com/godotengine/build-containers/blob/3.5/Dockerfile.javascript). This means we no longer need to compile custom export templates when exporting HTML5 for Godot 3.5. Exports from other Godot versions may requiring compiling the GDNative library with a different version of the Emscripten SDK. - Changes renderer from GLES3 -> GLES2 and reduces MSAA level to better support HTML5 export. - Updates GitHub Action to export HTML5 and upload as a build artifact. - Adds Cypress test to smoke test HTML5 export.
21 lines
685 B
JavaScript
21 lines
685 B
JavaScript
Cypress.on('window:before:load', win => {
|
|
cy.spy(win.console, 'error')
|
|
cy.spy(win.console, 'warn')
|
|
cy.spy(win.console, 'log')
|
|
})
|
|
|
|
describe('GodotXterm HTML5 export', () => {
|
|
it('Loads and runs without error', () => {
|
|
cy.visit('http://localhost:3000')
|
|
cy.compareSnapshot('menu', 0.9, {
|
|
limit: 100, delay: 200, timeout: 20000,
|
|
})
|
|
cy.get('body').type('{downArrow}{enter}')
|
|
cy.get('body').type('window.console.log("It works!"){enter}')
|
|
cy.window().then(win => {
|
|
cy.expect(win.console.error).to.have.callCount(0)
|
|
cy.expect(win.console.warn).to.have.callCount(0)
|
|
cy.expect(win.console.log).to.be.calledWith("It works!")
|
|
})
|
|
})
|
|
})
|