mirror of
https://github.com/frappe/books.git
synced 2025-01-22 22:58:28 +00:00
chore: change filepath to memory
This commit is contained in:
parent
7b29ad4e72
commit
7c9ce28331
@ -141,7 +141,7 @@ export async function getSavePath(name: string, extention: string) {
|
||||
const canceled = response.canceled;
|
||||
let filePath = response.filePath;
|
||||
|
||||
if (filePath && !filePath.endsWith(extention)) {
|
||||
if (filePath && !filePath.endsWith(extention) && filePath !== ':memory:') {
|
||||
filePath = `${filePath}.${extention}`;
|
||||
}
|
||||
|
||||
|
@ -44,11 +44,10 @@ const appSourcePath = path.join(root, 'dist_electron', 'build', 'main.js');
|
||||
});
|
||||
|
||||
test('fill setup form', async (t) => {
|
||||
const filePath = path.join(root, 'dbs', 'books_uitest.db');
|
||||
await electronApp.evaluate(({ dialog }, filePath) => {
|
||||
dialog.showSaveDialog = () =>
|
||||
Promise.resolve({ canceled: false, filePath });
|
||||
}, filePath);
|
||||
}, ':memory:');
|
||||
await window.getByTestId('create-new-file').click();
|
||||
await window.getByTestId('submit-button').waitFor();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user