mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-29 01:17:55 +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,76 @@
|
||||
const { assertCurrentLiveArtifact } = require("../e2e/live/live-artifact-readiness");
|
||||
|
||||
const BUILD_ID = "0123456789abcdef0123456789abcdef";
|
||||
|
||||
function verifiers() {
|
||||
return {
|
||||
verifyExtensionBuildReceipt: jest.fn(() => ({ inputHash: "extension-inputs" })),
|
||||
verifyExtensionJavaScript: jest.fn(() => ({ version: "4.0.5" })),
|
||||
verifyUserscript: jest.fn(() => ({ inputHash: "userscript-inputs" })),
|
||||
};
|
||||
}
|
||||
|
||||
test("an extension live run verifies current source inputs and the generated browser bundles", () => {
|
||||
const checks = verifiers();
|
||||
|
||||
expect(assertCurrentLiveArtifact("extension", BUILD_ID, checks)).toEqual({
|
||||
artifact: { version: "4.0.5" },
|
||||
buildId: BUILD_ID,
|
||||
receipt: { inputHash: "extension-inputs" },
|
||||
runtime: "extension",
|
||||
});
|
||||
expect(checks.verifyExtensionBuildReceipt).toHaveBeenCalledTimes(1);
|
||||
expect(checks.verifyExtensionJavaScript).toHaveBeenCalledTimes(1);
|
||||
expect(checks.verifyUserscript).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test("a userscript live run verifies the exact live receipt and build ID", () => {
|
||||
const checks = verifiers();
|
||||
|
||||
expect(assertCurrentLiveArtifact("userscript", BUILD_ID, checks)).toEqual({
|
||||
buildId: BUILD_ID,
|
||||
receipt: { inputHash: "userscript-inputs" },
|
||||
runtime: "userscript",
|
||||
});
|
||||
expect(checks.verifyUserscript).toHaveBeenCalledWith({ expectedBuildId: BUILD_ID, liveTestBuild: true });
|
||||
expect(checks.verifyExtensionBuildReceipt).not.toHaveBeenCalled();
|
||||
expect(checks.verifyExtensionJavaScript).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test.each([
|
||||
[
|
||||
"extension receipt",
|
||||
{
|
||||
verifyExtensionBuildReceipt: () => {
|
||||
throw new Error("stale extension source");
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
"extension bundles",
|
||||
{
|
||||
verifyExtensionJavaScript: () => {
|
||||
throw new Error("stale extension bundle");
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
"userscript receipt",
|
||||
{
|
||||
verifyUserscript: () => {
|
||||
throw new Error("stale userscript source");
|
||||
},
|
||||
},
|
||||
],
|
||||
])("propagates a failed %s check before browser attachment", (_label, override) => {
|
||||
const runtime = _label.startsWith("userscript") ? "userscript" : "extension";
|
||||
expect(() => assertCurrentLiveArtifact(runtime, BUILD_ID, { ...verifiers(), ...override })).toThrow(/stale/);
|
||||
});
|
||||
|
||||
test("rejects an unsupported live runtime without verifying another artifact", () => {
|
||||
const checks = verifiers();
|
||||
expect(() => assertCurrentLiveArtifact("browser", BUILD_ID, checks)).toThrow("Unsupported live artifact runtime");
|
||||
expect(checks.verifyExtensionBuildReceipt).not.toHaveBeenCalled();
|
||||
expect(checks.verifyExtensionJavaScript).not.toHaveBeenCalled();
|
||||
expect(checks.verifyUserscript).not.toHaveBeenCalled();
|
||||
});
|
||||
Reference in new issue
Block a user