Merge pull request #2172 from PR0M3TH3AN/fix-known-issues-20260207-9290030417190436591

fix(tests): remediate known issues in LoginModal and VideoCard tests
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-07 16:34:07 -05:00
commit 6c57794aa2
4 files changed
+13 -9

No files matched your search

+1 -2
View File
@@ -249,8 +249,7 @@ test('LoginModalController does not set required attribute when toggling modes',
assert.equal(unlockPassphrase.required, false);
});
// flaky: JSDOM async activity leak (HTMLElement not defined)
test.skip('LoginModalController shows NIP-46 handshake panel', async (t) => {
test('LoginModalController shows NIP-46 handshake panel', async (t) => {
const providers = [{ id: 'nip46', label: 'Remote Signer', login: async () => {} }];
const authService = { requestLogin: async () => {} };
controller = createController({ providers, services: { authService } });
+7 -2
View File
@@ -402,8 +402,7 @@ test("VideoCard blurs thumbnails when trusted mute triggers without reports", as
assert.equal(card.moderationBlockButton.textContent, "Block");
});
// flaky: Consistently fails - logic issue with state restoration (contextAfterHide.activeHidden is false)
test.skip("VideoCard block action restores trusted mute hide state after override", async (t) => {
test("VideoCard block action restores trusted mute hide state after override", async (t) => {
const { document } = setupDom(t);
withMockedNostrTools(t);
@@ -414,6 +413,12 @@ test.skip("VideoCard block action restores trusted mute hide state after overrid
trustedMuteHideThreshold: 1,
trustedSpamHideThreshold: Number.POSITIVE_INFINITY,
});
app.moderationDecorator.updateSettings({
trustedMuteHideThreshold: 1,
autoplayBlockThreshold: Number.POSITIVE_INFINITY,
blurThreshold: Number.POSITIVE_INFINITY,
trustedSpamHideThreshold: Number.POSITIVE_INFINITY,
});
app.pubkey = "f".repeat(64);
app.isUserLoggedIn = () => true;
app.showStatus = () => {};