feat: verify locators with context evidence
This commit is contained in:
@@ -40,6 +40,16 @@ test("scan captures a state-local inventory without clicking high-risk actions",
|
||||
assert.equal(graph.elements.some((element) => element.accessibleName === "Delete account"), false);
|
||||
});
|
||||
|
||||
test("duplicated row actions are verified with semantic locator evidence", async () => {
|
||||
const graph = await withTempOutput("duplicate-locators", (out) => scanUrl({ url: fixturePath, out }));
|
||||
const editButtons = graph.elements.filter((element) => element.accessibleName === "Edit");
|
||||
assert.equal(editButtons.length, 2);
|
||||
for (const edit of editButtons) {
|
||||
assert.equal(edit.locators.some((locator) => locator.verified && locator.identity?.sameAccessibleName), true);
|
||||
assert.equal(edit.locators.some((locator) => locator.scopes.some((scope) => scope.kind === "row")), true);
|
||||
}
|
||||
});
|
||||
|
||||
test("graph metadata records generation context and policy versions", async () => {
|
||||
const graph = await withTempOutput("metadata", (out) => scanUrl({ url: fixturePath, out }));
|
||||
assert.equal(graph.schemaVersion, "0.2");
|
||||
|
||||
Reference in New Issue
Block a user