mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-30 18:07:53 +01:00
Prepare 4.0.5 Firefox update and Shorts fixes
Add Firefox data consent, repair contributor sign-in, and introduce optional Hide clutter buttons. Harden video navigation, voting, and action layouts with shared browser regression coverage and reproducible release packaging.
This commit is contained in:
1 parent
3657de9b2c
commit
e500088e65
196 files changed
+39706
-2694
No files matched your search
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @jest-environment node
|
||||
*/
|
||||
|
||||
const {
|
||||
annotateVisualEvidence,
|
||||
assertVisualEvidenceCaptured,
|
||||
captureOptionalVisualEvidence,
|
||||
} = require("./visual-evidence");
|
||||
|
||||
test("capture-off results cannot be presented as inspected screenshot evidence", async () => {
|
||||
const capture = jest.fn();
|
||||
const testInfo = { annotations: [] };
|
||||
|
||||
const evidence = await captureOptionalVisualEvidence({
|
||||
capture,
|
||||
environment: {},
|
||||
outputPath: "would-have-been.png",
|
||||
});
|
||||
annotateVisualEvidence(testInfo, evidence);
|
||||
|
||||
expect(capture).not.toHaveBeenCalled();
|
||||
expect(evidence).toEqual({ captured: false, outputPath: null, reason: "capture-disabled" });
|
||||
expect(testInfo.annotations).toEqual([{ description: "not-captured:capture-disabled", type: "visual-evidence" }]);
|
||||
expect(() => assertVisualEvidenceCaptured(evidence, "Extension UI screenshot")).toThrow(
|
||||
"Structural browser assertions alone are not inspected screenshot evidence.",
|
||||
);
|
||||
});
|
||||
|
||||
test("capture-on results carry the exact screenshot path", async () => {
|
||||
const capture = jest.fn();
|
||||
const evidence = await captureOptionalVisualEvidence({
|
||||
capture,
|
||||
environment: { RYD_CAPTURE_VISUALS: "1" },
|
||||
outputPath: "captured.png",
|
||||
});
|
||||
|
||||
expect(capture).toHaveBeenCalledWith("captured.png");
|
||||
expect(assertVisualEvidenceCaptured(evidence)).toEqual({
|
||||
captured: true,
|
||||
outputPath: "captured.png",
|
||||
reason: null,
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user