mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-27 00:32:59 +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
@@ -1,5 +1,6 @@
|
||||
const { NAVIGATION_MATRIX } = require("../UserScript/e2e/navigation-matrix");
|
||||
const { SHARED_LIVE_SCENARIO_IDS } = require("./shared-live-scenarios");
|
||||
const { LIVE_RUNTIME_PROFILES } = require("./live-runtime-adapter");
|
||||
|
||||
const REQUIRED_SURFACE_PAIRS = ["watch->watch", "watch->shorts", "shorts->watch", "shorts->shorts"];
|
||||
const REQUIRED_TRIGGERS = [
|
||||
@@ -8,35 +9,55 @@ const REQUIRED_TRIGGERS = [
|
||||
"dom-corruption",
|
||||
"dom-replacement",
|
||||
"history-back-forward",
|
||||
"navigate-start-only",
|
||||
"next-control",
|
||||
"sidebar-link",
|
||||
];
|
||||
const REQUIRED_DOM_FEATURES = [
|
||||
"active-reel-switch",
|
||||
"complete-native-inventory",
|
||||
"connected-collapsed-rate-bar",
|
||||
"connected-hidden-rate-bar",
|
||||
"delayed-hydration",
|
||||
"exact-href-identity",
|
||||
"hidden-outgoing-first",
|
||||
"incomplete-rendered-native-inventory",
|
||||
"legacy-segmented-duplicate-ids",
|
||||
"malformed-rate-bar",
|
||||
"no-useful-control-mutation",
|
||||
"no-is-active",
|
||||
"no-synthetic-mutation",
|
||||
"no-video-id",
|
||||
"non-rendered-native-action",
|
||||
"native-dislike-present",
|
||||
"positive-size-offscreen-outgoing-first",
|
||||
"persistent-data-null-action-root",
|
||||
"prune-current-bar",
|
||||
"replace-action-root",
|
||||
"replace-controls",
|
||||
"replace-current-action-container",
|
||||
"replace-page-and-controls-after-start",
|
||||
"reuse-exact-control-nodes",
|
||||
"retain-hidden-outgoing",
|
||||
"same-current-root",
|
||||
"stable-action-root-geometry",
|
||||
"stripped-rate-bar-wrapper-class",
|
||||
"unrelated-description-short-link",
|
||||
];
|
||||
const REQUIRED_TIMINGS = [
|
||||
"data-null-past-watchdog",
|
||||
"destination-count-gated",
|
||||
"finish-before-hydration",
|
||||
"inert-beyond-fallback-window",
|
||||
"native-dislike-after-stability",
|
||||
"native-dislike-without-synthetic-mutation",
|
||||
"no-navigate-finish",
|
||||
"no-navigation-event",
|
||||
"navigate-finish",
|
||||
"navigate-start-without-finish",
|
||||
"same-video",
|
||||
"settled",
|
||||
"stable-native-inventory",
|
||||
];
|
||||
const REQUIRED_SHARED_LIVE_SCENARIOS = [
|
||||
"channel-shorts-navigation",
|
||||
@@ -44,11 +65,14 @@ const REQUIRED_SHARED_LIVE_SCENARIOS = [
|
||||
"watch-render",
|
||||
"reload",
|
||||
"spa-navigation",
|
||||
"watch-action-topology",
|
||||
"sidebar-navigation-stress",
|
||||
"shorts-render",
|
||||
"responsive-visual",
|
||||
"post-navigation-vote",
|
||||
"reaction-matrix",
|
||||
];
|
||||
const REQUIRED_POSTCONDITIONS = ["no-destination-dislike", "single-destination-dislike"];
|
||||
|
||||
function collectCoverage(axis) {
|
||||
return new Set(
|
||||
@@ -76,12 +100,19 @@ describe("systematic browser coverage contract", () => {
|
||||
destination: expect.objectContaining({ counts: expect.any(Object), kind: expect.any(String) }),
|
||||
id: expect.any(String),
|
||||
origin: expect.objectContaining({ counts: expect.any(Object), kind: expect.any(String) }),
|
||||
postcondition: expect.any(String),
|
||||
viewport: expect.objectContaining({ height: expect.any(Number), width: expect.any(Number) }),
|
||||
}),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test("keeps both interactive and intentionally inert navigation postconditions", () => {
|
||||
expect([...new Set(NAVIGATION_MATRIX.map(({ postcondition }) => postcondition))].sort()).toEqual(
|
||||
REQUIRED_POSTCONDITIONS,
|
||||
);
|
||||
});
|
||||
|
||||
test("covers every watch and Shorts direction and every required navigation trigger", () => {
|
||||
const surfacePairs = new Set(
|
||||
NAVIGATION_MATRIX.map(({ coverage }) => `${coverage.origin}->${coverage.destination}`),
|
||||
@@ -110,4 +141,14 @@ describe("systematic browser coverage contract", () => {
|
||||
test("keeps the same authenticated scenario catalog for both runtime adapters", () => {
|
||||
expect(SHARED_LIVE_SCENARIO_IDS).toEqual(REQUIRED_SHARED_LIVE_SCENARIOS);
|
||||
});
|
||||
|
||||
test.each(["userscript", "extension"])(
|
||||
"distinguishes owned desktop Shorts from native-dependent mobile compatibility for %s",
|
||||
(runtime) => {
|
||||
expect(LIVE_RUNTIME_PROFILES[runtime].capabilities.shortsControlModelBySurface).toEqual({
|
||||
desktop: "synthetic-owned",
|
||||
mobile: "native-youtube-required",
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user