mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
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:
4 files changed
+13
-9
No files matched your search
+2
-4
@@ -3,14 +3,12 @@
|
||||
## Tests
|
||||
|
||||
### Unit Tests
|
||||
- `npm run test:unit` may time out in resource-constrained environments (like CI) when running the full suite serially. CI workflows use sharding (`test:unit:shardX`) to mitigate this. Targeted testing (`test:dm:unit`, `test:dm:integration`) is recommended for local development focus. (Last checked: 2024-05-22)
|
||||
- `npm run test:unit` may time out in resource-constrained environments (like CI) when running the full suite serially. CI workflows use sharding (`test:unit:shardX`) to mitigate this. Targeted testing (`test:dm:unit`, `test:dm:integration`) is recommended for local development focus. (Last checked: 2025-02-23)
|
||||
|
||||
### Skipped Tests
|
||||
The following tests are skipped due to flakiness or environmental issues and should be investigated:
|
||||
|
||||
- `tests/e2e/popover.spec.ts`: `keeps the bottom-right grid menu inside the viewport` (Visual regression layout issue)
|
||||
- `tests/moderation/video-card.test.mjs`: `VideoCard block action restores trusted mute hide state after override` (Logic issue with state restoration)
|
||||
- `tests/login-modal-controller.test.mjs`: `LoginModalController shows NIP-46 handshake panel` (JSDOM async activity leak)
|
||||
- `tests/e2e/popover.spec.ts`: `keeps the bottom-right grid menu inside the viewport` (Visual regression layout issue: Floating UI `flip` middleware fails to respect viewport boundary in constrained height scenarios. Verified 2025-02-23, fix attempt failed.)
|
||||
|
||||
### Visual Regression Tests (`test:visual`)
|
||||
- **Artifact Retention**: Visual tests are configured to retain screenshots, traces, and videos on failure to assist with debugging. These artifacts can be found in `artifacts/test-results/`.
|
||||
@@ -1571,7 +1571,9 @@ export default class LoginModalController {
|
||||
}
|
||||
|
||||
// Kick off the handshake generation
|
||||
this.nip46AutoStartTimer = setTimeout(autoStart, 0);
|
||||
if (this.window && typeof this.window.setTimeout === "function") {
|
||||
this.nip46AutoStartTimer = this.window.setTimeout(autoStart, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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 } });
|
||||
|
||||
@@ -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 = () => {};
|
||||
|
||||
Reference in new issue
Block a user