skopix 2.0.82 → 2.0.83
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.
- package/cli/commands/dashboard.js +2 -0
- package/core/llm.js +9 -0
- package/package.json +1 -1
|
@@ -1572,6 +1572,8 @@ export async function dashboardCommand(options) {
|
|
|
1572
1572
|
const data = JSON.parse(body);
|
|
1573
1573
|
try {
|
|
1574
1574
|
const result = await updateTest(suitesDir, scope, testId, data);
|
|
1575
|
+
// Extract any new steps to pending review queue
|
|
1576
|
+
extractStepsToLibrary(suitesDir, data.steps || [], data.name || testId).catch(() => {});
|
|
1575
1577
|
sendJSON(res, 200, result);
|
|
1576
1578
|
} catch (err) {
|
|
1577
1579
|
sendJSON(res, 400, { error: err.message });
|
package/core/llm.js
CHANGED
|
@@ -509,6 +509,13 @@ export async function processRecording({ steps, testName, url, provider, apiKey,
|
|
|
509
509
|
type: s.element.type,
|
|
510
510
|
text: s.element.text,
|
|
511
511
|
classes: s.element.classes,
|
|
512
|
+
title: s.element.title || null,
|
|
513
|
+
ariaLabel: s.element.ariaLabel || null,
|
|
514
|
+
piTestId: s.element.piTestId || null,
|
|
515
|
+
dataTestId: s.element.dataTestId || null,
|
|
516
|
+
parentTitle: s.element.parentTitle || null,
|
|
517
|
+
parentTestId: s.element.parentTestId || null,
|
|
518
|
+
parentClasses: s.element.parentClasses || null,
|
|
512
519
|
} : null,
|
|
513
520
|
value: s.action === 'type' && s.isPassword ? '[password - use process.env.TEST_PASSWORD]' : (s.value || null),
|
|
514
521
|
isPassword: s.isPassword || false,
|
|
@@ -547,6 +554,8 @@ export async function processRecording({ steps, testName, url, provider, apiKey,
|
|
|
547
554
|
+ '\n\nYour jobs:\n'
|
|
548
555
|
+ '1. For each step, write a STABLE SELECTOR. Priority order:\n'
|
|
549
556
|
+ ' - data-testid, data-test, data-cy, data-qa, pi-test-identifier attributes use [attr="value"]\n'
|
|
557
|
+
+ ' - MOST IMPORTANT: If the element data contains piTestId, use [pi-test-identifier="VALUE"] as the selector — this is the most reliable selector possible. Always check piTestId first.\n'
|
|
558
|
+
+ ' - If parentTestId exists and piTestId does not, use [pi-test-identifier="parentTestId"] as anchor\n'
|
|
550
559
|
+ ' - title attribute — if the element has a title, use a[title="..."] or button[title="..."] — this is VERY reliable\n'
|
|
551
560
|
+ ' - Unique meaningful id (NOT random/generated IDs) use #id\n'
|
|
552
561
|
+ ' - Semantic selector e.g. button:has-text("Login"), input[name="email"]\n'
|
package/package.json
CHANGED