mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 21:32:20 +08:00

* 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
23 lines
562 B
JavaScript
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()
|
|
})
|
|
})
|