diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 605993f5e90..64c084fa2e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -346,7 +346,7 @@ jobs: working-directory: ./e2e strategy: matrix: - runner: [mich, ubuntu-24.04-arm] + runner: [ubuntu-latest, ubuntu-24.04-arm] steps: - name: Checkout code @@ -394,7 +394,7 @@ jobs: working-directory: ./e2e strategy: matrix: - runner: [mich, ubuntu-24.04-arm] + runner: [ubuntu-latest, ubuntu-24.04-arm] steps: - name: Checkout code diff --git a/e2e/src/api/specs/asset.e2e-spec.ts b/e2e/src/api/specs/asset.e2e-spec.ts index 81961860593..8c203860df2 100644 --- a/e2e/src/api/specs/asset.e2e-spec.ts +++ b/e2e/src/api/specs/asset.e2e-spec.ts @@ -1085,31 +1085,21 @@ describe('/asset', () => { }, ]; - it(`should upload and generate a thumbnail for different file types`, async () => { - // upload in parallel - const assets = await Promise.all( - tests.map(async ({ input }) => { - const filepath = join(testAssetDir, input); - return utils.createAsset(admin.accessToken, { - assetData: { bytes: await readFile(filepath), filename: basename(filepath) }, - }); - }), - ); + it.each(tests)(`should upload and generate a thumbnail for different file types`, async ({ input, expected }) => { + const filepath = join(testAssetDir, input); + const response = await utils.createAsset(admin.accessToken, { + assetData: { bytes: await readFile(filepath), filename: basename(filepath) }, + }); - for (const { id, status } of assets) { - expect(status).toBe(AssetMediaStatus.Created); - // longer timeout as the thumbnail generation from full-size raw files can take a while - await utils.waitForWebsocketEvent({ event: 'assetUpload', id }); - } + expect(response.status).toBe(AssetMediaStatus.Created); + const id = response.id; + // longer timeout as the thumbnail generation from full-size raw files can take a while + await utils.waitForWebsocketEvent({ event: 'assetUpload', id }); - for (const [i, { id }] of assets.entries()) { - const { expected } = tests[i]; - const asset = await utils.getAssetInfo(admin.accessToken, id); - - expect(asset.exifInfo).toBeDefined(); - expect(asset.exifInfo).toMatchObject(expected.exifInfo); - expect(asset).toMatchObject(expected); - } + const asset = await utils.getAssetInfo(admin.accessToken, id); + expect(asset.exifInfo).toBeDefined(); + expect(asset.exifInfo).toMatchObject(expected.exifInfo); + expect(asset).toMatchObject(expected); }); it('should handle a duplicate', async () => {