mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-28 16:32:28 +00:00
Merge pull request #2135 from PR0M3TH3AN/fix-moderation-fixture-click-timeout-6604549089296585406
Fix moderation fixture click timeout
This commit is contained in:
2 files changed
+14
-22
No files matched your search
@@ -75,8 +75,8 @@
|
||||
id: "1".repeat(64),
|
||||
title: "Fixture: Blurred Preview",
|
||||
pubkey: "a".repeat(64),
|
||||
url: "https://example.com/video.mp4",
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg"
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/dummy.mp4"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: true,
|
||||
@@ -104,8 +104,8 @@
|
||||
id: "2".repeat(64),
|
||||
title: "Fixture: Autoplay Blocked",
|
||||
pubkey: "e".repeat(64),
|
||||
url: "https://example.com/video.mp4",
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg"
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/dummy.mp4"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: true,
|
||||
@@ -129,8 +129,8 @@
|
||||
id: "3".repeat(64),
|
||||
title: "Fixture: Override Persistence",
|
||||
pubkey: "f".repeat(64),
|
||||
url: "https://example.com/video.mp4",
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg"
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/dummy.mp4"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: true,
|
||||
@@ -155,8 +155,8 @@
|
||||
id: "4".repeat(64),
|
||||
title: "Fixture: Trusted Report Hide",
|
||||
pubkey: "aa".repeat(32),
|
||||
url: "https://example.com/video.mp4",
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg"
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/dummy.mp4"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: true,
|
||||
@@ -181,8 +181,8 @@
|
||||
id: "5".repeat(64),
|
||||
title: "Fixture: Trusted Mute Hide",
|
||||
pubkey: "bb".repeat(32),
|
||||
url: "https://example.com/video.mp4",
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg"
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/dummy.mp4"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: false,
|
||||
|
||||
@@ -89,14 +89,11 @@ test.describe("moderation fixtures", () => {
|
||||
|
||||
await expect(overrideCard).toHaveAttribute("data-autoplay-policy", "blocked");
|
||||
await expect(thumbnail).toHaveAttribute("data-thumbnail-state", "blurred");
|
||||
// TODO: Investigate why visibility check fails in fixture environment (headless)
|
||||
// await expect(showAnywayButton).toBeVisible();
|
||||
await expect(showAnywayButton).toBeVisible();
|
||||
await expect(restoreButtonQuery).toHaveCount(0);
|
||||
|
||||
// TODO: Investigate why click times out in fixture environment (headless)
|
||||
// await showAnywayButton.click({ force: true });
|
||||
await showAnywayButton.click();
|
||||
|
||||
/*
|
||||
await expect(overrideCard).toHaveAttribute(
|
||||
"data-moderation-override",
|
||||
"show-anyway"
|
||||
@@ -143,7 +140,6 @@ test.describe("moderation fixtures", () => {
|
||||
await expect(
|
||||
reloadedCard.getByRole("button", { name: "Show anyway" })
|
||||
).toBeVisible();
|
||||
*/
|
||||
});
|
||||
|
||||
test("trusted report hide fixture supports show anyway override", async ({ page }) => {
|
||||
@@ -166,14 +162,11 @@ test.describe("moderation fixtures", () => {
|
||||
await expect(hideCard).toHaveAttribute("data-moderation-hide-reason", "trusted-report-hide");
|
||||
await expect(hideCard).toHaveAttribute("data-moderation-hide-trusted-report-count", "3");
|
||||
await expect(badge).toContainText("Hidden · 3 trusted spam reports");
|
||||
// TODO: Investigate visibility check failure (fails with 0x0 size in headless)
|
||||
// await expect(showAnywayButton).toBeVisible();
|
||||
await expect(showAnywayButton).toBeVisible();
|
||||
await expect(restoreButtonQuery).toHaveCount(0);
|
||||
|
||||
// TODO: Investigate click timeout failure
|
||||
// await showAnywayButton.click({ force: true });
|
||||
await showAnywayButton.click();
|
||||
|
||||
/*
|
||||
await expect(hideCard).not.toHaveAttribute("data-moderation-hidden", "true");
|
||||
await expect(hideCard).toHaveAttribute("data-moderation-override", "show-anyway");
|
||||
await expect(hideCard.locator('[data-moderation-badge="true"]')).toContainText(
|
||||
@@ -190,7 +183,6 @@ test.describe("moderation fixtures", () => {
|
||||
await expect(hideCard).toHaveAttribute("data-moderation-hidden", "true");
|
||||
await expect(hideCard).not.toHaveAttribute("data-moderation-override", "show-anyway");
|
||||
await expect(hideCard.getByRole("button", { name: "Show anyway" })).toBeVisible();
|
||||
*/
|
||||
});
|
||||
|
||||
test("trusted mute hide fixture annotates mute reason and can be overridden", async ({
|
||||
|
||||
Reference in new issue
Block a user