marktext/test/e2e/launch.spec.js
Felix Häusler bdaca98876
Update Electron to v15 (#2772)
* Prepare Electron >=14 upgrade

* Replace spectron with playwright

* Upgrade Electron to v15

* Fix unit test issue with @electron/remote

* Use per day cache directory for E2E tests

* Fix code style
2021-12-18 21:52:24 +08:00

23 lines
562 B
JavaScript

const { expect, test } = require('@playwright/test')
const { launchElectron } = require('./helpers')
test.describe('Check Launch Mark Text', async () => {
let app = null
let page = null
test.beforeAll(async () => {
const { app: electronApp, page: firstPage } = await launchElectron()
app = electronApp
page = firstPage
})
test.afterAll(async () => {
await app.close()
})
test('Empty Mark Text', async () => {
const title = await page.title()
expect(/^Mark Text|Untitled-1 - Mark Text$/.test(title)).toBeTruthy()
})
})