test: fix e2e
parent
0c110ec46e
commit
4693bc1700
|
@ -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");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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')"
|
||||
/>
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue