2
0
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:
18alantom 2023-06-27 13:23:57 +05:30
parent 7b29ad4e72
commit 7c9ce28331
2 changed files with 2 additions and 3 deletions

View File

@ -141,7 +141,7 @@ export async function getSavePath(name: string, extention: string) {
const canceled = response.canceled; const canceled = response.canceled;
let filePath = response.filePath; let filePath = response.filePath;
if (filePath && !filePath.endsWith(extention)) { if (filePath && !filePath.endsWith(extention) && filePath !== ':memory:') {
filePath = `${filePath}.${extention}`; filePath = `${filePath}.${extention}`;
} }

View File

@ -44,11 +44,10 @@ const appSourcePath = path.join(root, 'dist_electron', 'build', 'main.js');
}); });
test('fill setup form', async (t) => { test('fill setup form', async (t) => {
const filePath = path.join(root, 'dbs', 'books_uitest.db');
await electronApp.evaluate(({ dialog }, filePath) => { await electronApp.evaluate(({ dialog }, filePath) => {
dialog.showSaveDialog = () => dialog.showSaveDialog = () =>
Promise.resolve({ canceled: false, filePath }); Promise.resolve({ canceled: false, filePath });
}, filePath); }, ':memory:');
await window.getByTestId('create-new-file').click(); await window.getByTestId('create-new-file').click();
await window.getByTestId('submit-button').waitFor(); await window.getByTestId('submit-button').waitFor();