@qulib/core 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ export function buildGapPrompt(gaps, limit) {
|
|
|
6
6
|
})
|
|
7
7
|
.slice(0, limit);
|
|
8
8
|
const gapList = topGaps
|
|
9
|
-
.map((g
|
|
9
|
+
.map((g) => `- id:${g.id} [${g.severity}] ${g.category} at ${g.path}: ${g.reason}`)
|
|
10
10
|
.join('\n');
|
|
11
11
|
return `You are a QA engineer. Given these quality gaps found in a web application, generate test scenarios.
|
|
12
12
|
|
|
@@ -28,6 +28,6 @@ Each item must match this exact shape:
|
|
|
28
28
|
"recommendations": [
|
|
29
29
|
{ "adapter": "playwright|cypress-e2e|cypress-component|api|accessibility", "reason": "string", "confidence": "high|medium|low" }
|
|
30
30
|
],
|
|
31
|
-
"sourceGapIds": ["
|
|
31
|
+
"sourceGapIds": ["<one or more gap ids from the list, copied exactly as id:xxxx>"]
|
|
32
32
|
}`;
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/tools/auth/detect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAY,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIzE,MAAM,MAAM,yBAAyB,GACjC,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,yBAAyB,GACzB,iBAAiB,GACjB,SAAS,CAAC;AAEd,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"detect.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,CAqJvB"}
|
|
@@ -49,6 +49,9 @@ async function firstTextInputNameForLogin(page) {
|
|
|
49
49
|
function debugAuth() {
|
|
50
50
|
return process.env.QULIB_DEBUG === '1';
|
|
51
51
|
}
|
|
52
|
+
function isLoginishPath(pathname) {
|
|
53
|
+
return /login|sign[- ]?in|auth|sso|oauth|signin/i.test(pathname);
|
|
54
|
+
}
|
|
52
55
|
function slugify(label) {
|
|
53
56
|
const s = label
|
|
54
57
|
.toLowerCase()
|
|
@@ -169,6 +172,7 @@ async function probeClickToRevealForms(page, loginUrl, alreadyMatchedTexts, time
|
|
|
169
172
|
seenLabels.add(label);
|
|
170
173
|
candidateAttempts += 1;
|
|
171
174
|
const originBefore = new URL(page.url()).origin;
|
|
175
|
+
const pathBefore = new URL(page.url()).pathname;
|
|
172
176
|
if (debugAuth()) {
|
|
173
177
|
progress?.debug(`detect_auth click-reveal try label="${label.slice(0, 80)}"`);
|
|
174
178
|
}
|
|
@@ -207,6 +211,15 @@ async function probeClickToRevealForms(page, loginUrl, alreadyMatchedTexts, time
|
|
|
207
211
|
await waitNetworkIdleBestEffort(page);
|
|
208
212
|
continue;
|
|
209
213
|
}
|
|
214
|
+
const afterUrl = new URL(page.url());
|
|
215
|
+
if (afterUrl.pathname !== pathBefore && !isLoginishPath(afterUrl.pathname)) {
|
|
216
|
+
if (debugAuth()) {
|
|
217
|
+
progress?.debug(`detect_auth click-reveal skip (CTA navigation to non-login path): ${afterUrl.pathname}`);
|
|
218
|
+
}
|
|
219
|
+
await page.goto(loginUrl, { timeout: timeoutMs, waitUntil: 'domcontentloaded' });
|
|
220
|
+
await waitNetworkIdleBestEffort(page);
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
210
223
|
await waitNetworkIdleBestEffort(page);
|
|
211
224
|
try {
|
|
212
225
|
await page.locator('input[type="password"]:visible').first().waitFor({ state: 'visible', timeout: 5000 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qulib/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Qulib — analyze deployed web apps for honest quality gaps (CLI + programmatic API)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tapesh Nagarwal",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"analyze": "tsx src/cli/index.ts analyze",
|
|
49
49
|
"clean": "tsx src/cli/index.ts clean",
|
|
50
50
|
"build": "tsc",
|
|
51
|
-
"test": "node --import tsx/esm --test src/llm/__tests__/cost-intelligence.test.ts src/tools/scoring/__tests__/gaps.test.ts src/tools/auth/__tests__/gaps.test.ts src/tools/auth/__tests__/detect.test.ts src/tools/scoring/__tests__/automation-maturity.test.ts src/harness/__tests__/state-manager.test.ts src/telemetry/__tests__/redact-url.test.ts src/cli/__tests__/auth-login.test.ts src/cli/__tests__/cli-version.test.ts src/__tests__/analyze.storage-state-invalid.test.ts src/__tests__/analyze.fixtures.test.ts",
|
|
51
|
+
"test": "node --import tsx/esm --test src/llm/__tests__/cost-intelligence.test.ts src/llm/__tests__/context-builder.test.ts src/tools/scoring/__tests__/gaps.test.ts src/tools/auth/__tests__/gaps.test.ts src/tools/auth/__tests__/detect.test.ts src/tools/scoring/__tests__/automation-maturity.test.ts src/harness/__tests__/state-manager.test.ts src/telemetry/__tests__/redact-url.test.ts src/cli/__tests__/auth-login.test.ts src/cli/__tests__/cli-version.test.ts src/__tests__/analyze.storage-state-invalid.test.ts src/__tests__/analyze.fixtures.test.ts",
|
|
52
52
|
"test:integration": "node --import tsx/esm --test src/__tests__/analyze.integration.test.ts",
|
|
53
53
|
"smoke": "tsx src/cli/index.ts analyze --url https://example.com --ephemeral",
|
|
54
54
|
"cost-doctor": "tsx src/cli/index.ts cost doctor"
|