1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Edit a e2e test for editting note

This commit is contained in:
asmsuechan
2017-06-01 23:36:32 +09:00
parent b28d5c8b25
commit 4b75d501f5

View File

@@ -2,6 +2,7 @@ import test from 'ava'
import {Application} from 'spectron'
import path from 'path'
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
let app = null
const modalOpenButton = '.TopBar__control-newPostButton___browser-main-TopBar-'
@@ -62,4 +63,9 @@ test.serial('NoteList can be clicked', async t => {
test.serial('A sentence can be inputted', async t => {
const input = 'this is a text'
await app.client.click(noteDetail).webContents.insertText(input)
const editorValue = await app.client.click(noteDetail)
.webContents.selectAll()
.webContents.copy()
.electron.clipboard.readText()
t.is(editorValue, input)
})