From 9ba40c35a11b087d27bc3275645bc257ce61f51c Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Mon, 6 Jan 2025 22:20:27 +0100 Subject: [PATCH] refactor: avoid matching file versions --- e2e/tests/000-upload-showfile.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/e2e/tests/000-upload-showfile.spec.ts b/e2e/tests/000-upload-showfile.spec.ts index 88c7e7312..b83897e9e 100644 --- a/e2e/tests/000-upload-showfile.spec.ts +++ b/e2e/tests/000-upload-showfile.spec.ts @@ -61,8 +61,13 @@ test('project file download', async ({ page }) => { // Wait for the download process to complete and save the downloaded file somewhere. await download.saveAs(fileToDownload); - await expect(download.failure()).toMatchObject({}); + expect(download.failure()).toMatchObject({}); + const original = JSON.parse(await readFile(fileToUpload, { encoding: 'utf-8' })); const fromServer = JSON.parse(await readFile(fileToDownload, { encoding: 'utf-8' })); - await expect(original).toEqual(fromServer); + + // when a file is parsed, the server will write the version number to the project file + original.settings.version = 'not-important'; + fromServer.settings.version = 'not-important'; + expect(original).toMatchObject(fromServer); });