integration tests via spectron

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen committed 2020-06-08 10:56:07 +03:00
1 parent 5af12bdbbd
commit cff4365b35
8 files changed
+473 -28

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { Application } from "spectron"
import * as util from "../helpers/utils"
describe("app start", () => {
let app: Application
beforeEach(() => {
app = util.setup()
return app.start()
}, 20000)
it('starts with whats new flow', async () => {
await app.client.windowByIndex(1)
await app.client.waitUntilWindowLoaded()
await app.client.waitUntilTextExists("h1", "What's new")
await app.client.click("button.btn-primary")
await app.client.waitUntilTextExists("h1", "Welcome")
})
afterEach(async () => {
if (app && app.isRunning()) {
return util.tearDown(app)
}
})
})