mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 19:35:28 +00:00
Merge pull request #2138 from PR0M3TH3AN/fix/moderation-fixture-visibility-3216243228017029847
Fix visibility check failure for trusted report hide fixture
This commit is contained in:
2 files changed
+4
-9
No files matched your search
@@ -130,7 +130,7 @@
|
||||
title: "Fixture: Override Persistence",
|
||||
pubkey: "f".repeat(64),
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/video.mp4"
|
||||
url: "#"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: true,
|
||||
@@ -156,7 +156,7 @@
|
||||
title: "Fixture: Trusted Report Hide",
|
||||
pubkey: "aa".repeat(32),
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/video.mp4"
|
||||
url: "#"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: true,
|
||||
@@ -182,7 +182,7 @@
|
||||
title: "Fixture: Trusted Mute Hide",
|
||||
pubkey: "bb".repeat(32),
|
||||
thumbnail: "/assets/jpg/video-thumbnail-fallback.jpg",
|
||||
url: "https://example.com/video.mp4"
|
||||
url: "#"
|
||||
},
|
||||
moderation: {
|
||||
blockAutoplay: false,
|
||||
|
||||
@@ -211,12 +211,7 @@ test.describe("moderation fixtures", () => {
|
||||
await expect(muteCard).toHaveAttribute("data-moderation-trusted-mute-count", "1");
|
||||
await expect(badge).toContainText("Hidden · 1 trusted mute");
|
||||
await expect(thumbnail).toHaveAttribute("data-thumbnail-state", "blurred");
|
||||
// TODO: Visibility check fails in headless environment due to layout issues (0x0 size).
|
||||
// Verifying existence via selector instead of role/visibility.
|
||||
// await expect(showAnywayButton).toBeVisible();
|
||||
const showAnywayLocator = muteCard.locator('button[data-moderation-action="override"]');
|
||||
await expect(showAnywayLocator).toHaveCount(1);
|
||||
await expect(showAnywayLocator).toHaveAttribute("aria-label", "Show anyway");
|
||||
await expect(showAnywayButton).toBeVisible();
|
||||
await expect(restoreButtonQuery).toHaveCount(0);
|
||||
|
||||
await showAnywayButton.click();
|
||||
|
||||
Reference in new issue
Block a user