Preserve live scope across evidence and registry flows
This commit is contained in:
@@ -83,6 +83,7 @@ const surfaceConfigs = [
|
||||
selector: 'main button:has-text("Back to Search")',
|
||||
expectedUrlPattern: '/evidence/threads',
|
||||
expectedTextPattern: /evidence threads/i,
|
||||
requiredUrlFragments: ['tenant=', 'regions='],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -115,6 +116,7 @@ const surfaceConfigs = [
|
||||
selector: 'a[href*="/registry-admin/audit"], button:has-text("Audit")',
|
||||
expectedUrlPattern: '/registry-admin/audit',
|
||||
expectedTextPattern: /audit/i,
|
||||
requiredUrlFragments: ['tenant=', 'regions='],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -389,7 +391,9 @@ async function verifySurfaceActions(context, surface) {
|
||||
const bodyText = await collectBodyText(page);
|
||||
const headingText = firstMatchingHeading(action.expectedTextPattern, headings);
|
||||
const finalUrl = page.url();
|
||||
const hasRequiredUrlFragments = (action.requiredUrlFragments ?? []).every((fragment) => finalUrl.includes(fragment));
|
||||
const ok = finalUrl.includes(action.expectedUrlPattern)
|
||||
&& hasRequiredUrlFragments
|
||||
&& matchesPattern(action.expectedTextPattern, headings, bodyText);
|
||||
|
||||
results.push({
|
||||
|
||||
Reference in New Issue
Block a user