Skip to content

Commit 6f71c63

Browse files
neelimaguntupalli1-nhsrootchinmaymudholkar1dependabot[bot]colinpiper3
authored
Ravs 1094 automate reports feature (#44)
* Publishing to github * Publishing to github * Publishing to github * Publishing to github * Publishing to github * Publishing to github * Publishing to github * Publishing to github * Publishing to github * Github actions configured for RAVS QA and RAVS dev * Github actions configured for RAVS QA and RAVS dev and QA has cron job scheduled * ChinmayCorrections * screenshot helper change * Fix screenshots] * Fix issue with headless mode * Set geo location * Set geo location * Fix issue with attaching screenshots * Fix issue with attaching screenshots * Fix issue with attaching screenshots * Fix issue with attaching screenshots * Fix issue with attaching screenshots * Fix issue with attaching screenshots - Added sleep before zipping * Fix issue with attaching screenshots - Added sleep before zipping * Fix issue with attaching screenshots - Added sleep before zipping * Fix issue with attaching screenshots - Added sleep before zipping * Fix github pages - move all files * Fix github pages - move all files * Fix github pages - move all files * Fix github pages - move all files * Fix github pages - move all files * Fix github pages - copy all files * Fix github pages - copy all files * Fix github pages - copy all files * Fix github pages - copy all files * Fix github pages - copy all files * Fix github pages * Reset marker * Update publish to github pages * Update publish to github pages * Fix failing find a patient test * Fix test report publish issue * Fix test report publish issue * Fix test report publish issue * Fix test report publish issue * Fix test report publish issue * Fix test report publish issue * Fix test report publish issue * Bump setuptools in /scripts/docker/examples/python/assets/hello_world Bumps [setuptools](https://github.com/pypa/setuptools) from 65.5.1 to 70.0.0. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](pypa/setuptools@v65.5.1...v70.0.0) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Test steps updated with legal mechanism, vaccination site and updated check and confirm screen * Fix indenttation in conftest.py * Update tests_qa.yml * Fix dev workflow file * Update tests_dev.yml * Add assertions for check and confirm screen * Add assertions for check and confirm screen * Output test environment detail to screenshot title * Fix record a vaccine flow test * Update dev workflow file to run tests for every push * Fix date format and failing tests when legal mechanism is PGD, automatic vaccinator and consent clinician selection * Fix date format * Fixed issue with date of birth format * Fixed issue with date of birth format * Fix failing find a patient by NHS number test * Fix failing test because of PGD * Fix failing test because of PGD * Fix trailing white space issue in pipeline checks * Updated batch expiry date to make the date format is standardized * Ravs 305 legal mechanism change (#13) * Added slack wbhook url support * Fix prod error in docker find step * Fix proc error in docker find step * Fix proc error in docker find step --------- Co-authored-by: root <root@FA-0817> * Ravs 305 legal mechanism change (#14) * Added slack wbhook url support * Fix prod error in docker find step * Fix proc error in docker find step * Fix proc error in docker find step * Fix failing find a patient search * Fix test failures with improved checks * Fix test failures with improved checks * Timeout error print and not fail the test * Fix liniting error --------- Co-authored-by: root <root@FA-0817> * Update tests_dev.yml Start cron job at 7.30 after QA tests run * Fix failing tests * Replace PDS search numbers * Bump actions/github-script from 6 to 7 (#9) Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * --- (#8) updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jinja2 in /scripts/docker/examples/python/assets/hello_world (#7) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/checkout from 2 to 4 (#2) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/net in /docs/adr/assets/ADR-003/examples/golang (#1) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0. - [Commits](golang/net@v0.17.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/upload-artifact from 2 to 4 (#3) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/setup-buildx-action from 1 to 3 (#4) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@v1...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/download-artifact from 2 to 4 (#5) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix failing tests * Update action.yaml * Update action.yaml * Bump actions/checkout from 2 to 4 (#18) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump werkzeug in /scripts/docker/examples/python/assets/hello_world (#6) Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.1 to 3.0.3. - [Release notes](https://github.com/pallets/werkzeug/releases) - [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst) - [Commits](pallets/werkzeug@3.0.1...3.0.3) --- updated-dependencies: - dependency-name: werkzeug dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: neelimaguntupalli1-nhs <[email protected]> * Bump actions/upload-artifact from 2 to 4 (#19) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/download-artifact from 2 to 4 (#20) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/setup-buildx-action from 1 to 3 (#21) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@v1...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump peaceiris/actions-gh-pages from 3 to 4 (#22) Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4. - [Release notes](https://github.com/peaceiris/actions-gh-pages/releases) - [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md) - [Commits](peaceiris/actions-gh-pages@v3...v4) --- updated-dependencies: - dependency-name: peaceiris/actions-gh-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Find a patient (#15) * update find a patient tests * add happy path demographics tests * Ravs 305 legal mechanism change (#14) * Added slack wbhook url support * Fix prod error in docker find step * Fix proc error in docker find step * Fix proc error in docker find step * Fix failing find a patient search * Fix test failures with improved checks * Fix test failures with improved checks * Timeout error print and not fail the test * Fix liniting error --------- Co-authored-by: root <root@FA-0817> * Update tests_dev.yml Start cron job at 7.30 after QA tests run * Fix failing tests * add remaining demo tests * Replace PDS search numbers * add start of local tests * add create patient scenario * Bump actions/github-script from 6 to 7 (#9) Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * --- (#8) updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jinja2 in /scripts/docker/examples/python/assets/hello_world (#7) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/checkout from 2 to 4 (#2) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/net in /docs/adr/assets/ADR-003/examples/golang (#1) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0. - [Commits](golang/net@v0.17.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/upload-artifact from 2 to 4 (#3) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/setup-buildx-action from 1 to 3 (#4) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@v1...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/download-artifact from 2 to 4 (#5) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix failing tests * Update action.yaml * Update action.yaml * Bump actions/checkout from 2 to 4 (#18) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump werkzeug in /scripts/docker/examples/python/assets/hello_world (#6) Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.1 to 3.0.3. - [Release notes](https://github.com/pallets/werkzeug/releases) - [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst) - [Commits](pallets/werkzeug@3.0.1...3.0.3) --- updated-dependencies: - dependency-name: werkzeug dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: neelimaguntupalli1-nhs <[email protected]> * Bump actions/upload-artifact from 2 to 4 (#19) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/download-artifact from 2 to 4 (#20) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v2...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/setup-buildx-action from 1 to 3 (#21) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@v1...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump peaceiris/actions-gh-pages from 3 to 4 (#22) Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4. - [Release notes](https://github.com/peaceiris/actions-gh-pages/releases) - [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md) - [Commits](peaceiris/actions-gh-pages@v3...v4) --- updated-dependencies: - dependency-name: peaceiris/actions-gh-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * re-add test for find a patient page * re-add test for find a patient page * update find a patient tests * add happy path demographics tests * add remaining demo tests * add start of local tests * add create patient scenario * re-add test for find a patient page * re-add test for find a patient page * re-add explicit scenario for find a patient * fix rebase errors * fix rebase errors * re-add explicit scenarios * restore old tests * indentation fix * indentation fix * indentation fix * update find a patient page * update requirements.txt * update requirements.txt * update requirements.txt to add faker * update requirements.txt to add faker * update requirements.txt to add faker * update requirements.txt to utf-8 * update requirements.txt to utf-8 with trailing crlf * update requirements.txt add faker --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Colin Piper <[email protected]> Co-authored-by: neelimaguntupalli1-nhs <[email protected]> Co-authored-by: root <root@FA-0817> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: chinmaymudholkar1 <[email protected]> * Adding tests for age based warnings * Adding tests for age based warnings on vacinate screen too * Fix file formatting job failure * Fix failing record a vaccine tests qa (#24) * Removed your-location page and added support for RSV and pertussis * Removed your-location page and added support for RSV and pertussis fixed recording vaccine tests --------- Co-authored-by: root <root@FA-0817> * Add vaccine and batch (#25) * Removed your-location page and added support for RSV and pertussis * Removed your-location page and added support for RSV and pertussis fixed recording vaccine tests * update the add vaccine and add batch * added scenario for existing product to check batch availability * fix launch page tests for add vaccines and add batches * fix add vaccine tests * fix add batch tests * file format fixes * file format fixes * change secret scan to staged changes * update tests to cover saved record and delete, and update existing record a vaccine tests to use new flow * refactor the vaccine site type batch logic to make it simpler * refactor the vaccine site type batch logic to make it simpler * fix formatting * fix formatting * confirm add batch and add vaccine tests working locally * revert RAV tests to remove cookie check * updated flu vaccine names --------- Co-authored-by: root <root@FA-0817> Co-authored-by: Colin Piper <[email protected]> * Update tests_dev.yml Disable test run for tomorrow * Update tests_qa.yml Disable test run for tomorrow * Retest cron job - tests_dev.yml * Reset cron jobs - tests_qa.yml * Fix failing find a patient tests (#26) * Fix failing find a patient tests * Removed scoop from requirements.txt to fix scan secrets issue * added requirements.txt to gitleaks ignore list * Updated path of requirements.txt file * Added fingerprint to gitleaksignore file * Added fingerprint to gitleaksignore file * Added fingerprint to gitleaksignore file * Added fingerprint to gitleaksignore file * Fix failing tests main * Test publish to 2 urls * Disabled automated tests for wednesday * Fixed failing age based warning tests and moved to locators instead of selectors for choose vaccine page * Fixed all failing find a patient tests and changed all elements to be playwright locators instead of selenium selectors --------- Co-authored-by: root <root@FA-0817> * Fix failing logout tests (#28) * Fixed failing logout test and made common methods to click to avoid code duplication * Fix git hooks errors with formatting * Fix failing tests following last commit * Fix issue with attaching screenshots to alure report * Fix issue with attaching screenshots to alure report * Fix issue with attaching screenshots to allure reports and fixed failing login tests * Fix issue with inconsistent test failures when running headless * Hopefully nailed all intermittent failures * Fixed all issues except recording a vaccine and improved wait times * Try publishing data to github * Try publishing data to github * Try publishing data to github * Try publishing data to github * Try publishing data to github * Fixed attach screenshot issue * May have solved the image attachment issue * Make github pages url dynamic * Try attach screenshots again * Corrected upload artifact version * Fixed issue with yml * Fix dynamic branch url naming issue * Reset git leaks actions from last colin's change * Only run logout test for quick feedback * Upload screenshots as artifacts again * Try different version of git actions * Try different version of git actions * Try different version of git actions * Try different version of git actions * Try different version of git actions * Try different version of git actions * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * Correct screenshot path * publish to gibhun-dev * made new branch for publishing to github-pages-dev * made new branch for publishing to github-pages-dev * made new branch for publishing to github-pages-dev * Fix failing tests in dev excpet record a vaccine and added enough wait timers * Added more wait timers * Implement new workflow file * debug workflow file * debug workflow file * debug workflow file --------- Co-authored-by: root <root@FA-0817> * Ravs 961 update record a vaccine tests (#31) * Fixed failing add existing batch test * Fixed fa * Fixed assessment page fields * Fixed consent page fields and site vaccine, batch fields * Fixed vaccinated page field, giving a first stan now to see if all tests pass * Fixed failing age based warning tests * Sorted record a vaccine tests hopefully * Sorted record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully --------- Co-authored-by: root <root@FA-0817> * Ravs 961 update record a vaccine tests (#32) * Fixed failing add existing batch test * Fixed fa * Fixed assessment page fields * Fixed consent page fields and site vaccine, batch fields * Fixed vaccinated page field, giving a first stan now to see if all tests pass * Fixed failing age based warning tests * Sorted record a vaccine tests hopefully * Sorted record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Sorted most of record a vaccine tests hopefully * Changed browser to be edge * Updated scan secrets yml * Updated scan secrets yml and removed timeout as it is not needed * Added logging for shared_data when recording a vaccine * Added logging for shared_data when recording a vaccine * Fixed feature file --------- Co-authored-by: root <root@FA-0817> * Update pytest.ini * Update test_find_a_patient_steps.py * Added intial test for creating reports feature * Update pytest.ini * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Ravs 1094 automate reports feature (#33) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests --------- Co-authored-by: root <root@FA-0817> * Update test_add_vaccine_batches_steps.py * Added 2 new tests to reports * Fixed add batches tests * Ravs 1094 automate reports feature (#34) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Added 2 new tests to reports * Fixed add batches tests --------- Co-authored-by: root <root@FA-0817> * Bump werkzeug in /scripts/docker/examples/python/assets/hello_world (#30) Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.3 to 3.0.6. - [Release notes](https://github.com/pallets/werkzeug/releases) - [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst) - [Commits](pallets/werkzeug@3.0.3...3.0.6) --- updated-dependencies: - dependency-name: werkzeug dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/upload-artifact from 3 to 4 (#29) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump nhs-england-tools/notify-msteams-action from 0.0.4 to 1.0.0 (#27) Bumps [nhs-england-tools/notify-msteams-action](https://github.com/nhs-england-tools/notify-msteams-action) from 0.0.4 to 1.0.0. - [Release notes](https://github.com/nhs-england-tools/notify-msteams-action/releases) - [Changelog](https://github.com/nhs-england-tools/notify-msteams-action/blob/main/.releaserc) - [Commits](nhs-england-tools/notify-msteams-action@v0.0.4...v1.0.0) --- updated-dependencies: - dependency-name: nhs-england-tools/notify-msteams-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * git attached screenshots for all steps when recording a vaccine and scrolled to the mouse location to click screenshot * fix failing test * fix failing test * Created new workflow file * Ravs 1094 automate reports feature (#35) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Added 2 new tests to reports * Fixed add batches tests * git attached screenshots for all steps when recording a vaccine and scrolled to the mouse location to click screenshot * fix failing test * fix failing test * Created new workflow file --------- Co-authored-by: root <root@FA-0817> * Removed install of tox * Removed install of tox * Ravs 1094 automate reports feature (#36) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Added 2 new tests to reports * Fixed add batches tests * git attached screenshots for all steps when recording a vaccine and scrolled to the mouse location to click screenshot * fix failing test * fix failing test * Created new workflow file * Removed install of tox * Removed install of tox --------- Co-authored-by: root <root@FA-0817> * Making more space on disk * Ravs 1094 automate reports feature (#37) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Added 2 new tests to reports * Fixed add batches tests * git attached screenshots for all steps when recording a vaccine and scrolled to the mouse location to click screenshot * fix failing test * fix failing test * Created new workflow file * Removed install of tox * Removed install of tox * Making more space on disk --------- Co-authored-by: root <root@FA-0817> * Fixed app id variable to fetch from secrets * Ravs 1094 automate reports feature (#38) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Added 2 new tests to reports * Fixed add batches tests * git attached screenshots for all steps when recording a vaccine and scrolled to the mouse location to click screenshot * fix failing test * fix failing test * Created new workflow file * Removed install of tox * Removed install of tox * Making more space on disk * Fixed app id variable to fetch from secrets --------- Co-authored-by: root <root@FA-0817> * Fixed app id variable to fetch from secrets * Corrected case of RAvs test reports * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Fixed workflow file * Fixed path of environment properties * check env.properties is generated * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Fixed trigger curl command * Fixed trigger curl command * Added cron jobs and also added cache * Added cron jobs and also added cache * Corrected target repo name * Corrected target repo name * Corrected run_id case * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Tox verbose mode * Tox verbose mode * Tox verbose mode * env is qa * Added support for marker when running manually * set cron job * removed terraform liniting githook * Fixed failing record vaccine tests because of text format change * Fixed failing record vaccine tests because of text format change * Set timezone to ne europe london * Set timezone to be europe london * test markers are not required * workflow set to what is input * Ravs 1094 automate reports feature (#39) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Added 2 new tests to reports * Fixed add batches tests * git attached screenshots for all steps when recording a vaccine and scrolled to the mouse location to click screenshot * fix failing test * fix failing test * Created new workflow file * Removed install of tox * Removed install of tox * Making more space on disk * Fixed app id variable to fetch from secrets * Fixed app id variable to fetch from secrets * Corrected case of RAvs test reports * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Fixed workflow file * Fixed path of environment properties * check env.properties is generated * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Fixed trigger curl command * Fixed trigger curl command * Added cron jobs and also added cache * Added cron jobs and also added cache * Corrected target repo name * Corrected target repo name * Corrected run_id case * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Tox verbose mode * Tox verbose mode * Tox verbose mode * env is qa * Added support for marker when running manually * set cron job * removed terraform liniting githook * Fixed failing record vaccine tests because of text format change * Fixed failing record vaccine tests because of text format change * Set timezone to ne europe london * Set timezone to be europe london * test markers are not required * workflow set to what is input --------- Co-authored-by: root <root@FA-0817> * Added new tests for reports * Added new tests for reports * Fixed failing tests * Ravs 1094 automate reports feature (#42) * Added intial test for creating reports feature * Fixed failing test for RSV * Added more tests * Fixed -pl=,'@~ * Fixed failed RSV and pertussis tests * Fixed failed RSV and pertussis tests * Updated duplicate batch error and fixed non reponsive page issues when switching from vaccines to patient search * Get sequential index instead of random index * Fixed failing RSV and pertussis tests by adding new batches tagged as Automation * Fixed failing duplicate batch test following fix of 17456 * Reduced time.sleep to see how tests fare * Reset back time and reduced them slightly * Increaed wait time for logout tests * Increaed wait time for logout tests * Increaed wait time for logout tests * Added 2 new tests to reports * Fixed add batches tests * git attached screenshots for all steps when recording a vaccine and scrolled to the mouse location to click screenshot * fix failing test * fix failing test * Created new workflow file * Removed install of tox * Removed install of tox * Making more space on disk * Fixed app id variable to fetch from secrets * Fixed app id variable to fetch from secrets * Corrected case of RAvs test reports * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Corrected test report generation step * Fixed workflow file * Fixed path of environment properties * check env.properties is generated * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Removed docker * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Remove cached tox * Fixed trigger curl command * Fixed trigger curl command * Added cron jobs and also added cache * Added cron jobs and also added cache * Corrected target repo name * Corrected target repo name * Corrected run_id case * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Corrected github token * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Removed all workflow files and set to run it on push * Tox verbose mode * Tox verbose mode * Tox verbose mode * env is qa * Added support for marker when running manually * set cron job * removed terraform liniting githook * Fixed failing record vaccine tests because of text format change * Fixed failing record vaccine tests because of text format change * Set timezone to ne europe london * Set timezone to be europe london * test markers are not required * workflow set to what is input * Added new tests for reports * Added new tests for reports * Fixed failing tests --------- Co-authored-by: root <root@FA-0817> * Bump actions/setup-python from 4 to 5 (#41) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/cache from 3 to 4 (#40) Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Increased timeout for scan secrets from 2 to 10 * Added fingerprint to git leaks ignore * Increased timeout * Reset timeout to 10 * Added 4 new tests * Fixed failing reports tests * Added new tests * Added new tests * Added new tests * Added new tests * Fixedd failing tests and checking report file is downloaded tests are added * Fixed failing download reports tests * Validating report headers * Validating report headers * Validating report headers and checking if columns are not empty * Validating report headers and checking if columns are not empty * Arexy vaccine has been decommissioned so removed that test from the test suite --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: root <root@FA-0817> Co-authored-by: [email protected] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: chinmaymudholkar1 <[email protected]> Co-authored-by: colinpiper3 <[email protected]> Co-authored-by: Colin Piper <[email protected]>
1 parent 0f8210e commit 6f71c63

18 files changed

+660
-206
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ allure-report/
2525
tox.log
2626
node_modules/
2727
package-lock.json
28+
downloads/RAVs-Vaccination-Report.csv

conftest.py

Lines changed: 164 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import pytest
2+
from pytest_bdd import given, when, then, scenarios, scenario
3+
from pytest_bdd.parsers import parse
24
# from pages.add_vaccines_page import *
5+
from pages.check_and_confirm_vaccinated_record_page import *
6+
from pages.delete_vaccination_page import *
37
from pages.settings_page import *
48
from pages.site_vaccine_batches_page import *
59
from pages.vaccines_page import *
@@ -24,6 +28,7 @@
2428
from datetime import datetime, timedelta
2529
from allure_commons.types import LabelType
2630
import logging
31+
from test_data.get_values_from_models import *
2732

2833
# Define marks
2934
pytest.mark.login = pytest.mark.mark(login=True)
@@ -52,20 +57,6 @@ def format_nhs_number(nhs_number):
5257
formatted_number = re.sub(r"(\d{3})(\d{3})(\d{4})", r"\1 \2 \3", nhs_number)
5358
return formatted_number
5459

55-
56-
# @pytest.fixture(scope='function')
57-
# def playwright_helper(request):
58-
# helper = PlaywrightHelper(get_working_directory(), config)
59-
# def teardown():
60-
# try:
61-
# helper.quit_browser()
62-
# except Exception as e:
63-
# print(f"An error occurred during teardown: {e}")
64-
# raise
65-
66-
# request.addfinalizer(teardown)
67-
# return helper
68-
6960
# Fixture for site parameter
7061
@pytest.fixture(params=["NEELIMA HOUSE", "ALBERT HOUSE", "ST JOHN'S HOUSE"])
7162
def site(request):
@@ -430,3 +421,162 @@ def navigate_and_login_with_username(username):
430421
attach_screenshot("entered_password")
431422
click_nhs_signin_button()
432423
attach_screenshot("clicked_nhs_signin_button")
424+
425+
@given(parse("I login to RAVS and set vaccinator details with {site} and {care_model} and get patient details for {nhs_number} with option {index} and choose to vaccinate with vaccine details as {chosen_vaccine}, {batch_number} with {batch_expiry_date}"))
426+
def step_login_to_ravs(site, care_model, nhs_number, index, chosen_vaccine, batch_number, batch_expiry_date, shared_data):
427+
shared_data["nhs_number"] = nhs_number
428+
shared_data["index"] = index
429+
shared_data["chosen_vaccine"] = chosen_vaccine
430+
shared_data["chosen_vaccine_type"] = get_vaccination_type(index, chosen_vaccine)
431+
shared_data["batch_number"] = batch_number
432+
shared_data["site"] = site
433+
shared_data["care_model"] = get_care_model(index)
434+
435+
today_str = datetime.today().strftime('%d/%m/%Y')
436+
today = datetime.strptime(today_str, '%d/%m/%Y')
437+
if datetime.strptime(batch_expiry_date, '%d/%m/%Y') <= today:
438+
batch_expiry_date = today + timedelta(days=7)
439+
batch_expiry_date = standardize_date_format(batch_expiry_date)
440+
shared_data["batch_expiry_date"] = batch_expiry_date
441+
check_vaccine_and_batch_exists_in_site(site, chosen_vaccine, shared_data["chosen_vaccine_type"], batch_number, batch_expiry_date)
442+
return shared_data
443+
444+
@given("I search for a patient with the NHS number in the find a patient screen")
445+
@then("I search for a patient with the NHS number in the find a patient screen")
446+
def step_search_for_patient(shared_data):
447+
nhs_number = shared_data["nhs_number"]
448+
click_find_a_patient_and_search_with_nhs_number(nhs_number)
449+
450+
@given(parse("I open the patient record by clicking on patient {name}"))
451+
@then(parse("I open the patient record by clicking on patient {name}"))
452+
def step_search_for_patient(shared_data, name):
453+
attach_screenshot("before_clicking_patient_name")
454+
click_on_patient_name(name)
455+
attach_screenshot("before_clicking_patient_name")
456+
shared_data["patient_name"] = name
457+
458+
@when(parse("I click choose vaccine button and choose the {chosen_vaccine}, {batch_number} with {batch_expiry_date} and click continue"))
459+
def step_choose_vaccine_and_vaccine_type(shared_data, chosen_vaccine, batch_number, batch_expiry_date):
460+
time.sleep(3)
461+
immunisation_history_records_count_before_vaccination = click_on_patient_search_result_and_click_choose_vaccine(shared_data['patient_name'], chosen_vaccine)
462+
shared_data["immunisation_history_records_count_before_vaccination"] = immunisation_history_records_count_before_vaccination
463+
choose_vaccine_and_vaccine_type_for_patient(shared_data['site'], chosen_vaccine, shared_data['chosen_vaccine_type'])
464+
465+
@when(parse("I assess the patient's {eligibility} with the details and date as {assess_date} and click continue to record consent screen button"))
466+
def step_assess_eligibility_and_click_continue_record_consent_screen(shared_data, eligibility, assess_date):
467+
shared_data['eligible_decision'] = eligibility
468+
shared_data['legal_mechanism'] = get_legal_mechanism(shared_data["index"])
469+
shared_data['eligibility_type'] = get_eligibility_type(shared_data["index"], shared_data["chosen_vaccine"])
470+
shared_data["healthcare_worker"] = get_staff_role(shared_data["index"])
471+
shared_data['eligibility_assessing_clinician'] = get_random_assessing_clinician()
472+
assess_date = format_date(str(get_date_value(assess_date)), config["browser"])
473+
shared_data['eligibility_assessment_date'] = assess_date
474+
shared_data['eligibility_assessment_outcome'] = get_assessment_outcome(0)
475+
shared_data['eligibility_assessment_no_vaccine_given_reason'] = get_assess_vaccine_not_given_reason(shared_data["index"])
476+
shared_data['assessment_comments'] = "Assessment comments " + assess_date + shared_data["patient_name"]
477+
assess_patient_with_details_and_click_continue_to_consent(eligibility, shared_data['eligibility_type'], shared_data["healthcare_worker"], shared_data['eligibility_assessing_clinician'], None, assess_date, shared_data['legal_mechanism'], shared_data['eligibility_assessment_outcome'], shared_data['assessment_comments'],shared_data['eligibility_assessment_no_vaccine_given_reason'])
478+
479+
@when(parse("I assess the pregnant patient's {eligibility} with the details of due date as {due_date} and assessment date as {assess_date} and click continue to record consent screen button"))
480+
def step_assess_eligibility_and_click_continue_record_consent_screen(shared_data, eligibility, due_date, assess_date):
481+
shared_data['eligible_decision'] = eligibility
482+
shared_data['legal_mechanism'] = get_legal_mechanism(shared_data["index"])
483+
shared_data['eligibility_type'] = "Pregnancy"
484+
shared_data["healthcare_worker"] = get_staff_role(shared_data["index"])
485+
shared_data['eligibility_assessing_clinician'] = get_random_assessing_clinician()
486+
due_date = format_date(str(get_date_value(due_date)), config["browser"])
487+
shared_data['eligibility_due_date'] = due_date
488+
assess_date = format_date(str(get_date_value(assess_date)), config["browser"])
489+
shared_data['eligibility_assessment_date'] = assess_date
490+
shared_data['eligibility_assessment_outcome'] = get_assessment_outcome(0)
491+
shared_data['eligibility_assessment_no_vaccine_given_reason'] = get_assess_vaccine_not_given_reason(shared_data["index"])
492+
shared_data['assessment_comments'] = "Assessment comments " + assess_date + shared_data["patient_name"]
493+
assess_patient_with_details_and_click_continue_to_consent(eligibility, shared_data['eligibility_type'], shared_data["healthcare_worker"], shared_data['eligibility_assessing_clinician'], due_date, assess_date, shared_data['legal_mechanism'], shared_data['eligibility_assessment_outcome'], shared_data['assessment_comments'],shared_data['eligibility_assessment_no_vaccine_given_reason'])
494+
495+
@when(parse("I record {consent} with the details and click continue to vaccinate button"))
496+
def step_record_consent_and_click_continue_to_vaccinate_screen(shared_data, consent):
497+
shared_data['consent_decision'] = consent
498+
if shared_data["eligibility_assessment_outcome"].lower() == "give vaccine":
499+
shared_data['consent_given_by'] = get_consent_given_by(shared_data["index"])
500+
name_of_person_consenting = "Automation tester"
501+
relationship_to_patient = "RAVS tester"
502+
if shared_data['legal_mechanism'] == "Patient Group Direction (PGD)":
503+
shared_data['consent_clinician_details'] = shared_data['eligibility_assessing_clinician']
504+
else:
505+
shared_data['consent_clinician_details'] = get_consenting_clinician(shared_data["index"])
506+
shared_data["no_consent_reason"] = get_no_consent_reason(shared_data["index"])
507+
record_consent_details_and_click_continue_to_vaccinate(shared_data['consent_decision'],shared_data['consent_given_by'], name_of_person_consenting, relationship_to_patient, shared_data['consent_clinician_details'], shared_data['legal_mechanism'], shared_data["no_consent_reason"])
508+
509+
@when(parse("I record {vaccination} details and date as {vaccination_date} and click Continue to Check and confirm screen"))
510+
def step_enter_vaccination_details_and_continue_to_check_and_confirm_screen(shared_data, vaccination, vaccination_date):
511+
shared_data["vaccinated_decision"] = vaccination
512+
if shared_data["consent_decision"].lower() == "yes":
513+
if shared_data["eligibility_assessment_outcome"].lower() == "give vaccine":
514+
shared_data["vaccination_date"] = format_date(str(get_date_value(vaccination_date)), config["browser"])
515+
chosen_vaccine = shared_data["chosen_vaccine"]
516+
shared_data["vaccination_site"] = get_vaccination_site(shared_data["index"])
517+
shared_data["dose_amount"] = str(get_vaccine_dose_amount(shared_data["chosen_vaccine_type"]))
518+
if shared_data['legal_mechanism'] == "Patient Group Direction (PGD)":
519+
shared_data['vaccinator'] = shared_data['eligibility_assessing_clinician']
520+
else:
521+
shared_data["vaccinator"] = get_vaccinator(shared_data["index"])
522+
shared_data["vaccination_comments"] = shared_data["chosen_vaccine_type"] + "vaccination given on " + shared_data["vaccination_date"] + " for " + shared_data["patient_name"]
523+
shared_data["no_vaccination_reason"] = get_vaccination_not_given_reason(shared_data["index"])
524+
enter_vaccine_details_and_click_continue_to_check_and_confirm(shared_data["vaccinated_decision"], shared_data["care_model"], shared_data["vaccination_date"], chosen_vaccine, shared_data["chosen_vaccine_type"], shared_data["vaccination_site"], shared_data["batch_number"], shared_data["batch_expiry_date"], shared_data["dose_amount"], shared_data["vaccinator"], shared_data["vaccination_comments"], shared_data["legal_mechanism"], shared_data["no_vaccination_reason"])
525+
attach_screenshot("entered_vaccination_details")
526+
logging.info(shared_data)
527+
528+
@then(parse("I need to be able to see the patient {name}, {dob}, {address} and vaccination details on the check and confirm screen"))
529+
def step_see_patient_details_on_check_and_confirm_screen(shared_data, name, dob, address):
530+
if shared_data["vaccinated_decision"].lower() == "Yes".lower() and shared_data["consent_decision"].lower() == "Yes".lower() and shared_data["eligibility_assessment_outcome"].lower() == "Give vaccine".lower():
531+
attach_screenshot("check_and_confirm_screen_before_assertion")
532+
assert get_patient_name_value() == shared_data["patient_name"]
533+
assert get_patient_address_value() == address
534+
assert get_patient_vaccination_dose_amount_value() == shared_data["dose_amount"]
535+
assert get_patient_vaccinated_chosen_vaccine_value() == shared_data["chosen_vaccine"]
536+
assert get_patient_vaccinated_chosen_vaccine_product_value() == shared_data["chosen_vaccine_type"]
537+
assert get_patient_eligibility_assessment_date_value() == date_format_with_day_of_week(shared_data['eligibility_assessment_date'])
538+
assert get_patient_vaccinated_date_value() == date_format_with_day_of_week(shared_data['vaccination_date'])
539+
assert get_patient_dob_value() == date_format_with_age(dob)
540+
assert get_patient_vaccination_batch_expiry_date_value() == date_format_with_name_of_month(shared_data['batch_expiry_date'])
541+
assert get_patient_eligibility_assessing_clinician_vaccine_value() == shared_data['eligibility_assessing_clinician']
542+
assert get_patient_consent_recorded_by_clinician_value() == shared_data['consent_clinician_details']
543+
assert get_patient_vaccination_vaccinator_value() == shared_data['vaccinator']
544+
attach_screenshot("check_and_confirm_screen_after_assertion")
545+
546+
@then("when I click confirm and save button, I should see a record saved dialogue")
547+
def click_confirm_and_save_button_record_saved(shared_data):
548+
attach_screenshot("patient_details_screen_with_immunisation_history")
549+
click_confirm_details_and_save_button()
550+
attach_screenshot("before_assert_record_saved")
551+
assert check_record_saved_element_exists(False)
552+
553+
@then("the immunisation history of the patient should be updated in the patient details page")
554+
def immunisation_history_should_be_updated(shared_data):
555+
attach_screenshot("immunisation_history_records_count_after_vaccination")
556+
immunisation_history_records_count_after_vaccination = get_count_of_immunisation_history_records(shared_data["chosen_vaccine"])
557+
assert int(immunisation_history_records_count_after_vaccination) >= int(shared_data["immunisation_history_records_count_before_vaccination"]) + 1
558+
click_delete_history_link(shared_data["chosen_vaccine"])
559+
attach_screenshot("click_delete_history_link")
560+
click_delete_vaccination_button()
561+
attach_screenshot("click_delete_vaccination_button")
562+
shared_data.clear()
563+
564+
@then("the immunisation history of the patient should be updated in the patient details page and not be deleted")
565+
def immunisation_history_should_be_updated(shared_data):
566+
attach_screenshot("immunisation_history_records_count_after_vaccination")
567+
immunisation_history_records_count_after_vaccination = get_count_of_immunisation_history_records(shared_data["chosen_vaccine"])
568+
assert int(immunisation_history_records_count_after_vaccination) >= int(shared_data["immunisation_history_records_count_before_vaccination"]) + 1
569+
570+
@then("when I click confirm and save button, the immunisation history of the patient should be updated in the patient details page")
571+
def click_confirm_and_save_button_immunisation_history_should_be_updated(shared_data):
572+
attach_screenshot("patient_details_screen_with_immunisation_history")
573+
if shared_data["vaccinated_decision"].lower() == "yes" and shared_data["consent_decision"].lower() == "yes" and shared_data["eligibility_assessment_outcome"].lower() == "give vaccine":
574+
click_confirm_details_and_save_button()
575+
immunisation_history_records_count_after_vaccination = get_count_of_immunisation_history_records(shared_data["chosen_vaccine"])
576+
assert int(immunisation_history_records_count_after_vaccination) >= int(shared_data["immunisation_history_records_count_before_vaccination"]) + 1
577+
shared_data.clear()
578+
else:
579+
immunisation_history_records_count_after_vaccination = get_count_of_immunisation_history_records(shared_data["chosen_vaccine"])
580+
assert int(immunisation_history_records_count_after_vaccination) == int(shared_data["immunisation_history_records_count_before_vaccination"])
581+
shared_data.clear()
582+
attach_screenshot("patient_details_screen_with_immunisation_history")
-43.3 KB
Binary file not shown.
-43.3 KB
Binary file not shown.
-63.2 KB
Binary file not shown.
-61.2 KB
Binary file not shown.
-49.4 KB
Binary file not shown.

features/record_a_vaccine_for_patient_with_nhs_number.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ Feature: Record vaccine
6262
| 1 | 9693632109 | BECCLES HOUSE | Vaccination Centre | yes | today+100 | today-1 | yes | yes | today-1 | Bill GARTON | 23/6/1946 | 1 MOUNT AVENUE, BARTON-UPON-HUMBER, S HUMBERSIDE, DN18 5DW | Pertussis | AUTOMATION-BIS | 19/10/2028 |
6363
| 2 | 9470040228 | BIRCH HOUSE | Hospital hub for staff and patients | yes | today+290 | today-1 | yes | yes | today | HERBERT HAAG | 14/12/1922 | 10 COASTAL ROAD, HEST BANK, LANCASTER, LA2 6HN | Pertussis | AUTOMATION-RVS | 19/2/2029 |
6464
| 3 | 9472710255 | ALBERT HOUSE | Housebound patient's home | yes | today+5 | today-3 | yes | yes | today-2 | DELICE PINKER | 10/11/1926 | HARDCRAGG HOUSE, HARDCRAGG WAY, GRANGE-OVER-SANDS, CUMBRIA, LA11 6BH | Respiratory syncytial virus (RSV) | AUTOMATION-ARX | 19/10/2026 |
65-
| 4 | 9473629885 | BECCLES HOUSE | Outreach event | yes | today+50 | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | Respiratory syncytial virus (RSV) | AREX2-15A | 19/10/2026 |
65+
# | 4 | 9473629885 | BECCLES HOUSE | Outreach event | yes | today+50 | today-4 | yes | yes | today-3 | MARGIE PUCKEY | 27/5/1924 | MANSART COURT, 10 OLIVE SHAPLEY AVENUE, MANCHESTER, M20 6QB | Respiratory syncytial virus (RSV) | AREX2-15A | 19/10/2026 | - # This test is no longer needed as Arexvy has been decommissioned on 29th Nov 2024
6666

0 commit comments

Comments
 (0)