test: fix e2e

pull/460/head
Varun Patil 2023-02-25 18:27:31 -08:00
parent 0c110ec46e
commit 4693bc1700
4 changed files with 5 additions and 5 deletions

View File

@ -12,6 +12,6 @@ test.describe("Open", () => {
test("Open folder", async ({ page }) => {
await page.locator("text=Local").click();
await page.waitForSelector('img[src*="api/image/preview"]');
await page.waitForSelector("img.ximg");
});
});

View File

@ -6,7 +6,7 @@ test.beforeEach(login("/"));
test.describe("Open", () => {
test("Look for Images", async ({ page }) => {
expect(
await page.locator('img[src*="api/image/preview"]').count(),
await page.locator("img.ximg").count(),
"Number of previews"
).toBeGreaterThan(4);
await page.waitForTimeout(1000);
@ -52,7 +52,7 @@ test.describe("Open", () => {
await page.waitForTimeout(4000); // cache
await page.reload(); // prevent stale cache issues
await page.waitForTimeout(4000); // cache
await page.waitForSelector('img[src*="api/image/preview"]');
await page.waitForSelector("img.ximg");
expect(await page.locator(`img[src="${src1}"]`).count()).toBe(0);
expect(await page.locator(`img[src="${src2}"]`).count()).toBe(0);
});

View File

@ -18,7 +18,7 @@
<div class="preview-container fill-block">
<div class="img-outer" v-for="info of previews" :key="info.fileid">
<XImg
class="fill-block"
class="ximg fill-block"
:src="getPreviewUrl(info, true, 256)"
@error="$event.target.classList.add('error')"
/>

View File

@ -46,7 +46,7 @@
>
<XImg
ref="ximg"
:class="['fill-block', `memories-thumb-${data.key}`]"
:class="['ximg', 'fill-block', `memories-thumb-${data.key}`]"
draggable="false"
:src="src"
:key="data.fileid"