Add tests for creating new Note buffers

This commit is contained in:
Jonatan Heyman
2024-12-04 16:52:35 +01:00
parent 4223937fbf
commit cf389c791c
6 changed files with 88 additions and 5 deletions

View File

@ -56,4 +56,16 @@ export class HeynotePage {
async getStoredSettings() {
return await this.page.evaluate(() => JSON.parse(window.localStorage.getItem("settings")))
}
async getStoredBufferList() {
return await this.page.evaluate(() => window.heynote.buffer.getList())
}
async getStoredBuffer(path) {
return await this.page.evaluate((path) => window.heynote.buffer.load(path), path)
}
agnosticKey(key) {
return key.replace("Mod", this.isMac ? "Meta" : "Control")
}
}