{"_id":"@dennisdigital/polaris-e2etesting","_rev":"4-6096cec4258d9dc0cd73a088359500fc","name":"@dennisdigital/polaris-e2etesting","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@dennisdigital/polaris-e2etesting","version":"1.0.0","description":"Tools for running user tests against our siteapps","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dennisinteractive/polaris-e2etesting.git"},"author":{"name":"Will Howlett","email":"Will_Howlett@dennis.co.uk"},"license":"MIT","publishConfig":{"access":"public"},"dependencies":{"codeceptjs":"^2.3.5","codeceptjs-resemblehelper":"^1.8.0","deepmerge":"^4.2.2","testcafe":"^1.6.1","testcafe-browser-provider-browserstack":"^1.9.0"},"gitHead":"ee67a0b021ee9fadcd04c707aea7a558aaa11644","bugs":{"url":"https://github.com/dennisinteractive/polaris-e2etesting/issues"},"homepage":"https://github.com/dennisinteractive/polaris-e2etesting#readme","_id":"@dennisdigital/polaris-e2etesting@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"willhowlett","email":"bigwillchnpm@gmail.com"},"dist":{"integrity":"sha512-7CvaQFZYtv2WQcxbjLLGaewkwqjq3/4q/aMF6o877GGARH0fYmHswYLqUlSk8qFJp51Tr2SG4cNITtq3FRNK8Q==","shasum":"01ff4a3a767d6d3ee0885da970e13fa780d6b9d6","tarball":"https://registry.npmjs.org/@dennisdigital/polaris-e2etesting/-/polaris-e2etesting-1.0.0.tgz","fileCount":7,"unpackedSize":223527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwvoPCRA9TVsSAnZWagAApvgP/iEDqGx9HEjA3pGSqjnw\nnshFAuC2czp9B15coxYrhu+1hVdTwb5Rx1kKuF3B9lV64FFzTxLcQgIQA5hC\ncKWoCKBP+03bkvrSsqohd1ofW5r9F4cC6pofmd6+7RCDkhmtyN2seEQ8Um7v\n8gOGOp7ShsJxjRxDV2io8U/vVIGDDUBcom+EMDxCJs/HToPuGk0nNvTFLsZS\nxjn18gcziVQpzz9ZFKTDMxfo4IrCX4hma9wYVLxAa8rNp9UR29O4lxV/like\nz2R3P+OoXzJAlhPq5nj/J2gP5I+Pgmmgjtx+XvzfJt15i1C/gXZV1Om9fnlr\nInVVRgdEZSZO/llsxb+jJ8z3NpO0ZFHksgIbmegFd9bvxq15YVDcIuQLD3mK\nqhz2S+OgaoN7SS5bJQUvbidf/wk+aRCGAkZy6DAGEFAadMN4CNPk4lqzwe0N\nlKQiHNu48aNxhnjYihalTqIx/UDYHx+kG64vjB1uueYlpqKNmlY9gack8BOR\n5agFtna0eS63MmBFyADRxrRV//mwfCbJLvs/ZEQzeP+FdN4STnApnYhTM1c2\ncoEFYbQdwJw4aOUJ4npVK5wsPHQqlOjctAPEg245E9/EPrVeqmf9G5SObFFg\nLjpWwCchuayV51kf6ZZd34R9JmWI/ykm/gZoahKeAap9BHFtNhcrYX4/z0cR\ncgVA\r\n=NM05\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo8//PEMVIgIr8Q8H4KT4abBeWPfJBePjCsVuhaln34wIhAPtoiyEAXaTIND3Bq8uB9nhZTAxdV00Q3i9oic/xL3X0"}]},"maintainers":[{"name":"chriskinch","email":"kinchie@gmail.com"},{"name":"willhowlett","email":"bigwillchnpm@gmail.com"},{"name":"asvin","email":"asvin.balloo@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-e2etesting_1.0.0_1573059087113_0.9431193445377333"},"_hasShrinkwrap":false},"1.0.1":{"name":"@dennisdigital/polaris-e2etesting","version":"1.0.1","description":"Tools for running user tests against our siteapps","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dennisinteractive/polaris-e2etesting.git"},"author":{"name":"Will Howlett","email":"Will_Howlett@dennis.co.uk"},"license":"MIT","publishConfig":{"access":"public"},"dependencies":{"codeceptjs":"^2.3.5","codeceptjs-resemblehelper":"^1.8.0","deepmerge":"^4.2.2","find-free-port":"^2.0.0","minimist":"^1.2.0","puppeteer":"^2.0.0"},"gitHead":"343fb55237a647f4529edea71e2cef2cb9db229a","bugs":{"url":"https://github.com/dennisinteractive/polaris-e2etesting/issues"},"homepage":"https://github.com/dennisinteractive/polaris-e2etesting#readme","_id":"@dennisdigital/polaris-e2etesting@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"willhowlett","email":"bigwillchnpm@gmail.com"},"dist":{"integrity":"sha512-2M3zr1wwDG+GMwnTOLTth3T2HhZmozCAU8gsnHlbdo/QDyQV+4L024JZEd1jG9vimVG8jZnHg/EROnvqh2apSQ==","shasum":"02d3fcf07f534a6701bd80828a2a16f5b5042ada","tarball":"https://registry.npmjs.org/@dennisdigital/polaris-e2etesting/-/polaris-e2etesting-1.0.1.tgz","fileCount":7,"unpackedSize":84391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4RNZCRA9TVsSAnZWagAAE9QP/RkvjyaoC61ccq7cjUVG\n6mW20ru9X+VVaNIeTzJKf0fgekvCXQ9Zpa04MzoNIbmEfAzjFNjc4dE+pNnd\nzTdL+zA5S6PcrudDG1ygDx4gB9hCzZTfJoEVVEP65N7EtmOgWXbR2/4VVoJO\n0FJf3AinJchX5b3KvwEbTiewpjgUoMQvBk7Tm+mL4HxlBwq/jqVJ4TY2jHVr\n2fIZDFPxGrkHPYF5fawnIj+XFOQGyRCGe5LOr2kfPn3ayqNcbNnc3per0al8\nSnjRFXpmbxa0J2ROpmy3PLVFzxx6upi+3afgfNu6SmxH0vStP6VQQB/ubuhI\nRS+XT9lCEg5+3hYee7lI8tkZfFJSNtTly3aY1jf6+sTliKknF2e9XHmMm1se\nwWPH1TAeAsk1Tc2x+dON9OysoiV5VMHCJMaKcekyWZ/yqegqPNGgMe/ei7jv\nSkJVpFl0/byfbj9KcQhW/wXU6EWk9b/DwcHaFbHQVIS+OnrQqzQIm+3KWGXG\nwgSoU17BIop7zsmdc+Ik7vL7DtLMx3LHUC/oHR1SJTokc8NWNzVvRhHfEi05\n1ebNaI8DoDYe1QDENZ8C3KCz3dk34lyeWwM4rv0krn7NpfKfDkmBb3zuq/Mw\nA/XRcGAB6T5MD7+iik33OqrkS5JwNH66ZGbNR57mnQShMC4xCMkhMX7FV8oJ\nfb+i\r\n=AioG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLWvegIsBvc1y7DDbCT+ne48BG4xjQwd65EHZZFJxVoAiEAh9xm4GcAiuH7BecYHnvgIY0Kj/i5P2RlVdBbauufIcI="}]},"maintainers":[{"name":"asvin","email":"asvin.balloo@gmail.com"},{"name":"chriskinch","email":"kinchie@gmail.com"},{"name":"willhowlett","email":"bigwillchnpm@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/polaris-e2etesting_1.0.1_1575031640709_0.11331401512755845"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-06T16:51:26.878Z","1.0.0":"2019-11-06T16:51:27.279Z","modified":"2022-04-05T03:46:13.301Z","1.0.1":"2019-11-29T12:47:20.807Z"},"maintainers":[{"email":"ilias.pittas1@gmail.com","name":"iliasp"},{"email":"majjda@hotmail.com","name":"majdanas"},{"email":"kinchie@gmail.com","name":"chriskinch"},{"email":"bigwillchnpm@gmail.com","name":"willhowlett"},{"email":"asvin.balloo@gmail.com","name":"asvin"}],"description":"Tools for running user tests against our siteapps","homepage":"https://github.com/dennisinteractive/polaris-e2etesting#readme","repository":{"type":"git","url":"git+ssh://git@github.com/dennisinteractive/polaris-e2etesting.git"},"author":{"name":"Will Howlett","email":"Will_Howlett@dennis.co.uk"},"bugs":{"url":"https://github.com/dennisinteractive/polaris-e2etesting/issues"},"license":"MIT","readme":"# polaris-e2etesting\nTools for running user tests against our siteapps\n\n## Setup\n\n1. `yarn add -D dennisinteractive/polaris-e2etesting\n`\n\n2. Create `e2e_tests` folder with following structure: \n\n`mkdir e2e_tests e2e_tests/features e2e_tests/tests e2e_tests/output e2e_tests/screenshots && touch e2e_tests/output/.gitignore && echo '*\\n!.gitignore' > e2e_tests/output/.gitignore`\n\n```\ne2e_tests\n│\n└───features\n│   │   bddtest1.feature\n│   │   bddtest2.feature\n│   \n└───tests\n│   │   test1.test.js\n│   │   test2.test.js\n│   \n└───output\n└───screenshots\n```\n\n3. Create `runTests.js` file\n``` js\nconst runTests = require('@dennisdigital/polaris-e2etesting');\nrunTests();\n```\n\n4. Add `\"test:e2e\": \"node ./runTests.js\"` to your package.json scripts section\n\n5. Update the site's Dockerfile (`docker/Dockerfile`) to include the following after `ARG BUILD_COMMAND`\n```\n# Install dependencies for running Puppeteer\n# https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker\nRUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \\\n    && sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list' \\\n    && apt-get update \\\n    && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \\\n      --no-install-recommends \\\n    && rm -rf /var/lib/apt/lists/*\n```\n\n6. Ensure the siteapp's webpack config does not include the `Dotenv` plugin for the server bundle (it should still be used for the client bundle)\n\n## Usage\n\n### Extra config\n\nDefault [codecept config](https://codecept.io/configuration/) can be overriden like so\n\n``` js\nconst runTests = require('@dennisdigital/polaris-e2etesting');\n\nrunTests({\n  extraConfig: {\n    helpers: {\n      TestCafe: {\n        browser: 'safari',\n      },\n    },\n    gherkin: {\n      steps: [\n        './e2e_tests/step_definitions/steps.js',\n      ],\n    },\n  },\n});\n```\n\nextraConfig will be merged with default config and override any already defined options. This allows adding extra site specific step definitions to the `gherkin.steps` array\n\n### Override URL\n\nBy default a local server will be spun up running the local sitecode (this assumes the code has been compiled, using either `yarn build` or `yarn watch`). \n\nIf you wish to use a specific url instead this can be overridden by passing the `baseUrl` parameter. In this case the local server won't run, instead the tests will just run against the url specified\n\n```js\nconst runTests = require('@dennisdigital/polaris-e2etesting');\n\nrunTests({\n  baseUrl: 'https://evo.develop.coreapp.didev.co.uk',\n});\n```\n\n### Arguments\n\nArguments can be passed to the package.json script like so: `yarn test:e2e --dev`\n\n* `yarn test:e2e --dev` - shows browser when running tests\n\n## Development\n\nTo develop against `polaris-e2etesting` from within a siteapp (e.g. https://github.com/dennisinteractive/polaris-siteapp) do the following:\n* Clone both the `polaris-e2etesting` repo and the siteapp repo into their respective folders\n* In `polaris-e2etesting` run `yarn link`. This will allow it to be symlinked in other projects\n* In `polaris-siteapp` run `yarn` to install dependencies, then run `yarn link polaris-e2etesting`. This means that `polaris-siteapp` will now use your local copy of `polaris-e2etesting` instead of the copy in its node_modules folder, allowing you to develop against it\n* Run `yarn test:e2e` in `polaris-siteapp` to start your local version of the test runner\n\n","readmeFilename":"README.md"}