@validate.qa/runner 1.0.27 → 1.0.29
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/dist/cli.js +10 -5
- package/dist/cli.mjs +10 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -62154,7 +62154,7 @@ var require_mobile_explorer = __commonJS({
|
|
|
62154
62154
|
}
|
|
62155
62155
|
sections.push("");
|
|
62156
62156
|
if (mode === "survey") {
|
|
62157
|
-
sections.push(`**Mission:** Map every reachable screen. For each new screen: mobile_snapshot -> capture_screen -> record_transition. Get PAST the entry gate into the app's real main content \u2014 the login/landing screens are the ENTRANCE, not the app. If test credentials are provided (see the Test Credentials section), SIGN IN with them FIRST and map the authenticated app; that is the real product surface.
|
|
62157
|
+
sections.push(`**Mission:** Map every reachable screen. For each new screen: mobile_snapshot -> capture_screen -> record_transition. Get PAST the entry gate into the app's real main content \u2014 the login/landing screens are the ENTRANCE, not the app. If test credentials are provided (see the Test Credentials section), SIGN IN with them FIRST and map the authenticated app; that is the real product surface. When credentials are provided, the guest/demo/skip entry (e.g. "See Demo Profile", "Continue as guest") is FORBIDDEN \u2014 it is a fake sandbox, not the authenticated app, and mapping it means the survey missed the real product. Only fall back to a demo/guest entry when NO credentials are available at all. Do NOT submit forms with junk data or mutate real data. Call finish_exploration ONLY when every reachable screen \u2014 including the authenticated content \u2014 has been captured and no unvisited frontier screens remain.`);
|
|
62158
62158
|
} else {
|
|
62159
62159
|
sections.push("**Mission:** Use the focus features like a real user. Tap, type, submit, and observe outcomes. After a meaningful flow, call record_journey. Call finish_exploration when the flows are covered.");
|
|
62160
62160
|
}
|
|
@@ -62219,7 +62219,7 @@ LOG IN FIRST \u2014 before broad exploration. The authenticated app is the real
|
|
|
62219
62219
|
4. VERIFY you are actually signed in: re-snapshot and confirm an authenticated signal appeared (a home/feed/dashboard with real content, an account/profile tab, a "Sign out" option, or your user identity). If you are still on the login form, the login failed \u2014 check for an error, re-enter, and submit again (up to 2 attempts).
|
|
62220
62220
|
5. Only AFTER you have confirmed you are signed in, map the authenticated app.
|
|
62221
62221
|
|
|
62222
|
-
|
|
62222
|
+
DO NOT USE THE DEMO / GUEST PATH. Because credentials ARE provided above, a "See Demo Profile", "Continue as guest", "Try it out", "Skip", or any preview/sandbox entry is FORBIDDEN for this survey \u2014 it drops you into a fake sandbox account, NOT the real authenticated app, and a survey that maps the demo dashboard has FAILED its core job. Never tap those buttons. The ONLY way in is the real login sequence above. If the real login genuinely cannot be completed after 2 honest attempts (persistent error, no reachable sign-in form), STOP and call finish_exploration with a clear note that login could not be completed \u2014 do NOT substitute the demo experience for the authenticated app.
|
|
62223
62223
|
|
|
62224
62224
|
SECURITY RULES:
|
|
62225
62225
|
- NEVER call \`mobile_type\` with an email, password, or token value \u2014 the runner will REJECT the call and you lose an iteration. Use \`mobile_fill_credential\` for every credential field.
|
|
@@ -65788,6 +65788,7 @@ Return ONLY one valid JSON object matching the schema below. Do NOT include <thi
|
|
|
65788
65788
|
8. **Auth-aware** - mark scenarios that need a signed-in session. Use process.env.TEST_USER_EMAIL / PASSWORD
|
|
65789
65789
|
9. **No duplicates** - check existing test names before adding
|
|
65790
65790
|
10. **All tests start from a hermetic app launch** - every generated test relaunches the app (terminate + activate, a clean cold start) and uses the app's own in-app navigation (tapping tabs / links / buttons) to reach the target screen. Steps must reflect this: say "Relaunch the app and tap Sign In" not "deep-link to the login screen". Do NOT navigate by deep-link; the app's launch + tab/drawer navigation is the only entry path. \`targetPages\` lists the screen-ids involved in the flow.
|
|
65791
|
+
12. **targetPages must be copied CHARACTER-FOR-CHARACTER from the screen-ids in the evidence** (they look like \`com.example.app.MainActivity#ab12cd34\`). NEVER invent, prettify, or abbreviate them \u2014 no "Landing", "AUTH", "Home Screen", or any name that is not literally in the provided screens. A scenario whose targetPages contains even ONE id not present in the evidence is REJECTED WHOLESALE by the validator, so a single made-up route silently destroys the entire scenario. If you are unsure which screen-id a step touches, use the screen-id of the screen where the flow STARTS.
|
|
65791
65792
|
11. **Happy paths must verify the DURABLE OUTCOME, not just the trigger.** A HAPPY_PATH is NOT complete until it verifies the feature's real output. "Button tapped" / "Sheet opened" / "Spinner appeared" is NOT a happy path - that is a UI interaction test. Apply this to any feature where an action produces a result the user then sees or uses: CRUD creates, photo/file uploads, searches that return results, imports, exports, payments, messages sent, AI/ML outputs, generated documents, sync runs, analysis runs, conversion, data processing. The scenario MUST include:
|
|
65792
65793
|
- The trigger step (Tap Submit / Generate / Send / Upload / Run / Analyze / Save / Pay / etc.)
|
|
65793
65794
|
- A wait step for the operation to complete. Phrase it by SIGNAL, not wall-clock ("Wait for the result to appear - up to 60 seconds"). Prefer signals the app actually uses: spinner disappears, status badge flips to a success state, a new row appears, an item count increments, a success toast/snackbar shows, the screen transitions to a result screen.
|
|
@@ -66591,10 +66592,12 @@ var require_mobile_generator = __commonJS({
|
|
|
66591
66592
|
## Your job
|
|
66592
66593
|
1. mobile_snapshot the current screen.
|
|
66593
66594
|
2. Execute the scenario's steps using the real UI: tap buttons, fill fields (mobile_type), submit, navigate.
|
|
66594
|
-
3.
|
|
66595
|
+
3. COMPLETE THE ACTION the scenario is about \u2014 do not stop half-way. If the scenario submits a form (sign in, sign up, search, create), you MUST tap the submit/primary button; filling fields is NOT the behavior under test. If it navigates, you MUST land on the destination. A "happy path" that fills a login form but never taps "Sign In" is WRONG.
|
|
66596
|
+
4. When you reach the target screen / complete the flow, PROVE the outcome with an assert tool:
|
|
66595
66597
|
- mobile_assert_visible({ref}) \u2014 the target screen's stable element is on screen.
|
|
66596
66598
|
- mobile_assert_text({ref, expected}) \u2014 an element contains expected text (only durable when the element has a stable accessibility-id / resource-id).
|
|
66597
|
-
|
|
66599
|
+
- Assert the REAL post-action outcome: after a sign-in, assert a signed-in signal (dashboard/feed content, account tab, "Sign out"); after an invalid submit, assert the error message; after navigation, assert an element unique to the destination screen. Do NOT assert an opaque internal id ("step-1", "step-2") as the outcome \u2014 pick a human-meaningful element.
|
|
66600
|
+
5. Call finish_generate with verified:true ONLY if you asserted the outcome with an assert tool.
|
|
66598
66601
|
|
|
66599
66602
|
## Rules
|
|
66600
66603
|
- Re-snapshot before every assertion so the ref is fresh.
|
|
@@ -66602,6 +66605,8 @@ var require_mobile_generator = __commonJS({
|
|
|
66602
66605
|
- Assert only DURABLE elements \u2014 screen chrome that exists on every visit (tab labels, headers, nav bars, the entity you just created). NEVER assert one-time / data-dependent UI: empty-state CTAs ("Add Your First \u2026", "Get Started", "No items yet"), onboarding banners, or counters \u2014 they vanish as soon as the account has data, and the test then fails forever on a healthy app.
|
|
66603
66606
|
- Do NOT trigger irreversible side effects (real payments, sending messages to others) \u2014 note them and assert what you safely can.
|
|
66604
66607
|
- Stay inside this app.${targetLine} Do not open or use app stores, browsers, email apps, settings, or any other app. If an action leaves the target app, the runner will relaunch the target app and reject that action.
|
|
66608
|
+
- NEVER tap the phone's home screen / launcher (app icons, "Predicted app" chips, search bars, widgets). Those are NOT part of the app under test \u2014 tapping them is junk that poisons the test. If the app ever backgrounds or you find yourself on the launcher, use mobile_relaunch to cold-start the app; do NOT tap a launcher icon or app-prediction to get back in.
|
|
66609
|
+
- Do NOT re-do a sequence you already completed. If you filled a form then navigated away, do NOT come back and fill it again \u2014 the scenario needs ONE clean pass. Filling the login form, going back, and re-filling it is exactly the kind of wandering that produces a bloated, broken test.
|
|
66605
66610
|
- Do ONLY the actions this scenario needs. Do NOT re-open a menu you already opened, re-select an option that is already selected, toggle a setting back and forth, or repeat a step that already succeeded \u2014 EVERY action you take is baked into the generated test verbatim, so each extra action becomes a permanent junk step.
|
|
66606
66611
|
- Each action must make NEW progress toward the goal. If an action leaves the screen unchanged, do NOT repeat it \u2014 pick a different element or move on.
|
|
66607
66612
|
- Finish promptly once the outcome is proven: the instant the expected outcome is visible, assert it and call finish_generate. Do not keep exploring after the goal is proven.
|
|
@@ -329525,7 +329530,7 @@ var require_package4 = __commonJS({
|
|
|
329525
329530
|
"package.json"(exports2, module2) {
|
|
329526
329531
|
module2.exports = {
|
|
329527
329532
|
name: "@validate.qa/runner",
|
|
329528
|
-
version: "1.0.
|
|
329533
|
+
version: "1.0.29",
|
|
329529
329534
|
description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
|
|
329530
329535
|
bin: {
|
|
329531
329536
|
"validate-runner": "dist/cli.js"
|
package/dist/cli.mjs
CHANGED
|
@@ -62159,7 +62159,7 @@ var require_mobile_explorer = __commonJS({
|
|
|
62159
62159
|
}
|
|
62160
62160
|
sections.push("");
|
|
62161
62161
|
if (mode === "survey") {
|
|
62162
|
-
sections.push(`**Mission:** Map every reachable screen. For each new screen: mobile_snapshot -> capture_screen -> record_transition. Get PAST the entry gate into the app's real main content \u2014 the login/landing screens are the ENTRANCE, not the app. If test credentials are provided (see the Test Credentials section), SIGN IN with them FIRST and map the authenticated app; that is the real product surface.
|
|
62162
|
+
sections.push(`**Mission:** Map every reachable screen. For each new screen: mobile_snapshot -> capture_screen -> record_transition. Get PAST the entry gate into the app's real main content \u2014 the login/landing screens are the ENTRANCE, not the app. If test credentials are provided (see the Test Credentials section), SIGN IN with them FIRST and map the authenticated app; that is the real product surface. When credentials are provided, the guest/demo/skip entry (e.g. "See Demo Profile", "Continue as guest") is FORBIDDEN \u2014 it is a fake sandbox, not the authenticated app, and mapping it means the survey missed the real product. Only fall back to a demo/guest entry when NO credentials are available at all. Do NOT submit forms with junk data or mutate real data. Call finish_exploration ONLY when every reachable screen \u2014 including the authenticated content \u2014 has been captured and no unvisited frontier screens remain.`);
|
|
62163
62163
|
} else {
|
|
62164
62164
|
sections.push("**Mission:** Use the focus features like a real user. Tap, type, submit, and observe outcomes. After a meaningful flow, call record_journey. Call finish_exploration when the flows are covered.");
|
|
62165
62165
|
}
|
|
@@ -62224,7 +62224,7 @@ LOG IN FIRST \u2014 before broad exploration. The authenticated app is the real
|
|
|
62224
62224
|
4. VERIFY you are actually signed in: re-snapshot and confirm an authenticated signal appeared (a home/feed/dashboard with real content, an account/profile tab, a "Sign out" option, or your user identity). If you are still on the login form, the login failed \u2014 check for an error, re-enter, and submit again (up to 2 attempts).
|
|
62225
62225
|
5. Only AFTER you have confirmed you are signed in, map the authenticated app.
|
|
62226
62226
|
|
|
62227
|
-
|
|
62227
|
+
DO NOT USE THE DEMO / GUEST PATH. Because credentials ARE provided above, a "See Demo Profile", "Continue as guest", "Try it out", "Skip", or any preview/sandbox entry is FORBIDDEN for this survey \u2014 it drops you into a fake sandbox account, NOT the real authenticated app, and a survey that maps the demo dashboard has FAILED its core job. Never tap those buttons. The ONLY way in is the real login sequence above. If the real login genuinely cannot be completed after 2 honest attempts (persistent error, no reachable sign-in form), STOP and call finish_exploration with a clear note that login could not be completed \u2014 do NOT substitute the demo experience for the authenticated app.
|
|
62228
62228
|
|
|
62229
62229
|
SECURITY RULES:
|
|
62230
62230
|
- NEVER call \`mobile_type\` with an email, password, or token value \u2014 the runner will REJECT the call and you lose an iteration. Use \`mobile_fill_credential\` for every credential field.
|
|
@@ -65793,6 +65793,7 @@ Return ONLY one valid JSON object matching the schema below. Do NOT include <thi
|
|
|
65793
65793
|
8. **Auth-aware** - mark scenarios that need a signed-in session. Use process.env.TEST_USER_EMAIL / PASSWORD
|
|
65794
65794
|
9. **No duplicates** - check existing test names before adding
|
|
65795
65795
|
10. **All tests start from a hermetic app launch** - every generated test relaunches the app (terminate + activate, a clean cold start) and uses the app's own in-app navigation (tapping tabs / links / buttons) to reach the target screen. Steps must reflect this: say "Relaunch the app and tap Sign In" not "deep-link to the login screen". Do NOT navigate by deep-link; the app's launch + tab/drawer navigation is the only entry path. \`targetPages\` lists the screen-ids involved in the flow.
|
|
65796
|
+
12. **targetPages must be copied CHARACTER-FOR-CHARACTER from the screen-ids in the evidence** (they look like \`com.example.app.MainActivity#ab12cd34\`). NEVER invent, prettify, or abbreviate them \u2014 no "Landing", "AUTH", "Home Screen", or any name that is not literally in the provided screens. A scenario whose targetPages contains even ONE id not present in the evidence is REJECTED WHOLESALE by the validator, so a single made-up route silently destroys the entire scenario. If you are unsure which screen-id a step touches, use the screen-id of the screen where the flow STARTS.
|
|
65796
65797
|
11. **Happy paths must verify the DURABLE OUTCOME, not just the trigger.** A HAPPY_PATH is NOT complete until it verifies the feature's real output. "Button tapped" / "Sheet opened" / "Spinner appeared" is NOT a happy path - that is a UI interaction test. Apply this to any feature where an action produces a result the user then sees or uses: CRUD creates, photo/file uploads, searches that return results, imports, exports, payments, messages sent, AI/ML outputs, generated documents, sync runs, analysis runs, conversion, data processing. The scenario MUST include:
|
|
65797
65798
|
- The trigger step (Tap Submit / Generate / Send / Upload / Run / Analyze / Save / Pay / etc.)
|
|
65798
65799
|
- A wait step for the operation to complete. Phrase it by SIGNAL, not wall-clock ("Wait for the result to appear - up to 60 seconds"). Prefer signals the app actually uses: spinner disappears, status badge flips to a success state, a new row appears, an item count increments, a success toast/snackbar shows, the screen transitions to a result screen.
|
|
@@ -66596,10 +66597,12 @@ var require_mobile_generator = __commonJS({
|
|
|
66596
66597
|
## Your job
|
|
66597
66598
|
1. mobile_snapshot the current screen.
|
|
66598
66599
|
2. Execute the scenario's steps using the real UI: tap buttons, fill fields (mobile_type), submit, navigate.
|
|
66599
|
-
3.
|
|
66600
|
+
3. COMPLETE THE ACTION the scenario is about \u2014 do not stop half-way. If the scenario submits a form (sign in, sign up, search, create), you MUST tap the submit/primary button; filling fields is NOT the behavior under test. If it navigates, you MUST land on the destination. A "happy path" that fills a login form but never taps "Sign In" is WRONG.
|
|
66601
|
+
4. When you reach the target screen / complete the flow, PROVE the outcome with an assert tool:
|
|
66600
66602
|
- mobile_assert_visible({ref}) \u2014 the target screen's stable element is on screen.
|
|
66601
66603
|
- mobile_assert_text({ref, expected}) \u2014 an element contains expected text (only durable when the element has a stable accessibility-id / resource-id).
|
|
66602
|
-
|
|
66604
|
+
- Assert the REAL post-action outcome: after a sign-in, assert a signed-in signal (dashboard/feed content, account tab, "Sign out"); after an invalid submit, assert the error message; after navigation, assert an element unique to the destination screen. Do NOT assert an opaque internal id ("step-1", "step-2") as the outcome \u2014 pick a human-meaningful element.
|
|
66605
|
+
5. Call finish_generate with verified:true ONLY if you asserted the outcome with an assert tool.
|
|
66603
66606
|
|
|
66604
66607
|
## Rules
|
|
66605
66608
|
- Re-snapshot before every assertion so the ref is fresh.
|
|
@@ -66607,6 +66610,8 @@ var require_mobile_generator = __commonJS({
|
|
|
66607
66610
|
- Assert only DURABLE elements \u2014 screen chrome that exists on every visit (tab labels, headers, nav bars, the entity you just created). NEVER assert one-time / data-dependent UI: empty-state CTAs ("Add Your First \u2026", "Get Started", "No items yet"), onboarding banners, or counters \u2014 they vanish as soon as the account has data, and the test then fails forever on a healthy app.
|
|
66608
66611
|
- Do NOT trigger irreversible side effects (real payments, sending messages to others) \u2014 note them and assert what you safely can.
|
|
66609
66612
|
- Stay inside this app.${targetLine} Do not open or use app stores, browsers, email apps, settings, or any other app. If an action leaves the target app, the runner will relaunch the target app and reject that action.
|
|
66613
|
+
- NEVER tap the phone's home screen / launcher (app icons, "Predicted app" chips, search bars, widgets). Those are NOT part of the app under test \u2014 tapping them is junk that poisons the test. If the app ever backgrounds or you find yourself on the launcher, use mobile_relaunch to cold-start the app; do NOT tap a launcher icon or app-prediction to get back in.
|
|
66614
|
+
- Do NOT re-do a sequence you already completed. If you filled a form then navigated away, do NOT come back and fill it again \u2014 the scenario needs ONE clean pass. Filling the login form, going back, and re-filling it is exactly the kind of wandering that produces a bloated, broken test.
|
|
66610
66615
|
- Do ONLY the actions this scenario needs. Do NOT re-open a menu you already opened, re-select an option that is already selected, toggle a setting back and forth, or repeat a step that already succeeded \u2014 EVERY action you take is baked into the generated test verbatim, so each extra action becomes a permanent junk step.
|
|
66611
66616
|
- Each action must make NEW progress toward the goal. If an action leaves the screen unchanged, do NOT repeat it \u2014 pick a different element or move on.
|
|
66612
66617
|
- Finish promptly once the outcome is proven: the instant the expected outcome is visible, assert it and call finish_generate. Do not keep exploring after the goal is proven.
|
|
@@ -329530,7 +329535,7 @@ var require_package4 = __commonJS({
|
|
|
329530
329535
|
"package.json"(exports, module) {
|
|
329531
329536
|
module.exports = {
|
|
329532
329537
|
name: "@validate.qa/runner",
|
|
329533
|
-
version: "1.0.
|
|
329538
|
+
version: "1.0.29",
|
|
329534
329539
|
description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
|
|
329535
329540
|
bin: {
|
|
329536
329541
|
"validate-runner": "dist/cli.js"
|
package/package.json
CHANGED