Skip to content

Commit 0a641eb

Browse files
committed
5316: fix failing test
1 parent f83c291 commit 0a641eb

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

assets/shared/slide-utils/templates-admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Load templates.
1+
// Load templates admin.
22
// @see https://vite.dev/guide/features.html#glob-import
33
// @see docs/custom-templates.md
44
// Eager loading because no other code piece imports the templates otherwise.

assets/tests/admin/admin-form.spec.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,13 @@ test.describe("Admin slide values depending on other values", () => {
468468

469469
await expect(
470470
page.getByText("Alternativt layout uden tekstboks"),
471-
).toHaveCount(0);
471+
).not.toBeVisible();
472472
const separator = await page.locator("#checkbox-separator");
473473
await separator.waitFor();
474474
await separator.check({ force: true });
475475
await expect(
476476
page.getByText("Alternativt layout uden tekstboks"),
477-
).toHaveCount(1);
477+
).toBeVisible();
478478

479479
const saveButton = page.locator("#save_slide");
480480
await saveButton.waitFor();
@@ -529,17 +529,17 @@ test.describe("Admin slide values depending on other values", () => {
529529
});
530530
}
531531
});
532-
await expect(page.getByText("Logostørrelse")).toHaveCount(0);
533-
await expect(page.getByText("Logoposition")).toHaveCount(0);
534-
await expect(page.getByText("Margin om logo")).toHaveCount(0);
532+
await expect(page.getByText("Logostørrelse")).not.toBeVisible();
533+
await expect(page.getByText("Logoposition")).not.toBeVisible();
534+
await expect(page.getByText("Margin om logo")).not.toBeVisible();
535535

536536
const showLogo = await page.locator("#checkbox-showLogo");
537537
await showLogo.waitFor();
538538
await showLogo.check({ force: true });
539539

540-
await expect(page.getByText("Logostørrelse")).toHaveCount(1);
541-
await expect(page.getByText("Logoposition")).toHaveCount(1);
542-
await expect(page.getByText("Margin om logo")).toHaveCount(1);
540+
await expect(page.getByText("Logostørrelse")).toBeVisible();
541+
await expect(page.getByText("Logoposition")).toBeVisible();
542+
await expect(page.getByText("Margin om logo")).toBeVisible();
543543

544544
const saveButton = page.locator("#save_slide");
545545
await saveButton.waitFor();

assets/tests/admin/data-fixtures.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -428,16 +428,6 @@ const slideJson = {
428428
media: [],
429429
content: {
430430
title: "Title",
431-
text: "",
432-
fontSize: "font-size-xl",
433-
mediaContain: true,
434-
duration: 18000,
435-
boxAlign: "top",
436-
boxMargin: true,
437-
separator: true,
438-
halfSize: true,
439-
shadow: true,
440-
showLogo: true,
441431
},
442432
modifiedBy: "[email protected]",
443433
createdBy: "[email protected]",

0 commit comments

Comments
 (0)