spana-test 0.16.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/accessibility-audit-IWTD2HPR.js +17 -0
- package/dist/agent/index.js +36 -33
- package/dist/agent/index.js.map +1 -1
- package/dist/{agent-fixture-H6GOUHNX.js → agent-fixture-WQVCNL73.js} +4 -3
- package/dist/{allure-XOM7BXL5.js → allure-LF4CALKP.js} +3 -2
- package/dist/{allure-XOM7BXL5.js.map → allure-LF4CALKP.js.map} +1 -1
- package/dist/{android-C2S4B4TH.js → android-TPO53H5Q.js} +4 -3
- package/dist/api/app.d.ts +79 -14
- package/dist/api/app.d.ts.map +1 -1
- package/dist/api/expect.d.ts +3 -0
- package/dist/api/expect.d.ts.map +1 -1
- package/dist/api/flow.d.ts +37 -14
- package/dist/api/flow.d.ts.map +1 -1
- package/dist/app-LGNFQMU7.js +17 -0
- package/dist/{appium-CC77BJNK.js → appium-2PJWZXJI.js} +64 -64
- package/dist/{appium-CC77BJNK.js.map → appium-2PJWZXJI.js.map} +1 -1
- package/dist/{appium-server-M6CWWUWF.js → appium-server-CCTQQGTV.js} +3 -2
- package/dist/{appium-server-M6CWWUWF.js.map → appium-server-CCTQQGTV.js.map} +1 -1
- package/dist/{baseline-manager-LVUVH2MJ.js → baseline-manager-XJ3LADKC.js} +3 -2
- package/dist/{baseline-manager-LVUVH2MJ.js.map → baseline-manager-XJ3LADKC.js.map} +1 -1
- package/dist/bridge-server-X5W4PCAR.js +13 -0
- package/dist/cache-command-OMV6DPC7.js +13 -0
- package/dist/channels/cdp-client.d.ts +15 -2
- package/dist/channels/cdp-client.d.ts.map +1 -1
- package/dist/channels/dom-channel.d.ts +31 -2
- package/dist/channels/dom-channel.d.ts.map +1 -1
- package/dist/{chunk-WJH5K42V.js → chunk-3HQKY24K.js} +4 -3
- package/dist/{chunk-WJH5K42V.js.map → chunk-3HQKY24K.js.map} +1 -1
- package/dist/{chunk-WBCAF7SC.js → chunk-3ONT32BO.js} +314 -182
- package/dist/chunk-3ONT32BO.js.map +1 -0
- package/dist/{chunk-HIEOI3WN.js → chunk-44U3F2RY.js} +264 -54
- package/dist/chunk-44U3F2RY.js.map +1 -0
- package/dist/{chunk-FHCOPLYB.js → chunk-4TTYSFBG.js} +4 -2
- package/dist/chunk-4TTYSFBG.js.map +1 -0
- package/dist/{chunk-4LJ3KYCX.js → chunk-5DSPPJ76.js} +4 -3
- package/dist/{chunk-4LJ3KYCX.js.map → chunk-5DSPPJ76.js.map} +1 -1
- package/dist/{accessibility-audit-F5KLUHLS.js → chunk-5TAHLRZD.js} +8 -5
- package/dist/chunk-5TAHLRZD.js.map +1 -0
- package/dist/chunk-67PLJEY2.js +24645 -0
- package/dist/chunk-67PLJEY2.js.map +1 -0
- package/dist/{chunk-JRGJTUPS.js → chunk-6X2SK2XO.js} +5 -4
- package/dist/{chunk-JRGJTUPS.js.map → chunk-6X2SK2XO.js.map} +1 -1
- package/dist/{chunk-CA66JCX2.js → chunk-7K24Q7V3.js} +976 -219
- package/dist/chunk-7K24Q7V3.js.map +1 -0
- package/dist/{chunk-2MA5G2VH.js → chunk-AGG2RJGU.js} +4 -3
- package/dist/{chunk-2MA5G2VH.js.map → chunk-AGG2RJGU.js.map} +1 -1
- package/dist/{chunk-LGFTUVN4.js → chunk-AP5SGSO7.js} +49 -48
- package/dist/{chunk-LGFTUVN4.js.map → chunk-AP5SGSO7.js.map} +1 -1
- package/dist/{chunk-NWGA3R2E.js → chunk-B4FOISOF.js} +3 -2
- package/dist/{chunk-NWGA3R2E.js.map → chunk-B4FOISOF.js.map} +1 -1
- package/dist/{chunk-7Q7TSUNL.js → chunk-B6NTHBPF.js} +3 -2
- package/dist/{chunk-7Q7TSUNL.js.map → chunk-B6NTHBPF.js.map} +1 -1
- package/dist/{chunk-7WHQIQPM.js → chunk-BPUBV7OF.js} +7 -4
- package/dist/chunk-BPUBV7OF.js.map +1 -0
- package/dist/{chunk-62SDNQKK.js → chunk-C2YM5GNF.js} +33 -32
- package/dist/{chunk-62SDNQKK.js.map → chunk-C2YM5GNF.js.map} +1 -1
- package/dist/{chunk-HJZT6YOA.js → chunk-C7HZJIGQ.js} +6 -5
- package/dist/{chunk-HJZT6YOA.js.map → chunk-C7HZJIGQ.js.map} +1 -1
- package/dist/{chunk-GMEVJQTT.js → chunk-CQ67PB3R.js} +5 -4
- package/dist/{chunk-GMEVJQTT.js.map → chunk-CQ67PB3R.js.map} +1 -1
- package/dist/{chunk-GDVHJBR2.js → chunk-CZAFFUMN.js} +5 -4
- package/dist/{chunk-GDVHJBR2.js.map → chunk-CZAFFUMN.js.map} +1 -1
- package/dist/{chunk-4TYO6O7T.js → chunk-DNWVDGKS.js} +46 -45
- package/dist/{chunk-4TYO6O7T.js.map → chunk-DNWVDGKS.js.map} +1 -1
- package/dist/{chunk-5WPPWTC3.js → chunk-E67QUGT3.js} +1888 -675
- package/dist/chunk-E67QUGT3.js.map +1 -0
- package/dist/{chunk-FSPMFRJO.js → chunk-FBJPNZUN.js} +3 -2
- package/dist/{chunk-FSPMFRJO.js.map → chunk-FBJPNZUN.js.map} +1 -1
- package/dist/{chunk-EA7DZ5TN.js → chunk-FLPPA2XY.js} +40 -5
- package/dist/chunk-FLPPA2XY.js.map +1 -0
- package/dist/{chunk-UZU7VYKN.js → chunk-FZ7EMXIM.js} +289 -125
- package/dist/chunk-FZ7EMXIM.js.map +1 -0
- package/dist/{chunk-ZCSH3QKX.js → chunk-G4ZUJCEN.js} +1518 -1069
- package/dist/chunk-G4ZUJCEN.js.map +1 -0
- package/dist/{chunk-X5FRYDZ3.js → chunk-GACJRITH.js} +4 -3
- package/dist/{chunk-X5FRYDZ3.js.map → chunk-GACJRITH.js.map} +1 -1
- package/dist/{chunk-K4K2ACT2.js → chunk-IC46FAEW.js} +8 -7
- package/dist/chunk-IC46FAEW.js.map +1 -0
- package/dist/{chunk-7O5YXVCD.js → chunk-IJWAAODK.js} +4 -3
- package/dist/{chunk-7O5YXVCD.js.map → chunk-IJWAAODK.js.map} +1 -1
- package/dist/{chunk-MUMIMDRJ.js → chunk-IKMNHITS.js} +3 -2
- package/dist/{chunk-MUMIMDRJ.js.map → chunk-IKMNHITS.js.map} +1 -1
- package/dist/{chunk-6C2EILMC.js → chunk-KIDTBRIV.js} +47 -7
- package/dist/chunk-KIDTBRIV.js.map +1 -0
- package/dist/{chunk-TFEXYI6N.js → chunk-KRTQZPYL.js} +3 -2
- package/dist/{chunk-TFEXYI6N.js.map → chunk-KRTQZPYL.js.map} +1 -1
- package/dist/{chunk-HWS3XUEF.js → chunk-LX6GMZIN.js} +8 -7
- package/dist/{chunk-HWS3XUEF.js.map → chunk-LX6GMZIN.js.map} +1 -1
- package/dist/{chunk-MPJCUL2B.js → chunk-MQRGWQI5.js} +3 -2
- package/dist/{chunk-MPJCUL2B.js.map → chunk-MQRGWQI5.js.map} +1 -1
- package/dist/{chunk-7K7WVTFZ.js → chunk-NC32K762.js} +75 -74
- package/dist/{chunk-7K7WVTFZ.js.map → chunk-NC32K762.js.map} +1 -1
- package/dist/{chunk-ZIETAMAD.js → chunk-NQYTD3JG.js} +3 -2
- package/dist/{chunk-ZIETAMAD.js.map → chunk-NQYTD3JG.js.map} +1 -1
- package/dist/{chunk-KIFNHFFI.js → chunk-NR4QAM5W.js} +335 -69
- package/dist/chunk-NR4QAM5W.js.map +1 -0
- package/dist/{chunk-YFTHJRDO.js → chunk-ODRB22QA.js} +3 -2
- package/dist/{chunk-YFTHJRDO.js.map → chunk-ODRB22QA.js.map} +1 -1
- package/dist/{chunk-HNQLWFHL.js → chunk-OYME74M3.js} +3 -2
- package/dist/{chunk-HNQLWFHL.js.map → chunk-OYME74M3.js.map} +1 -1
- package/dist/chunk-PS3DALTI.js +17 -0
- package/dist/chunk-PS3DALTI.js.map +1 -0
- package/dist/{chunk-UKUXNFQP.js → chunk-QU365GZA.js} +3 -2
- package/dist/{chunk-UKUXNFQP.js.map → chunk-QU365GZA.js.map} +1 -1
- package/dist/{chunk-HIGFQRWM.js → chunk-R52P4KQC.js} +3 -2
- package/dist/{chunk-HIGFQRWM.js.map → chunk-R52P4KQC.js.map} +1 -1
- package/dist/{chunk-U56N5JCJ.js → chunk-RL3ICBAB.js} +3 -2
- package/dist/{chunk-U56N5JCJ.js.map → chunk-RL3ICBAB.js.map} +1 -1
- package/dist/{chunk-HUYC4OAL.js → chunk-RQRJ2I2Z.js} +3 -2
- package/dist/{chunk-HUYC4OAL.js.map → chunk-RQRJ2I2Z.js.map} +1 -1
- package/dist/{chunk-NXET4BFJ.js → chunk-SPGD4QGA.js} +3 -2
- package/dist/{chunk-NXET4BFJ.js.map → chunk-SPGD4QGA.js.map} +1 -1
- package/dist/{chunk-XVL4FHXA.js → chunk-T46S4VA3.js} +3 -2
- package/dist/{chunk-XVL4FHXA.js.map → chunk-T46S4VA3.js.map} +1 -1
- package/dist/{chunk-RIXZISMX.js → chunk-V6PEMZCL.js} +3 -2
- package/dist/{chunk-RIXZISMX.js.map → chunk-V6PEMZCL.js.map} +1 -1
- package/dist/{chunk-FTXUQMGH.js → chunk-VBAPZMPX.js} +2 -1
- package/dist/{chunk-FTXUQMGH.js.map → chunk-VBAPZMPX.js.map} +1 -1
- package/dist/{chunk-DMF2BPPA.js → chunk-VILLVGBP.js} +3 -2
- package/dist/{chunk-DMF2BPPA.js.map → chunk-VILLVGBP.js.map} +1 -1
- package/dist/{chunk-NHT3XSX3.js → chunk-XGXOE3DF.js} +3 -2
- package/dist/{chunk-NHT3XSX3.js.map → chunk-XGXOE3DF.js.map} +1 -1
- package/dist/{chunk-PRQTAIYA.js → chunk-XPEWAHAK.js} +4 -3
- package/dist/{chunk-PRQTAIYA.js.map → chunk-XPEWAHAK.js.map} +1 -1
- package/dist/{chunk-GLNTGHR6.js → chunk-YKNHKVE6.js} +49 -40
- package/dist/chunk-YKNHKVE6.js.map +1 -0
- package/dist/{chunk-XD6A3VXB.js → chunk-Z5BMFLZ5.js} +8 -7
- package/dist/chunk-Z5BMFLZ5.js.map +1 -0
- package/dist/cli/test-command.d.ts +2 -0
- package/dist/cli/test-command.d.ts.map +1 -1
- package/dist/cli.js +102 -35
- package/dist/cli.js.map +1 -1
- package/dist/cloud/common.d.ts.map +1 -1
- package/dist/{compiler-44UW2FID.js → compiler-UOVKUQHE.js} +4 -3
- package/dist/{compiler-44UW2FID.js.map → compiler-UOVKUQHE.js.map} +1 -1
- package/dist/config-loader-MX232REU.js +11 -0
- package/dist/{console-T6TVZ65G.js → console-OHKVJLW3.js} +39 -6
- package/dist/console-OHKVJLW3.js.map +1 -0
- package/dist/core/accessibility-audit.d.ts.map +1 -1
- package/dist/core/engine.d.ts +1 -1
- package/dist/core/engine.d.ts.map +1 -1
- package/dist/core/orchestrator.d.ts +1 -0
- package/dist/core/orchestrator.d.ts.map +1 -1
- package/dist/core/projects.d.ts +10 -6
- package/dist/core/projects.d.ts.map +1 -1
- package/dist/core/rejections.d.ts +5 -0
- package/dist/core/rejections.d.ts.map +1 -0
- package/dist/core/screenshot-compare.d.ts +7 -2
- package/dist/core/screenshot-compare.d.ts.map +1 -1
- package/dist/core/video-recorder.d.ts.map +1 -1
- package/dist/{daemon-manager-2SK5PHJR.js → daemon-manager-6CFUXGTR.js} +4 -3
- package/dist/discover-AHMM7QLN.js +16 -0
- package/dist/{doctor-command-UUQ4RFMK.js → doctor-command-YTT5SMQW.js} +18 -16
- package/dist/{doctor-command-UUQ4RFMK.js.map → doctor-command-YTT5SMQW.js.map} +1 -1
- package/dist/driver-AN3I4H6O.js +21 -0
- package/dist/driver-X4FWTDNU.js +20 -0
- package/dist/drivers/cdp-browser.d.ts +36 -2
- package/dist/drivers/cdp-browser.d.ts.map +1 -1
- package/dist/drivers/cdp-embed.d.ts +104 -0
- package/dist/drivers/cdp-embed.d.ts.map +1 -0
- package/dist/drivers/electron.d.ts +0 -8
- package/dist/drivers/electron.d.ts.map +1 -1
- package/dist/drivers/playwright.d.ts +18 -7
- package/dist/drivers/playwright.d.ts.map +1 -1
- package/dist/drivers/raw-driver.d.ts +36 -3
- package/dist/drivers/raw-driver.d.ts.map +1 -1
- package/dist/electrobun-OUTYOM5G.js +17 -0
- package/dist/electron-XL7H25IQ.js +10 -0
- package/dist/{filters-5DCGGJRN.js → filters-6W73R3IV.js} +4 -3
- package/dist/gherkin/steps.js +3 -2
- package/dist/gherkin/steps.js.map +1 -1
- package/dist/github-pr-XZZZ3YE6.js +11 -0
- package/dist/{html-KJ2QAGF4.js → html-GDWXFYFL.js} +4 -3
- package/dist/{html-KJ2QAGF4.js.map → html-GDWXFYFL.js.map} +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +237 -122
- package/dist/index.js.map +1 -1
- package/dist/{init-command-V5VGN3IS.js → init-command-PYZ5X6M5.js} +3 -2
- package/dist/{init-command-V5VGN3IS.js.map → init-command-PYZ5X6M5.js.map} +1 -1
- package/dist/{init-flow-command-INYUCC6N.js → init-flow-command-SLLEGSRZ.js} +4 -3
- package/dist/{init-flow-command-INYUCC6N.js.map → init-flow-command-SLLEGSRZ.js.map} +1 -1
- package/dist/installer-3X5SKWVX.js +18 -0
- package/dist/{installer-DMTY47SI.js → installer-Q37BOG5G.js} +6 -5
- package/dist/{ios-SZ4RBI7Q.js → ios-YFRAK2CL.js} +5 -4
- package/dist/{json-67HY4VQK.js → json-QVHG6I3O.js} +3 -2
- package/dist/{json-67HY4VQK.js.map → json-QVHG6I3O.js.map} +1 -1
- package/dist/{junit-MHD5AXBU.js → junit-G5LNOYUL.js} +3 -2
- package/dist/{junit-MHD5AXBU.js.map → junit-G5LNOYUL.js.map} +1 -1
- package/dist/local-UWIYOREU.js +40 -0
- package/dist/{machine-NOOFRT45.js → machine-VEVBT2GU.js} +4 -3
- package/dist/pagesource-GQLIXL5R.js +10 -0
- package/dist/pagesource-HKLE3FZN.js +10 -0
- package/dist/playwright-KBWUBU5S.js +30 -0
- package/dist/provider-HWM3GF54.js +14 -0
- package/dist/{redact-OG4M3IEU.js → redact-YWR6GHBX.js} +3 -2
- package/dist/{redact-OG4M3IEU.js.map → redact-YWR6GHBX.js.map} +1 -1
- package/dist/report/console.d.ts +2 -0
- package/dist/report/console.d.ts.map +1 -1
- package/dist/report/types.d.ts +2 -0
- package/dist/report/types.d.ts.map +1 -1
- package/dist/{runner-ABGUVOJG.js → runner-P2BFG4VZ.js} +4 -3
- package/dist/runtime/daemon-manager.d.ts.map +1 -1
- package/dist/runtime/local.d.ts +17 -0
- package/dist/runtime/local.d.ts.map +1 -1
- package/dist/runtime/web-server.d.ts +5 -1
- package/dist/runtime/web-server.d.ts.map +1 -1
- package/dist/schemas/config.d.ts +78 -6
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/selector.d.ts +6 -2
- package/dist/schemas/selector.d.ts.map +1 -1
- package/dist/screenshot-compare-DNIP2EK4.js +15 -0
- package/dist/{server-RTDMJIQZ.js → server-BS3O4WVU.js} +42 -39
- package/dist/{server-RTDMJIQZ.js.map → server-BS3O4WVU.js.map} +1 -1
- package/dist/server-CWCMC244.js +15 -0
- package/dist/session-YWYRRXXR.js +42 -0
- package/dist/smart/auto-wait.d.ts.map +1 -1
- package/dist/smart/channel-resolver.d.ts +4 -0
- package/dist/smart/channel-resolver.d.ts.map +1 -1
- package/dist/smart/coordinator.d.ts +12 -2
- package/dist/smart/coordinator.d.ts.map +1 -1
- package/dist/smart/diagnostics.d.ts.map +1 -1
- package/dist/smart/element-matcher.d.ts.map +1 -1
- package/dist/{studio-command-PZHMLCKE.js → studio-command-XJDGLNAJ.js} +4 -3
- package/dist/{studio-command-PZHMLCKE.js.map → studio-command-XJDGLNAJ.js.map} +1 -1
- package/dist/{test-command-FJOP2GYD.js → test-command-3IRGNEPB.js} +518 -88
- package/dist/test-command-3IRGNEPB.js.map +1 -0
- package/dist/validator-6XP3PGCP.js +18 -0
- package/dist/watch-mode-HWZ4XCKH.js +11 -0
- package/dist/watch-mode-HWZ4XCKH.js.map +1 -0
- package/native/darwin-arm64/libspana_native.dylib +0 -0
- package/native/darwin-x64/libspana_native.dylib +0 -0
- package/native/linux-arm64/libspana_native.so +0 -0
- package/native/linux-x64/libspana_native.so +0 -0
- package/native/win32-x64/spana_native.dll +0 -0
- package/package.json +15 -6
- package/studio-dist/assets/{index-DXGUfzm3.js → index-DAE7R_Zp.js} +1 -1
- package/studio-dist/index.html +1 -1
- package/dist/accessibility-audit-F5KLUHLS.js.map +0 -1
- package/dist/app-C353NGBT.js +0 -13
- package/dist/bridge-server-S3DHK7XE.js +0 -12
- package/dist/cache-command-OL7HUK2K.js +0 -12
- package/dist/chunk-5WPPWTC3.js.map +0 -1
- package/dist/chunk-6C2EILMC.js.map +0 -1
- package/dist/chunk-7WHQIQPM.js.map +0 -1
- package/dist/chunk-A7Z52TDQ.js +0 -97
- package/dist/chunk-A7Z52TDQ.js.map +0 -1
- package/dist/chunk-CA66JCX2.js.map +0 -1
- package/dist/chunk-EA7DZ5TN.js.map +0 -1
- package/dist/chunk-FHCOPLYB.js.map +0 -1
- package/dist/chunk-GLNTGHR6.js.map +0 -1
- package/dist/chunk-HIEOI3WN.js.map +0 -1
- package/dist/chunk-K4K2ACT2.js.map +0 -1
- package/dist/chunk-KIFNHFFI.js.map +0 -1
- package/dist/chunk-UZU7VYKN.js.map +0 -1
- package/dist/chunk-WBCAF7SC.js.map +0 -1
- package/dist/chunk-XD6A3VXB.js.map +0 -1
- package/dist/chunk-ZCSH3QKX.js.map +0 -1
- package/dist/config-loader-TSADVSBY.js +0 -10
- package/dist/console-T6TVZ65G.js.map +0 -1
- package/dist/discover-6ULCTB5T.js +0 -15
- package/dist/driver-3HBDKESK.js +0 -19
- package/dist/driver-LKXSKNG3.js +0 -19
- package/dist/electrobun-HILYDIJ3.js +0 -15
- package/dist/electron-SQACDON3.js +0 -9
- package/dist/github-pr-RYO6IAKD.js +0 -10
- package/dist/installer-KL2NCILK.js +0 -17
- package/dist/local-J2NC6YKI.js +0 -30
- package/dist/pagesource-KIQ5T5MA.js +0 -9
- package/dist/pagesource-KKG7WMFJ.js +0 -9
- package/dist/playwright-JMHCABDJ.js +0 -28
- package/dist/provider-CBAXZ2VA.js +0 -12
- package/dist/screenshot-compare-BJRJHKNQ.js +0 -12
- package/dist/server-RHAHCANZ.js +0 -14
- package/dist/session-7CWHTQ2E.js +0 -39
- package/dist/test-command-FJOP2GYD.js.map +0 -1
- package/dist/validator-AJNOFBQM.js +0 -17
- package/dist/watch-mode-NR5MHNNL.js +0 -10
- /package/dist/{agent-fixture-H6GOUHNX.js.map → accessibility-audit-IWTD2HPR.js.map} +0 -0
- /package/dist/{android-C2S4B4TH.js.map → agent-fixture-WQVCNL73.js.map} +0 -0
- /package/dist/{app-C353NGBT.js.map → android-TPO53H5Q.js.map} +0 -0
- /package/dist/{bridge-server-S3DHK7XE.js.map → app-LGNFQMU7.js.map} +0 -0
- /package/dist/{cache-command-OL7HUK2K.js.map → bridge-server-X5W4PCAR.js.map} +0 -0
- /package/dist/{config-loader-TSADVSBY.js.map → cache-command-OMV6DPC7.js.map} +0 -0
- /package/dist/{daemon-manager-2SK5PHJR.js.map → config-loader-MX232REU.js.map} +0 -0
- /package/dist/{discover-6ULCTB5T.js.map → daemon-manager-6CFUXGTR.js.map} +0 -0
- /package/dist/{driver-3HBDKESK.js.map → discover-AHMM7QLN.js.map} +0 -0
- /package/dist/{driver-LKXSKNG3.js.map → driver-AN3I4H6O.js.map} +0 -0
- /package/dist/{electrobun-HILYDIJ3.js.map → driver-X4FWTDNU.js.map} +0 -0
- /package/dist/{electron-SQACDON3.js.map → electrobun-OUTYOM5G.js.map} +0 -0
- /package/dist/{filters-5DCGGJRN.js.map → electron-XL7H25IQ.js.map} +0 -0
- /package/dist/{github-pr-RYO6IAKD.js.map → filters-6W73R3IV.js.map} +0 -0
- /package/dist/{installer-DMTY47SI.js.map → github-pr-XZZZ3YE6.js.map} +0 -0
- /package/dist/{installer-KL2NCILK.js.map → installer-3X5SKWVX.js.map} +0 -0
- /package/dist/{ios-SZ4RBI7Q.js.map → installer-Q37BOG5G.js.map} +0 -0
- /package/dist/{local-J2NC6YKI.js.map → ios-YFRAK2CL.js.map} +0 -0
- /package/dist/{machine-NOOFRT45.js.map → local-UWIYOREU.js.map} +0 -0
- /package/dist/{pagesource-KIQ5T5MA.js.map → machine-VEVBT2GU.js.map} +0 -0
- /package/dist/{pagesource-KKG7WMFJ.js.map → pagesource-GQLIXL5R.js.map} +0 -0
- /package/dist/{playwright-JMHCABDJ.js.map → pagesource-HKLE3FZN.js.map} +0 -0
- /package/dist/{provider-CBAXZ2VA.js.map → playwright-KBWUBU5S.js.map} +0 -0
- /package/dist/{runner-ABGUVOJG.js.map → provider-HWM3GF54.js.map} +0 -0
- /package/dist/{screenshot-compare-BJRJHKNQ.js.map → runner-P2BFG4VZ.js.map} +0 -0
- /package/dist/{server-RHAHCANZ.js.map → screenshot-compare-DNIP2EK4.js.map} +0 -0
- /package/dist/{session-7CWHTQ2E.js.map → server-CWCMC244.js.map} +0 -0
- /package/dist/{validator-AJNOFBQM.js.map → session-YWYRRXXR.js.map} +0 -0
- /package/dist/{watch-mode-NR5MHNNL.js.map → validator-6XP3PGCP.js.map} +0 -0
|
@@ -1,28 +1,85 @@
|
|
|
1
|
+
import { createRequire as __spanaCreateRequire } from "node:module"; const require = __spanaCreateRequire(import.meta.url);
|
|
1
2
|
import {
|
|
2
3
|
createFlowAgent
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R52P4KQC.js";
|
|
4
5
|
import {
|
|
5
6
|
focusFlows,
|
|
6
7
|
getFlowSkip
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XPEWAHAK.js";
|
|
8
9
|
import {
|
|
9
10
|
parseWebHierarchy
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ODRB22QA.js";
|
|
12
|
+
import {
|
|
13
|
+
ignoreBestEffortFailure
|
|
14
|
+
} from "./chunk-PS3DALTI.js";
|
|
11
15
|
import {
|
|
12
16
|
createPromiseApp,
|
|
13
17
|
createPromiseExpect,
|
|
14
18
|
flattenElements
|
|
15
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-G4ZUJCEN.js";
|
|
16
20
|
import {
|
|
17
21
|
mergeLaunchOptions
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-B4FOISOF.js";
|
|
23
|
+
import {
|
|
24
|
+
Effect_exports
|
|
25
|
+
} from "./chunk-67PLJEY2.js";
|
|
19
26
|
import {
|
|
20
27
|
init_esm_shims
|
|
21
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VBAPZMPX.js";
|
|
29
|
+
|
|
30
|
+
// src/api/flow.ts
|
|
31
|
+
init_esm_shims();
|
|
32
|
+
var FlowSkippedError = class extends Error {
|
|
33
|
+
_tag = "FlowSkippedError";
|
|
34
|
+
reason;
|
|
35
|
+
constructor(reason) {
|
|
36
|
+
super(reason ? `Flow skipped: ${reason}` : "Flow skipped");
|
|
37
|
+
this.name = "FlowSkippedError";
|
|
38
|
+
this.reason = reason;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
function isFlowSkippedError(error) {
|
|
42
|
+
return error instanceof FlowSkippedError || typeof error === "object" && error !== null && error._tag === "FlowSkippedError";
|
|
43
|
+
}
|
|
44
|
+
function flow(name, configOrFn, maybeFn) {
|
|
45
|
+
if (typeof configOrFn === "function") {
|
|
46
|
+
return { name, fn: configOrFn, config: {} };
|
|
47
|
+
}
|
|
48
|
+
return { name, fn: maybeFn, config: configOrFn };
|
|
49
|
+
}
|
|
50
|
+
function modifyFlow(modifier) {
|
|
51
|
+
function modified(name, configOrFn, maybeFn) {
|
|
52
|
+
const config = typeof configOrFn === "function" ? {} : configOrFn;
|
|
53
|
+
const fn = typeof configOrFn === "function" ? configOrFn : maybeFn;
|
|
54
|
+
return flow(name, { ...config, [modifier]: config[modifier] ?? true }, fn);
|
|
55
|
+
}
|
|
56
|
+
return modified;
|
|
57
|
+
}
|
|
58
|
+
function skipModifierOrRuntime(nameOrCondition, configOrFnOrReason, maybeFn) {
|
|
59
|
+
if (typeof nameOrCondition === "boolean") {
|
|
60
|
+
if (nameOrCondition) {
|
|
61
|
+
throw new FlowSkippedError(
|
|
62
|
+
typeof configOrFnOrReason === "string" ? configOrFnOrReason : void 0
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (nameOrCondition === void 0 || configOrFnOrReason === void 0) {
|
|
68
|
+
throw new FlowSkippedError(nameOrCondition);
|
|
69
|
+
}
|
|
70
|
+
const config = typeof configOrFnOrReason === "function" ? {} : configOrFnOrReason;
|
|
71
|
+
const fn = typeof configOrFnOrReason === "function" ? configOrFnOrReason : maybeFn;
|
|
72
|
+
return flow(nameOrCondition, { ...config, skip: config.skip ?? true }, fn);
|
|
73
|
+
}
|
|
74
|
+
((flow2) => {
|
|
75
|
+
flow2.skip = skipModifierOrRuntime;
|
|
76
|
+
flow2.fixme = modifyFlow("fixme");
|
|
77
|
+
flow2.only = modifyFlow("only");
|
|
78
|
+
flow2.fail = modifyFlow("fail");
|
|
79
|
+
})(flow || (flow = {}));
|
|
22
80
|
|
|
23
81
|
// src/core/session-manager.ts
|
|
24
82
|
init_esm_shims();
|
|
25
|
-
import { Effect } from "effect";
|
|
26
83
|
function createSessions(manager, driverFactory, coordinatorConfig, flowContext) {
|
|
27
84
|
const coordConfig = coordinatorConfig ?? { parse: parseWebHierarchy };
|
|
28
85
|
return {
|
|
@@ -33,7 +90,7 @@ function createSessions(manager, driverFactory, coordinatorConfig, flowContext)
|
|
|
33
90
|
}
|
|
34
91
|
const driver = await driverFactory(opts);
|
|
35
92
|
const baseUrl = opts.baseUrl ?? "http://localhost:3000";
|
|
36
|
-
await
|
|
93
|
+
await Effect_exports.runPromise(driver.launchApp(baseUrl));
|
|
37
94
|
const app = createPromiseApp(driver, baseUrl, coordConfig, void 0, {
|
|
38
95
|
platform: "web",
|
|
39
96
|
flowContext
|
|
@@ -45,12 +102,12 @@ function createSessions(manager, driverFactory, coordinatorConfig, flowContext)
|
|
|
45
102
|
app,
|
|
46
103
|
expect,
|
|
47
104
|
async disconnect() {
|
|
48
|
-
await
|
|
105
|
+
await Effect_exports.runPromise(driver.killApp(baseUrl));
|
|
49
106
|
manager.remove(opts.name);
|
|
50
107
|
}
|
|
51
108
|
};
|
|
52
109
|
const cleanup = async () => {
|
|
53
|
-
await
|
|
110
|
+
await Effect_exports.runPromise(driver.killApp(baseUrl));
|
|
54
111
|
};
|
|
55
112
|
manager.register(session, cleanup);
|
|
56
113
|
return session;
|
|
@@ -748,8 +805,7 @@ async function startCdpScreencastRecorder(cdp, options) {
|
|
|
748
805
|
if (stopped) return;
|
|
749
806
|
const sessionId = params?.sessionId;
|
|
750
807
|
if (sessionId !== void 0) {
|
|
751
|
-
void cdp.sendCommand("Page.screencastFrameAck", { sessionId }).catch(
|
|
752
|
-
});
|
|
808
|
+
void cdp.sendCommand("Page.screencastFrameAck", { sessionId }).catch(ignoreBestEffortFailure);
|
|
753
809
|
}
|
|
754
810
|
if (typeof params?.data === "string" && params.data.length > 0) {
|
|
755
811
|
if (frames.length >= maxFrames) {
|
|
@@ -958,18 +1014,13 @@ function extractTapPointFromStep(step2) {
|
|
|
958
1014
|
return void 0;
|
|
959
1015
|
}
|
|
960
1016
|
|
|
961
|
-
// src/core/parallel.ts
|
|
962
|
-
init_esm_shims();
|
|
963
|
-
|
|
964
1017
|
// src/core/engine.ts
|
|
965
1018
|
init_esm_shims();
|
|
966
|
-
import { Effect as Effect4 } from "effect";
|
|
967
1019
|
|
|
968
1020
|
// src/core/artifacts.ts
|
|
969
1021
|
init_esm_shims();
|
|
970
1022
|
import { writeFileSync as writeFileSync3, mkdirSync as mkdirSync3 } from "fs";
|
|
971
1023
|
import { join as join4 } from "path";
|
|
972
|
-
import { Effect as Effect2 } from "effect";
|
|
973
1024
|
var DEFAULT_ARTIFACT_CONFIG = {
|
|
974
1025
|
outputDir: "./spana-output",
|
|
975
1026
|
captureOnFailure: true,
|
|
@@ -1024,7 +1075,7 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1024
1075
|
const dir = flowArtifactDir(config, flowName, platform);
|
|
1025
1076
|
if (config.screenshot) {
|
|
1026
1077
|
try {
|
|
1027
|
-
const screenshot = await
|
|
1078
|
+
const screenshot = await Effect_exports.runPromise(Effect_exports.orDie(driver.takeScreenshot()));
|
|
1028
1079
|
const path = join4(dir, "screenshot.png");
|
|
1029
1080
|
writeFileSync3(path, screenshot);
|
|
1030
1081
|
attachments.push(createAttachment(`${status}-screenshot`, "image/png", path));
|
|
@@ -1033,7 +1084,7 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1033
1084
|
}
|
|
1034
1085
|
if (config.uiHierarchy) {
|
|
1035
1086
|
try {
|
|
1036
|
-
const hierarchy = await
|
|
1087
|
+
const hierarchy = await Effect_exports.runPromise(Effect_exports.orDie(driver.dumpHierarchy()));
|
|
1037
1088
|
const path = join4(dir, "hierarchy.json");
|
|
1038
1089
|
writeFileSync3(path, hierarchy, "utf-8");
|
|
1039
1090
|
attachments.push(createAttachment(`${status}-hierarchy`, "application/json", path));
|
|
@@ -1041,8 +1092,8 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1041
1092
|
}
|
|
1042
1093
|
if (status === "failed" && (platform === "web" || driver.domChannel?.isConnected())) {
|
|
1043
1094
|
try {
|
|
1044
|
-
const html = await
|
|
1045
|
-
|
|
1095
|
+
const html = await Effect_exports.runPromise(
|
|
1096
|
+
Effect_exports.orDie(
|
|
1046
1097
|
driver.evaluate(
|
|
1047
1098
|
"typeof document !== 'undefined' && document.documentElement ? document.documentElement.outerHTML : ''"
|
|
1048
1099
|
)
|
|
@@ -1059,7 +1110,7 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1059
1110
|
}
|
|
1060
1111
|
if (config.consoleLogs && driver.getConsoleLogs) {
|
|
1061
1112
|
try {
|
|
1062
|
-
const consoleLogs = await
|
|
1113
|
+
const consoleLogs = await Effect_exports.runPromise(Effect_exports.orDie(driver.getConsoleLogs()));
|
|
1063
1114
|
if (consoleLogs.length > 0) {
|
|
1064
1115
|
attachments.push(
|
|
1065
1116
|
writeJsonAttachment(dir, "console-logs.json", `${status}-console-logs`, consoleLogs)
|
|
@@ -1070,7 +1121,7 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1070
1121
|
}
|
|
1071
1122
|
if (config.jsErrors && driver.getJSErrors) {
|
|
1072
1123
|
try {
|
|
1073
|
-
const jsErrors = await
|
|
1124
|
+
const jsErrors = await Effect_exports.runPromise(Effect_exports.orDie(driver.getJSErrors()));
|
|
1074
1125
|
if (jsErrors.length > 0) {
|
|
1075
1126
|
attachments.push(
|
|
1076
1127
|
writeJsonAttachment(dir, "js-errors.json", `${status}-js-errors`, jsErrors)
|
|
@@ -1081,7 +1132,7 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1081
1132
|
}
|
|
1082
1133
|
if (config.har && driver.getHAR) {
|
|
1083
1134
|
try {
|
|
1084
|
-
const har = await
|
|
1135
|
+
const har = await Effect_exports.runPromise(Effect_exports.orDie(driver.getHAR()));
|
|
1085
1136
|
if (har.log.entries.length > 0) {
|
|
1086
1137
|
attachments.push(writeJsonAttachment(dir, "network.har", `${status}-network-har`, har));
|
|
1087
1138
|
}
|
|
@@ -1090,7 +1141,7 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1090
1141
|
}
|
|
1091
1142
|
if (status === "failed" && driver.getDriverLogs) {
|
|
1092
1143
|
try {
|
|
1093
|
-
const driverLogs = await
|
|
1144
|
+
const driverLogs = await Effect_exports.runPromise(Effect_exports.orDie(driver.getDriverLogs()));
|
|
1094
1145
|
if (driverLogs.length > 0) {
|
|
1095
1146
|
attachments.push(
|
|
1096
1147
|
writeTextAttachment(
|
|
@@ -1107,7 +1158,7 @@ async function captureArtifacts(driver, config, flowName, platform, status) {
|
|
|
1107
1158
|
if (status === "failed" && config.nativeLogs) {
|
|
1108
1159
|
if (platform === "android") {
|
|
1109
1160
|
try {
|
|
1110
|
-
const info = await
|
|
1161
|
+
const info = await Effect_exports.runPromise(Effect_exports.orDie(driver.getDeviceInfo())).catch(
|
|
1111
1162
|
() => null
|
|
1112
1163
|
);
|
|
1113
1164
|
const logcat = await captureAndroidLogcat(info?.deviceId);
|
|
@@ -1139,7 +1190,7 @@ async function captureStepScreenshot(driver, config, flowName, platform, stepInd
|
|
|
1139
1190
|
mkdirSync3(dir, { recursive: true });
|
|
1140
1191
|
const fileName = `${String(stepIndex).padStart(3, "0")}-${safeName(stepName)}.png`;
|
|
1141
1192
|
const path = join4(dir, fileName);
|
|
1142
|
-
const bytes = screenshot ?? await
|
|
1193
|
+
const bytes = screenshot ?? await Effect_exports.runPromise(Effect_exports.orDie(driver.takeScreenshot()));
|
|
1143
1194
|
writeFileSync3(path, bytes);
|
|
1144
1195
|
return createAttachment(stepName, "image/png", path);
|
|
1145
1196
|
} catch {
|
|
@@ -1150,7 +1201,6 @@ async function captureStepScreenshot(driver, config, flowName, platform, stepInd
|
|
|
1150
1201
|
// src/core/debug-repl.ts
|
|
1151
1202
|
init_esm_shims();
|
|
1152
1203
|
import * as repl from "repl";
|
|
1153
|
-
import { Effect as Effect3 } from "effect";
|
|
1154
1204
|
var didStartDebugRepl = false;
|
|
1155
1205
|
function toSuggestedSelectors(root) {
|
|
1156
1206
|
return flattenElements(root).filter((el) => el.visible !== false && (el.id || el.text || el.accessibilityLabel)).map((el) => ({
|
|
@@ -1171,7 +1221,7 @@ async function runDebugReplOnce(context) {
|
|
|
1171
1221
|
console.log("Skipping debug REPL because stdin/stdout is not interactive.");
|
|
1172
1222
|
return false;
|
|
1173
1223
|
}
|
|
1174
|
-
const hierarchy = async () => context.parseHierarchy(await
|
|
1224
|
+
const hierarchy = async () => context.parseHierarchy(await Effect_exports.runPromise(context.driver.dumpHierarchy()));
|
|
1175
1225
|
const selectors = async () => toSuggestedSelectors(await hierarchy());
|
|
1176
1226
|
console.log("");
|
|
1177
1227
|
console.log(`Entering debug REPL for failed flow "${context.flowName}" on ${context.platform}.`);
|
|
@@ -1834,17 +1884,17 @@ function buildPlaybackStepMarkers(steps) {
|
|
|
1834
1884
|
};
|
|
1835
1885
|
});
|
|
1836
1886
|
}
|
|
1837
|
-
async function executeFlow(
|
|
1887
|
+
async function executeFlow(flow2, driver, config) {
|
|
1838
1888
|
const start2 = Date.now();
|
|
1839
1889
|
const { platform, coordinatorConfig, appId } = config;
|
|
1840
|
-
const skip = getFlowSkip(
|
|
1890
|
+
const skip = getFlowSkip(flow2, platform);
|
|
1841
1891
|
if (skip) return skip;
|
|
1842
|
-
const autoLaunch =
|
|
1843
|
-
const timeout =
|
|
1844
|
-
const artifactConfig = resolveArtifactConfig(config.artifactConfig,
|
|
1845
|
-
const stepRecorder = createStepRecorder(driver, artifactConfig,
|
|
1846
|
-
const launchOptions = mergeLaunchOptions(config.launchOptions,
|
|
1847
|
-
const flowDefaults =
|
|
1892
|
+
const autoLaunch = flow2.config.autoLaunch ?? config.autoLaunch ?? true;
|
|
1893
|
+
const timeout = flow2.config.timeout ?? config.flowTimeout ?? 6e4;
|
|
1894
|
+
const artifactConfig = resolveArtifactConfig(config.artifactConfig, flow2.config.artifacts);
|
|
1895
|
+
const stepRecorder = createStepRecorder(driver, artifactConfig, flow2.name, platform);
|
|
1896
|
+
const launchOptions = mergeLaunchOptions(config.launchOptions, flow2.config.launchOptions);
|
|
1897
|
+
const flowDefaults = flow2.config.defaults;
|
|
1848
1898
|
const mergedCoordinatorConfig = flowDefaults ? {
|
|
1849
1899
|
...coordinatorConfig,
|
|
1850
1900
|
defaults: {
|
|
@@ -1875,7 +1925,7 @@ ${messages.join("\n")}`,
|
|
|
1875
1925
|
const workerIndex = config.workerIndex ?? workerOffset;
|
|
1876
1926
|
const parallelIndex = config.parallelIndex ?? workerIndex;
|
|
1877
1927
|
const isExpectedToFail = (() => {
|
|
1878
|
-
const cond =
|
|
1928
|
+
const cond = flow2.config.fail;
|
|
1879
1929
|
if (!cond) return false;
|
|
1880
1930
|
if (cond === true) return true;
|
|
1881
1931
|
if (typeof cond === "object") {
|
|
@@ -1884,11 +1934,11 @@ ${messages.join("\n")}`,
|
|
|
1884
1934
|
}
|
|
1885
1935
|
return false;
|
|
1886
1936
|
})();
|
|
1887
|
-
const flowTags =
|
|
1888
|
-
const flowAnnotations =
|
|
1937
|
+
const flowTags = flow2.config.tags;
|
|
1938
|
+
const flowAnnotations = flow2.config.annotations;
|
|
1889
1939
|
const flowMeta = {
|
|
1890
|
-
flowFilePath:
|
|
1891
|
-
flowName:
|
|
1940
|
+
flowFilePath: flow2.sourcePath ?? "",
|
|
1941
|
+
flowName: flow2.name,
|
|
1892
1942
|
platform,
|
|
1893
1943
|
updateBaselines: config.updateBaselines ?? false,
|
|
1894
1944
|
flowDeadlineMs: start2 + timeout,
|
|
@@ -1897,14 +1947,19 @@ ${messages.join("\n")}`,
|
|
|
1897
1947
|
softFailures.push(error);
|
|
1898
1948
|
}
|
|
1899
1949
|
};
|
|
1900
|
-
const effectiveAppId =
|
|
1950
|
+
const effectiveAppId = flow2.config.baseUrl ?? appId;
|
|
1901
1951
|
const extraCleanups = [];
|
|
1952
|
+
let lastActiveDriver = driver;
|
|
1953
|
+
const getArtifactDriver = () => lastActiveDriver.domChannel?.isConnected?.() === false ? driver : lastActiveDriver;
|
|
1902
1954
|
const app = createPromiseApp(driver, effectiveAppId, mergedCoordinatorConfig, stepRecorder, {
|
|
1903
1955
|
platform,
|
|
1904
1956
|
storybook: config.storybook,
|
|
1905
1957
|
launchOptions,
|
|
1906
|
-
flowBaseUrl:
|
|
1958
|
+
flowBaseUrl: flow2.config.baseUrl,
|
|
1907
1959
|
onRegisterCleanup: (fn) => extraCleanups.push(fn),
|
|
1960
|
+
onActiveDriver: (active) => {
|
|
1961
|
+
lastActiveDriver = active;
|
|
1962
|
+
},
|
|
1908
1963
|
flowContext: flowMeta,
|
|
1909
1964
|
visualRegression: config.visualRegression
|
|
1910
1965
|
});
|
|
@@ -1916,13 +1971,22 @@ ${messages.join("\n")}`,
|
|
|
1916
1971
|
config.visualRegression
|
|
1917
1972
|
);
|
|
1918
1973
|
const agent = createFlowAgent({
|
|
1919
|
-
flowName:
|
|
1974
|
+
flowName: flow2.name,
|
|
1920
1975
|
platform,
|
|
1921
1976
|
app,
|
|
1922
1977
|
cacheDir: config.replayCache?.dir,
|
|
1923
1978
|
cacheMode: config.strictCache ? "strict" : config.replayCache?.mode,
|
|
1924
1979
|
provider: config.agent
|
|
1925
1980
|
});
|
|
1981
|
+
const skipRuntime = (reasonOrCondition, maybeReason) => {
|
|
1982
|
+
if (typeof reasonOrCondition === "boolean") {
|
|
1983
|
+
if (reasonOrCondition) {
|
|
1984
|
+
throw new FlowSkippedError(maybeReason);
|
|
1985
|
+
}
|
|
1986
|
+
return;
|
|
1987
|
+
}
|
|
1988
|
+
throw new FlowSkippedError(reasonOrCondition);
|
|
1989
|
+
};
|
|
1926
1990
|
const flowCtx = {
|
|
1927
1991
|
app,
|
|
1928
1992
|
expect,
|
|
@@ -1931,14 +1995,15 @@ ${messages.join("\n")}`,
|
|
|
1931
1995
|
parallelIndex,
|
|
1932
1996
|
agent,
|
|
1933
1997
|
step,
|
|
1998
|
+
skip: skipRuntime,
|
|
1934
1999
|
updateBaselines: flowMeta.updateBaselines
|
|
1935
2000
|
};
|
|
1936
2001
|
const sessionManager = new SessionManager();
|
|
1937
2002
|
const sessions = createSessions(
|
|
1938
2003
|
sessionManager,
|
|
1939
2004
|
async (opts) => {
|
|
1940
|
-
const { makePlaywrightDriver } = await import("./playwright-
|
|
1941
|
-
const pwDriver = await
|
|
2005
|
+
const { makePlaywrightDriver } = await import("./playwright-KBWUBU5S.js");
|
|
2006
|
+
const pwDriver = await Effect_exports.runPromise(
|
|
1942
2007
|
makePlaywrightDriver({
|
|
1943
2008
|
browser: opts.browser,
|
|
1944
2009
|
headless: opts.headless ?? true,
|
|
@@ -1961,8 +2026,8 @@ ${messages.join("\n")}`,
|
|
|
1961
2026
|
if (!collectingCoverage || !driver.stopJSCoverage) return;
|
|
1962
2027
|
collectingCoverage = false;
|
|
1963
2028
|
try {
|
|
1964
|
-
const entries = await
|
|
1965
|
-
const path = join6(flowArtifactDir(artifactConfig,
|
|
2029
|
+
const entries = await Effect_exports.runPromise(driver.stopJSCoverage());
|
|
2030
|
+
const path = join6(flowArtifactDir(artifactConfig, flow2.name, platform), "js-coverage.json");
|
|
1966
2031
|
writeFileSync5(path, JSON.stringify(entries), "utf8");
|
|
1967
2032
|
attachments.push({ name: "js-coverage", contentType: "application/json", path });
|
|
1968
2033
|
} catch (error) {
|
|
@@ -1976,11 +2041,11 @@ ${messages.join("\n")}`,
|
|
|
1976
2041
|
if (recordingFinalized || !wantRecording) return;
|
|
1977
2042
|
recordingFinalized = true;
|
|
1978
2043
|
const keep = artifactConfig.video === "on" || artifactConfig.playback || artifactConfig.video === "retain-on-failure" && status === "failed";
|
|
1979
|
-
const fileStem = safeArtifactName(
|
|
1980
|
-
const outputDir = keep ? flowArtifactDir(artifactConfig,
|
|
2044
|
+
const fileStem = safeArtifactName(flow2.name);
|
|
2045
|
+
const outputDir = keep ? flowArtifactDir(artifactConfig, flow2.name, platform) : artifactConfig.outputDir;
|
|
1981
2046
|
let viewport;
|
|
1982
2047
|
try {
|
|
1983
|
-
const info = await
|
|
2048
|
+
const info = await Effect_exports.runPromise(Effect_exports.orDie(driver.getDeviceInfo()));
|
|
1984
2049
|
if (info.screenWidth > 0 && info.screenHeight > 0) {
|
|
1985
2050
|
viewport = { width: info.screenWidth, height: info.screenHeight };
|
|
1986
2051
|
}
|
|
@@ -2016,7 +2081,7 @@ ${messages.join("\n")}`,
|
|
|
2016
2081
|
return;
|
|
2017
2082
|
}
|
|
2018
2083
|
const fallbackTrace = buildPlaybackTraceFromSteps({
|
|
2019
|
-
flowName:
|
|
2084
|
+
flowName: flow2.name,
|
|
2020
2085
|
platform,
|
|
2021
2086
|
durationMs,
|
|
2022
2087
|
steps,
|
|
@@ -2036,15 +2101,15 @@ ${messages.join("\n")}`,
|
|
|
2036
2101
|
const writeRichTraceIfEnabled = async (status, attachments, steps, durationMs, error) => {
|
|
2037
2102
|
if (!artifactConfig.trace) return;
|
|
2038
2103
|
try {
|
|
2039
|
-
const outDir = flowArtifactDir(artifactConfig,
|
|
2104
|
+
const outDir = flowArtifactDir(artifactConfig, flow2.name, platform);
|
|
2040
2105
|
const [consoleLogs, jsErrors, har, domSnapshot] = await Promise.all([
|
|
2041
|
-
driver.getConsoleLogs ?
|
|
2042
|
-
driver.getJSErrors ?
|
|
2043
|
-
driver.getHAR ?
|
|
2044
|
-
driver.dumpHierarchy ?
|
|
2106
|
+
driver.getConsoleLogs ? Effect_exports.runPromise(Effect_exports.orDie(driver.getConsoleLogs())).catch(() => []) : Promise.resolve([]),
|
|
2107
|
+
driver.getJSErrors ? Effect_exports.runPromise(Effect_exports.orDie(driver.getJSErrors())).catch(() => []) : Promise.resolve([]),
|
|
2108
|
+
driver.getHAR ? Effect_exports.runPromise(Effect_exports.orDie(driver.getHAR())).catch(() => void 0) : Promise.resolve(void 0),
|
|
2109
|
+
driver.dumpHierarchy ? Effect_exports.runPromise(Effect_exports.orDie(driver.dumpHierarchy())).catch(() => void 0) : Promise.resolve(void 0)
|
|
2045
2110
|
]);
|
|
2046
2111
|
const richTrace = buildRichFlowTrace({
|
|
2047
|
-
flowName:
|
|
2112
|
+
flowName: flow2.name,
|
|
2048
2113
|
platform,
|
|
2049
2114
|
status,
|
|
2050
2115
|
durationMs,
|
|
@@ -2067,7 +2132,7 @@ ${messages.join("\n")}`,
|
|
|
2067
2132
|
const attachments = await captureArtifacts(
|
|
2068
2133
|
driver,
|
|
2069
2134
|
artifactConfig,
|
|
2070
|
-
|
|
2135
|
+
flow2.name,
|
|
2071
2136
|
platform,
|
|
2072
2137
|
"failed"
|
|
2073
2138
|
);
|
|
@@ -2077,12 +2142,12 @@ ${messages.join("\n")}`,
|
|
|
2077
2142
|
await finalizeRecording("failed", attachments, steps, durationMs);
|
|
2078
2143
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
2079
2144
|
return {
|
|
2080
|
-
name:
|
|
2145
|
+
name: flow2.name,
|
|
2081
2146
|
platform,
|
|
2082
2147
|
status: "failed",
|
|
2083
2148
|
durationMs,
|
|
2084
2149
|
error: classifyError(normalized, {
|
|
2085
|
-
flowFilePath:
|
|
2150
|
+
flowFilePath: flow2.sourcePath,
|
|
2086
2151
|
fallbackStack: stepRecorder.getLastFailureStack?.()
|
|
2087
2152
|
}),
|
|
2088
2153
|
attachments,
|
|
@@ -2094,26 +2159,38 @@ ${messages.join("\n")}`,
|
|
|
2094
2159
|
};
|
|
2095
2160
|
if (driver.beginFlow) {
|
|
2096
2161
|
try {
|
|
2097
|
-
await
|
|
2162
|
+
await Effect_exports.runPromise(driver.beginFlow(flow2.name));
|
|
2098
2163
|
} catch (error) {
|
|
2099
2164
|
return buildFailureResult(error);
|
|
2100
2165
|
}
|
|
2101
2166
|
}
|
|
2102
|
-
if (
|
|
2167
|
+
if ((flow2.config.viewport || flow2.config.deviceScaleFactor !== void 0 || flow2.config.isMobile !== void 0 || flow2.config.hasTouch !== void 0) && driver.setViewport) {
|
|
2103
2168
|
try {
|
|
2104
|
-
|
|
2169
|
+
const vp = flow2.config.viewport;
|
|
2170
|
+
const baseWidth = vp?.width ?? mergedCoordinatorConfig.screenWidth ?? 1280;
|
|
2171
|
+
const baseHeight = vp?.height ?? mergedCoordinatorConfig.screenHeight ?? 720;
|
|
2172
|
+
await Effect_exports.runPromise(
|
|
2105
2173
|
driver.setViewport({
|
|
2106
|
-
width:
|
|
2107
|
-
height:
|
|
2174
|
+
width: baseWidth,
|
|
2175
|
+
height: baseHeight,
|
|
2176
|
+
deviceScaleFactor: vp?.deviceScaleFactor ?? flow2.config.deviceScaleFactor,
|
|
2177
|
+
mobile: vp?.mobile ?? vp?.isMobile ?? flow2.config.isMobile,
|
|
2178
|
+
isMobile: vp?.isMobile ?? vp?.mobile ?? flow2.config.isMobile,
|
|
2179
|
+
hasTouch: vp?.hasTouch ?? flow2.config.hasTouch
|
|
2108
2180
|
})
|
|
2109
2181
|
);
|
|
2110
2182
|
} catch (error) {
|
|
2111
2183
|
return buildFailureResult(error);
|
|
2112
2184
|
}
|
|
2113
2185
|
}
|
|
2114
|
-
if (
|
|
2186
|
+
if ((flow2.config.locale || flow2.config.userAgent) && driver.setEmulation) {
|
|
2115
2187
|
try {
|
|
2116
|
-
await
|
|
2188
|
+
await Effect_exports.runPromise(
|
|
2189
|
+
driver.setEmulation({
|
|
2190
|
+
...flow2.config.locale ? { locale: flow2.config.locale } : {},
|
|
2191
|
+
...flow2.config.userAgent ? { userAgent: flow2.config.userAgent } : {}
|
|
2192
|
+
})
|
|
2193
|
+
);
|
|
2117
2194
|
} catch (error) {
|
|
2118
2195
|
return buildFailureResult(error);
|
|
2119
2196
|
}
|
|
@@ -2127,7 +2204,7 @@ ${messages.join("\n")}`,
|
|
|
2127
2204
|
);
|
|
2128
2205
|
}
|
|
2129
2206
|
try {
|
|
2130
|
-
await
|
|
2207
|
+
await Effect_exports.runPromise(driver.startJSCoverage());
|
|
2131
2208
|
collectingCoverage = true;
|
|
2132
2209
|
} catch (error) {
|
|
2133
2210
|
return buildFailureResult(error);
|
|
@@ -2137,44 +2214,72 @@ ${messages.join("\n")}`,
|
|
|
2137
2214
|
try {
|
|
2138
2215
|
if (isCdpScreencastCapable(driver.domChannel)) {
|
|
2139
2216
|
videoRecorder = await startCdpScreencastRecorder(driver.domChannel, {
|
|
2140
|
-
flowName:
|
|
2217
|
+
flowName: flow2.name,
|
|
2141
2218
|
platform,
|
|
2142
2219
|
exportMp4: artifactConfig.video !== "off"
|
|
2143
2220
|
});
|
|
2144
2221
|
} else if (artifactConfig.video !== "off" && (platform === "android" || platform === "ios")) {
|
|
2145
|
-
const info = await
|
|
2222
|
+
const info = await Effect_exports.runPromise(Effect_exports.orDie(driver.getDeviceInfo())).catch(
|
|
2146
2223
|
() => void 0
|
|
2147
2224
|
);
|
|
2148
2225
|
if (info?.deviceId) {
|
|
2149
|
-
const outDir = flowArtifactDir(artifactConfig,
|
|
2150
|
-
const videoOut = join6(outDir, `${safeArtifactName(
|
|
2226
|
+
const outDir = flowArtifactDir(artifactConfig, flow2.name, platform);
|
|
2227
|
+
const videoOut = join6(outDir, `${safeArtifactName(flow2.name)}.mp4`);
|
|
2151
2228
|
videoRecorder = platform === "android" ? startAndroidVideoRecorder(info.deviceId, { outputPath: videoOut }) : startIosSimulatorVideoRecorder(info.deviceId, { outputPath: videoOut });
|
|
2152
2229
|
}
|
|
2153
2230
|
}
|
|
2154
2231
|
} catch {
|
|
2155
2232
|
}
|
|
2156
2233
|
}
|
|
2234
|
+
const buildRuntimeSkipResult = async (error) => {
|
|
2235
|
+
const steps = stepRecorder.getSteps();
|
|
2236
|
+
const durationMs = Date.now() - start2;
|
|
2237
|
+
await finalizeRecording("passed", [], steps, durationMs);
|
|
2238
|
+
return {
|
|
2239
|
+
name: flow2.name,
|
|
2240
|
+
platform,
|
|
2241
|
+
status: "skipped",
|
|
2242
|
+
modifier: "skip",
|
|
2243
|
+
...error.reason ? { skipReason: error.reason } : {},
|
|
2244
|
+
durationMs,
|
|
2245
|
+
steps,
|
|
2246
|
+
scenarioSteps: flowCtx.__scenarioSteps,
|
|
2247
|
+
...flowTags ? { tags: flowTags } : {},
|
|
2248
|
+
...flowAnnotations ? { annotations: flowAnnotations } : {}
|
|
2249
|
+
};
|
|
2250
|
+
};
|
|
2157
2251
|
if (config.hooks?.beforeEach) {
|
|
2158
2252
|
try {
|
|
2159
|
-
await config.hooks.beforeEach({
|
|
2253
|
+
await config.hooks.beforeEach({
|
|
2254
|
+
app,
|
|
2255
|
+
expect,
|
|
2256
|
+
platform,
|
|
2257
|
+
workerIndex,
|
|
2258
|
+
parallelIndex,
|
|
2259
|
+
skip: skipRuntime
|
|
2260
|
+
});
|
|
2160
2261
|
} catch (error) {
|
|
2262
|
+
if (isFlowSkippedError(error)) {
|
|
2263
|
+
return buildRuntimeSkipResult(error);
|
|
2264
|
+
}
|
|
2161
2265
|
return buildFailureResult(error);
|
|
2162
2266
|
}
|
|
2163
2267
|
}
|
|
2164
2268
|
let result;
|
|
2165
2269
|
let softFailureError;
|
|
2270
|
+
let flowTimeoutHandle;
|
|
2166
2271
|
try {
|
|
2167
2272
|
if (autoLaunch) {
|
|
2168
2273
|
await app.launch();
|
|
2169
2274
|
}
|
|
2170
2275
|
await Promise.race([
|
|
2171
|
-
withActiveStepRecorder(stepRecorder, () =>
|
|
2172
|
-
new Promise(
|
|
2173
|
-
|
|
2174
|
-
() => reject(new Error(`Flow "${
|
|
2276
|
+
withActiveStepRecorder(stepRecorder, () => flow2.fn(flowCtx)),
|
|
2277
|
+
new Promise((_, reject) => {
|
|
2278
|
+
flowTimeoutHandle = setTimeout(
|
|
2279
|
+
() => reject(new Error(`Flow "${flow2.name}" timed out after ${timeout}ms`)),
|
|
2175
2280
|
timeout
|
|
2176
|
-
)
|
|
2177
|
-
)
|
|
2281
|
+
);
|
|
2282
|
+
})
|
|
2178
2283
|
]);
|
|
2179
2284
|
if (softFailures.length > 0) {
|
|
2180
2285
|
softFailureError = aggregateFailures();
|
|
@@ -2182,14 +2287,14 @@ ${messages.join("\n")}`,
|
|
|
2182
2287
|
}
|
|
2183
2288
|
if (isExpectedToFail) {
|
|
2184
2289
|
throw new Error(
|
|
2185
|
-
`Flow "${
|
|
2290
|
+
`Flow "${flow2.name}" was marked as expected to fail (flow.fail), but it passed unexpectedly.`
|
|
2186
2291
|
);
|
|
2187
2292
|
}
|
|
2188
2293
|
agent.finalize(true);
|
|
2189
2294
|
const attachments = await captureArtifacts(
|
|
2190
2295
|
driver,
|
|
2191
2296
|
artifactConfig,
|
|
2192
|
-
|
|
2297
|
+
flow2.name,
|
|
2193
2298
|
platform,
|
|
2194
2299
|
"passed"
|
|
2195
2300
|
);
|
|
@@ -2199,7 +2304,7 @@ ${messages.join("\n")}`,
|
|
|
2199
2304
|
await finalizeRecording("passed", attachments, steps, durationMs);
|
|
2200
2305
|
await writeRichTraceIfEnabled("passed", attachments, steps, durationMs);
|
|
2201
2306
|
result = {
|
|
2202
|
-
name:
|
|
2307
|
+
name: flow2.name,
|
|
2203
2308
|
platform,
|
|
2204
2309
|
status: "passed",
|
|
2205
2310
|
durationMs,
|
|
@@ -2210,92 +2315,101 @@ ${messages.join("\n")}`,
|
|
|
2210
2315
|
...flowAnnotations ? { annotations: flowAnnotations } : {}
|
|
2211
2316
|
};
|
|
2212
2317
|
} catch (error) {
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
agent.finalize(true);
|
|
2216
|
-
const steps = stepRecorder.getSteps();
|
|
2217
|
-
const durationMs = Date.now() - start2;
|
|
2218
|
-
result = {
|
|
2219
|
-
name: flow.name,
|
|
2220
|
-
platform,
|
|
2221
|
-
status: "passed",
|
|
2222
|
-
durationMs,
|
|
2223
|
-
steps,
|
|
2224
|
-
scenarioSteps: flowCtx.__scenarioSteps,
|
|
2225
|
-
...flowTags ? { tags: flowTags } : {},
|
|
2226
|
-
annotations: [
|
|
2227
|
-
...flowAnnotations ?? [],
|
|
2228
|
-
{
|
|
2229
|
-
type: "fail",
|
|
2230
|
-
description: error instanceof Error ? error.message : String(error)
|
|
2231
|
-
}
|
|
2232
|
-
]
|
|
2233
|
-
};
|
|
2318
|
+
if (isFlowSkippedError(error)) {
|
|
2319
|
+
result = await buildRuntimeSkipResult(error);
|
|
2234
2320
|
} else {
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
);
|
|
2243
|
-
await captureCoverage(attachments, "failed");
|
|
2244
|
-
const steps = stepRecorder.getSteps();
|
|
2245
|
-
const durationMs = Date.now() - start2;
|
|
2246
|
-
await finalizeRecording("failed", attachments, steps, durationMs);
|
|
2247
|
-
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
2248
|
-
const flowError = softFailures.length > 0 && error !== softFailureError ? aggregateFailures(normalized) : normalized;
|
|
2249
|
-
await writeRichTraceIfEnabled("failed", attachments, steps, durationMs, {
|
|
2250
|
-
message: flowError.message,
|
|
2251
|
-
stack: flowError.stack
|
|
2252
|
-
});
|
|
2253
|
-
result = {
|
|
2254
|
-
name: flow.name,
|
|
2255
|
-
platform,
|
|
2256
|
-
status: "failed",
|
|
2257
|
-
durationMs,
|
|
2258
|
-
error: classifyError(flowError, {
|
|
2259
|
-
flowFilePath: flow.sourcePath,
|
|
2260
|
-
fallbackStack: stepRecorder.getLastFailureStack?.()
|
|
2261
|
-
}),
|
|
2262
|
-
attachments,
|
|
2263
|
-
steps,
|
|
2264
|
-
scenarioSteps: flowCtx.__scenarioSteps,
|
|
2265
|
-
...flowTags ? { tags: flowTags } : {},
|
|
2266
|
-
...flowAnnotations ? { annotations: flowAnnotations } : {}
|
|
2267
|
-
};
|
|
2268
|
-
if (artifactConfig.captureOnFailure && result.error) {
|
|
2269
|
-
try {
|
|
2270
|
-
const artDir = join6(
|
|
2271
|
-
artifactConfig.outputDir,
|
|
2272
|
-
`${flow.name.replaceAll(/[^a-zA-Z0-9-_]/g, "_").replaceAll(/_+/g, "_").slice(0, 80) || "artifact"}-${platform}`
|
|
2273
|
-
);
|
|
2274
|
-
const bundle = createFailureBundle(
|
|
2275
|
-
flow.name,
|
|
2276
|
-
platform,
|
|
2277
|
-
stepRecorder.getSteps(),
|
|
2278
|
-
result.error,
|
|
2279
|
-
artDir,
|
|
2280
|
-
attachments,
|
|
2281
|
-
flow.sourcePath
|
|
2282
|
-
);
|
|
2283
|
-
writeFailureBundle(bundle, artDir);
|
|
2284
|
-
} catch {
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
if (config.debugOnFailure) {
|
|
2288
|
-
await runDebugReplOnce({
|
|
2289
|
-
app,
|
|
2290
|
-
expect,
|
|
2291
|
-
driver,
|
|
2292
|
-
error: flowError,
|
|
2293
|
-
flowName: flow.name,
|
|
2321
|
+
const isUnexpectedPass = isExpectedToFail && error instanceof Error && error.message.includes("was marked as expected to fail (flow.fail)");
|
|
2322
|
+
if (isExpectedToFail && !isUnexpectedPass) {
|
|
2323
|
+
agent.finalize(true);
|
|
2324
|
+
const steps = stepRecorder.getSteps();
|
|
2325
|
+
const durationMs = Date.now() - start2;
|
|
2326
|
+
result = {
|
|
2327
|
+
name: flow2.name,
|
|
2294
2328
|
platform,
|
|
2295
|
-
|
|
2329
|
+
status: "passed",
|
|
2330
|
+
durationMs,
|
|
2331
|
+
steps,
|
|
2332
|
+
scenarioSteps: flowCtx.__scenarioSteps,
|
|
2333
|
+
...flowTags ? { tags: flowTags } : {},
|
|
2334
|
+
annotations: [
|
|
2335
|
+
...flowAnnotations ?? [],
|
|
2336
|
+
{
|
|
2337
|
+
type: "fail",
|
|
2338
|
+
description: error instanceof Error ? error.message : String(error)
|
|
2339
|
+
}
|
|
2340
|
+
]
|
|
2341
|
+
};
|
|
2342
|
+
} else {
|
|
2343
|
+
agent.finalize(false);
|
|
2344
|
+
const artifactDriver = getArtifactDriver();
|
|
2345
|
+
const attachments = await captureArtifacts(
|
|
2346
|
+
artifactDriver,
|
|
2347
|
+
artifactConfig,
|
|
2348
|
+
flow2.name,
|
|
2349
|
+
platform,
|
|
2350
|
+
"failed"
|
|
2351
|
+
);
|
|
2352
|
+
await captureCoverage(attachments, "failed");
|
|
2353
|
+
const steps = stepRecorder.getSteps();
|
|
2354
|
+
const durationMs = Date.now() - start2;
|
|
2355
|
+
await finalizeRecording("failed", attachments, steps, durationMs);
|
|
2356
|
+
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
2357
|
+
const flowError = softFailures.length > 0 && error !== softFailureError ? aggregateFailures(normalized) : normalized;
|
|
2358
|
+
await writeRichTraceIfEnabled("failed", attachments, steps, durationMs, {
|
|
2359
|
+
message: flowError.message,
|
|
2360
|
+
stack: flowError.stack
|
|
2296
2361
|
});
|
|
2362
|
+
result = {
|
|
2363
|
+
name: flow2.name,
|
|
2364
|
+
platform,
|
|
2365
|
+
status: "failed",
|
|
2366
|
+
durationMs,
|
|
2367
|
+
error: classifyError(flowError, {
|
|
2368
|
+
flowFilePath: flow2.sourcePath,
|
|
2369
|
+
fallbackStack: stepRecorder.getLastFailureStack?.()
|
|
2370
|
+
}),
|
|
2371
|
+
attachments,
|
|
2372
|
+
steps,
|
|
2373
|
+
scenarioSteps: flowCtx.__scenarioSteps,
|
|
2374
|
+
...flowTags ? { tags: flowTags } : {},
|
|
2375
|
+
...flowAnnotations ? { annotations: flowAnnotations } : {}
|
|
2376
|
+
};
|
|
2377
|
+
if (artifactConfig.captureOnFailure && result.error) {
|
|
2378
|
+
try {
|
|
2379
|
+
const artDir = join6(
|
|
2380
|
+
artifactConfig.outputDir,
|
|
2381
|
+
`${flow2.name.replaceAll(/[^a-zA-Z0-9-_]/g, "_").replaceAll(/_+/g, "_").slice(0, 80) || "artifact"}-${platform}`
|
|
2382
|
+
);
|
|
2383
|
+
const bundle = createFailureBundle(
|
|
2384
|
+
flow2.name,
|
|
2385
|
+
platform,
|
|
2386
|
+
stepRecorder.getSteps(),
|
|
2387
|
+
result.error,
|
|
2388
|
+
artDir,
|
|
2389
|
+
attachments,
|
|
2390
|
+
flow2.sourcePath
|
|
2391
|
+
);
|
|
2392
|
+
writeFailureBundle(bundle, artDir);
|
|
2393
|
+
} catch {
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
if (config.debugOnFailure) {
|
|
2397
|
+
await runDebugReplOnce({
|
|
2398
|
+
app,
|
|
2399
|
+
expect,
|
|
2400
|
+
driver,
|
|
2401
|
+
error: flowError,
|
|
2402
|
+
flowName: flow2.name,
|
|
2403
|
+
platform,
|
|
2404
|
+
parseHierarchy: coordinatorConfig.parse
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2297
2407
|
}
|
|
2298
2408
|
}
|
|
2409
|
+
} finally {
|
|
2410
|
+
if (flowTimeoutHandle !== void 0) {
|
|
2411
|
+
clearTimeout(flowTimeoutHandle);
|
|
2412
|
+
}
|
|
2299
2413
|
}
|
|
2300
2414
|
for (const cleanup of extraCleanups.toReversed()) {
|
|
2301
2415
|
try {
|
|
@@ -2327,6 +2441,7 @@ ${messages.join("\n")}`,
|
|
|
2327
2441
|
}
|
|
2328
2442
|
|
|
2329
2443
|
// src/core/parallel.ts
|
|
2444
|
+
init_esm_shims();
|
|
2330
2445
|
function buildOrderedWorkUnits(flows, durationHintsMs) {
|
|
2331
2446
|
const units = [];
|
|
2332
2447
|
const serialIndexByGroup = /* @__PURE__ */ new Map();
|
|
@@ -2382,22 +2497,22 @@ async function runParallel(config) {
|
|
|
2382
2497
|
workerIndex: worker.engineConfig.workerIndex ?? workerOffset + localIdx,
|
|
2383
2498
|
parallelIndex: worker.engineConfig.parallelIndex ?? workerOffset + localIdx
|
|
2384
2499
|
};
|
|
2385
|
-
const runOne = async (
|
|
2386
|
-
const skip = getFlowSkip(
|
|
2500
|
+
const runOne = async (flow2) => {
|
|
2501
|
+
const skip = getFlowSkip(flow2, workerEngineConfig.platform);
|
|
2387
2502
|
if (skip) {
|
|
2388
2503
|
results.push(skip);
|
|
2389
2504
|
onFlowComplete?.(skip, worker.name);
|
|
2390
2505
|
return skip;
|
|
2391
2506
|
}
|
|
2392
|
-
const flowRetries =
|
|
2393
|
-
onFlowStart?.(
|
|
2394
|
-
let result = await executeFlow(
|
|
2507
|
+
const flowRetries = flow2.config.retries ?? retries;
|
|
2508
|
+
onFlowStart?.(flow2.name, worker.name);
|
|
2509
|
+
let result = await executeFlow(flow2, worker.driver, workerEngineConfig);
|
|
2395
2510
|
let attempts = 1;
|
|
2396
2511
|
while (result.status === "failed" && attempts <= flowRetries) {
|
|
2397
2512
|
if (retryDelay > 0) {
|
|
2398
2513
|
await new Promise((resolve2) => setTimeout(resolve2, retryDelay));
|
|
2399
2514
|
}
|
|
2400
|
-
result = await executeFlow(
|
|
2515
|
+
result = await executeFlow(flow2, worker.driver, workerEngineConfig);
|
|
2401
2516
|
attempts++;
|
|
2402
2517
|
}
|
|
2403
2518
|
if (result.status === "passed" && attempts > 1) {
|
|
@@ -2415,23 +2530,23 @@ async function runParallel(config) {
|
|
|
2415
2530
|
};
|
|
2416
2531
|
const runWorkUnit = async (unit) => {
|
|
2417
2532
|
let serialFailed = false;
|
|
2418
|
-
for (const
|
|
2533
|
+
for (const flow2 of unit) {
|
|
2419
2534
|
if (serialFailed) {
|
|
2420
2535
|
const skipped = {
|
|
2421
|
-
name:
|
|
2536
|
+
name: flow2.name,
|
|
2422
2537
|
platform: workerEngineConfig.platform,
|
|
2423
2538
|
status: "skipped",
|
|
2424
2539
|
skipReason: "Skipped because an earlier flow in this serial suite failed",
|
|
2425
2540
|
durationMs: 0,
|
|
2426
|
-
...
|
|
2427
|
-
...
|
|
2541
|
+
...flow2.config.tags ? { tags: flow2.config.tags } : {},
|
|
2542
|
+
...flow2.config.annotations ? { annotations: flow2.config.annotations } : {}
|
|
2428
2543
|
};
|
|
2429
2544
|
results.push(skipped);
|
|
2430
2545
|
onFlowComplete?.(skipped, worker.name);
|
|
2431
2546
|
continue;
|
|
2432
2547
|
}
|
|
2433
2548
|
if (bail !== void 0 && failureCount >= bail) break;
|
|
2434
|
-
const res = await runOne(
|
|
2549
|
+
const res = await runOne(flow2);
|
|
2435
2550
|
if (res.status === "failed" && unit.length > 1) {
|
|
2436
2551
|
serialFailed = true;
|
|
2437
2552
|
}
|
|
@@ -2462,15 +2577,15 @@ async function runParallel(config) {
|
|
|
2462
2577
|
bailedOut = true;
|
|
2463
2578
|
while (nextUnitIndex < workUnits.length) {
|
|
2464
2579
|
const unit = workUnits[nextUnitIndex++];
|
|
2465
|
-
for (const
|
|
2466
|
-
const skipped = getFlowSkip(
|
|
2467
|
-
name:
|
|
2580
|
+
for (const flow2 of unit) {
|
|
2581
|
+
const skipped = getFlowSkip(flow2, workers[0].engineConfig.platform) ?? {
|
|
2582
|
+
name: flow2.name,
|
|
2468
2583
|
platform: workers[0].engineConfig.platform,
|
|
2469
2584
|
status: "skipped",
|
|
2470
2585
|
skipReason: "Skipped due to bail limit",
|
|
2471
2586
|
durationMs: 0,
|
|
2472
2587
|
attempts: 0,
|
|
2473
|
-
...
|
|
2588
|
+
...flow2.config.tags ? { tags: flow2.config.tags } : {}
|
|
2474
2589
|
};
|
|
2475
2590
|
results.push(skipped);
|
|
2476
2591
|
onFlowComplete?.(skipped, workers[0].name);
|
|
@@ -2974,9 +3089,23 @@ async function startWebServer(config, opts = {}) {
|
|
|
2974
3089
|
};
|
|
2975
3090
|
const stdoutMode = config.stdout ?? "pipe";
|
|
2976
3091
|
const stderrMode = config.stderr ?? "pipe";
|
|
3092
|
+
let spawnEnv;
|
|
3093
|
+
if (config.inheritEnv === false) {
|
|
3094
|
+
spawnEnv = {};
|
|
3095
|
+
for (const key of config.inheritEnvKeys ?? ["PATH"]) {
|
|
3096
|
+
if (process.env[key] !== void 0) {
|
|
3097
|
+
spawnEnv[key] = process.env[key];
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3100
|
+
if (config.env) {
|
|
3101
|
+
Object.assign(spawnEnv, config.env);
|
|
3102
|
+
}
|
|
3103
|
+
} else {
|
|
3104
|
+
spawnEnv = { ...process.env, ...config.env };
|
|
3105
|
+
}
|
|
2977
3106
|
const child = spawn3(config.command, {
|
|
2978
3107
|
cwd: config.cwd ?? opts.cwd ?? process.cwd(),
|
|
2979
|
-
env:
|
|
3108
|
+
env: spawnEnv,
|
|
2980
3109
|
shell: true,
|
|
2981
3110
|
detached: process.platform !== "win32",
|
|
2982
3111
|
stdio: ["ignore", stdoutMode, stderrMode]
|
|
@@ -3221,6 +3350,9 @@ function resolveProjectExecutionPlan(projects, selectedNames) {
|
|
|
3221
3350
|
}
|
|
3222
3351
|
|
|
3223
3352
|
export {
|
|
3353
|
+
FlowSkippedError,
|
|
3354
|
+
isFlowSkippedError,
|
|
3355
|
+
flow,
|
|
3224
3356
|
withActiveStepRecorder,
|
|
3225
3357
|
step,
|
|
3226
3358
|
suite,
|
|
@@ -3266,4 +3398,4 @@ export {
|
|
|
3266
3398
|
filterFlowsForProject,
|
|
3267
3399
|
resolveProjectExecutionPlan
|
|
3268
3400
|
};
|
|
3269
|
-
//# sourceMappingURL=chunk-
|
|
3401
|
+
//# sourceMappingURL=chunk-3ONT32BO.js.map
|