{"_id":"@vechain/veworld-mock-playwright","_rev":"31-ebc039d8edd702e79e0eac192ffabc05","name":"@vechain/veworld-mock-playwright","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@vechain/veworld-mock-playwright","version":"1.0.0","keywords":["vechain","veworld","mock","playwright"],"author":{"name":"vechain"},"license":"MIT","_id":"@vechain/veworld-mock-playwright@1.0.0","maintainers":[{"name":"cnealvechain","email":"clayton.neal@vechain.org"},{"name":"rodolfopietro97","email":"rodolfo.calabro@vechain.org"},{"name":"fabiorigam","email":"fabio.rigamonti@vechain.org"},{"name":"davide.carpini","email":"carpini.davide@gmail.com"},{"name":"darren_vechain","email":"darren.kelly@vechain.org"},{"name":"vanjat7vechaib","email":"vanja.tomic@vechain.org"},{"name":"freemanzmrojo","email":"miguel.rojo@vechain.org"}],"homepage":"https://github.com/vechain/veworld-mock#readme","bugs":{"url":"https://github.com/vechain/veworld-mock/issues"},"dist":{"shasum":"dd3fe87a2dc24d1283552f5f23b0d087c7478912","tarball":"https://registry.npmjs.org/@vechain/veworld-mock-playwright/-/veworld-mock-playwright-1.0.0.tgz","fileCount":9,"integrity":"sha512-rAj+WSyJUHaJCCEdprBrWLjAKivs43H+hjKfMATY+IHtsEyDf5odtcCN2ekCPNo99+oCxPfjS2VuQ/SVhqjqqQ==","signatures":[{"sig":"MEQCIET52DguKLzBkKV0SomJMXWVjxxbH01tGWcj9FFLPIL6AiBX2SVWIvZG2EY1ui0EEzYcFI3/CHP/paEsN1PPP45adQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8398},"main":"dist/client.js","types":"./dist/client.d.ts","gitHead":"bfc80a7f047c79c9b6163e4bb9626a6ae512268f","scripts":{"build":"tsc"},"_npmUser":{"name":"cnealvechain","email":"clayton.neal@vechain.org"},"repository":{"url":"git+https://github.com/vechain/veworld-mock.git","type":"git"},"_npmVersion":"8.19.2","description":"VeWorld Mock client for playwright","directories":{},"_nodeVersion":"18.12.1","dependencies":{"@playwright/test":"^1.42.1","@vechain/veworld-mock":"1.0.0-beta.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/veworld-mock-playwright_1.0.0_1715176672351_0.28307295672280897","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@vechain/veworld-mock-playwright","version":"1.0.1","keywords":["vechain","veworld","mock","playwright"],"author":{"name":"vechain"},"license":"MIT","_id":"@vechain/veworld-mock-playwright@1.0.1","maintainers":[{"name":"cnealvechain","email":"clayton.neal@vechain.org"},{"name":"rodolfopietro97","email":"rodolfo.calabro@vechain.org"},{"name":"fabiorigam","email":"fabio.rigamonti@vechain.org"},{"name":"davide.carpini","email":"carpini.davide@gmail.com"},{"name":"darren_vechain","email":"darren.kelly@vechain.org"},{"name":"vanjat7vechaib","email":"vanja.tomic@vechain.org"},{"name":"freemanzmrojo","email":"miguel.rojo@vechain.org"}],"homepage":"https://github.com/vechain/veworld-mock#readme","bugs":{"url":"https://github.com/vechain/veworld-mock/issues"},"dist":{"shasum":"627dbca40fdf192dee6bb0ef9cca969227e18b11","tarball":"https://registry.npmjs.org/@vechain/veworld-mock-playwright/-/veworld-mock-playwright-1.0.1.tgz","fileCount":9,"integrity":"sha512-93SqtahhlwWKxSRhfB2dDlnEoTZJeFKTsEf1sxpjVCA+DPJVM7VmYdcWigl9+Tyw6MRLK/Jyh+wxPO4/US69LQ==","signatures":[{"sig":"MEUCIQDzVgTSP2oakQoife/8dR62mK7SRtjWjEbM1/T0zz+IVAIgT7CMZ8XoXtXNJZFJCb+SNNvulBBZoaeRG4cCMrAkplg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8400},"main":"dist/client.js","types":"./dist/client.d.ts","gitHead":"6c971e55edcff8f79dd9f0fd445142eca4994935","scripts":{"build":"tsc"},"_npmUser":{"name":"cnealvechain","email":"clayton.neal@vechain.org"},"repository":{"url":"git+https://github.com/vechain/veworld-mock.git","type":"git"},"_npmVersion":"8.19.2","description":"VeWorld Mock client for playwright","directories":{},"_nodeVersion":"18.12.1","dependencies":{"@playwright/test":"^1.42.1","@vechain/veworld-mock":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/veworld-mock-playwright_1.0.1_1715329727341_0.5146456380873343","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@vechain/veworld-mock-playwright","version":"1.0.4","keywords":["vechain","veworld","mock","playwright"],"author":{"name":"vechain"},"license":"MIT","_id":"@vechain/veworld-mock-playwright@1.0.4","maintainers":[{"name":"cnealvechain","email":"clayton.neal@vechain.org"},{"name":"rodolfopietro97","email":"rodolfo.calabro@vechain.org"},{"name":"fabiorigam","email":"fabio.rigamonti@vechain.org"},{"name":"davide.carpini","email":"carpini.davide@gmail.com"},{"name":"darren_vechain","email":"darren.kelly@vechain.org"},{"name":"vanjat7vechaib","email":"vanja.tomic@vechain.org"},{"name":"freemanzmrojo","email":"miguel.rojo@vechain.org"}],"homepage":"https://github.com/vechain/veworld-mock#readme","bugs":{"url":"https://github.com/vechain/veworld-mock/issues"},"dist":{"shasum":"585d201affd27a4fddcda9047e0ddcd475262d57","tarball":"https://registry.npmjs.org/@vechain/veworld-mock-playwright/-/veworld-mock-playwright-1.0.4.tgz","fileCount":9,"integrity":"sha512-UyytrSn+KB3CqGCObMAPDmkaRaVZfukA9mZfOlX3vWuEna43FXpUhuOk4IdcsNXJlMdpg7S4gPb0N9+53IFCjg==","signatures":[{"sig":"MEUCIQCRtCX6EN6fGYdDbEJUikXlPjDhEbBNgeyBDzU7A/pV4wIgLnnh4KQNqhTFpgkTi+3rqh2uY3xAyuzHiYvgGBjbevY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8400},"main":"dist/client.js","types":"./dist/client.d.ts","gitHead":"be56826a65020d7c4789f853668f3ce7eefad827","scripts":{"build":"tsc"},"_npmUser":{"name":"cnealvechain","email":"clayton.neal@vechain.org"},"repository":{"url":"git+https://github.com/vechain/veworld-mock.git","type":"git"},"_npmVersion":"8.19.2","description":"VeWorld Mock client for playwright","directories":{},"_nodeVersion":"18.12.1","dependencies":{"@playwright/test":"^1.42.1","@vechain/veworld-mock":"1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.3","@types/node":"^20.11.30"},"_npmOperationalInternal":{"tmp":"tmp/veworld-mock-playwright_1.0.4_1715953805240_0.5444242887886985","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@vechain/veworld-mock-playwright","version":"1.0.5","keywords":["vechain","veworld","mock","playwright"],"author":{"name":"vechain"},"license":"MIT","_id":"@vechain/veworld-mock-playwright@1.0.5","maintainers":[{"name":"roisindowling","email":"roisin.dowling@vechain.org"},{"name":"cnealvechain","email":"clayton.neal@vechain.org"},{"name":"rodolfopietro97","email":"rodolfo.calabro@vechain.org"},{"name":"fabiorigam","email":"fabio.rigamonti@vechain.org"},{"name":"davide.carpini","email":"carpini.davide@gmail.com"},{"name":"darren_vechain","email":"darren.kelly@vechain.org"},{"name":"vanjat7vechaib","email":"vanja.tomic@vechain.org"},{"name":"freemanzmrojo","email":"miguel.rojo@vechain.org"}],"homepage":"https://github.com/vechain/veworld-mock#readme","bugs":{"url":"https://github.com/vechain/veworld-mock/issues"},"dist":{"shasum":"4d67bd1ad00fbef75a3646a91759e8a5136bccbb","tarball":"https://registry.npmjs.org/@vechain/veworld-mock-playwright/-/veworld-mock-playwright-1.0.5.tgz","fileCount":9,"integrity":"sha512-cm9PWNnWHB93Fd6KLzCHb0x81FiM7/V44hRdz1EVZzcPkOsRCGzlnQi1V4XOorV4usw1xVkxvFvGe+PN5F3Fww==","signatures":[{"sig":"MEQCIFa242AlNNTxASW4DdE+zDEUk0iTSUrdsdPZlsk1xqyFAiAdiQ82wAubDRZg/LxP03bMpwe/nxb7dPgXT6XXBMaOLQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8407},"main":"dist/client.js","types":"./dist/client.d.ts","gitHead":"5b44ae01a3eca77e829e37e4682e010611e76b22","scripts":{"build":"tsc"},"_npmUser":{"name":"cnealvechain","email":"clayton.neal@vechain.org"},"repository":{"url":"git+https://github.com/vechain/veworld-mock.git","type":"git"},"_npmVersion":"10.5.0","description":"VeWorld Mock client for playwright","directories":{},"_nodeVersion":"18.20.0","dependencies":{"@playwright/test":"^1.47.0","@vechain/veworld-mock":"*"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.2","@types/node":"^22.5.4"},"_npmOperationalInternal":{"tmp":"tmp/veworld-mock-playwright_1.0.5_1726149140277_0.9745873562582033","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@vechain/veworld-mock-playwright","version":"1.0.6","keywords":["vechain","veworld","mock","playwright"],"author":{"name":"vechain"},"license":"MIT","_id":"@vechain/veworld-mock-playwright@1.0.6","maintainers":[{"name":"freemanzmrojo","email":"miguel.rojo@vechain.org"},{"name":"vanjat7vechaib","email":"vanja.tomic@vechain.org"},{"name":"darren_vechain","email":"darren.kelly@vechain.org"},{"name":"fabiorigam","email":"fabio.rigamonti@vechain.org"},{"name":"lucanicoladebiasi","email":"luca.debiasi@vechain.org"},{"name":"davide.carpini","email":"carpini.davide@gmail.com"},{"name":"cnealvechain","email":"clayton.neal@vechain.org"},{"name":"roisindowling","email":"roisin.dowling@vechain.org"},{"name":"fbaruf","email":"federico.baruffaldi@vechain.org"},{"name":"agilulfo","email":"dan.rusnac@vechain.org"},{"name":"domkasper","email":"daumantas.kasperavicius@vechain.org"}],"homepage":"https://github.com/vechain/veworld-mock#readme","bugs":{"url":"https://github.com/vechain/veworld-mock/issues"},"dist":{"shasum":"f9f1e3ec782b9ad2bd5481a6395b7335d0475ee6","tarball":"https://registry.npmjs.org/@vechain/veworld-mock-playwright/-/veworld-mock-playwright-1.0.6.tgz","fileCount":9,"integrity":"sha512-7Nr9XclDiraQl6ROG10W/E7LuqdKwjQgIAa+MHLjm6krJcnf35jI0WtongASszUBAfbWKSfammfH2cN9jFj5iw==","signatures":[{"sig":"MEUCIE2MY5aXPzJY2lLPEoEo0C5rasS+JDBxX7FNQ8sCkPdBAiEA06YUwAIfc8O4gu0dg1YOmmUoZ/aXQmhDpfShOtC8uRA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8407},"main":"dist/client.js","types":"./dist/client.d.ts","gitHead":"7788db92611729d0e429e7f177d77265dc8b8869","scripts":{"build":"tsc"},"_npmUser":{"name":"cnealvechain","email":"clayton.neal@vechain.org"},"repository":{"url":"git+https://github.com/vechain/veworld-mock.git","type":"git"},"_npmVersion":"10.5.0","description":"VeWorld Mock client for playwright","directories":{},"_nodeVersion":"18.20.0","dependencies":{"@playwright/test":"^1.47.0","@vechain/veworld-mock":"*"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.2","@types/node":"^22.5.4"},"_npmOperationalInternal":{"tmp":"tmp/veworld-mock-playwright_1.0.6_1745587020892_0.3128446344587632","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-05-08T13:57:52.238Z","modified":"2026-02-17T11:45:35.684Z","1.0.0-beta.1":"2024-05-08T09:21:50.586Z","1.0.0":"2024-05-08T13:57:52.498Z","1.0.1":"2024-05-10T08:28:47.524Z","1.0.4":"2024-05-17T13:50:05.395Z","1.0.5":"2024-09-12T13:52:20.438Z","1.0.6":"2025-04-25T13:17:01.070Z"},"bugs":{"url":"https://github.com/vechain/veworld-mock/issues"},"author":{"name":"vechain"},"license":"MIT","homepage":"https://github.com/vechain/veworld-mock#readme","keywords":["vechain","veworld","mock","playwright"],"repository":{"url":"git+https://github.com/vechain/veworld-mock.git","type":"git"},"description":"VeWorld Mock client for playwright","maintainers":[{"email":"carpini.davide@gmail.com","name":"davide.carpini"},{"email":"dan.rusnac@vechain.org","name":"agilulfo"},{"email":"victor.emanuel@vechain.org","name":"victor-vechain"},{"email":"michael.martin@vechain.org","name":"doublemme"}],"readme":"\n```\n██╗   ██╗███████╗██╗    ██╗ ██████╗ ██████╗ ██╗     ██████╗ \n██║   ██║██╔════╝██║    ██║██╔═══██╗██╔══██╗██║     ██╔══██╗\n██║   ██║█████╗  ██║ █╗ ██║██║   ██║██████╔╝██║     ██║  ██║\n╚██╗ ██╔╝██╔══╝  ██║███╗██║██║   ██║██╔══██╗██║     ██║  ██║\n ╚████╔╝ ███████╗╚███╔███╔╝╚██████╔╝██║  ██║███████╗██████╔╝\n  ╚═══╝  ╚══════╝ ╚══╝╚══╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝ \n███╗   ███╗ ██████╗  ██████╗██╗  ██╗                        \n████╗ ████║██╔═══██╗██╔════╝██║ ██╔╝                        \n██╔████╔██║██║   ██║██║     █████╔╝                         \n██║╚██╔╝██║██║   ██║██║     ██╔═██╗                         \n██║ ╚═╝ ██║╚██████╔╝╚██████╗██║  ██╗                        \n╚═╝     ╚═╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝                                                                                        \n ```                            \n\n## Playwright E2E\n\nPlaywright runs as a node process, whereas the VeWorld mock run inside the browser, so \ntwo operations are needed: `load`, which loads the VeWorld mock js file into the browser, and `installMock` which sets up the mock functions on the window object. \n\nThis will need to be done before each test with a beforeEach block:\n\n```\n  test.beforeEach(async ({ page }) => {\n    await veWorldMockClient.load(page);\n    await page.goto('http://localhost:5003');\n    await veWorldMockClient.installMock(page);\n  });\n```\n\nTo configure the mock within a test:\n\n```\nimport { veWorldMockClient } from '@vechain/veworld-mock-playwright'\n\ntest('Configure mock', async ({ page }) => { \n  await veWorldMockClient.setOptions(page, {mockCertificate: 'invalid', fakeCertSignerAddress: \"0x865306084235Bf804c8Bba8a8d56890940ca8F0b\"});\n})\n```\n\nTo read outputs of the mock:\n\n```\nimport { veWorldMockClient } from '@vechain/veworld-mock-playwright'\n\ntest('get outputs of mock', async ({ page }) => { \n  // do  steps for cert signing...\n  const address = await veWorldMockClient.getSignerAddress(page);\n  // do steps for a tx ...\n  const txId = await veWorldMockClient.getSenderTxId(page)\n})\n```\n\n## Sample App and Tests\n\nTo build the test app and packages (veworld-mock, veworld-mock-playwright):\n\n`yarn install`  \n`yarn build`\n\nThe sample app uses thor solo, to launch use:\n\n`make solo-up`\n\nTo launch the sample app (separate terminal):\n\n`yarn dev`\n\nThe test app is available at: http://localhost:5003/\n\nTo run the playwright tests:\n\n`yarn install-browsers`  \n`yarn test`\n","readmeFilename":"README.md"}