@ia-qa/pal 1.11.0 → 1.11.1
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/TUTORIAL.md +1 -1
- package/dist/ui/page.js +56 -10
- package/dist/ui/page.js.map +1 -1
- package/package.json +1 -1
package/TUTORIAL.md
CHANGED
|
@@ -478,7 +478,7 @@ npx ia-qa-pal ui
|
|
|
478
478
|
2. **Run a tour.** Pick the user (with several, the page never picks for you), tick *also run my tests* if you want the pages your suite never visits, then **Start the tour**. If the tour logs in with a form and a secret it needs is not set, the page says which one before starting and fills in the field to store it — you never wait for a tour that was going to die in its first second.
|
|
479
479
|
3. **Now** follows it: the phase, *page N of M*, the page being walked, the last heartbeat. You can close the tab; the tour keeps going and the page picks it up when you come back. A tour that failed shows its reason here.
|
|
480
480
|
4. **Last result.** The mood and why — the headline, *Read this first*, and each broken link with the page that links to it — then the counts, who it ran as, and the full report. When there are elements to decide or repairs ready, **Decide and repair** opens the repair console (`ia-qa-heal ui`) on the same project — each row side by side, nothing applied until you say so.
|
|
481
|
-
4b. **Waiting on you.** When several elements now answer to the name one of your tests uses, the choice is taken right here: a picture of each candidate and **✅ This one**. pal hands your choice to `ia-qa-heal decide` — only a candidate heal itself lists is accepted — which rewrites the test, re-runs it and answers *done, green* or *still red*. The card follows the run (how long, the last line your tests printed, *nothing heard for a while* if one hangs — no made-up percentage), can **👀 show you the browser** when only the changed spec files re-run, and offers **↩️ Undo**. Nothing is committed: the pull request is yours. The choice works without screenshots too — each candidate is then listed by name and selector. An element **gone** from the page gets no button, on purpose, and says which case it is: *✅ Nothing to do* when no test uses it, *🚫 No repair button* with the `file:line` to change or delete when one does. Rows it cannot settle in place — one your test now reaches by mistake — are counted, with the button to the repair console.
|
|
481
|
+
4b. **Waiting on you.** It opens on the totals — *⚖️ to choose · 🚫 to fix in your tests · ✅ nothing to do* — each one a shortcut to its section; a long list of gone elements is usually one or two redesigned pages, so those rows are compact, grouped by page, and the ones that ask nothing of you are folded. When several elements now answer to the name one of your tests uses, the choice is taken right here: a picture of each candidate and **✅ This one**. pal hands your choice to `ia-qa-heal decide` — only a candidate heal itself lists is accepted — which rewrites the test, re-runs it and answers *done, green* or *still red*. The card follows the run (how long, the last line your tests printed, *nothing heard for a while* if one hangs — no made-up percentage), can **👀 show you the browser** when only the changed spec files re-run, and offers **↩️ Undo**. Nothing is committed: the pull request is yours. The choice works without screenshots too — each candidate is then listed by name and selector. An element **gone** from the page gets no button, on purpose, and says which case it is: *✅ Nothing to do* when no test uses it, *🚫 No repair button* with the `file:line` to change or delete when one does. Rows it cannot settle in place — one your test now reaches by mistake — are counted, with the button to the repair console.
|
|
482
482
|
4c. **Apply the repairs.** When a tour found repairs ready (a selector moved, the element clearly still there), the result card offers **🔧 Apply the N repairs and re-run my tests**: heal's `fix --verify`, followed live the same way, ending on *repaired and green* or *still red*. It asks first, never commits, and is undone with `git`.
|
|
483
483
|
|
|
484
484
|
[](https://www.ia-qa.com/media/pal-console-result.png)
|
package/dist/ui/page.js
CHANGED
|
@@ -107,6 +107,12 @@ figure{margin:0;max-width:360px}
|
|
|
107
107
|
figcaption{margin-top:6px;font-size:12px;color:var(--muted)}
|
|
108
108
|
figcaption code{display:block;margin:2px 0 6px}
|
|
109
109
|
.decOut:empty{display:none}
|
|
110
|
+
.decSummary{margin:4px 0 10px}.decPill{cursor:pointer;font:inherit;font-size:13px;padding:3px 12px}
|
|
111
|
+
.decGroup{border:1px solid var(--line);border-radius:12px;padding:8px 14px;margin:10px 0}
|
|
112
|
+
.decGroup>summary{cursor:pointer;font-weight:700;padding:4px 0}
|
|
113
|
+
.decPage{font-weight:700;margin:10px 0 4px}
|
|
114
|
+
.decRow{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;padding:5px 0;border-top:1px dashed var(--line);font-size:14px}
|
|
115
|
+
.decTable .decRow:first-child{border-top:0}
|
|
110
116
|
.nocrop{width:240px;padding:14px;border:1px dashed var(--line);border-radius:8px;font-size:12px}
|
|
111
117
|
.decOut{margin-top:10px;padding:10px 12px;border-radius:10px;border-left:4px solid var(--warn);background:var(--code);white-space:pre-wrap}
|
|
112
118
|
.decOut.good{border-left-color:var(--ok)}.decOut.bad{border-left-color:var(--bad)}
|
|
@@ -717,6 +723,30 @@ figcaption code{display:block;margin:2px 0 6px}
|
|
|
717
723
|
const list = q('decList'); list.textContent = '';
|
|
718
724
|
show('decideCard', v.actionable.length > 0 || v.lost.length > 0 || v.others > 0);
|
|
719
725
|
const outs = [];
|
|
726
|
+
// Sorted by what the person has to do, totals first: a long list of "gone" is almost always one
|
|
727
|
+
// or two redesigned pages, and grouping by page says so at a glance.
|
|
728
|
+
const lostUsed = v.lost.filter((l) => l.sites.length > 0);
|
|
729
|
+
const lostFree = v.lost.filter((l) => l.sites.length === 0);
|
|
730
|
+
const sections = {};
|
|
731
|
+
const summary = el('div', null, 'row decSummary');
|
|
732
|
+
const pillFor = (key, text, tone) => {
|
|
733
|
+
const b = el('button', text, 'pill ' + tone + ' decPill');
|
|
734
|
+
b.onclick = () => { const s = sections[key]; if (!s) return; if (s.tagName === 'DETAILS') s.open = true; s.scrollIntoView({ behavior: 'smooth', block: 'start' }); };
|
|
735
|
+
summary.appendChild(b);
|
|
736
|
+
};
|
|
737
|
+
if (v.actionable.length) pillFor('choose', '⚖️ ' + v.actionable.length + ' to choose', 'warn');
|
|
738
|
+
if (lostUsed.length) pillFor('used', '🚫 ' + lostUsed.length + ' to fix in your tests', 'bad');
|
|
739
|
+
if (lostFree.length) pillFor('free', '✅ ' + lostFree.length + ' nothing to do', 'ok');
|
|
740
|
+
if (v.others) pillFor('others', '🔧 ' + v.others + ' in the repair console', 'info');
|
|
741
|
+
list.appendChild(summary);
|
|
742
|
+
const byPage = (items) => { const m = new Map(); for (const it of items) { if (!m.has(it.page)) m.set(it.page, []); m.get(it.page).push(it); } return [...m.entries()].sort((a, b) => b[1].length - a[1].length); };
|
|
743
|
+
const group = (key, title, open, intro) => {
|
|
744
|
+
const d = document.createElement('details'); d.className = 'decGroup'; d.open = open;
|
|
745
|
+
d.appendChild(el('summary', title)); if (intro) d.appendChild(el('div', intro, 'muted'));
|
|
746
|
+
sections[key] = d; return d;
|
|
747
|
+
};
|
|
748
|
+
const chooseBox = el('div', null, 'decChoose');
|
|
749
|
+
if (v.actionable.length) { chooseBox.appendChild(el('div', '⚖️ To choose — ' + v.actionable.length, 'q')); sections.choose = chooseBox; list.appendChild(chooseBox); }
|
|
720
750
|
for (const d of v.actionable) {
|
|
721
751
|
const card = el('div', null, 'dec');
|
|
722
752
|
const head = el('div', null, 'row'); head.appendChild(el('span', 'ambiguous', 'pill warn')); head.appendChild(el('strong', d.label)); head.appendChild(el('span', 'on ' + d.page, 'muted'));
|
|
@@ -740,20 +770,36 @@ figcaption code{display:block;margin:2px 0 6px}
|
|
|
740
770
|
};
|
|
741
771
|
cap.appendChild(pick); fig.appendChild(cap); figs.appendChild(fig);
|
|
742
772
|
}
|
|
743
|
-
card.appendChild(figs); card.appendChild(out);
|
|
773
|
+
card.appendChild(figs); card.appendChild(out); chooseBox.appendChild(card);
|
|
744
774
|
outs.push([d, out]);
|
|
745
775
|
}
|
|
746
|
-
// Gone from the page: no button, and said why
|
|
747
|
-
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
776
|
+
// Gone from the page: no button, and said why once per group rather than once per row.
|
|
777
|
+
if (lostUsed.length) {
|
|
778
|
+
const g = group('used', '🚫 Gone, and your tests still use them — ' + lostUsed.length, true,
|
|
779
|
+
'No repair button, on purpose: these elements are gone from their page, so there is nothing to rewrite your tests towards. Point each step at what replaced it, or delete the step.');
|
|
780
|
+
for (const [page, items] of byPage(lostUsed)) {
|
|
781
|
+
g.appendChild(el('div', page + ' — ' + items.length, 'decPage'));
|
|
782
|
+
const tbl = el('div', null, 'decTable');
|
|
783
|
+
for (const l of items) {
|
|
784
|
+
const row = el('div', null, 'decRow');
|
|
785
|
+
row.appendChild(el('span', l.label)); row.appendChild(el('code', l.sites.map((x) => x.file + ':' + x.line).join(', ')));
|
|
786
|
+
tbl.appendChild(row);
|
|
787
|
+
}
|
|
788
|
+
g.appendChild(tbl);
|
|
789
|
+
}
|
|
790
|
+
list.appendChild(g);
|
|
791
|
+
}
|
|
792
|
+
if (lostFree.length) {
|
|
793
|
+
// Folded by default: nothing here asks anything of anybody. Still counted and named per page.
|
|
794
|
+
const g = group('free', '✅ Gone, nothing to do — ' + lostFree.length, false, 'Gone from their page, and no test of yours uses them: nothing in your suite breaks.');
|
|
795
|
+
for (const [page, items] of byPage(lostFree)) {
|
|
796
|
+
const names = items.map((l) => l.label);
|
|
797
|
+
g.appendChild(el('div', page + ' — ' + items.length + ': ' + names.slice(0, 12).join(', ') + (names.length > 12 ? ', +' + (names.length - 12) + ' more' : ''), 'decRow'));
|
|
798
|
+
}
|
|
799
|
+
list.appendChild(g);
|
|
755
800
|
}
|
|
756
801
|
const others = q('decOthers'); others.textContent = '';
|
|
802
|
+
if (v.others > 0) sections.others = others;
|
|
757
803
|
show('decOthers', v.others > 0);
|
|
758
804
|
if (v.others > 0) {
|
|
759
805
|
others.appendChild(el('span', v.others + ' more row' + (v.others === 1 ? '' : 's') + ' need you — an element your test now reaches by mistake, or a choice no test uses. The repair console shows each one. '));
|
package/dist/ui/page.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/ui/page.ts"],"names":[],"mappings":";;AAoBA,
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/ui/page.ts"],"names":[],"mappings":";;AAoBA,8CAm3BC;AAv4BD,iEAAkE;AAElE,4FAA4F;AAC5F,kFAAkF;AAClF,MAAM,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAiB,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,O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
|
1
1
|
{
|
|
2
2
|
"name": "@ia-qa/pal",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "Create and maintain end-to-end test suites that don't break when your UI moves — a local QA app you open from a desktop icon. It tours every page and reports what broke since last time, drafts Playwright tests for the pages nothing tests, repairs your Playwright, Cypress or Selenium selectors after your review, and names the pages no test visits. No account, no cloud.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|