We are using Cypress with Github Actions and everything works as expected but I am not getting the time for the failed "it".
I tried to use mocha-junit-reporter to see what I am getting back and the file looks like the following:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="26.576" tests="2" failures="2">
<testsuite name="" timestamp="2023-03-29T16:38:19" tests="0" file="cypress\e2e\user-management\all-pages-load.cy.ts" time="0.000" failures="0">
</testsuite>
<testsuite name="Root Suite.All pages load" timestamp="2023-03-29T16:38:19" tests="2" time="26.563" failures="2">
<testcase name="should load all pages" time="0.000" classname="All pages load">
<failure message="Timed out retrying after 10000ms: expected 'https://.com/' to include '/test'" type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 10000ms: expected 'https://zz.com/' to include '/test'
at eval (https://zz.com/__cypress/tests?p=cypress\e2e\user-management\all-pages-load.cy.ts:103:22)
at Array.forEach (<anonymous>)
at Context.eval (https://zz.com/__cypress/tests?p=cypress\e2e\user-management\all-pages-load.cy.ts:101:15)]]></failure>
</testcase>
<testcase name="should load all pages" time="0.000" classname="All pages load">
<failure message="Timed out retrying after 10000ms: expected 'https://zz.com/' to include '/test'" type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 10000ms: expected 'https://zz.com/' to include '/test'
at eval (https://zz.com/__cypress/tests?p=cypress\e2e\user-management\all-pages-load.cy.ts:109:22)
at Array.forEach (<anonymous>)
at Context.eval (https://zz.com/__cypress/tests?p=cypress\e2e\user-management\all-pages-load.cy.ts:107:15)]]></failure>
</testcase>
</testsuite>
</testsuites>
As can be seen in the file above, the total time is fine (26.576), but the time inside the "should load all pages" is 0.000.
Could you tell me what I am doing wrong?