Skip to content

Commit

Permalink
SSCSSI-372 - Enable end to end test execution on preview environment (#…
Browse files Browse the repository at this point in the history
…1706)

* Upgrade dependency version

* functional test code

* chore: clean up and refactor of config for tests.

* chore: add refactored files for updated reference

* Si 178 report creation (#1561)

* configuring reports

* fix conflicts

* updates to test

* remove wip logger feature

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* chore: add refactored code for the tes

* chore: refactoring of the framework

* chore: refactoring of the tests and structure

* Implement logging to the framework (#1562)

* Implement logging to the framework

* add error catch logic

* Update logging to match new folder format

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* chore: make the events summary and events description page as a common page

* chore: add file rename to  test code and application

* chore: fixed some more code that is refactored

* chore:fixes for the refactoring of the tests to execute with work allocation tasks...

* Code modified with CI Config (#1564)

* Code modified with ci CONFIG

* change archive file path

* Create new test stage for playwright tests

* Amend jenkins config

* more amend to jenkins config

* move test stage in config

* update functional test step

* enable playwright test in smoke step

* revert functional script

* chore: testing the reporting functionality.

* chore: fixed the unwnated brace for the pipeline to execute.

* chore: report to work

* chore:final testing for the report

* chore: fixed some more code that is refactored

* chore:fixes for the refactoring of the tests to execute with work allocation tasks...

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>
Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* feat: add Send to Admin tests

* [SSCSSI-238] add associate case tests (#1570)

* add associate case tests

* rename file and update comments

* address review comments

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* SSCSSI-278: Evidence Reminder case tests (#1571)

* Add initial tests

* Update tests for evidence reminder

* Update tests for evidence reminder

* Update steps for evidence reminder

* Fix conflict

* Fix conflicts

* Readd URLs

* functional-test/pages/common/homePage.ts

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* exlcude functional test folder

* Update playwright.config.ts

* Update package.json

* Update playwright.config.ts

* Update package.json

* Update Jenkinsfile_CNP

* Added test for Listing Error event and updating verifyPageContent met… (#1572)

* Added test for Listing Error event and updating verifyPageContent method.

* Added test for Listing Error event and updating verifyPageContent method.

* Update config.ts

* Update listing-error.spec.ts

* SSCSSI-278: Evidence Reminder case tests (#1571)

* Add initial tests

* Update tests for evidence reminder

* Update tests for evidence reminder

* Update steps for evidence reminder

* Fix conflict

* Fix conflicts

* Readd URLs

* functional-test/pages/common/homePage.ts

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

---------

Co-authored-by: pats-john <13101669+pats-john@users.noreply.github.com>
Co-authored-by: Derin Aya <106395889+derin-aya@users.noreply.github.com>
Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Sscs 177 (#1590)

* chore: updated branch with required code and not WS files

* update caseworker creds for a more stable tests

* remove flaky checks

* rename env variable

* add screenshot config

* add judge users

* update test

* Increase re-try

* add wait before submissions

* add wait to avoid case update error

* add delay for event trigger

* update wait with page reload

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>
Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Test code for upload response event, error scenarios & refactored oop… (#1582)

* test code for upload response event, error scenarios & refactored oops changes

* re-adding parallel config

* update file path

* wip code

* refactored code ficx

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Case dormant (#1594)

* chore: add the teardown code for making a case Dormant

* chore: fix path for failing uploadResponse tests...

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* SSCSSI-310 - implement new jenkins step (#1595)

* implement new jenkins step

* update config

* udpate test

* move reports to test stage

* add test stage for playwright tests

* wip code

* chore: add fixed the uplaod response tests

* chore:fixed the upload response tests

* chore:removed the unwanted tag in the test execution

* chore:add the relevant visibility test for the issues around element hiding

* chore: upgraded the retry configuration to execute the test

* chore:testing the file upload functionality

* chore: fixed the relevant test locally and testing in the pipeline

* chore: removal of unwanted only

* chore: commenting out unwanted tests

* chore: add delays to fix other events to be completed.

* chore: changed and fixed the text match comparison

* chore: changed the presence of text for the purpose of testing

* chore: add a slow test to the error test

* chore: further testing of the code

* chore: testing the timeout of test

* chore: button force click code

* chore: testing the test for the automation

* chore: testing in the pipeline

* chore: testing with the directory

* chore: testing the pipeline test

* chore:testing the pipeline execution

* chore:testing the test in the pipeline

* chore: add the fix for the tests

* fix: add programatic screenshots

* fix: test failure fix for the pipeline

* fix: testing with another user credentials

* fix: add fix to the history tab verfication

* fix: for the time delay after the case is loaded.

* fix: trying to update the GO click issue.

* fix: tests for the History tab

* fix: tests in the pipeline

* fix: the broken Error test

* fix: added the slow to the second test

* fix: add the fixes with the soinner

* fix: commenting the spinner

* fix: added delays to the code instead of the spinner

* wip test code

* add few more delays

* re-add slow command

* Enable trace for debugging

* update locator for a button

* skip upload test as it is flaky

* add delay before submit

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>
Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* [SSCSSI-237]: Add send to judge test (#1586)

* Add send to judge test

* remove unused imports

* update send to judge test

* update send to judge tests

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* refactor: adding the hook methods to the tests. (#1597)

* refactor: adding the hook methods to the tests.

* chore: the variable for the super user defined

* chore: testing the various code changes

* chore: fixing the environment variables for secrets

* chore: remove the only keyword

* chore: add a time check for the automation tests.

* fix: testing the rebased commit

* fix: the broken CNP file

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* fix uplaod response tests (#1604)

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* re-add ccd api url

* remove clear cookies

* add delay after login

* update login function

* fix flakiness around login

* Refactor login cookies (#1605)

* fix: send to judge fixed and completed

* fix: add fix for the cookies and changed user for send to judge

* fix:add test to fix sedn to judge

* fix: add a test that is required to test the latest refactored fixes..

* fix: tests that are required for executing all the tests...

* fix: Login Case with ID

* fix: adding the clear cache flag

* fix: comment breaking test to make pipeline green

* refactor: changed the clear cache i

* refactor : remvoving unwanted logins as hmrc

* refactor:

* refactor: clean the tests to use the right login

* refactor: changed the login

* refactor: added all of the dormant api code

* fix: tests to be fixed

* fix: add delay before choosing the drop down option

* fix:change to a user that was in error in the tests.

* fix test

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>
Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* SSCSSI-327: Add Test Case Dormant Event (#1600)

* Add test for send Case to Dormant

* Revert config change

* Remove package-lock.json and yarn.lock from tracking

* Revert lock changes

* Update package.json

* Update package.json

* Add files via upload

* Revert config.ts

* Update .gitignore

* Fix historyTab locator

* Fix historyTab locator

* Fix spacing

* Fix spacing

* Fix spacing

* Add test for send Case to Dormant

* Revert config change

* Remove package-lock.json and yarn.lock from tracking

* Update package.json

* Update package.json

* Add files via upload

* Revert config.ts

* Update .gitignore

* Fix historyTab locator

* Rebase with remote

* Fix spacing

* Fix spacing

* Fix spacing

* Add test for send Case to Dormant

* Revert config change

* Remove package-lock.json and yarn.lock from tracking

* Update package.json

* Update package.json

* Add files via upload

* Revert config.ts

* Update .gitignore

* Fix historyTab locator

* Rebase with remote

* Fix spacing

* Fix spacing

* Fix spacing

* Add test for send Case to Dormant

* Revert config change

* Remove package-lock.json and yarn.lock from tracking

* Update package.json

* Update package.json

* Add files via upload

* Revert config.ts

* Update .gitignore

* Fix historyTab locator

* Fix historyTab locator

* Fix spacing

* Fix spacing

* Fix spacing

* rebase branch

* rebase branch

* Introduce delay

* Refactor tests

* Increase delay

* Update with origin

* fix: updated the code for renaming the login of the caseworker

* Remove delay

* fix:changed the user to super user as caseworker may not work for event

* Correct login

* fix: revoking the previous change for the tests to execute.

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* SSCSSI 328: Add Test Void a Case (#1602)

* Add test for send Case to Dormant

* Revert config change

* Remove package-lock.json and yarn.lock from tracking

* Revert lock changes

* Update package.json

* Update package.json

* Add files via upload

* Revert config.ts

* Update .gitignore

* Add tests for void case

* Revert local config change

* Revert local config change

* Revert local config change

* Fix history locator

* Update historytab locator

* Update historytab locator

* Comment out history validation

* Comment out history validation

* Comment out history validation

* Comment out history validation

* Comment out history validation

* Fix history tab

* Delete package-lock.json

* Remove old locator

* Refactor tests

* fix:issue with the user for the case void test.

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* SSCSSI-189: Add test for "Send to With FTA" event (#1608)

* Add test for send case to FTA

* Update login to specify user

* SSCSSI 329: Test Strike Out Case Event (#1603)

* Add test for send Case to Dormant

* Revert config change

* Remove package-lock.json and yarn.lock from tracking

* Revert lock changes

* Update package.json

* Update package.json

* Add files via upload

* Revert config.ts

* Update .gitignore

* Fix historyTab locator

* Add test for strike out event

* Add test for strike out event

* Update tests for strikeout

* Update branch with origin

* Update branch with origin

* Update branch with origin

* fix: fixed the strike out user access

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* add helper method of upload response step to be re-used for other tests (#1611)

* add helper method of upload response step to be re-used for other tests

* ignore yarn issues

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* suppress yarn warnings

* [SSCSSI-265]: Review admin action work allocation task tests (#1592)

* add work allocation tests

* update tests

* Additional changes

* Remove commented code

* update information received page methods

* Update Work Allocation tests

* Update config

* remove unused methods

* remove reference to removed file

* fix wa test

* update wa tests

* update review admin action task spec

* update review admin action task tests

* use instances from base step in information received event method

* yarn audit known issues

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* add request time extension tests (#1617)

* add request time extension tests

* move texts into json file

* suppress yarn issues

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Add Caching (#1614)

* chore: added the caching code

* feature: cache initial version implemented

* chore: refactor of the exisitng event token

* fix: broken test case-dormant in the pipeline

* fix: fixed the caching issue with the user

* chore: fix the values of the payload

* fix: getting the pipeline working for the caching method

* fix: adding interim test

* feat:add the caching to the api access layer

* fix: removed the only in the case-dormant test

* fix: npm audit fix...

* fix: test that is struggling with the caching of the tokens

* fix: adding the delete on expire flag.

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* SSCSSI 217: Appeal Withdrawn Event (#1610)

* Add test for Appeal Withdrawn event

* Update yarn-audit-known-issues

* Update verify history tab

* Navigate to history tab

* Navigate to history tab

* Navigate to history tab

* Update user

* Update user

* Remove logging

* Correct formatting

* Correct formatting

* feat: add all the api driven payload to upload a response. (#1621)

* feat: add all the api driven payload to upload a response.

* chore: enabling for all of the test and testing the API call...

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* [SI-272]: add listing error work allocation task e2e tests (#1622)

* add listing error work allocation task tests

* update comments

* update review listing error task spec file

* add delay for ready to list event completion

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* fix flaky listing error task tests (#1625)

* fix flaky listing error task tests

* yarn known issues

* update review listing error task tests

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* Add urgent hearing tests (#1626)

* Add urgent hearing tests

* suppress yarn warnings

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* [SI-262]: add review FTA response task work allocation tests (#1630)

* add review fta response task work allocation tests

* yarn known issues

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* add file upload error tests (#1628)

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* feat: add the death to appellant tests (#1631)

* feat: add the death to appellant tests

* modified to create case data before every test

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>
Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* update lock file

* install node-cache lib

* update lock file

* Sscssi 350 (#1635)

* fix: not executing the work allocation tests as not sure of the ccd defintion file

* test: proper tagging for work allocation

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* Sscssi 201 reinstatement tests (#1633)

* Add reinstatement tests

* suppress package

* revert history tab locator

* skip WA tests

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* SSCSSI-347: Add tests for Appeal Dormant event (#1629)

* Add tests for Appeal Dormant event

* Update appeal dormant

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* SSCSSI-183: Create a Bundle Test (#1632)

* Add test for Create a Bundle event

* Rename Bundles tab

* Fix spacing

* Add slow test

* Add bundle tab and page to steps

* Add bundle tab and page to steps

* Remove old func

* Update create.bundle.ts

* Cleanup code

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* SI-195 link a case event (#1619)

* Added test for Listing Error event and updating verifyPageContent method.

* Added test for Listing Error event and updating verifyPageContent method.

* Update config.ts

* Update listing-error.spec.ts

* SSCSSI-278: Evidence Reminder case tests (#1571)

* Add initial tests

* Update tests for evidence reminder

* Update tests for evidence reminder

* Update steps for evidence reminder

* Fix conflict

* Fix conflicts

* Readd URLs

* functional-test/pages/common/homePage.ts

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Added tests for Link a case event including removing link between case.

* Added tests for Link a case event including removing link between case.

---------

Co-authored-by: pats-john <13101669+pats-john@users.noreply.github.com>
Co-authored-by: Derin Aya <106395889+derin-aya@users.noreply.github.com>
Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* fix failing tests (#1643)

* fix failing tests

* fix failing link case tests

* fix failing link case tests

* fix failing tests

* fix failing link case tests

* fix failing link case tests

* exclude format-v4-audit file from sonar

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* [SSCSSI-266]: Add Review BF date work allocation task tests (#1642)

* add review bf date wa tests

* update review bf date wa test spec file

* update review bf date wa test spec file

* exclude format-v4-audit file from sonar

* fix flaky link case test

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* [SSCSSI-260]: Review incomplete appeal work allocation task tests (#1638)

* add incomplete appeal WA task tests

* update review incomplete appeal task spec

* update review incomplete task tests

* update incomplete appeal json

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* [SSCSSI-263]: add Action Unprocessed correspondence CTSC task work allocation tests (#1644)

* add Action Unprocessed correspondence wa task tests

* update spec files

* fix flaky tests

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* revert filtered tags

* Sscssi 188 (#1646)

* wip hearings upload code

* update test code

* re-add break

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* [SSCSSI-271]: Review bi-lingual document CTSC work allocation task tests (#1647)

* add review bi-lingual document wa task tests

* fix create bundle test

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* SSCSSI 199: Provide Appointee Details tests (#1640)

* Add in test scenarios for Provide Appointee Details event

* Refactor appointee details population

* Add scenarios for Provide Appointee Details

* Skip Bundle tests

* update test users

* enable create bundle tests

* add case creation to hooks

* amend test

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Sscssi 192 v2 (#1648)

* test: trying to get the issue directions notice tests working along with the main test/dev pipeline

* fix: fixed the broken build of the merge

* test: fixing the tests to run in the pipeline by increasing the workers...

* test: fixes the updated json key values in the Resinstament, Urgent hearing  and eventName to eventNameCaptor in request time extension

* fix: fixed further eventName to eventNameCaptor as the drop down was not getting selected.

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* upload phe tests (#1649)

* upload phe tests

* remove commented code

* reduce workers to 10

* reduce number of workers again

* reset worker count

* update test case login

* Amend test to solve flakiness

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Adding Update subscription scenario SI-212 (#1650)

* ucb tests (#1651)

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* [SSCSSI-279]: add Review Reinstatement Request - Judge work allocation task tests (#1652)

* add review reinstatement request task tests

* update reinstatement spec file

* fix urgent hearing request tests

* rearrange reinstatement wa tests

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* SI-208-210 update other party data scenarios (#1657)

* Adding update other party data scenario ChildSupport case

* Fixing first scenario + adding Tax Credit scenario - SI-208 covered

* Adding other party subscriptions SI-210

* addressing latest review comments

* addressing review comments + fixing tab navigation

* fix failing WA tests (#1659)

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* Sscssi 270 add review information requested (#1655)

* [SSCSSI-270]: Add Review Information Requested

* uncommented test.afterAll

* updated request info from party spec file

* rearrange the test for request info from party

---------

Co-authored-by: Nixon Thapa <nixon.thapa@solirius.com>
Co-authored-by: gokul <69240498+gokul-sol@users.noreply.github.com>

* [SSCSSI-280]: Add Review Urgent Hearing Request - Judge work allocation task tests (#1660)

* add Review Urgent Hearing request wa task tests

* update urgent hearing spec file

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* wip code (#1661)

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Sscssi 187 (#1658)

* test: write/issue final decision tests

* test: added another PIP test for the purpose of testing.

* test: add test perform the issue final decision

* test: add tags to the tests for execution

* test: added a fix to the decision page input

* test: added the retry for the tests to execute smoothly

* test: adding the tax credit - generate notice no scenario

* test: fix the ci configuration for the tests

* test:added the universal credit issue final decision test

* test: adding the send to interloc test for the purposes of automation.

* fix: removed the unwanted only and reverted the config 0

* fix: adding all the unwanted files to the test

* fix: fixed the issue directions error tests

* fix: tests for the issue order notice

* fix: test that was failing by changing the input fields....

* fix: a method was missed during the merge resolutions

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>

* SSCSSI-207 update not listable (#1662)

* Added test for Listing Error event and updating verifyPageContent method.

* Added test for Listing Error event and updating verifyPageContent method.

* Update config.ts

* Update listing-error.spec.ts

* SSCSSI-278: Evidence Reminder case tests (#1571)

* Add initial tests

* Update tests for evidence reminder

* Update tests for evidence reminder

* Update steps for evidence reminder

* Fix conflict

* Fix conflicts

* Readd URLs

* functional-test/pages/common/homePage.ts

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Adding Not listable and Update not listable case tests.

* Updating Not listable and Update not listable case test suite.

---------

Co-authored-by: pats-john <13101669+pats-john@users.noreply.github.com>
Co-authored-by: Derin Aya <106395889+derin-aya@users.noreply.github.com>
Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* SSCSSI-203 search filter scenario (#1665)

* Adding search filter scenario

* fixing test run + typos

* fixing assertion bits

* fixing casetype and tag

* Updating Not listable and Update not listable case test suite.

---------

Co-authored-by: Arunabha Chowdhury <90389022+ArunabhaChowdhury@users.noreply.github.com>

* add Review FTA Time Extension Request (#1668)

* SI-202 reissue further evidence (#1670)

* adding Reissue further evidence scenario

* adding pipeline tag

* tidying up test

* adding assertion to Update case only in history tab

* fixing vulnerabilities

* Create hearing test code (#1674)

* Create hearing test code

* cancellation test

* cancellation tests

* suppress yarn warnings

* add amend test code

* dynamically set weekdays for hearings

* update date value

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* [SSCSSI-295]: add tests for Allocate Case Roles and Create Bundle work allocation task (#1682)

* add allocate case roles and create bundle wa tasks tests

* update spec files

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* [SSCSSI-281]: add Review PHE Request work allocation task tests (#1686)

* add review PHE request wa task tests

* update review PHE wa task tests

---------

Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>

* Esa tests (#1683)

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* Tests to run on path-to-live pipeline

* update wrokers

* Enhanced confidentiality tests (#1688)

* Enhanced confidentiality tests

* Refuse confidentiality tests

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* increase workers

* reduce retry count

* test: add postponement test (#1685)

* test: add postponement test

* fix(test) : merge conflict resolved properly

* test(fix): add the correct retries to the test pack.

* test: add all the remaining postponement tests.

* revert: retry count to be reverted back to 2 from 0.

* test: testing the postponement tests in the PR pipeline

* test: adding the tests to the pipeline for the postponement tests

* test: testing the pipeline with all the tests

* fix(test) : add reload to the page for test to be fixed.

* test:fix(removing the unlink case test)

* test(fix): tagged the postponement tests

* test(fix) : add number of worker to get the tests to pass

* test:fix(add the workers for the tests to execute correctly)

* test:fix(added the verificaition code for this test)

* test(fix): reverting the retries

* test: removed an unwanted only

* fix(test): state change from Ready to List to Hearing

* test(fix) : disabling the remove link tests

* test(fix): trying to fix the submit button issue

* amend submit locator

* suppress warnings

* test(fix): fixed the submit button issue

* test(fix): reverting the changes done for local testing of the retries

---------

Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>
Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>

* suppress warnings

* Sscssi 304 referred by admin (#1695)

* add Referred by Admin

* yarn-audit-known-issues file

* update yarn file

* lean master pipeline tests

* Sscssi 303 referred by judge (#1698)

* add Referred by Judge

* yarn update

* fix flaky step

* initate trigger to run every hour for monitoring purpose

* wip preview test code

* set env variable on preview env

* update env variables

* update env variables

* set build trigger to happen between 9 to 5 tomorrow

* fix cron trigger timing

* remove auto hourly trigger

* Update test to inherit cases based on definition version

* update libraries

* suppress warnings

* fix conflicts

* Set of tests to run in preview

* reduce workers

* additional tests

* Increase delay on api callbacks

* Add conditional logic to pick hearings tests

* modify tagging format

* update tag format

* update script

* suppress warnings

* address review comments

* suppress warnings

* Update conditional logic for preview env

* Update README.md

Notes added on pre-set up needed to run UI tests against preview environment using Jenkins pipeline

* update test to pick preview def

* suppress warnings

* Fix date issue

* suppress warnings

* comment out dormant set up

* ignore event move via api

* amend due date logic for other tabs

* move grant confidentiality test to hearings-enabled flag group

* comment out Other party parties

* modify test steps for issue direction

* suppress warnings

* suppress more warnings

* suppress warnings

* increase click action timer

* remove master pipeline tags from tests to not run in PTL

* suppress warnings

* amend sign out method

* amend signout on upload page

* suppress warnings

* add delay for sign out clicks

* add timeout in upload page steps

* disable grant enhancement tests

* update test data

* improve element visibility

* remove additional visibility check

* remove tag

* remove hearing upload

* revert sigout locator

* re-enable upload hearing

* filter tests

---------

Co-authored-by: gokul-sol <gokul.sridharan@HMCTS.NET>
Co-authored-by: Pettedson John <pettedson.john1@hmcts.net>
Co-authored-by: pavihmcts <110388263+pavihmcts@users.noreply.github.com>
Co-authored-by: Pavi <pva08@Pavithrans-MacBook-Pro.local>
Co-authored-by: Derin Aya <106395889+derin-aya@users.noreply.github.com>
Co-authored-by: Praveen Adusumilli <47391951+adusumillipraveen@users.noreply.github.com>
Co-authored-by: Arunabha Chowdhury <90389022+ArunabhaChowdhury@users.noreply.github.com>
Co-authored-by: pats-john <13101669+pats-john@users.noreply.github.com>
Co-authored-by: markbrooks725 <107925801+markbrooks725@users.noreply.github.com>
Co-authored-by: lucianotmarsilio <107107435+lucianotmarsilio@users.noreply.github.com>
Co-authored-by: nixonthapa <nixon.thapa2@hmcts.net>
Co-authored-by: Nixon Thapa <nixon.thapa@solirius.com>
  • Loading branch information
13 people committed Sep 12, 2024
1 parent fbf759b commit 353fc6d
Show file tree
Hide file tree
Showing 62 changed files with 2,443 additions and 1,306 deletions.
51 changes: 37 additions & 14 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!groovy
properties([
parameters([
string(name: 'URL_TO_TEST', defaultValue: 'https://manage-case.aat.platform.hmcts.net/list/case?jurisdiction=sscs', description: 'The URL you want to run these tests against'),
string(name: 'URL_TO_TEST', defaultValue: '', description: 'The URL you want to run these tests against'),
string(name: 'TRIBUNALS_API_URI', defaultValue: '', description: 'The API service to create test data'),
string(name: 'CCD_GATEWAY_URL', defaultValue: 'https://gateway-ccd.aat.platform.hmcts.net', description: 'The CCD Gateway URL these tests will need to run'),
string(name: 'TRIBUNALS_API_URI', defaultValue: 'http://sscs-tribunals-api-aat.service.core-compute-aat.internal', description: 'The API service to create test data'),
string(name: 'NUM_TESTS_IN_PARALLEL', defaultValue: '50', description: 'The number of tests to run in parallel'),
string(name: 'NIGHTLY_TAG', defaultValue: '--cucumberOpts.tags=@nightly-test', description: 'Tag for nightly build'),
string(name: 'PREVIEW_TAG', defaultValue: '--cucumberOpts.tags=@preview-test', description: 'Tag for preview build')
choice(name: 'HEARINGS_LABEL_ENABLED', choices: ['No', 'Yes'])
])
])

Expand Down Expand Up @@ -75,6 +73,10 @@ withPipeline("nodejs", product, component) {
env.IDAM_URL='https://idam-api.aat.platform.hmcts.net'
env.S2S_URL='http://rpe-service-auth-provider-aat.service.core-compute-aat.internal'
env.IDAM_OAUTH2_CLIENT_ID='sscs'
env.TEST_E2E_URL_WEB = params.URL_TO_TEST
env.TEST_E2E_URL_GATEWAY = params.CCD_GATEWAY_URL
env.TEST_E2E_API_URI = params.TRIBUNALS_API_URI
env.HEARINGS_ENABLED = params.HEARINGS_LABEL_ENABLED
}

onDemo {
Expand All @@ -86,27 +88,48 @@ withPipeline("nodejs", product, component) {
env.IDAM_OAUTH2_CLIENT_ID='sscs'
}

afterSuccess('smoketest:preview') {
env.TEST_E2E_URL_WEB = params.URL_TO_TEST
env.TEST_E2E_URL_GATEWAY = params.CCD_GATEWAY_URL
env.TEST_E2E_API_URI = params.TRIBUNALS_API_URI
}

onMaster{
onMaster{
// only enable high level data setup on master builds, SSCS-12483
enableHighLevelDataSetup()
env.IDAM_OAUTH2_CLIENT_ID='sscs'
env.ENVIRONMENT="aat"
env.TEST_E2E_URL_WEB = 'https://manage-case.aat.platform.hmcts.net'
env.TEST_E2E_API_URI = 'http://sscs-tribunals-api-aat.service.core-compute-aat.internal'
env.TEST_E2E_URL_GATEWAY = params.CCD_GATEWAY_URL

}

afterSuccess('smoketest:aat') {
afterSuccess('smoketest:preview') {
env.TEST_E2E_URL_WEB = params.URL_TO_TEST
env.TEST_E2E_URL_GATEWAY = params.CCD_GATEWAY_URL
env.TEST_E2E_API_URI = params.TRIBUNALS_API_URI

stage('Playwright tests') {
try{
yarnBuilder.yarn('test:jenkins')
if(params.HEARINGS_LABEL_ENABLED == 'No'){
yarnBuilder.yarn('test:preview')
} else {
yarnBuilder.yarn('test:preview-hearings')
}
} finally {
publishHTML([
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: "playwright-report",
reportFiles: 'index.html',
reportName: 'SSCS E2E Test Report'
])
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'playwright-report/**/*'
}
}
}

afterSuccess('smoketest:aat') {

stage('Playwright tests') {
try{
yarnBuilder.yarn('test:aat')
} finally {
publishHTML([
allowMissing: true,
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,16 @@ Filename structure is as follows: [major version].[minor version].[minor fix]_[e

## QA process

- Test the AAT version locally to make sure it doesn't break and change works as expected
- If the change on Prod is different (e.g. if there is a <tab-name>-<feature_name>-prod.json> change), then also test the Prod version locally

After PO sign off:
- Upload AAT version onto AAT
- Run Tribunals pipeline to ensure no failures
- Run E2E test pipeline to ensure no failures

If all ok, create a ticket to get definition uploaded to Prod

*Note*: CRUD access can be changed in a future version to allow new features to be used, once all code is in-place

### Running Functional UI tests against Preview env on a Pipeline
* If a PR is created with following label - "pr-values:ccd" then set the below environment values on your Preview pipeline by clicking on "Build parameters" and trigger the build :-
- URL_TO_TEST = 'https://xui-sscs-tribunals-api-pr-(PR-NO).preview.platform.hmcts.net'
- TRIBUNALS_API_URI = 'https://sscs-tribunals-api-pr-(PR-NO).preview.platform.hmcts.net'
- HEARINGS_LABEL_ENABLED = 'No'

* If a PR is created with following label - "pr-values:ccd", "enable_hearings" then set the below environment values on your Preview pipeline by clicking on "Build parameters" and trigger the build :-
- URL_TO_TEST = 'https://xui-sscs-tribunals-api-pr-(PR-NO).preview.platform.hmcts.net'
- TRIBUNALS_API_URI = 'https://sscs-tribunals-api-pr-(PR-NO).preview.platform.hmcts.net'
- HEARINGS_LABEL_ENABLED = 'Yes'

## Load a CCD definition to your local environment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"firstName": "Test",
"lastName": "Appellant",
"dob": "26-02-1976",
"nino": "AB703352B",
"nino": "SK703352C",
"contactDetails": {
"addressLine1": "123 Hairy Lane",
"addressLine2": "Off Hairy Park",
Expand Down
23 changes: 21 additions & 2 deletions functional-test/common/web.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,21 @@ export class WebAction {
});
}

async clickApplyFilterButton(): Promise<void> {
await this.page.waitForLoadState('domcontentloaded');
await this.page
.locator("//button[@title='Apply filter']")
.click()
.catch((error) => {
logger.error(`Button element is not present: ${error}`);
});
}

async clickButton(elementLocator: string): Promise<void> {
await this.page.waitForLoadState('domcontentloaded');
await this.page.getByRole('button', { name: elementLocator}).waitFor();
await this.page.getByRole('button', { name: elementLocator}).waitFor();
await this.page
.getByRole('button', { name: elementLocator})
.getByRole('button', { name: elementLocator, exact : true})
.click({force: true})
.catch((error) => {
logger.error(`Button element is not present: ${error}`);
Expand Down Expand Up @@ -150,6 +160,15 @@ export class WebAction {
});
}

async clickElementWithForce(elementLocator: string): Promise<void> {
await this.page
.locator(elementLocator)
.click({force: true})
.catch((error) => {
logger.error(`Radio button element is not present: ${error}`);
});
}

async clickLink(elementLocator: string): Promise<void> {
await this.page
.getByRole('link', { name: elementLocator})
Expand Down
12 changes: 10 additions & 2 deletions functional-test/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import path from "path";
const fs = require('fs');
const yaml = require('js-yaml');

export const urls = {

tribunalsApiUri: process.env.TRIBUNALS_API_URL || "http://sscs-tribunals-api-aat.service.core-compute-aat.internal",
xuiUrl: process.env.SSCS_XUI_URL || 'https://manage-case.aat.platform.hmcts.net',
tribunalsApiUri: process.env.TEST_E2E_API_URI || '',
xuiUrl: process.env.TEST_E2E_URL_WEB || '',
idamUrl : process.env.IDAM_URL || 'https://idam-api.aat.platform.hmcts.net',
s2sUrl : process.env.S2S_URL || 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal',
ccdApiUrl : process.env.CCD_API_URL || 'http://ccd-data-store-api-aat.service.core-compute-aat.internal'
};

export const environment = {
name: process.env.ENVIRONMENT ?? '',
hearingsEnabled: process.env.HEARINGS_ENABLED,
aatDefVersion: yaml.load(fs.readFileSync('./benefit/VERSION.yaml', 'utf8'))
}

export const credentials = {
caseWorker: {
email: process.env.TEST_CASEOFFICER_USERNAME,
Expand Down
2 changes: 1 addition & 1 deletion functional-test/e2e/confirm-case-lapsed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let caseId : string;
test.beforeAll("Case has to be Created",async () => {
caseId = await createCaseBasedOnCaseType('CHILDSUPPORT');
});
test("Test that the Case can be lapsed", {tag: '@pipeline'}, async ({ confirmCaseLapsedSteps }) => {
test("Test that the Case can be lapsed", async ({ confirmCaseLapsedSteps }) => {
await confirmCaseLapsedSteps.performConfirmCaseLapsed(caseId);
});

Expand Down
2 changes: 1 addition & 1 deletion functional-test/e2e/create-a-bundle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.beforeAll("Case has to be Created", async () => {
caseId = await createCaseBasedOnCaseType('PIP');
});

test("As a caseworker create a bundle", {tag: '@master-pipeline'}, async ({createBundleSteps}) => {
test("As a caseworker create a bundle", {tag: ['@hearings-enabled-test', '@master-pipeline']}, async ({createBundleSteps}) => {
test.slow();
await createBundleSteps.performUploadBundleResponse(caseId);
});
37 changes: 37 additions & 0 deletions functional-test/e2e/enhanced-confidentiality.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { test } from "../lib/steps.factory";
import createCaseBasedOnCaseType from "../api/client/sscs/factory/appeal.type.factory";
import performAppealDormantOnCase from "../api/client/sscs/appeal.event";

let caseId : string;


test.describe("Enhanced confidentiality test", async() => {

test.beforeEach("Case has to be Created", async () => {
caseId = await createCaseBasedOnCaseType('UC');
test.setTimeout(360000);
});

test("Grant - Confidentiality request & verify bundle with redacted file", async ({ uploadResponseSteps, enhancedConfidentialitySteps, createBundleSteps }) => {
await uploadResponseSteps.performUploadResponseOnAUniversalCreditWithJP(caseId);
await enhancedConfidentialitySteps.requestForConfidentiality();
await enhancedConfidentialitySteps.grantConfidentialityForAppellant(caseId);
await enhancedConfidentialitySteps.verifyConfidentialityFlag();
await enhancedConfidentialitySteps.uploadSupplementaryCorrespondence(caseId);
await enhancedConfidentialitySteps.requestForEvidenceConfidentiality();
await enhancedConfidentialitySteps.verifyRedactedContent();
await createBundleSteps.triggerBundleForConfidentialCase();
});

test("Refuse - confidentiality request for a party on a case", {tag: '@preview-pipeline'}, async({ uploadResponseSteps, enhancedConfidentialitySteps }) => {
await uploadResponseSteps.performUploadResponseOnAUniversalCreditWithJP(caseId);
await enhancedConfidentialitySteps.requestForConfidentiality();
await enhancedConfidentialitySteps.requestConfidentialityForJP();
await enhancedConfidentialitySteps.verifyTotalRequest();
await enhancedConfidentialitySteps.confidentialityDecisionForParties(caseId);
await enhancedConfidentialitySteps.verifyConfidentialityFlagForMultipleParties();
});


});

2 changes: 1 addition & 1 deletion functional-test/e2e/hearing-request.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let caseId : string;

test.describe("Create a new hearing for an List assist case", {tag: '@pipeline'}, async() => {

test("Trigger a new hearing & cancellation for DLA case", async ({ uploadResponseSteps, hearingSteps }) => {
test("Trigger a new hearing & cancellation for DLA case", {tag:'@hearings-enabled-test'}, async ({ uploadResponseSteps, hearingSteps }) => {
caseId = await createCaseBasedOnCaseType('DLASANDL');
await uploadResponseSteps.performUploadResponse(caseId, 'dla');
await hearingSteps.verifyHearingIsTriggered(caseId, 'dla');
Expand Down
7 changes: 5 additions & 2 deletions functional-test/e2e/issue-directions-notice.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ import performAppealDormantOnCase from "../api/client/sscs/appeal.event";

let caseId: string;

test.describe("Issue direction test", {tag: '@pipeline'}, async() => {
test.describe("Issue direction test", async() => {

test("Issue Direction Notice - Pre Hearing - Normal Tax Credit Application - Appeal to Proceed",
test("Issue Direction Notice - Pre Hearing - Normal Tax Credit Application - Appeal to Proceed",
{tag: '@preview-pipeline'},
async ({issueDirectionsNoticeSteps}) => {
test.slow();
await issueDirectionsNoticeSteps.performIssueDirectionNoticePreHearingAppealToProceed();
});

test("Issue Direction Notice - Post Hearing - Employment Support Application - Provide Information",
{tag: '@preview-pipeline'},
async ({issueDirectionsNoticeSteps}) => {
test.slow();
await issueDirectionsNoticeSteps.performIssueDirectionNoticePostHearingESAAppealToProceed();
Expand All @@ -25,6 +27,7 @@ test.describe("Issue direction test", {tag: '@pipeline'}, async() => {
});

test("Issue Direction Notice - Error Messages Test",
{tag: '@preview-pipeline'},
async ({issueDirectionsNoticeSteps}) => {
test.slow();
await issueDirectionsNoticeSteps.performIssueDirectionErrorMessages();
Expand Down
14 changes: 6 additions & 8 deletions functional-test/e2e/link-case.spec.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import {test} from "../lib/steps.factory";

test.describe('Link a case tests', {tag: '@pipeline'}, () => {
test.describe('Link a case tests', () => {


// Happy Path test:
test("As a caseworker link a case to another case", async ({linkACaseSteps}) => {
test("As a caseworker link a case to another case", {tag: '@pipeline'},async ({linkACaseSteps}) => {
await linkACaseSteps.linkCaseSuccessfully();
})

// Test for error message that comes with linking invalid case:
test("As a caseworker I should not be able link a case to a non-existent case", async ({linkACaseSteps}) => {
test("As a caseworker I should not be able link a case to a non-existent case",{tag: '@pipeline'}, async ({linkACaseSteps}) => {
await linkACaseSteps.linkNonExistingCase();
})

// Test for error message that comes with linking a case to itself
test("As a caseworker I should not be able to link a case to itself", async ({linkACaseSteps}) => {
test("As a caseworker I should not be able to link a case to itself",{tag: '@pipeline'}, async ({linkACaseSteps}) => {
await linkACaseSteps.linkCaseToItself();
})

// Test for removing link between cases after link a case has linked them together.
test("As a caseworker I should be able to unlink cases", async ({linkACaseSteps}) => {
test("As a caseworker I should be able to unlink cases",{tag: '@todo - as remove button is not working'}, async ({linkACaseSteps}) => {
await linkACaseSteps.removeLinkedCase();
})


})
})
25 changes: 25 additions & 0 deletions functional-test/e2e/postponement.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { test } from "../lib/steps.factory";
import createCaseBasedOnCaseType from "../api/client/sscs/factory/appeal.type.factory";
import performAppealDormantOnCase from "../api/client/sscs/appeal.event";

let caseId : string;


test.describe("Postponement Request test", {tag: '@preview-pipeline'}, async() => {

test("Hearing Route as LA with a Grant Option", async ({ postponementSteps }) => {
test.slow();
await postponementSteps.postponeAListAssistCaseWithAPostponement('Grant Postponement');
});

test("Hearing Route as LA with a Refuse Option", async ({ postponementSteps }) => {
test.slow();
await postponementSteps.postponeAListAssistCaseWithAPostponement('Refuse Postponement');
});

test("Hearing Route as LA with a Send to Judge Option", async ({ postponementSteps }) => {
test.slow();
await postponementSteps.postponeAListAssistCaseWithAPostponement('Send to Judge');
});
});

Loading

0 comments on commit 353fc6d

Please sign in to comment.