allure-cypress 3.0.0-beta.10 → 3.0.0-beta.12

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
@@ -71,13 +71,30 @@ Learn more about Allure Cypress from the official documentation at
71
71
 
72
72
 
73
73
  ## Allure Cypress options
74
- | Option | Description | Default |
75
- |-----------------|----------------------------------------------------------------------------------------------------------------------|--------------------|
76
- | resultsDir | The path of the results folder. | `./allure-results` |
77
- | videoOnFailOnly | When video capturing is enabled, set this option to `true` to attach the video to failed specs only. | `undefined` |
78
- | links | Allure Runtime API link templates. | `undefined` |
79
- | environmentInfo | A set of key-value pairs to display in the Environment section of the report | `undefined` |
80
- | categories | An array of category definitions, each describing a [category of defects](https://allurereport.org/docs/categories/) | `undefined` |
74
+
75
+ Customize Allure Cypress by providing a configuration object as the third argument
76
+ of `allureCypress`.
77
+
78
+ The following options are supported:
79
+
80
+ | Option | Description | Default |
81
+ |-------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------|
82
+ | resultsDir | The path of the results folder. | `./allure-results` |
83
+ | videoOnFailOnly | When video capturing is enabled, set this option to `true` to attach the video to failed specs only. | `false` |
84
+ | links | Allure Runtime API link templates. | `undefined` |
85
+ | stepsFromCommands | Options that affect how Allure creates steps from Cypress commands | See [below](#stepsfromcommands) |
86
+ | environmentInfo | A set of key-value pairs to display in the Environment section of the report | `undefined` |
87
+ | categories | An array of category definitions, each describing a [category of defects](https://allurereport.org/docs/categories/) | `undefined` |
88
+
89
+ ### stepsFromCommands
90
+
91
+ | Property | Description | Default |
92
+ |-------------------|---------------------------------------------------------------------------------------------------------------------------------------------|---------|
93
+ | maxArgumentLength | The maximum length of the parameter value created from Cypress command argument. The rest of the characters are replaces with `...`. | 128 |
94
+ | maxArgumentDepth | The maximum depth of the Cypress command argument (an array or an object) that will be converted to the corresponding step parameter value. | 3 |
95
+
96
+
97
+ ### Example
81
98
 
82
99
  Here is an example of the Allure Cypress configuration:
83
100
 
@@ -100,6 +117,10 @@ export default defineConfig({
100
117
  nameTemplate: "ISSUE-%s",
101
118
  },
102
119
  },
120
+ stepsFromCommands: {
121
+ maxArgumentLength: 64,
122
+ maxArgumentDepth: 5,
123
+ },
103
124
  environmentInfo: {
104
125
  OS: os.platform(),
105
126
  Architecture: os.arch(),
@@ -157,7 +178,39 @@ export default defineConfig({
157
178
  });
158
179
  ```
159
180
 
160
- ## Known limitations
181
+ ## Common issues
182
+
183
+ ### The test plan feature doesn't work
184
+
185
+ Make sure you pass the Cypress config as the second argument of `allureCypress`.
186
+
187
+ Correct:
188
+
189
+ ```javascript
190
+ allureCypress(on, config);
191
+ ```
192
+
193
+ Also correct:
194
+
195
+ ```javascript
196
+ allureCypress(on, config, {
197
+ resultsDir: "output",
198
+ });
199
+ ```
200
+
201
+ Incorrect (the test plan won't work):
202
+
203
+ ```javascript
204
+ allureCypress(on);
205
+ ```
206
+
207
+ Also incorrect (the legacy style; the test plan won't work either):
208
+
209
+ ```javascript
210
+ allureCypress(on, {
211
+ resultsDir: "output",
212
+ });
213
+ ```
161
214
 
162
215
  ### `setupNodeEvents` limitations
163
216
 
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var D=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Je=Object.getOwnPropertyNames;var Xe=Object.prototype.hasOwnProperty;var Qe=(e,t)=>{for(var r in t)D(e,r,{get:t[r],enumerable:!0})},et=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Je(t))!Xe.call(e,a)&&a!==r&&D(e,a,{get:()=>t[a],enumerable:!(s=Ze(t,a))||s.enumerable});return e};var tt=e=>et(D({},"__esModule",{value:!0}),e);var At={};Qe(At,{ContentType:()=>b,LabelName:()=>u,LinkType:()=>E,Severity:()=>$,Stage:()=>W,Status:()=>l,StatusByPriority:()=>Y,allureId:()=>me,attachment:()=>ie,attachmentPath:()=>pe,description:()=>re,descriptionHtml:()=>se,displayName:()=>ae,epic:()=>ye,feature:()=>ge,historyId:()=>ne,issue:()=>ce,label:()=>y,labels:()=>Q,layer:()=>xe,link:()=>P,links:()=>ee,logStep:()=>ue,owner:()=>Te,parameter:()=>te,parentSuite:()=>ve,severity:()=>Ee,step:()=>le,story:()=>fe,subSuite:()=>Se,suite:()=>he,tag:()=>_e,tags:()=>Me,testCaseId:()=>oe,tms:()=>de});module.exports=tt(At);var l=function(e){return e.FAILED="failed",e.BROKEN="broken",e.PASSED="passed",e.SKIPPED="skipped",e}({}),Y=[l.FAILED,l.BROKEN,l.PASSED,l.SKIPPED],W=function(e){return e.SCHEDULED="scheduled",e.RUNNING="running",e.FINISHED="finished",e.PENDING="pending",e.INTERRUPTED="interrupted",e}({}),u=function(e){return e.ALLURE_ID="ALLURE_ID",e.AS_ID="ALLURE_ID",e.SUITE="suite",e.PARENT_SUITE="parentSuite",e.SUB_SUITE="subSuite",e.EPIC="epic",e.FEATURE="feature",e.STORY="story",e.SEVERITY="severity",e.TAG="tag",e.OWNER="owner",e.LEAD="lead",e.HOST="host",e.THREAD="thread",e.TEST_METHOD="testMethod",e.TEST_CLASS="testClass",e.PACKAGE="package",e.FRAMEWORK="framework",e.LANGUAGE="language",e.LAYER="layer",e}({}),$=function(e){return e.BLOCKER="blocker",e.CRITICAL="critical",e.NORMAL="normal",e.MINOR="minor",e.TRIVIAL="trivial",e}({}),b=function(e){return e.TEXT="text/plain",e.XML="application/xml",e.HTML="text/html",e.CSV="text/csv",e.TSV="text/tab-separated-values",e.CSS="text/css",e.URI="text/uri-list",e.SVG="image/svg+xml",e.PNG="image/png",e.JSON="application/json",e.ZIP="application/zip",e.WEBM="video/webm",e.JPEG="image/jpeg",e.MP4="video/mp4",e.IMAGEDIFF="application/vnd.allure.image.diff",e}({}),E=function(e){return e.DEFAULT="link",e.ISSUE="issue",e.TMS="tms",e}({});function C(){C=function(n,o){return new r(n,void 0,o)};var e=RegExp.prototype,t=new WeakMap;function r(a,n,o){var i=RegExp(a,n);return t.set(i,o||t.get(a)),R(i,r.prototype)}function s(a,n){var o=t.get(n);return Object.keys(o).reduce(function(i,p){var g=o[p];if(typeof g=="number")i[p]=a[g];else{for(var f=0;a[g[f]]===void 0&&f+1<g.length;)f++;i[p]=a[g[f]]}return i},Object.create(null))}return rt(r,RegExp),r.prototype.exec=function(a){var n=e.exec.call(this,a);if(n){n.groups=s(n,this);var o=n.indices;o&&(o.groups=s(o,this))}return n},r.prototype[Symbol.replace]=function(a,n){if(typeof n=="string"){var o=t.get(this);return e[Symbol.replace].call(this,a,n.replace(/\$<([^>]+)>/g,function(p,g){var f=o[g];return"$"+(Array.isArray(f)?f.join("$"):f)}))}if(typeof n=="function"){var i=this;return e[Symbol.replace].call(this,a,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(s(p,i)),n.apply(this,p)})}return e[Symbol.replace].call(this,a,n)},C.apply(this,arguments)}function rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},R(e,t)}var v=e=>{switch(!0){case/assert/gi.test(e.constructor.name):case/expectation/gi.test(e.constructor.name):case/assert/gi.test(e.name):case/assert/gi.test(e.message):return l.FAILED;default:return l.BROKEN}},st=function(){var{onlyFirst:t=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")},I=e=>{var t=st();return e.replace(t,"")},h=e=>{var{message:t,stack:r}=e;return{message:t?I(t):void 0,trace:r?I(r):void 0}},q=C(/(?:^|\s)@?allure\.id[:=]([^\s]+)/,{id:1}),at=new RegExp(q,"g"),Z=C(/(?:^|\s)@?allure\.label\.([^:=\s]+)[:=]([^\s]+)/,{name:1,value:2}),nt=new RegExp(Z,"g");var k=e=>{var t=[];e.split(" ").forEach(s=>{var a,n=(a=s.match(q))===null||a===void 0||(a=a.groups)===null||a===void 0?void 0:a.id;n&&t.push({name:u.ALLURE_ID,value:n});var o=s.match(Z),{name:i,value:p}=o?.groups||{};i&&p&&t?.push({name:i,value:p})});var r=e.replace(nt,"").replace(at,"").trim();return{labels:t,cleanTitle:r}};var ot=e=>e.reduce((t,r)=>{if(r.type!=="step_start"&&r.type!=="step_stop")return t;if(r.type==="step_start")return t.push([r]),t;var s=t.findLastIndex(a=>a.length===1);return s===-1||t[s].push(r),t},[]),O=e=>{var t=ot(e);return t.filter(r=>r.length===1)},F=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";var S="__allure_report_system_hook__",x="__allure_report_step_command__";function J(e,t,r,s,a,n,o){try{var i=e[n](o),p=i.value}catch(g){return void r(g)}i.done?t(p):Promise.resolve(p).then(s,a)}function m(e){return function(){var t=this,r=arguments;return new Promise(function(s,a){var n=e.apply(t,r);function o(p){J(n,s,a,o,i,"next",p)}function i(p){J(n,s,a,o,i,"throw",p)}o(void 0)})}}var N=class{attachment(){var t=this;return m(function*(){yield t.warning()})()}attachmentFromPath(){var t=this;return m(function*(){yield t.warning()})()}description(){var t=this;return m(function*(){yield t.warning()})()}descriptionHtml(){var t=this;return m(function*(){yield t.warning()})()}displayName(){var t=this;return m(function*(){yield t.warning()})()}historyId(){var t=this;return m(function*(){yield t.warning()})()}labels(){var t=this;return m(function*(){yield t.warning()})()}links(){var t=this;return m(function*(){yield t.warning()})()}parameter(){var t=this;return m(function*(){yield t.warning()})()}logStep(){var t=this;return m(function*(){yield t.warning()})()}step(t,r){var s=this;return m(function*(){return yield s.warning(),r()})()}stepDisplayName(){var t=this;return m(function*(){yield t.warning()})()}stepParameter(){var t=this;return m(function*(){yield t.warning()})()}testCaseId(){var t=this;return m(function*(){yield t.warning()})()}warning(){return m(function*(){console.log("no test runtime is found. Please check test framework configuration")})()}},T=new N;var X="allureTestRuntime",L=e=>{globalThis[X]=()=>e},H=()=>globalThis?.[X],U=()=>{var e=H();if(e){var t;return(t=e())!==null&&t!==void 0?t:T}return T},j=()=>{var e=H();if(e){var t;return(t=e())!==null&&t!==void 0?t:T}if("_playwrightInstance"in globalThis)try{return(0,eval)("(() => import('allure-playwright/autoconfig'))()").then(()=>{var r,s;return(r=(s=H())===null||s===void 0?void 0:s())!==null&&r!==void 0?r:T})}catch(r){return console.log("can't execute allure-playwright/autoconfig",r),T}return T};var c=function(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];var n=j();return F(n)?n.then(o=>o[t](...s)):n[t](...s)},y=(e,t)=>c("labels",{name:e,value:t}),Q=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return c("labels",...r)},P=(e,t,r)=>c("links",{url:e,type:r,name:t}),ee=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return c("links",...r)},te=(e,t,r)=>c("parameter",e,t,r),re=e=>c("description",e),se=e=>c("descriptionHtml",e),ae=e=>c("displayName",e),ne=e=>c("historyId",e),oe=e=>c("testCaseId",e),ie=(e,t,r)=>{var s=typeof r=="string"?{contentType:r}:r;return c("attachment",e,t,s)},pe=(e,t,r)=>{var s=typeof r=="string"?{contentType:r}:r;return c("attachmentFromPath",e,t,s)},it=()=>({displayName:e=>c("stepDisplayName",e),parameter:(e,t,r)=>c("stepParameter",e,t,r)}),ue=(e,t,r)=>c("logStep",e,t,r),le=(e,t)=>c("step",e,()=>t(it())),ce=(e,t)=>P(e,t,E.ISSUE),de=(e,t)=>P(e,t,E.TMS),me=e=>y(u.ALLURE_ID,e),ye=e=>y(u.EPIC,e),ge=e=>y(u.FEATURE,e),fe=e=>y(u.STORY,e),he=e=>y(u.SUITE,e),ve=e=>y(u.PARENT_SUITE,e),Se=e=>y(u.SUB_SUITE,e),Te=e=>y(u.OWNER,e),Ee=e=>y(u.SEVERITY,e),xe=e=>y(u.LAYER,e),_e=e=>y(u.TAG,e),Me=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return c("labels",...r.map(a=>({name:u.TAG,value:a})))};var _=()=>{let e=Cypress.env("allure");return e||(e={initialized:!1,messages:[],testPlan:void 0},Cypress.env("allure",e)),e},be=()=>_().initialized,Ce=()=>{_().initialized=!0},M=()=>_().messages,Re=e=>{_().messages=e},d=e=>{M().push(e)},Pe=()=>_().testPlan;var Ae=e=>Array.isArray(e)||e.buffer?btoa(String.fromCharCode.apply(null,e)):e;var G=e=>ut(e.attributes.args)?.log===!1||e.attributes.name==="task"&&e.attributes.args[0]==="reportAllureRuntimeMessages"||e.attributes.name==="then"||e.attributes.name==="wrap"&&e.attributes.args[0]===x;var ut=e=>e[e.length-1],V=(e,t)=>{let r=t.title,{cleanTitle:s,labels:a}=k(r),n=t.titlePath().slice(0,-1),o=`${e.relative}#${[...n,s].join(" ")}`;return{name:s,labels:a,fullName:o}},we=(e,t)=>{let r=Pe();if(r){let s=[];for(let a=t;a;a=s.shift()){let n=ct(r,e,a.tests);dt(a.tests,n),s.push(...a.suites)}}};var De=Symbol("The test was reported to Allure"),Ie=e=>{e[De]=!0},A=e=>e[De]===!0;var lt=(e,t,r)=>e.tests.some(s=>r&&s.id?.toString()===r||s.selector===t),ct=(e,t,r)=>{let s=[];return r.forEach((a,n)=>{let{fullName:o,labels:i}=V(t,a),p=i.find(({name:g})=>g===u.ALLURE_ID)?.value;lt(e,o,p)||s.push(n)}),s},dt=(e,t)=>{for(let r=t.length-1;r>=0;r--)e.splice(t[r],1)};var B=class{constructor(){this.#r()}labels(...t){return this.#e({type:"metadata",data:{labels:t}})}links(...t){return this.#e({type:"metadata",data:{links:t}})}parameter(t,r,s){return this.#e({type:"metadata",data:{parameters:[{name:t,value:r,...s}]}})}description(t){return this.#e({type:"metadata",data:{description:t}})}descriptionHtml(t){return this.#e({type:"metadata",data:{descriptionHtml:t}})}displayName(t){return this.#e({type:"metadata",data:{displayName:t}})}historyId(t){return this.#e({type:"metadata",data:{historyId:t}})}testCaseId(t){return this.#e({type:"metadata",data:{testCaseId:t}})}attachment(t,r,s){let a=r?.type==="Buffer"?r.data:r,n=typeof a=="string"?"utf8":"base64",o=Ae(a);return this.#e({type:"attachment_content",data:{name:t,content:o,encoding:n,contentType:s.contentType,fileExtension:s.fileExtension}})}attachmentFromPath(t,r,s){return this.#e({type:"attachment_path",data:{name:t,path:r,contentType:s.contentType,fileExtension:s.fileExtension}})}logStep(t,r=l.PASSED,s){return cy.wrap(x,{log:!1}).then(()=>(this.#e({type:"step_start",data:{name:t,start:Date.now()}}),Cypress.Promise.resolve())).then(()=>this.#e({type:"step_stop",data:{status:r,stop:Date.now(),statusDetails:s?{...h(s)}:void 0}}))}step(t,r){return cy.wrap(x,{log:!1}).then(()=>(this.#e({type:"step_start",data:{name:t,start:Date.now()}}),Cypress.Promise.resolve(r()))).then(s=>this.#e({type:"step_stop",data:{status:l.PASSED,stop:Date.now()}}).then(()=>s))}stepDisplayName(t){return this.#e({type:"step_metadata",data:{name:t}})}stepParameter(t,r,s){return this.#e({type:"step_metadata",data:{parameters:[{name:t,value:r,mode:s}]}})}flushMessages=()=>this.#t("reportAllureCypressSpecMessages");flushFinalMessages=()=>this.#t("reportFinalAllureCypressSpecMessages");#t=t=>{let r=this.#s();return r.length?cy.task(t,{absolutePath:Cypress.spec.absolute,messages:r},{log:!1}):Cypress.Promise.resolve()};#r=()=>Re([]);#e=t=>(d(t),Cypress.Promise.resolve());#s=()=>{let t=M();return this.#r(),t}},ke=()=>L(new B),Oe=()=>U(),w=()=>Oe().flushMessages(),Fe=()=>Oe().flushFinalMessages(),Ne=()=>{d({type:"cypress_run_start",data:{}})},He=e=>{d({type:"cypress_suite_start",data:{name:e.title,root:!e.parent,start:Date.now()}})},Le=e=>{d({type:"cypress_suite_end",data:{root:!e.parent,stop:Date.now()}})},Ue=e=>{d({type:"cypress_hook_start",data:{name:e.title,start:Date.now()}})},je=e=>{d({type:"cypress_hook_end",data:{duration:e.duration??0}})},K=(e,t)=>{let r=V(Cypress.spec,e);t&&r.labels.push({name:"reported",value:t}),d({type:"cypress_test_start",data:{...r,start:e.wallClockStartedAt?.getTime()||Date.now()}}),Ie(e)},z=(e,t)=>{let r=M();O(r).forEach(()=>{d({type:"step_stop",data:{stop:Date.now(),status:e,statusDetails:t}})})},Ge=()=>{z(l.PASSED),d({type:"cypress_test_pass",data:{}})},Ve=e=>{A(e)?Ye(l.SKIPPED,{message:"The test was skipped before the command was completed"}):K(e),d({type:"cypress_test_skip",data:{}})},Be=e=>{d({type:"cypress_command_start",data:{name:`Command "${e.attributes.name}"`,args:e.attributes.args.map(t=>typeof t=="string"?t:JSON.stringify(t,null,2)),start:Date.now()}})},Ke=()=>{d({type:"cypress_command_end",data:{status:l.PASSED,stop:Date.now()}})},ze=(e,t)=>{d({type:"attachment_path",data:{path:e,name:t||"Screenshot",contentType:b.PNG}})},Ye=(e,t)=>{let r=M(),s=r.toReversed().findIndex(({type:i})=>i==="cypress_command_start"),a=r.toReversed().findIndex(({type:i})=>i==="cypress_command_end"),n=s>a,o={status:e,stop:Date.now()};t&&(o.statusDetails=t),n&&d({type:"cypress_command_end",data:o})},We=e=>{let t=v(e),r=h(e);Ye(t,r),d({type:"cypress_fail",data:{status:t,statusDetails:r}})},$e=e=>{d({type:"cypress_test_end",data:{duration:e.duration??0,retries:e._retries??0}})},mt=(e,...t)=>{let[r,s,a]=t;return typeof a>"u"&&typeof s>"u"?e(r):typeof s=="function"?e(r,s):e(r,s,a)},yt=(e,t)=>{let r=n=>(o,i,p)=>{e();try{return mt(n,o,i,p)}finally{t()}},s=globalThis.describe,a=r(s);a.only=r(s.only),a.skip=r(s.skip),globalThis.describe=a},gt=()=>{let e=0;return[()=>e,()=>{e++},()=>{e--}]},ft=e=>{let t=globalThis.after,r=(s,a)=>{try{return typeof s=="string"?t(s,a):t(s)}finally{e()===0&&t(S,()=>{w()})}};globalThis.after=r},qe=()=>{let[e,t,r]=gt();yt(t,r),ft(e)};var{EVENT_RUN_BEGIN:ht,EVENT_SUITE_BEGIN:vt,EVENT_SUITE_END:St,EVENT_HOOK_BEGIN:Tt,EVENT_HOOK_END:Et,EVENT_TEST_BEGIN:xt,EVENT_TEST_PASS:_t,EVENT_TEST_FAIL:Mt,EVENT_TEST_PENDING:bt,EVENT_TEST_END:Ct,EVENT_RUN_END:Rt}=Mocha.Runner.constants,Pt=()=>{be()||(Ce(),Cypress.mocha.getRunner().on(ht,()=>{ke(),Ne()}).on(vt,e=>{e.parent||we(Cypress.spec,e),He(e)}).on(St,e=>{Le(e)}).on(Tt,e=>{e.title.includes(S)||Ue(e)}).on(Et,e=>{e.title.includes(S)||je(e)}).on(xt,e=>{A(e)||K(e)}).on(_t,()=>{Ge()}).on(Mt,(e,t)=>{We(t)}).on(bt,e=>{Ve(e)}).on(Ct,e=>{$e(e)}).on(Rt,()=>{Cypress.config("isInteractive")&&Fe()}),Cypress.Screenshot.defaults({onAfterScreenshot:(e,{path:t,name:r})=>{ze(t,r)}}),Cypress.on("fail",e=>{let t=v(e),r=h(e);throw z(t,r),e}),Cypress.on("command:start",e=>{G(e)||Be(e)}),Cypress.on("command:end",e=>{G(e)||Ke()}),afterEach(S,()=>{w()}),after(S,()=>{w()}),qe())};Pt();
1
+ "use strict";var F=Object.defineProperty;var gt=Object.getOwnPropertyDescriptor;var ft=Object.getOwnPropertyNames;var ht=Object.prototype.hasOwnProperty;var St=(e,t)=>{for(var r in t)F(e,r,{get:t[r],enumerable:!0})},Tt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ft(t))!ht.call(e,n)&&n!==r&&F(e,n,{get:()=>t[n],enumerable:!(s=gt(t,n))||s.enumerable});return e};var vt=e=>Tt(F({},"__esModule",{value:!0}),e);var or={};St(or,{ContentType:()=>P,LabelName:()=>l,LinkType:()=>x,Severity:()=>ne,Stage:()=>se,Status:()=>u,StatusByPriority:()=>re,allureId:()=>Ee,attachment:()=>he,attachmentPath:()=>Se,description:()=>de,descriptionHtml:()=>me,displayName:()=>ye,epic:()=>_e,feature:()=>Ae,historyId:()=>ge,issue:()=>Ce,label:()=>y,labels:()=>ue,layer:()=>we,link:()=>w,links:()=>le,logStep:()=>Te,owner:()=>ke,parameter:()=>ce,parentSuite:()=>Re,severity:()=>De,step:()=>ve,story:()=>Me,subSuite:()=>Pe,suite:()=>be,tag:()=>Ie,tags:()=>Fe,testCaseId:()=>fe,tms:()=>xe});module.exports=vt(or);var u=function(e){return e.FAILED="failed",e.BROKEN="broken",e.PASSED="passed",e.SKIPPED="skipped",e}({}),re=[u.FAILED,u.BROKEN,u.PASSED,u.SKIPPED],se=function(e){return e.SCHEDULED="scheduled",e.RUNNING="running",e.FINISHED="finished",e.PENDING="pending",e.INTERRUPTED="interrupted",e}({}),l=function(e){return e.ALLURE_ID="ALLURE_ID",e.AS_ID="ALLURE_ID",e.SUITE="suite",e.PARENT_SUITE="parentSuite",e.SUB_SUITE="subSuite",e.EPIC="epic",e.FEATURE="feature",e.STORY="story",e.SEVERITY="severity",e.TAG="tag",e.OWNER="owner",e.LEAD="lead",e.HOST="host",e.THREAD="thread",e.TEST_METHOD="testMethod",e.TEST_CLASS="testClass",e.PACKAGE="package",e.FRAMEWORK="framework",e.LANGUAGE="language",e.LAYER="layer",e}({}),ne=function(e){return e.BLOCKER="blocker",e.CRITICAL="critical",e.NORMAL="normal",e.MINOR="minor",e.TRIVIAL="trivial",e}({}),P=function(e){return e.TEXT="text/plain",e.XML="application/xml",e.HTML="text/html",e.CSV="text/csv",e.TSV="text/tab-separated-values",e.CSS="text/css",e.URI="text/uri-list",e.SVG="image/svg+xml",e.PNG="image/png",e.JSON="application/json",e.ZIP="application/zip",e.WEBM="video/webm",e.JPEG="image/jpeg",e.MP4="video/mp4",e.IMAGEDIFF="application/vnd.allure.image.diff",e}({}),x=function(e){return e.DEFAULT="link",e.ISSUE="issue",e.TMS="tms",e}({});function k(){k=function(a,o){return new r(a,void 0,o)};var e=RegExp.prototype,t=new WeakMap;function r(n,a,o){var i=RegExp(n,a);return t.set(i,o||t.get(n)),D(i,r.prototype)}function s(n,a){var o=t.get(a);return Object.keys(o).reduce(function(i,p){var g=o[p];if(typeof g=="number")i[p]=n[g];else{for(var S=0;n[g[S]]===void 0&&S+1<g.length;)S++;i[p]=n[g[S]]}return i},Object.create(null))}return Ct(r,RegExp),r.prototype.exec=function(n){var a=e.exec.call(this,n);if(a){a.groups=s(a,this);var o=a.indices;o&&(o.groups=s(o,this))}return a},r.prototype[Symbol.replace]=function(n,a){if(typeof a=="string"){var o=t.get(this);return e[Symbol.replace].call(this,n,a.replace(/\$<([^>]+)>/g,function(p,g){var S=o[g];return"$"+(Array.isArray(S)?S.join("$"):S)}))}if(typeof a=="function"){var i=this;return e[Symbol.replace].call(this,n,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(s(p,i)),a.apply(this,p)})}return e[Symbol.replace].call(this,n,a)},k.apply(this,arguments)}function Ct(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},D(e,t)}var T=e=>{switch(!0){case/assert/gi.test(e.constructor.name):case/expectation/gi.test(e.constructor.name):case/assert/gi.test(e.name):case/assert/gi.test(e.message):case(e.stack&&/@vitest\/expect/gi.test(e.stack)):return u.FAILED;default:return u.BROKEN}},xt=function(){var{onlyFirst:t=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")},O=e=>{var t=xt();return e.replace(t,"")},f=e=>{var{message:t,stack:r}=e;return{message:t?O(t):void 0,trace:r?O(r):void 0}},ae=k(/(?:^|\s)@?allure\.id[:=]([^\s]+)/,{id:1}),Et=new RegExp(ae,"g"),oe=k(/(?:^|\s)@?allure\.label\.([^:=\s]+)[:=]([^\s]+)/,{name:1,value:2}),_t=new RegExp(oe,"g");var H=e=>{var t=[];e.split(" ").forEach(s=>{var n,a=(n=s.match(ae))===null||n===void 0||(n=n.groups)===null||n===void 0?void 0:n.id;a&&t.push({name:l.ALLURE_ID,value:a});var o=s.match(oe),{name:i,value:p}=o?.groups||{};i&&p&&t?.push({name:i,value:p})});var r=e.replace(_t,"").replace(Et,"").trim();return{labels:t,cleanTitle:r}};var At=e=>e.reduce((t,r)=>{if(r.type!=="step_start"&&r.type!=="step_stop")return t;if(r.type==="step_start")return t.push([r]),t;var s=t.findLastIndex(n=>n.length===1);return s===-1||t[s].push(r),t},[]),N=e=>{var t=At(e);return t.filter(r=>r.length===1)},E=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function",L=function(t){var{maxDepth:r=0,maxLength:s=0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Pt(typeof t=="object"?JSON.stringify(t,Mt(r)):String(t),s)},Mt=e=>{var t=[];return function(r,s){if(typeof s!="object"||s===null)return s;for(;t.length>0&&!Object.is(t.at(-1),this);)t.pop();if(!(e&&t.length>=e||t.includes(s)))return t.push(s),s instanceof Map?bt(t,s):s instanceof Set?Rt(t,s):s}},bt=(e,t)=>Array.from(t).filter(r=>{var[s]=r;return!e.includes(s)}).map(r=>{var[s,n]=r;return[s,e.includes(n)?void 0:n]}),Rt=(e,t)=>Array.from(t).map(r=>e.includes(r)?void 0:r),Pt=(e,t)=>t&&e.length>t?"".concat(e.substring(0,t),"..."):e;var _="__allure_report_system_hook__",A="__allure_report_step_command__";function ie(e,t,r,s,n,a,o){try{var i=e[a](o),p=i.value}catch(g){return void r(g)}i.done?t(p):Promise.resolve(p).then(s,n)}function m(e){return function(){var t=this,r=arguments;return new Promise(function(s,n){var a=e.apply(t,r);function o(p){ie(a,s,n,o,i,"next",p)}function i(p){ie(a,s,n,o,i,"throw",p)}o(void 0)})}}var U=class{attachment(){var t=this;return m(function*(){yield t.warning()})()}attachmentFromPath(){var t=this;return m(function*(){yield t.warning()})()}description(){var t=this;return m(function*(){yield t.warning()})()}descriptionHtml(){var t=this;return m(function*(){yield t.warning()})()}displayName(){var t=this;return m(function*(){yield t.warning()})()}historyId(){var t=this;return m(function*(){yield t.warning()})()}labels(){var t=this;return m(function*(){yield t.warning()})()}links(){var t=this;return m(function*(){yield t.warning()})()}parameter(){var t=this;return m(function*(){yield t.warning()})()}logStep(){var t=this;return m(function*(){yield t.warning()})()}step(t,r){var s=this;return m(function*(){return yield s.warning(),r()})()}stepDisplayName(){var t=this;return m(function*(){yield t.warning()})()}stepParameter(){var t=this;return m(function*(){yield t.warning()})()}testCaseId(){var t=this;return m(function*(){yield t.warning()})()}warning(){return m(function*(){console.log("no test runtime is found. Please check test framework configuration")})()}},v=new U;var pe="allureTestRuntime",G=e=>{globalThis[pe]=()=>e},j=()=>globalThis?.[pe],B=()=>{var e=j();if(e){var t;return(t=e())!==null&&t!==void 0?t:v}return v},V=()=>{var e=j();if(e){var t;return(t=e())!==null&&t!==void 0?t:v}if("_playwrightInstance"in globalThis)try{return(0,eval)("(() => import('allure-playwright/autoconfig'))()").then(()=>{var r,s;return(r=(s=j())===null||s===void 0?void 0:s())!==null&&r!==void 0?r:v})}catch(r){return console.log("can't execute allure-playwright/autoconfig",r),v}return v};var d=function(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];var a=V();return E(a)?a.then(o=>o[t](...s)):a[t](...s)},y=(e,t)=>d("labels",{name:e,value:t}),ue=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return d("labels",...r)},w=(e,t,r)=>d("links",{url:e,type:r,name:t}),le=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return d("links",...r)},ce=(e,t,r)=>d("parameter",e,t,r),de=e=>d("description",e),me=e=>d("descriptionHtml",e),ye=e=>d("displayName",e),ge=e=>d("historyId",e),fe=e=>d("testCaseId",e),he=(e,t,r)=>{var s=typeof r=="string"?{contentType:r}:r;return d("attachment",e,t,s)},Se=(e,t,r)=>{var s=typeof r=="string"?{contentType:r}:r;return d("attachmentFromPath",e,t,s)},kt=()=>({displayName:e=>d("stepDisplayName",e),parameter:(e,t,r)=>d("stepParameter",e,t,r)}),Te=(e,t,r)=>d("logStep",e,t,r),ve=(e,t)=>d("step",e,()=>t(kt())),Ce=(e,t)=>w(e,t,x.ISSUE),xe=(e,t)=>w(e,t,x.TMS),Ee=e=>y(l.ALLURE_ID,e),_e=e=>y(l.EPIC,e),Ae=e=>y(l.FEATURE,e),Me=e=>y(l.STORY,e),be=e=>y(l.SUITE,e),Re=e=>y(l.PARENT_SUITE,e),Pe=e=>y(l.SUB_SUITE,e),ke=e=>y(l.OWNER,e),De=e=>y(l.SEVERITY,e),we=e=>y(l.LAYER,e),Ie=e=>y(l.TAG,e),Fe=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return d("labels",...r.map(n=>({name:l.TAG,value:n})))};var Oe={stepsFromCommands:{maxArgumentLength:128,maxArgumentDepth:3}},He=e=>Array.isArray(e)||e.buffer?btoa(String.fromCharCode.apply(null,e)):e,Ne=e=>{let t=[];for(let r=e.parent;r;r=r.parent)t.push(r);return t.reverse(),t};var K=e=>wt(e.attributes.args)?.log===!1||e.attributes.name==="task"&&e.attributes.args[0]==="reportAllureRuntimeMessages"||e.attributes.name==="then"||e.attributes.name==="wrap"&&e.attributes.args[0]===A;var wt=e=>e[e.length-1],Le=(e,t)=>{let r=t.title,{cleanTitle:s,labels:n}=H(r),a=t.titlePath().slice(0,-1),o=`${e.relative}#${[...a,s].join(" ")}`;return{name:s,labels:n,fullName:o}},z=e=>({...Le(Cypress.spec,e),start:e.wallClockStartedAt?.getTime()||Date.now()}),Ue=e=>({duration:e.duration??0,retries:e._retries??0}),W=()=>({statusDetails:{message:"This is a pending test"}}),je=(e,t)=>{let r=ze();if(r)for(let s of Be(t)){let n=Ft(r,e,s.tests);Ot(s.tests,n)}};var Ge=Symbol("The test was reported to Allure"),$=e=>{e[Ge]=!0},M=e=>e[Ge]===!0,Be=function*(e){let t=[];for(let r=e;r;r=t.pop()){yield r;for(let s=r.suites.length-1;s>=0;s--)t.push(r.suites[s])}},Ve=function*(e){for(let t of Be(e))yield*t.tests},C=e=>e.title.includes(_),Ke=e=>e.parent.root&&e.hookName==="after all",It=(e,t,r)=>e.tests.some(s=>r&&s.id?.toString()===r||s.selector===t),Ft=(e,t,r)=>{let s=[];return r.forEach((n,a)=>{let{fullName:o,labels:i}=Le(t,n),p=i.find(({name:g})=>g===l.ALLURE_ID)?.value;It(e,o,p)||s.push(a)}),s},Ot=(e,t)=>{for(let r=t.length-1;r>=0;r--)e.splice(t[r],1)};var h=()=>{let e=Cypress.env("allure");return e||(e={config:Oe,initialized:!1,messages:[],testPlan:void 0,currentTest:void 0},Cypress.env("allure",e)),e},We=()=>h().initialized,$e=()=>{h().initialized=!0},b=()=>h().messages,Ye=e=>{h().messages=e},c=e=>{b().push(e)},ze=()=>h().testPlan,qe=()=>h().currentTest,Ze=e=>{h().currentTest=e},Je=()=>{h().currentTest=void 0},Xe=()=>h().config;var Y=class{constructor(){this.#t()}labels(...t){return this.#e({type:"metadata",data:{labels:t}})}links(...t){return this.#e({type:"metadata",data:{links:t}})}parameter(t,r,s){return this.#e({type:"metadata",data:{parameters:[{name:t,value:r,...s}]}})}description(t){return this.#e({type:"metadata",data:{description:t}})}descriptionHtml(t){return this.#e({type:"metadata",data:{descriptionHtml:t}})}displayName(t){return this.#e({type:"metadata",data:{displayName:t}})}historyId(t){return this.#e({type:"metadata",data:{historyId:t}})}testCaseId(t){return this.#e({type:"metadata",data:{testCaseId:t}})}attachment(t,r,s){let n=r?.type==="Buffer"?r.data:r,a=typeof n=="string"?"utf8":"base64",o=He(n);return this.#e({type:"attachment_content",data:{name:t,content:o,encoding:a,contentType:s.contentType,fileExtension:s.fileExtension}})}attachmentFromPath(t,r,s){return this.#e({type:"attachment_path",data:{name:t,path:r,contentType:s.contentType,fileExtension:s.fileExtension}})}logStep(t,r=u.PASSED,s){return cy.wrap(A,{log:!1}).then(()=>(this.#e({type:"step_start",data:{name:t,start:Date.now()}}),Cypress.Promise.resolve())).then(()=>this.#e({type:"step_stop",data:{status:r,stop:Date.now(),statusDetails:s?{...f(s)}:void 0}}))}step(t,r){return cy.wrap(A,{log:!1}).then(()=>(this.#e({type:"step_start",data:{name:t,start:Date.now()}}),Cypress.Promise.resolve(r()))).then(s=>this.#e({type:"step_stop",data:{status:u.PASSED,stop:Date.now()}}).then(()=>s))}stepDisplayName(t){return this.#e({type:"step_metadata",data:{name:t}})}stepParameter(t,r,s){return this.#e({type:"step_metadata",data:{parameters:[{name:t,value:r,mode:s}]}})}flushAllureMessagesToTask=t=>{let r=this.#r();r.length&&cy.task(t,{absolutePath:Cypress.spec.absolute,messages:r},{log:!1})};flushAllureMessagesToTaskAsync=t=>{let r=this.#r();if(r.length){let s={absolutePath:Cypress.spec.absolute,messages:r,isInteractive:Cypress.config("isInteractive")};return cy.task(t,s,{log:!1})}};#t=()=>Ye([]);#e=t=>(c(t),Cypress.Promise.resolve());#r=()=>{let t=b();return this.#t(),t}},tt=()=>G(new Y),rt=()=>B(),st=()=>{c({type:"cypress_run_start",data:{}})},nt=e=>{c({type:"cypress_suite_start",data:{id:e.id,name:e.title,root:e.root,start:Date.now()}})},at=e=>{c({type:"cypress_suite_end",data:{root:e.root,stop:Date.now()}})},q=(e,t)=>{c({type:"cypress_hook_start",data:{name:e.title,scopeType:e.hookName.includes("each")?"each":"all",position:e.hookName.includes("before")?"before":"after",start:t??Date.now()}})},I=e=>{c({type:"cypress_hook_end",data:{duration:e.duration??0}})},Z=e=>{Ze(e),c({type:"cypress_test_start",data:z(e)}),$(e)},J=(e,t)=>{let r=b();N(r).forEach(()=>{c({type:"step_stop",data:{stop:Date.now(),status:e,statusDetails:t}})})},ot=()=>{J(u.PASSED),c({type:"cypress_test_pass",data:{}})},it=e=>{M(e)?ct(u.SKIPPED,{message:"The test was skipped before the command was completed"}):Z(e),c({type:"cypress_test_skip",data:W()})},pt=e=>{let{stepsFromCommands:{maxArgumentDepth:t,maxArgumentLength:r}}=Xe();c({type:"cypress_command_start",data:{name:`Command "${e.attributes.name}"`,args:e.attributes.args.map(s=>L(s,{maxDepth:t,maxLength:r})),start:Date.now()}})},ut=()=>{c({type:"cypress_command_end",data:{status:u.PASSED,stop:Date.now()}})},lt=(e,t)=>{c({type:"attachment_path",data:{path:e,name:t||"Screenshot",contentType:P.PNG}})},ct=(e,t)=>{let r=b(),s=r.toReversed().findIndex(({type:i})=>i==="cypress_command_start"),n=r.toReversed().findIndex(({type:i})=>i==="cypress_command_end"),a=s>n,o={status:e,stop:Date.now()};t&&(o.statusDetails=t),a&&c({type:"cypress_command_end",data:o})},X=e=>{let t=T(e),r=f(e);ct(t,r),c({type:"cypress_fail",data:{status:t,statusDetails:r}})},Q=e=>{c({type:"cypress_test_end",data:{duration:e.duration??0,retries:e._retries??0}}),Je()},ee=(e,t)=>{let r=e.hookName.includes("each"),s=e.parent,n=Ut(e.title,r,t,s);I(e),Ht(),Nt(s,n)},dt=()=>{let[e,t,r]=Vt();Bt(t,r),Kt(e)},te=()=>rt().flushAllureMessagesToTask("reportAllureCypressSpecMessages"),mt=()=>rt().flushAllureMessagesToTaskAsync("reportFinalAllureCypressSpecMessages"),R=e=>{if(Yt(e)){let t=e.test;return C(t)||I(t),mt()}},yt=(e,t)=>{try{return X(t),ee(e.test,t),mt()}catch(r){$t(e,r)}},Ht=()=>{let e=qe();e&&Q(e)},Nt=(e,t)=>{for(let r of Ve(e))M(r)||Lt(r,r.pending?{...W(),status:u.SKIPPED}:t)},Lt=(e,t)=>{c({type:"cypress_skipped_test",data:{...z(e),...t,...Ue(e),suites:Ne(e).map(r=>r.id)}}),$(e)},Ut=(e,t,r,s)=>{let n=t?u.SKIPPED:T(r),{message:a,trace:o}=f(r);return{status:n,statusDetails:{message:t?jt(e,s):a,trace:o}}},jt=(e,t)=>{let r=t.title?`'${t.title}'`:"root";return`'${e}' defined in the ${r} suite has failed`},Gt=(e,...t)=>{let[r,s,n]=t;return typeof n>"u"&&typeof s>"u"?e(r):typeof s=="function"?e(r,s):e(r,s,n)},Bt=(e,t)=>{let r=a=>(o,i,p)=>{e();try{return Gt(a,o,i,p)}finally{t()}},s=globalThis.describe,n=r(s);n.only=r(s.only),n.skip=r(s.skip),globalThis.describe=n},Vt=()=>{let e=0;return[()=>e,()=>{e++},()=>{e--}]},Kt=e=>{let t=globalThis.after,r=(s,n)=>typeof s=="string"?t(s,Qe(e,n)):t(Qe(e,s));globalThis.after=r},Qe=(e,t)=>{if(e()===0&&t){let r=t.length?zt(t):Wt(t);return Object.defineProperty(r,"name",{value:t.name}),r}return t},zt=e=>function(t){let r=s=>{if(s){yt(this,s)?.then(()=>t(s))||t(s);return}try{if(R(this)?.then(()=>t()))return}catch(n){t(n);return}t()};return e.bind(this)(r)},Wt=e=>function(){let t,r;try{t=e.bind(this)()}catch(s){r=s}if(r)et(this,r);else return E(t)?t.then(()=>R(this),s=>et(this,s)):(R(this),t)},et=(e,t)=>{if(!yt(e,t)?.then(()=>{throw t}))throw t},$t=(e,t)=>{try{console.error(`Unexpected error when reporting the failure of ${e.test?.title??"'after all'"}`),console.error(t)}catch{}},Yt=e=>{let t=e.test;return e.test.parent.hooks.findLast(a=>a.hookName==="after all")?.hookId===t.hookId};var{EVENT_RUN_BEGIN:qt,EVENT_SUITE_BEGIN:Zt,EVENT_SUITE_END:Jt,EVENT_HOOK_BEGIN:Xt,EVENT_HOOK_END:Qt,EVENT_TEST_BEGIN:er,EVENT_TEST_PASS:tr,EVENT_TEST_FAIL:rr,EVENT_TEST_PENDING:sr,EVENT_TEST_END:nr}=Mocha.Runner.constants,ar=()=>{We()||($e(),Cypress.mocha.getRunner().on(qt,()=>{tt(),st()}).on(Zt,e=>{e.root&&je(Cypress.spec,e),nt(e)}).on(Jt,e=>{at(e)}).on(Xt,e=>{C(e)||q(e)}).on(Qt,e=>{C(e)||I(e)}).on(er,e=>{M(e)||Z(e)}).on(tr,()=>{ot()}).on(rr,(e,t)=>{let r="hookName"in e;if(r&&Ke(e))return;r&&C(e)&&q(e,Date.now()-(e.duration??0)),X(t),r&&ee(e,t)}).on(sr,e=>{it(e)}).on(nr,e=>{Q(e)}),Cypress.Screenshot.defaults({onAfterScreenshot:(e,{path:t,name:r})=>{lt(t,r)}}),Cypress.on("fail",e=>{let t=T(e),r=f(e);throw J(t,r),e}),Cypress.on("command:start",e=>{K(e)||pt(e)}),Cypress.on("command:end",e=>{K(e)||ut()}),afterEach(_,te),after(_,function(){te(),R(this)}),dt())};ar();
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/utils.ts", "../../src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/NoopTestRuntime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/runtime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/facade.ts", "../../src/state.ts", "../../src/utils.ts", "../../src/runtime.ts"],
4
- "sourcesContent": ["import { getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type { CypressCommand, CypressHook, CypressTest } from \"./model.js\";\nimport { ALLURE_REPORT_SYSTEM_HOOK } from \"./model.js\";\nimport {\n enableScopeLevelAfterHookReporting,\n flushFinalRuntimeMessages,\n flushRuntimeMessages,\n initTestRuntime,\n reportCommandEnd,\n reportCommandStart,\n reportHookEnd,\n reportHookStart,\n reportRunStart,\n reportScreenshot,\n reportSuiteEnd,\n reportSuiteStart,\n reportTestEnd,\n reportTestOrHookFail,\n reportTestPass,\n reportTestSkip,\n reportTestStart,\n reportUnfinishedSteps,\n} from \"./runtime.js\";\nimport { isAllureInitialized, setAllureInitialized } from \"./state.js\";\nimport { applyTestPlan, isTestReported, shouldCommandBeSkipped } from \"./utils.js\";\n\nconst {\n EVENT_RUN_BEGIN,\n EVENT_SUITE_BEGIN,\n EVENT_SUITE_END,\n EVENT_HOOK_BEGIN,\n EVENT_HOOK_END,\n EVENT_TEST_BEGIN,\n EVENT_TEST_PASS,\n EVENT_TEST_FAIL,\n EVENT_TEST_PENDING,\n EVENT_TEST_END,\n EVENT_RUN_END,\n} = Mocha.Runner.constants;\n\nconst initializeAllure = () => {\n if (isAllureInitialized()) {\n return;\n }\n\n setAllureInitialized();\n\n // @ts-ignore\n Cypress.mocha\n .getRunner()\n .on(EVENT_RUN_BEGIN, () => {\n initTestRuntime();\n reportRunStart();\n })\n .on(EVENT_SUITE_BEGIN, (suite: Mocha.Suite) => {\n if (!suite.parent) {\n applyTestPlan(Cypress.spec, suite);\n }\n reportSuiteStart(suite);\n })\n .on(EVENT_SUITE_END, (suite: Mocha.Suite) => {\n reportSuiteEnd(suite);\n })\n .on(EVENT_HOOK_BEGIN, (hook: CypressHook) => {\n if (hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK)) {\n return;\n }\n\n reportHookStart(hook);\n })\n .on(EVENT_HOOK_END, (hook: CypressHook) => {\n if (hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK)) {\n return;\n }\n\n reportHookEnd(hook);\n })\n .on(EVENT_TEST_BEGIN, (test: CypressTest) => {\n // Cypress emits an extra EVENT_TEST_BEGIN if the test is skipped.\n // reportTestSkip does that already, so we need to filter the extra event out.\n if (!isTestReported(test)) {\n reportTestStart(test);\n }\n })\n .on(EVENT_TEST_PASS, () => {\n reportTestPass();\n })\n .on(EVENT_TEST_FAIL, (_: CypressTest, err: Error) => {\n reportTestOrHookFail(err);\n })\n .on(EVENT_TEST_PENDING, (test: CypressTest) => {\n reportTestSkip(test);\n })\n .on(EVENT_TEST_END, (test: CypressTest) => {\n reportTestEnd(test);\n })\n .on(EVENT_RUN_END, () => {\n // after:spec isn't called in interactive mode by default.\n // We're using the 'end' event instead to report the remaining messages\n // (the root 'suite end', mainly).\n if (Cypress.config(\"isInteractive\")) {\n flushFinalRuntimeMessages();\n }\n });\n\n Cypress.Screenshot.defaults({\n onAfterScreenshot: (_, { path, name }) => {\n reportScreenshot(path, name);\n },\n });\n\n Cypress.on(\"fail\", (err) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n reportUnfinishedSteps(status, statusDetails);\n\n throw err;\n });\n Cypress.on(\"command:start\", (command: CypressCommand) => {\n if (shouldCommandBeSkipped(command)) {\n return;\n }\n\n reportCommandStart(command);\n });\n Cypress.on(\"command:end\", (command: CypressCommand) => {\n if (shouldCommandBeSkipped(command)) {\n return;\n }\n\n reportCommandEnd();\n });\n\n afterEach(ALLURE_REPORT_SYSTEM_HOOK, () => {\n flushRuntimeMessages();\n });\n after(ALLURE_REPORT_SYSTEM_HOOK, () => {\n flushRuntimeMessages();\n });\n\n enableScopeLevelAfterHookReporting();\n};\n\ninitializeAllure();\n\nexport * from \"allure-js-commons\";\n", "export interface Attachment {\n name: string;\n type?: string;\n source: string;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n", "import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage } from \"./types.js\";\n\nexport const getStatusFromError = (error: Error): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case /assert/gi.test(error.name):\n case /assert/gi.test(error.message):\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const isMetadataTag = (tag: string) => {\n return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n", "import type { Label, Status, StatusDetails } from \"allure-js-commons\";\nimport type { RuntimeMessage, TestPlanV1 } from \"allure-js-commons/sdk\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const ALLURE_REPORT_STEP_COMMAND = \"__allure_report_step_command__\";\n\nexport type AllureCypressConfig = ReporterConfig & {\n videoOnFailOnly?: boolean;\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n hookName?: string;\n id: string;\n};\n\nexport type CypressHook = Mocha.Hook & {\n id: string;\n hookId: string;\n parent: Mocha.Suite & {\n id: string;\n };\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CupressRunStart = {\n type: \"cypress_run_start\";\n data: object;\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n name: string;\n root: boolean;\n start: number;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n root: boolean;\n stop: number;\n };\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n name: string;\n start: number;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n duration: number;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n name: string;\n fullName: string;\n start: number;\n labels: Label[];\n };\n};\n\nexport type CypressFailMessage = {\n type: \"cypress_fail\";\n data: {\n status: Status;\n statusDetails: StatusDetails;\n };\n};\n\nexport type CypressTestSkipMessage = {\n type: \"cypress_test_skip\";\n data: object;\n};\n\nexport type CypressTestPassMessage = {\n type: \"cypress_test_pass\";\n data: object;\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n duration: number;\n retries: number;\n };\n};\n\nexport type CypressCommandStartMessage = {\n type: \"cypress_command_start\";\n data: {\n name: string;\n args: string[];\n start: number;\n };\n};\n\nexport type CypressCommandEndMessage = {\n type: \"cypress_command_end\";\n data: {\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n };\n};\n\nexport type CypressMessage =\n | RuntimeMessage\n | CupressRunStart\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressTestStartMessage\n | CypressCommandStartMessage\n | CypressCommandEndMessage\n | CypressTestPassMessage\n | CypressFailMessage\n | CypressTestSkipMessage\n | CypressTestEndMessage;\n\nexport type SpecContext = {\n specPath: string;\n package: string;\n test: string | undefined;\n fixture: string | undefined;\n commandSteps: string[];\n videoScope: string;\n suiteScopes: string[];\n testScope: string | undefined;\n suiteNames: string[];\n failed: boolean;\n};\n\nexport type AllureSpecState = {\n initialized: boolean;\n testPlan: TestPlanV1 | null | undefined;\n messages: CypressMessage[];\n};\n\nexport type HookPosition = \"before\" | \"after\";\n\nexport type HookScopeType = \"all\" | \"each\";\n\nexport type HookType = [position: HookPosition, scopeType: HookScopeType];\n\nexport type AllureCypressTaskArgs = {\n absolutePath: string;\n messages: readonly CypressMessage[];\n};\n\nexport type CypressSuiteFunction = (\n title: string,\n configOrFn?: Cypress.SuiteConfigOverrides | ((this: Mocha.Suite) => void),\n fn?: (this: Mocha.Suite) => void,\n) => Mocha.Suite;\n", "import type { TestRuntime } from \"./types.js\";\n\nexport class NoopTestRuntime implements TestRuntime {\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(name: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(\"no test runtime is found. Please check test framework configuration\");\n }\n}\n\nexport const noopRuntime: TestRuntime = new NoopTestRuntime();\n", "import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n if (\"_playwrightInstance\" in globalThis) {\n try {\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n // @ts-ignore\n // eslint-disable-next-line no-eval\n return (0, eval)(\"(() => import('allure-playwright/autoconfig'))()\").then(() => {\n return getGlobalTestRuntimeFunction()?.() ?? noopRuntime;\n });\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log(\"can't execute allure-playwright/autoconfig\", err);\n return noopRuntime;\n }\n }\n\n return noopRuntime;\n};\n", "import type { Status } from \"./model.js\";\nimport { type ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return runtime[method](...args);\n }\n\n return runtime.then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): PromiseLike<void> => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<T> => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\"labels\", ...tagsList.map((value) => ({ name: LabelName.TAG, value })));\n};\n", "import type { AllureSpecState, CypressMessage } from \"./model.js\";\n\nexport const getAllureState = () => {\n let state = Cypress.env(\"allure\") as AllureSpecState;\n if (!state) {\n state = {\n initialized: false,\n messages: [],\n testPlan: undefined,\n };\n Cypress.env(\"allure\", state);\n }\n return state;\n};\n\nexport const isAllureInitialized = () => getAllureState().initialized;\n\nexport const setAllureInitialized = () => {\n getAllureState().initialized = true;\n};\n\nexport const getRuntimeMessages = () => getAllureState().messages;\n\nexport const setRuntimeMessages = (value: CypressMessage[]) => {\n getAllureState().messages = value;\n};\n\nexport const enqueueRuntimeMessage = (message: CypressMessage) => {\n getRuntimeMessages().push(message);\n};\n\nexport const getAllureTestPlan = () => getAllureState().testPlan;\n", "import { LabelName, Status } from \"allure-js-commons\";\nimport { extractMetadataFromString, getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\nimport { ALLURE_REPORT_STEP_COMMAND } from \"./model.js\";\nimport type { CypressCommand, HookPosition, HookScopeType, HookType } from \"./model.js\";\nimport { getAllureTestPlan } from \"./state.js\";\n\nexport const uint8ArrayToBase64 = (data: unknown) => {\n // @ts-ignore\n const u8arrayLike = Array.isArray(data) || data.buffer;\n\n if (!u8arrayLike) {\n return data as string;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return btoa(String.fromCharCode.apply(null, data as number[]));\n};\n\nexport const getSuitePath = (test: Mocha.Test): string[] => {\n const path: string[] = [];\n let currentSuite: Mocha.Suite | undefined = test.parent;\n\n while (currentSuite) {\n if (currentSuite.title) {\n path.unshift(currentSuite.title);\n }\n\n currentSuite = currentSuite.parent;\n }\n\n return path;\n};\n\nexport const shouldCommandBeSkipped = (command: CypressCommand) => {\n if (last(command.attributes.args)?.log === false) {\n return true;\n }\n\n if (command.attributes.name === \"task\" && command.attributes.args[0] === \"reportAllureRuntimeMessages\") {\n return true;\n }\n\n // we don't need to report then commands because it's just a promise handle\n if (command.attributes.name === \"then\") {\n return true;\n }\n\n // we should skip artificial wrap from allure steps\n if (command.attributes.name === \"wrap\" && command.attributes.args[0] === ALLURE_REPORT_STEP_COMMAND) {\n return true;\n }\n\n return false;\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const result: T[] = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n result.push(arr[i]);\n }\n\n return result;\n};\n\nexport const isGlobalHook = (hookName: string) => {\n return /(before|after) all/.test(hookName);\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nexport const getNamesAndLabels = (spec: Cypress.Spec, test: Mocha.Test) => {\n const rawName = test.title;\n const { cleanTitle: name, labels } = extractMetadataFromString(rawName);\n const suites = test.titlePath().slice(0, -1);\n const fullName = `${spec.relative}#${[...suites, name].join(\" \")}`;\n return { name, labels, fullName };\n};\n\nexport const applyTestPlan = (spec: Cypress.Spec, root: Mocha.Suite) => {\n const testPlan = getAllureTestPlan();\n if (testPlan) {\n const suiteQueue = [];\n for (let s: Mocha.Suite | undefined = root; s; s = suiteQueue.shift()) {\n const indicesToRemove = getIndicesOfDeselectedTests(testPlan, spec, s.tests);\n removeSortedIndices(s.tests, indicesToRemove);\n suiteQueue.push(...s.suites);\n }\n }\n};\n\nexport const resolveStatusWithDetails = (error: Error | undefined) =>\n error\n ? {\n status: getStatusFromError(error),\n statusDetails: getMessageAndTraceFromError(error),\n }\n : { status: Status.PASSED };\n\nconst testReportedKey = Symbol(\"The test was reported to Allure\");\n\nexport const markTestAsReported = (test: Mocha.Test) => {\n (test as any)[testReportedKey] = true;\n};\n\nexport const isTestReported = (test: Mocha.Test) => (test as any)[testReportedKey] === true;\n\nconst hookTypeRegexp = /^\"(before|after) (all|each)\"/;\n\nexport const getHookType = (name: string): HookType | [] => {\n const match = hookTypeRegexp.exec(name);\n if (match) {\n return [match[1] as HookPosition, match[2] as HookScopeType];\n }\n return [];\n};\n\nconst includedInTestPlan = (testPlan: TestPlanV1, fullName: string, allureId: string | undefined): boolean =>\n testPlan.tests.some((test) => (allureId && test.id?.toString() === allureId) || test.selector === fullName);\n\nconst getIndicesOfDeselectedTests = (testPlan: TestPlanV1, spec: Cypress.Spec, tests: readonly Mocha.Test[]) => {\n const indicesToRemove: number[] = [];\n tests.forEach((test, index) => {\n const { fullName, labels } = getNamesAndLabels(spec, test);\n const allureId = labels.find(({ name }) => name === LabelName.ALLURE_ID)?.value;\n\n if (!includedInTestPlan(testPlan, fullName, allureId)) {\n indicesToRemove.push(index);\n }\n });\n return indicesToRemove;\n};\n\nconst removeSortedIndices = <T>(arr: T[], indices: readonly number[]) => {\n for (let i = indices.length - 1; i >= 0; i--) {\n arr.splice(indices[i], 1);\n }\n};\n", "import { ContentType, Status } from \"allure-js-commons\";\nimport type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError, getUnfinishedStepsMessages } from \"allure-js-commons/sdk\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type {\n CypressCommand,\n CypressCommandEndMessage,\n CypressMessage,\n CypressSuiteFunction,\n CypressTest,\n} from \"./model.js\";\nimport { ALLURE_REPORT_STEP_COMMAND, ALLURE_REPORT_SYSTEM_HOOK } from \"./model.js\";\nimport { enqueueRuntimeMessage, getRuntimeMessages, setRuntimeMessages } from \"./state.js\";\nimport { getNamesAndLabels, isTestReported, markTestAsReported, uint8ArrayToBase64 } from \"./utils.js\";\n\nexport class AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n // @ts-ignore\n attachment(name: string, content: string, options: AttachmentOptions) {\n // @ts-ignore\n const attachmentRawContent: string | Uint8Array = content?.type === \"Buffer\" ? content.data : content;\n const actualEncoding = typeof attachmentRawContent === \"string\" ? \"utf8\" : \"base64\";\n const attachmentContent = uint8ArrayToBase64(attachmentRawContent);\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.#enqueueMessageAsync({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve();\n })\n .then(() => {\n return this.#enqueueMessageAsync({\n type: \"step_stop\",\n data: {\n status: status,\n stop: Date.now(),\n statusDetails: error ? { ...getMessageAndTraceFromError(error) } : undefined,\n },\n });\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.#enqueueMessageAsync({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n return this.#enqueueMessageAsync({\n type: \"step_stop\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n }).then(() => result);\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushMessages = (): PromiseLike<void> => this.#moveMessagesToAllureCypressTask(\"reportAllureCypressSpecMessages\");\n\n flushFinalMessages = (): PromiseLike<void> =>\n this.#moveMessagesToAllureCypressTask(\"reportFinalAllureCypressSpecMessages\");\n\n #moveMessagesToAllureCypressTask = (taskName: string) => {\n const messages = this.#dequeueAllMessages();\n return messages.length\n ? cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false })\n : Cypress.Promise.resolve();\n };\n\n #resetMessages = () => setRuntimeMessages([]);\n\n #enqueueMessageAsync = (message: CypressMessage): PromiseLike<void> => {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n };\n\n #dequeueAllMessages = () => {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n };\n}\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\nexport const flushRuntimeMessages = () => getTestRuntime().flushMessages();\n\nexport const flushFinalRuntimeMessages = () => getTestRuntime().flushFinalMessages();\n\nexport const reportRunStart = () => {\n enqueueRuntimeMessage({\n type: \"cypress_run_start\",\n data: {},\n });\n};\n\nexport const reportSuiteStart = (suite: Mocha.Suite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_start\",\n data: {\n name: suite.title,\n root: !suite.parent,\n start: Date.now(),\n },\n });\n};\n\nexport const reportSuiteEnd = (suite: Mocha.Suite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_end\",\n data: {\n root: !suite.parent,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportHookStart = (hook: Mocha.Hook) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_start\",\n data: {\n name: hook.title,\n start: Date.now(),\n },\n });\n};\n\nexport const reportHookEnd = (hook: Mocha.Hook) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_end\",\n data: {\n duration: hook.duration ?? 0,\n },\n });\n};\n\nexport const reportTestStart = (test: CypressTest, flag?: string) => {\n const x = getNamesAndLabels(Cypress.spec, test);\n if (flag) {\n x.labels.push({ name: \"reported\", value: flag });\n }\n enqueueRuntimeMessage({\n type: \"cypress_test_start\",\n data: {\n ...x,\n start: test.wallClockStartedAt?.getTime() || Date.now(),\n },\n });\n markTestAsReported(test);\n};\n\nexport const reportUnfinishedSteps = (status: Status, statusDetails?: StatusDetails) => {\n const runtimeMessages = getRuntimeMessages() as RuntimeMessage[];\n const unfinishedStepsMessages = getUnfinishedStepsMessages(runtimeMessages);\n unfinishedStepsMessages.forEach(() => {\n enqueueRuntimeMessage({\n type: \"step_stop\",\n data: {\n stop: Date.now(),\n status,\n statusDetails,\n },\n });\n });\n};\n\nexport const reportTestPass = () => {\n reportUnfinishedSteps(Status.PASSED);\n enqueueRuntimeMessage({\n type: \"cypress_test_pass\",\n data: {},\n });\n};\n\nexport const reportTestSkip = (test: CypressTest) => {\n if (isTestReported(test)) {\n reportUnfinishedCommand(Status.SKIPPED, {\n message: \"The test was skipped before the command was completed\",\n });\n } else {\n reportTestStart(test);\n }\n\n enqueueRuntimeMessage({\n type: \"cypress_test_skip\",\n data: {},\n });\n};\n\nexport const reportCommandStart = (command: CypressCommand) => {\n enqueueRuntimeMessage({\n type: \"cypress_command_start\",\n data: {\n name: `Command \"${command.attributes.name}\"`,\n args: command.attributes.args.map((arg) => (typeof arg === \"string\" ? arg : JSON.stringify(arg, null, 2))),\n start: Date.now(),\n },\n });\n};\n\nexport const reportCommandEnd = () => {\n enqueueRuntimeMessage({\n type: \"cypress_command_end\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportScreenshot = (path: string, name: string) => {\n enqueueRuntimeMessage({\n type: \"attachment_path\",\n data: {\n path: path,\n name: name || \"Screenshot\",\n contentType: ContentType.PNG,\n },\n });\n};\n\nexport const reportUnfinishedCommand = (status: Status, statusDetails?: StatusDetails) => {\n const runtimeMessages = getRuntimeMessages();\n const startCommandMessageIdx = runtimeMessages.toReversed().findIndex(({ type }) => type === \"cypress_command_start\");\n const stopCommandMessageIdx = runtimeMessages.toReversed().findIndex(({ type }) => type === \"cypress_command_end\");\n const hasUnfinishedCommand = startCommandMessageIdx > stopCommandMessageIdx;\n\n const data: CypressCommandEndMessage[\"data\"] = { status, stop: Date.now() };\n if (statusDetails) {\n data.statusDetails = statusDetails;\n }\n\n if (hasUnfinishedCommand) {\n enqueueRuntimeMessage({ type: \"cypress_command_end\", data });\n }\n};\n\nexport const reportTestOrHookFail = (err: Error) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n reportUnfinishedCommand(status, statusDetails);\n\n enqueueRuntimeMessage({\n type: \"cypress_fail\",\n data: {\n status,\n statusDetails,\n },\n });\n};\n\nexport const reportTestEnd = (test: CypressTest) => {\n enqueueRuntimeMessage({\n type: \"cypress_test_end\",\n data: {\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n },\n });\n};\n\nconst forwardDescribeCall = (target: CypressSuiteFunction, ...args: Parameters<CypressSuiteFunction>) => {\n const [title, configOrFn, fn] = args;\n if (typeof fn === \"undefined\" && typeof configOrFn === \"undefined\") {\n return target(title);\n } else if (typeof configOrFn === \"function\") {\n return target(title, configOrFn);\n } else {\n return target(title, configOrFn, fn);\n }\n};\n\nconst patchDescribe = (incSuiteDepth: () => void, decSuiteDepth: () => void) => {\n const patchDescribeFn =\n (target: CypressSuiteFunction): CypressSuiteFunction =>\n (title, configOrFn, fn) => {\n incSuiteDepth();\n try {\n return forwardDescribeCall(target, title, configOrFn, fn);\n } finally {\n decSuiteDepth();\n }\n };\n const originalDescribeFn: Mocha.SuiteFunction = globalThis.describe;\n const patchedDescribe = patchDescribeFn(originalDescribeFn) as Mocha.SuiteFunction;\n patchedDescribe.only = patchDescribeFn(\n originalDescribeFn.only as CypressSuiteFunction,\n ) as Mocha.ExclusiveSuiteFunction;\n patchedDescribe.skip = patchDescribeFn(originalDescribeFn.skip as CypressSuiteFunction) as Mocha.PendingSuiteFunction;\n globalThis.describe = patchedDescribe;\n};\n\nconst createSuiteDepthCounterState = (): [get: () => number, inc: () => void, dec: () => void] => {\n let suiteDepth = 0;\n return [\n () => suiteDepth,\n () => {\n suiteDepth++;\n },\n () => {\n suiteDepth--;\n },\n ];\n};\n\nconst patchAfter = (getSuiteDepth: () => number) => {\n const originalAfter = globalThis.after;\n const patchedAfter = (nameOrFn: string | Mocha.Func | Mocha.AsyncFunc, fn?: Mocha.Func | Mocha.AsyncFunc): void => {\n try {\n return typeof nameOrFn === \"string\" ? originalAfter(nameOrFn, fn) : originalAfter(nameOrFn);\n } finally {\n if (getSuiteDepth() === 0) {\n originalAfter(ALLURE_REPORT_SYSTEM_HOOK, () => {\n flushRuntimeMessages();\n });\n }\n }\n };\n globalThis.after = patchedAfter;\n};\n\n/**\n * Patches the `after` function, to inject an extra `after` hook after each spec-level\n * `after` hook defined by the user.\n */\nexport const enableScopeLevelAfterHookReporting = () => {\n const [getSuiteDepth, incSuiteDepth, decSuiteDepth] = createSuiteDepthCounterState();\n patchDescribe(incSuiteDepth, decSuiteDepth);\n patchAfter(getSuiteDepth);\n};\n"],
5
- "mappings": "mbAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,iBAAAE,EAAA,cAAAC,EAAA,aAAAC,EAAA,aAAAC,EAAA,UAAAC,EAAA,WAAAC,EAAA,qBAAAC,EAAA,aAAAC,GAAA,eAAAC,GAAA,mBAAAC,GAAA,gBAAAC,GAAA,oBAAAC,GAAA,gBAAAC,GAAA,SAAAC,GAAA,YAAAC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AAsB,CAGtCC,EAAeD,CAAI,GACtBE,EAAgBF,CAAI,CAExB,CAAC,EACA,GAAGlB,GAAiB,IAAM,CACzBqB,GAAe,CACjB,CAAC,EACA,GAAGpB,GAAiB,CAACqB,EAAgBC,IAAe,CACnDC,GAAqBD,CAAG,CAC1B,CAAC,EACA,GAAGrB,GAAqBgB,GAAsB,CAC7CO,GAAeP,CAAI,CACrB,CAAC,EACA,GAAGf,GAAiBe,GAAsB,CACzCQ,GAAcR,CAAI,CACpB,CAAC,EACA,GAAGd,GAAe,IAAM,CAInB,QAAQ,OAAO,eAAe,GAChCuB,GAA0B,CAE9B,CAAC,EAEH,QAAQ,WAAW,SAAS,CAC1B,kBAAmB,CAACL,EAAG,CAAE,KAAAM,EAAM,KAAAC,CAAK,IAAM,CACxCC,GAAiBF,EAAMC,CAAI,CAC7B,CACF,CAAC,EAED,QAAQ,GAAG,OAASN,GAAQ,CAC1B,IAAMQ,EAASC,EAAmBT,CAAG,EAC/BU,EAAgBC,EAA4BX,CAAG,EAErD,MAAAY,EAAsBJ,EAAQE,CAAa,EAErCV,CACR,CAAC,EACD,QAAQ,GAAG,gBAAkBa,GAA4B,CACnDC,EAAuBD,CAAO,GAIlCE,GAAmBF,CAAO,CAC5B,CAAC,EACD,QAAQ,GAAG,cAAgBA,GAA4B,CACjDC,EAAuBD,CAAO,GAIlCG,GAAiB,CACnB,CAAC,EAED,UAAUxB,EAA2B,IAAM,CACzCyB,EAAqB,CACvB,CAAC,EACD,MAAMzB,EAA2B,IAAM,CACrCyB,EAAqB,CACvB,CAAC,EAEDC,GAAmC,EACrC,EAEApC,GAAiB",
6
- "names": ["src_exports", "__export", "ContentType", "LabelName", "LinkType", "Severity", "Stage", "Status", "StatusByPriority", "allureId", "attachment", "attachmentPath", "description", "descriptionHtml", "displayName", "epic", "feature", "historyId", "issue", "label", "labels", "layer", "link", "links", "logStep", "owner", "parameter", "parentSuite", "severity", "step", "story", "subSuite", "suite", "tag", "tags", "testCaseId", "tms", "__toCommonJS", "Status", "StatusByPriority", "FAILED", "BROKEN", "PASSED", "SKIPPED", "Stage", "LabelName", "Severity", "ContentType", "LinkType", "getStatusFromError", "error", "test", "constructor", "name", "message", "Status", "FAILED", "BROKEN", "ansiRegex", "onlyFirst", "arguments", "length", "undefined", "pattern", "join", "RegExp", "stripAnsi", "str", "regex", "replace", "getMessageAndTraceFromError", "stack", "trace", "allureIdRegexp", "_wrapRegExp", "id", "allureIdRegexpGlobal", "allureLabelRegexp", "value", "allureLabelRegexpGlobal", "extractMetadataFromString", "title", "labels", "split", "forEach", "val", "_val$match", "idValue", "match", "allureIdRegexp", "groups", "id", "push", "name", "LabelName", "ALLURE_ID", "value", "labelMatch", "allureLabelRegexp", "cleanTitle", "replace", "allureLabelRegexpGlobal", "allureIdRegexpGlobal", "trim", "getStepsMessagesPair", "messages", "reduce", "acc", "message", "type", "push", "unfinishedStepIdx", "findLastIndex", "step", "length", "getUnfinishedStepsMessages", "grouppedStepsMessage", "filter", "isPromise", "obj", "then", "ALLURE_REPORT_SYSTEM_HOOK", "ALLURE_REPORT_STEP_COMMAND", "NoopTestRuntime", "attachment", "_this", "_asyncToGenerator", "warning", "attachmentFromPath", "_this2", "description", "_this3", "descriptionHtml", "_this4", "displayName", "_this5", "historyId", "_this6", "labels", "_this7", "links", "_this8", "parameter", "_this9", "logStep", "_this10", "step", "name", "body", "_this11", "stepDisplayName", "_this12", "stepParameter", "_this13", "testCaseId", "_this14", "console", "log", "noopRuntime", "ALLURE_TEST_RUNTIME_KEY", "setGlobalTestRuntime", "runtime", "globalThis", "getGlobalTestRuntimeFunction", "getGlobalTestRuntime", "testRuntime", "_testRuntime", "noopRuntime", "getGlobalTestRuntimeWithAutoconfig", "_testRuntime2", "eval", "then", "_getGlobalTestRuntime", "_getGlobalTestRuntime2", "err", "console", "log", "callRuntimeMethod", "method", "_len", "arguments", "length", "args", "Array", "_key", "runtime", "getGlobalTestRuntimeWithAutoconfig", "isPromise", "then", "testRuntime", "label", "name", "value", "labels", "_len2", "labelsList", "_key2", "link", "url", "type", "links", "_len3", "linksList", "_key3", "parameter", "options", "description", "markdown", "descriptionHtml", "html", "displayName", "historyId", "testCaseId", "attachment", "content", "opts", "contentType", "attachmentPath", "path", "stepContext", "mode", "logStep", "status", "error", "step", "body", "issue", "LinkType", "ISSUE", "tms", "TMS", "allureId", "LabelName", "ALLURE_ID", "epic", "EPIC", "feature", "FEATURE", "story", "STORY", "suite", "SUITE", "parentSuite", "PARENT_SUITE", "subSuite", "SUB_SUITE", "owner", "OWNER", "severity", "SEVERITY", "layer", "LAYER", "tag", "TAG", "tags", "_len4", "tagsList", "_key4", "map", "getAllureState", "state", "isAllureInitialized", "setAllureInitialized", "getRuntimeMessages", "setRuntimeMessages", "value", "enqueueRuntimeMessage", "message", "getAllureTestPlan", "uint8ArrayToBase64", "data", "shouldCommandBeSkipped", "command", "last", "ALLURE_REPORT_STEP_COMMAND", "last", "arr", "getNamesAndLabels", "spec", "test", "rawName", "name", "labels", "extractMetadataFromString", "suites", "fullName", "applyTestPlan", "root", "testPlan", "getAllureTestPlan", "suiteQueue", "s", "indicesToRemove", "getIndicesOfDeselectedTests", "removeSortedIndices", "testReportedKey", "markTestAsReported", "test", "isTestReported", "includedInTestPlan", "testPlan", "fullName", "allureId", "test", "getIndicesOfDeselectedTests", "spec", "tests", "indicesToRemove", "index", "labels", "getNamesAndLabels", "name", "LabelName", "removeSortedIndices", "arr", "indices", "i", "AllureCypressTestRuntime", "#resetMessages", "labels", "#enqueueMessageAsync", "links", "name", "value", "options", "markdown", "html", "content", "attachmentRawContent", "actualEncoding", "attachmentContent", "uint8ArrayToBase64", "path", "status", "Status", "error", "ALLURE_REPORT_STEP_COMMAND", "getMessageAndTraceFromError", "body", "result", "mode", "#moveMessagesToAllureCypressTask", "taskName", "messages", "#dequeueAllMessages", "setRuntimeMessages", "message", "enqueueRuntimeMessage", "getRuntimeMessages", "initTestRuntime", "setGlobalTestRuntime", "getTestRuntime", "getGlobalTestRuntime", "flushRuntimeMessages", "flushFinalRuntimeMessages", "reportRunStart", "reportSuiteStart", "suite", "reportSuiteEnd", "reportHookStart", "hook", "reportHookEnd", "reportTestStart", "test", "flag", "x", "getNamesAndLabels", "markTestAsReported", "reportUnfinishedSteps", "statusDetails", "runtimeMessages", "getUnfinishedStepsMessages", "reportTestPass", "reportTestSkip", "isTestReported", "reportUnfinishedCommand", "reportCommandStart", "command", "arg", "reportCommandEnd", "reportScreenshot", "ContentType", "startCommandMessageIdx", "type", "stopCommandMessageIdx", "hasUnfinishedCommand", "data", "reportTestOrHookFail", "err", "getStatusFromError", "reportTestEnd", "forwardDescribeCall", "target", "args", "title", "configOrFn", "fn", "patchDescribe", "incSuiteDepth", "decSuiteDepth", "patchDescribeFn", "originalDescribeFn", "patchedDescribe", "createSuiteDepthCounterState", "suiteDepth", "patchAfter", "getSuiteDepth", "originalAfter", "patchedAfter", "nameOrFn", "ALLURE_REPORT_SYSTEM_HOOK", "enableScopeLevelAfterHookReporting", "EVENT_RUN_BEGIN", "EVENT_SUITE_BEGIN", "EVENT_SUITE_END", "EVENT_HOOK_BEGIN", "EVENT_HOOK_END", "EVENT_TEST_BEGIN", "EVENT_TEST_PASS", "EVENT_TEST_FAIL", "EVENT_TEST_PENDING", "EVENT_TEST_END", "EVENT_RUN_END", "initializeAllure", "isAllureInitialized", "setAllureInitialized", "initTestRuntime", "reportRunStart", "suite", "applyTestPlan", "reportSuiteStart", "reportSuiteEnd", "hook", "ALLURE_REPORT_SYSTEM_HOOK", "reportHookStart", "reportHookEnd", "test", "isTestReported", "reportTestStart", "reportTestPass", "_", "err", "reportTestOrHookFail", "reportTestSkip", "reportTestEnd", "flushFinalRuntimeMessages", "path", "name", "reportScreenshot", "status", "getStatusFromError", "statusDetails", "getMessageAndTraceFromError", "reportUnfinishedSteps", "command", "shouldCommandBeSkipped", "reportCommandStart", "reportCommandEnd", "flushRuntimeMessages", "enableScopeLevelAfterHookReporting"]
3
+ "sources": ["../../src/index.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/utils.ts", "../../src/model.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/NoopTestRuntime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/sdk/runtime/runtime.ts", "../../../../.yarn/__virtual__/allure-js-commons-virtual-2327c51af9/1/packages/allure-js-commons/src/facade.ts", "../../src/utils.ts", "../../src/state.ts", "../../src/runtime.ts"],
4
+ "sourcesContent": ["import { getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport { ALLURE_REPORT_SYSTEM_HOOK } from \"./model.js\";\nimport type { CypressCommand, CypressHook, CypressSuite, CypressTest } from \"./model.js\";\nimport {\n completeHookErrorReporting,\n completeSpecIfNoAfterHookLeft,\n enableScopeLevelAfterHookReporting,\n flushRuntimeMessages,\n initTestRuntime,\n reportCommandEnd,\n reportCommandStart,\n reportHookEnd,\n reportHookStart,\n reportRunStart,\n reportScreenshot,\n reportSuiteEnd,\n reportSuiteStart,\n reportTestEnd,\n reportTestOrHookFail,\n reportTestPass,\n reportTestSkip,\n reportTestStart,\n reportUnfinishedSteps,\n} from \"./runtime.js\";\nimport { isAllureInitialized, setAllureInitialized } from \"./state.js\";\nimport { applyTestPlan, isAllureHook, isRootAfterAllHook, isTestReported, shouldCommandBeSkipped } from \"./utils.js\";\n\nconst {\n EVENT_RUN_BEGIN,\n EVENT_SUITE_BEGIN,\n EVENT_SUITE_END,\n EVENT_HOOK_BEGIN,\n EVENT_HOOK_END,\n EVENT_TEST_BEGIN,\n EVENT_TEST_PASS,\n EVENT_TEST_FAIL,\n EVENT_TEST_PENDING,\n EVENT_TEST_END,\n} = Mocha.Runner.constants;\n\nconst initializeAllure = () => {\n if (isAllureInitialized()) {\n return;\n }\n\n setAllureInitialized();\n\n // @ts-ignore\n Cypress.mocha\n .getRunner()\n .on(EVENT_RUN_BEGIN, () => {\n initTestRuntime();\n reportRunStart();\n })\n .on(EVENT_SUITE_BEGIN, (suite: CypressSuite) => {\n if (suite.root) {\n applyTestPlan(Cypress.spec, suite);\n }\n reportSuiteStart(suite);\n })\n .on(EVENT_SUITE_END, (suite: CypressSuite) => {\n reportSuiteEnd(suite);\n })\n .on(EVENT_HOOK_BEGIN, (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookStart(hook);\n })\n .on(EVENT_HOOK_END, (hook: CypressHook) => {\n if (isAllureHook(hook)) {\n return;\n }\n\n reportHookEnd(hook);\n })\n .on(EVENT_TEST_BEGIN, (test: CypressTest) => {\n // Cypress emits an extra EVENT_TEST_BEGIN if the test is skipped.\n // reportTestSkip does that already, so we need to filter the extra event out.\n if (!isTestReported(test)) {\n reportTestStart(test);\n }\n })\n .on(EVENT_TEST_PASS, () => {\n reportTestPass();\n })\n .on(EVENT_TEST_FAIL, (testOrHook: CypressTest | CypressHook, err: Error) => {\n const isHook = \"hookName\" in testOrHook;\n if (isHook && isRootAfterAllHook(testOrHook)) {\n // Errors in spec-level 'after all' hooks are handled by Allure wrappers.\n return;\n }\n\n const isAllureHookFailure = isHook && isAllureHook(testOrHook);\n\n if (isAllureHookFailure) {\n // Normally, Allure hooks are skipped from the report.\n // In case of errors, it will be helpful to see them.\n reportHookStart(testOrHook, Date.now() - (testOrHook.duration ?? 0));\n }\n\n // This will mark the fixture and the test (if any) as failed/broken.\n reportTestOrHookFail(err);\n\n if (isHook) {\n // This will end the fixture and test (if any) and will report the remaining\n // tests in the hook's suite (the ones that will be skipped by Cypress/Mocha).\n completeHookErrorReporting(testOrHook, err);\n }\n })\n .on(EVENT_TEST_PENDING, (test: CypressTest) => {\n reportTestSkip(test);\n })\n .on(EVENT_TEST_END, (test: CypressTest) => {\n reportTestEnd(test);\n });\n\n Cypress.Screenshot.defaults({\n onAfterScreenshot: (_, { path, name }) => {\n reportScreenshot(path, name);\n },\n });\n\n Cypress.on(\"fail\", (err) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n reportUnfinishedSteps(status, statusDetails);\n\n throw err;\n });\n Cypress.on(\"command:start\", (command: CypressCommand) => {\n if (shouldCommandBeSkipped(command)) {\n return;\n }\n\n reportCommandStart(command);\n });\n Cypress.on(\"command:end\", (command: CypressCommand) => {\n if (shouldCommandBeSkipped(command)) {\n return;\n }\n\n reportCommandEnd();\n });\n\n afterEach(ALLURE_REPORT_SYSTEM_HOOK, flushRuntimeMessages);\n\n after(ALLURE_REPORT_SYSTEM_HOOK, function (this: Mocha.Context) {\n flushRuntimeMessages();\n completeSpecIfNoAfterHookLeft(this);\n });\n\n enableScopeLevelAfterHookReporting();\n};\n\ninitializeAllure();\n\nexport * from \"allure-js-commons\";\n", "export interface Attachment {\n name: string;\n type?: string;\n source: string;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n", "import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions } from \"./types.js\";\n\nexport const getStatusFromError = (error: Error): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case /assert/gi.test(error.name):\n case /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const isMetadataTag = (tag: string) => {\n return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0 }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number) => {\n const parents: any[] = [];\n return function (this: any, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n};\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n", "import type { Label, Status, StatusDetails } from \"allure-js-commons\";\nimport type { RuntimeMessage, TestPlanV1 } from \"allure-js-commons/sdk\";\nimport type { ReporterConfig } from \"allure-js-commons/sdk/reporter\";\n\nexport const ALLURE_REPORT_SYSTEM_HOOK = \"__allure_report_system_hook__\";\n\nexport const ALLURE_REPORT_STEP_COMMAND = \"__allure_report_step_command__\";\n\nexport type AllureCypressConfig = ReporterConfig & {\n videoOnFailOnly?: boolean;\n stepsFromCommands?: Partial<AllureSpecState[\"config\"][\"stepsFromCommands\"]>;\n};\n\nexport type CypressSuite = Mocha.Suite & {\n id: string;\n parent: CypressSuite | undefined;\n tests: CypressTest[];\n suites: CypressSuite[];\n};\n\nexport type CypressTest = Mocha.Test & {\n wallClockStartedAt?: Date;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressHook = Mocha.Hook & {\n hookId: string;\n hookName: string;\n parent: CypressSuite | undefined;\n};\n\nexport type CypressCommand = {\n attributes: {\n name: string;\n id: string;\n args: any[];\n };\n state: \"passed\" | \"failed\" | \"queued\";\n};\n\nexport type CupressRunStart = {\n type: \"cypress_run_start\";\n data: object;\n};\n\nexport type CypressSuiteStartMessage = {\n type: \"cypress_suite_start\";\n data: {\n id: string;\n name: string;\n root: boolean;\n start: number;\n };\n};\n\nexport type CypressSuiteEndMessage = {\n type: \"cypress_suite_end\";\n data: {\n root: boolean;\n stop: number;\n };\n};\n\nexport type CypressHookStartMessage = {\n type: \"cypress_hook_start\";\n data: {\n name: string;\n scopeType: \"each\" | \"all\";\n position: \"before\" | \"after\";\n start: number;\n };\n};\n\nexport type CypressHookEndMessage = {\n type: \"cypress_hook_end\";\n data: {\n duration: number;\n };\n};\n\nexport type CypressTestStartMessage = {\n type: \"cypress_test_start\";\n data: {\n name: string;\n fullName: string;\n start: number;\n labels: Label[];\n };\n};\n\nexport type CypressFailMessage = {\n type: \"cypress_fail\";\n data: {\n status: Status;\n statusDetails: StatusDetails;\n };\n};\n\nexport type CypressTestSkipMessage = {\n type: \"cypress_test_skip\";\n data: {\n statusDetails?: StatusDetails;\n };\n};\n\nexport type CypressTestPassMessage = {\n type: \"cypress_test_pass\";\n data: object;\n};\n\nexport type CypressSkippedTestMessage = {\n type: \"cypress_skipped_test\";\n data: CypressTestStartMessage[\"data\"] &\n CypressFailMessage[\"data\"] &\n CypressTestEndMessage[\"data\"] & {\n suites: string[];\n };\n};\n\nexport type CypressTestEndMessage = {\n type: \"cypress_test_end\";\n data: {\n duration: number;\n retries: number;\n };\n};\n\nexport type CypressCommandStartMessage = {\n type: \"cypress_command_start\";\n data: {\n name: string;\n args: string[];\n start: number;\n };\n};\n\nexport type CypressCommandEndMessage = {\n type: \"cypress_command_end\";\n data: {\n status: Status;\n statusDetails?: StatusDetails;\n stop: number;\n };\n};\n\nexport type CypressMessage =\n | RuntimeMessage\n | CupressRunStart\n | CypressSuiteStartMessage\n | CypressSuiteEndMessage\n | CypressHookStartMessage\n | CypressHookEndMessage\n | CypressTestStartMessage\n | CypressCommandStartMessage\n | CypressCommandEndMessage\n | CypressTestPassMessage\n | CypressFailMessage\n | CypressTestSkipMessage\n | CypressSkippedTestMessage\n | CypressTestEndMessage;\n\nexport type SpecContext = {\n specPath: string;\n package: string;\n test: string | undefined;\n fixture: string | undefined;\n commandSteps: string[];\n videoScope: string;\n suiteIdToScope: Map<string, string>;\n suiteScopeToId: Map<string, string>;\n suiteScopes: string[];\n testScope: string | undefined;\n suiteNames: string[];\n failed: boolean;\n};\n\nexport type AllureSpecState = {\n config: {\n stepsFromCommands: {\n maxArgumentLength: number;\n maxArgumentDepth: number;\n };\n };\n initialized: boolean;\n testPlan: TestPlanV1 | null | undefined;\n messages: CypressMessage[];\n currentTest?: CypressTest;\n};\n\nexport type AllureCypressTaskArgs = {\n absolutePath: string;\n messages: readonly CypressMessage[];\n isInteractive: boolean;\n};\n\nexport type CypressSuiteFunction = (\n title: string,\n configOrFn?: Cypress.SuiteConfigOverrides | ((this: Mocha.Suite) => void),\n fn?: (this: Mocha.Suite) => void,\n) => Mocha.Suite;\n\nexport type DirectHookImplementation = Mocha.AsyncFunc | ((this: Mocha.Context) => void);\nexport type HookImplementation = Mocha.Func | DirectHookImplementation;\n", "import type { TestRuntime } from \"./types.js\";\n\nexport class NoopTestRuntime implements TestRuntime {\n async attachment() {\n await this.warning();\n }\n\n async attachmentFromPath() {\n await this.warning();\n }\n\n async description() {\n await this.warning();\n }\n\n async descriptionHtml() {\n await this.warning();\n }\n\n async displayName() {\n await this.warning();\n }\n\n async historyId() {\n await this.warning();\n }\n\n async labels() {\n await this.warning();\n }\n\n async links() {\n await this.warning();\n }\n\n async parameter() {\n await this.warning();\n }\n\n async logStep() {\n await this.warning();\n }\n\n async step<T>(name: string, body: () => T | PromiseLike<T>): Promise<T> {\n await this.warning();\n return body();\n }\n\n async stepDisplayName() {\n await this.warning();\n }\n\n async stepParameter() {\n await this.warning();\n }\n\n async testCaseId() {\n await this.warning();\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async warning() {\n // eslint-disable-next-line no-console\n console.log(\"no test runtime is found. Please check test framework configuration\");\n }\n}\n\nexport const noopRuntime: TestRuntime = new NoopTestRuntime();\n", "import { noopRuntime } from \"./NoopTestRuntime.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nconst ALLURE_TEST_RUNTIME_KEY = \"allureTestRuntime\";\n\nexport const setGlobalTestRuntime = (runtime: TestRuntime) => {\n (globalThis as any)[ALLURE_TEST_RUNTIME_KEY] = () => runtime;\n};\n\nconst getGlobalTestRuntimeFunction = () => {\n return (globalThis as any)?.[ALLURE_TEST_RUNTIME_KEY] as (() => TestRuntime | undefined) | undefined;\n};\n\nexport const getGlobalTestRuntime = (): TestRuntime => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n return noopRuntime;\n};\n\nexport const getGlobalTestRuntimeWithAutoconfig = (): TestRuntime | Promise<TestRuntime> => {\n const testRuntime = getGlobalTestRuntimeFunction();\n\n if (testRuntime) {\n return testRuntime() ?? noopRuntime;\n }\n\n if (\"_playwrightInstance\" in globalThis) {\n try {\n // protection from bundlers tree-shaking visiting (webpack, rollup)\n // @ts-ignore\n // eslint-disable-next-line no-eval\n return (0, eval)(\"(() => import('allure-playwright/autoconfig'))()\").then(() => {\n return getGlobalTestRuntimeFunction()?.() ?? noopRuntime;\n });\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log(\"can't execute allure-playwright/autoconfig\", err);\n return noopRuntime;\n }\n }\n\n return noopRuntime;\n};\n", "import type { Status } from \"./model.js\";\nimport { type ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return runtime[method](...args);\n }\n\n return runtime.then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): PromiseLike<void> => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<T> => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\"labels\", ...tagsList.map((value) => ({ name: LabelName.TAG, value })));\n};\n", "import { LabelName, Status } from \"allure-js-commons\";\nimport { extractMetadataFromString, getMessageAndTraceFromError, getStatusFromError } from \"allure-js-commons/sdk\";\nimport type { TestPlanV1 } from \"allure-js-commons/sdk\";\nimport { ALLURE_REPORT_STEP_COMMAND, ALLURE_REPORT_SYSTEM_HOOK } from \"./model.js\";\nimport type { CypressCommand, CypressHook, CypressSuite, CypressTest } from \"./model.js\";\nimport { getAllureTestPlan } from \"./state.js\";\n\nexport const DEFAULT_RUNTIME_CONFIG = {\n stepsFromCommands: {\n maxArgumentLength: 128,\n maxArgumentDepth: 3,\n },\n};\n\nexport const uint8ArrayToBase64 = (data: unknown) => {\n // @ts-ignore\n const u8arrayLike = Array.isArray(data) || data.buffer;\n\n if (!u8arrayLike) {\n return data as string;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return btoa(String.fromCharCode.apply(null, data as number[]));\n};\n\nexport const getSuites = (test: CypressTest) => {\n const suites: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = test.parent; s; s = s.parent) {\n suites.push(s);\n }\n suites.reverse();\n return suites;\n};\n\nexport const getSuitePath = (test: CypressTest): string[] =>\n getSuites(test)\n .filter((s) => s.title)\n .map((s) => s.title);\n\nexport const shouldCommandBeSkipped = (command: CypressCommand) => {\n if (last(command.attributes.args)?.log === false) {\n return true;\n }\n\n if (command.attributes.name === \"task\" && command.attributes.args[0] === \"reportAllureRuntimeMessages\") {\n return true;\n }\n\n // we don't need to report then commands because it's just a promise handle\n if (command.attributes.name === \"then\") {\n return true;\n }\n\n // we should skip artificial wrap from allure steps\n if (command.attributes.name === \"wrap\" && command.attributes.args[0] === ALLURE_REPORT_STEP_COMMAND) {\n return true;\n }\n\n return false;\n};\n\nexport const toReversed = <T = unknown>(arr: T[]): T[] => {\n const result: T[] = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n result.push(arr[i]);\n }\n\n return result;\n};\n\nexport const last = <T = unknown>(arr: T[]): T | undefined => {\n return arr[arr.length - 1];\n};\n\nexport const getNamesAndLabels = (spec: Cypress.Spec, test: CypressTest) => {\n const rawName = test.title;\n const { cleanTitle: name, labels } = extractMetadataFromString(rawName);\n const suites = test.titlePath().slice(0, -1);\n const fullName = `${spec.relative}#${[...suites, name].join(\" \")}`;\n return { name, labels, fullName };\n};\n\nexport const getTestStartData = (test: CypressTest) => ({\n ...getNamesAndLabels(Cypress.spec, test),\n start: test.wallClockStartedAt?.getTime() || Date.now(),\n});\n\nexport const getTestStopData = (test: CypressTest) => ({\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n});\n\nexport const getTestSkipData = () => ({\n statusDetails: { message: \"This is a pending test\" },\n});\n\nexport const applyTestPlan = (spec: Cypress.Spec, root: CypressSuite) => {\n const testPlan = getAllureTestPlan();\n if (testPlan) {\n for (const suite of iterateSuites(root)) {\n const indicesToRemove = getIndicesOfDeselectedTests(testPlan, spec, suite.tests);\n removeSortedIndices(suite.tests, indicesToRemove);\n }\n }\n};\n\nexport const resolveStatusWithDetails = (error: Error | undefined) =>\n error\n ? {\n status: getStatusFromError(error),\n statusDetails: getMessageAndTraceFromError(error),\n }\n : { status: Status.PASSED };\n\nconst testReportedKey = Symbol(\"The test was reported to Allure\");\n\nexport const markTestAsReported = (test: CypressTest) => {\n (test as any)[testReportedKey] = true;\n};\n\nexport const isTestReported = (test: CypressTest) => (test as any)[testReportedKey] === true;\n\nexport const iterateSuites = function* (parent: CypressSuite) {\n const suiteStack: CypressSuite[] = [];\n for (let s: CypressSuite | undefined = parent; s; s = suiteStack.pop()) {\n yield s;\n\n // Pushing in reverse allows us to maintain depth-first pre-order traversal -\n // the same order as used by Mocha & Cypress.\n for (let i = s.suites.length - 1; i >= 0; i--) {\n suiteStack.push(s.suites[i]);\n }\n }\n};\n\nexport const iterateTests = function* (parent: CypressSuite) {\n for (const suite of iterateSuites(parent)) {\n yield* suite.tests;\n }\n};\n\nexport const isAllureHook = (hook: CypressHook) => hook.title.includes(ALLURE_REPORT_SYSTEM_HOOK);\n\nexport const isRootAfterAllHook = (hook: CypressHook) => hook.parent!.root && hook.hookName === \"after all\";\n\nconst includedInTestPlan = (testPlan: TestPlanV1, fullName: string, allureId: string | undefined): boolean =>\n testPlan.tests.some((test) => (allureId && test.id?.toString() === allureId) || test.selector === fullName);\n\nconst getIndicesOfDeselectedTests = (testPlan: TestPlanV1, spec: Cypress.Spec, tests: readonly CypressTest[]) => {\n const indicesToRemove: number[] = [];\n tests.forEach((test, index) => {\n const { fullName, labels } = getNamesAndLabels(spec, test);\n const allureId = labels.find(({ name }) => name === LabelName.ALLURE_ID)?.value;\n\n if (!includedInTestPlan(testPlan, fullName, allureId)) {\n indicesToRemove.push(index);\n }\n });\n return indicesToRemove;\n};\n\nconst removeSortedIndices = <T>(arr: T[], indices: readonly number[]) => {\n for (let i = indices.length - 1; i >= 0; i--) {\n arr.splice(indices[i], 1);\n }\n};\n", "import type { AllureSpecState, CypressMessage, CypressTest } from \"./model.js\";\nimport { DEFAULT_RUNTIME_CONFIG } from \"./utils.js\";\n\nexport const getAllureState = () => {\n let state = Cypress.env(\"allure\") as AllureSpecState;\n if (!state) {\n state = {\n config: DEFAULT_RUNTIME_CONFIG,\n initialized: false,\n messages: [],\n testPlan: undefined,\n currentTest: undefined,\n };\n Cypress.env(\"allure\", state);\n }\n return state;\n};\n\nexport const isAllureInitialized = () => getAllureState().initialized;\n\nexport const setAllureInitialized = () => {\n getAllureState().initialized = true;\n};\n\nexport const getRuntimeMessages = () => getAllureState().messages;\n\nexport const setRuntimeMessages = (value: CypressMessage[]) => {\n getAllureState().messages = value;\n};\n\nexport const enqueueRuntimeMessage = (message: CypressMessage) => {\n getRuntimeMessages().push(message);\n};\n\nexport const getAllureTestPlan = () => getAllureState().testPlan;\n\nexport const getCurrentTest = () => getAllureState().currentTest;\n\nexport const setCurrentTest = (test: CypressTest) => {\n getAllureState().currentTest = test;\n};\n\nexport const dropCurrentTest = () => {\n getAllureState().currentTest = undefined;\n};\n\nexport const getConfig = () => getAllureState().config;\n", "import { ContentType, Status } from \"allure-js-commons\";\nimport type { AttachmentOptions, Label, Link, ParameterMode, ParameterOptions, StatusDetails } from \"allure-js-commons\";\nimport {\n getMessageAndTraceFromError,\n getStatusFromError,\n getUnfinishedStepsMessages,\n isPromise,\n serialize,\n} from \"allure-js-commons/sdk\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport { getGlobalTestRuntime, setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type { TestRuntime } from \"allure-js-commons/sdk/runtime\";\nimport type {\n AllureCypressTaskArgs,\n CypressCommand,\n CypressCommandEndMessage,\n CypressFailMessage,\n CypressHook,\n CypressMessage,\n CypressSuite,\n CypressSuiteFunction,\n CypressTest,\n DirectHookImplementation,\n HookImplementation,\n} from \"./model.js\";\nimport { ALLURE_REPORT_STEP_COMMAND } from \"./model.js\";\nimport {\n dropCurrentTest,\n enqueueRuntimeMessage,\n getConfig,\n getCurrentTest,\n getRuntimeMessages,\n setCurrentTest,\n setRuntimeMessages,\n} from \"./state.js\";\nimport {\n getSuites,\n getTestSkipData,\n getTestStartData,\n getTestStopData,\n isAllureHook,\n isTestReported,\n iterateTests,\n markTestAsReported,\n uint8ArrayToBase64,\n} from \"./utils.js\";\n\nexport class AllureCypressTestRuntime implements TestRuntime {\n constructor() {\n this.#resetMessages();\n }\n\n labels(...labels: Label[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n links(...links: Link[]) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n parameter(name: string, value: string, options?: ParameterOptions) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n description(markdown: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n descriptionHtml(html: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n displayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n historyId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n testCaseId(value: string) {\n return this.#enqueueMessageAsync({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n // @ts-ignore\n attachment(name: string, content: string, options: AttachmentOptions) {\n // @ts-ignore\n const attachmentRawContent: string | Uint8Array = content?.type === \"Buffer\" ? content.data : content;\n const actualEncoding = typeof attachmentRawContent === \"string\" ? \"utf8\" : \"base64\";\n const attachmentContent = uint8ArrayToBase64(attachmentRawContent);\n\n return this.#enqueueMessageAsync({\n type: \"attachment_content\",\n data: {\n name,\n content: attachmentContent,\n encoding: actualEncoding,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n attachmentFromPath(name: string, path: string, options: Omit<AttachmentOptions, \"encoding\">) {\n return this.#enqueueMessageAsync({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n },\n });\n }\n\n logStep(name: string, status: Status = Status.PASSED, error?: Error) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.#enqueueMessageAsync({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve();\n })\n .then(() => {\n return this.#enqueueMessageAsync({\n type: \"step_stop\",\n data: {\n status: status,\n stop: Date.now(),\n statusDetails: error ? { ...getMessageAndTraceFromError(error) } : undefined,\n },\n });\n });\n }\n\n step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n return cy\n .wrap(ALLURE_REPORT_STEP_COMMAND, { log: false })\n .then(() => {\n this.#enqueueMessageAsync({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n return Cypress.Promise.resolve(body());\n })\n .then((result) => {\n return this.#enqueueMessageAsync({\n type: \"step_stop\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n }).then(() => result);\n });\n }\n\n stepDisplayName(name: string) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n name,\n },\n });\n }\n\n stepParameter(name: string, value: string, mode?: ParameterMode) {\n return this.#enqueueMessageAsync({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n flushAllureMessagesToTask = (taskName: string) => {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n cy.task(taskName, { absolutePath: Cypress.spec.absolute, messages }, { log: false });\n }\n };\n\n flushAllureMessagesToTaskAsync = (taskName: string): Cypress.Chainable<unknown> | undefined => {\n const messages = this.#dequeueAllMessages();\n if (messages.length) {\n const args: AllureCypressTaskArgs = {\n absolutePath: Cypress.spec.absolute,\n messages,\n isInteractive: Cypress.config(\"isInteractive\"),\n };\n return cy.task(taskName, args, { log: false });\n }\n };\n\n #resetMessages = () => setRuntimeMessages([]);\n\n #enqueueMessageAsync = (message: CypressMessage): PromiseLike<void> => {\n enqueueRuntimeMessage(message);\n return Cypress.Promise.resolve();\n };\n\n #dequeueAllMessages = () => {\n const messages = getRuntimeMessages();\n this.#resetMessages();\n return messages;\n };\n}\n\nexport const initTestRuntime = () => setGlobalTestRuntime(new AllureCypressTestRuntime() as TestRuntime);\n\nexport const getTestRuntime = () => getGlobalTestRuntime() as AllureCypressTestRuntime;\n\nexport const reportRunStart = () => {\n enqueueRuntimeMessage({\n type: \"cypress_run_start\",\n data: {},\n });\n};\n\nexport const reportSuiteStart = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_start\",\n data: {\n id: suite.id,\n name: suite.title,\n root: suite.root,\n start: Date.now(),\n },\n });\n};\n\nexport const reportSuiteEnd = (suite: CypressSuite) => {\n enqueueRuntimeMessage({\n type: \"cypress_suite_end\",\n data: {\n root: suite.root,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportHookStart = (hook: CypressHook, start?: number) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_start\",\n data: {\n name: hook.title,\n scopeType: hook.hookName.includes(\"each\") ? \"each\" : \"all\",\n position: hook.hookName.includes(\"before\") ? \"before\" : \"after\",\n start: start ?? Date.now(),\n },\n });\n};\n\nexport const reportHookEnd = (hook: CypressHook) => {\n enqueueRuntimeMessage({\n type: \"cypress_hook_end\",\n data: {\n duration: hook.duration ?? 0,\n },\n });\n};\n\nexport const reportTestStart = (test: CypressTest) => {\n setCurrentTest(test);\n enqueueRuntimeMessage({\n type: \"cypress_test_start\",\n data: getTestStartData(test),\n });\n markTestAsReported(test);\n};\n\nexport const reportUnfinishedSteps = (status: Status, statusDetails?: StatusDetails) => {\n const runtimeMessages = getRuntimeMessages() as RuntimeMessage[];\n const unfinishedStepsMessages = getUnfinishedStepsMessages(runtimeMessages);\n unfinishedStepsMessages.forEach(() => {\n enqueueRuntimeMessage({\n type: \"step_stop\",\n data: {\n stop: Date.now(),\n status,\n statusDetails,\n },\n });\n });\n};\n\nexport const reportTestPass = () => {\n reportUnfinishedSteps(Status.PASSED);\n enqueueRuntimeMessage({\n type: \"cypress_test_pass\",\n data: {},\n });\n};\n\nexport const reportTestSkip = (test: CypressTest) => {\n if (isTestReported(test)) {\n reportUnfinishedCommand(Status.SKIPPED, {\n message: \"The test was skipped before the command was completed\",\n });\n } else {\n reportTestStart(test);\n }\n\n enqueueRuntimeMessage({\n type: \"cypress_test_skip\",\n data: getTestSkipData(),\n });\n};\n\nexport const reportCommandStart = (command: CypressCommand) => {\n const {\n stepsFromCommands: { maxArgumentDepth, maxArgumentLength },\n } = getConfig();\n enqueueRuntimeMessage({\n type: \"cypress_command_start\",\n data: {\n name: `Command \"${command.attributes.name}\"`,\n args: command.attributes.args.map((arg) =>\n serialize(arg, { maxDepth: maxArgumentDepth, maxLength: maxArgumentLength }),\n ),\n start: Date.now(),\n },\n });\n};\n\nexport const reportCommandEnd = () => {\n enqueueRuntimeMessage({\n type: \"cypress_command_end\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n });\n};\n\nexport const reportScreenshot = (path: string, name: string) => {\n enqueueRuntimeMessage({\n type: \"attachment_path\",\n data: {\n path: path,\n name: name || \"Screenshot\",\n contentType: ContentType.PNG,\n },\n });\n};\n\nexport const reportUnfinishedCommand = (status: Status, statusDetails?: StatusDetails) => {\n const runtimeMessages = getRuntimeMessages();\n const startCommandMessageIdx = runtimeMessages.toReversed().findIndex(({ type }) => type === \"cypress_command_start\");\n const stopCommandMessageIdx = runtimeMessages.toReversed().findIndex(({ type }) => type === \"cypress_command_end\");\n const hasUnfinishedCommand = startCommandMessageIdx > stopCommandMessageIdx;\n\n const data: CypressCommandEndMessage[\"data\"] = { status, stop: Date.now() };\n if (statusDetails) {\n data.statusDetails = statusDetails;\n }\n\n if (hasUnfinishedCommand) {\n enqueueRuntimeMessage({ type: \"cypress_command_end\", data });\n }\n};\n\nexport const reportTestOrHookFail = (err: Error) => {\n const status = getStatusFromError(err);\n const statusDetails = getMessageAndTraceFromError(err);\n\n reportUnfinishedCommand(status, statusDetails);\n\n enqueueRuntimeMessage({\n type: \"cypress_fail\",\n data: {\n status,\n statusDetails,\n },\n });\n};\n\nexport const reportTestEnd = (test: CypressTest) => {\n enqueueRuntimeMessage({\n type: \"cypress_test_end\",\n data: {\n duration: test.duration ?? 0,\n retries: (test as any)._retries ?? 0,\n },\n });\n dropCurrentTest();\n};\n\nexport const completeHookErrorReporting = (hook: CypressHook, err: Error) => {\n const isEachHook = hook.hookName.includes(\"each\");\n const suite = hook.parent!;\n const testFailData = getStatusDataOfTestSkippedByHookError(hook.title, isEachHook, err, suite);\n\n // Cypress doens't emit 'hook end' if the hook has failed.\n reportHookEnd(hook);\n\n // Cypress doens't emit 'test end' if the hook has failed.\n // We must report the test's end manualy in case of a 'before each' hook.\n reportCurrentTestIfAny();\n\n // Cypress skips the remaining tests in the suite of a failed hook.\n // We should include them to the report manually.\n reportRemainingTests(suite, testFailData);\n};\n\n/**\n * Patches the `after` function, to inject an extra `after` hook after each spec-level\n * `after` hook defined by the user.\n */\nexport const enableScopeLevelAfterHookReporting = () => {\n const [getSuiteDepth, incSuiteDepth, decSuiteDepth] = createSuiteDepthCounterState();\n patchDescribe(incSuiteDepth, decSuiteDepth);\n patchAfter(getSuiteDepth);\n};\n\nexport const flushRuntimeMessages = () => getTestRuntime().flushAllureMessagesToTask(\"reportAllureCypressSpecMessages\");\n\nexport const completeSpec = () =>\n getTestRuntime().flushAllureMessagesToTaskAsync(\"reportFinalAllureCypressSpecMessages\");\n\nexport const completeSpecIfNoAfterHookLeft = (context: Mocha.Context) => {\n if (isLastRootAfterHook(context)) {\n const hook = context.test as CypressHook;\n if (!isAllureHook(hook)) {\n reportHookEnd(hook);\n }\n return completeSpec();\n }\n};\n\nconst completeSpecOnAfterHookFailure = (\n context: Mocha.Context,\n hookError: Error,\n): Cypress.Chainable<unknown> | undefined => {\n try {\n reportTestOrHookFail(hookError);\n completeHookErrorReporting(context.test as CypressHook, hookError);\n\n // cy.task's then doesn't have onrejected, that's why we don't log async Allure errors here.\n return completeSpec();\n } catch (allureError) {\n logAllureRootAfterError(context, allureError);\n }\n};\n\nconst reportCurrentTestIfAny = () => {\n const currentTest = getCurrentTest();\n if (currentTest) {\n reportTestEnd(currentTest);\n }\n};\n\nconst reportRemainingTests = (suite: CypressSuite, testFailData: CypressFailMessage[\"data\"]) => {\n for (const test of iterateTests(suite)) {\n // Some tests in the suite might've been already reported.\n if (!isTestReported(test)) {\n reportTestsSkippedByHookError(\n test,\n test.pending ? { ...getTestSkipData(), status: Status.SKIPPED } : testFailData,\n );\n }\n }\n};\n\nconst reportTestsSkippedByHookError = (test: CypressTest, testFailData: CypressFailMessage[\"data\"]) => {\n enqueueRuntimeMessage({\n type: \"cypress_skipped_test\",\n data: {\n ...getTestStartData(test),\n ...testFailData,\n ...getTestStopData(test),\n suites: getSuites(test).map((s) => s.id),\n },\n });\n markTestAsReported(test);\n};\n\nconst getStatusDataOfTestSkippedByHookError = (\n hookTitle: string,\n isEachHook: boolean,\n err: Error,\n suite: CypressSuite,\n) => {\n const status = isEachHook ? Status.SKIPPED : getStatusFromError(err);\n const { message, trace } = getMessageAndTraceFromError(err);\n return {\n status,\n statusDetails: {\n message: isEachHook ? getSkipReason(hookTitle, suite) : message,\n trace,\n },\n };\n};\n\nconst getSkipReason = (hookTitle: string, suite: CypressSuite) => {\n const suiteName = suite.title ? `'${suite.title}'` : \"root\";\n return `'${hookTitle}' defined in the ${suiteName} suite has failed`;\n};\n\nconst forwardDescribeCall = (target: CypressSuiteFunction, ...args: Parameters<CypressSuiteFunction>) => {\n const [title, configOrFn, fn] = args;\n if (typeof fn === \"undefined\" && typeof configOrFn === \"undefined\") {\n return target(title);\n } else if (typeof configOrFn === \"function\") {\n return target(title, configOrFn);\n } else {\n return target(title, configOrFn, fn);\n }\n};\n\nconst patchDescribe = (incSuiteDepth: () => void, decSuiteDepth: () => void) => {\n const patchDescribeFn =\n (target: CypressSuiteFunction): CypressSuiteFunction =>\n (title, configOrFn, fn) => {\n incSuiteDepth();\n try {\n return forwardDescribeCall(target, title, configOrFn, fn);\n } finally {\n decSuiteDepth();\n }\n };\n const originalDescribeFn: Mocha.SuiteFunction = globalThis.describe;\n const patchedDescribe = patchDescribeFn(originalDescribeFn) as Mocha.SuiteFunction;\n patchedDescribe.only = patchDescribeFn(\n originalDescribeFn.only as CypressSuiteFunction,\n ) as Mocha.ExclusiveSuiteFunction;\n patchedDescribe.skip = patchDescribeFn(originalDescribeFn.skip as CypressSuiteFunction) as Mocha.PendingSuiteFunction;\n globalThis.describe = patchedDescribe;\n};\n\nconst createSuiteDepthCounterState = (): [get: () => number, inc: () => void, dec: () => void] => {\n let suiteDepth = 0;\n return [\n () => suiteDepth,\n () => {\n suiteDepth++;\n },\n () => {\n suiteDepth--;\n },\n ];\n};\n\nconst patchAfter = (getSuiteDepth: () => number) => {\n const originalAfter = globalThis.after;\n const patchedAfter = (nameOrFn: string | HookImplementation, fn?: HookImplementation): void => {\n return typeof nameOrFn === \"string\"\n ? originalAfter(nameOrFn, wrapRootAfterFn(getSuiteDepth, fn))\n : originalAfter(wrapRootAfterFn(getSuiteDepth, nameOrFn)!);\n };\n globalThis.after = patchedAfter;\n};\n\nconst wrapRootAfterFn = (getSuiteDepth: () => number, fn?: HookImplementation): HookImplementation | undefined => {\n if (getSuiteDepth() === 0 && fn) {\n const wrappedFn = fn.length ? wrapAfterFnWithCallback(fn) : wrapAfterFnWithoutArgs(fn as DirectHookImplementation);\n Object.defineProperty(wrappedFn, \"name\", { value: fn.name });\n return wrappedFn;\n }\n return fn;\n};\n\nconst wrapAfterFnWithCallback = (fn: Mocha.Func): Mocha.Func => {\n return function (this: Mocha.Context, done: Mocha.Done) {\n const wrappedDone = (hookError?: Error) => {\n if (hookError) {\n if (!completeSpecOnAfterHookFailure(this, hookError)?.then(() => done(hookError))) {\n done(hookError);\n }\n return;\n }\n\n try {\n if (completeSpecIfNoAfterHookLeft(this)?.then(() => done())) {\n return;\n }\n } catch (allureError) {\n done(allureError);\n return;\n }\n\n done();\n };\n return fn.bind(this)(wrappedDone);\n };\n};\n\nconst wrapAfterFnWithoutArgs = (fn: DirectHookImplementation) => {\n return function (this: Mocha.Context) {\n let result;\n let syncError: any;\n\n try {\n result = fn.bind(this)();\n } catch (e) {\n syncError = e;\n }\n\n if (syncError) {\n throwAfterSpecCompletion(this, syncError);\n } else if (isPromise(result)) {\n return result.then(\n () => completeSpecIfNoAfterHookLeft(this),\n (asyncError) => throwAfterSpecCompletion(this, asyncError),\n );\n } else {\n completeSpecIfNoAfterHookLeft(this);\n return result;\n }\n };\n};\n\nconst throwAfterSpecCompletion = (context: Mocha.Context, err: any) => {\n const chain = completeSpecOnAfterHookFailure(context, err as Error)?.then(() => {\n throw err;\n });\n if (!chain) {\n throw err;\n }\n};\n\nconst logAllureRootAfterError = (context: Mocha.Context, err: unknown) => {\n // We play safe and swallow errors here to keep the original 'after all' error.\n try {\n // eslint-disable-next-line no-console\n console.error(`Unexpected error when reporting the failure of ${context.test?.title ?? \"'after all'\"}`);\n // eslint-disable-next-line no-console\n console.error(err);\n } catch {}\n};\n\nconst isLastRootAfterHook = (context: Mocha.Context) => {\n const currentAfterAll = context.test as CypressHook;\n const rootSuite = (context.test as CypressHook).parent!;\n const hooks = (rootSuite as any).hooks as CypressHook[];\n const lastAfterAll = hooks.findLast((h) => h.hookName === \"after all\");\n return lastAfterAll?.hookId === currentAfterAll.hookId;\n};\n"],
5
+ "mappings": "mbAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,iBAAAE,EAAA,cAAAC,EAAA,aAAAC,EAAA,aAAAC,GAAA,UAAAC,GAAA,WAAAC,EAAA,qBAAAC,GAAA,aAAAC,GAAA,eAAAC,GAAA,mBAAAC,GAAA,gBAAAC,GAAA,oBAAAC,GAAA,gBAAAC,GAAA,SAAAC,GAAA,YAAAC,GAAA,cAAAC,GAAA,UAAAC,GAAA,UAAAC,EAAA,WAAAC,GAAA,UAAAC,GAAA,SAAAC,EAAA,UAAAC,GAAA,YAAAC,GAAA,UAAAC,GAAA,cAAAC,GAAA,gBAAAC,GAAA,aAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,aAAAC,GAAA,UAAAC,GAAA,QAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,QAAAC,KAAA,eAAAC,GAAArC,IC8EA,IAAYsC,EAAM,SAANA,E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jDC,EAAuBD,CAAO,GAIlCG,GAAiB,CACnB,CAAC,EAED,UAAUC,EAA2BC,EAAoB,EAEzD,MAAMD,EAA2B,UAA+B,CAC9DC,GAAqB,EACrBC,EAA8B,IAAI,CACpC,CAAC,EAEDC,GAAmC,EACrC,EAEAzC,GAAiB",
6
+ "names": ["src_exports", "__export", "ContentType", "LabelName", "LinkType", "Severity", "Stage", "Status", "StatusByPriority", "allureId", "attachment", "attachmentPath", "description", "descriptionHtml", "displayName", "epic", "feature", "historyId", "issue", "label", "labels", "layer", "link", "links", "logStep", "owner", "parameter", "parentSuite", "severity", "step", "story", "subSuite", "suite", "tag", "tags", "testCaseId", "tms", "__toCommonJS", "Status", "StatusByPriority", "FAILED", "BROKEN", "PASSED", "SKIPPED", "Stage", "LabelName", "Severity", "ContentType", "LinkType", "getStatusFromError", "error", "test", "constructor", "name", "message", "stack", "Status", "FAILED", "BROKEN", "ansiRegex", "onlyFirst", "arguments", "length", "undefined", "pattern", "join", "RegExp", "stripAnsi", "str", "regex", "replace", "getMessageAndTraceFromError", "trace", "allureIdRegexp", "_wrapRegExp", "id", "allureIdRegexpGlobal", "allureLabelRegexp", "value", "allureLabelRegexpGlobal", "extractMetadataFromString", "title", "labels", "split", "forEach", "val", "_val$match", "idValue", "match", "allureIdRegexp", "groups", "id", "push", "name", "LabelName", "ALLURE_ID", "value", "labelMatch", "allureLabelRegexp", "cleanTitle", "replace", "allureLabelRegexpGlobal", "allureIdRegexpGlobal", "trim", "getStepsMessagesPair", "messages", "reduce", "acc", "message", "type", "push", "unfinishedStepIdx", "findLastIndex", "step", "length", "getUnfinishedStepsMessages", "grouppedStepsMessage", "filter", "isPromise", "obj", "then", "serialize", "value", "maxDepth", "maxLength", "arguments", "undefined", "limitString", "JSON", "stringify", "createSerializeReplacer", "String", "parents", "_", "Object", "is", "at", "pop", "includes", "Map", "excludeCircularRefsFromMap", "Set", "excludeCircularRefsFromSet", "map", "Array", "from", "_ref", "k", "_ref2", "v", "set", "concat", "substring", "ALLURE_REPORT_SYSTEM_HOOK", "ALLURE_REPORT_STEP_COMMAND", "NoopTestRuntime", "attachment", "_this", "_asyncToGenerator", "warning", "attachmentFromPath", "_this2", "description", "_this3", "descriptionHtml", "_this4", "displayName", "_this5", "historyId", "_this6", "labels", "_this7", "links", "_this8", "parameter", "_this9", "logStep", "_this10", "step", "name", "body", "_this11", "stepDisplayName", "_this12", "stepParameter", "_this13", "testCaseId", "_this14", "console", "log", "noopRuntime", "ALLURE_TEST_RUNTIME_KEY", "setGlobalTestRuntime", "runtime", "globalThis", "getGlobalTestRuntimeFunction", "getGlobalTestRuntime", "testRuntime", "_testRuntime", "noopRuntime", "getGlobalTestRuntimeWithAutoconfig", "_testRuntime2", "eval", "then", "_getGlobalTestRuntime", "_getGlobalTestRuntime2", "err", "console", "log", "callRuntimeMethod", "method", "_len", "arguments", "length", "args", "Array", "_key", "runtime", "getGlobalTestRuntimeWithAutoconfig", "isPromise", "then", "testRuntime", "label", "name", "value", "labels", "_len2", "labelsList", "_key2", "link", "url", "type", "links", "_len3", "linksList", "_key3", "parameter", "options", "description", "markdown", "descriptionHtml", "html", "displayName", "historyId", "testCaseId", "attachment", "content", "opts", "contentType", "attachmentPath", "path", "stepContext", "mode", "logStep", "status", "error", "step", "body", "issue", "LinkType", "ISSUE", "tms", "TMS", "allureId", "LabelName", "ALLURE_ID", "epic", "EPIC", "feature", "FEATURE", "story", "STORY", "suite", "SUITE", "parentSuite", "PARENT_SUITE", "subSuite", "SUB_SUITE", "owner", "OWNER", "severity", "SEVERITY", "layer", "LAYER", "tag", "TAG", "tags", "_len4", "tagsList", "_key4", "map", "DEFAULT_RUNTIME_CONFIG", "uint8ArrayToBase64", "data", "getSuites", "test", "suites", "s", "shouldCommandBeSkipped", "command", "last", "ALLURE_REPORT_STEP_COMMAND", "last", "arr", "getNamesAndLabels", "spec", "test", "rawName", "name", "labels", "extractMetadataFromString", "suites", "fullName", "getTestStartData", "getTestStopData", "getTestSkipData", "applyTestPlan", "root", "testPlan", "getAllureTestPlan", "suite", "iterateSuites", "indicesToRemove", "getIndicesOfDeselectedTests", "removeSortedIndices", "testReportedKey", "markTestAsReported", "test", "isTestReported", "iterateSuites", "parent", "suiteStack", "s", "i", "iterateTests", "suite", "isAllureHook", "hook", "ALLURE_REPORT_SYSTEM_HOOK", "isRootAfterAllHook", "includedInTestPlan", "testPlan", "fullName", "allureId", "getIndicesOfDeselectedTests", "spec", "tests", "indicesToRemove", "index", "labels", "getNamesAndLabels", "name", "LabelName", "removeSortedIndices", "arr", "indices", "getAllureState", "state", "DEFAULT_RUNTIME_CONFIG", "isAllureInitialized", "setAllureInitialized", "getRuntimeMessages", "setRuntimeMessages", "value", "enqueueRuntimeMessage", "message", "getAllureTestPlan", "getCurrentTest", "setCurrentTest", "test", "dropCurrentTest", "getConfig", "AllureCypressTestRuntime", "#resetMessages", "labels", "#enqueueMessageAsync", "links", "name", "value", "options", "markdown", "html", "content", "attachmentRawContent", "actualEncoding", "attachmentContent", "uint8ArrayToBase64", "path", "status", "Status", "error", "ALLURE_REPORT_STEP_COMMAND", "getMessageAndTraceFromError", "body", "result", "mode", "taskName", "messages", "#dequeueAllMessages", "args", "setRuntimeMessages", "message", "enqueueRuntimeMessage", "getRuntimeMessages", "initTestRuntime", "setGlobalTestRuntime", "getTestRuntime", "getGlobalTestRuntime", "reportRunStart", "reportSuiteStart", "suite", "reportSuiteEnd", "reportHookStart", "hook", "start", "reportHookEnd", "reportTestStart", "test", "setCurrentTest", "getTestStartData", "markTestAsReported", "reportUnfinishedSteps", "statusDetails", "runtimeMessages", "getUnfinishedStepsMessages", "reportTestPass", "reportTestSkip", "isTestReported", "reportUnfinishedCommand", "getTestSkipData", "reportCommandStart", "command", "maxArgumentDepth", "maxArgumentLength", "getConfig", "arg", "serialize", "reportCommandEnd", "reportScreenshot", "ContentType", "startCommandMessageIdx", "type", "stopCommandMessageIdx", "hasUnfinishedCommand", "data", "reportTestOrHookFail", "err", "getStatusFromError", "reportTestEnd", "dropCurrentTest", "completeHookErrorReporting", "isEachHook", "testFailData", "getStatusDataOfTestSkippedByHookError", "reportCurrentTestIfAny", "reportRemainingTests", "enableScopeLevelAfterHookReporting", "getSuiteDepth", "incSuiteDepth", "decSuiteDepth", "createSuiteDepthCounterState", "patchDescribe", "patchAfter", "flushRuntimeMessages", "completeSpec", "completeSpecIfNoAfterHookLeft", "context", "isLastRootAfterHook", "isAllureHook", "completeSpecOnAfterHookFailure", "hookError", "allureError", "logAllureRootAfterError", "currentTest", "getCurrentTest", "iterateTests", "reportTestsSkippedByHookError", "getTestStopData", "getSuites", "s", "hookTitle", "trace", "getSkipReason", "suiteName", "forwardDescribeCall", "target", "title", "configOrFn", "fn", "patchDescribeFn", "originalDescribeFn", "patchedDescribe", "suiteDepth", "originalAfter", "patchedAfter", "nameOrFn", "wrapRootAfterFn", "wrappedFn", "wrapAfterFnWithCallback", "wrapAfterFnWithoutArgs", "done", "wrappedDone", "syncError", "e", "throwAfterSpecCompletion", "isPromise", "asyncError", "currentAfterAll", "h", "EVENT_RUN_BEGIN", "EVENT_SUITE_BEGIN", "EVENT_SUITE_END", "EVENT_HOOK_BEGIN", "EVENT_HOOK_END", "EVENT_TEST_BEGIN", "EVENT_TEST_PASS", "EVENT_TEST_FAIL", "EVENT_TEST_PENDING", "EVENT_TEST_END", "initializeAllure", "isAllureInitialized", "setAllureInitialized", "initTestRuntime", "reportRunStart", "suite", "applyTestPlan", "reportSuiteStart", "reportSuiteEnd", "hook", "isAllureHook", "reportHookStart", "reportHookEnd", "test", "isTestReported", "reportTestStart", "reportTestPass", "testOrHook", "err", "isHook", "isRootAfterAllHook", "reportTestOrHookFail", "completeHookErrorReporting", "reportTestSkip", "reportTestEnd", "_", "path", "name", "reportScreenshot", "status", "getStatusFromError", "statusDetails", "getMessageAndTraceFromError", "reportUnfinishedSteps", "command", "shouldCommandBeSkipped", "reportCommandStart", "reportCommandEnd", "ALLURE_REPORT_SYSTEM_HOOK", "flushRuntimeMessages", "completeSpecIfNoAfterHookLeft", "enableScopeLevelAfterHookReporting"]
7
7
  }