mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 21:23:45 +00:00
test(browser): consolidate CDP and source map coverage
Use shared captures to verify discovery, document identity, screenshot recovery, and source map evidence and cleanup across varied responses. Remove redundant tests and unused fixture controls.
This commit is contained in:
1 parent
1592b7f2c0
commit
caedefa00d
19 files changed
+1729
-2195
No files matched your search
@@ -12,25 +12,21 @@ const cdpFrameEventFacts = (event: CdpEvent) => {
|
||||
};
|
||||
|
||||
describe("CDP frame identity ownership", () => {
|
||||
it.each([
|
||||
["missing", {}],
|
||||
["null", { frame: null }],
|
||||
["non-object", { frame: "frame" }],
|
||||
])("does not infer a root from a %s frame object", (_label, params) => {
|
||||
expect(
|
||||
selectCdpFrameIdentity(
|
||||
cdpFrameEventFacts({ method: "Page.frameNavigated", params }),
|
||||
"selected-main",
|
||||
),
|
||||
).toMatchObject({
|
||||
applicability: "applicable",
|
||||
selection: "unknown",
|
||||
isRootReplacement: false,
|
||||
identityIssue: "missing_frame",
|
||||
parentRelation: "unknown",
|
||||
parentId: null,
|
||||
parentIssue: null,
|
||||
});
|
||||
it("keeps missing or malformed frame objects from becoming root evidence", () => {
|
||||
for (const params of [{}, { frame: null }, { frame: "frame" }]) {
|
||||
expect(
|
||||
selectCdpFrameIdentity(
|
||||
cdpFrameEventFacts({ method: "Page.frameNavigated", params }),
|
||||
"selected-main",
|
||||
),
|
||||
).toMatchObject({
|
||||
selection: "unknown",
|
||||
frameId: null,
|
||||
identityIssue: "missing_frame",
|
||||
parentRelation: "unknown",
|
||||
isRootReplacement: false,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
it("recognizes a valid frame with no parent property as a root", () => {
|
||||
|
||||
Reference in new issue
Block a user