From 22b21db8e375ad04a883455a7b18b1985dfa6b64 Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Mon, 18 Sep 2023 17:23:59 -0700 Subject: [PATCH] chore: add dataFlow tests --- ...pec_12.17.4_cypress_e2e_crash.spec.js.json | 30 - ...ec_12.17.4_cypress_e2e_failed.spec.js.json | 164 ----- ...ec_12.17.4_cypress_e2e_passed.spec.js.json | 151 ---- ...c_12.17.4_cypress_e2e_pending.spec.js.json | 80 -- ...c_12.17.4_cypress_e2e_retries.spec.js.json | 265 ------- .../afterSpec_13.2.0_crash.spec.js.json | 25 - .../afterSpec_13.2.0_failed.spec.js.json | 58 -- .../afterSpec_13.2.0_passed.spec.js.json | 58 -- .../afterSpec_13.2.0_pending.spec.js.json | 50 -- .../afterSpec_13.2.0_skipped.spec.js.json | 72 -- ...fterTest_12.17.4_Passed_should pass_0.json | 55 -- ...afterTest_13.2.0_Passed_should pass_0.json | 56 -- ....0_Retries_Runs a test with retries_2.json | 1 - ...foreTest_12.17.4_Failed_should fail_0.json | 30 - ...foreTest_12.17.4_Passed_should pass_0.json | 28 - ....4_Retries_Runs a test with retries_0.json | 28 - ....4_Retries_Runs a test with retries_1.json | 18 - ....4_Retries_Runs a test with retries_2.json | 18 - ....17.4_Skipped_should not be skipped_0.json | 28 - ...eforeTest_13.2.0_Failed_should fail_0.json | 31 - ...eforeTest_13.2.0_Passed_should pass_0.json | 31 - ....0_Retries_Runs a test with retries_0.json | 29 - ....0_Retries_Runs a test with retries_1.json | 17 - ....0_Retries_Runs a test with retries_2.json | 19 - ...3.2.0_Skipped_should not be skipped_0.json | 1 - examples/webapp/cypress/e2e_01/clear.spec.js | 33 - .../webapp/cypress/e2e_01/completed.spec.js | 62 -- .../webapp/cypress/e2e_01/counter.spec.js | 12 - examples/webapp/cypress/e2e_01/edit.spec.js | 74 -- examples/webapp/cypress/e2e_01/item.spec.js | 68 -- examples/webapp/cypress/e2e_01/new.spec.js | 73 -- .../webapp/cypress/e2e_01/persistance.spec.js | 29 - .../webapp/cypress/e2e_01/routing.spec.js | 69 -- examples/webapp/cypress/e2e_01/smoke.spec.js | 11 - .../cypress/e2e_01/todo.no-items.spec.js | 13 - examples/webapp/cypress/e2e_02/clear.spec.js | 33 - .../webapp/cypress/e2e_02/completed.spec.js | 62 -- .../webapp/cypress/e2e_02/counter.spec.js | 12 - examples/webapp/cypress/e2e_02/edit.spec.js | 74 -- examples/webapp/cypress/e2e_02/item.spec.js | 68 -- examples/webapp/cypress/e2e_02/new.spec.js | 73 -- .../webapp/cypress/e2e_02/persistance.spec.js | 29 - .../webapp/cypress/e2e_02/routing.spec.js | 69 -- examples/webapp/cypress/e2e_02/smoke.spec.js | 11 - .../cypress/e2e_02/todo.no-items.spec.js | 13 - examples/webapp/cypress/e2e_03/clear.spec.js | 33 - .../webapp/cypress/e2e_03/completed.spec.js | 62 -- .../webapp/cypress/e2e_03/counter.spec.js | 12 - examples/webapp/cypress/e2e_03/edit.spec.js | 74 -- examples/webapp/cypress/e2e_03/item.spec.js | 68 -- examples/webapp/cypress/e2e_03/new.spec.js | 73 -- .../webapp/cypress/e2e_03/persistance.spec.js | 29 - .../webapp/cypress/e2e_03/routing.spec.js | 69 -- examples/webapp/cypress/e2e_03/smoke.spec.js | 11 - .../cypress/e2e_03/todo.no-items.spec.js | 13 - examples/webapp/cypress/e2e_04/clear.spec.js | 33 - .../webapp/cypress/e2e_04/completed.spec.js | 62 -- .../webapp/cypress/e2e_04/counter.spec.js | 12 - examples/webapp/cypress/e2e_04/edit.spec.js | 74 -- examples/webapp/cypress/e2e_04/item.spec.js | 68 -- examples/webapp/cypress/e2e_04/new.spec.js | 73 -- .../webapp/cypress/e2e_04/persistance.spec.js | 29 - .../webapp/cypress/e2e_04/routing.spec.js | 69 -- examples/webapp/cypress/e2e_04/smoke.spec.js | 11 - .../cypress/e2e_04/todo.no-items.spec.js | 13 - examples/webapp/cypress/e2e_05/clear.spec.js | 33 - .../webapp/cypress/e2e_05/completed.spec.js | 62 -- .../webapp/cypress/e2e_05/counter.spec.js | 12 - examples/webapp/cypress/e2e_05/edit.spec.js | 74 -- examples/webapp/cypress/e2e_05/item.spec.js | 68 -- examples/webapp/cypress/e2e_05/new.spec.js | 73 -- .../webapp/cypress/e2e_05/persistance.spec.js | 29 - .../webapp/cypress/e2e_05/routing.spec.js | 69 -- examples/webapp/cypress/e2e_05/smoke.spec.js | 11 - .../cypress/e2e_05/todo.no-items.spec.js | 13 - examples/webapp/cypress/e2e_06/clear.spec.js | 33 - .../webapp/cypress/e2e_06/completed.spec.js | 62 -- .../webapp/cypress/e2e_06/counter.spec.js | 12 - examples/webapp/cypress/e2e_06/edit.spec.js | 74 -- examples/webapp/cypress/e2e_06/item.spec.js | 68 -- examples/webapp/cypress/e2e_06/new.spec.js | 73 -- .../webapp/cypress/e2e_06/persistance.spec.js | 29 - .../webapp/cypress/e2e_06/routing.spec.js | 69 -- examples/webapp/cypress/e2e_06/smoke.spec.js | 11 - .../cypress/e2e_06/todo.no-items.spec.js | 13 - .../{ddd => e2e_example}/completed.spec.js | 0 .../{ddd => e2e_example}/counter.spec.js | 0 .../cypress/{ddd => e2e_example}/edit.spec.js | 0 .../cypress/{ddd => e2e_example}/item.spec.js | 0 .../{ddd => e2e_example}/labels.spec.js | 0 .../cypress/{ddd => e2e_example}/new.spec.js | 0 .../{ddd => e2e_example}/persistance.spec.js | 0 .../{ddd => e2e_example}/routing.spec.js | 0 .../{ddd => e2e_example}/smoke.spec.js | 0 .../todo.no-items.spec.js | 0 ...ples_webapp_cypress_e2e_crash.spec.js.json | 520 ------------- ...les_webapp_cypress_e2e_failed.spec.js.json | 402 ---------- ...les_webapp_cypress_e2e_passed.spec.js.json | 389 ---------- ...es_webapp_cypress_e2e_pending.spec.js.json | 361 --------- ...es_webapp_cypress_e2e_retries.spec.js.json | 439 ----------- ...les_webapp_cypress_e2e_passed.spec.js.json | 170 ----- ...es_webapp_cypress_e2e_pending.spec.js.json | 162 ---- ...es_webapp_cypress_e2e_skipped.spec.js.json | 177 ----- examples/webapp/package.json | 2 +- examples/webapp/screenshot_1694732805396.json | 13 - examples/webapp/screenshot_1694732812045.json | 14 - examples/webapp/screenshot_1694732823701.json | 1 - examples/webapp/screenshot_1694732824019.json | 1 - examples/webapp/screenshot_1694732830501.json | 1 - examples/webapp/screenshot_1694733427580.json | 1 - examples/webapp/screenshot_1694733475012.json | 1 - examples/webapp/screenshot_1694733481600.json | 1 - examples/webapp/screenshot_1694733493221.json | 1 - examples/webapp/screenshot_1694733493576.json | 1 - examples/webapp/screenshot_1694733500062.json | 1 - examples/webapp/screenshot_1694733560140.json | 1 - examples/webapp/screenshot_1694733566700.json | 1 - examples/webapp/screenshot_1694733578424.json | 1 - examples/webapp/screenshot_1694733578763.json | 1 - examples/webapp/screenshot_1694733585076.json | 1 - examples/webapp/screenshot_1694733617678.json | 1 - examples/webapp/screenshot_1694733623691.json | 1 - examples/webapp/screenshot_1694733634331.json | 1 - examples/webapp/screenshot_1694733634643.json | 1 - examples/webapp/screenshot_1694733640387.json | 1 - package-lock.json | 691 +++++++++++++++++- packages/cypress-cloud/jest.config.js | 2 +- .../cypress-cloud/lib/__tests__/README.md | 15 + .../lib/__tests__/dataFlow.test.ts | 154 ++++ .../12.17.4/crash.spec.js/runResult.json | 1 + .../12.17.4/crash.spec.js/specAfter.json | 1 + .../12.17.4/failed.spec.js/runResult.json | 1 + .../12.17.4/failed.spec.js/screenshot_01.json | 1 + .../12.17.4/failed.spec.js/specAfter.json | 1 + .../12.17.4/failed.spec.js/testAfter_00.json | 2 +- .../12.17.4/passed.spec.js/runResult.json | 1 + .../12.17.4/passed.spec.js/screenshot_01.json | 1 + .../12.17.4/passed.spec.js/specAfter.json | 1 + .../12.17.4/passed.spec.js/testAfter_00.json | 1 + .../12.17.4/pending.spec.js/runResult.json | 1 + .../12.17.4/pending.spec.js/specAfter.json | 1 + .../12.17.4/retries.spec.js/runResult.json | 1 + .../retries.spec.js/screenshot_01.json | 1 + .../retries.spec.js/screenshot_02.json | 1 + .../12.17.4/retries.spec.js/specAfter.json | 1 + .../12.17.4/retries.spec.js/testAfter_00.json | 2 +- .../12.17.4/retries.spec.js/testAfter_01.json | 2 +- .../12.17.4/retries.spec.js/testAfter_02.json | 1 + .../12.17.4/skipped.spec.js/runResult.json | 52 +- .../skipped.spec.js/screenshot_01.json | 1 + .../12.17.4/skipped.spec.js/specAfter.json | 94 +-- .../12.17.4/skipped.spec.js/testAfter_00.json | 17 +- .../13.2.0/crash.spec.js/runResult.json | 127 ++-- .../13.2.0/crash.spec.js/specAfter.json | 1 + .../13.2.0/failed.spec.js/runResult.json | 28 +- .../13.2.0/failed.spec.js/screenshot_01.json | 1 + .../13.2.0/failed.spec.js/specAfter.json | 1 + .../13.2.0/failed.spec.js/testAfter_00.json | 17 +- .../13.2.0/passed.spec.js/runResult.json | 1 + .../13.2.0/passed.spec.js/screenshot_01.json | 1 + .../13.2.0/passed.spec.js/specAfter.json | 1 + .../13.2.0/passed.spec.js/testAfter_00.json | 1 + .../13.2.0/pending.spec.js/runResult.json | 1 + .../13.2.0/pending.spec.js/specAfter.json | 1 + .../13.2.0/retries.spec.js/runResult.json | 32 +- .../13.2.0/retries.spec.js/screenshot_01.json | 16 + .../13.2.0/retries.spec.js/screenshot_02.json | 16 + .../13.2.0/retries.spec.js/specAfter.json | 37 +- .../13.2.0/retries.spec.js/testAfter_00.json | 14 +- .../13.2.0/retries.spec.js/testAfter_01.json | 16 +- .../13.2.0/retries.spec.js/testAfter_02.json | 17 +- .../13.2.0/skipped.spec.js/apiCall.json | 1 + .../13.2.0/skipped.spec.js/runResult.json | 1 + .../13.2.0/skipped.spec.js/screenshot_01.json | 1 + .../13.2.0/skipped.spec.js/specAfter.json | 1 + .../13.2.0/skipped.spec.js/testAfter_00.json | 2 +- .../fixtures/api/crash.spec.js/payload.ts | 50 ++ .../fixtures/api/failed.spec.js/payload.ts | 87 +++ .../fixtures/api/passed.spec.js/payload.ts | 73 ++ .../fixtures/api/pending.spec.js/payload.ts | 61 ++ .../fixtures/api/retries.spec.js/payload.ts | 126 ++++ .../fixtures/api/skipped.spec.js/payload.ts | 114 +++ .../cypress-cloud/lib/cypress.types/13.ts | 4 +- .../cypress-cloud/lib/cypress.types/README.md | 19 + packages/cypress-cloud/lib/debug-data.ts | 54 ++ .../lib/httpClient/httpClient.ts | 16 +- packages/cypress-cloud/lib/init.ts | 2 +- packages/cypress-cloud/lib/listener.ts | 124 ++++ .../lib/results/__tests__/mapResults.test.ts | 63 -- .../cypress-cloud/lib/results/captureHooks.ts | 27 +- .../lib/results/moduleAPIResult.ts | 32 +- .../lib/results/specAfterResult.ts | 27 +- .../lib/results/uploadResults.ts | 13 + packages/cypress-cloud/lib/run.ts | 105 +-- packages/cypress-cloud/lib/runner/runner.ts | 47 +- packages/cypress-cloud/lib/state/execution.ts | 4 +- packages/cypress-cloud/lib/state/global.ts | 14 + packages/cypress-cloud/lib/warnings.ts | 20 + packages/cypress-cloud/package.json | 2 +- 199 files changed, 1983 insertions(+), 7159 deletions(-) delete mode 100644 examples/webapp/afterSpec_12.17.4_cypress_e2e_crash.spec.js.json delete mode 100644 examples/webapp/afterSpec_12.17.4_cypress_e2e_failed.spec.js.json delete mode 100644 examples/webapp/afterSpec_12.17.4_cypress_e2e_passed.spec.js.json delete mode 100644 examples/webapp/afterSpec_12.17.4_cypress_e2e_pending.spec.js.json delete mode 100644 examples/webapp/afterSpec_12.17.4_cypress_e2e_retries.spec.js.json delete mode 100644 examples/webapp/afterSpec_13.2.0_crash.spec.js.json delete mode 100644 examples/webapp/afterSpec_13.2.0_failed.spec.js.json delete mode 100644 examples/webapp/afterSpec_13.2.0_passed.spec.js.json delete mode 100644 examples/webapp/afterSpec_13.2.0_pending.spec.js.json delete mode 100644 examples/webapp/afterSpec_13.2.0_skipped.spec.js.json delete mode 100644 examples/webapp/afterTest_12.17.4_Passed_should pass_0.json delete mode 100644 examples/webapp/afterTest_13.2.0_Passed_should pass_0.json delete mode 100644 examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_2.json delete mode 100644 examples/webapp/beforeTest_12.17.4_Failed_should fail_0.json delete mode 100644 examples/webapp/beforeTest_12.17.4_Passed_should pass_0.json delete mode 100644 examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_0.json delete mode 100644 examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_1.json delete mode 100644 examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_2.json delete mode 100644 examples/webapp/beforeTest_12.17.4_Skipped_should not be skipped_0.json delete mode 100644 examples/webapp/beforeTest_13.2.0_Failed_should fail_0.json delete mode 100644 examples/webapp/beforeTest_13.2.0_Passed_should pass_0.json delete mode 100644 examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_0.json delete mode 100644 examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_1.json delete mode 100644 examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_2.json delete mode 100644 examples/webapp/beforeTest_13.2.0_Skipped_should not be skipped_0.json delete mode 100644 examples/webapp/cypress/e2e_01/clear.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/completed.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/counter.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/edit.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/item.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/new.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/persistance.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/routing.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/smoke.spec.js delete mode 100644 examples/webapp/cypress/e2e_01/todo.no-items.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/clear.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/completed.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/counter.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/edit.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/item.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/new.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/persistance.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/routing.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/smoke.spec.js delete mode 100644 examples/webapp/cypress/e2e_02/todo.no-items.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/clear.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/completed.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/counter.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/edit.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/item.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/new.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/persistance.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/routing.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/smoke.spec.js delete mode 100644 examples/webapp/cypress/e2e_03/todo.no-items.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/clear.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/completed.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/counter.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/edit.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/item.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/new.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/persistance.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/routing.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/smoke.spec.js delete mode 100644 examples/webapp/cypress/e2e_04/todo.no-items.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/clear.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/completed.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/counter.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/edit.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/item.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/new.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/persistance.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/routing.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/smoke.spec.js delete mode 100644 examples/webapp/cypress/e2e_05/todo.no-items.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/clear.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/completed.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/counter.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/edit.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/item.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/new.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/persistance.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/routing.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/smoke.spec.js delete mode 100644 examples/webapp/cypress/e2e_06/todo.no-items.spec.js rename examples/webapp/cypress/{ddd => e2e_example}/completed.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/counter.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/edit.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/item.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/labels.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/new.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/persistance.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/routing.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/smoke.spec.js (100%) rename examples/webapp/cypress/{ddd => e2e_example}/todo.no-items.spec.js (100%) delete mode 100644 examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json delete mode 100644 examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json delete mode 100644 examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json delete mode 100644 examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json delete mode 100644 examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json delete mode 100644 examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json delete mode 100644 examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json delete mode 100644 examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json delete mode 100644 examples/webapp/screenshot_1694732805396.json delete mode 100644 examples/webapp/screenshot_1694732812045.json delete mode 100644 examples/webapp/screenshot_1694732823701.json delete mode 100644 examples/webapp/screenshot_1694732824019.json delete mode 100644 examples/webapp/screenshot_1694732830501.json delete mode 100644 examples/webapp/screenshot_1694733427580.json delete mode 100644 examples/webapp/screenshot_1694733475012.json delete mode 100644 examples/webapp/screenshot_1694733481600.json delete mode 100644 examples/webapp/screenshot_1694733493221.json delete mode 100644 examples/webapp/screenshot_1694733493576.json delete mode 100644 examples/webapp/screenshot_1694733500062.json delete mode 100644 examples/webapp/screenshot_1694733560140.json delete mode 100644 examples/webapp/screenshot_1694733566700.json delete mode 100644 examples/webapp/screenshot_1694733578424.json delete mode 100644 examples/webapp/screenshot_1694733578763.json delete mode 100644 examples/webapp/screenshot_1694733585076.json delete mode 100644 examples/webapp/screenshot_1694733617678.json delete mode 100644 examples/webapp/screenshot_1694733623691.json delete mode 100644 examples/webapp/screenshot_1694733634331.json delete mode 100644 examples/webapp/screenshot_1694733634643.json delete mode 100644 examples/webapp/screenshot_1694733640387.json create mode 100644 packages/cypress-cloud/lib/__tests__/README.md create mode 100644 packages/cypress-cloud/lib/__tests__/dataFlow.test.ts create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/specAfter.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/screenshot_01.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/specAfter.json rename examples/webapp/afterTest_13.2.0_Failed_should fail_0.json => packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/testAfter_00.json (78%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/screenshot_01.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/specAfter.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/testAfter_00.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/specAfter.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_01.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_02.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/specAfter.json rename examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_0.json => packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_00.json (79%) rename examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_1.json => packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_01.json (72%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_02.json rename examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json => packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/runResult.json (94%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/screenshot_01.json rename examples/webapp/afterSpec_12.17.4_cypress_e2e_skipped.spec.js.json => packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/specAfter.json (70%) rename examples/webapp/afterTest_12.17.4_Skipped_should not be skipped_0.json => packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/testAfter_00.json (87%) rename examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/runResult.json (80%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/specAfter.json rename examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/runResult.json (90%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/screenshot_01.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/specAfter.json rename examples/webapp/afterTest_12.17.4_Failed_should fail_0.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/testAfter_00.json (86%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/screenshot_01.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/specAfter.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/testAfter_00.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/specAfter.json rename examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/runResult.json (90%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_01.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_02.json rename examples/webapp/afterSpec_13.2.0_retries.spec.js.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/specAfter.json (68%) rename examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_0.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_00.json (89%) rename examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_1.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_01.json (81%) rename examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_2.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_02.json (53%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/apiCall.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/runResult.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/screenshot_01.json create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/specAfter.json rename examples/webapp/afterTest_13.2.0_Skipped_should not be skipped_0.json => packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/testAfter_00.json (82%) create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/api/crash.spec.js/payload.ts create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/api/failed.spec.js/payload.ts create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/api/passed.spec.js/payload.ts create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/api/pending.spec.js/payload.ts create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/api/retries.spec.js/payload.ts create mode 100644 packages/cypress-cloud/lib/__tests__/fixtures/api/skipped.spec.js/payload.ts create mode 100644 packages/cypress-cloud/lib/cypress.types/README.md create mode 100644 packages/cypress-cloud/lib/debug-data.ts create mode 100644 packages/cypress-cloud/lib/listener.ts delete mode 100644 packages/cypress-cloud/lib/results/__tests__/mapResults.test.ts create mode 100644 packages/cypress-cloud/lib/state/global.ts create mode 100644 packages/cypress-cloud/lib/warnings.ts diff --git a/examples/webapp/afterSpec_12.17.4_cypress_e2e_crash.spec.js.json b/examples/webapp/afterSpec_12.17.4_cypress_e2e_crash.spec.js.json deleted file mode 100644 index 0e8c58f..0000000 --- a/examples/webapp/afterSpec_12.17.4_cypress_e2e_crash.spec.js.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "error": "Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at alreadyWritten (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:714:8)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:802:19\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.", - "stats": { - "failures": 1, - "tests": 0, - "passes": 0, - "pending": 0, - "suites": 0, - "skipped": 0, - "wallClockDuration": 0, - "wallClockStartedAt": "2023-09-14T22:17:32.278Z", - "wallClockEndedAt": "2023-09-14T22:17:32.278Z" - }, - "hooks": null, - "tests": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/crash.spec.js.mp4", - "screenshots": [], - "reporterStats": null, - "spec": { - "fileExtension": ".js", - "baseName": "crash.spec.js", - "fileName": "crash", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "crash.spec.js", - "specType": "integration", - "name": "cypress/e2e/crash.spec.js", - "relative": "cypress/e2e/crash.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/crash.spec.js" - } -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_12.17.4_cypress_e2e_failed.spec.js.json b/examples/webapp/afterSpec_12.17.4_cypress_e2e_failed.spec.js.json deleted file mode 100644 index d49e196..0000000 --- a/examples/webapp/afterSpec_12.17.4_cypress_e2e_failed.spec.js.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "stats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 0, - "skipped": 0, - "failures": 1, - "wallClockStartedAt": "2023-09-14T22:17:37.629Z", - "wallClockEndedAt": "2023-09-14T22:17:38.225Z", - "wallClockDuration": 596 - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 0, - "failures": 1, - "start": "2023-09-14T22:17:37.630Z", - "end": "2023-09-14T22:17:38.227Z", - "duration": 597 - }, - "hooks": [ - { - "hookId": "h1", - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}" - }, - { - "hookId": "h2", - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "function () {\n cy.visit(\"/\");\n}" - }, - { - "hookId": "h4", - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }" - }, - { - "hookId": "h5", - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}" - }, - { - "hookId": "h3", - "hookName": "after all", - "title": [ - "\"after all\" hook" - ], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "testId": "r3", - "title": [ - "Failed", - "should fail" - ], - "state": "failed", - "body": "function () {\n expect(fail).to.be.true;\n }", - "displayError": "ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)", - "attempts": [ - { - "state": "failed", - "error": { - "name": "ReferenceError", - "message": "fail is not defined", - "stack": " at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)", - "codeFrame": { - "line": 3, - "column": 12, - "originalFile": "cypress/e2e/failed.spec.js", - "relativeFile": "examples/webapp/cypress/e2e/failed.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js", - "frame": " 1 | describe(\"Failed\", function () {\n 2 | it(\"should fail\", function () {\n> 3 | expect(fail).to.be.true;\n | ^\n 4 | });\n 5 | });\n 6 | ", - "language": "js" - } - }, - "timings": { - "lifecycle": 22, - "before each": [ - { - "hookId": "h1", - "fnDuration": 10, - "afterFnDuration": 0 - }, - { - "hookId": "h2", - "fnDuration": 294, - "afterFnDuration": 0 - } - ], - "test": { - "fnDuration": 1, - "afterFnDuration": 216 - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": 12, - "afterFnDuration": 0 - }, - { - "hookId": "h5", - "fnDuration": 4, - "afterFnDuration": 0 - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": 4, - "afterFnDuration": 0 - } - ] - }, - "failedFromHookId": null, - "wallClockStartedAt": "2023-09-14T22:17:37.645Z", - "wallClockDuration": 566, - "videoTimestamp": 1972 - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/failed.spec.js.mp4", - "screenshots": [ - { - "screenshotId": "39467", - "name": null, - "testId": "r3", - "testAttemptIndex": 0, - "takenAt": "2023-09-14T22:17:37.974Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png", - "height": 1440, - "width": 2560 - } - ], - "spec": { - "fileExtension": ".js", - "baseName": "failed.spec.js", - "fileName": "failed", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "failed.spec.js", - "specType": "integration", - "name": "cypress/e2e/failed.spec.js", - "relative": "cypress/e2e/failed.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js" - } -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_12.17.4_cypress_e2e_passed.spec.js.json b/examples/webapp/afterSpec_12.17.4_cypress_e2e_passed.spec.js.json deleted file mode 100644 index c556de4..0000000 --- a/examples/webapp/afterSpec_12.17.4_cypress_e2e_passed.spec.js.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "stats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "skipped": 0, - "failures": 0, - "wallClockStartedAt": "2023-09-14T22:17:43.856Z", - "wallClockEndedAt": "2023-09-14T22:17:44.917Z", - "wallClockDuration": 1061 - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "failures": 0, - "start": "2023-09-14T22:17:43.857Z", - "end": "2023-09-14T22:17:44.919Z", - "duration": 1062 - }, - "hooks": [ - { - "hookId": "h1", - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}" - }, - { - "hookId": "h2", - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "function () {\n cy.visit(\"/\");\n}" - }, - { - "hookId": "h4", - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }" - }, - { - "hookId": "h5", - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}" - }, - { - "hookId": "h3", - "hookName": "after all", - "title": [ - "\"after all\" hook" - ], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "testId": "r3", - "title": [ - "Passed", - "should pass" - ], - "state": "passed", - "body": "function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }", - "displayError": null, - "attempts": [ - { - "state": "passed", - "error": null, - "timings": { - "lifecycle": 31, - "before each": [ - { - "hookId": "h1", - "fnDuration": 8, - "afterFnDuration": 0 - }, - { - "hookId": "h2", - "fnDuration": 289, - "afterFnDuration": 0 - } - ], - "test": { - "fnDuration": 696, - "afterFnDuration": 0 - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": 13, - "afterFnDuration": 0 - }, - { - "hookId": "h5", - "fnDuration": 4, - "afterFnDuration": 0 - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": 4, - "afterFnDuration": 0 - } - ] - }, - "failedFromHookId": null, - "wallClockStartedAt": "2023-09-14T22:17:43.860Z", - "wallClockDuration": 1055, - "videoTimestamp": 1974 - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4", - "screenshots": [ - { - "screenshotId": "1kqvz", - "name": null, - "testId": "r3", - "testAttemptIndex": 0, - "takenAt": "2023-09-14T22:17:44.346Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png", - "height": 1320, - "width": 2000 - } - ], - "spec": { - "fileExtension": ".js", - "baseName": "passed.spec.js", - "fileName": "passed", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "passed.spec.js", - "specType": "integration", - "name": "cypress/e2e/passed.spec.js", - "relative": "cypress/e2e/passed.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js" - } -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_12.17.4_cypress_e2e_pending.spec.js.json b/examples/webapp/afterSpec_12.17.4_cypress_e2e_pending.spec.js.json deleted file mode 100644 index e53c35d..0000000 --- a/examples/webapp/afterSpec_12.17.4_cypress_e2e_pending.spec.js.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "stats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 1, - "skipped": 0, - "failures": 0, - "wallClockStartedAt": "2023-09-14T22:17:50.523Z", - "wallClockEndedAt": "2023-09-14T22:17:50.567Z", - "wallClockDuration": 44 - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 1, - "failures": 0, - "start": "2023-09-14T22:17:50.524Z", - "end": "2023-09-14T22:17:50.569Z", - "duration": 45 - }, - "hooks": [ - { - "hookId": "h3", - "hookName": "after all", - "title": [ - "\"after all\" hook" - ], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "testId": "r3", - "title": [ - "Pending", - "Pending test" - ], - "state": "pending", - "body": "() => {\n expect(true).to.be.true;\n }", - "displayError": null, - "attempts": [ - { - "state": "pending", - "error": null, - "timings": { - "lifecycle": 31, - "after all": [ - { - "hookId": "h3", - "fnDuration": 7, - "afterFnDuration": 0 - } - ] - }, - "failedFromHookId": null, - "wallClockStartedAt": "2023-09-14T22:17:50.527Z", - "wallClockDuration": 39, - "videoTimestamp": 1931 - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/pending.spec.js.mp4", - "screenshots": [], - "spec": { - "fileExtension": ".js", - "baseName": "pending.spec.js", - "fileName": "pending", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "pending.spec.js", - "specType": "integration", - "name": "cypress/e2e/pending.spec.js", - "relative": "cypress/e2e/pending.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js" - } -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_12.17.4_cypress_e2e_retries.spec.js.json b/examples/webapp/afterSpec_12.17.4_cypress_e2e_retries.spec.js.json deleted file mode 100644 index 5eb5d85..0000000 --- a/examples/webapp/afterSpec_12.17.4_cypress_e2e_retries.spec.js.json +++ /dev/null @@ -1,265 +0,0 @@ -{ - "stats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "skipped": 0, - "failures": 0, - "wallClockStartedAt": "2023-09-14T22:17:55.758Z", - "wallClockEndedAt": "2023-09-14T22:17:56.791Z", - "wallClockDuration": 1033 - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "failures": 0, - "start": "2023-09-14T22:17:55.759Z", - "end": "2023-09-14T22:17:56.794Z", - "duration": 1035 - }, - "hooks": [ - { - "hookId": "h1", - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}" - }, - { - "hookId": "h2", - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "function () {\n cy.visit(\"/\");\n}" - }, - { - "hookId": "h4", - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }" - }, - { - "hookId": "h5", - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}" - }, - { - "hookId": "h3", - "hookName": "after all", - "title": [ - "\"after all\" hook" - ], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "testId": "r3", - "title": [ - "Retries", - "Runs a test with retries" - ], - "state": "passed", - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "displayError": null, - "attempts": [ - { - "state": "failed", - "error": { - "name": "Error", - "message": "oh no!", - "stack": " at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)", - "codeFrame": { - "line": 11, - "column": 15, - "originalFile": "cypress/e2e/retries.spec.js", - "relativeFile": "examples/webapp/cypress/e2e/retries.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", - "frame": " 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }", - "language": "js" - } - }, - "timings": { - "lifecycle": 33, - "before each": [ - { - "hookId": "h1", - "fnDuration": 8, - "afterFnDuration": 1 - }, - { - "hookId": "h2", - "fnDuration": 305, - "afterFnDuration": 0 - } - ], - "test": { - "fnDuration": 1, - "afterFnDuration": 233 - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": 25, - "afterFnDuration": 0 - }, - { - "hookId": "h5", - "fnDuration": 4, - "afterFnDuration": 0 - } - ] - }, - "failedFromHookId": null, - "wallClockStartedAt": "2023-09-14T22:17:55.761Z", - "wallClockDuration": 612, - "videoTimestamp": 1935 - }, - { - "state": "failed", - "error": { - "name": "Error", - "message": "oh no!", - "stack": " at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)", - "codeFrame": { - "line": 11, - "column": 15, - "originalFile": "cypress/e2e/retries.spec.js", - "relativeFile": "examples/webapp/cypress/e2e/retries.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", - "frame": " 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }", - "language": "js" - } - }, - "timings": { - "lifecycle": 22, - "before each": [ - { - "hookId": "h1", - "fnDuration": 3, - "afterFnDuration": 0 - }, - { - "hookId": "h2", - "fnDuration": 50, - "afterFnDuration": 0 - } - ], - "test": { - "fnDuration": 0, - "afterFnDuration": 188 - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": 13, - "afterFnDuration": 0 - }, - { - "hookId": "h5", - "fnDuration": 4, - "afterFnDuration": 0 - } - ] - }, - "failedFromHookId": null, - "wallClockStartedAt": "2023-09-14T22:17:56.389Z", - "wallClockDuration": 284, - "videoTimestamp": 2563 - }, - { - "state": "passed", - "error": null, - "timings": { - "lifecycle": 27, - "before each": [ - { - "hookId": "h1", - "fnDuration": 4, - "afterFnDuration": 0 - }, - { - "hookId": "h2", - "fnDuration": 42, - "afterFnDuration": 0 - } - ], - "test": { - "fnDuration": 0, - "afterFnDuration": 1 - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": 12, - "afterFnDuration": 0 - }, - { - "hookId": "h5", - "fnDuration": 3, - "afterFnDuration": 1 - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": 14, - "afterFnDuration": 0 - } - ] - }, - "failedFromHookId": null, - "wallClockStartedAt": "2023-09-14T22:17:56.683Z", - "wallClockDuration": 106, - "videoTimestamp": 2857 - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/retries.spec.js.mp4", - "screenshots": [ - { - "screenshotId": "fawp4", - "name": null, - "testId": "r3", - "testAttemptIndex": 0, - "takenAt": "2023-09-14T22:17:56.112Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png", - "height": 1440, - "width": 2560 - }, - { - "screenshotId": "ddqy0", - "name": null, - "testId": "r3", - "testAttemptIndex": 1, - "takenAt": "2023-09-14T22:17:56.469Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png", - "height": 1440, - "width": 2560 - } - ], - "spec": { - "fileExtension": ".js", - "baseName": "retries.spec.js", - "fileName": "retries", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "retries.spec.js", - "specType": "integration", - "name": "cypress/e2e/retries.spec.js", - "relative": "cypress/e2e/retries.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js" - } -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_13.2.0_crash.spec.js.json b/examples/webapp/afterSpec_13.2.0_crash.spec.js.json deleted file mode 100644 index ffd3254..0000000 --- a/examples/webapp/afterSpec_13.2.0_crash.spec.js.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "error": "Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:736:33\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:143:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:143:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:143:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:61:14\n at FSReqCallback.oncomplete (node:fs:198:23)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.", - "reporterStats": null, - "screenshots": [], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/crash.spec.js", - "fileExtension": ".js", - "fileName": "crash", - "name": "crash.spec.js", - "relative": "cypress/e2e/crash.spec.js" - }, - "stats": { - "duration": 0, - "endedAt": "2023-09-14T22:41:56.999Z", - "failures": 1, - "passes": 0, - "pending": 0, - "skipped": 0, - "startedAt": "2023-09-14T22:41:56.999Z", - "suites": 0, - "tests": 0 - }, - "tests": [], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/crash.spec.js.mp4" -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_13.2.0_failed.spec.js.json b/examples/webapp/afterSpec_13.2.0_failed.spec.js.json deleted file mode 100644 index 846677a..0000000 --- a/examples/webapp/afterSpec_13.2.0_failed.spec.js.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "error": null, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 0, - "failures": 1, - "start": "2023-09-14T22:42:02.057Z", - "end": "2023-09-14T22:42:02.965Z", - "duration": 908 - }, - "screenshots": [ - { - "height": 1440, - "name": null, - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png", - "takenAt": "2023-09-14T22:42:02.693Z", - "width": 2560 - } - ], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js", - "fileExtension": ".js", - "fileName": "failed", - "name": "failed.spec.js", - "relative": "cypress/e2e/failed.spec.js" - }, - "stats": { - "duration": 910, - "endedAt": "2023-09-14T22:42:02.964Z", - "failures": 1, - "passes": 0, - "pending": 0, - "skipped": 0, - "startedAt": "2023-09-14T22:42:02.054Z", - "suites": 1, - "tests": 1 - }, - "tests": [ - { - "attempts": [ - { - "state": "failed" - } - ], - "displayError": "ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)", - "duration": 893, - "state": "failed", - "title": [ - "Failed", - "should fail" - ] - } - ], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/failed.spec.js.mp4" -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_13.2.0_passed.spec.js.json b/examples/webapp/afterSpec_13.2.0_passed.spec.js.json deleted file mode 100644 index 1c7a46c..0000000 --- a/examples/webapp/afterSpec_13.2.0_passed.spec.js.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "error": null, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "failures": 0, - "start": "2023-09-14T22:42:08.057Z", - "end": "2023-09-14T22:42:09.106Z", - "duration": 1049 - }, - "screenshots": [ - { - "height": 1320, - "name": null, - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png", - "takenAt": "2023-09-14T22:42:08.456Z", - "width": 2000 - } - ], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js", - "fileExtension": ".js", - "fileName": "passed", - "name": "passed.spec.js", - "relative": "cypress/e2e/passed.spec.js" - }, - "stats": { - "duration": 1052, - "endedAt": "2023-09-14T22:42:09.105Z", - "failures": 0, - "passes": 1, - "pending": 0, - "skipped": 0, - "startedAt": "2023-09-14T22:42:08.053Z", - "suites": 1, - "tests": 1 - }, - "tests": [ - { - "attempts": [ - { - "state": "passed" - } - ], - "displayError": null, - "duration": 1047, - "state": "passed", - "title": [ - "Passed", - "should pass" - ] - } - ], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4" -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_13.2.0_pending.spec.js.json b/examples/webapp/afterSpec_13.2.0_pending.spec.js.json deleted file mode 100644 index 3a80603..0000000 --- a/examples/webapp/afterSpec_13.2.0_pending.spec.js.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "error": null, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 1, - "failures": 0, - "start": "2023-09-14T22:42:14.158Z", - "end": "2023-09-14T22:42:14.202Z", - "duration": 44 - }, - "screenshots": [], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js", - "fileExtension": ".js", - "fileName": "pending", - "name": "pending.spec.js", - "relative": "cypress/e2e/pending.spec.js" - }, - "stats": { - "duration": 45, - "endedAt": "2023-09-14T22:42:14.200Z", - "failures": 0, - "passes": 0, - "pending": 1, - "skipped": 0, - "startedAt": "2023-09-14T22:42:14.155Z", - "suites": 1, - "tests": 1 - }, - "tests": [ - { - "attempts": [ - { - "state": "pending" - } - ], - "displayError": null, - "duration": 26, - "state": "pending", - "title": [ - "Pending", - "Pending test" - ] - } - ], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/pending.spec.js.mp4" -} \ No newline at end of file diff --git a/examples/webapp/afterSpec_13.2.0_skipped.spec.js.json b/examples/webapp/afterSpec_13.2.0_skipped.spec.js.json deleted file mode 100644 index a3b8098..0000000 --- a/examples/webapp/afterSpec_13.2.0_skipped.spec.js.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "error": null, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 0, - "failures": 1, - "start": "2023-09-14T22:42:25.625Z", - "end": "2023-09-14T22:42:26.233Z", - "duration": 608 - }, - "screenshots": [ - { - "height": 1440, - "name": null, - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png", - "takenAt": "2023-09-14T22:42:25.939Z", - "width": 2560 - } - ], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js", - "fileExtension": ".js", - "fileName": "skipped", - "name": "skipped.spec.js", - "relative": "cypress/e2e/skipped.spec.js" - }, - "stats": { - "duration": 609, - "endedAt": "2023-09-14T22:42:26.231Z", - "failures": 1, - "passes": 0, - "pending": 0, - "skipped": 1, - "startedAt": "2023-09-14T22:42:25.622Z", - "suites": 1, - "tests": 2 - }, - "tests": [ - { - "attempts": [ - { - "state": "failed" - } - ], - "displayError": "Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)", - "duration": 562, - "state": "failed", - "title": [ - "Skipped", - "should not be skipped" - ] - }, - { - "attempts": [ - { - "state": "skipped" - } - ], - "displayError": null, - "duration": 0, - "state": "skipped", - "title": [ - "Skipped", - "should be skipped" - ] - } - ], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/skipped.spec.js.mp4" -} \ No newline at end of file diff --git a/examples/webapp/afterTest_12.17.4_Passed_should pass_0.json b/examples/webapp/afterTest_12.17.4_Passed_should pass_0.json deleted file mode 100644 index fd001e5..0000000 --- a/examples/webapp/afterTest_12.17.4_Passed_should pass_0.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "async": 0, - "body": "function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }", - "currentRetry": 0, - "duration": 1026, - "fullTitle": "Passed should pass", - "hooks": [], - "id": "r3", - "invocationDetails": { - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js", - "column": 2, - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js", - "function": "Suite.eval", - "line": 2, - "originalFile": "webpack://web/./cypress/e2e/passed.spec.js", - "relativeFile": "cypress/e2e/passed.spec.js", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:18:12)\n at eval ()", - "whitespace": " " - }, - "order": 1, - "pending": false, - "retries": 0, - "state": "passed", - "sync": true, - "timedOut": false, - "timings": { - "after each": [ - { - "afterFnDuration": 0, - "fnDuration": 13, - "hookId": "h4" - } - ], - "before each": [ - { - "afterFnDuration": 0, - "fnDuration": 8, - "hookId": "h1" - }, - { - "afterFnDuration": 0, - "fnDuration": 289, - "hookId": "h2" - } - ], - "lifecycle": 31, - "test": { - "afterFnDuration": 0, - "fnDuration": 696 - } - }, - "title": "should pass", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:43.860Z" -} diff --git a/examples/webapp/afterTest_13.2.0_Passed_should pass_0.json b/examples/webapp/afterTest_13.2.0_Passed_should pass_0.json deleted file mode 100644 index 9f180d4..0000000 --- a/examples/webapp/afterTest_13.2.0_Passed_should pass_0.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "async": false, - "body": "function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }", - "currentRetry": 0, - "duration": 1011, - "final": false, - "fullTitle": "Passed should pass", - "hooks": [], - "id": "r3", - "invocationDetails": { - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js", - "column": 2, - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js", - "function": "Suite.eval", - "line": 2, - "originalFile": "webpack://web/./cypress/e2e/passed.spec.js", - "relativeFile": "cypress/e2e/passed.spec.js", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:18:12)\n at eval ()", - "whitespace": " " - }, - "order": 1, - "pending": false, - "retries": 0, - "state": "passed", - "sync": true, - "timedOut": false, - "timings": { - "after each": [ - { - "afterFnDuration": 0, - "fnDuration": 13, - "hookId": "h4" - } - ], - "before each": [ - { - "afterFnDuration": 1, - "fnDuration": 8, - "hookId": "h1" - }, - { - "afterFnDuration": 0, - "fnDuration": 296, - "hookId": "h2" - } - ], - "lifecycle": 23, - "test": { - "afterFnDuration": 0, - "fnDuration": 682 - } - }, - "title": "should pass", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:42:08.057Z" -} diff --git a/examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_2.json b/examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_2.json deleted file mode 100644 index 3a06fd4..0000000 --- a/examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_2.json +++ /dev/null @@ -1 +0,0 @@ -{"async":false,"body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","duration":102,"final":false,"id":"r3","order":1,"pending":false,"retries":3,"state":"passed","sync":true,"timedOut":false,"timings":{"lifecycle":26,"before each":[{"hookId":"h1","fnDuration":20,"afterFnDuration":0},{"hookId":"h2","fnDuration":54,"afterFnDuration":0}],"test":{"fnDuration":0,"afterFnDuration":0},"after each":[{"hookId":"h4","fnDuration":15,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-14T22:42:20.319Z","title":"Runs a test with retries","currentRetry":2,"fullTitle":"Retries Runs a test with retries"} \ No newline at end of file diff --git a/examples/webapp/beforeTest_12.17.4_Failed_should fail_0.json b/examples/webapp/beforeTest_12.17.4_Failed_should fail_0.json deleted file mode 100644 index 841347a..0000000 --- a/examples/webapp/beforeTest_12.17.4_Failed_should fail_0.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "async": 0, - "body": "function () {\n expect(fail).to.be.true;\n }", - "currentRetry": 0, - "fullTitle": "Failed should fail", - "hooks": [], - "id": "r3", - "invocationDetails": { - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js", - "column": 2, - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js", - "function": "Suite.eval", - "line": 2, - "originalFile": "webpack://web/./cypress/e2e/failed.spec.js", - "relativeFile": "cypress/e2e/failed.spec.js", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:14:12)\n at eval ()", - "whitespace": " " - }, - "order": 1, - "pending": false, - "retries": 0, - "sync": true, - "timedOut": false, - "timings": { - "lifecycle": 22 - }, - "title": "should fail", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:37.645Z" -} diff --git a/examples/webapp/beforeTest_12.17.4_Passed_should pass_0.json b/examples/webapp/beforeTest_12.17.4_Passed_should pass_0.json deleted file mode 100644 index 84466d4..0000000 --- a/examples/webapp/beforeTest_12.17.4_Passed_should pass_0.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "async": 0, - "body": "function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }", - "hooks": [], - "id": "r3", - "invocationDetails": { - "function": "Suite.eval", - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js", - "originalFile": "webpack://web/./cypress/e2e/passed.spec.js", - "relativeFile": "cypress/e2e/passed.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js", - "line": 2, - "column": 2, - "whitespace": " ", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:18:12)\n at eval ()" - }, - "order": 1, - "pending": false, - "retries": 0, - "sync": true, - "timedOut": false, - "timings": { "lifecycle": 31 }, - "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:43.860Z", - "title": "should pass", - "currentRetry": 0, - "fullTitle": "Passed should pass" -} diff --git a/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_0.json b/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_0.json deleted file mode 100644 index 24293de..0000000 --- a/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_0.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "async": 0, - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "hooks": [], - "id": "r3", - "invocationDetails": { - "function": "Suite.eval", - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js", - "originalFile": "webpack://web/./cypress/e2e/retries.spec.js", - "relativeFile": "cypress/e2e/retries.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", - "line": 3, - "column": 2, - "whitespace": " ", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:11:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:10:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:21:12)\n at eval ()" - }, - "order": 1, - "pending": false, - "retries": 3, - "sync": true, - "timedOut": false, - "timings": { "lifecycle": 33 }, - "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:55.761Z", - "title": "Runs a test with retries", - "currentRetry": 0, - "fullTitle": "Retries Runs a test with retries" -} diff --git a/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_1.json b/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_1.json deleted file mode 100644 index bc7984b..0000000 --- a/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_1.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "async": 0, - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "currentRetry": 1, - "fullTitle": "Retries Runs a test with retries", - "id": "r3", - "order": 1, - "pending": false, - "retries": 3, - "sync": true, - "timedOut": false, - "timings": { - "lifecycle": 22 - }, - "title": "Runs a test with retries", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:56.389Z" -} diff --git a/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_2.json b/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_2.json deleted file mode 100644 index ac14506..0000000 --- a/examples/webapp/beforeTest_12.17.4_Retries_Runs a test with retries_2.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "async": 0, - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "currentRetry": 2, - "fullTitle": "Retries Runs a test with retries", - "id": "r3", - "order": 1, - "pending": false, - "retries": 3, - "sync": true, - "timedOut": false, - "timings": { - "lifecycle": 27 - }, - "title": "Runs a test with retries", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:56.683Z" -} diff --git a/examples/webapp/beforeTest_12.17.4_Skipped_should not be skipped_0.json b/examples/webapp/beforeTest_12.17.4_Skipped_should not be skipped_0.json deleted file mode 100644 index 72b6073..0000000 --- a/examples/webapp/beforeTest_12.17.4_Skipped_should not be skipped_0.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "async": 0, - "body": "function () {\n expect(true).to.be.true;\n }", - "hooks": [], - "id": "r3", - "invocationDetails": { - "function": "Suite.eval", - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js", - "originalFile": "webpack://web/./cypress/e2e/skipped.spec.js", - "relativeFile": "cypress/e2e/skipped.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js", - "line": 5, - "column": 2, - "whitespace": " ", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:13:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:20:12)\n at eval ()" - }, - "order": 1, - "pending": false, - "retries": 0, - "sync": true, - "timedOut": false, - "timings": { "lifecycle": 34 }, - "type": "test", - "wallClockStartedAt": "2023-09-14T22:18:02.462Z", - "title": "should not be skipped", - "currentRetry": 0, - "fullTitle": "Skipped should not be skipped" -} diff --git a/examples/webapp/beforeTest_13.2.0_Failed_should fail_0.json b/examples/webapp/beforeTest_13.2.0_Failed_should fail_0.json deleted file mode 100644 index 2bd7f0f..0000000 --- a/examples/webapp/beforeTest_13.2.0_Failed_should fail_0.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "async": false, - "body": "function () {\n expect(fail).to.be.true;\n }", - "currentRetry": 0, - "final": false, - "fullTitle": "Failed should fail", - "hooks": [], - "id": "r3", - "invocationDetails": { - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js", - "column": 2, - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js", - "function": "Suite.eval", - "line": 2, - "originalFile": "webpack://web/./cypress/e2e/failed.spec.js", - "relativeFile": "cypress/e2e/failed.spec.js", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:14:12)\n at eval ()", - "whitespace": " " - }, - "order": 1, - "pending": false, - "retries": 0, - "sync": true, - "timedOut": false, - "timings": { - "lifecycle": 22 - }, - "title": "should fail", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:42:02.057Z" -} diff --git a/examples/webapp/beforeTest_13.2.0_Passed_should pass_0.json b/examples/webapp/beforeTest_13.2.0_Passed_should pass_0.json deleted file mode 100644 index fe0aaf6..0000000 --- a/examples/webapp/beforeTest_13.2.0_Passed_should pass_0.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "async": false, - "body": "function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }", - "currentRetry": 0, - "final": false, - "fullTitle": "Passed should pass", - "hooks": [], - "id": "r3", - "invocationDetails": { - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js", - "column": 2, - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js", - "function": "Suite.eval", - "line": 2, - "originalFile": "webpack://web/./cypress/e2e/passed.spec.js", - "relativeFile": "cypress/e2e/passed.spec.js", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:18:12)\n at eval ()", - "whitespace": " " - }, - "order": 1, - "pending": false, - "retries": 0, - "sync": true, - "timedOut": false, - "timings": { - "lifecycle": 23 - }, - "title": "should pass", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:42:08.057Z" -} diff --git a/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_0.json b/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_0.json deleted file mode 100644 index c15b3a0..0000000 --- a/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "async": false, - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "final": false, - "hooks": [], - "id": "r3", - "invocationDetails": { - "function": "Suite.eval", - "fileUrl": "https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js", - "originalFile": "webpack://web/./cypress/e2e/retries.spec.js", - "relativeFile": "cypress/e2e/retries.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", - "line": 3, - "column": 2, - "whitespace": " ", - "stack": "Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:11:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:10:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:21:12)\n at eval ()" - }, - "order": 1, - "pending": false, - "retries": 3, - "sync": true, - "timedOut": false, - "timings": { "lifecycle": 15 }, - "type": "test", - "wallClockStartedAt": "2023-09-14T22:42:19.307Z", - "title": "Runs a test with retries", - "currentRetry": 0, - "fullTitle": "Retries Runs a test with retries" -} diff --git a/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_1.json b/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_1.json deleted file mode 100644 index f7bf0e1..0000000 --- a/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "async": false, - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "final": false, - "id": "r3", - "order": 1, - "pending": false, - "retries": 3, - "sync": true, - "timedOut": false, - "timings": { "lifecycle": 25 }, - "type": "test", - "wallClockStartedAt": "2023-09-14T22:42:19.960Z", - "title": "Runs a test with retries", - "currentRetry": 1, - "fullTitle": "Retries Runs a test with retries" -} diff --git a/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_2.json b/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_2.json deleted file mode 100644 index ba8dccc..0000000 --- a/examples/webapp/beforeTest_13.2.0_Retries_Runs a test with retries_2.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "async": false, - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "currentRetry": 2, - "final": false, - "fullTitle": "Retries Runs a test with retries", - "id": "r3", - "order": 1, - "pending": false, - "retries": 3, - "sync": true, - "timedOut": false, - "timings": { - "lifecycle": 26 - }, - "title": "Runs a test with retries", - "type": "test", - "wallClockStartedAt": "2023-09-14T22:42:20.319Z" -} diff --git a/examples/webapp/beforeTest_13.2.0_Skipped_should not be skipped_0.json b/examples/webapp/beforeTest_13.2.0_Skipped_should not be skipped_0.json deleted file mode 100644 index 7e61671..0000000 --- a/examples/webapp/beforeTest_13.2.0_Skipped_should not be skipped_0.json +++ /dev/null @@ -1 +0,0 @@ -{"async":false,"body":"function () {\n expect(true).to.be.true;\n }","final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js","originalFile":"webpack://web/./cypress/e2e/skipped.spec.js","relativeFile":"cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","line":5,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:13:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:20:12)\n at eval ()"},"order":1,"pending":false,"retries":0,"sync":true,"timedOut":false,"timings":{"lifecycle":23},"type":"test","wallClockStartedAt":"2023-09-14T22:42:25.625Z","title":"should not be skipped","currentRetry":0,"fullTitle":"Skipped should not be skipped"} \ No newline at end of file diff --git a/examples/webapp/cypress/e2e_01/clear.spec.js b/examples/webapp/cypress/e2e_01/clear.spec.js deleted file mode 100644 index 95c5e51..0000000 --- a/examples/webapp/cypress/e2e_01/clear.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Clear completed button", function () { - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should display the correct text", function () { - cy.get("@todos").eq(0).find(".toggle").check(); - - cy.get(".clear-completed").contains("Clear completed"); - }); - - it("should remove completed items when clicked", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").click(); - cy.get("@todos").should("have.length", 2); - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should be hidden when there are no items that are completed", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").should("be.visible").click(); - - cy.get(".clear-completed").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/completed.spec.js b/examples/webapp/cypress/e2e_01/completed.spec.js deleted file mode 100644 index 93330f7..0000000 --- a/examples/webapp/cypress/e2e_01/completed.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -context("Mark all as completed", function () { - // New commands used here: - // - cy.check https://on.cypress.io/api/check - // - cy.uncheck https://on.cypress.io/api/uncheck - - beforeEach(function () { - // This is an example of aliasing - // within a hook (beforeEach). - // Aliases will automatically persist - // between hooks and are available - // in your tests below - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to mark all items as completed", function () { - // complete all todos - // we use 'check' instead of 'click' - // because that indicates our intention much clearer - cy.get(".toggle-all").check(); - - // get each todo li and ensure its class is 'completed' - cy.get("@todos").eq(0).should("have.class", "completed"); - - cy.get("@todos").eq(1).should("have.class", "completed"); - - cy.get("@todos").eq(2).should("have.class", "completed"); - }); - - it("should allow me to clear the complete state of all items", function () { - // check and then immediately uncheck - cy.get(".toggle-all").check().uncheck(); - - cy.get("@todos").eq(0).should("not.have.class", "completed"); - - cy.get("@todos").eq(1).should("not.have.class", "completed"); - - cy.get("@todos").eq(2).should("not.have.class", "completed"); - }); - - it("complete all checkbox should update state when items are completed / cleared", function () { - // alias the .toggle-all for reuse later - cy.get(".toggle-all") - .as("toggleAll") - .check() - // this assertion is silly here IMO but - // it is what TodoMVC does - .should("be.checked"); - - // alias the first todo and then click it - cy.get(".todo-list li").eq(0).as("firstTodo").find(".toggle").uncheck(); - - // reference the .toggle-all element again - // and make sure its not checked - cy.get("@toggleAll").should("not.be.checked"); - - // reference the first todo again and now toggle it - cy.get("@firstTodo").find(".toggle").check(); - - // assert the toggle all is checked again - cy.get("@toggleAll").should("be.checked"); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/counter.spec.js b/examples/webapp/cypress/e2e_01/counter.spec.js deleted file mode 100644 index e1384e5..0000000 --- a/examples/webapp/cypress/e2e_01/counter.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Counter", function () { - it("should display the current number of todo items", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".todo-count").contains("1 item left"); - cy.createTodo(TODO_ITEM_TWO); - cy.get(".todo-count").contains("2 items left"); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/edit.spec.js b/examples/webapp/cypress/e2e_01/edit.spec.js deleted file mode 100644 index 8b89162..0000000 --- a/examples/webapp/cypress/e2e_01/edit.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Editing", function () { - // New commands used here: - // - cy.blur https://on.cypress.io/api/blur - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should hide other controls when editing", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".toggle").should("not.be.visible"); - - cy.get("@secondTodo").find("label").should("not.be.visible"); - }); - - it("should save edits on blur", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - // we can just send the blur event directly - // to the input instead of having to click - // on another button on the page. though you - // could do that its just more mental work - .blur(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should trim entered text", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type(" buy some sausages ") - .type("{enter}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should remove the item if an empty text string was entered", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("{enter}"); - - cy.get("@todos").should("have.length", 2); - }); - - it("should cancel edits on escape", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("foo{esc}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/item.spec.js b/examples/webapp/cypress/e2e_01/item.spec.js deleted file mode 100644 index 560c500..0000000 --- a/examples/webapp/cypress/e2e_01/item.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Item", function () { - // New commands used here: - // - cy.clear https://on.cypress.io/api/clear - - it("should allow me to mark items as complete", function () { - // we are aliasing the return value of - // our custom command 'createTodo' - // - // the return value is the
  • in the - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - - cy.get("@secondTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("have.class", "completed"); - }); - - it("should allow me to un-mark items as complete", function () { - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - - cy.get("@firstTodo").find(".toggle").uncheck(); - - cy.get("@firstTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - }); - - it("should allow me to edit an item", function () { - cy.createDefaultTodos().as("todos"); - - cy.get("@todos") - .eq(1) - .as("secondTodo") - // TODO: fix this, dblclick should - // have been issued to label - .find("label") - .dblclick(); - - // clear out the inputs current value - // and type a new value - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - .type("{enter}"); - - // explicitly assert about the text value - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/new.spec.js b/examples/webapp/cypress/e2e_01/new.spec.js deleted file mode 100644 index 78dc23f..0000000 --- a/examples/webapp/cypress/e2e_01/new.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("New Todo", function () { - // New commands used here: - // https://on.cypress.io/type - // https://on.cypress.io/eq - // https://on.cypress.io/find - // https://on.cypress.io/contains - // https://on.cypress.io/should - // https://on.cypress.io/as - - it("should allow me to add todo items", function () { - // create 1st todo - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - // make sure the 1st label contains the 1st todo text - cy.get(".todo-list li") - .eq(0) - .find("label") - .should("contain", TODO_ITEM_ONE); - - // create 2nd todo - cy.get(".new-todo").type(TODO_ITEM_TWO).type("{enter}"); - - // make sure the 2nd label contains the 2nd todo text - cy.get(".todo-list li") - .eq(1) - .find("label") - .should("contain", TODO_ITEM_TWO); - }); - - it("adds items", function () { - // create several todos then check the number of items in the list - cy.get(".new-todo") - .type("todo A{enter}") - .type("todo B{enter}") // we can continue working with same element - .type("todo C{enter}") // and keep adding new items - .type("todo D{enter}"); - - cy.get(".todo-list li").should("have.length", 4); - }); - - it("should clear text input field when an item is added", function () { - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - cy.get(".new-todo").should("have.text", ""); - }); - - it("should append new items to the bottom of the list", function () { - // this is an example of a custom command - // defined in cypress/support/commands.js - cy.createDefaultTodos().as("todos"); - - // even though the text content is split across - // multiple and elements - // `cy.contains` can verify this correctly - cy.get(".todo-count").contains("3 items left"); - - cy.get("@todos").eq(0).find("label").should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).find("label").should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).find("label").should("contain", TODO_ITEM_THREE); - }); - - it("should show #main and #footer when items added", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".main").should("be.visible"); - cy.get(".footer").should("be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/persistance.spec.js b/examples/webapp/cypress/e2e_01/persistance.spec.js deleted file mode 100644 index 6313a52..0000000 --- a/examples/webapp/cypress/e2e_01/persistance.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Persistence", function () { - it("should persist its data", function () { - // mimicking TodoMVC tests - // by writing out this function - function testState() { - cy.get("@firstTodo") - .should("contain", TODO_ITEM_ONE) - .and("have.class", "completed"); - - cy.get("@secondTodo") - .should("contain", TODO_ITEM_TWO) - .and("not.have.class", "completed"); - } - - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - cy.get("@firstTodo") - .find(".toggle") - .check() - .then(testState) - - .reload() - .then(testState); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/routing.spec.js b/examples/webapp/cypress/e2e_01/routing.spec.js deleted file mode 100644 index 9938908..0000000 --- a/examples/webapp/cypress/e2e_01/routing.spec.js +++ /dev/null @@ -1,69 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; -context("Routing", function () { - // New commands used here: - // https://on.cypress.io/window - // https://on.cypress.io/its - // https://on.cypress.io/invoke - // https://on.cypress.io/within - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to display active items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should respect the back button", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - cy.go("back"); - cy.get("@todos").should("have.length", 2); - cy.go("back"); - cy.get("@todos").should("have.length", 3); - }); - - it("should allow me to display completed items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - }); - - it("should allow me to display all items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get(".filters").contains("All").click(); - - cy.get("@todos").should("have.length", 3); - }); - - it("should highlight the currently applied filter", function () { - // using a within here which will automatically scope - // nested 'cy' queries to our parent element - cy.get(".filters").within(function () { - cy.contains("All").should("have.class", "selected"); - cy.contains("Active").click().should("have.class", "selected"); - - cy.contains("Completed").click().should("have.class", "selected"); - }); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/smoke.spec.js b/examples/webapp/cypress/e2e_01/smoke.spec.js deleted file mode 100644 index aceafe1..0000000 --- a/examples/webapp/cypress/e2e_01/smoke.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -// type definitions for Cypress object "cy" -/// - -describe("TodoMVC", function () { - // a very simple example helpful during presentations - it("adds 2 todos", function () { - cy.get(".new-todo").type("learn testing{enter}").type("be cool{enter}"); - - cy.get(".todo-list li").should("have.length", 2); - }); -}); diff --git a/examples/webapp/cypress/e2e_01/todo.no-items.spec.js b/examples/webapp/cypress/e2e_01/todo.no-items.spec.js deleted file mode 100644 index f7044a0..0000000 --- a/examples/webapp/cypress/e2e_01/todo.no-items.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -context("No Todos", function () { - it("should hide #main and #footer", function () { - // Unlike the TodoMVC tests, we don't need to create - // a gazillion helper functions which are difficult to - // parse through. Instead we'll opt to use real selectors - // so as to make our testing intentions as clear as possible. - // - // http://on.cypress.io/get - cy.get(".todo-list li").should("not.exist"); - cy.get('[data-layer="Content"]').should("not.exist"); - cy.get(".footer").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/clear.spec.js b/examples/webapp/cypress/e2e_02/clear.spec.js deleted file mode 100644 index 95c5e51..0000000 --- a/examples/webapp/cypress/e2e_02/clear.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Clear completed button", function () { - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should display the correct text", function () { - cy.get("@todos").eq(0).find(".toggle").check(); - - cy.get(".clear-completed").contains("Clear completed"); - }); - - it("should remove completed items when clicked", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").click(); - cy.get("@todos").should("have.length", 2); - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should be hidden when there are no items that are completed", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").should("be.visible").click(); - - cy.get(".clear-completed").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/completed.spec.js b/examples/webapp/cypress/e2e_02/completed.spec.js deleted file mode 100644 index 93330f7..0000000 --- a/examples/webapp/cypress/e2e_02/completed.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -context("Mark all as completed", function () { - // New commands used here: - // - cy.check https://on.cypress.io/api/check - // - cy.uncheck https://on.cypress.io/api/uncheck - - beforeEach(function () { - // This is an example of aliasing - // within a hook (beforeEach). - // Aliases will automatically persist - // between hooks and are available - // in your tests below - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to mark all items as completed", function () { - // complete all todos - // we use 'check' instead of 'click' - // because that indicates our intention much clearer - cy.get(".toggle-all").check(); - - // get each todo li and ensure its class is 'completed' - cy.get("@todos").eq(0).should("have.class", "completed"); - - cy.get("@todos").eq(1).should("have.class", "completed"); - - cy.get("@todos").eq(2).should("have.class", "completed"); - }); - - it("should allow me to clear the complete state of all items", function () { - // check and then immediately uncheck - cy.get(".toggle-all").check().uncheck(); - - cy.get("@todos").eq(0).should("not.have.class", "completed"); - - cy.get("@todos").eq(1).should("not.have.class", "completed"); - - cy.get("@todos").eq(2).should("not.have.class", "completed"); - }); - - it("complete all checkbox should update state when items are completed / cleared", function () { - // alias the .toggle-all for reuse later - cy.get(".toggle-all") - .as("toggleAll") - .check() - // this assertion is silly here IMO but - // it is what TodoMVC does - .should("be.checked"); - - // alias the first todo and then click it - cy.get(".todo-list li").eq(0).as("firstTodo").find(".toggle").uncheck(); - - // reference the .toggle-all element again - // and make sure its not checked - cy.get("@toggleAll").should("not.be.checked"); - - // reference the first todo again and now toggle it - cy.get("@firstTodo").find(".toggle").check(); - - // assert the toggle all is checked again - cy.get("@toggleAll").should("be.checked"); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/counter.spec.js b/examples/webapp/cypress/e2e_02/counter.spec.js deleted file mode 100644 index e1384e5..0000000 --- a/examples/webapp/cypress/e2e_02/counter.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Counter", function () { - it("should display the current number of todo items", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".todo-count").contains("1 item left"); - cy.createTodo(TODO_ITEM_TWO); - cy.get(".todo-count").contains("2 items left"); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/edit.spec.js b/examples/webapp/cypress/e2e_02/edit.spec.js deleted file mode 100644 index 8b89162..0000000 --- a/examples/webapp/cypress/e2e_02/edit.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Editing", function () { - // New commands used here: - // - cy.blur https://on.cypress.io/api/blur - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should hide other controls when editing", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".toggle").should("not.be.visible"); - - cy.get("@secondTodo").find("label").should("not.be.visible"); - }); - - it("should save edits on blur", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - // we can just send the blur event directly - // to the input instead of having to click - // on another button on the page. though you - // could do that its just more mental work - .blur(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should trim entered text", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type(" buy some sausages ") - .type("{enter}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should remove the item if an empty text string was entered", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("{enter}"); - - cy.get("@todos").should("have.length", 2); - }); - - it("should cancel edits on escape", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("foo{esc}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/item.spec.js b/examples/webapp/cypress/e2e_02/item.spec.js deleted file mode 100644 index 560c500..0000000 --- a/examples/webapp/cypress/e2e_02/item.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Item", function () { - // New commands used here: - // - cy.clear https://on.cypress.io/api/clear - - it("should allow me to mark items as complete", function () { - // we are aliasing the return value of - // our custom command 'createTodo' - // - // the return value is the
  • in the - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - - cy.get("@secondTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("have.class", "completed"); - }); - - it("should allow me to un-mark items as complete", function () { - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - - cy.get("@firstTodo").find(".toggle").uncheck(); - - cy.get("@firstTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - }); - - it("should allow me to edit an item", function () { - cy.createDefaultTodos().as("todos"); - - cy.get("@todos") - .eq(1) - .as("secondTodo") - // TODO: fix this, dblclick should - // have been issued to label - .find("label") - .dblclick(); - - // clear out the inputs current value - // and type a new value - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - .type("{enter}"); - - // explicitly assert about the text value - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/new.spec.js b/examples/webapp/cypress/e2e_02/new.spec.js deleted file mode 100644 index 78dc23f..0000000 --- a/examples/webapp/cypress/e2e_02/new.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("New Todo", function () { - // New commands used here: - // https://on.cypress.io/type - // https://on.cypress.io/eq - // https://on.cypress.io/find - // https://on.cypress.io/contains - // https://on.cypress.io/should - // https://on.cypress.io/as - - it("should allow me to add todo items", function () { - // create 1st todo - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - // make sure the 1st label contains the 1st todo text - cy.get(".todo-list li") - .eq(0) - .find("label") - .should("contain", TODO_ITEM_ONE); - - // create 2nd todo - cy.get(".new-todo").type(TODO_ITEM_TWO).type("{enter}"); - - // make sure the 2nd label contains the 2nd todo text - cy.get(".todo-list li") - .eq(1) - .find("label") - .should("contain", TODO_ITEM_TWO); - }); - - it("adds items", function () { - // create several todos then check the number of items in the list - cy.get(".new-todo") - .type("todo A{enter}") - .type("todo B{enter}") // we can continue working with same element - .type("todo C{enter}") // and keep adding new items - .type("todo D{enter}"); - - cy.get(".todo-list li").should("have.length", 4); - }); - - it("should clear text input field when an item is added", function () { - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - cy.get(".new-todo").should("have.text", ""); - }); - - it("should append new items to the bottom of the list", function () { - // this is an example of a custom command - // defined in cypress/support/commands.js - cy.createDefaultTodos().as("todos"); - - // even though the text content is split across - // multiple and elements - // `cy.contains` can verify this correctly - cy.get(".todo-count").contains("3 items left"); - - cy.get("@todos").eq(0).find("label").should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).find("label").should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).find("label").should("contain", TODO_ITEM_THREE); - }); - - it("should show #main and #footer when items added", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".main").should("be.visible"); - cy.get(".footer").should("be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/persistance.spec.js b/examples/webapp/cypress/e2e_02/persistance.spec.js deleted file mode 100644 index 6313a52..0000000 --- a/examples/webapp/cypress/e2e_02/persistance.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Persistence", function () { - it("should persist its data", function () { - // mimicking TodoMVC tests - // by writing out this function - function testState() { - cy.get("@firstTodo") - .should("contain", TODO_ITEM_ONE) - .and("have.class", "completed"); - - cy.get("@secondTodo") - .should("contain", TODO_ITEM_TWO) - .and("not.have.class", "completed"); - } - - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - cy.get("@firstTodo") - .find(".toggle") - .check() - .then(testState) - - .reload() - .then(testState); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/routing.spec.js b/examples/webapp/cypress/e2e_02/routing.spec.js deleted file mode 100644 index 9938908..0000000 --- a/examples/webapp/cypress/e2e_02/routing.spec.js +++ /dev/null @@ -1,69 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; -context("Routing", function () { - // New commands used here: - // https://on.cypress.io/window - // https://on.cypress.io/its - // https://on.cypress.io/invoke - // https://on.cypress.io/within - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to display active items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should respect the back button", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - cy.go("back"); - cy.get("@todos").should("have.length", 2); - cy.go("back"); - cy.get("@todos").should("have.length", 3); - }); - - it("should allow me to display completed items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - }); - - it("should allow me to display all items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get(".filters").contains("All").click(); - - cy.get("@todos").should("have.length", 3); - }); - - it("should highlight the currently applied filter", function () { - // using a within here which will automatically scope - // nested 'cy' queries to our parent element - cy.get(".filters").within(function () { - cy.contains("All").should("have.class", "selected"); - cy.contains("Active").click().should("have.class", "selected"); - - cy.contains("Completed").click().should("have.class", "selected"); - }); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/smoke.spec.js b/examples/webapp/cypress/e2e_02/smoke.spec.js deleted file mode 100644 index aceafe1..0000000 --- a/examples/webapp/cypress/e2e_02/smoke.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -// type definitions for Cypress object "cy" -/// - -describe("TodoMVC", function () { - // a very simple example helpful during presentations - it("adds 2 todos", function () { - cy.get(".new-todo").type("learn testing{enter}").type("be cool{enter}"); - - cy.get(".todo-list li").should("have.length", 2); - }); -}); diff --git a/examples/webapp/cypress/e2e_02/todo.no-items.spec.js b/examples/webapp/cypress/e2e_02/todo.no-items.spec.js deleted file mode 100644 index f7044a0..0000000 --- a/examples/webapp/cypress/e2e_02/todo.no-items.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -context("No Todos", function () { - it("should hide #main and #footer", function () { - // Unlike the TodoMVC tests, we don't need to create - // a gazillion helper functions which are difficult to - // parse through. Instead we'll opt to use real selectors - // so as to make our testing intentions as clear as possible. - // - // http://on.cypress.io/get - cy.get(".todo-list li").should("not.exist"); - cy.get('[data-layer="Content"]').should("not.exist"); - cy.get(".footer").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/clear.spec.js b/examples/webapp/cypress/e2e_03/clear.spec.js deleted file mode 100644 index 95c5e51..0000000 --- a/examples/webapp/cypress/e2e_03/clear.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Clear completed button", function () { - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should display the correct text", function () { - cy.get("@todos").eq(0).find(".toggle").check(); - - cy.get(".clear-completed").contains("Clear completed"); - }); - - it("should remove completed items when clicked", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").click(); - cy.get("@todos").should("have.length", 2); - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should be hidden when there are no items that are completed", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").should("be.visible").click(); - - cy.get(".clear-completed").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/completed.spec.js b/examples/webapp/cypress/e2e_03/completed.spec.js deleted file mode 100644 index 93330f7..0000000 --- a/examples/webapp/cypress/e2e_03/completed.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -context("Mark all as completed", function () { - // New commands used here: - // - cy.check https://on.cypress.io/api/check - // - cy.uncheck https://on.cypress.io/api/uncheck - - beforeEach(function () { - // This is an example of aliasing - // within a hook (beforeEach). - // Aliases will automatically persist - // between hooks and are available - // in your tests below - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to mark all items as completed", function () { - // complete all todos - // we use 'check' instead of 'click' - // because that indicates our intention much clearer - cy.get(".toggle-all").check(); - - // get each todo li and ensure its class is 'completed' - cy.get("@todos").eq(0).should("have.class", "completed"); - - cy.get("@todos").eq(1).should("have.class", "completed"); - - cy.get("@todos").eq(2).should("have.class", "completed"); - }); - - it("should allow me to clear the complete state of all items", function () { - // check and then immediately uncheck - cy.get(".toggle-all").check().uncheck(); - - cy.get("@todos").eq(0).should("not.have.class", "completed"); - - cy.get("@todos").eq(1).should("not.have.class", "completed"); - - cy.get("@todos").eq(2).should("not.have.class", "completed"); - }); - - it("complete all checkbox should update state when items are completed / cleared", function () { - // alias the .toggle-all for reuse later - cy.get(".toggle-all") - .as("toggleAll") - .check() - // this assertion is silly here IMO but - // it is what TodoMVC does - .should("be.checked"); - - // alias the first todo and then click it - cy.get(".todo-list li").eq(0).as("firstTodo").find(".toggle").uncheck(); - - // reference the .toggle-all element again - // and make sure its not checked - cy.get("@toggleAll").should("not.be.checked"); - - // reference the first todo again and now toggle it - cy.get("@firstTodo").find(".toggle").check(); - - // assert the toggle all is checked again - cy.get("@toggleAll").should("be.checked"); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/counter.spec.js b/examples/webapp/cypress/e2e_03/counter.spec.js deleted file mode 100644 index e1384e5..0000000 --- a/examples/webapp/cypress/e2e_03/counter.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Counter", function () { - it("should display the current number of todo items", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".todo-count").contains("1 item left"); - cy.createTodo(TODO_ITEM_TWO); - cy.get(".todo-count").contains("2 items left"); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/edit.spec.js b/examples/webapp/cypress/e2e_03/edit.spec.js deleted file mode 100644 index 8b89162..0000000 --- a/examples/webapp/cypress/e2e_03/edit.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Editing", function () { - // New commands used here: - // - cy.blur https://on.cypress.io/api/blur - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should hide other controls when editing", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".toggle").should("not.be.visible"); - - cy.get("@secondTodo").find("label").should("not.be.visible"); - }); - - it("should save edits on blur", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - // we can just send the blur event directly - // to the input instead of having to click - // on another button on the page. though you - // could do that its just more mental work - .blur(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should trim entered text", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type(" buy some sausages ") - .type("{enter}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should remove the item if an empty text string was entered", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("{enter}"); - - cy.get("@todos").should("have.length", 2); - }); - - it("should cancel edits on escape", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("foo{esc}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/item.spec.js b/examples/webapp/cypress/e2e_03/item.spec.js deleted file mode 100644 index 560c500..0000000 --- a/examples/webapp/cypress/e2e_03/item.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Item", function () { - // New commands used here: - // - cy.clear https://on.cypress.io/api/clear - - it("should allow me to mark items as complete", function () { - // we are aliasing the return value of - // our custom command 'createTodo' - // - // the return value is the
  • in the - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - - cy.get("@secondTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("have.class", "completed"); - }); - - it("should allow me to un-mark items as complete", function () { - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - - cy.get("@firstTodo").find(".toggle").uncheck(); - - cy.get("@firstTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - }); - - it("should allow me to edit an item", function () { - cy.createDefaultTodos().as("todos"); - - cy.get("@todos") - .eq(1) - .as("secondTodo") - // TODO: fix this, dblclick should - // have been issued to label - .find("label") - .dblclick(); - - // clear out the inputs current value - // and type a new value - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - .type("{enter}"); - - // explicitly assert about the text value - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/new.spec.js b/examples/webapp/cypress/e2e_03/new.spec.js deleted file mode 100644 index 78dc23f..0000000 --- a/examples/webapp/cypress/e2e_03/new.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("New Todo", function () { - // New commands used here: - // https://on.cypress.io/type - // https://on.cypress.io/eq - // https://on.cypress.io/find - // https://on.cypress.io/contains - // https://on.cypress.io/should - // https://on.cypress.io/as - - it("should allow me to add todo items", function () { - // create 1st todo - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - // make sure the 1st label contains the 1st todo text - cy.get(".todo-list li") - .eq(0) - .find("label") - .should("contain", TODO_ITEM_ONE); - - // create 2nd todo - cy.get(".new-todo").type(TODO_ITEM_TWO).type("{enter}"); - - // make sure the 2nd label contains the 2nd todo text - cy.get(".todo-list li") - .eq(1) - .find("label") - .should("contain", TODO_ITEM_TWO); - }); - - it("adds items", function () { - // create several todos then check the number of items in the list - cy.get(".new-todo") - .type("todo A{enter}") - .type("todo B{enter}") // we can continue working with same element - .type("todo C{enter}") // and keep adding new items - .type("todo D{enter}"); - - cy.get(".todo-list li").should("have.length", 4); - }); - - it("should clear text input field when an item is added", function () { - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - cy.get(".new-todo").should("have.text", ""); - }); - - it("should append new items to the bottom of the list", function () { - // this is an example of a custom command - // defined in cypress/support/commands.js - cy.createDefaultTodos().as("todos"); - - // even though the text content is split across - // multiple and elements - // `cy.contains` can verify this correctly - cy.get(".todo-count").contains("3 items left"); - - cy.get("@todos").eq(0).find("label").should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).find("label").should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).find("label").should("contain", TODO_ITEM_THREE); - }); - - it("should show #main and #footer when items added", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".main").should("be.visible"); - cy.get(".footer").should("be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/persistance.spec.js b/examples/webapp/cypress/e2e_03/persistance.spec.js deleted file mode 100644 index 6313a52..0000000 --- a/examples/webapp/cypress/e2e_03/persistance.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Persistence", function () { - it("should persist its data", function () { - // mimicking TodoMVC tests - // by writing out this function - function testState() { - cy.get("@firstTodo") - .should("contain", TODO_ITEM_ONE) - .and("have.class", "completed"); - - cy.get("@secondTodo") - .should("contain", TODO_ITEM_TWO) - .and("not.have.class", "completed"); - } - - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - cy.get("@firstTodo") - .find(".toggle") - .check() - .then(testState) - - .reload() - .then(testState); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/routing.spec.js b/examples/webapp/cypress/e2e_03/routing.spec.js deleted file mode 100644 index 9938908..0000000 --- a/examples/webapp/cypress/e2e_03/routing.spec.js +++ /dev/null @@ -1,69 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; -context("Routing", function () { - // New commands used here: - // https://on.cypress.io/window - // https://on.cypress.io/its - // https://on.cypress.io/invoke - // https://on.cypress.io/within - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to display active items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should respect the back button", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - cy.go("back"); - cy.get("@todos").should("have.length", 2); - cy.go("back"); - cy.get("@todos").should("have.length", 3); - }); - - it("should allow me to display completed items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - }); - - it("should allow me to display all items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get(".filters").contains("All").click(); - - cy.get("@todos").should("have.length", 3); - }); - - it("should highlight the currently applied filter", function () { - // using a within here which will automatically scope - // nested 'cy' queries to our parent element - cy.get(".filters").within(function () { - cy.contains("All").should("have.class", "selected"); - cy.contains("Active").click().should("have.class", "selected"); - - cy.contains("Completed").click().should("have.class", "selected"); - }); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/smoke.spec.js b/examples/webapp/cypress/e2e_03/smoke.spec.js deleted file mode 100644 index aceafe1..0000000 --- a/examples/webapp/cypress/e2e_03/smoke.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -// type definitions for Cypress object "cy" -/// - -describe("TodoMVC", function () { - // a very simple example helpful during presentations - it("adds 2 todos", function () { - cy.get(".new-todo").type("learn testing{enter}").type("be cool{enter}"); - - cy.get(".todo-list li").should("have.length", 2); - }); -}); diff --git a/examples/webapp/cypress/e2e_03/todo.no-items.spec.js b/examples/webapp/cypress/e2e_03/todo.no-items.spec.js deleted file mode 100644 index f7044a0..0000000 --- a/examples/webapp/cypress/e2e_03/todo.no-items.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -context("No Todos", function () { - it("should hide #main and #footer", function () { - // Unlike the TodoMVC tests, we don't need to create - // a gazillion helper functions which are difficult to - // parse through. Instead we'll opt to use real selectors - // so as to make our testing intentions as clear as possible. - // - // http://on.cypress.io/get - cy.get(".todo-list li").should("not.exist"); - cy.get('[data-layer="Content"]').should("not.exist"); - cy.get(".footer").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/clear.spec.js b/examples/webapp/cypress/e2e_04/clear.spec.js deleted file mode 100644 index 95c5e51..0000000 --- a/examples/webapp/cypress/e2e_04/clear.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Clear completed button", function () { - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should display the correct text", function () { - cy.get("@todos").eq(0).find(".toggle").check(); - - cy.get(".clear-completed").contains("Clear completed"); - }); - - it("should remove completed items when clicked", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").click(); - cy.get("@todos").should("have.length", 2); - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should be hidden when there are no items that are completed", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").should("be.visible").click(); - - cy.get(".clear-completed").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/completed.spec.js b/examples/webapp/cypress/e2e_04/completed.spec.js deleted file mode 100644 index 93330f7..0000000 --- a/examples/webapp/cypress/e2e_04/completed.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -context("Mark all as completed", function () { - // New commands used here: - // - cy.check https://on.cypress.io/api/check - // - cy.uncheck https://on.cypress.io/api/uncheck - - beforeEach(function () { - // This is an example of aliasing - // within a hook (beforeEach). - // Aliases will automatically persist - // between hooks and are available - // in your tests below - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to mark all items as completed", function () { - // complete all todos - // we use 'check' instead of 'click' - // because that indicates our intention much clearer - cy.get(".toggle-all").check(); - - // get each todo li and ensure its class is 'completed' - cy.get("@todos").eq(0).should("have.class", "completed"); - - cy.get("@todos").eq(1).should("have.class", "completed"); - - cy.get("@todos").eq(2).should("have.class", "completed"); - }); - - it("should allow me to clear the complete state of all items", function () { - // check and then immediately uncheck - cy.get(".toggle-all").check().uncheck(); - - cy.get("@todos").eq(0).should("not.have.class", "completed"); - - cy.get("@todos").eq(1).should("not.have.class", "completed"); - - cy.get("@todos").eq(2).should("not.have.class", "completed"); - }); - - it("complete all checkbox should update state when items are completed / cleared", function () { - // alias the .toggle-all for reuse later - cy.get(".toggle-all") - .as("toggleAll") - .check() - // this assertion is silly here IMO but - // it is what TodoMVC does - .should("be.checked"); - - // alias the first todo and then click it - cy.get(".todo-list li").eq(0).as("firstTodo").find(".toggle").uncheck(); - - // reference the .toggle-all element again - // and make sure its not checked - cy.get("@toggleAll").should("not.be.checked"); - - // reference the first todo again and now toggle it - cy.get("@firstTodo").find(".toggle").check(); - - // assert the toggle all is checked again - cy.get("@toggleAll").should("be.checked"); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/counter.spec.js b/examples/webapp/cypress/e2e_04/counter.spec.js deleted file mode 100644 index e1384e5..0000000 --- a/examples/webapp/cypress/e2e_04/counter.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Counter", function () { - it("should display the current number of todo items", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".todo-count").contains("1 item left"); - cy.createTodo(TODO_ITEM_TWO); - cy.get(".todo-count").contains("2 items left"); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/edit.spec.js b/examples/webapp/cypress/e2e_04/edit.spec.js deleted file mode 100644 index 8b89162..0000000 --- a/examples/webapp/cypress/e2e_04/edit.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Editing", function () { - // New commands used here: - // - cy.blur https://on.cypress.io/api/blur - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should hide other controls when editing", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".toggle").should("not.be.visible"); - - cy.get("@secondTodo").find("label").should("not.be.visible"); - }); - - it("should save edits on blur", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - // we can just send the blur event directly - // to the input instead of having to click - // on another button on the page. though you - // could do that its just more mental work - .blur(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should trim entered text", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type(" buy some sausages ") - .type("{enter}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should remove the item if an empty text string was entered", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("{enter}"); - - cy.get("@todos").should("have.length", 2); - }); - - it("should cancel edits on escape", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("foo{esc}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/item.spec.js b/examples/webapp/cypress/e2e_04/item.spec.js deleted file mode 100644 index 560c500..0000000 --- a/examples/webapp/cypress/e2e_04/item.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Item", function () { - // New commands used here: - // - cy.clear https://on.cypress.io/api/clear - - it("should allow me to mark items as complete", function () { - // we are aliasing the return value of - // our custom command 'createTodo' - // - // the return value is the
  • in the - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - - cy.get("@secondTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("have.class", "completed"); - }); - - it("should allow me to un-mark items as complete", function () { - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - - cy.get("@firstTodo").find(".toggle").uncheck(); - - cy.get("@firstTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - }); - - it("should allow me to edit an item", function () { - cy.createDefaultTodos().as("todos"); - - cy.get("@todos") - .eq(1) - .as("secondTodo") - // TODO: fix this, dblclick should - // have been issued to label - .find("label") - .dblclick(); - - // clear out the inputs current value - // and type a new value - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - .type("{enter}"); - - // explicitly assert about the text value - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/new.spec.js b/examples/webapp/cypress/e2e_04/new.spec.js deleted file mode 100644 index 78dc23f..0000000 --- a/examples/webapp/cypress/e2e_04/new.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("New Todo", function () { - // New commands used here: - // https://on.cypress.io/type - // https://on.cypress.io/eq - // https://on.cypress.io/find - // https://on.cypress.io/contains - // https://on.cypress.io/should - // https://on.cypress.io/as - - it("should allow me to add todo items", function () { - // create 1st todo - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - // make sure the 1st label contains the 1st todo text - cy.get(".todo-list li") - .eq(0) - .find("label") - .should("contain", TODO_ITEM_ONE); - - // create 2nd todo - cy.get(".new-todo").type(TODO_ITEM_TWO).type("{enter}"); - - // make sure the 2nd label contains the 2nd todo text - cy.get(".todo-list li") - .eq(1) - .find("label") - .should("contain", TODO_ITEM_TWO); - }); - - it("adds items", function () { - // create several todos then check the number of items in the list - cy.get(".new-todo") - .type("todo A{enter}") - .type("todo B{enter}") // we can continue working with same element - .type("todo C{enter}") // and keep adding new items - .type("todo D{enter}"); - - cy.get(".todo-list li").should("have.length", 4); - }); - - it("should clear text input field when an item is added", function () { - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - cy.get(".new-todo").should("have.text", ""); - }); - - it("should append new items to the bottom of the list", function () { - // this is an example of a custom command - // defined in cypress/support/commands.js - cy.createDefaultTodos().as("todos"); - - // even though the text content is split across - // multiple and elements - // `cy.contains` can verify this correctly - cy.get(".todo-count").contains("3 items left"); - - cy.get("@todos").eq(0).find("label").should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).find("label").should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).find("label").should("contain", TODO_ITEM_THREE); - }); - - it("should show #main and #footer when items added", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".main").should("be.visible"); - cy.get(".footer").should("be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/persistance.spec.js b/examples/webapp/cypress/e2e_04/persistance.spec.js deleted file mode 100644 index 6313a52..0000000 --- a/examples/webapp/cypress/e2e_04/persistance.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Persistence", function () { - it("should persist its data", function () { - // mimicking TodoMVC tests - // by writing out this function - function testState() { - cy.get("@firstTodo") - .should("contain", TODO_ITEM_ONE) - .and("have.class", "completed"); - - cy.get("@secondTodo") - .should("contain", TODO_ITEM_TWO) - .and("not.have.class", "completed"); - } - - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - cy.get("@firstTodo") - .find(".toggle") - .check() - .then(testState) - - .reload() - .then(testState); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/routing.spec.js b/examples/webapp/cypress/e2e_04/routing.spec.js deleted file mode 100644 index 9938908..0000000 --- a/examples/webapp/cypress/e2e_04/routing.spec.js +++ /dev/null @@ -1,69 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; -context("Routing", function () { - // New commands used here: - // https://on.cypress.io/window - // https://on.cypress.io/its - // https://on.cypress.io/invoke - // https://on.cypress.io/within - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to display active items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should respect the back button", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - cy.go("back"); - cy.get("@todos").should("have.length", 2); - cy.go("back"); - cy.get("@todos").should("have.length", 3); - }); - - it("should allow me to display completed items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - }); - - it("should allow me to display all items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get(".filters").contains("All").click(); - - cy.get("@todos").should("have.length", 3); - }); - - it("should highlight the currently applied filter", function () { - // using a within here which will automatically scope - // nested 'cy' queries to our parent element - cy.get(".filters").within(function () { - cy.contains("All").should("have.class", "selected"); - cy.contains("Active").click().should("have.class", "selected"); - - cy.contains("Completed").click().should("have.class", "selected"); - }); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/smoke.spec.js b/examples/webapp/cypress/e2e_04/smoke.spec.js deleted file mode 100644 index aceafe1..0000000 --- a/examples/webapp/cypress/e2e_04/smoke.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -// type definitions for Cypress object "cy" -/// - -describe("TodoMVC", function () { - // a very simple example helpful during presentations - it("adds 2 todos", function () { - cy.get(".new-todo").type("learn testing{enter}").type("be cool{enter}"); - - cy.get(".todo-list li").should("have.length", 2); - }); -}); diff --git a/examples/webapp/cypress/e2e_04/todo.no-items.spec.js b/examples/webapp/cypress/e2e_04/todo.no-items.spec.js deleted file mode 100644 index f7044a0..0000000 --- a/examples/webapp/cypress/e2e_04/todo.no-items.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -context("No Todos", function () { - it("should hide #main and #footer", function () { - // Unlike the TodoMVC tests, we don't need to create - // a gazillion helper functions which are difficult to - // parse through. Instead we'll opt to use real selectors - // so as to make our testing intentions as clear as possible. - // - // http://on.cypress.io/get - cy.get(".todo-list li").should("not.exist"); - cy.get('[data-layer="Content"]').should("not.exist"); - cy.get(".footer").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/clear.spec.js b/examples/webapp/cypress/e2e_05/clear.spec.js deleted file mode 100644 index 95c5e51..0000000 --- a/examples/webapp/cypress/e2e_05/clear.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Clear completed button", function () { - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should display the correct text", function () { - cy.get("@todos").eq(0).find(".toggle").check(); - - cy.get(".clear-completed").contains("Clear completed"); - }); - - it("should remove completed items when clicked", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").click(); - cy.get("@todos").should("have.length", 2); - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should be hidden when there are no items that are completed", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").should("be.visible").click(); - - cy.get(".clear-completed").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/completed.spec.js b/examples/webapp/cypress/e2e_05/completed.spec.js deleted file mode 100644 index 93330f7..0000000 --- a/examples/webapp/cypress/e2e_05/completed.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -context("Mark all as completed", function () { - // New commands used here: - // - cy.check https://on.cypress.io/api/check - // - cy.uncheck https://on.cypress.io/api/uncheck - - beforeEach(function () { - // This is an example of aliasing - // within a hook (beforeEach). - // Aliases will automatically persist - // between hooks and are available - // in your tests below - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to mark all items as completed", function () { - // complete all todos - // we use 'check' instead of 'click' - // because that indicates our intention much clearer - cy.get(".toggle-all").check(); - - // get each todo li and ensure its class is 'completed' - cy.get("@todos").eq(0).should("have.class", "completed"); - - cy.get("@todos").eq(1).should("have.class", "completed"); - - cy.get("@todos").eq(2).should("have.class", "completed"); - }); - - it("should allow me to clear the complete state of all items", function () { - // check and then immediately uncheck - cy.get(".toggle-all").check().uncheck(); - - cy.get("@todos").eq(0).should("not.have.class", "completed"); - - cy.get("@todos").eq(1).should("not.have.class", "completed"); - - cy.get("@todos").eq(2).should("not.have.class", "completed"); - }); - - it("complete all checkbox should update state when items are completed / cleared", function () { - // alias the .toggle-all for reuse later - cy.get(".toggle-all") - .as("toggleAll") - .check() - // this assertion is silly here IMO but - // it is what TodoMVC does - .should("be.checked"); - - // alias the first todo and then click it - cy.get(".todo-list li").eq(0).as("firstTodo").find(".toggle").uncheck(); - - // reference the .toggle-all element again - // and make sure its not checked - cy.get("@toggleAll").should("not.be.checked"); - - // reference the first todo again and now toggle it - cy.get("@firstTodo").find(".toggle").check(); - - // assert the toggle all is checked again - cy.get("@toggleAll").should("be.checked"); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/counter.spec.js b/examples/webapp/cypress/e2e_05/counter.spec.js deleted file mode 100644 index e1384e5..0000000 --- a/examples/webapp/cypress/e2e_05/counter.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Counter", function () { - it("should display the current number of todo items", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".todo-count").contains("1 item left"); - cy.createTodo(TODO_ITEM_TWO); - cy.get(".todo-count").contains("2 items left"); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/edit.spec.js b/examples/webapp/cypress/e2e_05/edit.spec.js deleted file mode 100644 index 8b89162..0000000 --- a/examples/webapp/cypress/e2e_05/edit.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Editing", function () { - // New commands used here: - // - cy.blur https://on.cypress.io/api/blur - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should hide other controls when editing", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".toggle").should("not.be.visible"); - - cy.get("@secondTodo").find("label").should("not.be.visible"); - }); - - it("should save edits on blur", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - // we can just send the blur event directly - // to the input instead of having to click - // on another button on the page. though you - // could do that its just more mental work - .blur(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should trim entered text", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type(" buy some sausages ") - .type("{enter}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should remove the item if an empty text string was entered", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("{enter}"); - - cy.get("@todos").should("have.length", 2); - }); - - it("should cancel edits on escape", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("foo{esc}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/item.spec.js b/examples/webapp/cypress/e2e_05/item.spec.js deleted file mode 100644 index 560c500..0000000 --- a/examples/webapp/cypress/e2e_05/item.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Item", function () { - // New commands used here: - // - cy.clear https://on.cypress.io/api/clear - - it("should allow me to mark items as complete", function () { - // we are aliasing the return value of - // our custom command 'createTodo' - // - // the return value is the
  • in the - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - - cy.get("@secondTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("have.class", "completed"); - }); - - it("should allow me to un-mark items as complete", function () { - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - - cy.get("@firstTodo").find(".toggle").uncheck(); - - cy.get("@firstTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - }); - - it("should allow me to edit an item", function () { - cy.createDefaultTodos().as("todos"); - - cy.get("@todos") - .eq(1) - .as("secondTodo") - // TODO: fix this, dblclick should - // have been issued to label - .find("label") - .dblclick(); - - // clear out the inputs current value - // and type a new value - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - .type("{enter}"); - - // explicitly assert about the text value - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/new.spec.js b/examples/webapp/cypress/e2e_05/new.spec.js deleted file mode 100644 index 78dc23f..0000000 --- a/examples/webapp/cypress/e2e_05/new.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("New Todo", function () { - // New commands used here: - // https://on.cypress.io/type - // https://on.cypress.io/eq - // https://on.cypress.io/find - // https://on.cypress.io/contains - // https://on.cypress.io/should - // https://on.cypress.io/as - - it("should allow me to add todo items", function () { - // create 1st todo - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - // make sure the 1st label contains the 1st todo text - cy.get(".todo-list li") - .eq(0) - .find("label") - .should("contain", TODO_ITEM_ONE); - - // create 2nd todo - cy.get(".new-todo").type(TODO_ITEM_TWO).type("{enter}"); - - // make sure the 2nd label contains the 2nd todo text - cy.get(".todo-list li") - .eq(1) - .find("label") - .should("contain", TODO_ITEM_TWO); - }); - - it("adds items", function () { - // create several todos then check the number of items in the list - cy.get(".new-todo") - .type("todo A{enter}") - .type("todo B{enter}") // we can continue working with same element - .type("todo C{enter}") // and keep adding new items - .type("todo D{enter}"); - - cy.get(".todo-list li").should("have.length", 4); - }); - - it("should clear text input field when an item is added", function () { - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - cy.get(".new-todo").should("have.text", ""); - }); - - it("should append new items to the bottom of the list", function () { - // this is an example of a custom command - // defined in cypress/support/commands.js - cy.createDefaultTodos().as("todos"); - - // even though the text content is split across - // multiple and elements - // `cy.contains` can verify this correctly - cy.get(".todo-count").contains("3 items left"); - - cy.get("@todos").eq(0).find("label").should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).find("label").should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).find("label").should("contain", TODO_ITEM_THREE); - }); - - it("should show #main and #footer when items added", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".main").should("be.visible"); - cy.get(".footer").should("be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/persistance.spec.js b/examples/webapp/cypress/e2e_05/persistance.spec.js deleted file mode 100644 index 6313a52..0000000 --- a/examples/webapp/cypress/e2e_05/persistance.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Persistence", function () { - it("should persist its data", function () { - // mimicking TodoMVC tests - // by writing out this function - function testState() { - cy.get("@firstTodo") - .should("contain", TODO_ITEM_ONE) - .and("have.class", "completed"); - - cy.get("@secondTodo") - .should("contain", TODO_ITEM_TWO) - .and("not.have.class", "completed"); - } - - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - cy.get("@firstTodo") - .find(".toggle") - .check() - .then(testState) - - .reload() - .then(testState); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/routing.spec.js b/examples/webapp/cypress/e2e_05/routing.spec.js deleted file mode 100644 index 9938908..0000000 --- a/examples/webapp/cypress/e2e_05/routing.spec.js +++ /dev/null @@ -1,69 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; -context("Routing", function () { - // New commands used here: - // https://on.cypress.io/window - // https://on.cypress.io/its - // https://on.cypress.io/invoke - // https://on.cypress.io/within - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to display active items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should respect the back button", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - cy.go("back"); - cy.get("@todos").should("have.length", 2); - cy.go("back"); - cy.get("@todos").should("have.length", 3); - }); - - it("should allow me to display completed items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - }); - - it("should allow me to display all items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get(".filters").contains("All").click(); - - cy.get("@todos").should("have.length", 3); - }); - - it("should highlight the currently applied filter", function () { - // using a within here which will automatically scope - // nested 'cy' queries to our parent element - cy.get(".filters").within(function () { - cy.contains("All").should("have.class", "selected"); - cy.contains("Active").click().should("have.class", "selected"); - - cy.contains("Completed").click().should("have.class", "selected"); - }); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/smoke.spec.js b/examples/webapp/cypress/e2e_05/smoke.spec.js deleted file mode 100644 index aceafe1..0000000 --- a/examples/webapp/cypress/e2e_05/smoke.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -// type definitions for Cypress object "cy" -/// - -describe("TodoMVC", function () { - // a very simple example helpful during presentations - it("adds 2 todos", function () { - cy.get(".new-todo").type("learn testing{enter}").type("be cool{enter}"); - - cy.get(".todo-list li").should("have.length", 2); - }); -}); diff --git a/examples/webapp/cypress/e2e_05/todo.no-items.spec.js b/examples/webapp/cypress/e2e_05/todo.no-items.spec.js deleted file mode 100644 index f7044a0..0000000 --- a/examples/webapp/cypress/e2e_05/todo.no-items.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -context("No Todos", function () { - it("should hide #main and #footer", function () { - // Unlike the TodoMVC tests, we don't need to create - // a gazillion helper functions which are difficult to - // parse through. Instead we'll opt to use real selectors - // so as to make our testing intentions as clear as possible. - // - // http://on.cypress.io/get - cy.get(".todo-list li").should("not.exist"); - cy.get('[data-layer="Content"]').should("not.exist"); - cy.get(".footer").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/clear.spec.js b/examples/webapp/cypress/e2e_06/clear.spec.js deleted file mode 100644 index 95c5e51..0000000 --- a/examples/webapp/cypress/e2e_06/clear.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Clear completed button", function () { - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should display the correct text", function () { - cy.get("@todos").eq(0).find(".toggle").check(); - - cy.get(".clear-completed").contains("Clear completed"); - }); - - it("should remove completed items when clicked", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").click(); - cy.get("@todos").should("have.length", 2); - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should be hidden when there are no items that are completed", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".clear-completed").should("be.visible").click(); - - cy.get(".clear-completed").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/completed.spec.js b/examples/webapp/cypress/e2e_06/completed.spec.js deleted file mode 100644 index 93330f7..0000000 --- a/examples/webapp/cypress/e2e_06/completed.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -context("Mark all as completed", function () { - // New commands used here: - // - cy.check https://on.cypress.io/api/check - // - cy.uncheck https://on.cypress.io/api/uncheck - - beforeEach(function () { - // This is an example of aliasing - // within a hook (beforeEach). - // Aliases will automatically persist - // between hooks and are available - // in your tests below - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to mark all items as completed", function () { - // complete all todos - // we use 'check' instead of 'click' - // because that indicates our intention much clearer - cy.get(".toggle-all").check(); - - // get each todo li and ensure its class is 'completed' - cy.get("@todos").eq(0).should("have.class", "completed"); - - cy.get("@todos").eq(1).should("have.class", "completed"); - - cy.get("@todos").eq(2).should("have.class", "completed"); - }); - - it("should allow me to clear the complete state of all items", function () { - // check and then immediately uncheck - cy.get(".toggle-all").check().uncheck(); - - cy.get("@todos").eq(0).should("not.have.class", "completed"); - - cy.get("@todos").eq(1).should("not.have.class", "completed"); - - cy.get("@todos").eq(2).should("not.have.class", "completed"); - }); - - it("complete all checkbox should update state when items are completed / cleared", function () { - // alias the .toggle-all for reuse later - cy.get(".toggle-all") - .as("toggleAll") - .check() - // this assertion is silly here IMO but - // it is what TodoMVC does - .should("be.checked"); - - // alias the first todo and then click it - cy.get(".todo-list li").eq(0).as("firstTodo").find(".toggle").uncheck(); - - // reference the .toggle-all element again - // and make sure its not checked - cy.get("@toggleAll").should("not.be.checked"); - - // reference the first todo again and now toggle it - cy.get("@firstTodo").find(".toggle").check(); - - // assert the toggle all is checked again - cy.get("@toggleAll").should("be.checked"); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/counter.spec.js b/examples/webapp/cypress/e2e_06/counter.spec.js deleted file mode 100644 index e1384e5..0000000 --- a/examples/webapp/cypress/e2e_06/counter.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Counter", function () { - it("should display the current number of todo items", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".todo-count").contains("1 item left"); - cy.createTodo(TODO_ITEM_TWO); - cy.get(".todo-count").contains("2 items left"); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/edit.spec.js b/examples/webapp/cypress/e2e_06/edit.spec.js deleted file mode 100644 index 8b89162..0000000 --- a/examples/webapp/cypress/e2e_06/edit.spec.js +++ /dev/null @@ -1,74 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Editing", function () { - // New commands used here: - // - cy.blur https://on.cypress.io/api/blur - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should hide other controls when editing", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".toggle").should("not.be.visible"); - - cy.get("@secondTodo").find("label").should("not.be.visible"); - }); - - it("should save edits on blur", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - // we can just send the blur event directly - // to the input instead of having to click - // on another button on the page. though you - // could do that its just more mental work - .blur(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should trim entered text", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo") - .find(".edit") - .clear() - .type(" buy some sausages ") - .type("{enter}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); - - it("should remove the item if an empty text string was entered", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("{enter}"); - - cy.get("@todos").should("have.length", 2); - }); - - it("should cancel edits on escape", function () { - cy.get("@todos").eq(1).as("secondTodo").find("label").dblclick(); - - cy.get("@secondTodo").find(".edit").clear().type("foo{esc}"); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/item.spec.js b/examples/webapp/cypress/e2e_06/item.spec.js deleted file mode 100644 index 560c500..0000000 --- a/examples/webapp/cypress/e2e_06/item.spec.js +++ /dev/null @@ -1,68 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Item", function () { - // New commands used here: - // - cy.clear https://on.cypress.io/api/clear - - it("should allow me to mark items as complete", function () { - // we are aliasing the return value of - // our custom command 'createTodo' - // - // the return value is the
  • in the - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - - cy.get("@secondTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("have.class", "completed"); - }); - - it("should allow me to un-mark items as complete", function () { - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - - cy.get("@firstTodo").find(".toggle").check(); - - cy.get("@firstTodo").should("have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - - cy.get("@firstTodo").find(".toggle").uncheck(); - - cy.get("@firstTodo").should("not.have.class", "completed"); - cy.get("@secondTodo").should("not.have.class", "completed"); - }); - - it("should allow me to edit an item", function () { - cy.createDefaultTodos().as("todos"); - - cy.get("@todos") - .eq(1) - .as("secondTodo") - // TODO: fix this, dblclick should - // have been issued to label - .find("label") - .dblclick(); - - // clear out the inputs current value - // and type a new value - cy.get("@secondTodo") - .find(".edit") - .clear() - .type("buy some sausages") - .type("{enter}"); - - // explicitly assert about the text value - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@secondTodo").should("contain", "buy some sausages"); - cy.get("@todos").eq(2).should("contain", TODO_ITEM_THREE); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/new.spec.js b/examples/webapp/cypress/e2e_06/new.spec.js deleted file mode 100644 index 78dc23f..0000000 --- a/examples/webapp/cypress/e2e_06/new.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("New Todo", function () { - // New commands used here: - // https://on.cypress.io/type - // https://on.cypress.io/eq - // https://on.cypress.io/find - // https://on.cypress.io/contains - // https://on.cypress.io/should - // https://on.cypress.io/as - - it("should allow me to add todo items", function () { - // create 1st todo - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - // make sure the 1st label contains the 1st todo text - cy.get(".todo-list li") - .eq(0) - .find("label") - .should("contain", TODO_ITEM_ONE); - - // create 2nd todo - cy.get(".new-todo").type(TODO_ITEM_TWO).type("{enter}"); - - // make sure the 2nd label contains the 2nd todo text - cy.get(".todo-list li") - .eq(1) - .find("label") - .should("contain", TODO_ITEM_TWO); - }); - - it("adds items", function () { - // create several todos then check the number of items in the list - cy.get(".new-todo") - .type("todo A{enter}") - .type("todo B{enter}") // we can continue working with same element - .type("todo C{enter}") // and keep adding new items - .type("todo D{enter}"); - - cy.get(".todo-list li").should("have.length", 4); - }); - - it("should clear text input field when an item is added", function () { - cy.get(".new-todo").type(TODO_ITEM_ONE).type("{enter}"); - - cy.get(".new-todo").should("have.text", ""); - }); - - it("should append new items to the bottom of the list", function () { - // this is an example of a custom command - // defined in cypress/support/commands.js - cy.createDefaultTodos().as("todos"); - - // even though the text content is split across - // multiple and elements - // `cy.contains` can verify this correctly - cy.get(".todo-count").contains("3 items left"); - - cy.get("@todos").eq(0).find("label").should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).find("label").should("contain", TODO_ITEM_TWO); - - cy.get("@todos").eq(2).find("label").should("contain", TODO_ITEM_THREE); - }); - - it("should show #main and #footer when items added", function () { - cy.createTodo(TODO_ITEM_ONE); - cy.get(".main").should("be.visible"); - cy.get(".footer").should("be.visible"); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/persistance.spec.js b/examples/webapp/cypress/e2e_06/persistance.spec.js deleted file mode 100644 index 6313a52..0000000 --- a/examples/webapp/cypress/e2e_06/persistance.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; - -context("Persistence", function () { - it("should persist its data", function () { - // mimicking TodoMVC tests - // by writing out this function - function testState() { - cy.get("@firstTodo") - .should("contain", TODO_ITEM_ONE) - .and("have.class", "completed"); - - cy.get("@secondTodo") - .should("contain", TODO_ITEM_TWO) - .and("not.have.class", "completed"); - } - - cy.createTodo(TODO_ITEM_ONE).as("firstTodo"); - cy.createTodo(TODO_ITEM_TWO).as("secondTodo"); - cy.get("@firstTodo") - .find(".toggle") - .check() - .then(testState) - - .reload() - .then(testState); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/routing.spec.js b/examples/webapp/cypress/e2e_06/routing.spec.js deleted file mode 100644 index 9938908..0000000 --- a/examples/webapp/cypress/e2e_06/routing.spec.js +++ /dev/null @@ -1,69 +0,0 @@ -let TODO_ITEM_ONE = "buy some cheese"; -let TODO_ITEM_TWO = "feed the cat"; -let TODO_ITEM_THREE = "book a doctors appointment"; -context("Routing", function () { - // New commands used here: - // https://on.cypress.io/window - // https://on.cypress.io/its - // https://on.cypress.io/invoke - // https://on.cypress.io/within - - beforeEach(function () { - cy.createDefaultTodos().as("todos"); - }); - - it("should allow me to display active items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get("@todos").eq(0).should("contain", TODO_ITEM_ONE); - - cy.get("@todos").eq(1).should("contain", TODO_ITEM_THREE); - }); - - it("should respect the back button", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - cy.go("back"); - cy.get("@todos").should("have.length", 2); - cy.go("back"); - cy.get("@todos").should("have.length", 3); - }); - - it("should allow me to display completed items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Completed").click(); - - cy.get("@todos").should("have.length", 1); - }); - - it("should allow me to display all items", function () { - cy.get("@todos").eq(1).find(".toggle").check(); - - cy.get(".filters").contains("Active").click(); - - cy.get(".filters").contains("Completed").click(); - - cy.get(".filters").contains("All").click(); - - cy.get("@todos").should("have.length", 3); - }); - - it("should highlight the currently applied filter", function () { - // using a within here which will automatically scope - // nested 'cy' queries to our parent element - cy.get(".filters").within(function () { - cy.contains("All").should("have.class", "selected"); - cy.contains("Active").click().should("have.class", "selected"); - - cy.contains("Completed").click().should("have.class", "selected"); - }); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/smoke.spec.js b/examples/webapp/cypress/e2e_06/smoke.spec.js deleted file mode 100644 index aceafe1..0000000 --- a/examples/webapp/cypress/e2e_06/smoke.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -// type definitions for Cypress object "cy" -/// - -describe("TodoMVC", function () { - // a very simple example helpful during presentations - it("adds 2 todos", function () { - cy.get(".new-todo").type("learn testing{enter}").type("be cool{enter}"); - - cy.get(".todo-list li").should("have.length", 2); - }); -}); diff --git a/examples/webapp/cypress/e2e_06/todo.no-items.spec.js b/examples/webapp/cypress/e2e_06/todo.no-items.spec.js deleted file mode 100644 index f7044a0..0000000 --- a/examples/webapp/cypress/e2e_06/todo.no-items.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -context("No Todos", function () { - it("should hide #main and #footer", function () { - // Unlike the TodoMVC tests, we don't need to create - // a gazillion helper functions which are difficult to - // parse through. Instead we'll opt to use real selectors - // so as to make our testing intentions as clear as possible. - // - // http://on.cypress.io/get - cy.get(".todo-list li").should("not.exist"); - cy.get('[data-layer="Content"]').should("not.exist"); - cy.get(".footer").should("not.be.visible"); - }); -}); diff --git a/examples/webapp/cypress/ddd/completed.spec.js b/examples/webapp/cypress/e2e_example/completed.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/completed.spec.js rename to examples/webapp/cypress/e2e_example/completed.spec.js diff --git a/examples/webapp/cypress/ddd/counter.spec.js b/examples/webapp/cypress/e2e_example/counter.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/counter.spec.js rename to examples/webapp/cypress/e2e_example/counter.spec.js diff --git a/examples/webapp/cypress/ddd/edit.spec.js b/examples/webapp/cypress/e2e_example/edit.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/edit.spec.js rename to examples/webapp/cypress/e2e_example/edit.spec.js diff --git a/examples/webapp/cypress/ddd/item.spec.js b/examples/webapp/cypress/e2e_example/item.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/item.spec.js rename to examples/webapp/cypress/e2e_example/item.spec.js diff --git a/examples/webapp/cypress/ddd/labels.spec.js b/examples/webapp/cypress/e2e_example/labels.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/labels.spec.js rename to examples/webapp/cypress/e2e_example/labels.spec.js diff --git a/examples/webapp/cypress/ddd/new.spec.js b/examples/webapp/cypress/e2e_example/new.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/new.spec.js rename to examples/webapp/cypress/e2e_example/new.spec.js diff --git a/examples/webapp/cypress/ddd/persistance.spec.js b/examples/webapp/cypress/e2e_example/persistance.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/persistance.spec.js rename to examples/webapp/cypress/e2e_example/persistance.spec.js diff --git a/examples/webapp/cypress/ddd/routing.spec.js b/examples/webapp/cypress/e2e_example/routing.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/routing.spec.js rename to examples/webapp/cypress/e2e_example/routing.spec.js diff --git a/examples/webapp/cypress/ddd/smoke.spec.js b/examples/webapp/cypress/e2e_example/smoke.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/smoke.spec.js rename to examples/webapp/cypress/e2e_example/smoke.spec.js diff --git a/examples/webapp/cypress/ddd/todo.no-items.spec.js b/examples/webapp/cypress/e2e_example/todo.no-items.spec.js similarity index 100% rename from examples/webapp/cypress/ddd/todo.no-items.spec.js rename to examples/webapp/cypress/e2e_example/todo.no-items.spec.js diff --git a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json b/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json deleted file mode 100644 index 80fe377..0000000 --- a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json +++ /dev/null @@ -1,520 +0,0 @@ -{ - "browserName": "electron", - "browserPath": "", - "browserVersion": "106.0.5249.51", - "config": { - "additionalIgnorePattern": [], - "animationDistanceThreshold": 5, - "arch": "arm64", - "autoOpen": false, - "baseUrl": "https://todomvc.com/examples/vanillajs", - "blockHosts": null, - "browser": null, - "browsers": [ - { - "channel": "stable", - "displayName": "Chrome", - "family": "chromium", - "majorVersion": "117", - "minSupportedVersion": 64, - "name": "chrome", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" - }, - { - "channel": "stable", - "displayName": "Firefox", - "family": "firefox", - "majorVersion": "108", - "minSupportedVersion": 86, - "name": "firefox", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "version": "108.0" - }, - { - "channel": "stable", - "displayName": "Electron", - "family": "chromium", - "majorVersion": 106, - "name": "electron", - "path": "", - "version": "106.0.5249.51" - } - ], - "browserUrl": "https://todomvc.com/__/", - "chromeWebSecurity": true, - "clientCertificates": [], - "clientRoute": "/__/", - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app", - "cypressEnv": "production", - "defaultCommandTimeout": 4000, - "devServerPublicPathRoute": "/__cypress/src", - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { - "currents_ws": 55430 - }, - "excludeSpecPattern": "*.hot-update.js", - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalOriginDependencies": false, - "experimentalRunAllSpecs": false, - "experimentalSingleTabRunMode": false, - "experimentalSkipDomainInjection": null, - "experimentalSourceRewriting": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "hosts": null, - "includeShadowDom": false, - "isInteractive": true, - "isTextTerminal": true, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "morgan": false, - "namespace": "__cypress", - "numTestsKeptInMemory": 0, - "pageLoadTimeout": 60000, - "platform": "darwin", - "port": 55440, - "projectId": "l4zuz8", - "projectName": "webapp", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "proxyServer": "http://localhost:55440", - "proxyUrl": "http://localhost:55440", - "rawJson": { - "baseUrl": "https://todomvc.com/examples/vanillajs", - "component": { - "devServer": { - "bundler": "webpack", - "framework": "next" - }, - "setupNodeEvents": "[Function setupNodeEvents]", - "specPattern": ["pages/__tests__/*.spec.tsx"] - }, - "e2e": { - "baseUrl": "https://todomvc.com/examples/vanillajs", - "projectId": "l4zuz8", - "setupNodeEvents": "[Function setupNodeEvents]", - "specPattern": "cypress/e2e/*.js", - "supportFile": "cypress/support/e2e.ts" - }, - "envFile": {}, - "projectId": "l4zuz8", - "projectName": "webapp", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "repoRoot": "/Users/agoldis/cypress-cloud", - "setupNodeEvents": "[Function setupNodeEvents]", - "specPattern": "cypress/e2e/*.js", - "supportFile": "cypress/support/e2e.ts", - "video": true - }, - "redirectionLimit": 20, - "remote": { - "domainName": "todomvc.com", - "fileServer": null, - "origin": "https://todomvc.com", - "props": { - "domain": "todomvc", - "port": "443", - "protocol": "https:", - "subdomain": null, - "tld": "com" - }, - "strategy": "http" - }, - "repoRoot": "/Users/agoldis/cypress-cloud", - "report": true, - "reporter": "spec", - "reporterOptions": null, - "reporterRoute": "/__cypress/reporter", - "reporterUrl": "https://todomvc.com/__cypress/reporter", - "requestTimeout": 5000, - "resolved": { - "animationDistanceThreshold": { - "from": "default", - "value": 5 - }, - "arch": { - "from": "default", - "value": "arm64" - }, - "baseUrl": { - "from": "config", - "value": "https://todomvc.com/examples/vanillajs" - }, - "blockHosts": { - "from": "default", - "value": null - }, - "browsers": { - "from": "runtime", - "value": [ - { - "channel": "stable", - "displayName": "Chrome", - "family": "chromium", - "majorVersion": "117", - "minSupportedVersion": 64, - "name": "chrome", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" - }, - { - "channel": "stable", - "displayName": "Firefox", - "family": "firefox", - "majorVersion": "108", - "minSupportedVersion": 86, - "name": "firefox", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "version": "108.0" - }, - { - "channel": "stable", - "displayName": "Electron", - "family": "chromium", - "isHeaded": false, - "isHeadless": true, - "majorVersion": 106, - "name": "electron", - "path": "", - "version": "106.0.5249.51" - } - ] - }, - "chromeWebSecurity": { - "from": "default", - "value": true - }, - "clientCertificates": { - "from": "default", - "value": [] - }, - "configFile": { - "from": "plugin", - "value": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts" - }, - "defaultCommandTimeout": { - "from": "default", - "value": 4000 - }, - "downloadsFolder": { - "from": "default", - "value": "cypress/downloads" - }, - "env": { - "currents_ws": { - "from": "cli", - "value": 55430 - } - }, - "excludeSpecPattern": { - "from": "default", - "value": "*.hot-update.js" - }, - "execTimeout": { - "from": "default", - "value": 60000 - }, - "experimentalCspAllowList": { - "from": "default", - "value": false - }, - "experimentalFetchPolyfill": { - "from": "default", - "value": false - }, - "experimentalInteractiveRunEvents": { - "from": "default", - "value": false - }, - "experimentalMemoryManagement": { - "from": "default", - "value": false - }, - "experimentalModifyObstructiveThirdPartyCode": { - "from": "default", - "value": false - }, - "experimentalOriginDependencies": { - "from": "default", - "value": false - }, - "experimentalRunAllSpecs": { - "from": "default", - "value": false - }, - "experimentalSingleTabRunMode": { - "from": "default", - "value": false - }, - "experimentalSkipDomainInjection": { - "from": "default", - "value": null - }, - "experimentalSourceRewriting": { - "from": "default", - "value": false - }, - "experimentalStudio": { - "from": "default", - "value": false - }, - "experimentalWebKitSupport": { - "from": "default", - "value": false - }, - "fileServerFolder": { - "from": "default", - "value": "" - }, - "fixturesFolder": { - "from": "default", - "value": "cypress/fixtures" - }, - "hosts": { - "from": "default", - "value": null - }, - "includeShadowDom": { - "from": "default", - "value": false - }, - "isInteractive": { - "from": "default", - "value": true - }, - "keystrokeDelay": { - "from": "default", - "value": 0 - }, - "modifyObstructiveCode": { - "from": "default", - "value": true - }, - "nodeVersion": { - "from": "default" - }, - "numTestsKeptInMemory": { - "from": "config", - "value": 0 - }, - "pageLoadTimeout": { - "from": "default", - "value": 60000 - }, - "platform": { - "from": "default", - "value": "darwin" - }, - "port": { - "from": "default", - "value": null - }, - "projectId": { - "from": "config", - "value": "l4zuz8" - }, - "redirectionLimit": { - "from": "default", - "value": 20 - }, - "reporter": { - "from": "default", - "value": "spec" - }, - "reporterOptions": { - "from": "default", - "value": null - }, - "requestTimeout": { - "from": "default", - "value": 5000 - }, - "resolvedNodePath": { - "from": "default", - "value": null - }, - "resolvedNodeVersion": { - "from": "default", - "value": null - }, - "responseTimeout": { - "from": "default", - "value": 30000 - }, - "retries": { - "from": "default", - "value": { - "openMode": 0, - "runMode": 0 - } - }, - "screenshotOnRunFailure": { - "from": "default", - "value": true - }, - "screenshotsFolder": { - "from": "default", - "value": "cypress/screenshots" - }, - "scrollBehavior": { - "from": "default", - "value": "top" - }, - "slowTestThreshold": { - "from": "default", - "value": 10000 - }, - "specPattern": { - "from": "config", - "value": "cypress/e2e/*.js" - }, - "supportFile": { - "from": "config", - "value": "cypress/support/e2e.ts" - }, - "supportFolder": { - "from": "default", - "value": false - }, - "taskTimeout": { - "from": "default", - "value": 60000 - }, - "testingType": { - "from": "plugin", - "value": "e2e" - }, - "testIsolation": { - "from": "default", - "value": true - }, - "trashAssetsBeforeRuns": { - "from": "cli", - "value": false - }, - "userAgent": { - "from": "default", - "value": null - }, - "video": { - "from": "default", - "value": true - }, - "videoCompression": { - "from": "default", - "value": 32 - }, - "videosFolder": { - "from": "default", - "value": "cypress/videos" - }, - "videoUploadOnPasses": { - "from": "default", - "value": true - }, - "viewportHeight": { - "from": "default", - "value": 660 - }, - "viewportWidth": { - "from": "default", - "value": 1000 - }, - "waitForAnimations": { - "from": "default", - "value": true - }, - "watchForFileChanges": { - "from": "config", - "value": false - } - }, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { - "openMode": 0, - "runMode": 0 - }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "scrollBehavior": "top", - "setupNodeEvents": "[Function setupNodeEvents]", - "slowTestThreshold": 10000, - "socketId": "h8k9z5r647", - "socketIoCookie": "__socket", - "socketIoRoute": "/__socket", - "specPattern": "cypress/e2e/*.js", - "specs": [], - "state": {}, - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "supportFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support", - "taskTimeout": 60000, - "testingType": "e2e", - "testIsolation": true, - "trashAssetsBeforeRuns": false, - "userAgent": null, - "version": "12.17.4", - "video": true, - "videoCompression": 32, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "videoUploadOnPasses": true, - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false - }, - "cypressVersion": "12.17.4", - "endedTestsAt": "2023-09-14T23:19:14.061Z", - "osName": "darwin", - "osVersion": "22.1.0", - "runs": [ - { - "error": "Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at alreadyWritten (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:714:8)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:802:19\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.", - "hooks": null, - "reporterStats": null, - "shouldUploadVideo": true, - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/crash.spec.js", - "baseName": "crash.spec.js", - "fileExtension": ".js", - "fileName": "crash", - "name": "cypress/e2e/crash.spec.js", - "relative": "cypress/e2e/crash.spec.js", - "relativeToCommonRoot": "crash.spec.js", - "specFileExtension": ".spec.js", - "specType": "integration" - }, - "stats": { - "duration": 0, - "endedAt": "2023-09-14T23:19:14.061Z", - "failures": 1, - "passes": 0, - "pending": 0, - "skipped": 0, - "startedAt": "2023-09-14T23:19:14.061Z", - "suites": 0, - "tests": 0 - }, - "tests": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/crash.spec.js.mp4" - } - ], - "startedTestsAt": "2023-09-14T23:19:14.061Z", - "status": "finished", - "totalDuration": 0, - "totalFailed": 1, - "totalPassed": 0, - "totalPending": 0, - "totalSkipped": 0, - "totalSuites": 0, - "totalTests": 0 -} diff --git a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json b/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json deleted file mode 100644 index e5fa424..0000000 --- a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "status": "finished", - "startedTestsAt": "2023-09-14T23:19:19.545Z", - "endedTestsAt": "2023-09-14T23:19:20.177Z", - "totalDuration": 632, - "totalSuites": 1, - "totalTests": 1, - "totalPassed": 0, - "totalPending": 0, - "totalFailed": 1, - "totalSkipped": 0, - "runs": [ - { - "stats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 0, - "skipped": 0, - "failures": 1, - "duration": 632, - "startedAt": "2023-09-14T23:19:19.545Z", - "endedAt": "2023-09-14T23:19:20.177Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 0, - "failures": 1, - "start": "2023-09-14T23:19:19.547Z", - "end": "2023-09-14T23:19:20.180Z", - "duration": 633 - }, - "hooks": [ - { - "hookName": "before each", - "title": ["\"before each\" hook"], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}" - }, - { - "hookName": "before each", - "title": ["\"before each\" hook"], - "body": "function () {\n cy.visit(\"/\");\n}" - }, - { - "hookName": "after each", - "title": ["\"after each\" hook"], - "body": "function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }" - }, - { - "hookName": "after each", - "title": ["\"after each\" hook"], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}" - }, - { - "hookName": "after all", - "title": ["\"after all\" hook"], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "title": ["Failed", "should fail"], - "state": "failed", - "body": "function () {\n expect(fail).to.be.true;\n }", - "displayError": "ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)", - "attempts": [ - { - "state": "failed", - "error": { - "name": "ReferenceError", - "message": "fail is not defined", - "stack": " at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)", - "codeFrame": { - "line": 3, - "column": 12, - "originalFile": "cypress/e2e/failed.spec.js", - "relativeFile": "examples/webapp/cypress/e2e/failed.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js", - "frame": " 1 | describe(\"Failed\", function () {\n 2 | it(\"should fail\", function () {\n> 3 | expect(fail).to.be.true;\n | ^\n 4 | });\n 5 | });\n 6 | ", - "language": "js" - } - }, - "videoTimestamp": 1976, - "duration": 615, - "startedAt": "2023-09-14T23:19:19.549Z", - "screenshots": [ - { - "name": null, - "takenAt": "2023-09-14T23:19:19.926Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png", - "height": 1440, - "width": 2560 - } - ] - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/failed.spec.js.mp4", - "spec": { - "fileExtension": ".js", - "baseName": "failed.spec.js", - "fileName": "failed", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "failed.spec.js", - "specType": "integration", - "name": "cypress/e2e/failed.spec.js", - "relative": "cypress/e2e/failed.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js" - }, - "shouldUploadVideo": true - } - ], - "browserPath": "", - "browserName": "electron", - "browserVersion": "106.0.5249.51", - "osName": "darwin", - "osVersion": "22.1.0", - "cypressVersion": "12.17.4", - "config": { - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "testingType": "e2e", - "video": true, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud", - "rawJson": { - "video": true, - "e2e": { - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]" - }, - "component": { - "specPattern": ["pages/__tests__/*.spec.tsx"], - "setupNodeEvents": "[Function setupNodeEvents]", - "devServer": { "framework": "next", "bundler": "webpack" } - }, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "envFile": {}, - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud" - }, - "morgan": false, - "isTextTerminal": true, - "socketId": "90zufzk8wx", - "report": true, - "trashAssetsBeforeRuns": false, - "animationDistanceThreshold": 5, - "arch": "arm64", - "blockHosts": null, - "chromeWebSecurity": true, - "clientCertificates": [], - "defaultCommandTimeout": 4000, - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 55430 }, - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalRunAllSpecs": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalSkipDomainInjection": null, - "experimentalOriginDependencies": false, - "experimentalSourceRewriting": false, - "experimentalSingleTabRunMode": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "excludeSpecPattern": "*.hot-update.js", - "includeShadowDom": false, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "numTestsKeptInMemory": 0, - "platform": "darwin", - "pageLoadTimeout": 60000, - "port": 55507, - "redirectionLimit": 20, - "reporter": "spec", - "reporterOptions": null, - "requestTimeout": 5000, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { "runMode": 0, "openMode": 0 }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "slowTestThreshold": 10000, - "scrollBehavior": "top", - "supportFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support", - "taskTimeout": 60000, - "testIsolation": true, - "userAgent": null, - "videoCompression": 32, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "videoUploadOnPasses": true, - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false, - "additionalIgnorePattern": [], - "autoOpen": false, - "browsers": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106 - } - ], - "clientRoute": "/__/", - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app", - "devServerPublicPathRoute": "/__cypress/src", - "hosts": null, - "isInteractive": true, - "namespace": "__cypress", - "reporterRoute": "/__cypress/reporter", - "socketIoCookie": "__socket", - "socketIoRoute": "/__socket", - "version": "12.17.4", - "cypressEnv": "production", - "resolved": { - "animationDistanceThreshold": { "value": 5, "from": "default" }, - "arch": { "value": "arm64", "from": "default" }, - "baseUrl": { - "value": "https://todomvc.com/examples/vanillajs", - "from": "config" - }, - "blockHosts": { "value": null, "from": "default" }, - "chromeWebSecurity": { "value": true, "from": "default" }, - "clientCertificates": { "value": [], "from": "default" }, - "defaultCommandTimeout": { "value": 4000, "from": "default" }, - "downloadsFolder": { "value": "cypress/downloads", "from": "default" }, - "env": { "currents_ws": { "value": 55430, "from": "cli" } }, - "execTimeout": { "value": 60000, "from": "default" }, - "experimentalCspAllowList": { "value": false, "from": "default" }, - "experimentalFetchPolyfill": { "value": false, "from": "default" }, - "experimentalInteractiveRunEvents": { "value": false, "from": "default" }, - "experimentalRunAllSpecs": { "value": false, "from": "default" }, - "experimentalMemoryManagement": { "value": false, "from": "default" }, - "experimentalModifyObstructiveThirdPartyCode": { - "value": false, - "from": "default" - }, - "experimentalSkipDomainInjection": { "value": null, "from": "default" }, - "experimentalOriginDependencies": { "value": false, "from": "default" }, - "experimentalSourceRewriting": { "value": false, "from": "default" }, - "experimentalSingleTabRunMode": { "value": false, "from": "default" }, - "experimentalStudio": { "value": false, "from": "default" }, - "experimentalWebKitSupport": { "value": false, "from": "default" }, - "fileServerFolder": { "value": "", "from": "default" }, - "fixturesFolder": { "value": "cypress/fixtures", "from": "default" }, - "excludeSpecPattern": { "value": "*.hot-update.js", "from": "default" }, - "includeShadowDom": { "value": false, "from": "default" }, - "keystrokeDelay": { "value": 0, "from": "default" }, - "modifyObstructiveCode": { "value": true, "from": "default" }, - "nodeVersion": { "from": "default" }, - "numTestsKeptInMemory": { "value": 0, "from": "config" }, - "platform": { "value": "darwin", "from": "default" }, - "pageLoadTimeout": { "value": 60000, "from": "default" }, - "port": { "value": null, "from": "default" }, - "projectId": { "value": "l4zuz8", "from": "config" }, - "redirectionLimit": { "value": 20, "from": "default" }, - "reporter": { "value": "spec", "from": "default" }, - "reporterOptions": { "value": null, "from": "default" }, - "requestTimeout": { "value": 5000, "from": "default" }, - "resolvedNodePath": { "value": null, "from": "default" }, - "resolvedNodeVersion": { "value": null, "from": "default" }, - "responseTimeout": { "value": 30000, "from": "default" }, - "retries": { - "value": { "runMode": 0, "openMode": 0 }, - "from": "default" - }, - "screenshotOnRunFailure": { "value": true, "from": "default" }, - "screenshotsFolder": { - "value": "cypress/screenshots", - "from": "default" - }, - "slowTestThreshold": { "value": 10000, "from": "default" }, - "scrollBehavior": { "value": "top", "from": "default" }, - "supportFile": { "value": "cypress/support/e2e.ts", "from": "config" }, - "supportFolder": { "value": false, "from": "default" }, - "taskTimeout": { "value": 60000, "from": "default" }, - "testIsolation": { "value": true, "from": "default" }, - "trashAssetsBeforeRuns": { "value": false, "from": "cli" }, - "userAgent": { "value": null, "from": "default" }, - "video": { "value": true, "from": "default" }, - "videoCompression": { "value": 32, "from": "default" }, - "videosFolder": { "value": "cypress/videos", "from": "default" }, - "videoUploadOnPasses": { "value": true, "from": "default" }, - "viewportHeight": { "value": 660, "from": "default" }, - "viewportWidth": { "value": 1000, "from": "default" }, - "waitForAnimations": { "value": true, "from": "default" }, - "watchForFileChanges": { "value": false, "from": "config" }, - "specPattern": { "value": "cypress/e2e/*.js", "from": "config" }, - "browsers": { - "value": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106, - "isHeadless": true, - "isHeaded": false - } - ], - "from": "runtime" - }, - "hosts": { "value": null, "from": "default" }, - "isInteractive": { "value": true, "from": "default" }, - "configFile": { - "value": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "from": "plugin" - }, - "testingType": { "value": "e2e", "from": "plugin" } - }, - "remote": { - "origin": "https://todomvc.com", - "strategy": "http", - "fileServer": null, - "domainName": "todomvc.com", - "props": { - "port": "443", - "protocol": "https:", - "subdomain": null, - "domain": "todomvc", - "tld": "com" - } - }, - "browser": null, - "specs": [], - "proxyUrl": "http://localhost:55507", - "browserUrl": "https://todomvc.com/__/", - "reporterUrl": "https://todomvc.com/__cypress/reporter", - "proxyServer": "http://localhost:55507", - "state": {} - } -} diff --git a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json b/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json deleted file mode 100644 index 7d395ed..0000000 --- a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json +++ /dev/null @@ -1,389 +0,0 @@ -{ - "status": "finished", - "startedTestsAt": "2023-09-14T23:19:25.778Z", - "endedTestsAt": "2023-09-14T23:19:26.732Z", - "totalDuration": 954, - "totalSuites": 1, - "totalTests": 1, - "totalPassed": 1, - "totalPending": 0, - "totalFailed": 0, - "totalSkipped": 0, - "runs": [ - { - "stats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "skipped": 0, - "failures": 0, - "duration": 954, - "startedAt": "2023-09-14T23:19:25.778Z", - "endedAt": "2023-09-14T23:19:26.732Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "failures": 0, - "start": "2023-09-14T23:19:25.779Z", - "end": "2023-09-14T23:19:26.734Z", - "duration": 955 - }, - "hooks": [ - { - "hookName": "before each", - "title": ["\"before each\" hook"], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}" - }, - { - "hookName": "before each", - "title": ["\"before each\" hook"], - "body": "function () {\n cy.visit(\"/\");\n}" - }, - { - "hookName": "after each", - "title": ["\"after each\" hook"], - "body": "function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }" - }, - { - "hookName": "after each", - "title": ["\"after each\" hook"], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}" - }, - { - "hookName": "after all", - "title": ["\"after all\" hook"], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "title": ["Passed", "should pass"], - "state": "passed", - "body": "function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }", - "displayError": null, - "attempts": [ - { - "state": "passed", - "error": null, - "videoTimestamp": 1986, - "duration": 949, - "startedAt": "2023-09-14T23:19:25.782Z", - "screenshots": [ - { - "name": null, - "takenAt": "2023-09-14T23:19:26.193Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png", - "height": 1320, - "width": 2000 - } - ] - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4", - "spec": { - "fileExtension": ".js", - "baseName": "passed.spec.js", - "fileName": "passed", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "passed.spec.js", - "specType": "integration", - "name": "cypress/e2e/passed.spec.js", - "relative": "cypress/e2e/passed.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js" - }, - "shouldUploadVideo": true - } - ], - "browserPath": "", - "browserName": "electron", - "browserVersion": "106.0.5249.51", - "osName": "darwin", - "osVersion": "22.1.0", - "cypressVersion": "12.17.4", - "config": { - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "testingType": "e2e", - "video": true, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud", - "rawJson": { - "video": true, - "e2e": { - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]" - }, - "component": { - "specPattern": ["pages/__tests__/*.spec.tsx"], - "setupNodeEvents": "[Function setupNodeEvents]", - "devServer": { "framework": "next", "bundler": "webpack" } - }, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "envFile": {}, - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud" - }, - "morgan": false, - "isTextTerminal": true, - "socketId": "529n95vl4z", - "report": true, - "trashAssetsBeforeRuns": false, - "animationDistanceThreshold": 5, - "arch": "arm64", - "blockHosts": null, - "chromeWebSecurity": true, - "clientCertificates": [], - "defaultCommandTimeout": 4000, - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 55430 }, - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalRunAllSpecs": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalSkipDomainInjection": null, - "experimentalOriginDependencies": false, - "experimentalSourceRewriting": false, - "experimentalSingleTabRunMode": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "excludeSpecPattern": "*.hot-update.js", - "includeShadowDom": false, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "numTestsKeptInMemory": 0, - "platform": "darwin", - "pageLoadTimeout": 60000, - "port": 55585, - "redirectionLimit": 20, - "reporter": "spec", - "reporterOptions": null, - "requestTimeout": 5000, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { "runMode": 0, "openMode": 0 }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "slowTestThreshold": 10000, - "scrollBehavior": "top", - "supportFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support", - "taskTimeout": 60000, - "testIsolation": true, - "userAgent": null, - "videoCompression": 32, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "videoUploadOnPasses": true, - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false, - "additionalIgnorePattern": [], - "autoOpen": false, - "browsers": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106 - } - ], - "clientRoute": "/__/", - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app", - "devServerPublicPathRoute": "/__cypress/src", - "hosts": null, - "isInteractive": true, - "namespace": "__cypress", - "reporterRoute": "/__cypress/reporter", - "socketIoCookie": "__socket", - "socketIoRoute": "/__socket", - "version": "12.17.4", - "cypressEnv": "production", - "resolved": { - "animationDistanceThreshold": { "value": 5, "from": "default" }, - "arch": { "value": "arm64", "from": "default" }, - "baseUrl": { - "value": "https://todomvc.com/examples/vanillajs", - "from": "config" - }, - "blockHosts": { "value": null, "from": "default" }, - "chromeWebSecurity": { "value": true, "from": "default" }, - "clientCertificates": { "value": [], "from": "default" }, - "defaultCommandTimeout": { "value": 4000, "from": "default" }, - "downloadsFolder": { "value": "cypress/downloads", "from": "default" }, - "env": { "currents_ws": { "value": 55430, "from": "cli" } }, - "execTimeout": { "value": 60000, "from": "default" }, - "experimentalCspAllowList": { "value": false, "from": "default" }, - "experimentalFetchPolyfill": { "value": false, "from": "default" }, - "experimentalInteractiveRunEvents": { "value": false, "from": "default" }, - "experimentalRunAllSpecs": { "value": false, "from": "default" }, - "experimentalMemoryManagement": { "value": false, "from": "default" }, - "experimentalModifyObstructiveThirdPartyCode": { - "value": false, - "from": "default" - }, - "experimentalSkipDomainInjection": { "value": null, "from": "default" }, - "experimentalOriginDependencies": { "value": false, "from": "default" }, - "experimentalSourceRewriting": { "value": false, "from": "default" }, - "experimentalSingleTabRunMode": { "value": false, "from": "default" }, - "experimentalStudio": { "value": false, "from": "default" }, - "experimentalWebKitSupport": { "value": false, "from": "default" }, - "fileServerFolder": { "value": "", "from": "default" }, - "fixturesFolder": { "value": "cypress/fixtures", "from": "default" }, - "excludeSpecPattern": { "value": "*.hot-update.js", "from": "default" }, - "includeShadowDom": { "value": false, "from": "default" }, - "keystrokeDelay": { "value": 0, "from": "default" }, - "modifyObstructiveCode": { "value": true, "from": "default" }, - "nodeVersion": { "from": "default" }, - "numTestsKeptInMemory": { "value": 0, "from": "config" }, - "platform": { "value": "darwin", "from": "default" }, - "pageLoadTimeout": { "value": 60000, "from": "default" }, - "port": { "value": null, "from": "default" }, - "projectId": { "value": "l4zuz8", "from": "config" }, - "redirectionLimit": { "value": 20, "from": "default" }, - "reporter": { "value": "spec", "from": "default" }, - "reporterOptions": { "value": null, "from": "default" }, - "requestTimeout": { "value": 5000, "from": "default" }, - "resolvedNodePath": { "value": null, "from": "default" }, - "resolvedNodeVersion": { "value": null, "from": "default" }, - "responseTimeout": { "value": 30000, "from": "default" }, - "retries": { - "value": { "runMode": 0, "openMode": 0 }, - "from": "default" - }, - "screenshotOnRunFailure": { "value": true, "from": "default" }, - "screenshotsFolder": { - "value": "cypress/screenshots", - "from": "default" - }, - "slowTestThreshold": { "value": 10000, "from": "default" }, - "scrollBehavior": { "value": "top", "from": "default" }, - "supportFile": { "value": "cypress/support/e2e.ts", "from": "config" }, - "supportFolder": { "value": false, "from": "default" }, - "taskTimeout": { "value": 60000, "from": "default" }, - "testIsolation": { "value": true, "from": "default" }, - "trashAssetsBeforeRuns": { "value": false, "from": "cli" }, - "userAgent": { "value": null, "from": "default" }, - "video": { "value": true, "from": "default" }, - "videoCompression": { "value": 32, "from": "default" }, - "videosFolder": { "value": "cypress/videos", "from": "default" }, - "videoUploadOnPasses": { "value": true, "from": "default" }, - "viewportHeight": { "value": 660, "from": "default" }, - "viewportWidth": { "value": 1000, "from": "default" }, - "waitForAnimations": { "value": true, "from": "default" }, - "watchForFileChanges": { "value": false, "from": "config" }, - "specPattern": { "value": "cypress/e2e/*.js", "from": "config" }, - "browsers": { - "value": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106, - "isHeadless": true, - "isHeaded": false - } - ], - "from": "runtime" - }, - "hosts": { "value": null, "from": "default" }, - "isInteractive": { "value": true, "from": "default" }, - "configFile": { - "value": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "from": "plugin" - }, - "testingType": { "value": "e2e", "from": "plugin" } - }, - "remote": { - "origin": "https://todomvc.com", - "strategy": "http", - "fileServer": null, - "domainName": "todomvc.com", - "props": { - "port": "443", - "protocol": "https:", - "subdomain": null, - "domain": "todomvc", - "tld": "com" - } - }, - "browser": null, - "specs": [], - "proxyUrl": "http://localhost:55585", - "browserUrl": "https://todomvc.com/__/", - "reporterUrl": "https://todomvc.com/__cypress/reporter", - "proxyServer": "http://localhost:55585", - "state": {} - } -} diff --git a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json b/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json deleted file mode 100644 index c874011..0000000 --- a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json +++ /dev/null @@ -1,361 +0,0 @@ -{ - "status": "finished", - "startedTestsAt": "2023-09-14T23:19:32.395Z", - "endedTestsAt": "2023-09-14T23:19:32.435Z", - "totalDuration": 40, - "totalSuites": 1, - "totalTests": 1, - "totalPassed": 0, - "totalPending": 1, - "totalFailed": 0, - "totalSkipped": 0, - "runs": [ - { - "stats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 1, - "skipped": 0, - "failures": 0, - "duration": 40, - "startedAt": "2023-09-14T23:19:32.395Z", - "endedAt": "2023-09-14T23:19:32.435Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 1, - "failures": 0, - "start": "2023-09-14T23:19:32.396Z", - "end": "2023-09-14T23:19:32.437Z", - "duration": 41 - }, - "hooks": [ - { - "hookName": "after all", - "title": ["\"after all\" hook"], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "title": ["Pending", "Pending test"], - "state": "pending", - "body": "() => {\n expect(true).to.be.true;\n }", - "displayError": null, - "attempts": [ - { - "state": "pending", - "error": null, - "videoTimestamp": 1981, - "duration": 34, - "startedAt": "2023-09-14T23:19:32.400Z", - "screenshots": [] - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/pending.spec.js.mp4", - "spec": { - "fileExtension": ".js", - "baseName": "pending.spec.js", - "fileName": "pending", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "pending.spec.js", - "specType": "integration", - "name": "cypress/e2e/pending.spec.js", - "relative": "cypress/e2e/pending.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js" - }, - "shouldUploadVideo": true - } - ], - "browserPath": "", - "browserName": "electron", - "browserVersion": "106.0.5249.51", - "osName": "darwin", - "osVersion": "22.1.0", - "cypressVersion": "12.17.4", - "config": { - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "testingType": "e2e", - "video": true, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud", - "rawJson": { - "video": true, - "e2e": { - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]" - }, - "component": { - "specPattern": ["pages/__tests__/*.spec.tsx"], - "setupNodeEvents": "[Function setupNodeEvents]", - "devServer": { "framework": "next", "bundler": "webpack" } - }, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "envFile": {}, - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud" - }, - "morgan": false, - "isTextTerminal": true, - "socketId": "4uiimk8nht", - "report": true, - "trashAssetsBeforeRuns": false, - "animationDistanceThreshold": 5, - "arch": "arm64", - "blockHosts": null, - "chromeWebSecurity": true, - "clientCertificates": [], - "defaultCommandTimeout": 4000, - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 55430 }, - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalRunAllSpecs": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalSkipDomainInjection": null, - "experimentalOriginDependencies": false, - "experimentalSourceRewriting": false, - "experimentalSingleTabRunMode": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "excludeSpecPattern": "*.hot-update.js", - "includeShadowDom": false, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "numTestsKeptInMemory": 0, - "platform": "darwin", - "pageLoadTimeout": 60000, - "port": 55676, - "redirectionLimit": 20, - "reporter": "spec", - "reporterOptions": null, - "requestTimeout": 5000, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { "runMode": 0, "openMode": 0 }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "slowTestThreshold": 10000, - "scrollBehavior": "top", - "supportFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support", - "taskTimeout": 60000, - "testIsolation": true, - "userAgent": null, - "videoCompression": 32, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "videoUploadOnPasses": true, - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false, - "additionalIgnorePattern": [], - "autoOpen": false, - "browsers": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106 - } - ], - "clientRoute": "/__/", - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app", - "devServerPublicPathRoute": "/__cypress/src", - "hosts": null, - "isInteractive": true, - "namespace": "__cypress", - "reporterRoute": "/__cypress/reporter", - "socketIoCookie": "__socket", - "socketIoRoute": "/__socket", - "version": "12.17.4", - "cypressEnv": "production", - "resolved": { - "animationDistanceThreshold": { "value": 5, "from": "default" }, - "arch": { "value": "arm64", "from": "default" }, - "baseUrl": { - "value": "https://todomvc.com/examples/vanillajs", - "from": "config" - }, - "blockHosts": { "value": null, "from": "default" }, - "chromeWebSecurity": { "value": true, "from": "default" }, - "clientCertificates": { "value": [], "from": "default" }, - "defaultCommandTimeout": { "value": 4000, "from": "default" }, - "downloadsFolder": { "value": "cypress/downloads", "from": "default" }, - "env": { "currents_ws": { "value": 55430, "from": "cli" } }, - "execTimeout": { "value": 60000, "from": "default" }, - "experimentalCspAllowList": { "value": false, "from": "default" }, - "experimentalFetchPolyfill": { "value": false, "from": "default" }, - "experimentalInteractiveRunEvents": { "value": false, "from": "default" }, - "experimentalRunAllSpecs": { "value": false, "from": "default" }, - "experimentalMemoryManagement": { "value": false, "from": "default" }, - "experimentalModifyObstructiveThirdPartyCode": { - "value": false, - "from": "default" - }, - "experimentalSkipDomainInjection": { "value": null, "from": "default" }, - "experimentalOriginDependencies": { "value": false, "from": "default" }, - "experimentalSourceRewriting": { "value": false, "from": "default" }, - "experimentalSingleTabRunMode": { "value": false, "from": "default" }, - "experimentalStudio": { "value": false, "from": "default" }, - "experimentalWebKitSupport": { "value": false, "from": "default" }, - "fileServerFolder": { "value": "", "from": "default" }, - "fixturesFolder": { "value": "cypress/fixtures", "from": "default" }, - "excludeSpecPattern": { "value": "*.hot-update.js", "from": "default" }, - "includeShadowDom": { "value": false, "from": "default" }, - "keystrokeDelay": { "value": 0, "from": "default" }, - "modifyObstructiveCode": { "value": true, "from": "default" }, - "nodeVersion": { "from": "default" }, - "numTestsKeptInMemory": { "value": 0, "from": "config" }, - "platform": { "value": "darwin", "from": "default" }, - "pageLoadTimeout": { "value": 60000, "from": "default" }, - "port": { "value": null, "from": "default" }, - "projectId": { "value": "l4zuz8", "from": "config" }, - "redirectionLimit": { "value": 20, "from": "default" }, - "reporter": { "value": "spec", "from": "default" }, - "reporterOptions": { "value": null, "from": "default" }, - "requestTimeout": { "value": 5000, "from": "default" }, - "resolvedNodePath": { "value": null, "from": "default" }, - "resolvedNodeVersion": { "value": null, "from": "default" }, - "responseTimeout": { "value": 30000, "from": "default" }, - "retries": { - "value": { "runMode": 0, "openMode": 0 }, - "from": "default" - }, - "screenshotOnRunFailure": { "value": true, "from": "default" }, - "screenshotsFolder": { - "value": "cypress/screenshots", - "from": "default" - }, - "slowTestThreshold": { "value": 10000, "from": "default" }, - "scrollBehavior": { "value": "top", "from": "default" }, - "supportFile": { "value": "cypress/support/e2e.ts", "from": "config" }, - "supportFolder": { "value": false, "from": "default" }, - "taskTimeout": { "value": 60000, "from": "default" }, - "testIsolation": { "value": true, "from": "default" }, - "trashAssetsBeforeRuns": { "value": false, "from": "cli" }, - "userAgent": { "value": null, "from": "default" }, - "video": { "value": true, "from": "default" }, - "videoCompression": { "value": 32, "from": "default" }, - "videosFolder": { "value": "cypress/videos", "from": "default" }, - "videoUploadOnPasses": { "value": true, "from": "default" }, - "viewportHeight": { "value": 660, "from": "default" }, - "viewportWidth": { "value": 1000, "from": "default" }, - "waitForAnimations": { "value": true, "from": "default" }, - "watchForFileChanges": { "value": false, "from": "config" }, - "specPattern": { "value": "cypress/e2e/*.js", "from": "config" }, - "browsers": { - "value": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106, - "isHeadless": true, - "isHeaded": false - } - ], - "from": "runtime" - }, - "hosts": { "value": null, "from": "default" }, - "isInteractive": { "value": true, "from": "default" }, - "configFile": { - "value": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "from": "plugin" - }, - "testingType": { "value": "e2e", "from": "plugin" } - }, - "remote": { - "origin": "https://todomvc.com", - "strategy": "http", - "fileServer": null, - "domainName": "todomvc.com", - "props": { - "port": "443", - "protocol": "https:", - "subdomain": null, - "domain": "todomvc", - "tld": "com" - } - }, - "browser": null, - "specs": [], - "proxyUrl": "http://localhost:55676", - "browserUrl": "https://todomvc.com/__/", - "reporterUrl": "https://todomvc.com/__cypress/reporter", - "proxyServer": "http://localhost:55676", - "state": {} - } -} diff --git a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json b/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json deleted file mode 100644 index b4a9733..0000000 --- a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json +++ /dev/null @@ -1,439 +0,0 @@ -{ - "status": "finished", - "startedTestsAt": "2023-09-14T23:19:37.743Z", - "endedTestsAt": "2023-09-14T23:19:38.903Z", - "totalDuration": 1160, - "totalSuites": 1, - "totalTests": 1, - "totalPassed": 1, - "totalPending": 0, - "totalFailed": 0, - "totalSkipped": 0, - "runs": [ - { - "stats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "skipped": 0, - "failures": 0, - "duration": 1160, - "startedAt": "2023-09-14T23:19:37.743Z", - "endedAt": "2023-09-14T23:19:38.903Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "failures": 0, - "start": "2023-09-14T23:19:37.744Z", - "end": "2023-09-14T23:19:38.905Z", - "duration": 1161 - }, - "hooks": [ - { - "hookName": "before each", - "title": ["\"before each\" hook"], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}" - }, - { - "hookName": "before each", - "title": ["\"before each\" hook"], - "body": "function () {\n cy.visit(\"/\");\n}" - }, - { - "hookName": "after each", - "title": ["\"after each\" hook"], - "body": "function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }" - }, - { - "hookName": "after each", - "title": ["\"after each\" hook"], - "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}" - }, - { - "hookName": "after all", - "title": ["\"after all\" hook"], - "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" - } - ], - "tests": [ - { - "title": ["Retries", "Runs a test with retries"], - "state": "passed", - "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "displayError": null, - "attempts": [ - { - "state": "failed", - "error": { - "name": "Error", - "message": "oh no!", - "stack": " at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)", - "codeFrame": { - "line": 11, - "column": 15, - "originalFile": "cypress/e2e/retries.spec.js", - "relativeFile": "examples/webapp/cypress/e2e/retries.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", - "frame": " 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }", - "language": "js" - } - }, - "videoTimestamp": 1970, - "duration": 698, - "startedAt": "2023-09-14T23:19:37.747Z", - "screenshots": [ - { - "name": null, - "takenAt": "2023-09-14T23:19:38.167Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png", - "height": 1440, - "width": 2560 - } - ] - }, - { - "state": "failed", - "error": { - "name": "Error", - "message": "oh no!", - "stack": " at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)", - "codeFrame": { - "line": 11, - "column": 15, - "originalFile": "cypress/e2e/retries.spec.js", - "relativeFile": "examples/webapp/cypress/e2e/retries.spec.js", - "absoluteFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", - "frame": " 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }", - "language": "js" - } - }, - "videoTimestamp": 2684, - "duration": 320, - "startedAt": "2023-09-14T23:19:38.461Z", - "screenshots": [ - { - "name": null, - "takenAt": "2023-09-14T23:19:38.544Z", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png", - "height": 1440, - "width": 2560 - } - ] - }, - { - "state": "passed", - "error": null, - "videoTimestamp": 3014, - "duration": 110, - "startedAt": "2023-09-14T23:19:38.791Z", - "screenshots": [] - } - ] - } - ], - "error": null, - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/retries.spec.js.mp4", - "spec": { - "fileExtension": ".js", - "baseName": "retries.spec.js", - "fileName": "retries", - "specFileExtension": ".spec.js", - "relativeToCommonRoot": "retries.spec.js", - "specType": "integration", - "name": "cypress/e2e/retries.spec.js", - "relative": "cypress/e2e/retries.spec.js", - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js" - }, - "shouldUploadVideo": true - } - ], - "browserPath": "", - "browserName": "electron", - "browserVersion": "106.0.5249.51", - "osName": "darwin", - "osVersion": "22.1.0", - "cypressVersion": "12.17.4", - "config": { - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "testingType": "e2e", - "video": true, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud", - "rawJson": { - "video": true, - "e2e": { - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]" - }, - "component": { - "specPattern": ["pages/__tests__/*.spec.tsx"], - "setupNodeEvents": "[Function setupNodeEvents]", - "devServer": { "framework": "next", "bundler": "webpack" } - }, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "setupNodeEvents": "[Function setupNodeEvents]", - "envFile": {}, - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "repoRoot": "/Users/agoldis/cypress-cloud" - }, - "morgan": false, - "isTextTerminal": true, - "socketId": "h9nojyshxz", - "report": true, - "trashAssetsBeforeRuns": false, - "animationDistanceThreshold": 5, - "arch": "arm64", - "blockHosts": null, - "chromeWebSecurity": true, - "clientCertificates": [], - "defaultCommandTimeout": 4000, - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 55430 }, - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalRunAllSpecs": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalSkipDomainInjection": null, - "experimentalOriginDependencies": false, - "experimentalSourceRewriting": false, - "experimentalSingleTabRunMode": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "excludeSpecPattern": "*.hot-update.js", - "includeShadowDom": false, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "numTestsKeptInMemory": 0, - "platform": "darwin", - "pageLoadTimeout": 60000, - "port": 55739, - "redirectionLimit": 20, - "reporter": "spec", - "reporterOptions": null, - "requestTimeout": 5000, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { "runMode": 0, "openMode": 0 }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "slowTestThreshold": 10000, - "scrollBehavior": "top", - "supportFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support", - "taskTimeout": 60000, - "testIsolation": true, - "userAgent": null, - "videoCompression": 32, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "videoUploadOnPasses": true, - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false, - "additionalIgnorePattern": [], - "autoOpen": false, - "browsers": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106 - } - ], - "clientRoute": "/__/", - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app", - "devServerPublicPathRoute": "/__cypress/src", - "hosts": null, - "isInteractive": true, - "namespace": "__cypress", - "reporterRoute": "/__cypress/reporter", - "socketIoCookie": "__socket", - "socketIoRoute": "/__socket", - "version": "12.17.4", - "cypressEnv": "production", - "resolved": { - "animationDistanceThreshold": { "value": 5, "from": "default" }, - "arch": { "value": "arm64", "from": "default" }, - "baseUrl": { - "value": "https://todomvc.com/examples/vanillajs", - "from": "config" - }, - "blockHosts": { "value": null, "from": "default" }, - "chromeWebSecurity": { "value": true, "from": "default" }, - "clientCertificates": { "value": [], "from": "default" }, - "defaultCommandTimeout": { "value": 4000, "from": "default" }, - "downloadsFolder": { "value": "cypress/downloads", "from": "default" }, - "env": { "currents_ws": { "value": 55430, "from": "cli" } }, - "execTimeout": { "value": 60000, "from": "default" }, - "experimentalCspAllowList": { "value": false, "from": "default" }, - "experimentalFetchPolyfill": { "value": false, "from": "default" }, - "experimentalInteractiveRunEvents": { "value": false, "from": "default" }, - "experimentalRunAllSpecs": { "value": false, "from": "default" }, - "experimentalMemoryManagement": { "value": false, "from": "default" }, - "experimentalModifyObstructiveThirdPartyCode": { - "value": false, - "from": "default" - }, - "experimentalSkipDomainInjection": { "value": null, "from": "default" }, - "experimentalOriginDependencies": { "value": false, "from": "default" }, - "experimentalSourceRewriting": { "value": false, "from": "default" }, - "experimentalSingleTabRunMode": { "value": false, "from": "default" }, - "experimentalStudio": { "value": false, "from": "default" }, - "experimentalWebKitSupport": { "value": false, "from": "default" }, - "fileServerFolder": { "value": "", "from": "default" }, - "fixturesFolder": { "value": "cypress/fixtures", "from": "default" }, - "excludeSpecPattern": { "value": "*.hot-update.js", "from": "default" }, - "includeShadowDom": { "value": false, "from": "default" }, - "keystrokeDelay": { "value": 0, "from": "default" }, - "modifyObstructiveCode": { "value": true, "from": "default" }, - "nodeVersion": { "from": "default" }, - "numTestsKeptInMemory": { "value": 0, "from": "config" }, - "platform": { "value": "darwin", "from": "default" }, - "pageLoadTimeout": { "value": 60000, "from": "default" }, - "port": { "value": null, "from": "default" }, - "projectId": { "value": "l4zuz8", "from": "config" }, - "redirectionLimit": { "value": 20, "from": "default" }, - "reporter": { "value": "spec", "from": "default" }, - "reporterOptions": { "value": null, "from": "default" }, - "requestTimeout": { "value": 5000, "from": "default" }, - "resolvedNodePath": { "value": null, "from": "default" }, - "resolvedNodeVersion": { "value": null, "from": "default" }, - "responseTimeout": { "value": 30000, "from": "default" }, - "retries": { - "value": { "runMode": 0, "openMode": 0 }, - "from": "default" - }, - "screenshotOnRunFailure": { "value": true, "from": "default" }, - "screenshotsFolder": { - "value": "cypress/screenshots", - "from": "default" - }, - "slowTestThreshold": { "value": 10000, "from": "default" }, - "scrollBehavior": { "value": "top", "from": "default" }, - "supportFile": { "value": "cypress/support/e2e.ts", "from": "config" }, - "supportFolder": { "value": false, "from": "default" }, - "taskTimeout": { "value": 60000, "from": "default" }, - "testIsolation": { "value": true, "from": "default" }, - "trashAssetsBeforeRuns": { "value": false, "from": "cli" }, - "userAgent": { "value": null, "from": "default" }, - "video": { "value": true, "from": "default" }, - "videoCompression": { "value": 32, "from": "default" }, - "videosFolder": { "value": "cypress/videos", "from": "default" }, - "videoUploadOnPasses": { "value": true, "from": "default" }, - "viewportHeight": { "value": 660, "from": "default" }, - "viewportWidth": { "value": 1000, "from": "default" }, - "waitForAnimations": { "value": true, "from": "default" }, - "watchForFileChanges": { "value": false, "from": "config" }, - "specPattern": { "value": "cypress/e2e/*.js", "from": "config" }, - "browsers": { - "value": [ - { - "name": "chrome", - "family": "chromium", - "channel": "stable", - "displayName": "Chrome", - "version": "117.0.5938.62", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "minSupportedVersion": 64, - "majorVersion": "117" - }, - { - "name": "firefox", - "family": "firefox", - "channel": "stable", - "displayName": "Firefox", - "version": "108.0", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "minSupportedVersion": 86, - "majorVersion": "108" - }, - { - "name": "electron", - "channel": "stable", - "family": "chromium", - "displayName": "Electron", - "version": "106.0.5249.51", - "path": "", - "majorVersion": 106, - "isHeadless": true, - "isHeaded": false - } - ], - "from": "runtime" - }, - "hosts": { "value": null, "from": "default" }, - "isInteractive": { "value": true, "from": "default" }, - "configFile": { - "value": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "from": "plugin" - }, - "testingType": { "value": "e2e", "from": "plugin" } - }, - "remote": { - "origin": "https://todomvc.com", - "strategy": "http", - "fileServer": null, - "domainName": "todomvc.com", - "props": { - "port": "443", - "protocol": "https:", - "subdomain": null, - "domain": "todomvc", - "tld": "com" - } - }, - "browser": null, - "specs": [], - "proxyUrl": "http://localhost:55739", - "browserUrl": "https://todomvc.com/__/", - "reporterUrl": "https://todomvc.com/__cypress/reporter", - "proxyServer": "http://localhost:55739", - "state": {} - } -} diff --git a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json b/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json deleted file mode 100644 index 9197f9e..0000000 --- a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_passed.spec.js.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "browserName": "electron", - "browserPath": "", - "browserVersion": "114.0.5735.289", - "config": { - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "testingType": "e2e", - "video": true, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "isTextTerminal": true, - "trashAssetsBeforeRuns": false, - "animationDistanceThreshold": 5, - "arch": "arm64", - "blockHosts": null, - "chromeWebSecurity": true, - "clientCertificates": [], - "defaultCommandTimeout": 4000, - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 56002 }, - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalRunAllSpecs": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalSkipDomainInjection": null, - "experimentalOriginDependencies": false, - "experimentalSourceRewriting": false, - "experimentalSingleTabRunMode": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "excludeSpecPattern": "*.hot-update.js", - "includeShadowDom": false, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "numTestsKeptInMemory": 0, - "platform": "darwin", - "pageLoadTimeout": 60000, - "port": 56146, - "redirectionLimit": 20, - "reporter": "spec", - "reporterOptions": null, - "requestTimeout": 5000, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { "runMode": 0, "openMode": 0 }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "slowTestThreshold": 10000, - "scrollBehavior": "top", - "taskTimeout": 60000, - "testIsolation": true, - "userAgent": null, - "videoCompression": false, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false, - "browsers": [ - { - "channel": "stable", - "displayName": "Chrome", - "family": "chromium", - "majorVersion": "117", - "name": "chrome", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" - }, - { - "channel": "stable", - "displayName": "Firefox", - "family": "firefox", - "majorVersion": "108", - "name": "firefox", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "version": "108.0" - }, - { - "channel": "stable", - "displayName": "Electron", - "family": "chromium", - "majorVersion": 114, - "name": "electron", - "path": "", - "version": "114.0.5735.289" - } - ], - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app", - "hosts": null, - "isInteractive": true, - "version": "13.2.0", - "browser": null, - "cypressInternalEnv": "production" - }, - "cypressVersion": "13.2.0", - "endedTestsAt": "2023-09-14T23:20:23.729Z", - "osName": "darwin", - "osVersion": "22.1.0", - "runs": [ - { - "error": null, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "failures": 0, - "start": "2023-09-14T23:20:22.666Z", - "end": "2023-09-14T23:20:23.731Z", - "duration": 1065 - }, - "screenshots": [ - { - "height": 1320, - "name": null, - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png", - "takenAt": "2023-09-14T23:20:23.090Z", - "width": 2000 - } - ], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js", - "fileExtension": ".js", - "fileName": "passed", - "name": "passed.spec.js", - "relative": "cypress/e2e/passed.spec.js" - }, - "stats": { - "duration": 1066, - "endedAt": "2023-09-14T23:20:23.729Z", - "failures": 0, - "passes": 1, - "pending": 0, - "skipped": 0, - "startedAt": "2023-09-14T23:20:22.663Z", - "suites": 1, - "tests": 1 - }, - "tests": [ - { - "attempts": [{ "state": "passed" }], - "displayError": null, - "duration": 1062, - "state": "passed", - "title": ["Passed", "should pass"] - } - ], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4" - } - ], - "startedTestsAt": "2023-09-14T23:20:22.663Z", - "totalDuration": 1066, - "totalFailed": 0, - "totalPassed": 1, - "totalPending": 0, - "totalSkipped": 0, - "totalSuites": 1, - "totalTests": 1 -} diff --git a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json b/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json deleted file mode 100644 index e6f0996..0000000 --- a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_pending.spec.js.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "browserName": "electron", - "browserPath": "", - "browserVersion": "114.0.5735.289", - "config": { - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "testingType": "e2e", - "video": true, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "isTextTerminal": true, - "trashAssetsBeforeRuns": false, - "animationDistanceThreshold": 5, - "arch": "arm64", - "blockHosts": null, - "chromeWebSecurity": true, - "clientCertificates": [], - "defaultCommandTimeout": 4000, - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 56002 }, - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalRunAllSpecs": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalSkipDomainInjection": null, - "experimentalOriginDependencies": false, - "experimentalSourceRewriting": false, - "experimentalSingleTabRunMode": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "excludeSpecPattern": "*.hot-update.js", - "includeShadowDom": false, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "numTestsKeptInMemory": 0, - "platform": "darwin", - "pageLoadTimeout": 60000, - "port": 56237, - "redirectionLimit": 20, - "reporter": "spec", - "reporterOptions": null, - "requestTimeout": 5000, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { "runMode": 0, "openMode": 0 }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "slowTestThreshold": 10000, - "scrollBehavior": "top", - "taskTimeout": 60000, - "testIsolation": true, - "userAgent": null, - "videoCompression": false, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false, - "browsers": [ - { - "channel": "stable", - "displayName": "Chrome", - "family": "chromium", - "majorVersion": "117", - "name": "chrome", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" - }, - { - "channel": "stable", - "displayName": "Firefox", - "family": "firefox", - "majorVersion": "108", - "name": "firefox", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "version": "108.0" - }, - { - "channel": "stable", - "displayName": "Electron", - "family": "chromium", - "majorVersion": 114, - "name": "electron", - "path": "", - "version": "114.0.5735.289" - } - ], - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app", - "hosts": null, - "isInteractive": true, - "version": "13.2.0", - "browser": null, - "cypressInternalEnv": "production" - }, - "cypressVersion": "13.2.0", - "endedTestsAt": "2023-09-14T23:20:28.739Z", - "osName": "darwin", - "osVersion": "22.1.0", - "runs": [ - { - "error": null, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 1, - "failures": 0, - "start": "2023-09-14T23:20:28.699Z", - "end": "2023-09-14T23:20:28.741Z", - "duration": 42 - }, - "screenshots": [], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js", - "fileExtension": ".js", - "fileName": "pending", - "name": "pending.spec.js", - "relative": "cypress/e2e/pending.spec.js" - }, - "stats": { - "duration": 43, - "endedAt": "2023-09-14T23:20:28.739Z", - "failures": 0, - "passes": 0, - "pending": 1, - "skipped": 0, - "startedAt": "2023-09-14T23:20:28.696Z", - "suites": 1, - "tests": 1 - }, - "tests": [ - { - "attempts": [{ "state": "pending" }], - "displayError": null, - "duration": 37, - "state": "pending", - "title": ["Pending", "Pending test"] - } - ], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/pending.spec.js.mp4" - } - ], - "startedTestsAt": "2023-09-14T23:20:28.696Z", - "totalDuration": 43, - "totalFailed": 0, - "totalPassed": 0, - "totalPending": 1, - "totalSkipped": 0, - "totalSuites": 1, - "totalTests": 1 -} diff --git a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json b/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json deleted file mode 100644 index 4a80413..0000000 --- a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "browserName": "electron", - "browserPath": "", - "browserVersion": "114.0.5735.289", - "config": { - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "testingType": "e2e", - "video": true, - "projectId": "l4zuz8", - "baseUrl": "https://todomvc.com/examples/vanillajs", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", - "specPattern": "cypress/e2e/*.js", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", - "projectName": "webapp", - "isTextTerminal": true, - "trashAssetsBeforeRuns": false, - "animationDistanceThreshold": 5, - "arch": "arm64", - "blockHosts": null, - "chromeWebSecurity": true, - "clientCertificates": [], - "defaultCommandTimeout": 4000, - "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 56002 }, - "execTimeout": 60000, - "experimentalCspAllowList": false, - "experimentalFetchPolyfill": false, - "experimentalInteractiveRunEvents": false, - "experimentalRunAllSpecs": false, - "experimentalMemoryManagement": false, - "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalSkipDomainInjection": null, - "experimentalOriginDependencies": false, - "experimentalSourceRewriting": false, - "experimentalSingleTabRunMode": false, - "experimentalStudio": false, - "experimentalWebKitSupport": false, - "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", - "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "excludeSpecPattern": "*.hot-update.js", - "includeShadowDom": false, - "keystrokeDelay": 0, - "modifyObstructiveCode": true, - "numTestsKeptInMemory": 0, - "platform": "darwin", - "pageLoadTimeout": 60000, - "port": 56385, - "redirectionLimit": 20, - "reporter": "spec", - "reporterOptions": null, - "requestTimeout": 5000, - "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", - "resolvedNodeVersion": "18.16.1", - "responseTimeout": 30000, - "retries": { "runMode": 0, "openMode": 0 }, - "screenshotOnRunFailure": true, - "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "slowTestThreshold": 10000, - "scrollBehavior": "top", - "taskTimeout": 60000, - "testIsolation": true, - "userAgent": null, - "videoCompression": false, - "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", - "viewportHeight": 660, - "viewportWidth": 1000, - "waitForAnimations": true, - "watchForFileChanges": false, - "browsers": [ - { - "channel": "stable", - "displayName": "Chrome", - "family": "chromium", - "majorVersion": "117", - "name": "chrome", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" - }, - { - "channel": "stable", - "displayName": "Firefox", - "family": "firefox", - "majorVersion": "108", - "name": "firefox", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "version": "108.0" - }, - { - "channel": "stable", - "displayName": "Electron", - "family": "chromium", - "majorVersion": 114, - "name": "electron", - "path": "", - "version": "114.0.5735.289" - } - ], - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app", - "hosts": null, - "isInteractive": true, - "version": "13.2.0", - "browser": null, - "cypressInternalEnv": "production" - }, - "cypressVersion": "13.2.0", - "endedTestsAt": "2023-09-14T23:20:40.471Z", - "osName": "darwin", - "osVersion": "22.1.0", - "runs": [ - { - "error": null, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 0, - "pending": 0, - "failures": 1, - "start": "2023-09-14T23:20:39.824Z", - "end": "2023-09-14T23:20:40.473Z", - "duration": 649 - }, - "screenshots": [ - { - "height": 1440, - "name": null, - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png", - "takenAt": "2023-09-14T23:20:40.163Z", - "width": 2560 - } - ], - "spec": { - "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js", - "fileExtension": ".js", - "fileName": "skipped", - "name": "skipped.spec.js", - "relative": "cypress/e2e/skipped.spec.js" - }, - "stats": { - "duration": 651, - "endedAt": "2023-09-14T23:20:40.471Z", - "failures": 1, - "passes": 0, - "pending": 0, - "skipped": 1, - "startedAt": "2023-09-14T23:20:39.820Z", - "suites": 1, - "tests": 2 - }, - "tests": [ - { - "attempts": [{ "state": "failed" }], - "displayError": "Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)", - "duration": 590, - "state": "failed", - "title": ["Skipped", "should not be skipped"] - }, - { - "attempts": [{ "state": "skipped" }], - "displayError": null, - "duration": 0, - "state": "skipped", - "title": ["Skipped", "should be skipped"] - } - ], - "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/skipped.spec.js.mp4" - } - ], - "startedTestsAt": "2023-09-14T23:20:39.820Z", - "totalDuration": 651, - "totalFailed": 1, - "totalPassed": 0, - "totalPending": 0, - "totalSkipped": 1, - "totalSuites": 1, - "totalTests": 2 -} diff --git a/examples/webapp/package.json b/examples/webapp/package.json index 87cd059..9eccbad 100644 --- a/examples/webapp/package.json +++ b/examples/webapp/package.json @@ -10,7 +10,7 @@ "cypress:script:esm": "node scripts/currents-script.mjs" }, "dependencies": { - "cypress": "^13.2.0", + "cypress": "^12.17.4", "cypress-cloud": "*", "cypress-terminal-report": "^5.3.3", "next": "^13.2.1", diff --git a/examples/webapp/screenshot_1694732805396.json b/examples/webapp/screenshot_1694732805396.json deleted file mode 100644 index 77e12f1..0000000 --- a/examples/webapp/screenshot_1694732805396.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "testAttemptIndex": 0, - "size": 334443, - "takenAt": "2023-09-14T23:06:45.184Z", - "dimensions": { "width": 2560, "height": 1440 }, - "multipart": false, - "specName": "failed.spec.js", - "testFailure": true, - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png", - "scaled": true, - "blackout": [], - "duration": 214 -} diff --git a/examples/webapp/screenshot_1694732812045.json b/examples/webapp/screenshot_1694732812045.json deleted file mode 100644 index 7d902b2..0000000 --- a/examples/webapp/screenshot_1694732812045.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "testAttemptIndex": 0, - "size": 236374, - "takenAt": "2023-09-14T23:06:51.530Z", - "dimensions": { "width": 2000, "height": 1320 }, - "multipart": true, - "pixelRatio": 2, - "name": null, - "specName": "passed.spec.js", - "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png", - "scaled": false, - "blackout": [], - "duration": 525 -} diff --git a/examples/webapp/screenshot_1694732823701.json b/examples/webapp/screenshot_1694732823701.json deleted file mode 100644 index 4cdf6a8..0000000 --- a/examples/webapp/screenshot_1694732823701.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":337820,"takenAt":"2023-09-14T23:07:03.485Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png","scaled":true,"blackout":[],"duration":216} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694732824019.json b/examples/webapp/screenshot_1694732824019.json deleted file mode 100644 index 85dd69d..0000000 --- a/examples/webapp/screenshot_1694732824019.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":1,"size":369342,"takenAt":"2023-09-14T23:07:03.836Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png","scaled":true,"blackout":[],"duration":184} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694732830501.json b/examples/webapp/screenshot_1694732830501.json deleted file mode 100644 index 0809ca9..0000000 --- a/examples/webapp/screenshot_1694732830501.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":344793,"takenAt":"2023-09-14T23:07:10.273Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"skipped.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","scaled":true,"blackout":[],"duration":232} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733427580.json b/examples/webapp/screenshot_1694733427580.json deleted file mode 100644 index a2bc970..0000000 --- a/examples/webapp/screenshot_1694733427580.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":330912,"takenAt":"2023-09-14T23:17:07.361Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"failed.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","scaled":true,"blackout":[],"duration":220} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733475012.json b/examples/webapp/screenshot_1694733475012.json deleted file mode 100644 index 742d04e..0000000 --- a/examples/webapp/screenshot_1694733475012.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":332385,"takenAt":"2023-09-14T23:17:54.797Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"failed.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","scaled":true,"blackout":[],"duration":216} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733481600.json b/examples/webapp/screenshot_1694733481600.json deleted file mode 100644 index cb80ef5..0000000 --- a/examples/webapp/screenshot_1694733481600.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":236374,"takenAt":"2023-09-14T23:18:01.065Z","dimensions":{"width":2000,"height":1320},"multipart":true,"pixelRatio":2,"name":null,"specName":"passed.spec.js","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","scaled":false,"blackout":[],"duration":545} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733493221.json b/examples/webapp/screenshot_1694733493221.json deleted file mode 100644 index 331d87f..0000000 --- a/examples/webapp/screenshot_1694733493221.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":337335,"takenAt":"2023-09-14T23:18:12.973Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png","scaled":true,"blackout":[],"duration":253} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733493576.json b/examples/webapp/screenshot_1694733493576.json deleted file mode 100644 index 17f0165..0000000 --- a/examples/webapp/screenshot_1694733493576.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":1,"size":371222,"takenAt":"2023-09-14T23:18:13.356Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png","scaled":true,"blackout":[],"duration":225} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733500062.json b/examples/webapp/screenshot_1694733500062.json deleted file mode 100644 index 3118888..0000000 --- a/examples/webapp/screenshot_1694733500062.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":344345,"takenAt":"2023-09-14T23:18:19.844Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"skipped.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","scaled":true,"blackout":[],"duration":223} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733560140.json b/examples/webapp/screenshot_1694733560140.json deleted file mode 100644 index c0cf73c..0000000 --- a/examples/webapp/screenshot_1694733560140.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":331847,"takenAt":"2023-09-14T23:19:19.926Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"failed.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","scaled":true,"blackout":[],"duration":215} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733566700.json b/examples/webapp/screenshot_1694733566700.json deleted file mode 100644 index 271679a..0000000 --- a/examples/webapp/screenshot_1694733566700.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":236374,"takenAt":"2023-09-14T23:19:26.193Z","dimensions":{"width":2000,"height":1320},"multipart":true,"pixelRatio":2,"name":null,"specName":"passed.spec.js","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","scaled":false,"blackout":[],"duration":516} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733578424.json b/examples/webapp/screenshot_1694733578424.json deleted file mode 100644 index b517f13..0000000 --- a/examples/webapp/screenshot_1694733578424.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":336206,"takenAt":"2023-09-14T23:19:38.167Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png","scaled":true,"blackout":[],"duration":257} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733578763.json b/examples/webapp/screenshot_1694733578763.json deleted file mode 100644 index 38c7b8e..0000000 --- a/examples/webapp/screenshot_1694733578763.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":1,"size":374323,"takenAt":"2023-09-14T23:19:38.544Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png","scaled":true,"blackout":[],"duration":219} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733585076.json b/examples/webapp/screenshot_1694733585076.json deleted file mode 100644 index 50e17e0..0000000 --- a/examples/webapp/screenshot_1694733585076.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":344927,"takenAt":"2023-09-14T23:19:44.847Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"skipped.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","scaled":true,"blackout":[],"duration":235} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733617678.json b/examples/webapp/screenshot_1694733617678.json deleted file mode 100644 index 90270a5..0000000 --- a/examples/webapp/screenshot_1694733617678.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":332948,"takenAt":"2023-09-14T23:20:17.469Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"failed.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","scaled":true,"blackout":[],"duration":210} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733623691.json b/examples/webapp/screenshot_1694733623691.json deleted file mode 100644 index 5ecafdc..0000000 --- a/examples/webapp/screenshot_1694733623691.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":236374,"takenAt":"2023-09-14T23:20:23.090Z","dimensions":{"width":2000,"height":1320},"multipart":true,"pixelRatio":2,"name":null,"specName":"passed.spec.js","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","scaled":false,"blackout":[],"duration":610} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733634331.json b/examples/webapp/screenshot_1694733634331.json deleted file mode 100644 index 7d64487..0000000 --- a/examples/webapp/screenshot_1694733634331.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":331956,"takenAt":"2023-09-14T23:20:34.122Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png","scaled":true,"blackout":[],"duration":210} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733634643.json b/examples/webapp/screenshot_1694733634643.json deleted file mode 100644 index 8feca4a..0000000 --- a/examples/webapp/screenshot_1694733634643.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":1,"size":276216,"takenAt":"2023-09-14T23:20:34.470Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png","scaled":true,"blackout":[],"duration":173} \ No newline at end of file diff --git a/examples/webapp/screenshot_1694733640387.json b/examples/webapp/screenshot_1694733640387.json deleted file mode 100644 index 1e3d75a..0000000 --- a/examples/webapp/screenshot_1694733640387.json +++ /dev/null @@ -1 +0,0 @@ -{"testAttemptIndex":0,"size":343215,"takenAt":"2023-09-14T23:20:40.163Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"skipped.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","scaled":true,"blackout":[],"duration":228} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a8bbcfe..7a6b7cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -267,7 +267,7 @@ "name": "web", "version": "0.0.0", "dependencies": { - "cypress": "^13.2.0", + "cypress": "^12.17.4", "cypress-cloud": "*", "cypress-terminal-report": "^5.3.3", "next": "^13.2.1", @@ -286,6 +286,34 @@ "typescript": "^4.7.4" } }, + "examples/webapp/node_modules/@cypress/request": { + "version": "2.88.12", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.12.tgz", + "integrity": "sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "~6.10.3", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, "examples/webapp/node_modules/@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -303,6 +331,82 @@ "dev": true, "license": "MIT" }, + "examples/webapp/node_modules/cypress": { + "version": "12.17.4", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.4.tgz", + "integrity": "sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==", + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "2.88.12", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^16.18.39", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "process": "^0.11.10", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + } + }, + "examples/webapp/node_modules/cypress/node_modules/@types/node": { + "version": "16.18.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.52.tgz", + "integrity": "sha512-sm2aph6cRSsTMFYFgI+RpPLunXO9ClJkpizUVdT7KmGeyfQ14xnjTMT/f3MHcfKqevXqGT6BgVFzW8wcEoDUtA==" + }, + "examples/webapp/node_modules/cypress/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "examples/webapp/node_modules/eslint-config-custom": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/eslint-config-custom/-/eslint-config-custom-0.0.0.tgz", @@ -398,6 +502,19 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" } }, + "examples/webapp/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "examples/webapp/node_modules/glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", @@ -2596,6 +2713,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.0.tgz", "integrity": "sha512-GKFCqwZwMYmL3IBoNeR2MM1SnxRIGERsQOTWeQKoYBt2JLqcqiy7JXqO894FLrpjZYqGxW92MNwRH2BN56obdQ==", + "peer": true, "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -2624,6 +2742,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -7676,6 +7795,7 @@ "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.2.0.tgz", "integrity": "sha512-AvDQxBydE771GTq0TR4ZUBvv9m9ffXuB/ueEtpDF/6gOcvFR96amgwSJP16Yhqw6VhmwqspT5nAGzoxxB+D89g==", "hasInstallScript": true, + "peer": true, "dependencies": { "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", @@ -17509,7 +17629,7 @@ "@types/jest": "^29.2.4", "@types/lodash": "^4.14.191", "@types/ws": "^8.5.4", - "cypress": "^13.2.0", + "cypress": "^12.17.4", "esbuild": "^0.16.5", "eslint": "^7.32.0", "eslint-config-custom": "latest", @@ -17525,6 +17645,35 @@ "node": ">=14.7.0" } }, + "packages/cypress-cloud/node_modules/@cypress/request": { + "version": "2.88.12", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.12.tgz", + "integrity": "sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "~6.10.3", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, "packages/cypress-cloud/node_modules/@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -17638,6 +17787,12 @@ "node": ">=10" } }, + "packages/cypress-cloud/node_modules/@types/node": { + "version": "16.18.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.52.tgz", + "integrity": "sha512-sm2aph6cRSsTMFYFgI+RpPLunXO9ClJkpizUVdT7KmGeyfQ14xnjTMT/f3MHcfKqevXqGT6BgVFzW8wcEoDUtA==", + "dev": true + }, "packages/cypress-cloud/node_modules/agent-base": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", @@ -17935,6 +18090,216 @@ "url": "https://github.com/sponsors/d-fischer" } }, + "packages/cypress-cloud/node_modules/cypress": { + "version": "12.17.4", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.4.tgz", + "integrity": "sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "2.88.12", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^16.18.39", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "process": "^0.11.10", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "engines": { + "node": ">=8.12.0" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "packages/cypress-cloud/node_modules/cypress/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "packages/cypress-cloud/node_modules/define-lazy-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", @@ -18113,6 +18478,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "packages/cypress-cloud/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "packages/cypress-cloud/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -20424,6 +20803,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.0.tgz", "integrity": "sha512-GKFCqwZwMYmL3IBoNeR2MM1SnxRIGERsQOTWeQKoYBt2JLqcqiy7JXqO894FLrpjZYqGxW92MNwRH2BN56obdQ==", + "peer": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -20449,6 +20829,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "peer": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -23779,6 +24160,7 @@ "version": "13.2.0", "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.2.0.tgz", "integrity": "sha512-AvDQxBydE771GTq0TR4ZUBvv9m9ffXuB/ueEtpDF/6gOcvFR96amgwSJP16Yhqw6VhmwqspT5nAGzoxxB+D89g==", + "peer": true, "requires": { "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", @@ -23846,7 +24228,7 @@ "commander": "^10.0.0", "common-path-prefix": "^3.0.0", "cy2": "^3.4.2", - "cypress": "^13.2.0", + "cypress": "12", "date-fns": "^2.30.0", "debug": "^4.3.4", "esbuild": "^0.16.5", @@ -23876,6 +24258,32 @@ "ws": "^8.13.0" }, "dependencies": { + "@cypress/request": { + "version": "2.88.12", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.12.tgz", + "integrity": "sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "~6.10.3", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + } + }, "@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -23965,6 +24373,12 @@ } } }, + "@types/node": { + "version": "16.18.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.52.tgz", + "integrity": "sha512-sm2aph6cRSsTMFYFgI+RpPLunXO9ClJkpizUVdT7KmGeyfQ14xnjTMT/f3MHcfKqevXqGT6BgVFzW8wcEoDUtA==", + "dev": true + }, "agent-base": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", @@ -24182,6 +24596,164 @@ "path-type": "^4.0.0" } }, + "cypress": { + "version": "12.17.4", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.4.tgz", + "integrity": "sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==", + "dev": true, + "requires": { + "@cypress/request": "2.88.12", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^16.18.39", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "process": "^0.11.10", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "dependencies": { + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, "define-lazy-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", @@ -24312,6 +24884,17 @@ "is-unicode-supported": "^1.2.0" } }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -31228,7 +31811,7 @@ "@types/node": "^17.0.12", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", - "cypress": "^13.2.0", + "cypress": "^12.17.4", "cypress-cloud": "*", "cypress-terminal-report": "^5.3.3", "eslint": "7.32.0", @@ -31241,6 +31824,31 @@ "typescript": "^4.7.4" }, "dependencies": { + "@cypress/request": { + "version": "2.88.12", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.12.tgz", + "integrity": "sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "~6.10.3", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + } + }, "@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -31256,6 +31864,71 @@ "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", "dev": true }, + "cypress": { + "version": "12.17.4", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.4.tgz", + "integrity": "sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==", + "requires": { + "@cypress/request": "2.88.12", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^16.18.39", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "process": "^0.11.10", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "dependencies": { + "@types/node": { + "version": "16.18.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.52.tgz", + "integrity": "sha512-sm2aph6cRSsTMFYFgI+RpPLunXO9ClJkpizUVdT7KmGeyfQ14xnjTMT/f3MHcfKqevXqGT6BgVFzW8wcEoDUtA==" + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, "eslint-config-custom": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/eslint-config-custom/-/eslint-config-custom-0.0.0.tgz", @@ -31331,6 +32004,16 @@ } } }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", diff --git a/packages/cypress-cloud/jest.config.js b/packages/cypress-cloud/jest.config.js index e657a27..b448702 100644 --- a/packages/cypress-cloud/jest.config.js +++ b/packages/cypress-cloud/jest.config.js @@ -7,7 +7,7 @@ module.exports = { "^.+\\.tsx?$": "@swc/jest", }, moduleNameMapper: { - "cypress-cloud/(.*)$": "/../cypress-cloud/$1", + "^cypress-cloud/(.*)$": "/../cypress-cloud/$1", }, transformIgnorePatterns: ["node_modules"], moduleFileExtensions: ["ts", "js", "d.ts"], diff --git a/packages/cypress-cloud/lib/__tests__/README.md b/packages/cypress-cloud/lib/__tests__/README.md new file mode 100644 index 0000000..e5c84b7 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/README.md @@ -0,0 +1,15 @@ +# Data flow test + +This test reproduces the data flow as appears in: + +https://www.figma.com/file/46bnshkBlyvlmCaCX45Hbx/Cypress-Cloud-Data-Flow?type=whiteboard&node-id=0%3A1&t=OfMHO8NtfI2cUjJw-1 + +The idea is to replicate the data in the `executionState`. + +- Collect the raw events produced by cypress. Search the source code for for `// % save results` comment and uncomment. It will capture raw events and save them. Copy the events to `fixtures`. + + - The raw events are are in `fixtures///.json` + - The expected API response is in `fixtures/api//payload.ts` + +- Read the events and populate `executionState` +- Create reporting tasks and compare the output diff --git a/packages/cypress-cloud/lib/__tests__/dataFlow.test.ts b/packages/cypress-cloud/lib/__tests__/dataFlow.test.ts new file mode 100644 index 0000000..4c93f2f --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/dataFlow.test.ts @@ -0,0 +1,154 @@ +import { expect } from "@jest/globals"; +import fs from "fs"; +import path from "path"; +import * as api from "../api"; +import { initCapture } from "../capture"; +import { listenToEvents, stopListeningToEvents } from "../listener"; +import { pubsub } from "../pubsub"; +import { getReportResultsTask } from "../results/uploadResults"; +import { ConfigState, ExecutionState } from "../state"; + +jest.mock("../api", () => ({ + reportInstanceResultsMerged: jest.fn(), + reportInstanceResults: jest.fn(), + reportInstanceTests: jest.fn(), +})); + +jest.mock("../env", () => ({ + isCurrents: jest.fn().mockReturnValue(true), +})); + +const cypressVersions = ["13.2.0", "12.17.4"]; +// const cypressVersions = ["12.17.4"] as const; + +const specs = [ + "crash.spec.js", + "passed.spec.js", + "failed.spec.js", + "pending.spec.js", + "skipped.spec.js", + "retries.spec.js", +] as const; + +// const specs = [ +// "crash.spec.js", +// "passing.spec.js", +// "failed.spec.js", +// "pending.spec.js", +// "skipped.spec.js", +// "retries.spec.js", +// ]; + +// /fixtures/12.17.4/fails.spec.js/12.17.4_fails.spec.js_specAfter +function getFixtureBase(cypressVersion: string, spec: string) { + return path.resolve(__dirname, `./fixtures/${cypressVersion}/${spec}`); +} + +function getSingleFixturePath( + cypressVersion: string, + spec: string, + fixtureType: "specAfter" | "runResult" +) { + return `${getFixtureBase(cypressVersion, spec)}/${fixtureType}.json`; +} + +function getAPIPayloadPath(spec: string) { + return `./fixtures/api/${spec}/payload.ts`; +} + +function getMultipleFixtures( + cypressVersion: string, + spec: string, + type: string +) { + const files = fs.readdirSync(getFixtureBase(cypressVersion, spec)); + const imports = files + .filter((f) => f.includes(type)) + .map((f) => import(path.resolve(getFixtureBase(cypressVersion, spec), f))); + return Promise.all(imports); +} + +describe("Data Flow", () => { + cypressVersions.forEach((cypressVersion) => { + describe(`Cypress ${cypressVersion}`, () => { + specs.forEach((spec) => { + describe(spec, () => { + beforeEach(() => { + stopListeningToEvents(); + jest.clearAllMocks(); + }); + it(`${spec} should have the right API call payload`, async () => { + const instanceId = "instanceId"; + const executionState = new ExecutionState(); + const configState = new ConfigState(); + (api.reportInstanceResultsMerged as jest.Mock).mockResolvedValue( + {} + ); + initCapture(); + listenToEvents(configState, executionState); + + const specRelative = `cypress/e2e/${spec}`; + const attempts = await getMultipleFixtures( + cypressVersion, + spec, + "testAfter" + ); + const screenshots = await getMultipleFixtures( + cypressVersion, + spec, + "screenshot" + ); + + const specAfter = await import( + getSingleFixturePath(cypressVersion, spec, "specAfter") + ); + const runResult = await import( + getSingleFixturePath(cypressVersion, spec, "runResult") + ); + + executionState.initInstance({ instanceId, spec: specRelative }); + attempts.forEach((attempt) => + executionState.addAttemptsData(attempt) + ); + screenshots.forEach((screenshot) => + executionState.addScreenshotsData(screenshot) + ); + + pubsub.emit("cypress:runResult", { + specRelative, + instanceId, + runResult, + }); + pubsub.emit("after:spec", { + spec: { + relative: specRelative, + }, + results: specAfter, + }); + + await getReportResultsTask( + instanceId, + executionState, + configState, + "", + undefined + ); + const actualAPIPayload = ( + api.reportInstanceResultsMerged as jest.Mock + ).mock.calls[0][1]; + + const expectedAPIPayload = await import(getAPIPayloadPath(spec)); + + expect(actualAPIPayload.tests).toMatchObject( + expectedAPIPayload.tests + ); + + expect(actualAPIPayload.results).toMatchObject( + expectedAPIPayload.results + ); + }); + }); + }); + }); + }); +}); diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/runResult.json new file mode 100644 index 0000000..5ac93b0 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/runResult.json @@ -0,0 +1 @@ +{"status":"finished","startedTestsAt":"2023-09-18T23:38:17.817Z","endedTestsAt":"2023-09-18T23:38:21.625Z","totalDuration":1018,"totalSuites":1,"totalTests":1,"totalPassed":1,"totalPending":0,"totalFailed":1,"totalSkipped":0,"runs":[{"error":"Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at alreadyWritten (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:714:8)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:802:19\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.","stats":{"failures":1,"tests":0,"passes":0,"pending":0,"suites":0,"skipped":0,"duration":0,"startedAt":"2023-09-18T23:38:21.625Z","endedAt":"2023-09-18T23:38:21.625Z"},"hooks":null,"tests":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/crash.spec.js.mp4","reporterStats":null,"spec":{"fileExtension":".js","baseName":"crash.spec.js","fileName":"crash","specFileExtension":".spec.js","relativeToCommonRoot":"crash.spec.js","specType":"integration","name":"cypress/e2e/crash.spec.js","relative":"cypress/e2e/crash.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/crash.spec.js"},"shouldUploadVideo":true}],"browserPath":"","browserName":"electron","browserVersion":"106.0.5249.51","osName":"darwin","osVersion":"22.1.0","cypressVersion":"12.17.4","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud","rawJson":{"video":true,"e2e":{"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]"},"component":{"specPattern":["pages/__tests__/*.spec.tsx"],"setupNodeEvents":"[Function setupNodeEvents]","devServer":{"framework":"next","bundler":"webpack"}},"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","envFile":{},"projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud"},"morgan":false,"isTextTerminal":true,"socketId":"tr1yo9weg8","report":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":59149},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":59159,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","supportFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":32,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","videoUploadOnPasses":true,"viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"additionalIgnorePattern":[],"autoOpen":false,"browsers":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106}],"clientRoute":"/__/","cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app","devServerPublicPathRoute":"/__cypress/src","hosts":null,"isInteractive":true,"namespace":"__cypress","reporterRoute":"/__cypress/reporter","socketIoCookie":"__socket","socketIoRoute":"/__socket","version":"12.17.4","cypressEnv":"production","resolved":{"animationDistanceThreshold":{"value":5,"from":"default"},"arch":{"value":"arm64","from":"default"},"baseUrl":{"value":"https://todomvc.com/examples/vanillajs","from":"config"},"blockHosts":{"value":null,"from":"default"},"chromeWebSecurity":{"value":true,"from":"default"},"clientCertificates":{"value":[],"from":"default"},"defaultCommandTimeout":{"value":4000,"from":"default"},"downloadsFolder":{"value":"cypress/downloads","from":"default"},"env":{"currents_ws":{"value":59149,"from":"cli"}},"execTimeout":{"value":60000,"from":"default"},"experimentalCspAllowList":{"value":false,"from":"default"},"experimentalFetchPolyfill":{"value":false,"from":"default"},"experimentalInteractiveRunEvents":{"value":false,"from":"default"},"experimentalRunAllSpecs":{"value":false,"from":"default"},"experimentalMemoryManagement":{"value":false,"from":"default"},"experimentalModifyObstructiveThirdPartyCode":{"value":false,"from":"default"},"experimentalSkipDomainInjection":{"value":null,"from":"default"},"experimentalOriginDependencies":{"value":false,"from":"default"},"experimentalSourceRewriting":{"value":false,"from":"default"},"experimentalSingleTabRunMode":{"value":false,"from":"default"},"experimentalStudio":{"value":false,"from":"default"},"experimentalWebKitSupport":{"value":false,"from":"default"},"fileServerFolder":{"value":"","from":"default"},"fixturesFolder":{"value":"cypress/fixtures","from":"default"},"excludeSpecPattern":{"value":"*.hot-update.js","from":"default"},"includeShadowDom":{"value":false,"from":"default"},"keystrokeDelay":{"value":0,"from":"default"},"modifyObstructiveCode":{"value":true,"from":"default"},"nodeVersion":{"from":"default"},"numTestsKeptInMemory":{"value":0,"from":"config"},"platform":{"value":"darwin","from":"default"},"pageLoadTimeout":{"value":60000,"from":"default"},"port":{"value":null,"from":"default"},"projectId":{"value":"l4zuz8","from":"config"},"redirectionLimit":{"value":20,"from":"default"},"reporter":{"value":"spec","from":"default"},"reporterOptions":{"value":null,"from":"default"},"requestTimeout":{"value":5000,"from":"default"},"resolvedNodePath":{"value":null,"from":"default"},"resolvedNodeVersion":{"value":null,"from":"default"},"responseTimeout":{"value":30000,"from":"default"},"retries":{"value":{"runMode":0,"openMode":0},"from":"default"},"screenshotOnRunFailure":{"value":true,"from":"default"},"screenshotsFolder":{"value":"cypress/screenshots","from":"default"},"slowTestThreshold":{"value":10000,"from":"default"},"scrollBehavior":{"value":"top","from":"default"},"supportFile":{"value":"cypress/support/e2e.ts","from":"config"},"supportFolder":{"value":false,"from":"default"},"taskTimeout":{"value":60000,"from":"default"},"testIsolation":{"value":true,"from":"default"},"trashAssetsBeforeRuns":{"value":false,"from":"cli"},"userAgent":{"value":null,"from":"default"},"video":{"value":true,"from":"default"},"videoCompression":{"value":32,"from":"default"},"videosFolder":{"value":"cypress/videos","from":"default"},"videoUploadOnPasses":{"value":true,"from":"default"},"viewportHeight":{"value":660,"from":"default"},"viewportWidth":{"value":1000,"from":"default"},"waitForAnimations":{"value":true,"from":"default"},"watchForFileChanges":{"value":false,"from":"config"},"specPattern":{"value":"cypress/e2e/*.js","from":"config"},"browsers":{"value":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106,"isHeadless":true,"isHeaded":false}],"from":"runtime"},"hosts":{"value":null,"from":"default"},"isInteractive":{"value":true,"from":"default"},"configFile":{"value":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","from":"plugin"},"testingType":{"value":"e2e","from":"plugin"}},"remote":{"origin":"https://todomvc.com","strategy":"http","fileServer":null,"domainName":"todomvc.com","props":{"port":"443","protocol":"https:","subdomain":null,"domain":"todomvc","tld":"com"}},"browser":null,"specs":[],"proxyUrl":"http://localhost:59159","browserUrl":"https://todomvc.com/__/","reporterUrl":"https://todomvc.com/__cypress/reporter","proxyServer":"http://localhost:59159","state":{}}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/specAfter.json new file mode 100644 index 0000000..263c782 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/crash.spec.js/specAfter.json @@ -0,0 +1 @@ +{"error":"Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at alreadyWritten (/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:714:8)\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:802:19\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.","stats":{"failures":1,"tests":0,"passes":0,"pending":0,"suites":0,"skipped":0,"wallClockDuration":0,"wallClockStartedAt":"2023-09-18T23:38:21.625Z","wallClockEndedAt":"2023-09-18T23:38:21.625Z"},"hooks":null,"tests":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/crash.spec.js.mp4","screenshots":[],"reporterStats":null,"spec":{"fileExtension":".js","baseName":"crash.spec.js","fileName":"crash","specFileExtension":".spec.js","relativeToCommonRoot":"crash.spec.js","specType":"integration","name":"cypress/e2e/crash.spec.js","relative":"cypress/e2e/crash.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/crash.spec.js"}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/runResult.json new file mode 100644 index 0000000..7b21d11 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/runResult.json @@ -0,0 +1 @@ +{"status":"finished","startedTestsAt":"2023-09-18T23:38:39.001Z","endedTestsAt":"2023-09-18T23:38:42.813Z","totalDuration":1035,"totalSuites":2,"totalTests":3,"totalPassed":0,"totalPending":0,"totalFailed":2,"totalSkipped":1,"runs":[{"stats":{"suites":1,"tests":1,"passes":0,"pending":0,"skipped":0,"failures":1,"duration":627,"startedAt":"2023-09-18T23:38:39.001Z","endedAt":"2023-09-18T23:38:39.628Z"},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2023-09-18T23:38:39.002Z","end":"2023-09-18T23:38:39.631Z","duration":629},"hooks":[{"hookName":"before each","title":["\"before each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}"},{"hookName":"before each","title":["\"before each\" hook"],"body":"function () {\n cy.visit(\"/\");\n}"},{"hookName":"after each","title":["\"after each\" hook"],"body":"function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }"},{"hookName":"after each","title":["\"after each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}"},{"hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"title":["Failed","should fail"],"state":"failed","body":"function () {\n expect(fail).to.be.true;\n }","displayError":"ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)","attempts":[{"state":"failed","error":{"name":"ReferenceError","message":"fail is not defined","stack":" at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)","codeFrame":{"line":3,"column":12,"originalFile":"cypress/e2e/failed.spec.js","relativeFile":"examples/webapp/cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","frame":" 1 | describe(\"Failed\", function () {\n 2 | it(\"should fail\", function () {\n> 3 | expect(fail).to.be.true;\n | ^\n 4 | });\n 5 | });\n 6 | ","language":"js"}},"videoTimestamp":2213,"duration":609,"startedAt":"2023-09-18T23:38:39.005Z","screenshots":[{"name":null,"takenAt":"2023-09-18T23:38:39.368Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","height":1440,"width":2560}]}]}],"error":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/failed.spec.js.mp4","spec":{"fileExtension":".js","baseName":"failed.spec.js","fileName":"failed","specFileExtension":".spec.js","relativeToCommonRoot":"failed.spec.js","specType":"integration","name":"cypress/e2e/failed.spec.js","relative":"cypress/e2e/failed.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js"},"shouldUploadVideo":true}],"browserPath":"","browserName":"electron","browserVersion":"106.0.5249.51","osName":"darwin","osVersion":"22.1.0","cypressVersion":"12.17.4","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud","rawJson":{"video":true,"e2e":{"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]"},"component":{"specPattern":["pages/__tests__/*.spec.tsx"],"setupNodeEvents":"[Function setupNodeEvents]","devServer":{"framework":"next","bundler":"webpack"}},"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","envFile":{},"projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud"},"morgan":false,"isTextTerminal":true,"socketId":"g4wfg2qk9f","report":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":59149},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":59392,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","supportFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":32,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","videoUploadOnPasses":true,"viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"additionalIgnorePattern":[],"autoOpen":false,"browsers":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106}],"clientRoute":"/__/","cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app","devServerPublicPathRoute":"/__cypress/src","hosts":null,"isInteractive":true,"namespace":"__cypress","reporterRoute":"/__cypress/reporter","socketIoCookie":"__socket","socketIoRoute":"/__socket","version":"12.17.4","cypressEnv":"production","resolved":{"animationDistanceThreshold":{"value":5,"from":"default"},"arch":{"value":"arm64","from":"default"},"baseUrl":{"value":"https://todomvc.com/examples/vanillajs","from":"config"},"blockHosts":{"value":null,"from":"default"},"chromeWebSecurity":{"value":true,"from":"default"},"clientCertificates":{"value":[],"from":"default"},"defaultCommandTimeout":{"value":4000,"from":"default"},"downloadsFolder":{"value":"cypress/downloads","from":"default"},"env":{"currents_ws":{"value":59149,"from":"cli"}},"execTimeout":{"value":60000,"from":"default"},"experimentalCspAllowList":{"value":false,"from":"default"},"experimentalFetchPolyfill":{"value":false,"from":"default"},"experimentalInteractiveRunEvents":{"value":false,"from":"default"},"experimentalRunAllSpecs":{"value":false,"from":"default"},"experimentalMemoryManagement":{"value":false,"from":"default"},"experimentalModifyObstructiveThirdPartyCode":{"value":false,"from":"default"},"experimentalSkipDomainInjection":{"value":null,"from":"default"},"experimentalOriginDependencies":{"value":false,"from":"default"},"experimentalSourceRewriting":{"value":false,"from":"default"},"experimentalSingleTabRunMode":{"value":false,"from":"default"},"experimentalStudio":{"value":false,"from":"default"},"experimentalWebKitSupport":{"value":false,"from":"default"},"fileServerFolder":{"value":"","from":"default"},"fixturesFolder":{"value":"cypress/fixtures","from":"default"},"excludeSpecPattern":{"value":"*.hot-update.js","from":"default"},"includeShadowDom":{"value":false,"from":"default"},"keystrokeDelay":{"value":0,"from":"default"},"modifyObstructiveCode":{"value":true,"from":"default"},"nodeVersion":{"from":"default"},"numTestsKeptInMemory":{"value":0,"from":"config"},"platform":{"value":"darwin","from":"default"},"pageLoadTimeout":{"value":60000,"from":"default"},"port":{"value":null,"from":"default"},"projectId":{"value":"l4zuz8","from":"config"},"redirectionLimit":{"value":20,"from":"default"},"reporter":{"value":"spec","from":"default"},"reporterOptions":{"value":null,"from":"default"},"requestTimeout":{"value":5000,"from":"default"},"resolvedNodePath":{"value":null,"from":"default"},"resolvedNodeVersion":{"value":null,"from":"default"},"responseTimeout":{"value":30000,"from":"default"},"retries":{"value":{"runMode":0,"openMode":0},"from":"default"},"screenshotOnRunFailure":{"value":true,"from":"default"},"screenshotsFolder":{"value":"cypress/screenshots","from":"default"},"slowTestThreshold":{"value":10000,"from":"default"},"scrollBehavior":{"value":"top","from":"default"},"supportFile":{"value":"cypress/support/e2e.ts","from":"config"},"supportFolder":{"value":false,"from":"default"},"taskTimeout":{"value":60000,"from":"default"},"testIsolation":{"value":true,"from":"default"},"trashAssetsBeforeRuns":{"value":false,"from":"cli"},"userAgent":{"value":null,"from":"default"},"video":{"value":true,"from":"default"},"videoCompression":{"value":32,"from":"default"},"videosFolder":{"value":"cypress/videos","from":"default"},"videoUploadOnPasses":{"value":true,"from":"default"},"viewportHeight":{"value":660,"from":"default"},"viewportWidth":{"value":1000,"from":"default"},"waitForAnimations":{"value":true,"from":"default"},"watchForFileChanges":{"value":false,"from":"config"},"specPattern":{"value":"cypress/e2e/*.js","from":"config"},"browsers":{"value":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106,"isHeadless":true,"isHeaded":false}],"from":"runtime"},"hosts":{"value":null,"from":"default"},"isInteractive":{"value":true,"from":"default"},"configFile":{"value":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","from":"plugin"},"testingType":{"value":"e2e","from":"plugin"}},"remote":{"origin":"https://todomvc.com","strategy":"http","fileServer":null,"domainName":"todomvc.com","props":{"port":"443","protocol":"https:","subdomain":null,"domain":"todomvc","tld":"com"}},"browser":null,"specs":[],"proxyUrl":"http://localhost:59392","browserUrl":"https://todomvc.com/__/","reporterUrl":"https://todomvc.com/__cypress/reporter","proxyServer":"http://localhost:59392","state":{}}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/screenshot_01.json new file mode 100644 index 0000000..f53a98c --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/screenshot_01.json @@ -0,0 +1 @@ +{"testAttemptIndex":0,"size":329668,"takenAt":"2023-09-18T23:38:39.368Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"failed.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","scaled":true,"blackout":[],"duration":222,"testId":"r3","height":1440,"width":2560} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/specAfter.json new file mode 100644 index 0000000..fd05878 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/specAfter.json @@ -0,0 +1 @@ +{"stats":{"suites":1,"tests":1,"passes":0,"pending":0,"skipped":0,"failures":1,"wallClockStartedAt":"2023-09-18T23:38:39.001Z","wallClockEndedAt":"2023-09-18T23:38:39.628Z","wallClockDuration":627},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2023-09-18T23:38:39.002Z","end":"2023-09-18T23:38:39.631Z","duration":629},"hooks":[{"hookId":"h1","hookName":"before each","title":["\"before each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}"},{"hookId":"h2","hookName":"before each","title":["\"before each\" hook"],"body":"function () {\n cy.visit(\"/\");\n}"},{"hookId":"h4","hookName":"after each","title":["\"after each\" hook"],"body":"function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }"},{"hookId":"h5","hookName":"after each","title":["\"after each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}"},{"hookId":"h3","hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"testId":"r3","title":["Failed","should fail"],"state":"failed","body":"function () {\n expect(fail).to.be.true;\n }","displayError":"ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)","attempts":[{"state":"failed","error":{"name":"ReferenceError","message":"fail is not defined","stack":" at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)","codeFrame":{"line":3,"column":12,"originalFile":"cypress/e2e/failed.spec.js","relativeFile":"examples/webapp/cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","frame":" 1 | describe(\"Failed\", function () {\n 2 | it(\"should fail\", function () {\n> 3 | expect(fail).to.be.true;\n | ^\n 4 | });\n 5 | });\n 6 | ","language":"js"}},"timings":{"lifecycle":28,"before each":[{"hookId":"h1","fnDuration":12,"afterFnDuration":0},{"hookId":"h2","fnDuration":318,"afterFnDuration":1}],"test":{"fnDuration":1,"afterFnDuration":224},"after each":[{"hookId":"h4","fnDuration":12,"afterFnDuration":0},{"hookId":"h5","fnDuration":7,"afterFnDuration":0}],"after all":[{"hookId":"h3","fnDuration":3,"afterFnDuration":0}]},"failedFromHookId":null,"wallClockStartedAt":"2023-09-18T23:38:39.005Z","wallClockDuration":609,"videoTimestamp":2213}]}],"error":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/failed.spec.js.mp4","screenshots":[{"screenshotId":"c68ku","name":null,"testId":"r3","testAttemptIndex":0,"takenAt":"2023-09-18T23:38:39.368Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","height":1440,"width":2560}],"spec":{"fileExtension":".js","baseName":"failed.spec.js","fileName":"failed","specFileExtension":".spec.js","relativeToCommonRoot":"failed.spec.js","specType":"integration","name":"cypress/e2e/failed.spec.js","relative":"cypress/e2e/failed.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js"}} \ No newline at end of file diff --git a/examples/webapp/afterTest_13.2.0_Failed_should fail_0.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/testAfter_00.json similarity index 78% rename from examples/webapp/afterTest_13.2.0_Failed_should fail_0.json rename to packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/testAfter_00.json index 4512cd3..36ce740 100644 --- a/examples/webapp/afterTest_13.2.0_Failed_should fail_0.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/failed.spec.js/testAfter_00.json @@ -1 +1 @@ -{"async":false,"body":"function () {\n expect(fail).to.be.true;\n }","duration":860,"err":{"message":"fail is not defined","name":"ReferenceError","stack":"ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)","parsedStack":[{"message":"ReferenceError: fail is not defined","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js","originalFile":"webpack://web/./cypress/e2e/failed.spec.js","relativeFile":"cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","line":3,"column":11,"whitespace":" "}],"codeFrame":{"line":3,"column":12,"originalFile":"cypress/e2e/failed.spec.js","relativeFile":"examples/webapp/cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","frame":" 1 | describe(\"Failed\", function () {\n 2 | it(\"should fail\", function () {\n> 3 | expect(fail).to.be.true;\n | ^\n 4 | });\n 5 | });\n 6 | ","language":"js"}},"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js","originalFile":"webpack://web/./cypress/e2e/failed.spec.js","relativeFile":"cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","line":2,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:14:12)\n at eval ()"},"order":1,"pending":false,"retries":0,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":22,"before each":[{"hookId":"h1","fnDuration":9,"afterFnDuration":1},{"hookId":"h2","fnDuration":600,"afterFnDuration":0}],"test":{"fnDuration":1,"afterFnDuration":226},"after each":[{"hookId":"h4","fnDuration":14,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-14T22:42:02.057Z","title":"should fail","currentRetry":0,"fullTitle":"Failed should fail"} \ No newline at end of file +{"async":false,"body":"function () {\n expect(fail).to.be.true;\n }","duration":585,"err":{"message":"fail is not defined","name":"ReferenceError","stack":"ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)","parsedStack":[{"message":"ReferenceError: fail is not defined","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js","originalFile":"webpack://web/./cypress/e2e/failed.spec.js","relativeFile":"cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","line":3,"column":11,"whitespace":" "}],"codeFrame":{"line":3,"column":12,"originalFile":"cypress/e2e/failed.spec.js","relativeFile":"examples/webapp/cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","frame":" 1 | describe(\"Failed\", function () {\n 2 | it(\"should fail\", function () {\n> 3 | expect(fail).to.be.true;\n | ^\n 4 | });\n 5 | });\n 6 | ","language":"js"}},"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js","originalFile":"webpack://web/./cypress/e2e/failed.spec.js","relativeFile":"cypress/e2e/failed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","line":2,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/failed.spec.js:14:12)\n at eval ()"},"order":1,"pending":false,"retries":0,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":28,"before each":[{"hookId":"h1","fnDuration":12,"afterFnDuration":0},{"hookId":"h2","fnDuration":318,"afterFnDuration":1}],"test":{"fnDuration":1,"afterFnDuration":224},"after each":[{"hookId":"h4","fnDuration":12,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-18T23:38:39.005Z","title":"should fail","currentRetry":0,"fullTitle":"Failed should fail"} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/runResult.json new file mode 100644 index 0000000..546b201 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/runResult.json @@ -0,0 +1 @@ +{"status":"finished","startedTestsAt":"2023-09-18T23:38:26.949Z","endedTestsAt":"2023-09-18T23:38:30.846Z","totalDuration":1023,"totalSuites":2,"totalTests":2,"totalPassed":1,"totalPending":1,"totalFailed":0,"totalSkipped":0,"runs":[{"stats":{"suites":1,"tests":1,"passes":1,"pending":0,"skipped":0,"failures":0,"duration":981,"startedAt":"2023-09-18T23:38:26.949Z","endedAt":"2023-09-18T23:38:27.930Z"},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0,"start":"2023-09-18T23:38:26.951Z","end":"2023-09-18T23:38:27.932Z","duration":981},"hooks":[{"hookName":"before each","title":["\"before each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}"},{"hookName":"before each","title":["\"before each\" hook"],"body":"function () {\n cy.visit(\"/\");\n}"},{"hookName":"after each","title":["\"after each\" hook"],"body":"function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }"},{"hookName":"after each","title":["\"after each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}"},{"hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"title":["Passed","should pass"],"state":"passed","body":"function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }","displayError":null,"attempts":[{"state":"passed","error":null,"videoTimestamp":2102,"duration":976,"startedAt":"2023-09-18T23:38:26.953Z","screenshots":[{"name":null,"takenAt":"2023-09-18T23:38:27.376Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","height":1320,"width":2000}]}]}],"error":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4","spec":{"fileExtension":".js","baseName":"passed.spec.js","fileName":"passed","specFileExtension":".spec.js","relativeToCommonRoot":"passed.spec.js","specType":"integration","name":"cypress/e2e/passed.spec.js","relative":"cypress/e2e/passed.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js"},"shouldUploadVideo":true}],"browserPath":"","browserName":"electron","browserVersion":"106.0.5249.51","osName":"darwin","osVersion":"22.1.0","cypressVersion":"12.17.4","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud","rawJson":{"video":true,"e2e":{"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]"},"component":{"specPattern":["pages/__tests__/*.spec.tsx"],"setupNodeEvents":"[Function setupNodeEvents]","devServer":{"framework":"next","bundler":"webpack"}},"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","envFile":{},"projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud"},"morgan":false,"isTextTerminal":true,"socketId":"ekjyy7v5f7","report":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":59149},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":59278,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","supportFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":32,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","videoUploadOnPasses":true,"viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"additionalIgnorePattern":[],"autoOpen":false,"browsers":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106}],"clientRoute":"/__/","cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app","devServerPublicPathRoute":"/__cypress/src","hosts":null,"isInteractive":true,"namespace":"__cypress","reporterRoute":"/__cypress/reporter","socketIoCookie":"__socket","socketIoRoute":"/__socket","version":"12.17.4","cypressEnv":"production","resolved":{"animationDistanceThreshold":{"value":5,"from":"default"},"arch":{"value":"arm64","from":"default"},"baseUrl":{"value":"https://todomvc.com/examples/vanillajs","from":"config"},"blockHosts":{"value":null,"from":"default"},"chromeWebSecurity":{"value":true,"from":"default"},"clientCertificates":{"value":[],"from":"default"},"defaultCommandTimeout":{"value":4000,"from":"default"},"downloadsFolder":{"value":"cypress/downloads","from":"default"},"env":{"currents_ws":{"value":59149,"from":"cli"}},"execTimeout":{"value":60000,"from":"default"},"experimentalCspAllowList":{"value":false,"from":"default"},"experimentalFetchPolyfill":{"value":false,"from":"default"},"experimentalInteractiveRunEvents":{"value":false,"from":"default"},"experimentalRunAllSpecs":{"value":false,"from":"default"},"experimentalMemoryManagement":{"value":false,"from":"default"},"experimentalModifyObstructiveThirdPartyCode":{"value":false,"from":"default"},"experimentalSkipDomainInjection":{"value":null,"from":"default"},"experimentalOriginDependencies":{"value":false,"from":"default"},"experimentalSourceRewriting":{"value":false,"from":"default"},"experimentalSingleTabRunMode":{"value":false,"from":"default"},"experimentalStudio":{"value":false,"from":"default"},"experimentalWebKitSupport":{"value":false,"from":"default"},"fileServerFolder":{"value":"","from":"default"},"fixturesFolder":{"value":"cypress/fixtures","from":"default"},"excludeSpecPattern":{"value":"*.hot-update.js","from":"default"},"includeShadowDom":{"value":false,"from":"default"},"keystrokeDelay":{"value":0,"from":"default"},"modifyObstructiveCode":{"value":true,"from":"default"},"nodeVersion":{"from":"default"},"numTestsKeptInMemory":{"value":0,"from":"config"},"platform":{"value":"darwin","from":"default"},"pageLoadTimeout":{"value":60000,"from":"default"},"port":{"value":null,"from":"default"},"projectId":{"value":"l4zuz8","from":"config"},"redirectionLimit":{"value":20,"from":"default"},"reporter":{"value":"spec","from":"default"},"reporterOptions":{"value":null,"from":"default"},"requestTimeout":{"value":5000,"from":"default"},"resolvedNodePath":{"value":null,"from":"default"},"resolvedNodeVersion":{"value":null,"from":"default"},"responseTimeout":{"value":30000,"from":"default"},"retries":{"value":{"runMode":0,"openMode":0},"from":"default"},"screenshotOnRunFailure":{"value":true,"from":"default"},"screenshotsFolder":{"value":"cypress/screenshots","from":"default"},"slowTestThreshold":{"value":10000,"from":"default"},"scrollBehavior":{"value":"top","from":"default"},"supportFile":{"value":"cypress/support/e2e.ts","from":"config"},"supportFolder":{"value":false,"from":"default"},"taskTimeout":{"value":60000,"from":"default"},"testIsolation":{"value":true,"from":"default"},"trashAssetsBeforeRuns":{"value":false,"from":"cli"},"userAgent":{"value":null,"from":"default"},"video":{"value":true,"from":"default"},"videoCompression":{"value":32,"from":"default"},"videosFolder":{"value":"cypress/videos","from":"default"},"videoUploadOnPasses":{"value":true,"from":"default"},"viewportHeight":{"value":660,"from":"default"},"viewportWidth":{"value":1000,"from":"default"},"waitForAnimations":{"value":true,"from":"default"},"watchForFileChanges":{"value":false,"from":"config"},"specPattern":{"value":"cypress/e2e/*.js","from":"config"},"browsers":{"value":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106,"isHeadless":true,"isHeaded":false}],"from":"runtime"},"hosts":{"value":null,"from":"default"},"isInteractive":{"value":true,"from":"default"},"configFile":{"value":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","from":"plugin"},"testingType":{"value":"e2e","from":"plugin"}},"remote":{"origin":"https://todomvc.com","strategy":"http","fileServer":null,"domainName":"todomvc.com","props":{"port":"443","protocol":"https:","subdomain":null,"domain":"todomvc","tld":"com"}},"browser":null,"specs":[],"proxyUrl":"http://localhost:59278","browserUrl":"https://todomvc.com/__/","reporterUrl":"https://todomvc.com/__cypress/reporter","proxyServer":"http://localhost:59278","state":{}}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/screenshot_01.json new file mode 100644 index 0000000..7ada6af --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/screenshot_01.json @@ -0,0 +1 @@ +{"testAttemptIndex":0,"size":236374,"takenAt":"2023-09-18T23:38:27.376Z","dimensions":{"width":2000,"height":1320},"multipart":true,"pixelRatio":2,"name":null,"specName":"passed.spec.js","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","scaled":false,"blackout":[],"duration":529,"testId":"r3","height":1320,"width":2000} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/specAfter.json new file mode 100644 index 0000000..cef6bde --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/specAfter.json @@ -0,0 +1 @@ +{"stats":{"suites":1,"tests":1,"passes":1,"pending":0,"skipped":0,"failures":0,"wallClockStartedAt":"2023-09-18T23:38:26.949Z","wallClockEndedAt":"2023-09-18T23:38:27.930Z","wallClockDuration":981},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0,"start":"2023-09-18T23:38:26.951Z","end":"2023-09-18T23:38:27.932Z","duration":981},"hooks":[{"hookId":"h1","hookName":"before each","title":["\"before each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}"},{"hookId":"h2","hookName":"before each","title":["\"before each\" hook"],"body":"function () {\n cy.visit(\"/\");\n}"},{"hookId":"h4","hookName":"after each","title":["\"after each\" hook"],"body":"function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }"},{"hookId":"h5","hookName":"after each","title":["\"after each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}"},{"hookId":"h3","hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"testId":"r3","title":["Passed","should pass"],"state":"passed","body":"function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }","displayError":null,"attempts":[{"state":"passed","error":null,"timings":{"lifecycle":27,"before each":[{"hookId":"h1","fnDuration":8,"afterFnDuration":0},{"hookId":"h2","fnDuration":323,"afterFnDuration":0}],"test":{"fnDuration":587,"afterFnDuration":0},"after each":[{"hookId":"h4","fnDuration":12,"afterFnDuration":0},{"hookId":"h5","fnDuration":5,"afterFnDuration":1}],"after all":[{"hookId":"h3","fnDuration":3,"afterFnDuration":1}]},"failedFromHookId":null,"wallClockStartedAt":"2023-09-18T23:38:26.953Z","wallClockDuration":976,"videoTimestamp":2102}]}],"error":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4","screenshots":[{"screenshotId":"dp4ir","name":null,"testId":"r3","testAttemptIndex":0,"takenAt":"2023-09-18T23:38:27.376Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","height":1320,"width":2000}],"spec":{"fileExtension":".js","baseName":"passed.spec.js","fileName":"passed","specFileExtension":".spec.js","relativeToCommonRoot":"passed.spec.js","specType":"integration","name":"cypress/e2e/passed.spec.js","relative":"cypress/e2e/passed.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js"}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/testAfter_00.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/testAfter_00.json new file mode 100644 index 0000000..d097464 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/passed.spec.js/testAfter_00.json @@ -0,0 +1 @@ +{"async":false,"body":"function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }","duration":946,"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js","originalFile":"webpack://web/./cypress/e2e/passed.spec.js","relativeFile":"cypress/e2e/passed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js","line":2,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:18:12)\n at eval ()"},"order":1,"pending":false,"retries":0,"state":"passed","sync":true,"timedOut":false,"timings":{"lifecycle":27,"before each":[{"hookId":"h1","fnDuration":8,"afterFnDuration":0},{"hookId":"h2","fnDuration":323,"afterFnDuration":0}],"test":{"fnDuration":587,"afterFnDuration":0},"after each":[{"hookId":"h4","fnDuration":12,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-18T23:38:26.953Z","title":"should pass","currentRetry":0,"fullTitle":"Passed should pass"} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/runResult.json new file mode 100644 index 0000000..9e876ed --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/runResult.json @@ -0,0 +1 @@ +{"status":"finished","startedTestsAt":"2023-09-18T23:38:26.949Z","endedTestsAt":"2023-09-18T23:38:30.846Z","totalDuration":1023,"totalSuites":2,"totalTests":2,"totalPassed":1,"totalPending":1,"totalFailed":0,"totalSkipped":0,"runs":[{"stats":{"suites":1,"tests":1,"passes":0,"pending":1,"skipped":0,"failures":0,"duration":42,"startedAt":"2023-09-18T23:38:30.804Z","endedAt":"2023-09-18T23:38:30.846Z"},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":1,"failures":0,"start":"2023-09-18T23:38:30.805Z","end":"2023-09-18T23:38:30.848Z","duration":43},"hooks":[{"hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"title":["Pending","Pending test"],"state":"pending","body":"() => {\n expect(true).to.be.true;\n }","displayError":null,"attempts":[{"state":"pending","error":null,"videoTimestamp":855,"duration":30,"startedAt":"2023-09-18T23:38:30.814Z","screenshots":[]}]}],"error":null,"video":null,"spec":{"fileExtension":".js","baseName":"pending.spec.js","fileName":"pending","specFileExtension":".spec.js","relativeToCommonRoot":"pending.spec.js","specType":"integration","name":"cypress/e2e/pending.spec.js","relative":"cypress/e2e/pending.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js"},"shouldUploadVideo":true}],"browserPath":"","browserName":"electron","browserVersion":"106.0.5249.51","osName":"darwin","osVersion":"22.1.0","cypressVersion":"12.17.4","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud","rawJson":{"video":true,"e2e":{"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]"},"component":{"specPattern":["pages/__tests__/*.spec.tsx"],"setupNodeEvents":"[Function setupNodeEvents]","devServer":{"framework":"next","bundler":"webpack"}},"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","envFile":{},"projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud"},"morgan":false,"isTextTerminal":true,"socketId":"ekjyy7v5f7","report":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":59149},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":59278,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","supportFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":32,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","videoUploadOnPasses":true,"viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"additionalIgnorePattern":[],"autoOpen":false,"browsers":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106}],"clientRoute":"/__/","cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app","devServerPublicPathRoute":"/__cypress/src","hosts":null,"isInteractive":true,"namespace":"__cypress","reporterRoute":"/__cypress/reporter","socketIoCookie":"__socket","socketIoRoute":"/__socket","version":"12.17.4","cypressEnv":"production","resolved":{"animationDistanceThreshold":{"value":5,"from":"default"},"arch":{"value":"arm64","from":"default"},"baseUrl":{"value":"https://todomvc.com/examples/vanillajs","from":"config"},"blockHosts":{"value":null,"from":"default"},"chromeWebSecurity":{"value":true,"from":"default"},"clientCertificates":{"value":[],"from":"default"},"defaultCommandTimeout":{"value":4000,"from":"default"},"downloadsFolder":{"value":"cypress/downloads","from":"default"},"env":{"currents_ws":{"value":59149,"from":"cli"}},"execTimeout":{"value":60000,"from":"default"},"experimentalCspAllowList":{"value":false,"from":"default"},"experimentalFetchPolyfill":{"value":false,"from":"default"},"experimentalInteractiveRunEvents":{"value":false,"from":"default"},"experimentalRunAllSpecs":{"value":false,"from":"default"},"experimentalMemoryManagement":{"value":false,"from":"default"},"experimentalModifyObstructiveThirdPartyCode":{"value":false,"from":"default"},"experimentalSkipDomainInjection":{"value":null,"from":"default"},"experimentalOriginDependencies":{"value":false,"from":"default"},"experimentalSourceRewriting":{"value":false,"from":"default"},"experimentalSingleTabRunMode":{"value":false,"from":"default"},"experimentalStudio":{"value":false,"from":"default"},"experimentalWebKitSupport":{"value":false,"from":"default"},"fileServerFolder":{"value":"","from":"default"},"fixturesFolder":{"value":"cypress/fixtures","from":"default"},"excludeSpecPattern":{"value":"*.hot-update.js","from":"default"},"includeShadowDom":{"value":false,"from":"default"},"keystrokeDelay":{"value":0,"from":"default"},"modifyObstructiveCode":{"value":true,"from":"default"},"nodeVersion":{"from":"default"},"numTestsKeptInMemory":{"value":0,"from":"config"},"platform":{"value":"darwin","from":"default"},"pageLoadTimeout":{"value":60000,"from":"default"},"port":{"value":null,"from":"default"},"projectId":{"value":"l4zuz8","from":"config"},"redirectionLimit":{"value":20,"from":"default"},"reporter":{"value":"spec","from":"default"},"reporterOptions":{"value":null,"from":"default"},"requestTimeout":{"value":5000,"from":"default"},"resolvedNodePath":{"value":null,"from":"default"},"resolvedNodeVersion":{"value":null,"from":"default"},"responseTimeout":{"value":30000,"from":"default"},"retries":{"value":{"runMode":0,"openMode":0},"from":"default"},"screenshotOnRunFailure":{"value":true,"from":"default"},"screenshotsFolder":{"value":"cypress/screenshots","from":"default"},"slowTestThreshold":{"value":10000,"from":"default"},"scrollBehavior":{"value":"top","from":"default"},"supportFile":{"value":"cypress/support/e2e.ts","from":"config"},"supportFolder":{"value":false,"from":"default"},"taskTimeout":{"value":60000,"from":"default"},"testIsolation":{"value":true,"from":"default"},"trashAssetsBeforeRuns":{"value":false,"from":"cli"},"userAgent":{"value":null,"from":"default"},"video":{"value":true,"from":"default"},"videoCompression":{"value":32,"from":"default"},"videosFolder":{"value":"cypress/videos","from":"default"},"videoUploadOnPasses":{"value":true,"from":"default"},"viewportHeight":{"value":660,"from":"default"},"viewportWidth":{"value":1000,"from":"default"},"waitForAnimations":{"value":true,"from":"default"},"watchForFileChanges":{"value":false,"from":"config"},"specPattern":{"value":"cypress/e2e/*.js","from":"config"},"browsers":{"value":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106,"isHeadless":true,"isHeaded":false}],"from":"runtime"},"hosts":{"value":null,"from":"default"},"isInteractive":{"value":true,"from":"default"},"configFile":{"value":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","from":"plugin"},"testingType":{"value":"e2e","from":"plugin"}},"remote":{"origin":"https://todomvc.com","strategy":"http","fileServer":null,"domainName":"todomvc.com","props":{"port":"443","protocol":"https:","subdomain":null,"domain":"todomvc","tld":"com"}},"browser":null,"specs":[],"proxyUrl":"http://localhost:59278","browserUrl":"https://todomvc.com/__/","reporterUrl":"https://todomvc.com/__cypress/reporter","proxyServer":"http://localhost:59278","state":{}}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/specAfter.json new file mode 100644 index 0000000..0bc8e74 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/pending.spec.js/specAfter.json @@ -0,0 +1 @@ +{"stats":{"suites":1,"tests":1,"passes":0,"pending":1,"skipped":0,"failures":0,"wallClockStartedAt":"2023-09-18T23:38:30.804Z","wallClockEndedAt":"2023-09-18T23:38:30.846Z","wallClockDuration":42},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":1,"failures":0,"start":"2023-09-18T23:38:30.805Z","end":"2023-09-18T23:38:30.848Z","duration":43},"hooks":[{"hookId":"h3","hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"testId":"r3","title":["Pending","Pending test"],"state":"pending","body":"() => {\n expect(true).to.be.true;\n }","displayError":null,"attempts":[{"state":"pending","error":null,"timings":{"lifecycle":25,"after all":[{"hookId":"h3","fnDuration":5,"afterFnDuration":0}]},"failedFromHookId":null,"wallClockStartedAt":"2023-09-18T23:38:30.814Z","wallClockDuration":30,"videoTimestamp":855}]}],"error":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/pending.spec.js.mp4","screenshots":[],"spec":{"fileExtension":".js","baseName":"pending.spec.js","fileName":"pending","specFileExtension":".spec.js","relativeToCommonRoot":"pending.spec.js","specType":"integration","name":"cypress/e2e/pending.spec.js","relative":"cypress/e2e/pending.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js"}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/runResult.json new file mode 100644 index 0000000..0ed9f2f --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/runResult.json @@ -0,0 +1 @@ +{"status":"finished","startedTestsAt":"2023-09-18T23:38:17.817Z","endedTestsAt":"2023-09-18T23:38:21.625Z","totalDuration":1018,"totalSuites":1,"totalTests":1,"totalPassed":1,"totalPending":0,"totalFailed":1,"totalSkipped":0,"runs":[{"stats":{"suites":1,"tests":1,"passes":1,"pending":0,"skipped":0,"failures":0,"duration":1018,"startedAt":"2023-09-18T23:38:17.817Z","endedAt":"2023-09-18T23:38:18.835Z"},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0,"start":"2023-09-18T23:38:17.819Z","end":"2023-09-18T23:38:18.838Z","duration":1019},"hooks":[{"hookName":"before each","title":["\"before each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}"},{"hookName":"before each","title":["\"before each\" hook"],"body":"function () {\n cy.visit(\"/\");\n}"},{"hookName":"after each","title":["\"after each\" hook"],"body":"function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }"},{"hookName":"after each","title":["\"after each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}"},{"hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"title":["Retries","Runs a test with retries"],"state":"passed","body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","displayError":null,"attempts":[{"state":"failed","error":{"name":"Error","message":"oh no!","stack":" at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"videoTimestamp":2253,"duration":601,"startedAt":"2023-09-18T23:38:17.821Z","screenshots":[{"name":null,"takenAt":"2023-09-18T23:38:18.184Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png","height":1440,"width":2560}]},{"state":"failed","error":{"name":"Error","message":"oh no!","stack":" at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"videoTimestamp":2871,"duration":274,"startedAt":"2023-09-18T23:38:18.439Z","screenshots":[{"name":null,"takenAt":"2023-09-18T23:38:18.522Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png","height":1440,"width":2560}]},{"state":"passed","error":null,"videoTimestamp":3153,"duration":113,"startedAt":"2023-09-18T23:38:18.721Z","screenshots":[]}]}],"error":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/retries.spec.js.mp4","spec":{"fileExtension":".js","baseName":"retries.spec.js","fileName":"retries","specFileExtension":".spec.js","relativeToCommonRoot":"retries.spec.js","specType":"integration","name":"cypress/e2e/retries.spec.js","relative":"cypress/e2e/retries.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js"},"shouldUploadVideo":true}],"browserPath":"","browserName":"electron","browserVersion":"106.0.5249.51","osName":"darwin","osVersion":"22.1.0","cypressVersion":"12.17.4","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud","rawJson":{"video":true,"e2e":{"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]"},"component":{"specPattern":["pages/__tests__/*.spec.tsx"],"setupNodeEvents":"[Function setupNodeEvents]","devServer":{"framework":"next","bundler":"webpack"}},"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","envFile":{},"projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud"},"morgan":false,"isTextTerminal":true,"socketId":"tr1yo9weg8","report":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":59149},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":59159,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","supportFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":32,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","videoUploadOnPasses":true,"viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"additionalIgnorePattern":[],"autoOpen":false,"browsers":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106}],"clientRoute":"/__/","cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/12.17.4/Cypress.app/Contents/Resources/app","devServerPublicPathRoute":"/__cypress/src","hosts":null,"isInteractive":true,"namespace":"__cypress","reporterRoute":"/__cypress/reporter","socketIoCookie":"__socket","socketIoRoute":"/__socket","version":"12.17.4","cypressEnv":"production","resolved":{"animationDistanceThreshold":{"value":5,"from":"default"},"arch":{"value":"arm64","from":"default"},"baseUrl":{"value":"https://todomvc.com/examples/vanillajs","from":"config"},"blockHosts":{"value":null,"from":"default"},"chromeWebSecurity":{"value":true,"from":"default"},"clientCertificates":{"value":[],"from":"default"},"defaultCommandTimeout":{"value":4000,"from":"default"},"downloadsFolder":{"value":"cypress/downloads","from":"default"},"env":{"currents_ws":{"value":59149,"from":"cli"}},"execTimeout":{"value":60000,"from":"default"},"experimentalCspAllowList":{"value":false,"from":"default"},"experimentalFetchPolyfill":{"value":false,"from":"default"},"experimentalInteractiveRunEvents":{"value":false,"from":"default"},"experimentalRunAllSpecs":{"value":false,"from":"default"},"experimentalMemoryManagement":{"value":false,"from":"default"},"experimentalModifyObstructiveThirdPartyCode":{"value":false,"from":"default"},"experimentalSkipDomainInjection":{"value":null,"from":"default"},"experimentalOriginDependencies":{"value":false,"from":"default"},"experimentalSourceRewriting":{"value":false,"from":"default"},"experimentalSingleTabRunMode":{"value":false,"from":"default"},"experimentalStudio":{"value":false,"from":"default"},"experimentalWebKitSupport":{"value":false,"from":"default"},"fileServerFolder":{"value":"","from":"default"},"fixturesFolder":{"value":"cypress/fixtures","from":"default"},"excludeSpecPattern":{"value":"*.hot-update.js","from":"default"},"includeShadowDom":{"value":false,"from":"default"},"keystrokeDelay":{"value":0,"from":"default"},"modifyObstructiveCode":{"value":true,"from":"default"},"nodeVersion":{"from":"default"},"numTestsKeptInMemory":{"value":0,"from":"config"},"platform":{"value":"darwin","from":"default"},"pageLoadTimeout":{"value":60000,"from":"default"},"port":{"value":null,"from":"default"},"projectId":{"value":"l4zuz8","from":"config"},"redirectionLimit":{"value":20,"from":"default"},"reporter":{"value":"spec","from":"default"},"reporterOptions":{"value":null,"from":"default"},"requestTimeout":{"value":5000,"from":"default"},"resolvedNodePath":{"value":null,"from":"default"},"resolvedNodeVersion":{"value":null,"from":"default"},"responseTimeout":{"value":30000,"from":"default"},"retries":{"value":{"runMode":0,"openMode":0},"from":"default"},"screenshotOnRunFailure":{"value":true,"from":"default"},"screenshotsFolder":{"value":"cypress/screenshots","from":"default"},"slowTestThreshold":{"value":10000,"from":"default"},"scrollBehavior":{"value":"top","from":"default"},"supportFile":{"value":"cypress/support/e2e.ts","from":"config"},"supportFolder":{"value":false,"from":"default"},"taskTimeout":{"value":60000,"from":"default"},"testIsolation":{"value":true,"from":"default"},"trashAssetsBeforeRuns":{"value":false,"from":"cli"},"userAgent":{"value":null,"from":"default"},"video":{"value":true,"from":"default"},"videoCompression":{"value":32,"from":"default"},"videosFolder":{"value":"cypress/videos","from":"default"},"videoUploadOnPasses":{"value":true,"from":"default"},"viewportHeight":{"value":660,"from":"default"},"viewportWidth":{"value":1000,"from":"default"},"waitForAnimations":{"value":true,"from":"default"},"watchForFileChanges":{"value":false,"from":"config"},"specPattern":{"value":"cypress/e2e/*.js","from":"config"},"browsers":{"value":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"106.0.5249.51","path":"","majorVersion":106,"isHeadless":true,"isHeaded":false}],"from":"runtime"},"hosts":{"value":null,"from":"default"},"isInteractive":{"value":true,"from":"default"},"configFile":{"value":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","from":"plugin"},"testingType":{"value":"e2e","from":"plugin"}},"remote":{"origin":"https://todomvc.com","strategy":"http","fileServer":null,"domainName":"todomvc.com","props":{"port":"443","protocol":"https:","subdomain":null,"domain":"todomvc","tld":"com"}},"browser":null,"specs":[],"proxyUrl":"http://localhost:59159","browserUrl":"https://todomvc.com/__/","reporterUrl":"https://todomvc.com/__cypress/reporter","proxyServer":"http://localhost:59159","state":{}}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_01.json new file mode 100644 index 0000000..0446abd --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_01.json @@ -0,0 +1 @@ +{"testAttemptIndex":0,"size":334509,"takenAt":"2023-09-18T23:38:18.184Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png","scaled":true,"blackout":[],"duration":221,"testId":"r3","height":1440,"width":2560} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_02.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_02.json new file mode 100644 index 0000000..3a8685e --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/screenshot_02.json @@ -0,0 +1 @@ +{"testAttemptIndex":1,"size":277492,"takenAt":"2023-09-18T23:38:18.522Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"retries.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png","scaled":true,"blackout":[],"duration":170,"testId":"r3","height":1440,"width":2560} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/specAfter.json new file mode 100644 index 0000000..1a0772e --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/specAfter.json @@ -0,0 +1 @@ +{"stats":{"suites":1,"tests":1,"passes":1,"pending":0,"skipped":0,"failures":0,"wallClockStartedAt":"2023-09-18T23:38:17.817Z","wallClockEndedAt":"2023-09-18T23:38:18.835Z","wallClockDuration":1018},"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0,"start":"2023-09-18T23:38:17.819Z","end":"2023-09-18T23:38:18.838Z","duration":1019},"hooks":[{"hookId":"h1","hookName":"before each","title":["\"before each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}"},{"hookId":"h2","hookName":"before each","title":["\"before each\" hook"],"body":"function () {\n cy.visit(\"/\");\n}"},{"hookId":"h4","hookName":"after each","title":["\"after each\" hook"],"body":"function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }"},{"hookId":"h5","hookName":"after each","title":["\"after each\" hook"],"body":"() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}"},{"hookId":"h3","hookName":"after all","title":["\"after all\" hook"],"body":"function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }"}],"tests":[{"testId":"r3","title":["Retries","Runs a test with retries"],"state":"passed","body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","displayError":null,"attempts":[{"state":"failed","error":{"name":"Error","message":"oh no!","stack":" at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"timings":{"lifecycle":29,"before each":[{"hookId":"h1","fnDuration":9,"afterFnDuration":0},{"hookId":"h2","fnDuration":318,"afterFnDuration":0}],"test":{"fnDuration":1,"afterFnDuration":223},"after each":[{"hookId":"h4","fnDuration":15,"afterFnDuration":0},{"hookId":"h5","fnDuration":4,"afterFnDuration":0}]},"failedFromHookId":null,"wallClockStartedAt":"2023-09-18T23:38:17.821Z","wallClockDuration":601,"videoTimestamp":2253},{"state":"failed","error":{"name":"Error","message":"oh no!","stack":" at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"timings":{"lifecycle":20,"before each":[{"hookId":"h1","fnDuration":4,"afterFnDuration":0},{"hookId":"h2","fnDuration":57,"afterFnDuration":0}],"test":{"fnDuration":0,"afterFnDuration":173},"after each":[{"hookId":"h4","fnDuration":13,"afterFnDuration":0},{"hookId":"h5","fnDuration":4,"afterFnDuration":1}]},"failedFromHookId":null,"wallClockStartedAt":"2023-09-18T23:38:18.439Z","wallClockDuration":274,"videoTimestamp":2871},{"state":"passed","error":null,"timings":{"lifecycle":30,"before each":[{"hookId":"h1","fnDuration":3,"afterFnDuration":0},{"hookId":"h2","fnDuration":46,"afterFnDuration":0}],"test":{"fnDuration":0,"afterFnDuration":0},"after each":[{"hookId":"h4","fnDuration":13,"afterFnDuration":0},{"hookId":"h5","fnDuration":8,"afterFnDuration":0}],"after all":[{"hookId":"h3","fnDuration":6,"afterFnDuration":0}]},"failedFromHookId":null,"wallClockStartedAt":"2023-09-18T23:38:18.721Z","wallClockDuration":113,"videoTimestamp":3153}]}],"error":null,"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/retries.spec.js.mp4","screenshots":[{"screenshotId":"wnsm1","name":null,"testId":"r3","testAttemptIndex":0,"takenAt":"2023-09-18T23:38:18.184Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png","height":1440,"width":2560},{"screenshotId":"w2gss","name":null,"testId":"r3","testAttemptIndex":1,"takenAt":"2023-09-18T23:38:18.522Z","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png","height":1440,"width":2560}],"spec":{"fileExtension":".js","baseName":"retries.spec.js","fileName":"retries","specFileExtension":".spec.js","relativeToCommonRoot":"retries.spec.js","specType":"integration","name":"cypress/e2e/retries.spec.js","relative":"cypress/e2e/retries.spec.js","absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js"}} \ No newline at end of file diff --git a/examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_0.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_00.json similarity index 79% rename from examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_0.json rename to packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_00.json index 2f8a386..4fbb5e1 100644 --- a/examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_0.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_00.json @@ -1 +1 @@ -{"async":false,"body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","duration":598,"err":{"message":"oh no!","name":"Error","stack":"Error: oh no!\n at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","parsedStack":[{"message":"Error: oh no!","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js","originalFile":"webpack://web/./cypress/e2e/retries.spec.js","relativeFile":"cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","line":11,"column":14,"whitespace":" "}],"codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js","originalFile":"webpack://web/./cypress/e2e/retries.spec.js","relativeFile":"cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","line":3,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:11:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:10:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:21:12)\n at eval ()"},"order":1,"pending":false,"retries":3,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":15,"before each":[{"hookId":"h1","fnDuration":10,"afterFnDuration":1},{"hookId":"h2","fnDuration":314,"afterFnDuration":0}],"test":{"fnDuration":1,"afterFnDuration":257},"after each":[{"hookId":"h4","fnDuration":14,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-14T22:42:19.307Z","title":"Runs a test with retries","currentRetry":0,"fullTitle":"Retries Runs a test with retries"} \ No newline at end of file +{"async":false,"body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","duration":582,"err":{"message":"oh no!","name":"Error","stack":"Error: oh no!\n at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","parsedStack":[{"message":"Error: oh no!","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js","originalFile":"webpack://web/./cypress/e2e/retries.spec.js","relativeFile":"cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","line":11,"column":14,"whitespace":" "}],"codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js","originalFile":"webpack://web/./cypress/e2e/retries.spec.js","relativeFile":"cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","line":3,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:11:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:10:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js:21:12)\n at eval ()"},"order":1,"pending":false,"retries":3,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":29,"before each":[{"hookId":"h1","fnDuration":9,"afterFnDuration":0},{"hookId":"h2","fnDuration":318,"afterFnDuration":0}],"test":{"fnDuration":1,"afterFnDuration":223},"after each":[{"hookId":"h4","fnDuration":15,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-18T23:38:17.821Z","title":"Runs a test with retries","currentRetry":0,"fullTitle":"Retries Runs a test with retries"} \ No newline at end of file diff --git a/examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_1.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_01.json similarity index 72% rename from examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_1.json rename to packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_01.json index 9050267..7d29ff3 100644 --- a/examples/webapp/afterTest_13.2.0_Retries_Runs a test with retries_1.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_01.json @@ -1 +1 @@ -{"async":false,"body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","duration":324,"err":{"message":"oh no!","name":"Error","stack":"Error: oh no!\n at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","parsedStack":[{"message":"Error: oh no!","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js","originalFile":"webpack://web/./cypress/e2e/retries.spec.js","relativeFile":"cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","line":11,"column":14,"whitespace":" "}],"codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"final":false,"id":"r3","order":1,"pending":false,"retries":3,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":25,"before each":[{"hookId":"h1","fnDuration":5,"afterFnDuration":0},{"hookId":"h2","fnDuration":58,"afterFnDuration":0}],"test":{"fnDuration":0,"afterFnDuration":234},"after each":[{"hookId":"h4","fnDuration":13,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-14T22:42:19.960Z","title":"Runs a test with retries","currentRetry":1,"fullTitle":"Retries Runs a test with retries"} \ No newline at end of file +{"async":false,"body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","duration":255,"err":{"message":"oh no!","name":"Error","stack":"Error: oh no!\n at Context.eval (webpack://web/./cypress/e2e/retries.spec.js:11:14)","parsedStack":[{"message":"Error: oh no!","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/retries.spec.js","originalFile":"webpack://web/./cypress/e2e/retries.spec.js","relativeFile":"cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","line":11,"column":14,"whitespace":" "}],"codeFrame":{"line":11,"column":15,"originalFile":"cypress/e2e/retries.spec.js","relativeFile":"examples/webapp/cypress/e2e/retries.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js","frame":" 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error(\"oh no!\");\n | ^\n 12 | }\n 13 | return;\n 14 | }","language":"js"}},"final":false,"id":"r3","order":1,"pending":false,"retries":3,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":20,"before each":[{"hookId":"h1","fnDuration":4,"afterFnDuration":0},{"hookId":"h2","fnDuration":57,"afterFnDuration":0}],"test":{"fnDuration":0,"afterFnDuration":173},"after each":[{"hookId":"h4","fnDuration":13,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-18T23:38:18.439Z","title":"Runs a test with retries","currentRetry":1,"fullTitle":"Retries Runs a test with retries"} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_02.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_02.json new file mode 100644 index 0000000..82c36eb --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/retries.spec.js/testAfter_02.json @@ -0,0 +1 @@ +{"async":false,"body":"function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }","duration":81,"final":false,"id":"r3","order":1,"pending":false,"retries":3,"state":"passed","sync":true,"timedOut":false,"timings":{"lifecycle":30,"before each":[{"hookId":"h1","fnDuration":3,"afterFnDuration":0},{"hookId":"h2","fnDuration":46,"afterFnDuration":0}],"test":{"fnDuration":0,"afterFnDuration":0},"after each":[{"hookId":"h4","fnDuration":13,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-18T23:38:18.721Z","title":"Runs a test with retries","currentRetry":2,"fullTitle":"Retries Runs a test with retries"} \ No newline at end of file diff --git a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/runResult.json similarity index 94% rename from examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json rename to packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/runResult.json index 8c337c3..4f00d0c 100644 --- a/examples/webapp/cypress_run_12.17.4__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_skipped.spec.js.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/runResult.json @@ -1,13 +1,13 @@ { "status": "finished", - "startedTestsAt": "2023-09-14T23:19:44.481Z", - "endedTestsAt": "2023-09-14T23:19:45.135Z", - "totalDuration": 654, - "totalSuites": 1, - "totalTests": 2, + "startedTestsAt": "2023-09-18T23:38:39.001Z", + "endedTestsAt": "2023-09-18T23:38:42.813Z", + "totalDuration": 1035, + "totalSuites": 2, + "totalTests": 3, "totalPassed": 0, "totalPending": 0, - "totalFailed": 1, + "totalFailed": 2, "totalSkipped": 1, "runs": [ { @@ -18,9 +18,9 @@ "pending": 0, "skipped": 1, "failures": 1, - "duration": 654, - "startedAt": "2023-09-14T23:19:44.481Z", - "endedAt": "2023-09-14T23:19:45.135Z" + "duration": 408, + "startedAt": "2023-09-18T23:38:42.405Z", + "endedAt": "2023-09-18T23:38:42.813Z" }, "reporter": "spec", "reporterStats": { @@ -29,9 +29,9 @@ "passes": 0, "pending": 0, "failures": 1, - "start": "2023-09-14T23:19:44.482Z", - "end": "2023-09-14T23:19:45.137Z", - "duration": 655 + "start": "2023-09-18T23:38:42.406Z", + "end": "2023-09-18T23:38:42.815Z", + "duration": 409 }, "hooks": [ { @@ -88,13 +88,13 @@ "language": "js" } }, - "videoTimestamp": 1999, - "duration": 598, - "startedAt": "2023-09-14T23:19:44.498Z", + "videoTimestamp": 864, + "duration": 361, + "startedAt": "2023-09-18T23:38:42.415Z", "screenshots": [ { "name": null, - "takenAt": "2023-09-14T23:19:44.847Z", + "takenAt": "2023-09-18T23:38:42.571Z", "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png", "height": 1440, "width": 2560 @@ -112,9 +112,9 @@ { "state": "skipped", "error": null, - "videoTimestamp": 2615, + "videoTimestamp": 1239, "duration": null, - "startedAt": "2023-09-14T23:19:45.114Z", + "startedAt": "2023-09-18T23:38:42.790Z", "screenshots": [] } ] @@ -180,7 +180,7 @@ }, "morgan": false, "isTextTerminal": true, - "socketId": "pprjs3el07", + "socketId": "g4wfg2qk9f", "report": true, "trashAssetsBeforeRuns": false, "animationDistanceThreshold": 5, @@ -190,7 +190,7 @@ "clientCertificates": [], "defaultCommandTimeout": 4000, "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 55430 }, + "env": { "currents_ws": 59149 }, "execTimeout": 60000, "experimentalCspAllowList": false, "experimentalFetchPolyfill": false, @@ -213,7 +213,7 @@ "numTestsKeptInMemory": 0, "platform": "darwin", "pageLoadTimeout": 60000, - "port": 55841, + "port": 59392, "redirectionLimit": 20, "reporter": "spec", "reporterOptions": null, @@ -245,7 +245,7 @@ "family": "chromium", "channel": "stable", "displayName": "Chrome", - "version": "117.0.5938.62", + "version": "117.0.5938.88", "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "minSupportedVersion": 64, "majorVersion": "117" @@ -293,7 +293,7 @@ "clientCertificates": { "value": [], "from": "default" }, "defaultCommandTimeout": { "value": 4000, "from": "default" }, "downloadsFolder": { "value": "cypress/downloads", "from": "default" }, - "env": { "currents_ws": { "value": 55430, "from": "cli" } }, + "env": { "currents_ws": { "value": 59149, "from": "cli" } }, "execTimeout": { "value": 60000, "from": "default" }, "experimentalCspAllowList": { "value": false, "from": "default" }, "experimentalFetchPolyfill": { "value": false, "from": "default" }, @@ -362,7 +362,7 @@ "family": "chromium", "channel": "stable", "displayName": "Chrome", - "version": "117.0.5938.62", + "version": "117.0.5938.88", "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "minSupportedVersion": 64, "majorVersion": "117" @@ -414,10 +414,10 @@ }, "browser": null, "specs": [], - "proxyUrl": "http://localhost:55841", + "proxyUrl": "http://localhost:59392", "browserUrl": "https://todomvc.com/__/", "reporterUrl": "https://todomvc.com/__cypress/reporter", - "proxyServer": "http://localhost:55841", + "proxyServer": "http://localhost:59392", "state": {} } } diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/screenshot_01.json new file mode 100644 index 0000000..876b6ee --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/screenshot_01.json @@ -0,0 +1 @@ +{"testAttemptIndex":0,"size":337459,"takenAt":"2023-09-18T23:38:42.571Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"skipped.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","scaled":true,"blackout":[],"duration":183,"testId":"r3","height":1440,"width":2560} \ No newline at end of file diff --git a/examples/webapp/afterSpec_12.17.4_cypress_e2e_skipped.spec.js.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/specAfter.json similarity index 70% rename from examples/webapp/afterSpec_12.17.4_cypress_e2e_skipped.spec.js.json rename to packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/specAfter.json index 34cd4fa..36d268a 100644 --- a/examples/webapp/afterSpec_12.17.4_cypress_e2e_skipped.spec.js.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/specAfter.json @@ -6,9 +6,9 @@ "pending": 0, "skipped": 1, "failures": 1, - "wallClockStartedAt": "2023-09-14T22:18:02.458Z", - "wallClockEndedAt": "2023-09-14T22:18:03.119Z", - "wallClockDuration": 661 + "wallClockStartedAt": "2023-09-18T23:38:42.405Z", + "wallClockEndedAt": "2023-09-18T23:38:42.813Z", + "wallClockDuration": 408 }, "reporter": "spec", "reporterStats": { @@ -17,67 +17,52 @@ "passes": 0, "pending": 0, "failures": 1, - "start": "2023-09-14T22:18:02.459Z", - "end": "2023-09-14T22:18:03.121Z", - "duration": 662 + "start": "2023-09-18T23:38:42.406Z", + "end": "2023-09-18T23:38:42.815Z", + "duration": 409 }, "hooks": [ { "hookId": "h1", "hookName": "before each", - "title": [ - "\"before each\" hook" - ], + "title": ["\"before each\" hook"], "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleBefore(currentTest);\n }\n}" }, { "hookId": "h2", "hookName": "before each", - "title": [ - "\"before each\" hook" - ], + "title": ["\"before each\" hook"], "body": "function () {\n cy.visit(\"/\");\n}" }, { "hookId": "h6", "hookName": "before each", - "title": [ - "\"before each\" hook" - ], + "title": ["\"before each\" hook"], "body": "function () {\n throw new Error(\"before each exception\");\n }" }, { "hookId": "h4", "hookName": "after each", - "title": [ - "\"after each\" hook" - ], + "title": ["\"after each\" hook"], "body": "function () {\n self.sendLogsToPrinter(self.collectorState.getCurrentLogStackIndex(), self.collectorState.getCurrentTest());\n }" }, { "hookId": "h5", "hookName": "after each", - "title": [ - "\"after each\" hook" - ], + "title": ["\"after each\" hook"], "body": "() => {\n const currentTest = cy.state(\"ctx\").currentTest;\n if (currentTest) {\n handleAfter(currentTest);\n }\n}" }, { "hookId": "h3", "hookName": "after all", - "title": [ - "\"after all\" hook" - ], + "title": ["\"after all\" hook"], "body": "function () {\n // Need to wait otherwise some last commands get omitted from logs.\n cy.task(CONSTANTS.TASK_NAME_OUTPUT, null, {log: false});\n }" } ], "tests": [ { "testId": "r3", - "title": [ - "Skipped", - "should not be skipped" - ], + "title": ["Skipped", "should not be skipped"], "state": "failed", "body": "function () {\n expect(true).to.be.true;\n }", "displayError": "Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)", @@ -99,50 +84,27 @@ } }, "timings": { - "lifecycle": 34, + "lifecycle": 26, "before each": [ - { - "hookId": "h1", - "fnDuration": 9, - "afterFnDuration": 0 - }, - { - "hookId": "h2", - "fnDuration": 301, - "afterFnDuration": 1 - }, - { - "hookId": "h6", - "fnDuration": 1, - "afterFnDuration": 237 - } + { "hookId": "h1", "fnDuration": 5, "afterFnDuration": 0 }, + { "hookId": "h2", "fnDuration": 112, "afterFnDuration": 0 }, + { "hookId": "h6", "fnDuration": 1, "afterFnDuration": 192 } ], "after each": [ - { - "hookId": "h4", - "fnDuration": 21, - "afterFnDuration": 0 - }, - { - "hookId": "h5", - "fnDuration": 3, - "afterFnDuration": 0 - } + { "hookId": "h4", "fnDuration": 13, "afterFnDuration": 0 }, + { "hookId": "h5", "fnDuration": 5, "afterFnDuration": 0 } ] }, "failedFromHookId": "h6", - "wallClockStartedAt": "2023-09-14T22:18:02.462Z", - "wallClockDuration": 611, - "videoTimestamp": 1993 + "wallClockStartedAt": "2023-09-18T23:38:42.415Z", + "wallClockDuration": 361, + "videoTimestamp": 864 } ] }, { "testId": "r4", - "title": [ - "Skipped", - "should be skipped" - ], + "title": ["Skipped", "should be skipped"], "state": "skipped", "body": "function () {\n expect(true).to.be.true;\n }", "displayError": null, @@ -152,9 +114,9 @@ "error": null, "timings": null, "failedFromHookId": null, - "wallClockStartedAt": "2023-09-14T22:18:03.092Z", + "wallClockStartedAt": "2023-09-18T23:38:42.790Z", "wallClockDuration": null, - "videoTimestamp": 2623 + "videoTimestamp": 1239 } ] } @@ -163,11 +125,11 @@ "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/skipped.spec.js.mp4", "screenshots": [ { - "screenshotId": "n2355", + "screenshotId": "vdaak", "name": null, "testId": "r3", "testAttemptIndex": 0, - "takenAt": "2023-09-14T22:18:02.815Z", + "takenAt": "2023-09-18T23:38:42.571Z", "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png", "height": 1440, "width": 2560 @@ -184,4 +146,4 @@ "relative": "cypress/e2e/skipped.spec.js", "absolute": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js" } -} \ No newline at end of file +} diff --git a/examples/webapp/afterTest_12.17.4_Skipped_should not be skipped_0.json b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/testAfter_00.json similarity index 87% rename from examples/webapp/afterTest_12.17.4_Skipped_should not be skipped_0.json rename to packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/testAfter_00.json index 6ddf276..69a32c1 100644 --- a/examples/webapp/afterTest_12.17.4_Skipped_should not be skipped_0.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/12.17.4/skipped.spec.js/testAfter_00.json @@ -1,7 +1,7 @@ { - "async": 0, + "async": false, "body": "function () {\n expect(true).to.be.true;\n }", - "duration": 238, + "duration": 193, "err": { "message": "before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`", "name": "Error", @@ -29,6 +29,7 @@ "language": "js" } }, + "final": false, "hooks": [], "id": "r3", "invocationDetails": { @@ -49,16 +50,16 @@ "sync": true, "timedOut": false, "timings": { - "lifecycle": 34, + "lifecycle": 26, "before each": [ - { "hookId": "h1", "fnDuration": 9, "afterFnDuration": 0 }, - { "hookId": "h2", "fnDuration": 301, "afterFnDuration": 1 }, - { "hookId": "h6", "fnDuration": 1, "afterFnDuration": 237 } + { "hookId": "h1", "fnDuration": 5, "afterFnDuration": 0 }, + { "hookId": "h2", "fnDuration": 112, "afterFnDuration": 0 }, + { "hookId": "h6", "fnDuration": 1, "afterFnDuration": 192 } ], - "after each": [{ "hookId": "h4", "fnDuration": 21, "afterFnDuration": 0 }] + "after each": [{ "hookId": "h4", "fnDuration": 13, "afterFnDuration": 0 }] }, "type": "test", - "wallClockStartedAt": "2023-09-14T22:18:02.462Z", + "wallClockStartedAt": "2023-09-18T23:38:42.415Z", "title": "should not be skipped", "currentRetry": 0, "fullTitle": "Skipped should not be skipped" diff --git a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/runResult.json similarity index 80% rename from examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/runResult.json index c25212c..882d2a0 100644 --- a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_crash.spec.js.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/runResult.json @@ -3,79 +3,48 @@ "browserPath": "", "browserVersion": "114.0.5735.289", "config": { + "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", + "testingType": "e2e", + "video": true, + "projectId": "l4zuz8", + "baseUrl": "https://todomvc.com/examples/vanillajs", + "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", + "specPattern": "cypress/e2e/*.js", + "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", + "projectName": "webapp", + "isTextTerminal": true, + "trashAssetsBeforeRuns": false, "animationDistanceThreshold": 5, "arch": "arm64", - "baseUrl": "https://todomvc.com/examples/vanillajs", "blockHosts": null, - "browser": null, - "browsers": [ - { - "channel": "stable", - "displayName": "Chrome", - "family": "chromium", - "majorVersion": "117", - "name": "chrome", - "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" - }, - { - "channel": "stable", - "displayName": "Firefox", - "family": "firefox", - "majorVersion": "108", - "name": "firefox", - "path": "/Applications/Firefox.app/Contents/MacOS/firefox", - "version": "108.0" - }, - { - "channel": "stable", - "displayName": "Electron", - "family": "chromium", - "majorVersion": 114, - "name": "electron", - "path": "", - "version": "114.0.5735.289" - } - ], "chromeWebSecurity": true, "clientCertificates": [], - "configFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts", - "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app", - "cypressInternalEnv": "production", "defaultCommandTimeout": 4000, "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { - "currents_ws": 56002 - }, - "excludeSpecPattern": "*.hot-update.js", + "env": { "currents_ws": 62381 }, "execTimeout": 60000, "experimentalCspAllowList": false, "experimentalFetchPolyfill": false, "experimentalInteractiveRunEvents": false, + "experimentalRunAllSpecs": false, "experimentalMemoryManagement": false, "experimentalModifyObstructiveThirdPartyCode": false, - "experimentalOriginDependencies": false, - "experimentalRunAllSpecs": false, - "experimentalSingleTabRunMode": false, "experimentalSkipDomainInjection": null, + "experimentalOriginDependencies": false, "experimentalSourceRewriting": false, + "experimentalSingleTabRunMode": false, "experimentalStudio": false, "experimentalWebKitSupport": false, "fileServerFolder": "/Users/agoldis/cypress-cloud/examples/webapp", "fixturesFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures", - "hosts": null, + "excludeSpecPattern": "*.hot-update.js", "includeShadowDom": false, - "isInteractive": true, - "isTextTerminal": true, "keystrokeDelay": 0, "modifyObstructiveCode": true, "numTestsKeptInMemory": 0, - "pageLoadTimeout": 60000, "platform": "darwin", - "port": 56010, - "projectId": "l4zuz8", - "projectName": "webapp", - "projectRoot": "/Users/agoldis/cypress-cloud/examples/webapp", + "pageLoadTimeout": 60000, + "port": 62391, "redirectionLimit": 20, "reporter": "spec", "reporterOptions": null, @@ -83,37 +52,63 @@ "resolvedNodePath": "/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node", "resolvedNodeVersion": "18.16.1", "responseTimeout": 30000, - "retries": { - "openMode": 0, - "runMode": 0 - }, + "retries": { "runMode": 0, "openMode": 0 }, "screenshotOnRunFailure": true, "screenshotsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots", - "scrollBehavior": "top", "slowTestThreshold": 10000, - "specPattern": "cypress/e2e/*.js", - "supportFile": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts", + "scrollBehavior": "top", "taskTimeout": 60000, - "testingType": "e2e", "testIsolation": true, - "trashAssetsBeforeRuns": false, "userAgent": null, - "version": "13.2.0", - "video": true, "videoCompression": false, "videosFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos", "viewportHeight": 660, "viewportWidth": 1000, "waitForAnimations": true, - "watchForFileChanges": false + "watchForFileChanges": false, + "browsers": [ + { + "channel": "stable", + "displayName": "Chrome", + "family": "chromium", + "majorVersion": "117", + "name": "chrome", + "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", + "version": "117.0.5938.88" + }, + { + "channel": "stable", + "displayName": "Firefox", + "family": "firefox", + "majorVersion": "108", + "name": "firefox", + "path": "/Applications/Firefox.app/Contents/MacOS/firefox", + "version": "108.0" + }, + { + "channel": "stable", + "displayName": "Electron", + "family": "chromium", + "majorVersion": 114, + "name": "electron", + "path": "", + "version": "114.0.5735.289" + } + ], + "cypressBinaryRoot": "/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app", + "hosts": null, + "isInteractive": true, + "version": "13.2.0", + "browser": null, + "cypressInternalEnv": "production" }, "cypressVersion": "13.2.0", - "endedTestsAt": "2023-09-14T23:20:12.150Z", + "endedTestsAt": "2023-09-18T22:31:58.985Z", "osName": "darwin", "osVersion": "22.1.0", "runs": [ { - "error": "Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:736:33\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:143:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:143:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:143:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:61:14\n at FSReqCallback.oncomplete (node:fs:198:23)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.", + "error": "Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at alreadyWritten (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:714:8)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:802:19\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.", "reporterStats": null, "screenshots": [], "spec": { @@ -125,12 +120,12 @@ }, "stats": { "duration": 0, - "endedAt": "2023-09-14T23:20:12.150Z", + "endedAt": "2023-09-18T22:31:58.985Z", "failures": 1, "passes": 0, "pending": 0, "skipped": 0, - "startedAt": "2023-09-14T23:20:12.150Z", + "startedAt": "2023-09-18T22:31:58.985Z", "suites": 0, "tests": 0 }, @@ -138,7 +133,7 @@ "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/crash.spec.js.mp4" } ], - "startedTestsAt": "2023-09-14T23:20:12.150Z", + "startedTestsAt": "2023-09-18T22:31:58.985Z", "totalDuration": 0, "totalFailed": 1, "totalPassed": 0, diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/specAfter.json new file mode 100644 index 0000000..40944e1 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/crash.spec.js/specAfter.json @@ -0,0 +1 @@ +{"error":"Oops...we found an error preparing this test file:\n\n > cypress/e2e/crash.spec.js\n\nThe error was:\n\nError: Webpack Compilation Error\nModule not found: Error: Can't resolve 'fff' in '/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e'\n at handle (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)\n at finalCallback (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:441:32)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:505:17\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/HookWebpackError.js:68:3\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at Cache.storeBuildDependencies (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Cache.js:122:37)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:501:19\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:498:23\n at Compiler.emitRecords (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:490:11\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14\n at Hook.eval [as callAsync] (eval at create (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7\n at done (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)\n at alreadyWritten (/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:714:8)\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:802:19\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at /Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16\n at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)\n\nThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:\n\n- A missing file or dependency\n- A syntax error in the file or one of its dependencies\n\nFix the error in your code and re-run your tests.","reporterStats":null,"screenshots":[],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/crash.spec.js","fileExtension":".js","fileName":"crash","name":"crash.spec.js","relative":"cypress/e2e/crash.spec.js"},"stats":{"duration":0,"endedAt":"2023-09-18T22:31:58.985Z","failures":1,"passes":0,"pending":0,"skipped":0,"startedAt":"2023-09-18T22:31:58.985Z","suites":0,"tests":0},"tests":[],"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/crash.spec.js.mp4"} \ No newline at end of file diff --git a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/runResult.json similarity index 90% rename from examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/runResult.json index 18fc41c..019a6a2 100644 --- a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_failed.spec.js.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/runResult.json @@ -21,7 +21,7 @@ "clientCertificates": [], "defaultCommandTimeout": 4000, "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 56002 }, + "env": { "currents_ws": 60842 }, "execTimeout": 60000, "experimentalCspAllowList": false, "experimentalFetchPolyfill": false, @@ -44,7 +44,7 @@ "numTestsKeptInMemory": 0, "platform": "darwin", "pageLoadTimeout": 60000, - "port": 56066, + "port": 60856, "redirectionLimit": 20, "reporter": "spec", "reporterOptions": null, @@ -74,7 +74,7 @@ "majorVersion": "117", "name": "chrome", "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" + "version": "117.0.5938.88" }, { "channel": "stable", @@ -103,7 +103,7 @@ "cypressInternalEnv": "production" }, "cypressVersion": "13.2.0", - "endedTestsAt": "2023-09-14T23:20:17.728Z", + "endedTestsAt": "2023-09-18T08:28:58.956Z", "osName": "darwin", "osVersion": "22.1.0", "runs": [ @@ -116,16 +116,16 @@ "passes": 0, "pending": 0, "failures": 1, - "start": "2023-09-14T23:20:17.106Z", - "end": "2023-09-14T23:20:17.730Z", - "duration": 624 + "start": "2023-09-18T08:28:58.143Z", + "end": "2023-09-18T08:28:58.958Z", + "duration": 815 }, "screenshots": [ { "height": 1440, "name": null, "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png", - "takenAt": "2023-09-14T23:20:17.469Z", + "takenAt": "2023-09-18T08:28:58.691Z", "width": 2560 } ], @@ -137,13 +137,13 @@ "relative": "cypress/e2e/failed.spec.js" }, "stats": { - "duration": 625, - "endedAt": "2023-09-14T23:20:17.728Z", + "duration": 816, + "endedAt": "2023-09-18T08:28:58.956Z", "failures": 1, "passes": 0, "pending": 0, "skipped": 0, - "startedAt": "2023-09-14T23:20:17.103Z", + "startedAt": "2023-09-18T08:28:58.140Z", "suites": 1, "tests": 1 }, @@ -151,7 +151,7 @@ { "attempts": [{ "state": "failed" }], "displayError": "ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)", - "duration": 595, + "duration": 785, "state": "failed", "title": ["Failed", "should fail"] } @@ -159,8 +159,8 @@ "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/failed.spec.js.mp4" } ], - "startedTestsAt": "2023-09-14T23:20:17.103Z", - "totalDuration": 625, + "startedTestsAt": "2023-09-18T08:28:58.140Z", + "totalDuration": 816, "totalFailed": 1, "totalPassed": 0, "totalPending": 0, diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/screenshot_01.json new file mode 100644 index 0000000..3f80829 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/screenshot_01.json @@ -0,0 +1 @@ +{"testAttemptIndex":0,"size":331875,"takenAt":"2023-09-18T08:28:58.691Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"failed.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","scaled":true,"blackout":[],"duration":215,"testId":"r3","height":1440,"width":2560} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/specAfter.json new file mode 100644 index 0000000..5b32bba --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/specAfter.json @@ -0,0 +1 @@ +{"error":null,"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2023-09-18T08:28:58.143Z","end":"2023-09-18T08:28:58.958Z","duration":815},"screenshots":[{"height":1440,"name":null,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png","takenAt":"2023-09-18T08:28:58.691Z","width":2560}],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js","fileExtension":".js","fileName":"failed","name":"failed.spec.js","relative":"cypress/e2e/failed.spec.js"},"stats":{"duration":816,"endedAt":"2023-09-18T08:28:58.956Z","failures":1,"passes":0,"pending":0,"skipped":0,"startedAt":"2023-09-18T08:28:58.140Z","suites":1,"tests":1},"tests":[{"attempts":[{"state":"failed"}],"displayError":"ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)","duration":785,"state":"failed","title":["Failed","should fail"]}],"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/failed.spec.js.mp4"} \ No newline at end of file diff --git a/examples/webapp/afterTest_12.17.4_Failed_should fail_0.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/testAfter_00.json similarity index 86% rename from examples/webapp/afterTest_12.17.4_Failed_should fail_0.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/testAfter_00.json index 57a6c1a..42f557c 100644 --- a/examples/webapp/afterTest_12.17.4_Failed_should fail_0.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/failed.spec.js/testAfter_00.json @@ -1,7 +1,7 @@ { - "async": 0, + "async": false, "body": "function () {\n expect(fail).to.be.true;\n }", - "duration": 544, + "duration": 750, "err": { "message": "fail is not defined", "name": "ReferenceError", @@ -29,6 +29,7 @@ "language": "js" } }, + "final": false, "hooks": [], "id": "r3", "invocationDetails": { @@ -49,16 +50,16 @@ "sync": true, "timedOut": false, "timings": { - "lifecycle": 22, + "lifecycle": 10, "before each": [ - { "hookId": "h1", "fnDuration": 10, "afterFnDuration": 0 }, - { "hookId": "h2", "fnDuration": 294, "afterFnDuration": 0 } + { "hookId": "h1", "fnDuration": 9, "afterFnDuration": 0 }, + { "hookId": "h2", "fnDuration": 508, "afterFnDuration": 1 } ], - "test": { "fnDuration": 1, "afterFnDuration": 216 }, - "after each": [{ "hookId": "h4", "fnDuration": 12, "afterFnDuration": 0 }] + "test": { "fnDuration": 1, "afterFnDuration": 218 }, + "after each": [{ "hookId": "h4", "fnDuration": 18, "afterFnDuration": 0 }] }, "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:37.645Z", + "wallClockStartedAt": "2023-09-18T08:28:58.157Z", "title": "should fail", "currentRetry": 0, "fullTitle": "Failed should fail" diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/runResult.json new file mode 100644 index 0000000..61109e7 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/runResult.json @@ -0,0 +1 @@ +{"browserName":"electron","browserPath":"","browserVersion":"114.0.5735.289","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","isTextTerminal":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":54784},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":54901,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":false,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"browsers":[{"channel":"stable","displayName":"Chrome","family":"chromium","majorVersion":"117","name":"chrome","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","version":"117.0.5938.88"},{"channel":"stable","displayName":"Firefox","family":"firefox","majorVersion":"108","name":"firefox","path":"/Applications/Firefox.app/Contents/MacOS/firefox","version":"108.0"},{"channel":"stable","displayName":"Electron","family":"chromium","majorVersion":114,"name":"electron","path":"","version":"114.0.5735.289"}],"cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app","hosts":null,"isInteractive":true,"version":"13.2.0","browser":null,"cypressInternalEnv":"production"},"cypressVersion":"13.2.0","endedTestsAt":"2023-09-18T23:17:08.543Z","osName":"darwin","osVersion":"22.1.0","runs":[{"error":null,"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0,"start":"2023-09-18T23:17:05.312Z","end":"2023-09-18T23:17:06.413Z","duration":1101},"screenshots":[{"height":1320,"name":null,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","takenAt":"2023-09-18T23:17:05.774Z","width":2000}],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js","fileExtension":".js","fileName":"passed","name":"passed.spec.js","relative":"cypress/e2e/passed.spec.js"},"stats":{"duration":1103,"endedAt":"2023-09-18T23:17:06.411Z","failures":0,"passes":1,"pending":0,"skipped":0,"startedAt":"2023-09-18T23:17:05.308Z","suites":1,"tests":1},"tests":[{"attempts":[{"state":"passed"}],"displayError":null,"duration":1098,"state":"passed","title":["Passed","should pass"]}],"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4"}],"startedTestsAt":"2023-09-18T23:17:05.308Z","totalDuration":1152,"totalFailed":0,"totalPassed":1,"totalPending":1,"totalSkipped":0,"totalSuites":2,"totalTests":2} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/screenshot_01.json new file mode 100644 index 0000000..a05d496 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/screenshot_01.json @@ -0,0 +1 @@ +{"testAttemptIndex":0,"size":236374,"takenAt":"2023-09-18T23:17:05.774Z","dimensions":{"width":2000,"height":1320},"multipart":true,"pixelRatio":2,"name":null,"specName":"passed.spec.js","path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","scaled":false,"blackout":[],"duration":607,"testId":"r3","height":1320,"width":2000} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/specAfter.json new file mode 100644 index 0000000..ef1a9d8 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/specAfter.json @@ -0,0 +1 @@ +{"error":null,"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":1,"pending":0,"failures":0,"start":"2023-09-18T23:17:05.312Z","end":"2023-09-18T23:17:06.413Z","duration":1101},"screenshots":[{"height":1320,"name":null,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png","takenAt":"2023-09-18T23:17:05.774Z","width":2000}],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js","fileExtension":".js","fileName":"passed","name":"passed.spec.js","relative":"cypress/e2e/passed.spec.js"},"stats":{"duration":1103,"endedAt":"2023-09-18T23:17:06.411Z","failures":0,"passes":1,"pending":0,"skipped":0,"startedAt":"2023-09-18T23:17:05.308Z","suites":1,"tests":1},"tests":[{"attempts":[{"state":"passed"}],"displayError":null,"duration":1098,"state":"passed","title":["Passed","should pass"]}],"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/passed.spec.js.mp4"} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/testAfter_00.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/testAfter_00.json new file mode 100644 index 0000000..390a7bb --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/passed.spec.js/testAfter_00.json @@ -0,0 +1 @@ +{"async":false,"body":"function () {\n cy.visit(\"/\");\n cy.screenshot({\n name: \"Customer screenshot\"\n });\n expect(true).to.be.true;\n }","duration":1062,"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js","originalFile":"webpack://web/./cypress/e2e/passed.spec.js","relativeFile":"cypress/e2e/passed.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/passed.spec.js","line":2,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:10:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/passed.spec.js:18:12)\n at eval ()"},"order":1,"pending":false,"retries":0,"state":"passed","sync":true,"timedOut":false,"timings":{"lifecycle":14,"before each":[{"hookId":"h1","fnDuration":10,"afterFnDuration":1},{"hookId":"h2","fnDuration":355,"afterFnDuration":0}],"test":{"fnDuration":681,"afterFnDuration":0},"after each":[{"hookId":"h4","fnDuration":19,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-18T23:17:05.312Z","title":"should pass","currentRetry":0,"fullTitle":"Passed should pass"} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/runResult.json new file mode 100644 index 0000000..1a78389 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/runResult.json @@ -0,0 +1 @@ +{"browserName":"electron","browserPath":"","browserVersion":"114.0.5735.289","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","isTextTerminal":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":54784},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":54901,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":false,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"browsers":[{"channel":"stable","displayName":"Chrome","family":"chromium","majorVersion":"117","name":"chrome","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","version":"117.0.5938.88"},{"channel":"stable","displayName":"Firefox","family":"firefox","majorVersion":"108","name":"firefox","path":"/Applications/Firefox.app/Contents/MacOS/firefox","version":"108.0"},{"channel":"stable","displayName":"Electron","family":"chromium","majorVersion":114,"name":"electron","path":"","version":"114.0.5735.289"}],"cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app","hosts":null,"isInteractive":true,"version":"13.2.0","browser":null,"cypressInternalEnv":"production"},"cypressVersion":"13.2.0","endedTestsAt":"2023-09-18T23:17:08.543Z","osName":"darwin","osVersion":"22.1.0","runs":[{"error":null,"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":1,"failures":0,"start":"2023-09-18T23:17:08.498Z","end":"2023-09-18T23:17:08.544Z","duration":46},"screenshots":[],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js","fileExtension":".js","fileName":"pending","name":"pending.spec.js","relative":"cypress/e2e/pending.spec.js"},"stats":{"duration":49,"endedAt":"2023-09-18T23:17:08.543Z","failures":0,"passes":0,"pending":1,"skipped":0,"startedAt":"2023-09-18T23:17:08.494Z","suites":1,"tests":1},"tests":[{"attempts":[{"state":"pending"}],"displayError":null,"duration":30,"state":"pending","title":["Pending","Pending test"]}],"video":null}],"startedTestsAt":"2023-09-18T23:17:05.308Z","totalDuration":1152,"totalFailed":0,"totalPassed":1,"totalPending":1,"totalSkipped":0,"totalSuites":2,"totalTests":2} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/specAfter.json new file mode 100644 index 0000000..8e6ee1a --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/pending.spec.js/specAfter.json @@ -0,0 +1 @@ +{"error":null,"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":1,"failures":0,"start":"2023-09-18T23:17:08.498Z","end":"2023-09-18T23:17:08.544Z","duration":46},"screenshots":[],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/pending.spec.js","fileExtension":".js","fileName":"pending","name":"pending.spec.js","relative":"cypress/e2e/pending.spec.js"},"stats":{"duration":49,"endedAt":"2023-09-18T23:17:08.543Z","failures":0,"passes":0,"pending":1,"skipped":0,"startedAt":"2023-09-18T23:17:08.494Z","suites":1,"tests":1},"tests":[{"attempts":[{"state":"pending"}],"displayError":null,"duration":30,"state":"pending","title":["Pending","Pending test"]}],"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/pending.spec.js.mp4"} \ No newline at end of file diff --git a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/runResult.json similarity index 90% rename from examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/runResult.json index 8759dd9..710cc34 100644 --- a/examples/webapp/cypress_run_13.2.0__Users_agoldis_cypress-cloud_examples_webapp_cypress_e2e_retries.spec.js.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/runResult.json @@ -21,7 +21,7 @@ "clientCertificates": [], "defaultCommandTimeout": 4000, "downloadsFolder": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads", - "env": { "currents_ws": 56002 }, + "env": { "currents_ws": 54784 }, "execTimeout": 60000, "experimentalCspAllowList": false, "experimentalFetchPolyfill": false, @@ -44,7 +44,7 @@ "numTestsKeptInMemory": 0, "platform": "darwin", "pageLoadTimeout": 60000, - "port": 56287, + "port": 54794, "redirectionLimit": 20, "reporter": "spec", "reporterOptions": null, @@ -74,7 +74,7 @@ "majorVersion": "117", "name": "chrome", "path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", - "version": "117.0.5938.62" + "version": "117.0.5938.88" }, { "channel": "stable", @@ -103,7 +103,7 @@ "cypressInternalEnv": "production" }, "cypressVersion": "13.2.0", - "endedTestsAt": "2023-09-14T23:20:34.787Z", + "endedTestsAt": "2023-09-18T23:17:00.290Z", "osName": "darwin", "osVersion": "22.1.0", "runs": [ @@ -116,23 +116,23 @@ "passes": 1, "pending": 0, "failures": 0, - "start": "2023-09-14T23:20:33.720Z", - "end": "2023-09-14T23:20:34.789Z", - "duration": 1069 + "start": "2023-09-18T23:16:57.176Z", + "end": "2023-09-18T23:16:58.239Z", + "duration": 1063 }, "screenshots": [ { "height": 1440, "name": null, "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png", - "takenAt": "2023-09-14T23:20:34.122Z", + "takenAt": "2023-09-18T23:16:57.528Z", "width": 2560 }, { "height": 1440, "name": null, "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png", - "takenAt": "2023-09-14T23:20:34.470Z", + "takenAt": "2023-09-18T23:16:57.888Z", "width": 2560 } ], @@ -144,13 +144,13 @@ "relative": "cypress/e2e/retries.spec.js" }, "stats": { - "duration": 1070, - "endedAt": "2023-09-14T23:20:34.787Z", + "duration": 1065, + "endedAt": "2023-09-18T23:16:58.237Z", "failures": 0, "passes": 1, "pending": 0, "skipped": 0, - "startedAt": "2023-09-14T23:20:33.717Z", + "startedAt": "2023-09-18T23:16:57.172Z", "suites": 1, "tests": 1 }, @@ -162,7 +162,7 @@ { "state": "passed" } ], "displayError": null, - "duration": 1036, + "duration": 1027, "state": "passed", "title": ["Retries", "Runs a test with retries"] } @@ -170,9 +170,9 @@ "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/retries.spec.js.mp4" } ], - "startedTestsAt": "2023-09-14T23:20:33.717Z", - "totalDuration": 1070, - "totalFailed": 0, + "startedTestsAt": "2023-09-18T23:16:57.172Z", + "totalDuration": 1065, + "totalFailed": 1, "totalPassed": 1, "totalPending": 0, "totalSkipped": 0, diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_01.json new file mode 100644 index 0000000..c61eddb --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_01.json @@ -0,0 +1,16 @@ +{ + "testAttemptIndex": 0, + "size": 331830, + "takenAt": "2023-09-18T23:16:57.528Z", + "dimensions": { "width": 2560, "height": 1440 }, + "multipart": false, + "specName": "retries.spec.js", + "testFailure": true, + "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png", + "scaled": true, + "blackout": [], + "duration": 215, + "testId": "r3", + "height": 1440, + "width": 2560 +} diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_02.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_02.json new file mode 100644 index 0000000..b4e97bf --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/screenshot_02.json @@ -0,0 +1,16 @@ +{ + "testAttemptIndex": 1, + "size": 374560, + "takenAt": "2023-09-18T23:16:57.888Z", + "dimensions": { "width": 2560, "height": 1440 }, + "multipart": false, + "specName": "retries.spec.js", + "testFailure": true, + "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png", + "scaled": true, + "blackout": [], + "duration": 200, + "testId": "r3", + "height": 1440, + "width": 2560 +} diff --git a/examples/webapp/afterSpec_13.2.0_retries.spec.js.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/specAfter.json similarity index 68% rename from examples/webapp/afterSpec_13.2.0_retries.spec.js.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/specAfter.json index 8211ee7..442c2e9 100644 --- a/examples/webapp/afterSpec_13.2.0_retries.spec.js.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/specAfter.json @@ -7,23 +7,23 @@ "passes": 1, "pending": 0, "failures": 0, - "start": "2023-09-14T22:42:19.307Z", - "end": "2023-09-14T22:42:20.477Z", - "duration": 1170 + "start": "2023-09-18T23:16:57.176Z", + "end": "2023-09-18T23:16:58.239Z", + "duration": 1063 }, "screenshots": [ { "height": 1440, "name": null, "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png", - "takenAt": "2023-09-14T22:42:19.650Z", + "takenAt": "2023-09-18T23:16:57.528Z", "width": 2560 }, { "height": 1440, "name": null, "path": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png", - "takenAt": "2023-09-14T22:42:20.055Z", + "takenAt": "2023-09-18T23:16:57.888Z", "width": 2560 } ], @@ -35,37 +35,28 @@ "relative": "cypress/e2e/retries.spec.js" }, "stats": { - "duration": 1172, - "endedAt": "2023-09-14T22:42:20.475Z", + "duration": 1065, + "endedAt": "2023-09-18T23:16:58.237Z", "failures": 0, "passes": 1, "pending": 0, "skipped": 0, - "startedAt": "2023-09-14T22:42:19.303Z", + "startedAt": "2023-09-18T23:16:57.172Z", "suites": 1, "tests": 1 }, "tests": [ { "attempts": [ - { - "state": "failed" - }, - { - "state": "failed" - }, - { - "state": "passed" - } + { "state": "failed" }, + { "state": "failed" }, + { "state": "passed" } ], "displayError": null, - "duration": 1136, + "duration": 1027, "state": "passed", - "title": [ - "Retries", - "Runs a test with retries" - ] + "title": ["Retries", "Runs a test with retries"] } ], "video": "/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/retries.spec.js.mp4" -} \ No newline at end of file +} diff --git a/examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_0.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_00.json similarity index 89% rename from examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_0.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_00.json index 142a60b..faa877b 100644 --- a/examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_0.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_00.json @@ -1,7 +1,7 @@ { - "async": 0, + "async": false, "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "duration": 582, + "duration": 569, "err": { "message": "oh no!", "name": "Error", @@ -50,16 +50,16 @@ "sync": true, "timedOut": false, "timings": { - "lifecycle": 33, + "lifecycle": 24, "before each": [ { "hookId": "h1", "fnDuration": 8, "afterFnDuration": 1 }, - { "hookId": "h2", "fnDuration": 305, "afterFnDuration": 0 } + { "hookId": "h2", "fnDuration": 316, "afterFnDuration": 0 } ], - "test": { "fnDuration": 1, "afterFnDuration": 233 }, - "after each": [{ "hookId": "h4", "fnDuration": 25, "afterFnDuration": 0 }] + "test": { "fnDuration": 1, "afterFnDuration": 219 }, + "after each": [{ "hookId": "h4", "fnDuration": 15, "afterFnDuration": 0 }] }, "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:55.761Z", + "wallClockStartedAt": "2023-09-18T23:16:57.176Z", "title": "Runs a test with retries", "currentRetry": 0, "fullTitle": "Retries Runs a test with retries" diff --git a/examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_1.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_01.json similarity index 81% rename from examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_1.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_01.json index 469d9b2..554ac92 100644 --- a/examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_1.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_01.json @@ -1,7 +1,7 @@ { - "async": 0, + "async": false, "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "duration": 267, + "duration": 287, "err": { "message": "oh no!", "name": "Error", @@ -38,16 +38,16 @@ "sync": true, "timedOut": false, "timings": { - "lifecycle": 22, + "lifecycle": 21, "before each": [ - { "hookId": "h1", "fnDuration": 3, "afterFnDuration": 0 }, - { "hookId": "h2", "fnDuration": 50, "afterFnDuration": 0 } + { "hookId": "h1", "fnDuration": 4, "afterFnDuration": 0 }, + { "hookId": "h2", "fnDuration": 53, "afterFnDuration": 0 } ], - "test": { "fnDuration": 0, "afterFnDuration": 188 }, - "after each": [{ "hookId": "h4", "fnDuration": 13, "afterFnDuration": 0 }] + "test": { "fnDuration": 1, "afterFnDuration": 207 }, + "after each": [{ "hookId": "h4", "fnDuration": 12, "afterFnDuration": 0 }] }, "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:56.389Z", + "wallClockStartedAt": "2023-09-18T23:16:57.804Z", "title": "Runs a test with retries", "currentRetry": 1, "fullTitle": "Retries Runs a test with retries" diff --git a/examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_2.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_02.json similarity index 53% rename from examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_2.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_02.json index 613c7e6..f05b4c6 100644 --- a/examples/webapp/afterTest_12.17.4_Retries_Runs a test with retries_2.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/retries.spec.js/testAfter_02.json @@ -1,7 +1,8 @@ { - "async": 0, + "async": false, "body": "function () {\n if (i > 1) {\n i--;\n throw new Error(\"oh no!\");\n }\n return;\n }", - "duration": 76, + "duration": 72, + "final": false, "id": "r3", "order": 1, "pending": false, @@ -10,16 +11,16 @@ "sync": true, "timedOut": false, "timings": { - "lifecycle": 27, + "lifecycle": 17, "before each": [ - { "hookId": "h1", "fnDuration": 4, "afterFnDuration": 0 }, - { "hookId": "h2", "fnDuration": 42, "afterFnDuration": 0 } + { "hookId": "h1", "fnDuration": 3, "afterFnDuration": 1 }, + { "hookId": "h2", "fnDuration": 50, "afterFnDuration": 0 } ], - "test": { "fnDuration": 0, "afterFnDuration": 1 }, - "after each": [{ "hookId": "h4", "fnDuration": 12, "afterFnDuration": 0 }] + "test": { "fnDuration": 0, "afterFnDuration": 0 }, + "after each": [{ "hookId": "h4", "fnDuration": 14, "afterFnDuration": 0 }] }, "type": "test", - "wallClockStartedAt": "2023-09-14T22:17:56.683Z", + "wallClockStartedAt": "2023-09-18T23:16:58.124Z", "title": "Runs a test with retries", "currentRetry": 2, "fullTitle": "Retries Runs a test with retries" diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/apiCall.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/apiCall.json new file mode 100644 index 0000000..43f678a --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/apiCall.json @@ -0,0 +1 @@ +{"tests":{"config":{"additionalIgnorePattern":[],"animationDistanceThreshold":5,"arch":"arm64","autoOpen":false,"baseUrl":"https://todomvc.com/examples/vanillajs","blockHosts":null,"browsers":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"114.0.5735.289","path":"","majorVersion":114}],"chromeWebSecurity":true,"clientCertificates":[],"clientRoute":"/__/","configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app","cypressEnv":"production","defaultCommandTimeout":4000,"devServerPublicPathRoute":"/__cypress/src","downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_temp_file":"/var/folders/x1/tpchd48d78x5bzxvz5ws5st00000gn/T/tmp-49142-TtFNSUGjb4EQ","currents_debug_enabled":false},"excludeSpecPattern":"*.hot-update.js","execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalOriginDependencies":false,"experimentalRunAllSpecs":false,"experimentalSingleTabRunMode":false,"experimentalSkipDomainInjection":null,"experimentalSourceRewriting":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","hideCommandLog":false,"hideRunnerUi":false,"hosts":null,"includeShadowDom":false,"isInteractive":true,"isTextTerminal":true,"keystrokeDelay":0,"modifyObstructiveCode":true,"morgan":false,"namespace":"__cypress","numTestsKeptInMemory":0,"pageLoadTimeout":60000,"platform":"darwin","port":null,"projectId":"l4zuz8","projectName":"webapp","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","protocolEnabled":false,"rawJson":{"video":true,"e2e":{"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]"},"component":{"specPattern":["pages/__tests__/*.spec.tsx"],"setupNodeEvents":"[Function setupNodeEvents]","devServer":{"framework":"next","bundler":"webpack"}},"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","setupNodeEvents":"[Function setupNodeEvents]","envFile":{},"projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","repoRoot":"/Users/agoldis/cypress-cloud"},"redirectionLimit":20,"repoRoot":"/Users/agoldis/cypress-cloud","report":true,"reporter":"spec","reporterOptions":null,"reporterRoute":"/__cypress/reporter","requestTimeout":5000,"resolved":{"animationDistanceThreshold":{"value":5,"from":"default"},"arch":{"value":"arm64","from":"default"},"baseUrl":{"value":"https://todomvc.com/examples/vanillajs","from":"config"},"blockHosts":{"value":null,"from":"default"},"chromeWebSecurity":{"value":true,"from":"default"},"clientCertificates":{"value":[],"from":"default"},"defaultCommandTimeout":{"value":4000,"from":"default"},"downloadsFolder":{"value":"cypress/downloads","from":"default"},"env":{"currents_temp_file":{"value":"/var/folders/x1/tpchd48d78x5bzxvz5ws5st00000gn/T/tmp-49142-TtFNSUGjb4EQ","from":"cli"},"currents_debug_enabled":{"value":false,"from":"cli"}},"execTimeout":{"value":60000,"from":"default"},"experimentalCspAllowList":{"value":false,"from":"default"},"experimentalFetchPolyfill":{"value":false,"from":"default"},"experimentalInteractiveRunEvents":{"value":false,"from":"default"},"experimentalRunAllSpecs":{"value":false,"from":"default"},"experimentalMemoryManagement":{"value":false,"from":"default"},"experimentalModifyObstructiveThirdPartyCode":{"value":false,"from":"default"},"experimentalSkipDomainInjection":{"value":null,"from":"default"},"experimentalOriginDependencies":{"value":false,"from":"default"},"experimentalSourceRewriting":{"value":false,"from":"default"},"experimentalSingleTabRunMode":{"value":false,"from":"default"},"experimentalStudio":{"value":false,"from":"default"},"experimentalWebKitSupport":{"value":false,"from":"default"},"fileServerFolder":{"value":"","from":"default"},"fixturesFolder":{"value":"cypress/fixtures","from":"default"},"excludeSpecPattern":{"value":"*.hot-update.js","from":"default"},"includeShadowDom":{"value":false,"from":"default"},"keystrokeDelay":{"value":0,"from":"default"},"modifyObstructiveCode":{"value":true,"from":"default"},"numTestsKeptInMemory":{"value":0,"from":"config"},"platform":{"value":"darwin","from":"default"},"pageLoadTimeout":{"value":60000,"from":"default"},"port":{"value":null,"from":"default"},"projectId":{"value":"l4zuz8","from":"config"},"redirectionLimit":{"value":20,"from":"default"},"reporter":{"value":"spec","from":"default"},"reporterOptions":{"value":null,"from":"default"},"requestTimeout":{"value":5000,"from":"default"},"resolvedNodePath":{"value":null,"from":"default"},"resolvedNodeVersion":{"value":null,"from":"default"},"responseTimeout":{"value":30000,"from":"default"},"retries":{"value":{"runMode":0,"openMode":0},"from":"default"},"screenshotOnRunFailure":{"value":true,"from":"default"},"screenshotsFolder":{"value":"cypress/screenshots","from":"default"},"slowTestThreshold":{"value":10000,"from":"default"},"scrollBehavior":{"value":"top","from":"default"},"supportFile":{"value":"cypress/support/e2e.ts","from":"config"},"supportFolder":{"value":false,"from":"default"},"taskTimeout":{"value":60000,"from":"default"},"testIsolation":{"value":true,"from":"default"},"trashAssetsBeforeRuns":{"value":true,"from":"default"},"userAgent":{"value":null,"from":"default"},"video":{"value":true,"from":"config"},"videoCompression":{"value":false,"from":"default"},"videosFolder":{"value":"cypress/videos","from":"default"},"viewportHeight":{"value":660,"from":"default"},"viewportWidth":{"value":1000,"from":"default"},"waitForAnimations":{"value":true,"from":"default"},"watchForFileChanges":{"value":false,"from":"config"},"specPattern":{"value":"cypress/e2e/*.js","from":"config"},"browsers":{"value":[{"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"117.0.5938.88","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","minSupportedVersion":64,"majorVersion":"117"},{"name":"firefox","family":"firefox","channel":"stable","displayName":"Firefox","version":"108.0","path":"/Applications/Firefox.app/Contents/MacOS/firefox","minSupportedVersion":86,"majorVersion":"108"},{"name":"electron","channel":"stable","family":"chromium","displayName":"Electron","version":"114.0.5735.289","path":"","majorVersion":114}],"from":"runtime"},"hosts":{"value":null,"from":"default"},"isInteractive":{"value":true,"from":"default"}},"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","scrollBehavior":"top","setupNodeEvents":"[Function setupNodeEvents]","slowTestThreshold":10000,"socketId":"b4whuvjayd","socketIoCookie":"__socket","socketIoRoute":"/__socket","specPattern":"cypress/e2e/*.js","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","supportFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support","taskTimeout":60000,"testIsolation":true,"trashAssetsBeforeRuns":true,"userAgent":null,"version":"13.2.0","video":true,"videoCompression":false,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"testingType":"e2e","videoUploadOnPasses":false},"tests":[{"body":"redacted","title":["Skipped","should not be skipped"],"clientId":"r0"},{"body":"redacted","title":["Skipped","should be skipped"],"clientId":"r1"}],"hooks":null},"results":{"stats":{"duration":459,"endedAt":"2023-09-18T23:17:19.901Z","startedAt":"2023-09-18T23:17:19.442Z","failures":1,"passes":0,"pending":0,"skipped":1,"suites":1,"tests":2,"wallClockDuration":459,"wallClockStartedAt":"2023-09-18T23:17:19.442Z","wallClockEndedAt":"2023-09-18T23:17:19.901Z"},"reporterStats":{"suites":1,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2023-09-18T23:17:19.445Z","end":"2023-09-18T23:17:19.907Z","duration":462},"exception":null,"video":true,"screenshots":[{"height":1440,"width":2560,"name":null,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","takenAt":"2023-09-18T23:17:19.625Z","testAttemptIndex":0,"testId":"r0","screenshotId":"ewjxmwxzqe"}],"hasCoverage":false,"tests":[{"displayError":"Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)","state":"failed","attempts":[{"state":"failed","error":{"name":"Error","message":"before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`","stack":"Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)","codeFrame":{"line":3,"column":11,"originalFile":"cypress/e2e/skipped.spec.js","relativeFile":"examples/webapp/cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","frame":" 1 | describe(\"Skipped\", function () {\n 2 | beforeEach(function () {\n> 3 | throw new Error(\"before each exception\");\n | ^\n 4 | });\n 5 | it(\"should not be skipped\", function () {\n 6 | expect(true).to.be.true;","language":"js"}},"wallClockStartedAt":"2023-09-18T23:17:19.446Z","wallClockDuration":213,"videoTimestamp":4}],"clientId":"r0"},{"displayError":null,"state":"skipped","attempts":[{"state":"skipped","error":{"name":"Error","message":"The test was skipped because of a hook failure","stack":"","codeFrame":null},"wallClockStartedAt":"2023-09-18T23:17:21.036Z","wallClockDuration":0,"videoTimestamp":0}],"clientId":"r1"}]}} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/runResult.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/runResult.json new file mode 100644 index 0000000..0669265 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/runResult.json @@ -0,0 +1 @@ +{"browserName":"electron","browserPath":"","browserVersion":"114.0.5735.289","config":{"configFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress.config.ts","testingType":"e2e","video":true,"projectId":"l4zuz8","baseUrl":"https://todomvc.com/examples/vanillajs","supportFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/support/e2e.ts","specPattern":"cypress/e2e/*.js","projectRoot":"/Users/agoldis/cypress-cloud/examples/webapp","projectName":"webapp","isTextTerminal":true,"trashAssetsBeforeRuns":false,"animationDistanceThreshold":5,"arch":"arm64","blockHosts":null,"chromeWebSecurity":true,"clientCertificates":[],"defaultCommandTimeout":4000,"downloadsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/downloads","env":{"currents_ws":54784},"execTimeout":60000,"experimentalCspAllowList":false,"experimentalFetchPolyfill":false,"experimentalInteractiveRunEvents":false,"experimentalRunAllSpecs":false,"experimentalMemoryManagement":false,"experimentalModifyObstructiveThirdPartyCode":false,"experimentalSkipDomainInjection":null,"experimentalOriginDependencies":false,"experimentalSourceRewriting":false,"experimentalSingleTabRunMode":false,"experimentalStudio":false,"experimentalWebKitSupport":false,"fileServerFolder":"/Users/agoldis/cypress-cloud/examples/webapp","fixturesFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/fixtures","excludeSpecPattern":"*.hot-update.js","includeShadowDom":false,"keystrokeDelay":0,"modifyObstructiveCode":true,"numTestsKeptInMemory":0,"platform":"darwin","pageLoadTimeout":60000,"port":55007,"redirectionLimit":20,"reporter":"spec","reporterOptions":null,"requestTimeout":5000,"resolvedNodePath":"/Users/agoldis/.nvm/versions/node/v18.16.1/bin/node","resolvedNodeVersion":"18.16.1","responseTimeout":30000,"retries":{"runMode":0,"openMode":0},"screenshotOnRunFailure":true,"screenshotsFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots","slowTestThreshold":10000,"scrollBehavior":"top","taskTimeout":60000,"testIsolation":true,"userAgent":null,"videoCompression":false,"videosFolder":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos","viewportHeight":660,"viewportWidth":1000,"waitForAnimations":true,"watchForFileChanges":false,"browsers":[{"channel":"stable","displayName":"Chrome","family":"chromium","majorVersion":"117","name":"chrome","path":"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","version":"117.0.5938.88"},{"channel":"stable","displayName":"Firefox","family":"firefox","majorVersion":"108","name":"firefox","path":"/Applications/Firefox.app/Contents/MacOS/firefox","version":"108.0"},{"channel":"stable","displayName":"Electron","family":"chromium","majorVersion":114,"name":"electron","path":"","version":"114.0.5735.289"}],"cypressBinaryRoot":"/Users/agoldis/Library/Caches/Cypress/13.2.0/Cypress.app/Contents/Resources/app","hosts":null,"isInteractive":true,"version":"13.2.0","browser":null,"cypressInternalEnv":"production"},"cypressVersion":"13.2.0","endedTestsAt":"2023-09-18T23:17:19.901Z","osName":"darwin","osVersion":"22.1.0","runs":[{"error":null,"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2023-09-18T23:17:19.445Z","end":"2023-09-18T23:17:19.907Z","duration":462},"screenshots":[{"height":1440,"name":null,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","takenAt":"2023-09-18T23:17:19.625Z","width":2560}],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","fileExtension":".js","fileName":"skipped","name":"skipped.spec.js","relative":"cypress/e2e/skipped.spec.js"},"stats":{"duration":459,"endedAt":"2023-09-18T23:17:19.901Z","failures":1,"passes":0,"pending":0,"skipped":1,"startedAt":"2023-09-18T23:17:19.442Z","suites":1,"tests":2},"tests":[{"attempts":[{"state":"failed"}],"displayError":"Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)","duration":415,"state":"failed","title":["Skipped","should not be skipped"]},{"attempts":[{"state":"skipped"}],"displayError":null,"duration":0,"state":"skipped","title":["Skipped","should be skipped"]}],"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/skipped.spec.js.mp4"}],"startedTestsAt":"2023-09-18T23:17:16.676Z","totalDuration":1155,"totalFailed":2,"totalPassed":0,"totalPending":0,"totalSkipped":1,"totalSuites":2,"totalTests":3} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/screenshot_01.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/screenshot_01.json new file mode 100644 index 0000000..0686601 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/screenshot_01.json @@ -0,0 +1 @@ +{"testAttemptIndex":0,"size":339836,"takenAt":"2023-09-18T23:17:19.625Z","dimensions":{"width":2560,"height":1440},"multipart":false,"specName":"skipped.spec.js","testFailure":true,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","scaled":true,"blackout":[],"duration":206,"testId":"r3","height":1440,"width":2560} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/specAfter.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/specAfter.json new file mode 100644 index 0000000..db8194d --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/specAfter.json @@ -0,0 +1 @@ +{"error":null,"reporter":"spec","reporterStats":{"suites":1,"tests":1,"passes":0,"pending":0,"failures":1,"start":"2023-09-18T23:17:19.445Z","end":"2023-09-18T23:17:19.907Z","duration":462},"screenshots":[{"height":1440,"name":null,"path":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png","takenAt":"2023-09-18T23:17:19.625Z","width":2560}],"spec":{"absolute":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","fileExtension":".js","fileName":"skipped","name":"skipped.spec.js","relative":"cypress/e2e/skipped.spec.js"},"stats":{"duration":459,"endedAt":"2023-09-18T23:17:19.901Z","failures":1,"passes":0,"pending":0,"skipped":1,"startedAt":"2023-09-18T23:17:19.442Z","suites":1,"tests":2},"tests":[{"attempts":[{"state":"failed"}],"displayError":"Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)","duration":415,"state":"failed","title":["Skipped","should not be skipped"]},{"attempts":[{"state":"skipped"}],"displayError":null,"duration":0,"state":"skipped","title":["Skipped","should be skipped"]}],"video":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/videos/skipped.spec.js.mp4"} \ No newline at end of file diff --git a/examples/webapp/afterTest_13.2.0_Skipped_should not be skipped_0.json b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/testAfter_00.json similarity index 82% rename from examples/webapp/afterTest_13.2.0_Skipped_should not be skipped_0.json rename to packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/testAfter_00.json index 965365d..cc5d46d 100644 --- a/examples/webapp/afterTest_13.2.0_Skipped_should not be skipped_0.json +++ b/packages/cypress-cloud/lib/__tests__/fixtures/13.2.0/skipped.spec.js/testAfter_00.json @@ -1 +1 @@ -{"async":false,"body":"function () {\n expect(true).to.be.true;\n }","duration":222,"err":{"message":"before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`","name":"Error","stack":"Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)","parsedStack":[{"message":"Error: before each exception","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js","originalFile":"webpack://web/./cypress/e2e/skipped.spec.js","relativeFile":"cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","line":3,"column":10,"whitespace":" "}],"codeFrame":{"line":3,"column":11,"originalFile":"cypress/e2e/skipped.spec.js","relativeFile":"examples/webapp/cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","frame":" 1 | describe(\"Skipped\", function () {\n 2 | beforeEach(function () {\n> 3 | throw new Error(\"before each exception\");\n | ^\n 4 | });\n 5 | it(\"should not be skipped\", function () {\n 6 | expect(true).to.be.true;","language":"js"}},"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js","originalFile":"webpack://web/./cypress/e2e/skipped.spec.js","relativeFile":"cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","line":5,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:13:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:20:12)\n at eval ()"},"order":1,"pending":false,"retries":0,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":23,"before each":[{"hookId":"h1","fnDuration":10,"afterFnDuration":0},{"hookId":"h2","fnDuration":274,"afterFnDuration":0},{"hookId":"h6","fnDuration":1,"afterFnDuration":221}],"after each":[{"hookId":"h4","fnDuration":20,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-14T22:42:25.625Z","title":"should not be skipped","currentRetry":0,"fullTitle":"Skipped should not be skipped"} \ No newline at end of file +{"async":false,"body":"function () {\n expect(true).to.be.true;\n }","duration":213,"err":{"message":"before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`","name":"Error","stack":"Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)","parsedStack":[{"message":"Error: before each exception","whitespace":""},{"function":"Context.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js","originalFile":"webpack://web/./cypress/e2e/skipped.spec.js","relativeFile":"cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","line":3,"column":10,"whitespace":" "}],"codeFrame":{"line":3,"column":11,"originalFile":"cypress/e2e/skipped.spec.js","relativeFile":"examples/webapp/cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","frame":" 1 | describe(\"Skipped\", function () {\n 2 | beforeEach(function () {\n> 3 | throw new Error(\"before each exception\");\n | ^\n 4 | });\n 5 | it(\"should not be skipped\", function () {\n 6 | expect(true).to.be.true;","language":"js"}},"final":false,"hooks":[],"id":"r3","invocationDetails":{"function":"Suite.eval","fileUrl":"https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js","originalFile":"webpack://web/./cypress/e2e/skipped.spec.js","relativeFile":"cypress/e2e/skipped.spec.js","absoluteFile":"/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js","line":5,"column":2,"whitespace":" ","stack":"Error\n at Suite.eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:13:3)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:9:1)\n at eval (https://todomvc.com/__cypress/tests?p=cypress/e2e/skipped.spec.js:20:12)\n at eval ()"},"order":1,"pending":false,"retries":0,"state":"failed","sync":true,"timedOut":false,"timings":{"lifecycle":32,"before each":[{"hookId":"h1","fnDuration":6,"afterFnDuration":1},{"hookId":"h2","fnDuration":131,"afterFnDuration":1},{"hookId":"h6","fnDuration":1,"afterFnDuration":212}],"after each":[{"hookId":"h4","fnDuration":14,"afterFnDuration":0}]},"type":"test","wallClockStartedAt":"2023-09-18T23:17:19.446Z","title":"should not be skipped","currentRetry":0,"fullTitle":"Skipped should not be skipped"} \ No newline at end of file diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/api/crash.spec.js/payload.ts b/packages/cypress-cloud/lib/__tests__/fixtures/api/crash.spec.js/payload.ts new file mode 100644 index 0000000..1ae7147 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/api/crash.spec.js/payload.ts @@ -0,0 +1,50 @@ +import { expect } from "@jest/globals"; +export const tests = { + config: { + videoUploadOnPasses: false, + }, + tests: [{ body: "redacted", title: ["Unknown"], clientId: "r0" }], + hooks: null, +}; +export const results = { + stats: { + duration: 0, + endedAt: expect.any(String), + startedAt: expect.any(String), + failures: 1, + passes: 0, + pending: 0, + skipped: 0, + suites: 0, + tests: 1, + wallClockDuration: 0, + wallClockStartedAt: expect.any(String), + wallClockEndedAt: expect.any(String), + }, + reporterStats: null, + exception: expect.any(String), + video: true, + screenshots: [], + hasCoverage: false, + tests: [ + { + displayError: "Oops...we found an error preparing this test file:", + state: "failed", + attempts: [ + { + state: "failed", + error: { + name: "Error", + message: "Oops...we found an error preparing this test file:", + stack: expect.any(String), + codeFrame: null, + }, + wallClockStartedAt: expect.any(String), + wallClockDuration: 0, + videoTimestamp: 0, + }, + ], + clientId: "r0", + }, + ], +}; diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/api/failed.spec.js/payload.ts b/packages/cypress-cloud/lib/__tests__/fixtures/api/failed.spec.js/payload.ts new file mode 100644 index 0000000..3b46907 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/api/failed.spec.js/payload.ts @@ -0,0 +1,87 @@ +import { expect } from "@jest/globals"; +export const tests = { + config: { + videoUploadOnPasses: false, + }, + tests: [ + { + body: "redacted", + title: ["Failed", "should fail"], + clientId: "r0", + }, + ], + hooks: null, +}; +export const results = { + stats: { + duration: expect.any(Number), + endedAt: expect.any(String), + startedAt: expect.any(String), + failures: 1, + passes: 0, + pending: 0, + skipped: 0, + suites: 1, + tests: 1, + wallClockDuration: expect.any(Number), + wallClockStartedAt: expect.any(String), + wallClockEndedAt: expect.any(String), + }, + reporterStats: { + suites: 1, + tests: 1, + passes: 0, + pending: 0, + failures: 1, + start: expect.any(String), + end: expect.any(String), + duration: expect.any(Number), + }, + exception: null, + video: true, + screenshots: [ + { + screenshotId: expect.any(String), + name: null, + testId: "r0", + testAttemptIndex: 0, + takenAt: expect.any(String), + path: "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/failed.spec.js/Failed -- should fail (failed).png", + height: 1440, + width: 2560, + }, + ], + hasCoverage: false, + tests: [ + { + displayError: + "ReferenceError: fail is not defined\n at Context.eval (webpack://web/./cypress/e2e/failed.spec.js:3:11)", + state: "failed", + attempts: [ + { + state: "failed", + error: { + name: "ReferenceError", + message: "fail is not defined", + stack: expect.any(String), + codeFrame: { + line: 3, + column: 12, + originalFile: "cypress/e2e/failed.spec.js", + relativeFile: "examples/webapp/cypress/e2e/failed.spec.js", + absoluteFile: + "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/failed.spec.js", + frame: + ' 1 | describe("Failed", function () {\n 2 | it("should fail", function () {\n> 3 | expect(fail).to.be.true;\n | ^\n 4 | });\n 5 | });\n 6 | ', + language: "js", + }, + }, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + ], + clientId: "r0", + }, + ], +}; diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/api/passed.spec.js/payload.ts b/packages/cypress-cloud/lib/__tests__/fixtures/api/passed.spec.js/payload.ts new file mode 100644 index 0000000..7b36f44 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/api/passed.spec.js/payload.ts @@ -0,0 +1,73 @@ +import { expect } from "@jest/globals"; + +export const tests = { + config: { + videoUploadOnPasses: false, + }, + tests: [ + { + body: "redacted", + title: ["Passed", "should pass"], + clientId: "r0", + }, + ], + hooks: null, +}; + +export const results = { + stats: { + duration: expect.any(Number), + endedAt: expect.any(String), + startedAt: expect.any(String), + failures: 0, + passes: 1, + pending: 0, + skipped: 0, + suites: 1, + tests: 1, + wallClockDuration: expect.any(Number), + wallClockStartedAt: expect.any(String), + wallClockEndedAt: expect.any(String), + }, + reporterStats: { + suites: 1, + tests: 1, + passes: 1, + pending: 0, + failures: 0, + start: expect.any(String), + end: expect.any(String), + duration: expect.any(Number), + }, + exception: null, + video: true, + screenshots: [ + { + height: 1320, + width: 2000, + name: null, + path: "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/passed.spec.js/Passed -- should pass.png", + takenAt: expect.any(String), + testAttemptIndex: 0, + testId: "r0", + screenshotId: expect.any(String), + }, + ], + hasCoverage: false, + tests: [ + { + displayError: null, + state: "passed", + attempts: [ + { + state: "passed", + error: null, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + ], + clientId: "r0", + }, + ], +}; diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/api/pending.spec.js/payload.ts b/packages/cypress-cloud/lib/__tests__/fixtures/api/pending.spec.js/payload.ts new file mode 100644 index 0000000..4abc953 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/api/pending.spec.js/payload.ts @@ -0,0 +1,61 @@ +import { expect } from "@jest/globals"; + +export const tests = { + config: { + videoUploadOnPasses: false, + }, + tests: [ + { + body: "redacted", + title: ["Pending", "Pending test"], + clientId: "r0", + }, + ], + hooks: null, +}; +export const results = { + stats: { + duration: expect.any(Number), + endedAt: expect.any(String), + startedAt: expect.any(String), + failures: 0, + passes: 0, + pending: 1, + skipped: 0, + suites: 1, + tests: 1, + wallClockDuration: expect.any(Number), + wallClockStartedAt: expect.any(String), + wallClockEndedAt: expect.any(String), + }, + reporterStats: { + suites: 1, + tests: 1, + passes: 0, + pending: 1, + failures: 0, + start: expect.any(String), + end: expect.any(String), + duration: expect.any(Number), + }, + exception: null, + video: true, + screenshots: [], + hasCoverage: false, + tests: [ + { + displayError: null, + state: "pending", + attempts: [ + { + state: "pending", + error: null, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + ], + clientId: "r0", + }, + ], +}; diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/api/retries.spec.js/payload.ts b/packages/cypress-cloud/lib/__tests__/fixtures/api/retries.spec.js/payload.ts new file mode 100644 index 0000000..4eae0c3 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/api/retries.spec.js/payload.ts @@ -0,0 +1,126 @@ +import { expect } from "@jest/globals"; + +export const tests = { + config: { + videoUploadOnPasses: false, + }, + tests: [ + { + body: "redacted", + title: ["Retries", "Runs a test with retries"], + clientId: "r0", + }, + ], + hooks: null, +}; +export const results = { + stats: { + duration: expect.any(Number), + endedAt: expect.any(String), + startedAt: expect.any(String), + failures: 0, + passes: 1, + pending: 0, + skipped: 0, + suites: 1, + tests: 1, + wallClockDuration: expect.any(Number), + wallClockStartedAt: expect.any(String), + wallClockEndedAt: expect.any(String), + }, + reporterStats: { + suites: 1, + tests: 1, + passes: 1, + pending: 0, + failures: 0, + start: expect.any(String), + end: expect.any(String), + duration: expect.any(Number), + }, + exception: null, + video: true, + screenshots: [ + { + height: 1440, + width: 2560, + name: null, + path: "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed).png", + takenAt: expect.any(String), + testAttemptIndex: 0, + testId: "r0", + screenshotId: expect.any(String), + }, + { + height: 1440, + width: 2560, + name: null, + path: "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/retries.spec.js/Retries -- Runs a test with retries (failed) (attempt 2).png", + takenAt: expect.any(String), + testAttemptIndex: 1, + testId: "r0", + screenshotId: expect.any(String), + }, + ], + hasCoverage: false, + tests: [ + { + displayError: null, + state: "passed", + attempts: [ + { + state: "failed", + error: { + name: "Error", + message: "oh no!", + stack: expect.any(String), + codeFrame: { + line: 11, + column: 15, + originalFile: "cypress/e2e/retries.spec.js", + relativeFile: "examples/webapp/cypress/e2e/retries.spec.js", + absoluteFile: + "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", + frame: + ' 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error("oh no!");\n | ^\n 12 | }\n 13 | return;\n 14 | }', + language: "js", + }, + }, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + { + state: "failed", + error: { + name: "Error", + message: "oh no!", + stack: expect.any(String), + codeFrame: { + line: 11, + column: 15, + originalFile: "cypress/e2e/retries.spec.js", + relativeFile: "examples/webapp/cypress/e2e/retries.spec.js", + absoluteFile: + "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/retries.spec.js", + frame: + ' 9 | if (i > 1) {\n 10 | i--;\n> 11 | throw new Error("oh no!");\n | ^\n 12 | }\n 13 | return;\n 14 | }', + language: "js", + }, + }, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + { + state: "passed", + error: null, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + ], + clientId: "r0", + }, + ], +}; diff --git a/packages/cypress-cloud/lib/__tests__/fixtures/api/skipped.spec.js/payload.ts b/packages/cypress-cloud/lib/__tests__/fixtures/api/skipped.spec.js/payload.ts new file mode 100644 index 0000000..9f699f3 --- /dev/null +++ b/packages/cypress-cloud/lib/__tests__/fixtures/api/skipped.spec.js/payload.ts @@ -0,0 +1,114 @@ +import { expect } from "@jest/globals"; + +export const tests = { + config: { + videoUploadOnPasses: false, + }, + tests: [ + { + body: "redacted", + title: ["Skipped", "should not be skipped"], + clientId: "r0", + }, + { + body: "redacted", + title: ["Skipped", "should be skipped"], + clientId: "r1", + }, + ], + hooks: null, +}; + +export const results = { + stats: { + duration: expect.any(Number), + endedAt: expect.any(String), + startedAt: expect.any(String), + failures: 1, + passes: 0, + pending: 0, + skipped: 1, + suites: 1, + tests: 2, + wallClockDuration: expect.any(Number), + wallClockStartedAt: expect.any(String), + wallClockEndedAt: expect.any(String), + }, + reporterStats: { + suites: 1, + tests: 1, + passes: 0, + pending: 0, + failures: 1, + start: expect.any(String), + end: expect.any(String), + duration: expect.any(Number), + }, + exception: null, + video: true, + screenshots: [ + { + height: 1440, + width: 2560, + name: null, + path: "/Users/agoldis/cypress-cloud/examples/webapp/cypress/screenshots/skipped.spec.js/Skipped -- should not be skipped -- before each hook (failed).png", + takenAt: expect.any(String), + testAttemptIndex: 0, + testId: "r0", + screenshotId: expect.any(String), + }, + ], + hasCoverage: false, + tests: [ + { + displayError: + "Error: before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`\n at Context.eval (webpack://web/./cypress/e2e/skipped.spec.js:3:10)", + state: "failed", + attempts: [ + { + state: "failed", + error: { + name: "Error", + message: + "before each exception\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Skipped`", + stack: expect.any(String), + codeFrame: { + line: 3, + column: 11, + originalFile: "cypress/e2e/skipped.spec.js", + relativeFile: "examples/webapp/cypress/e2e/skipped.spec.js", + absoluteFile: + "/Users/agoldis/cypress-cloud/examples/webapp/cypress/e2e/skipped.spec.js", + frame: + ' 1 | describe("Skipped", function () {\n 2 | beforeEach(function () {\n> 3 | throw new Error("before each exception");\n | ^\n 4 | });\n 5 | it("should not be skipped", function () {\n 6 | expect(true).to.be.true;', + language: "js", + }, + }, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + ], + clientId: "r0", + }, + { + displayError: null, + state: "skipped", + attempts: [ + { + state: "skipped", + error: { + name: "Error", + message: "The test was skipped because of a hook failure", + stack: "", + codeFrame: null, + }, + wallClockStartedAt: expect.any(String), + wallClockDuration: expect.any(Number), + videoTimestamp: expect.any(Number), + }, + ], + clientId: "r1", + }, + ], +}; diff --git a/packages/cypress-cloud/lib/cypress.types/13.ts b/packages/cypress-cloud/lib/cypress.types/13.ts index 2509d69..1a1eac8 100644 --- a/packages/cypress-cloud/lib/cypress.types/13.ts +++ b/packages/cypress-cloud/lib/cypress.types/13.ts @@ -1,5 +1,5 @@ import { Cypress12 } from "./12"; -import { TestState, TestingType } from "./shared"; +import { TestAttemptState, TestState, TestingType } from "./shared"; export namespace Cypress13 { export namespace SpecAfter { @@ -63,7 +63,7 @@ export namespace Cypress13 { } export interface TestAttempt { - state: TestState; + state: TestAttemptState; } } diff --git a/packages/cypress-cloud/lib/cypress.types/README.md b/packages/cypress-cloud/lib/cypress.types/README.md new file mode 100644 index 0000000..b8fd6b6 --- /dev/null +++ b/packages/cypress-cloud/lib/cypress.types/README.md @@ -0,0 +1,19 @@ +# Cypress Types + +This directory stored cross-version definition of Cypress Types. Those definition help to identify and standardize the results across different versions. + +- `13.ts` - data for Cypress 13+ (based on 13.2.0) +- `12.ts` - data for Cypress 12+ (based on 12.174) +- `index.ts` - union of all types + +The namespaces in `index.ts` are as follows: + +- `CypressTypes` - Cypress types + + - `EventPayload` - data for different event emitted by Cypress + - `ModuleAPI` - data returned by `cypress.run` ModuleAPI + +- `Standard` - a standard form used by Currents to store data collected from various cypress versions. Before sending payload to Currents or Sorry Cypress API we will convert the data from version-specific shape to the `Standard` shape via a series of transformations (see `dataFlow.spec.ts`) + + - `SpecAfter` - payload of `spec:after` events + - `ModuleAPI` - payload of `cypress.run` return value diff --git a/packages/cypress-cloud/lib/debug-data.ts b/packages/cypress-cloud/lib/debug-data.ts new file mode 100644 index 0000000..93a120e --- /dev/null +++ b/packages/cypress-cloud/lib/debug-data.ts @@ -0,0 +1,54 @@ +import fs from "fs"; +import path from "path"; + +import { CypressTypes } from "./cypress.types"; +import { green } from "./log"; +import { _cypressVersion } from "./state/global"; + +export function writeDataToFile( + data: string, + spec: string, + type: string, + suffix: string = "" +) { + // eslint-disable-next-line turbo/no-undeclared-env-vars + if (typeof process.env.JEST_WORKER_ID !== "undefined") { + return; + } + const dir = path.resolve(`${_cypressVersion as string}/${spec}`); + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir, { + recursive: true, + }); + } + const p = path.resolve(`${dir}/${type}${suffix}.json`); + console.log(green(`\tWriting ${type} data to: ${p}`)); + fs.writeFileSync(p, data); +} +export function getSpecShortName(spec: string) { + const dir = path.dirname(spec); + return spec.replace(`${dir}/`, ""); +} + +const screenshots: Record = {}; +export function getScreenshotCount(spec: string) { + if (!screenshots[spec]) { + screenshots[spec] = 0; + } + screenshots[spec]++; + return screenshots[spec]; +} + +const testsHooks: Record = {}; +export function getTestHookSpecName( + test: + | CypressTypes.EventPayload.TestAfter + | CypressTypes.EventPayload.TestBefore +) { + if (test.invocationDetails) { + const r = getSpecShortName(test.invocationDetails.relativeFile); + testsHooks[test.fullTitle] = r; + } + + return testsHooks[test.fullTitle]; +} diff --git a/packages/cypress-cloud/lib/httpClient/httpClient.ts b/packages/cypress-cloud/lib/httpClient/httpClient.ts index 7e73755..d6536e4 100644 --- a/packages/cypress-cloud/lib/httpClient/httpClient.ts +++ b/packages/cypress-cloud/lib/httpClient/httpClient.ts @@ -12,6 +12,7 @@ import prettyMilliseconds from "pretty-ms"; import { getCurrentsConfig } from "../config"; import { ValidationError } from "../errors"; import { warn } from "../log"; +import { _currentsVersion, _cypressVersion, _runId } from "../state/global"; import { getAPIBaseUrl, getDelay, isRetriableError } from "./config"; import { maybePrintErrors } from "./printErrors"; @@ -84,21 +85,6 @@ export async function getClient() { return _client; } -let _runId: string | undefined = undefined; -export const setRunId = (runId: string) => { - _runId = runId; -}; - -let _cypressVersion: string | undefined = undefined; -export const setCypressVersion = (cypressVersion: string) => { - _cypressVersion = cypressVersion; -}; - -let _currentsVersion: string | undefined = undefined; -export const setCurrentsVersion = (v: string) => { - _currentsVersion = v; -}; - function onRetry( retryCount: number, err: AxiosError<{ message: string; errors?: string[] }>, diff --git a/packages/cypress-cloud/lib/init.ts b/packages/cypress-cloud/lib/init.ts index 9ce9928..b773761 100644 --- a/packages/cypress-cloud/lib/init.ts +++ b/packages/cypress-cloud/lib/init.ts @@ -6,7 +6,7 @@ const cypressPkg = require("cypress/package.json"); const pkg = require("cypress-cloud/package.json"); import { initCapture } from "./capture"; -import { setCurrentsVersion, setCypressVersion } from "./httpClient"; +import { setCurrentsVersion, setCypressVersion } from "./state/global"; initCapture(); setCypressVersion(cypressPkg.version); diff --git a/packages/cypress-cloud/lib/listener.ts b/packages/cypress-cloud/lib/listener.ts new file mode 100644 index 0000000..1a76a8b --- /dev/null +++ b/packages/cypress-cloud/lib/listener.ts @@ -0,0 +1,124 @@ +import chalk from "chalk"; +import Debug from "debug"; + +import { getCapturedOutput } from "./capture"; +import { getCoverageFilePath } from "./coverage"; +import { CypressTypes } from "./cypress.types"; +import { getSpecShortName, writeDataToFile } from "./debug-data"; +import { format } from "./log"; +import { pubsub } from "./pubsub"; +import { + handleScreenshotEvent, + handleTestAfter, + handleTestBefore, +} from "./results/captureHooks"; +import { ModuleAPIResults } from "./results/moduleAPIResult"; +import { SpecAfterResult } from "./results/specAfterResult"; +import { createReportTaskSpec } from "./runner"; +import { ConfigState, ExecutionState } from "./state"; + +const debug = Debug("currents:events"); + +const events = [ + "cypress:runResult", + "test:after:run", + "test:before:run", + "after:screenshot", + "after:spec", +]; +export function stopListeningToEvents() { + events.forEach((e) => pubsub.removeAllListeners(e)); +} +export function listenToEvents( + configState: ConfigState, + executionState: ExecutionState, + experimentalCoverageRecording?: boolean +) { + const config = configState.getConfig(); + + pubsub.on( + "cypress:runResult", + ({ + instanceId, + runResult, + specRelative, + }: { + specRelative: string; + instanceId: string; + runResult: CypressTypes.ModuleAPI.CompletedResult; + }) => { + // % save results + writeDataToFile( + JSON.stringify(runResult), + getSpecShortName(specRelative), + "runResult" + ); + debug("cypress:runResult %s: %o", instanceId, runResult); + executionState.setInstanceResult( + instanceId, + ModuleAPIResults.getStandardResult(runResult, executionState) + ); + } + ); + + pubsub.on("test:after:run", (payload: string) => { + debug("test:after:run %o", payload); + handleTestAfter(payload, executionState); + }); + + pubsub.on("test:before:run", (payload: string) => { + debug("test:before:run %o", payload); + handleTestBefore(payload, executionState); + }); + + pubsub.on( + "after:screenshot", + (screenshot: CypressTypes.EventPayload.ScreenshotAfter) => { + debug("after:screenshot %o", screenshot); + handleScreenshotEvent(screenshot, executionState); + } + ); + + pubsub.on( + "after:spec", + async ({ + spec, + results, + }: { + spec: CypressTypes.EventPayload.SpecAfter.Spec; + results: CypressTypes.EventPayload.SpecAfter.Payload; + }) => { + // % save results + const s = getSpecShortName(spec.relative); + writeDataToFile(JSON.stringify(results), s, "specAfter"); + + debug("after:spec %s %o", spec.relative, results); + executionState.setSpecAfter( + spec.relative, + SpecAfterResult.getSpecAfterStandard(results, executionState) + ); + executionState.setSpecOutput(spec.relative, getCapturedOutput()); + + if (experimentalCoverageRecording) { + const { path, error } = await getCoverageFilePath( + config?.env?.coverageFile + ); + + if (!error) { + executionState.setSpecCoverage(spec.relative, path); + } else { + executionState.addWarning( + format( + `Error reading coverage file "%s". Coverage recording will be skipped.\n${chalk.dim( + `Error: %s` + )}`, + path, + error + ) + ); + } + } + createReportTaskSpec(configState, executionState, spec.relative); + } + ); +} diff --git a/packages/cypress-cloud/lib/results/__tests__/mapResults.test.ts b/packages/cypress-cloud/lib/results/__tests__/mapResults.test.ts deleted file mode 100644 index 900a196..0000000 --- a/packages/cypress-cloud/lib/results/__tests__/mapResults.test.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { getInstanceResultPayload, getInstanceTestsPayload } from "../api"; -import configException from "./fixtures/payloads/cypressResult/exception/config.json"; -import rawResultException from "./fixtures/payloads/cypressResult/exception/results.json"; - -describe("exception in cypress result", () => { - xit("should populate instance tests payload when exception", () => { - expect( - getInstanceTestsPayload(rawResultException, configException) - ).toMatchObject({ - config: configException, - tests: [ - { - displayError: "Oops...we found an error preparing this test file:", - state: "failed", - hooks: [], - clientId: "r0", - body: "", - attempts: [ - getTestAttempt({ - state: "failed", - duration: 0, - error: { - name: "Error", - message: rawResultException.error.split("\n")[0], - stack: rawResultException.error, - }, - screenshots: [], - startedAt: rawResultException.stats.startedAt, - videoTimestamp: 0, - }), - ], - }, - ], - }); - }); - xit("should populate instances results payload when exception", () => { - expect(getInstanceResultPayload(rawResultException)).toMatchObject({ - tests: [ - { - displayError: "Oops...we found an error preparing this test file:", - state: "failed", - hooks: [], - clientId: "r0", - body: "", - attempts: [ - getTestAttempt({ - state: "failed", - duration: 0, - error: { - name: "Error", - message: rawResultException.error.split("\n")[0], - stack: rawResultException.error, - }, - screenshots: [], - startedAt: rawResultException.stats.startedAt, - videoTimestamp: 0, - }), - ], - }, - ], - }); - }); -}); diff --git a/packages/cypress-cloud/lib/results/captureHooks.ts b/packages/cypress-cloud/lib/results/captureHooks.ts index 7cae79b..8dae033 100644 --- a/packages/cypress-cloud/lib/results/captureHooks.ts +++ b/packages/cypress-cloud/lib/results/captureHooks.ts @@ -1,16 +1,30 @@ import { CypressTypes } from "../cypress.types"; +import { + getScreenshotCount, + getTestHookSpecName, + writeDataToFile, +} from "../debug-data"; import { ExecutionState } from "../state"; export function handleScreenshotEvent( screenshot: CypressTypes.EventPayload.ScreenshotAfter, executionState: ExecutionState ) { - executionState.addScreenshotsData({ + const data = { ...screenshot, testId: executionState.getCurrentTestID(), height: screenshot.dimensions.height, width: screenshot.dimensions.width, - }); + }; + // % save results + writeDataToFile( + JSON.stringify(data), + `${screenshot.specName}`, + `screenshot`, + `_0${getScreenshotCount(screenshot.specName)}` + ); + + executionState.addScreenshotsData(data); } export function handleTestBefore( @@ -26,5 +40,14 @@ export function handleTestAfter( executionState: ExecutionState ) { const test: CypressTypes.EventPayload.TestAfter = JSON.parse(testAttempt); + + // % save results + writeDataToFile( + testAttempt, + getTestHookSpecName(test), + "testAfter", + `_0${test.currentRetry}` + ); + executionState.addAttemptsData(test); } diff --git a/packages/cypress-cloud/lib/results/moduleAPIResult.ts b/packages/cypress-cloud/lib/results/moduleAPIResult.ts index c145e32..75f7f08 100644 --- a/packages/cypress-cloud/lib/results/moduleAPIResult.ts +++ b/packages/cypress-cloud/lib/results/moduleAPIResult.ts @@ -10,7 +10,7 @@ import { import { SpecAfterResult } from "./specAfterResult"; export class ModuleAPIResults { - static getRunScreenshots(run: CypressTypes.ModuleAPI.Run) { + private static getRunScreenshots(run: CypressTypes.ModuleAPI.Run) { if ("screenshots" in run) { return run.screenshots; } @@ -19,7 +19,7 @@ export class ModuleAPIResults { ); } - static getTests( + private static getTests( run: CypressTypes.ModuleAPI.Run, executionState: ExecutionState ) { @@ -142,39 +142,29 @@ export class ModuleAPIResults { ...run, tests: ModuleAPIResults.getTests(run, executionState), spec: SpecAfterResult.getSpecStandard(run.spec), - hooks: "hooks" in run ? run.hooks : [], + // hooks: "hooks" in run ? run.hooks : [], + hooks: null, shouldUploadVideo: "shouldUploadVideo" in run ? run.shouldUploadVideo : true, }; } /** - * Convert batched multi-spec result into a single-spec result * Converts different Cypress versions to standard form - * - * @param spec - relative spec path - * @param batchResults - batched results in Module API format - * @returns Module API results for single spec in standard format */ - static getRunResultPerSpec( - spec: string, - batchResults: CypressTypes.ModuleAPI.Result, + static getStandardResult( + result: CypressTypes.ModuleAPI.CompletedResult, executionState: ExecutionState - ): Standard.ModuleAPI.CompletedResult | undefined { - if (!ModuleAPIResults.isSuccessResult(batchResults)) { - // TODO: return dummy result for missing spec results? - return; - } - - const run = batchResults.runs.find((r) => r.spec.relative === spec); - if (!run) { - return; + ): Standard.ModuleAPI.CompletedResult { + if (result.runs.length !== 1) { + throw new Error("Expected single run"); } + const run = result.runs[0]; const stats = SpecAfterResult.getStatsStandard(run.stats); // standardize the result for singe spec return { - ...batchResults, + ...result, runs: [ModuleAPIResults.getRun(run, executionState)], totalSuites: 1, totalDuration: stats.wallClockDuration, diff --git a/packages/cypress-cloud/lib/results/specAfterResult.ts b/packages/cypress-cloud/lib/results/specAfterResult.ts index 80c08fa..ed4887f 100644 --- a/packages/cypress-cloud/lib/results/specAfterResult.ts +++ b/packages/cypress-cloud/lib/results/specAfterResult.ts @@ -23,7 +23,8 @@ export class SpecAfterResult { ) { return { error: specAfterResults.error, - hooks: "hooks" in specAfterResults ? specAfterResults.hooks : null, + // hooks: "hooks" in specAfterResults ? specAfterResults.hooks : null, + hooks: null, reporter: specAfterResults.reporter, reporterStats: specAfterResults.reporterStats, spec: SpecAfterResult.getSpecStandard(specAfterResults.spec), @@ -92,28 +93,29 @@ export class SpecAfterResult { .otherwise(() => null); } - static getTestAttemptStandard( + private static getTestAttemptStandard( mochaAttempt: ExecutionStateTestAttempt | null, cypressAttempt: CypressTypes.EventPayload.SpecAfter.TestAttempt, specStartedAt: Date ): Standard.SpecAfter.TestAttempt { if (!mochaAttempt) { + const error = "error" in cypressAttempt ? cypressAttempt.error : null; + const duration = + "wallClockDuration" in cypressAttempt + ? cypressAttempt.wallClockDuration + : null; return { state: cypressAttempt.state, - error: - "error" in cypressAttempt - ? cypressAttempt.error - : SpecAfterResult.getDummyTestAttemptError(cypressAttempt.state), + error: error + ? error + : SpecAfterResult.getDummyTestAttemptError(cypressAttempt.state), timings: "timings" in cypressAttempt ? cypressAttempt.timings : null, wallClockStartedAt: "wallClockStartedAt" in cypressAttempt ? cypressAttempt.wallClockStartedAt : new Date().toISOString(), - wallClockDuration: - "wallClockDuration" in cypressAttempt - ? cypressAttempt.wallClockDuration - : 0, + wallClockDuration: duration ? duration : 0, failedFromHookId: "failedFromHookId" in cypressAttempt ? cypressAttempt.failedFromHookId @@ -152,10 +154,11 @@ export class SpecAfterResult { }; } - static getTestStandard( + private static getTestStandard( specAfterResults: CypressTypes.EventPayload.SpecAfter.Payload, attempts: ExecutionState["attemptsData"] ) { + debugger; const standardTestList: Standard.SpecAfter.Payload["tests"] = ( specAfterResults.tests ?? [] ).map((test, i) => { @@ -236,7 +239,7 @@ export class SpecAfterResult { return result; } - static getScreenshotsStandard( + private static getScreenshotsStandard( specAfterScreenshots: CypressTypes.EventPayload.SpecAfter.Payload["screenshots"], screenshotEvents: ExecutionState["screenshotsData"] ): Standard.SpecAfter.Payload["screenshots"] { diff --git a/packages/cypress-cloud/lib/results/uploadResults.ts b/packages/cypress-cloud/lib/results/uploadResults.ts index ef2d3e7..c0a2769 100644 --- a/packages/cypress-cloud/lib/results/uploadResults.ts +++ b/packages/cypress-cloud/lib/results/uploadResults.ts @@ -8,9 +8,11 @@ import { import { uploadArtifacts, uploadStdoutSafe } from "../artifacts"; import { setCancellationReason } from "../cancellation"; import { getInitialOutput } from "../capture"; +import { getSpecShortName, writeDataToFile } from "../debug-data"; import { isCurrents } from "../env"; import { ConfigState, ExecutionState } from "../state"; import { getInstanceResultPayload, getInstanceTestsPayload } from "./api"; + const debug = Debug("currents:results"); export async function getReportResultsTask( @@ -27,6 +29,17 @@ export async function getReportResultsTask( } const instanceResults = getInstanceResultPayload(run, coverageFilePath); const instanceTests = getInstanceTestsPayload(run, configState); + + // % save results + writeDataToFile( + JSON.stringify({ + tests: instanceTests, + results: instanceResults, + }), + getSpecShortName(results.runs[0].spec.relative), + "apiCall" + ); + const { videoUploadUrl, screenshotUploadUrls, coverageUploadUrl, cloud } = await reportResults(instanceId, instanceTests, instanceResults); diff --git a/packages/cypress-cloud/lib/run.ts b/packages/cypress-cloud/lib/run.ts index 478d1f7..63e28a2 100644 --- a/packages/cypress-cloud/lib/run.ts +++ b/packages/cypress-cloud/lib/run.ts @@ -1,12 +1,10 @@ import "./init"; -import chalk from "chalk"; import Debug from "debug"; -import plur from "plur"; import { getLegalNotice } from "../legal"; import { CurrentsRunParameters } from "../types"; import { createRun } from "./api"; -import { cutInitialOutput, getCapturedOutput } from "./capture"; +import { cutInitialOutput } from "./capture"; import { getCI } from "./ciProvider"; import { getMergedConfig, @@ -14,31 +12,21 @@ import { preprocessParams, validateParams, } from "./config"; -import { getCoverageFilePath } from "./coverage"; import { runBareCypress } from "./cypress"; -import { CypressTypes } from "./cypress.types"; import { activateDebug } from "./debug"; import { isCurrents } from "./env"; import { getGitInfo } from "./git"; -import { setAPIBaseUrl, setRunId } from "./httpClient"; -import { bold, divider, format, info, spacer, title, warn } from "./log"; +import { setAPIBaseUrl } from "./httpClient"; +import { listenToEvents } from "./listener"; +import { bold, divider, info, spacer, title } from "./log"; import { getPlatform } from "./platform"; -import { pubsub } from "./pubsub"; import { summarizeExecution, summaryTable } from "./results"; -import { - handleScreenshotEvent, - handleTestAfter, - handleTestBefore, -} from "./results/captureHooks"; -import { SpecAfterResult } from "./results/specAfterResult"; -import { - createReportTaskSpec, - reportTasks, - runTillDoneOrCancelled, -} from "./runner"; +import { reportTasks, runTillDoneOrCancelled } from "./runner"; import { shutdown } from "./shutdown"; import { getSpecFiles } from "./specMatcher"; import { ConfigState, ExecutionState } from "./state"; +import { setRunId } from "./state/global"; +import { printWarnings } from "./warnings"; import { startWSS } from "./ws"; const debug = Debug("currents:run"); @@ -46,7 +34,9 @@ const debug = Debug("currents:run"); export async function run(params: CurrentsRunParameters = {}) { const executionState = new ExecutionState(); const configState = new ConfigState(); + activateDebug(params.cloudDebug); + debug("run params %o", params); params = preprocessParams(params); debug("params after preprocess %o", params); @@ -124,7 +114,7 @@ export async function run(params: CurrentsRunParameters = {}) { cutInitialOutput(); await startWSS(); - listenToSpecEvents( + listenToEvents( configState, executionState, config.experimentalCoverageRecording @@ -167,78 +157,3 @@ export async function run(params: CurrentsRunParameters = {}) { runUrl: run.runUrl, }; } - -function printWarnings(executionState: ExecutionState) { - const warnings = Array.from(executionState.getWarnings()); - if (warnings.length > 0) { - warn( - `${warnings.length} ${plur( - "Warning", - warnings.length - )} encountered during the execution:\n${warnings - .map( - (w, i) => `\n${chalk.yellow(`[${i + 1}/${warnings.length}]`)} ${w}` - ) - .join("\n")}` - ); - } -} - -function listenToSpecEvents( - configState: ConfigState, - executionState: ExecutionState, - experimentalCoverageRecording?: boolean -) { - const config = configState.getConfig(); - - pubsub.on("test:after:run", (payload: string) => { - handleTestAfter(payload, executionState); - }); - - pubsub.on("test:before:run", (payload: string) => { - handleTestBefore(payload, executionState); - }); - - pubsub.on("after:screenshot", (screenshot) => { - handleScreenshotEvent(screenshot, executionState); - }); - - pubsub.on( - "after:spec", - async ({ - spec, - results, - }: { - spec: CypressTypes.EventPayload.SpecAfter.Spec; - results: CypressTypes.EventPayload.SpecAfter.Payload; - }) => { - debug("after:spec %o %o", spec, results); - executionState.setSpecAfter( - spec.relative, - SpecAfterResult.getSpecAfterStandard(results, executionState) - ); - executionState.setSpecOutput(spec.relative, getCapturedOutput()); - - if (experimentalCoverageRecording) { - const { path, error } = await getCoverageFilePath( - config?.env?.coverageFile - ); - - if (!error) { - executionState.setSpecCoverage(spec.relative, path); - } else { - executionState.addWarning( - format( - `Error reading coverage file "%s". Coverage recording will be skipped.\n${chalk.dim( - `Error: %s` - )}`, - path, - error - ) - ); - } - } - createReportTaskSpec(configState, executionState, spec.relative); - } - ); -} diff --git a/packages/cypress-cloud/lib/runner/runner.ts b/packages/cypress-cloud/lib/runner/runner.ts index a2edf5d..1f16b3e 100644 --- a/packages/cypress-cloud/lib/runner/runner.ts +++ b/packages/cypress-cloud/lib/runner/runner.ts @@ -8,15 +8,16 @@ import { ModuleAPIResults } from "../results/moduleAPIResult"; import Debug from "debug"; import { + InstanceAPIPayload, createBatchedInstances, createInstance, - CreateInstancePayload, - InstanceResponseSpecDetails, } from "../api"; import { runSpecFileSafe } from "../cypress"; +import { CypressTypes } from "../cypress.types"; import { isCurrents } from "../env"; import { divider, info, title, warn } from "../log"; +import { pubsub } from "../pubsub"; import { ConfigState, ExecutionState } from "../state"; import { createReportTask, reportTasks } from "./reportTask"; @@ -31,7 +32,7 @@ export async function runTillDone( machineId, platform, specs: allSpecs, - }: CreateInstancePayload & { + }: InstanceAPIPayload.CreateInstancePayload & { specs: SpecWithRelativeRoot[]; }, params: ValidatedCurrentsParameters @@ -72,14 +73,14 @@ async function runBatch( runId: string; groupId: string; machineId: string; - platform: CreateInstancePayload["platform"]; + platform: InstanceAPIPayload.CreateInstancePayload["platform"]; }; allSpecs: SpecWithRelativeRoot[]; params: ValidatedCurrentsParameters; } ) { let batch = { - specs: [] as InstanceResponseSpecDetails[], + specs: [] as InstanceAPIPayload.InstanceResponseSpecDetails[], claimedInstances: 0, totalInstances: 0, }; @@ -152,15 +153,17 @@ async function runBatch( batch.specs.forEach((spec) => { executionState.setInstanceOutput(spec.instanceId, output); - const specRunResult = ModuleAPIResults.getRunResultPerSpec( - spec.spec, - batchedResult, - executionState - ); - if (!specRunResult) { + + const singleSpecResult = getSingleSpecRunResult(spec.spec, batchedResult); + if (!singleSpecResult) { return; } - executionState.setInstanceResult(spec.instanceId, specRunResult); + + pubsub.emit("cypress:runResult", { + specRelative: spec.spec, + instanceId: spec.instanceId, + runResult: singleSpecResult, + }); }); resetCapture(); @@ -168,6 +171,26 @@ async function runBatch( return batch.specs; } +function getSingleSpecRunResult( + specRelative: string, + batchedResult: CypressTypes.ModuleAPI.Result +): CypressTypes.ModuleAPI.CompletedResult | undefined { + if (!ModuleAPIResults.isSuccessResult(batchedResult)) { + // TODO: return dummy result for missing spec results? + return; + } + + const run = batchedResult.runs.find((r) => r.spec.relative === specRelative); + if (!run) { + return; + } + + return { + ...batchedResult, + runs: [run], + }; +} + function getSpecAbsolutePath( allSpecs: SpecWithRelativeRoot[], relative: string diff --git a/packages/cypress-cloud/lib/state/execution.ts b/packages/cypress-cloud/lib/state/execution.ts index f90fca4..96ce721 100644 --- a/packages/cypress-cloud/lib/state/execution.ts +++ b/packages/cypress-cloud/lib/state/execution.ts @@ -4,7 +4,7 @@ import { getFailedFakeInstanceResult } from "../results/empty"; import { SpecAfterToModuleAPIMapper } from "../results/mapResult"; import Debug from "debug"; -import { Cypress12, CypressTypes, Standard } from "../cypress.types"; +import { CypressTypes, Standard } from "../cypress.types"; import { ConfigState } from "./config"; const debug = Debug("currents:state"); @@ -17,7 +17,7 @@ type InstanceExecutionState = { runResults?: Standard.ModuleAPI.CompletedResult; runResultsReportedAt?: Date; specAfter?: Date; - specAfterResults?: Cypress12.SpecAfter.Payload; + specAfterResults?: Standard.SpecAfter.Payload; reportStartedAt?: Date; coverageFilePath?: string; }; diff --git a/packages/cypress-cloud/lib/state/global.ts b/packages/cypress-cloud/lib/state/global.ts new file mode 100644 index 0000000..712f9da --- /dev/null +++ b/packages/cypress-cloud/lib/state/global.ts @@ -0,0 +1,14 @@ +export let _runId: string | undefined = undefined; +export const setRunId = (runId: string) => { + _runId = runId; +}; + +export let _cypressVersion: string | undefined = undefined; +export const setCypressVersion = (cypressVersion: string) => { + _cypressVersion = cypressVersion; +}; + +export let _currentsVersion: string | undefined = undefined; +export const setCurrentsVersion = (v: string) => { + _currentsVersion = v; +}; diff --git a/packages/cypress-cloud/lib/warnings.ts b/packages/cypress-cloud/lib/warnings.ts new file mode 100644 index 0000000..c243d31 --- /dev/null +++ b/packages/cypress-cloud/lib/warnings.ts @@ -0,0 +1,20 @@ +import chalk from "chalk"; +import plur from "plur"; +import { warn } from "./log"; +import { ExecutionState } from "./state"; + +export function printWarnings(executionState: ExecutionState) { + const warnings = Array.from(executionState.getWarnings()); + if (warnings.length > 0) { + warn( + `${warnings.length} ${plur( + "Warning", + warnings.length + )} encountered during the execution:\n${warnings + .map( + (w, i) => `\n${chalk.yellow(`[${i + 1}/${warnings.length}]`)} ${w}` + ) + .join("\n")}` + ); + } +} diff --git a/packages/cypress-cloud/package.json b/packages/cypress-cloud/package.json index 6409987..d2a40e0 100644 --- a/packages/cypress-cloud/package.json +++ b/packages/cypress-cloud/package.json @@ -40,7 +40,7 @@ "@types/jest": "^29.2.4", "@types/lodash": "^4.14.191", "@types/ws": "^8.5.4", - "cypress": "^13.2.0", + "cypress": "^12.17.4", "esbuild": "^0.16.5", "eslint": "^7.32.0", "eslint-config-custom": "latest",