refactor(web): asset viewer actions (#11449)

* refactor(web): asset viewer actions

* motion photo slot and more refactoring
This commit is contained in:
Michel Heusschen
2024-07-31 18:25:38 +02:00
committed by GitHub
parent 3a3ea6135e
commit 281cfc95a4
27 changed files with 682 additions and 476 deletions

View File

@@ -10,6 +10,9 @@ test.describe('Asset Viewer Navbar', () => {
utils.initSdk();
await utils.resetDatabase();
admin = await utils.adminSetup();
});
test.beforeEach(async () => {
asset = await utils.createAsset(admin.accessToken);
});
@@ -49,4 +52,14 @@ test.describe('Asset Viewer Navbar', () => {
}
});
});
test.describe('actions', () => {
test('favorite asset with shortcut', async ({ context, page }) => {
await utils.setAuthCookies(context, admin.accessToken);
await page.goto(`/photos/${asset.id}`);
await page.waitForSelector('#immich-asset-viewer');
await page.keyboard.press('f');
await expect(page.locator('#notification-list').getByTestId('message')).toHaveText('Added to favorites');
});
});
});