1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

fix(web): avoid deleting empty album unexpectedly (#12175)

This commit is contained in:
Michel Heusschen
2024-08-31 19:24:38 +02:00
committed by GitHub
parent 40327ad987
commit 67468ea367
2 changed files with 27 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
import { LoginResponseDto } from '@immich/sdk';
import { test } from '@playwright/test';
import { utils } from 'src/utils';
test.describe('Album', () => {
let admin: LoginResponseDto;
test.beforeAll(async () => {
utils.initSdk();
await utils.resetDatabase();
admin = await utils.adminSetup();
});
test(`doesn't delete album after canceling add assets`, async ({ context, page }) => {
await utils.setAuthCookies(context, admin.accessToken);
await page.goto('/albums');
await page.getByRole('button', { name: 'Create album' }).click();
await page.getByRole('button', { name: 'Select photos' }).click();
await page.getByRole('button', { name: 'Close' }).click();
await page.reload();
await page.getByRole('button', { name: 'Select photos' }).waitFor();
});
});