reporting-labs 0.6.3 → 0.6.4

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/README.md CHANGED
@@ -604,6 +604,10 @@ Your Slack step can then read `results.json` for pass / fail counts and top fail
604
604
  - **Print.** A print stylesheet is included, so "Save as PDF" works.
605
605
  - **Themes.** Light and dark follow the OS. The toggle in the header remembers your choice.
606
606
 
607
+ ## Java teams
608
+
609
+ The same report, from Java: `dev.reportinglabs` on Maven Central, for TestNG and JUnit 5, with zero-code add-ons for Selenium and REST Assured and a one-line add-on for Playwright for Java. Source: [reporting-labs-java](https://github.com/naveenautomationlabs/reporting-labs-java). Guides: [reportinglabs.dev/get-started/java](https://reportinglabs.dev/get-started/java).
610
+
607
611
  ## Roadmap
608
612
 
609
613
  - WebdriverIO, Cypress, Jest/Vitest and JUnit XML adapters
@@ -1155,7 +1155,7 @@ function errorWhere(e){
1155
1155
  function errorBody(e){
1156
1156
  const msg=e.message||'';
1157
1157
  const box=h('div',{class:'err'}, msg, e.stack&&e.stack!==msg? h('details',{}, h('summary',{},'Stack trace'), h('div',{class:'stack'},e.stack)) : null);
1158
- const ex=msg.match(/^(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^(Received[^:\n]{0,40}):[ \t]*(.+)$/m);
1158
+ const ex=msg.match(/^\s*(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^\s*((?:Received|Actual|But was)[^:\n]{0,40}):[ \t]*(.+)$/m);
1159
1159
  if(ex&&rc&&ex[2].trim()&&rc[2].trim()&&ex[2].length<2000&&rc[2].length<2000){
1160
1160
  const d=tokenDiff(ex[2].trim(), rc[2].trim());
1161
1161
  if(d){ return h('div',{}, h('div',{class:'ediff'},
@@ -1591,7 +1591,7 @@ function compare(set){
1591
1591
  /* ---- bug report: a ready-to-paste ticket built from the failure ---- */
1592
1592
  function bugModel(t){
1593
1593
  const r=t.results[t.results.length-1], e=r&&r.errors[0], x=e&&e.explain, msg=e?e.message:'';
1594
- const ex=msg.match(/^(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^(Received[^:\n]{0,40}):[ \t]*(.+)$/m);
1594
+ const ex=msg.match(/^\s*(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^\s*((?:Received|Actual|But was)[^:\n]{0,40}):[ \t]*(.+)$/m);
1595
1595
  const si=sinceInfo(t);
1596
1596
  const steps=[]; const walk=(list,depth)=>{ for(const st of list){ if(st.category==='hook'||/^Attach "/.test(st.title)||/^Worker Cleanup/.test(st.title)) continue; const user=st.category==='test.step'; if(user||depth===0) steps.push({title:st.title.replace(/^(Given|When|Then|And|But)\s+/,m=>m), failed:!!st.error, user}); if(user&&st.steps.length&&!st.steps.some(c=>c.category==='test.step')) continue; if(st.steps.length) walk(st.steps,depth+1); } };
1597
1597
  if(r) walk(r.steps,0);
package/dist/template.js CHANGED
@@ -1221,7 +1221,7 @@ function errorWhere(e){
1221
1221
  function errorBody(e){
1222
1222
  const msg=e.message||'';
1223
1223
  const box=h('div',{class:'err'}, msg, e.stack&&e.stack!==msg? h('details',{}, h('summary',{},'Stack trace'), h('div',{class:'stack'},e.stack)) : null);
1224
- const ex=msg.match(/^(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^(Received[^:\n]{0,40}):[ \t]*(.+)$/m);
1224
+ const ex=msg.match(/^\s*(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^\s*((?:Received|Actual|But was)[^:\n]{0,40}):[ \t]*(.+)$/m);
1225
1225
  if(ex&&rc&&ex[2].trim()&&rc[2].trim()&&ex[2].length<2000&&rc[2].length<2000){
1226
1226
  const d=tokenDiff(ex[2].trim(), rc[2].trim());
1227
1227
  if(d){ return h('div',{}, h('div',{class:'ediff'},
@@ -1657,7 +1657,7 @@ function compare(set){
1657
1657
  /* ---- bug report: a ready-to-paste ticket built from the failure ---- */
1658
1658
  function bugModel(t){
1659
1659
  const r=t.results[t.results.length-1], e=r&&r.errors[0], x=e&&e.explain, msg=e?e.message:'';
1660
- const ex=msg.match(/^(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^(Received[^:\n]{0,40}):[ \t]*(.+)$/m);
1660
+ const ex=msg.match(/^\s*(Expected[^:\n]{0,40}):[ \t]*(.+)$/m), rc=msg.match(/^\s*((?:Received|Actual|But was)[^:\n]{0,40}):[ \t]*(.+)$/m);
1661
1661
  const si=sinceInfo(t);
1662
1662
  const steps=[]; const walk=(list,depth)=>{ for(const st of list){ if(st.category==='hook'||/^Attach "/.test(st.title)||/^Worker Cleanup/.test(st.title)) continue; const user=st.category==='test.step'; if(user||depth===0) steps.push({title:st.title.replace(/^(Given|When|Then|And|But)\s+/,m=>m), failed:!!st.error, user}); if(user&&st.steps.length&&!st.steps.some(c=>c.category==='test.step')) continue; if(st.steps.length) walk(st.steps,depth+1); } };
1663
1663
  if(r) walk(r.steps,0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reporting-labs",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "reportingLabs – beautiful, customizable single-file HTML test reports. One line of config. Playwright adapter included, more runners on the way.",
5
5
  "keywords": [
6
6
  "test-report",