diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..00a51aff --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..cf2d65db --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @hmcts/platform-operations diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..d6f03e13 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,40 @@ +# Contribution guidelines + +We're happy to accept 3rd-party contributions. Please make sure you read this document before you do any work though, +as we have some expectations related to the content and quality of change sets. + +## What you should know about this application + +This project is a template Spring Boot application. It aims to speed up the creation of new Spring APIs in HMCTS +projects, by serving as the initial setup of each API. + +## Before contributing + +Any ideas on the user journeys and general service experience you may have **should be first consulted +with us by submitting a new issue** to this repository. Ideas are always welcome, but if something is divergent or unrelated +to what we're trying to achieve we won't be able to accept it. Please keep this in mind as we don't want to waste anybody's time. + +In the interest of creating a friendly collaboration environment, please read and adhere to an open source contributor's +[code of conduct](http://contributor-covenant.org/version/1/4/). + +## Making a contribution + +After your idea has been accepted you can implement it. We don't allow direct changes to the codebase from the public, +they have to go through a review first. + +Here's what you should do: +1. [fork](https://help.github.com/articles/fork-a-repo/) this repository and clone it to your machine, +2. create a new branch for your change: + * use the latest *master* to branch from, +3. implement the change in your branch: + * if the change is non-trivial it's a good practice to split it into several logically independent units and deliver + each one as a separate commit, + * make sure the commit messages use proper language and accurately describe commit's content, e.g. *"Unify postcode lookup elements spacing"*. + More information on good commit messages can be found [here](http://chris.beams.io/posts/git-commit/), +4. test if your feature works as expected and does not break any existing features, this may include implementing additional automated tests or amending existing ones, +5. push the change to your GitHub fork, +6. submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) to our repository: + * ensure that the pull request and related GitHub issue reference each other. + +At this point the pull request will wait for someone from our team to review. It may be accepted straight away, +or we may ask you to make some additional amendments before incorporating it into the main branch. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..d1f90693 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,5 @@ +### What would you like to change? + +### How do you think that would improve the project? + +### If this entry is related to a bug, please provide the steps to reproduce it diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..dfadfd11 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,23 @@ +**Before creating a pull request make sure that:** + +- [ ] commit messages are meaningful and follow good commit message guidelines +- [ ] README and other documentation has been updated / added (if needed) +- [ ] tests have been updated / new tests has been added (if needed) + +Please remove this line and everything above and fill the following sections: + + +### JIRA link (if applicable) ### + + + +### Change description ### + + + +**Does this PR introduce a breaking change?** (check one with "x") + +``` +[ ] Yes +[ ] No +``` diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..7821063f --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>hmcts/.github:renovate-config", + "local>hmcts/.github//renovate/automerge-minor" + ] +} diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..e819f219 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,18 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 7 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 4 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - dependencies +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: > + This issue is being closed automatically as it was stale diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..f4523ded --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,80 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + - cron: '36 5 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' # See 'Supported distributions' for available options + java-version: '17' + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..c7ff8339 --- /dev/null +++ b/.gitignore @@ -0,0 +1,52 @@ +# Compiled class file +*.class + +# Log file +*.log* + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar +*.bak + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* + +# Ignore Gradle project-specific cache directory +.gradle +.gradle/* + +# Ignore Gradle build output directory +build +bin/* + +#Ignore results +target/* +reports/* + +### IntelliJ IDEA ### +.idea +/out +*.iws +*.iml +*.ipr + +### Eclipse ### +.settings +.project +.classpath + +# Ignore test only logging +src/test/resources/log4j2-test.properties diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP new file mode 100755 index 00000000..09bf852a --- /dev/null +++ b/Jenkinsfile_CNP @@ -0,0 +1,87 @@ +#!groovy +properties([ + parameters([ + choice(choices: ['chrome', 'firefox', 'msedge'], name: 'Browser'), + choice(choices: ['stg', 'test', 'demo', 'ithc'], name: 'EnvironmentChoice') + ]) +]) + +@Library("Infrastructure") + +import uk.gov.hmcts.contino.GradleBuilder + +def type = "java" +def product = "juror" +def component = "automation-tests" + +def secrets = [ + 'juror-stg': [ + secret('api-POSTGRES-USER', 'DATABASE_STG_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_STG_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], + 'juror-test': [ + secret('api-POSTGRES-USER', 'DATABASE_TEST_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_TEST_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], + 'juror-demo': [ + secret('api-POSTGRES-USER', 'DATABASE_DEMO_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_DEMO_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], + 'juror-ithc': [ + secret('api-POSTGRES-USER', 'DATABASE_ITHC_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_ITHC_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], +] + +static LinkedHashMap secret(String secretName, String envVar) { + [$class : 'AzureKeyVaultSecret', + secretType : 'Secret', + name : secretName, + version : '', + envVariable: envVar + ] +} + +GradleBuilder builder = new GradleBuilder(this, product) + +withNightlyPipeline(type, product, component) { + loadVaultSecrets(secrets) + enableFullFunctionalTest() + enableSlackNotifications('#juror-builds') + + env.envName = params.EnvironmentChoice + env.envDriver = params.Browser + + after('functionalTest') { + steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/tests/**/*.html' + steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/cucumber.json' + } +} diff --git a/Jenkinsfile_nightly b/Jenkinsfile_nightly new file mode 100644 index 00000000..27fcf8d0 --- /dev/null +++ b/Jenkinsfile_nightly @@ -0,0 +1,89 @@ +#!groovy +properties([ + // H allow predefined but random minute see https://en.wikipedia.org/wiki/Cron#Non-standard_characters + pipelineTriggers([cron('H 08 * * 1-5')]), + parameters([ + choice(choices: ['chrome', 'firefox', 'msedge'], name: 'Browser'), + choice(choices: ['stg', 'test', 'demo', 'ithc'], name: 'EnvironmentChoice') + ]) +]) + +@Library("Infrastructure") + +import uk.gov.hmcts.contino.GradleBuilder + +def type = "java" +def product = "juror" +def component = "automation-tests" + +def secrets = [ + 'juror-stg': [ + secret('api-POSTGRES-USER', 'DATABASE_STG_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_STG_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], + 'juror-test': [ + secret('api-POSTGRES-USER', 'DATABASE_TEST_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_TEST_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], + 'juror-demo': [ + secret('api-POSTGRES-USER', 'DATABASE_DEMO_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_DEMO_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], + 'juror-ithc': [ + secret('api-POSTGRES-USER', 'DATABASE_ITHC_USERNAME'), + secret('api-POSTGRES-PASS', 'DATABASE_ITHC_PASSWORD'), + secret('automation-tests-modtestbureau', 'MODTESTBUREAU_PASSWORD'), + secret('automation-tests-modtestcourt', 'MODTESTCOURT_PASSWORD'), + secret('automation-tests-system', 'SYSTEM_PASSWORD'), + secret('automation-tests-sjouser', 'SJOUSER_PASSWORD'), + secret('automation-tests-sjouser1', 'SJOUSER1_PASSWORD'), + secret('automation-tests-aramis1', 'ARAMIS1_PASSWORD'), + secret('automation-tests-cpass', 'CPASS_PASSWORD'), + ], +] + +static LinkedHashMap secret(String secretName, String envVar) { + [$class : 'AzureKeyVaultSecret', + secretType : 'Secret', + name : secretName, + version : '', + envVariable: envVar + ] +} + +GradleBuilder builder = new GradleBuilder(this, product) + +withNightlyPipeline(type, product, component) { + loadVaultSecrets(secrets) + enableFullFunctionalTest() + enableSlackNotifications('#juror-builds') + + env.envName = params.EnvironmentChoice + env.envDriver = params.Browser + + after('functionalTest') { + steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/tests/**/*.html' + steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/cucumber.json' + } +} diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..99d5d9b0 --- /dev/null +++ b/build.gradle @@ -0,0 +1,267 @@ +plugins { + id 'java-library' + id 'org.owasp.dependencycheck' version '9.0.9' + id 'jacoco' + id 'idea' + id 'eclipse' + id 'application' +} + +group = 'uk.gov.hmcts' +version = '0.0.1' + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + +tasks.withType(JavaCompile) { + options.compilerArgs << "-Xlint:unchecked" << "-Werror" +} + +// https://github.com/gradle/gradle/issues/16791 +tasks.withType(JavaExec).configureEach { + javaLauncher.set(javaToolchains.launcherFor(java.toolchain)) +} + +repositories { + mavenLocal() + mavenCentral() + maven { url 'https://jitpack.io' } +} + +dependencies { + implementation 'log4j:log4j:1.2.17' + implementation 'org.slf4j:slf4j-api:1.7.5' + implementation 'org.slf4j:slf4j-log4j12:1.7.5' + + implementation 'org.seleniumhq.selenium:selenium-java:4.13.0' + + testImplementation 'io.github.prashant-ramcharan:courgette-jvm:6.10.0' + + implementation 'org.apache.httpcomponents:httpclient:4.5.14' + implementation 'org.apache.httpcomponents:httpcore:4.4.16' + + testImplementation 'io.cucumber:cucumber-picocontainer:7.14.0' + + implementation 'io.cucumber:cucumber-junit:7.14.0' + + testImplementation 'io.cucumber:cucumber-jvm-deps:1.0.6' + + testImplementation 'io.cucumber:cucumber-core:7.14.0' + + testImplementation 'io.cucumber:cucumber-java:7.14.0' + implementation 'org.hamcrest:hamcrest-core:2.2' + + implementation group: 'commons-io', name: 'commons-io', version: '1.3.+' + implementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0' + + implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.+' + implementation group: 'net.sf.opencsv', name: 'opencsv', version: '2.+' + + implementation group: 'com.codeborne', name: 'phantomjsdriver', version: '1.2.1' + + implementation group: 'org.apache.chemistry.opencmis', name: 'chemistry-opencmis-client-impl', version: '1.1.+' + + implementation group: 'org.postgresql', name: 'postgresql', version: '42.6.0' + + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1' +} + +// task features(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")){ +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")){ +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_Features.class' + +// outputs.upToDateWhen { false } +// } + +// task regression(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")){ +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")){ +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_Regression.class' + +// outputs.upToDateWhen { false } +// } + +// task smoketest(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")){ +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")){ +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_SmokeTest.class' + +// outputs.upToDateWhen { false } +// } + +// task dryRunner(type: Test, dependsOn: testClasses) { + +// include '**/TestRunner_ALL_DryRun.class' + +// outputs.upToDateWhen { false } +// } + +// task sampleTestRunner(type: Test, dependsOn: testClasses) { + +// include '**/aSampleTestRunner.class' + +// outputs.upToDateWhen { false } +// } + +// task expenses(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")){ +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")){ +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_Expenses.class' + +// outputs.upToDateWhen { false } +// } + +// task regressionsingle(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")){ +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")){ +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_RegressionSingle.class' + +// outputs.upToDateWhen { false } +// } + +// task shakedown(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")){ +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")){ +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_Shakedown.class' + +// outputs.upToDateWhen { false } +// } + +// task regressionwelsh(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")) { +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")) { +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_RegressionWelsh.class' + +// outputs.upToDateWhen { false } + +// task jurortransformation(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")) { +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")) { +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_JurorTransformation.class' + +// outputs.upToDateWhen { false } +// } + +// task jurortransformationmulti(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")) { +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")) { +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_JurorTransformationMulti.class' + +// outputs.upToDateWhen { false } +// } + +// task jurortransformationwip(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")) { +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")) { +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_JurorTransformationWIP.class' + +// outputs.upToDateWhen { false } +// } + +// task newschemaconverted(type: Test, dependsOn: testClasses) { +// if (project.hasProperty("envName")) { +// println "Received Environment Variable =>" + envName +// systemProperty "envName", project.getProperty("envName") +// } + +// if (project.hasProperty("envDriver")) { +// println "Received Driver Variable =>" + envDriver +// systemProperty "envDriver", project.getProperty("envDriver") +// } + +// include '**/TestRunner_NewSchemaConverted.class' + +// outputs.upToDateWhen { false } +// } +// } +task functional(type: Test, dependsOn: testClasses) { + systemProperty "envName", System.getenv("envName") + systemProperty "envDriver", System.getenv("envDriver") + include '**/TestRunner_SmokeTest.class' + include '**/TestRunner_Shakedown.class' + outputs.upToDateWhen { false } +} diff --git a/charts/juror-automation-tests/.gitkeep b/charts/juror-automation-tests/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/config/owasp/suppressions.xml b/config/owasp/suppressions.xml new file mode 100644 index 00000000..6a8f4b3a --- /dev/null +++ b/config/owasp/suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..1af9e093 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 00000000..1aa94a42 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..93e3f59f --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/readme.md b/readme.md new file mode 100644 index 00000000..61376652 --- /dev/null +++ b/readme.md @@ -0,0 +1,3 @@ +# juror-automation-tools +Automated test framework for Juror + diff --git a/src/main/java/cucumber/pageObjects/Accessibility.java b/src/main/java/cucumber/pageObjects/Accessibility.java new file mode 100644 index 00000000..6738f69d --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Accessibility.java @@ -0,0 +1,68 @@ +package cucumber.pageObjects; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.openqa.selenium.Alert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class Accessibility { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Accessibility.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public Accessibility(WebDriver driver) { + Accessibility.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + + + public void altTextCheck() { + log.info("Going to check whether there are any links with _blank (Which opens a new page) that do not have either a Welsh or English alt text"); + wait.deactivateImplicitWait(); + List invalid_elements = driver.findElements(By.xpath( + "//*[@target='_blank' and not(@alt='Opens in a new window' or @alt='Agor mewn ffenestr newydd')]" + )); + assertEquals(0,invalid_elements.size()); + log.info("Didn't see any links that open to a new page without a Welsh/English alt text"); + } + + + + public void pageLanguageCheck(String expectedLang) { + log.info("Going to confirm whether the html lang value is correctly showing as =>"+expectedLang); + + driver.findElement(By.xpath("//html[@lang='"+expectedLang+"']")); + log.info("Page Language is =>"+expectedLang+"<= as expected"); + } + + + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/ActivePools.java b/src/main/java/cucumber/pageObjects/ActivePools.java new file mode 100644 index 00000000..8dce694e --- /dev/null +++ b/src/main/java/cucumber/pageObjects/ActivePools.java @@ -0,0 +1,99 @@ +package cucumber.pageObjects; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class ActivePools { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(ActivePools.class); + private final NavigationShared NAV; + + @FindBy(xpath = "//input[@type='radio']") + WebElement firstPoolNoInList; + + @FindBy(xpath = "/html/body/div[2]/main/div/div/form/table") + WebElement randomActivePool; + + @FindBy(id = "check-all-jurors") + WebElement poolOverviewSelectAll; + + @FindBy(id = "selectAllCheckbox") + WebElement bureauPoolOverviewSelectAll; + + public ActivePools(WebDriver driver) { + ActivePools.driver = driver; + PageFactory.initElements(driver, this); + NAV = new NavigationShared(driver); + } + + public List getTableHeaders() { + List headers = new ArrayList<>(); + List elements = driver.findElements(By.xpath("//th")); + + elements.forEach(element -> headers.add(element.getText())); + return headers; + } + + public List getCourtNames() { + List names = new ArrayList<>(); + List elements = driver.findElements(By.xpath("//tbody/tr/td[4]")); + + elements.forEach(element -> names.add(element.getText())); + return names; + } + + public void selectFirstPoolNoInList() { + log.info("Clicked first pool number in list"); + firstPoolNoInList.click(); + + } + + public void checkSelectAllCheckbox() { + log.info("Clicked select all checkbox"); + poolOverviewSelectAll.click(); + } + + public void checkSelectAllCheckboxOnPoolOverview() { + log.info("Clicked select all checkbox on pool overview"); + poolOverviewSelectAll.click(); + } + public void bureauCheckSelectAllCheckboxOnPoolOverview() { + log.info("Clicked select all checkbox on pool overview"); + bureauPoolOverviewSelectAll.click(); + + } + public void selectAnyActivePool() { + String activePoolsTable = "/html/body/div[2]/main/div/div/form/table"; + List rows = driver.findElements(By.xpath(activePoolsTable + "/tbody/tr")); + + Random random = new Random(); + int randomRowIndex = random.nextInt(rows.size()); + List radioButtons = rows.get(randomRowIndex).findElements(By.xpath(".//input[@type='radio' and @name='poolNumber']")); + int randomActivePool = random.nextInt(radioButtons.size()); + radioButtons.get(randomActivePool).click(); + log.info("Random active pool found and clicked"); + } + public boolean seeJurorsInCannotBeMovedTable(String jurorNumber) { + String jurorsCannotBeMovedTable = "//*[@id=\"deferralForm\"]/div[2]/div/div/table"; + List rows = driver.findElements(By.xpath(jurorsCannotBeMovedTable + "/tbody/tr")); + + for (WebElement row : rows) { + List cells = row.findElements(By.tagName("td")); + for (WebElement cell : cells) { + if (cell.getText().contains(jurorNumber)) { + return true; + } + } + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/AdditionalSummons.java b/src/main/java/cucumber/pageObjects/AdditionalSummons.java new file mode 100644 index 00000000..87648933 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/AdditionalSummons.java @@ -0,0 +1,130 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AdditionalSummons { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + public AdditionalSummons(WebDriver driver) { + AdditionalSummons.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(className = "govuk-caption-l") + WebElement poolNumber; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/form/p[1]") + WebElement jurorsRequested; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/form/p[2]") + WebElement jurorsConfirmed; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/form/p[3]") + WebElement jurorsRequired; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/form/p[4]") + WebElement citizensSummoned; + + @FindBy(xpath = "//*[@id=\"catchmentArea\"]/div/dd[1]") + WebElement catchmentArea; + + @FindBy(id = "citizensToSummon") + WebElement extraCitizensToSummon; + + @FindBy(xpath = "//*[@class='govuk-error-summary']") + WebElement respondedError; + + @FindBy(xpath = "//*[@class='govuk-error-summary']/div/ul/li/a") + WebElement respondedErrorText; + + @FindBy(xpath = "//*[@id=\"catchmentArea\"]/div/dd[2]/a") + WebElement changeCatchmentAreaLink; + + @FindBy(id = "postcodes") + WebElement postcodes; + + public String getPoolNumber(){ + log.info("Getting pool number"); + // Remove "Pool Number " from string + String poolNo = poolNumber.getText().substring(5); + return poolNo; + } + + public String getJurorsRequested(){ + log.info("Getting jurors requested"); + // Remove "Jurors Requested \n " from string + return jurorsRequested.getText().substring(17); + } + + public String getJurorsConfirmed(){ + log.info("Getting jurors confirmed"); + // Remove "Jurors confirmed \n " from string + return jurorsConfirmed.getText().substring(17); + } + + public String getJurorsRequired(){ + log.info("Getting jurors required to complete the request"); + // Remove "jurors required to complete the request \n " from string + return jurorsRequired.getText().substring(40); + } + + public String getCitizensSummoned(){ + log.info("Getting citizens summoned"); + // Remove "Citizens summoned \n " from string + return citizensSummoned.getText().substring(18); + } + + public String getCatchmentArea(){ + log.info("Getting catchment area"); + return catchmentArea.getText(); + } + + public void setExtraCitizensToSummon(String noCitizens){ + log.info("Setting extra citizens to summon to " + noCitizens); + extraCitizensToSummon.sendKeys(noCitizens); + } + + public boolean errorIsPresent() { + return respondedError.isDisplayed(); + } + + public String getErrorText() { + return respondedErrorText.getText(); + } + + public void clickChangeCatchmentAreaLink(){ + log.info("Clicking change catchment area link"); + changeCatchmentAreaLink.click(); + } + + public void clickAllPostcodeCheckboxes(){ + List checkboxes = postcodes.findElements(By.tagName("input")); + for(int i = 0; i < checkboxes.size(); i++){ + WebElement checkbox = checkboxes.get(i); + checkbox.click(); + } + } + +} diff --git a/src/main/java/cucumber/pageObjects/AssignReplies.java b/src/main/java/cucumber/pageObjects/AssignReplies.java new file mode 100644 index 00000000..43be776d --- /dev/null +++ b/src/main/java/cucumber/pageObjects/AssignReplies.java @@ -0,0 +1,172 @@ +package cucumber.pageObjects; + +import cucumber.testdata.DatabaseTester; +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +public class AssignReplies { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + private final DatabaseTester DBT; + + public AssignReplies(WebDriver driver) { + AssignReplies.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + DBT = new DatabaseTester(); + } + + + @FindBy(id = "allocateUrgent") + WebElement setAssignUrgentReplies; + + @FindBy(id = "allocateNonUrgent") + WebElement setAssignStandardReplies; + + @FindBy(xpath = "//ul[@class=\"govuk-list\"]/li") + WebElement replyFromJurorName; + + @FindBy(id = "sendToOfficer") + WebElement selectAnOfficer; + + @FindBy(xpath = "//div[text()[contains(.,'Send to court')]]") + WebElement backlogCountSendToCourtLabel; + + @FindBy(xpath = "//div[text()[contains(.,'Urgent')]]") + WebElement backlogCountUrgentLabel; + + @FindBy(xpath = "//div[text()[contains(.,'Standard')]]") + WebElement backlogCountStandardLabel; + + @FindBy(xpath = "//div[text()[contains(.,'Total')]]") + WebElement backlogCountTotalLabel; + + + @FindBy(xpath = "//label[text()[contains(.,'Send to court')]]") + WebElement assignCountSendToCourtLabel; + + @FindBy(xpath = "//label[text()[contains(.,'Urgent')]]") + WebElement assignCountUrgentLabel; + + @FindBy(xpath = "//label[text()[contains(.,'Standard')]]") + WebElement assignCountStandardLabel; + + @FindBy(xpath = "//th[text()[contains(.,'Send to court')]]") + WebElement assignedToStaffCountSendToCourtLabel; + + @FindBy(xpath = "//th[text()[contains(.,'Urgent')]]") + WebElement assignedToStaffCountUrgentLabel; + + @FindBy(xpath = "//th[text()[contains(.,'Standard')]]") + WebElement assignedToStaffCountStandardLabel; + + @FindBy(xpath = "//th[text()[contains(.,'Total')]]") + WebElement assignedToStaffCountTotalLabel; + + + + public void setNumberOfRepliesToAssign(String urgencyType, String numberOfReplies) { + log.info("Setting number of " + urgencyType + " replies to " + numberOfReplies); + + switch (urgencyType) { + case "Urgent": + setAssignUrgentReplies.clear(); + setAssignUrgentReplies.sendKeys(numberOfReplies); + break; + case "Standard": + setAssignStandardReplies.clear(); + setAssignStandardReplies.sendKeys(numberOfReplies); + break; + } + } + + public void userIsNotinResultsGrid(String staffName) { + log.info("User " + staffName + "not in results grid"); + String staffGrid = driver.findElement(By.tagName("td")).getText(); + Assert.assertFalse("Text Found when not expected!", staffGrid.contains(staffName)); + + } + + public String getReplyFromJurorName() { + return replyFromJurorName.getText(); + } + + public void clickSelectAnOfficer() { + selectAnOfficer.click(); + } + + public void iSeeBacklogCountLabel(String backlogCountType) { + + switch (backlogCountType) { + case "Total": + backlogCountTotalLabel.isDisplayed(); + break; + case "Send to court": + backlogCountSendToCourtLabel.isDisplayed(); + break; + case "Urgent": + backlogCountUrgentLabel.isDisplayed(); + break; + case "Standard": + backlogCountStandardLabel.isDisplayed(); + break; + } + } + + public void iSeeAssignCountLabel(String assignCountType) { + + switch (assignCountType) { + case "Send to court": + assignCountSendToCourtLabel.isDisplayed(); + break; + case "Urgent": + assignCountUrgentLabel.isDisplayed(); + break; + case "Standard": + assignCountStandardLabel.isDisplayed(); + break; + } + } + + public void iSeeAssignedToStaffCountLabel(String assignCountType) { + + switch (assignCountType) { + case "Total": + assignedToStaffCountTotalLabel.isDisplayed(); + break; + case "Send to court": + assignedToStaffCountSendToCourtLabel.isDisplayed(); + break; + case "Urgent": + assignedToStaffCountUrgentLabel.isDisplayed(); + break; + case "Standard": + assignedToStaffCountStandardLabel.isDisplayed(); + break; + } + + + } + + + + + + } + diff --git a/src/main/java/cucumber/pageObjects/Bureau.java b/src/main/java/cucumber/pageObjects/Bureau.java new file mode 100644 index 00000000..e0a4a806 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Bureau.java @@ -0,0 +1,148 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.Alert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class Bureau { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Bureau.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public Bureau(WebDriver driver) { + Bureau.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(xpath = "//table[@summary='Details about Juror']") + WebElement jurorTable; + + + public void oldNew_jurorRowFor_containsText(String oldNew, String rowText, String text) { + WebElement row = jurorTable.findElement(By.xpath( + "//th[text()=\""+rowText+"\"]//ancestor::tr" + )); + int columnIndex = 0; + log.info("Found row for =>"+rowText); + + // Column lazy way currently + if (oldNew.equalsIgnoreCase("blue")) { + columnIndex = 2; + } else if (oldNew.equalsIgnoreCase("black")) { + columnIndex = 4; + } + + row.findElement(By.xpath( + "//td["+columnIndex+"][text()[contains(., \""+text+"\")]]" + )); + log.info("Row for =>"+rowText+"<= contained =>"+text); + + } + + public void set_valueTo_value_underHeader(String fieldName, String value, String headerText) { + log.info("Going to set =>"+fieldName+"<= to =>"+value+"<= under head text =>"+headerText); + WebElement child; + try { + child = driver.findElement(By.xpath( + "//fieldset[contains(@id, '"+headerText+"')]//input[@id=(" + + "//label/strong[text()[contains(.,\"" + +fieldName + +"\")]]/.." + +"/@for) and contains(@id, '"+headerText+"')]" + )); + } catch (Exception e) { + child = driver.findElement(By.xpath( + "//fieldset[contains(@id, '"+headerText+"')]" + + "//input[@id=(//label[text()[contains(.,\""+fieldName+"\")]]/@for)]" + + " | " + + "//fieldset[contains(@id, '"+headerText+"')]" + + "//input[@id=(//label/strong[text()[contains(.,\""+fieldName+"\")]]/../@for)]" + )); + } + child.clear(); + child.sendKeys(value); + } + + + public void setRadioButton_toValue_underText(String radioName, String underText) { + try{ + WebElement radioButton = driver.findElement(By.xpath( + "//strong[text()=\""+underText+"\"]//ancestor::fieldset//input[@type='radio' and @value=\""+radioName+"\"]")); + wait.toBeClickAble(radioButton); + NAV.click_onElement(radioButton); + } catch (Exception e) { + WebElement radioButton = driver.findElement(By.xpath( + "//h1[normalize-space()='"+underText+"']//ancestor::fieldset//input[@type='radio' and @value=\""+radioName+"\"]")); +// wait.toBeClickAble(radioButton); + NAV.click_onElement(radioButton); + } + + log.info("Clicked on radio button with value =>"+radioName+"<= under text =>"+underText); + + } + + public void assignNewReplies_toStaff(String staffMember) throws Throwable { + log.info("Going to start changing the new replies to change all new to =>"+staffMember); + WebElement allocateUrgent = driver.findElement(By.xpath("//input[contains(@id,'allocateUrgent')]")); + WebElement allocateNonUrgent = driver.findElement(By.xpath("//input[contains(@id,'allocateNonUrgent')]")); + WebElement allocateSuperUrgent = driver.findElement(By.xpath("//input[contains(@id,'allocateSuperUrgent')]")); + allocateNonUrgent.clear(); + allocateNonUrgent.sendKeys(driver.findElement(By.xpath("//div[contains(@class,'jd-assign-replies-standard')]")).getText()); + allocateUrgent.clear(); + allocateUrgent.sendKeys(driver.findElement(By.xpath("//div[contains(@class,'jd-assign-replies-urgent')]")).getText()); + allocateSuperUrgent.clear(); + allocateSuperUrgent.sendKeys(driver.findElement(By.xpath("//div[contains(@class,'jd-assign-replies-send')]")).getText()); + NAV.check_checkbox(staffMember); + NAV.press_buttonByName("Assign replies"); + } + + public void pressBackLink() throws Exception { + NAV.waitforDocumentLoading(); + NAV.waitForDocumentReady(); + WebElement backLink = NAV.return_oneVisibleFromList( + driver.findElements(By.linkText("Back")), true); + backLink.click(); + try{ + wait.waitForTextInvisibility("Record status", 5); + } catch (Exception e){ + log.info("Still on the page? - Going to try press the backLink again"); + try { + backLink.click(); + } catch (Exception a) { + log.info("Exception clicking on Back link again - Continuing to see where we are"); + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/CheckPoolRequest.java b/src/main/java/cucumber/pageObjects/CheckPoolRequest.java new file mode 100644 index 00000000..add76ef2 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/CheckPoolRequest.java @@ -0,0 +1,176 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + +public class CheckPoolRequest { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + public CheckPoolRequest(WebDriver driver) { + CheckPoolRequest.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(className = "govuk-heading-l") + WebElement heading; + + @FindBy(xpath = "//dt[text()[contains(.,'Court name')]]/../dd") + WebElement courtName; + + @FindBy(xpath = "//dt[text()[contains(.,'Attendance date')]]/../dd") + WebElement attendanceDate; + + @FindBy(xpath = "//a[@href='#citizensToSummon']") + WebElement numberOfCitizensSummonedError; + @FindBy(xpath = "//dt[text()[contains(.,'Pool type')]]/../dd") + WebElement poolType; + + @FindBy(xpath = "//dt[text()[contains(.,'Additional')]]/../dd") + WebElement additionalRequirements; + + @FindBy(xpath = "//dt[text()[contains(.,'Number of jurors')]]/../dd") + WebElement numberOfJurors; + + @FindBy(xpath = "//dt[text()[contains(.,'Date requested')]]/../dd") + WebElement requestedOnDateCoroners; + @FindBy(xpath = "//dt[text()[contains(.,'Jurors requested')]]/../dd") + WebElement numberOfJurorsCoroners; + + @FindBy(xpath = "//dt[text()[contains(.,'Name')]]/../dd") + WebElement requestedByNameCoroners; + + @FindBy(xpath = "//dt[text()[contains(.,'Email')]]/../dd") + WebElement requestedByEmailCoroners; + + @FindBy(xpath = "//dt[text()[contains(.,'Phone')]]/../dd") + WebElement requestedByPhoneCoroners; + + @FindBy(xpath = "//dt[text()[contains(.,'deferrals')]]/../dd" + + " | " + + "//dl[@id='numberOfCourtDeferrals']/*/dd") + WebElement numberOfDeferrals; + + @FindBy(xpath = "//dt[text()[contains(.,'additional jurors')]]/../dd") + WebElement numberOfAdditionalJurors; + + +//@FindBy(xpath = "//div[@class='govuk-summary-list__row']/dt[contains(text(),'Pool number')]/following-sibling::dd[1]") + @FindBy(xpath = "//dl[2]/div[2]/dd") + WebElement poolNumber; + + @FindBy(xpath = "//div[@class='govuk-summary-list__row']/dt[text()[contains(.,'Pool number')]]//ancestor::div[@class='govuk-summary-list__row']/dd[@class='govuk-summary-list__value']") + WebElement newPoolRequestNumber; + + @FindBy(xpath = "//dt[@class='govuk-summary-list__key'][contains(text(),'Pool number')]//ancestor::div/dd") + WebElement newCourtPoolRequestNumber; + + @FindBy(xpath = "//button[@class=\"govuk-button\"]") + WebElement requestButton; + + @FindBy(linkText = "Change") + WebElement changeLink; + + public String getHeading() { + log.info("Getting heading"); + return heading.getText(); + } + + public String getCourtName() { + log.info("Getting court name"); + return courtName.getText(); + } + + public String getAttendanceDate() { + log.info("Getting attendance date"); + return attendanceDate.getText(); + } + + public String getPoolType() { + log.info("Getting pool type"); + return poolType.getText(); + } + + public String getAdditionalRequirements() { + log.info("Getting additional requirements"); + return additionalRequirements.getText(); + } + + public String getNumberOfJurors() { + log.info("Getting number of jurors"); + return numberOfJurors.getText(); + } + + + public String getNumberOfDeferrals() { + log.info("Getting number of deferrals"); + return numberOfDeferrals.getText(); + } + + public String getNumberOfAdditionalJurors() { + log.info("Getting number of additional jurors"); + return numberOfAdditionalJurors.getText(); + } + + public String getPoolNumber() { + log.info("Getting pool number "+poolNumber.getText()); + return poolNumber.getText(); + } + + public Boolean poolNumberNotVisible() { + List elements = driver.findElements(By.xpath("//dl[2]/div[2]/dd")); + return elements.isEmpty(); + + } + + public String getNewPoolRequestNumber() { + log.info("Getting pool number "+newPoolRequestNumber.getText()); + return newPoolRequestNumber.getText(); + } + + public String getCourtNewPoolRequestNumber() { + log.info("Getting pool number "+newCourtPoolRequestNumber.getText()); + return newCourtPoolRequestNumber.getText(); + } + + public String getNewPoolAttendanceDate() { + log.info("Getting pool attendance date"); + return attendanceDate.getText(); + } + + public String getNumberOfCitizensSummonedError() { + log.info("Getting pool attendance date"); + return numberOfCitizensSummonedError.getText(); + } + + public void clickChangeLink() { + log.info("Click change link"); + changeLink.click(); + } + + public void submitRequest() { + log.info("Submitting request"); + requestButton.click(); + } + + + +} diff --git a/src/main/java/cucumber/pageObjects/ClickOverrider.java b/src/main/java/cucumber/pageObjects/ClickOverrider.java new file mode 100644 index 00000000..2418ffe1 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/ClickOverrider.java @@ -0,0 +1,134 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class ClickOverrider { + private static WebDriver driver; + private static Logger log = Logger.getLogger(ClickOverrider.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private Bureau BUR; + private NavigationShared NAV; + + public ClickOverrider(WebDriver driver) { + ClickOverrider.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + BUR = PageFactory.initElements(driver, Bureau.class); + NAV = PageFactory.initElements(driver, NavigationShared.class); + + } + + @FindBy(xpath = ".//*[contains(@id, 'blobOffenceId')]") + List sampleListWebElement; + + @FindBy(xpath = "//div[@id='result_87']/a/abbr") + WebElement sampleWebElement; + + //|| overrideCheck.equalsIgnoreCase("cancel") + public Boolean checkWhetherInList(String overrideCheck) throws Throwable { + wait.activateImplicitWait(); + if (overrideCheck.equalsIgnoreCase("back")) { + BUR.pressBackLink(); + return true; + } else if ((overrideCheck.equalsIgnoreCase("cancel")) && driver.getTitle().equalsIgnoreCase("Response details - Juror Digital")){ + WebElement cancelLink = NAV.return_oneVisibleFromList( + driver.findElements(By.xpath("//a[text()='cancel']")), true + ); + wait.waitForClickableElement(cancelLink); + NAV.click_onElement(cancelLink); + + try { + + wait.waitForClickableElement( + NAV.return_oneVisibleFromList(driver.findElements(By.linkText("edit")),true), + 3 + ); + wait.waitForDisplayedElement( + NAV.return_oneVisibleFromList(driver.findElements(By.linkText("edit")),true), + 3 + ); + } catch (Exception | Error e) { + cancelLink = NAV.return_oneVisibleFromList( + driver.findElements(By.xpath("//a[text()='cancel']")), true + ); + wait.waitForClickableElement(cancelLink); + NAV.click_onElement(cancelLink); + } + return true; + } else if ((overrideCheck.equalsIgnoreCase("edit")) && driver.getTitle().equalsIgnoreCase("Response details - Juror Digital")){ + wait.activateImplicitWait(); + WebElement editLink; + + try{ + editLink = NAV.return_oneVisibleFromList(driver.findElements(By.xpath("//a[text()='edit']")), true); + } catch (Exception e) { + NAV.waitForPageLoad(1); + editLink = NAV.return_oneVisibleFromList(driver.findElements(By.xpath("//a[text()='edit']")), true); + } + wait.waitForClickableElement(editLink); + NAV.click_onElement(editLink); + return true; + } else if ((overrideCheck.equalsIgnoreCase("save")) && driver.getTitle().equalsIgnoreCase("Response details - Juror Digital")){ + /*Boolean errorPresent = false; + try { + wait.deactivateImplicitWait(); + NAV.return_oneVisibleFromList(driver.findElements(By.xpath("//*[@class='error-message']")),false); + errorPresent = true; + } catch (Exception | Error e) {}*/ + + wait.activateImplicitWait(); + + WebElement saveLink = NAV.return_oneVisibleFromList( + driver.findElements(By.xpath("//a[text()='save']")), true + ); + wait.waitForClickableElement(saveLink); + NAV.MoveTo_click_onElement(saveLink); + try { + /*if (!errorPresent) + driver.findElement(By.xpath("//*[@class='error-message'] | //input[@value='Cancel']")); + else { + try{*/ + wait.activateImplicitWait(3); // This is going to be the same as an explicit wait for 3 sec if errors appear. No quick stable alternative + driver.findElement(By.xpath("//input[@value='Cancel']")); + /*} catch (Exception e) {} + }*/ + } catch (Exception | Error e) { + saveLink = NAV.return_oneVisibleFromList( + driver.findElements(By.xpath("//a[text()='save']")), true + ); + wait.waitForClickableElement(saveLink); + NAV.click_onElement(saveLink); + } + return true; + } + return false; + } + + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/CoronersPool.java b/src/main/java/cucumber/pageObjects/CoronersPool.java new file mode 100644 index 00000000..c4911407 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/CoronersPool.java @@ -0,0 +1,234 @@ +package cucumber.pageObjects; + +import cucumber.testdata.DatabaseTester; +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.sql.SQLException; +import java.util.List; + +public class CoronersPool { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + private final DatabaseTester DBT; + private final DatabaseTester DBTNSD; + + public CoronersPool(WebDriver driver) { + CoronersPool.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + DBT = new DatabaseTester(); + DBTNSD = new DatabaseTester(); + } + + @FindBy(xpath = "//dt[text()[contains(.,'Date requested')]]/../dd") + WebElement requestedOnDateCoroners; + @FindBy(xpath = "//dt[text()[contains(.,'Jurors requested')]]/../dd") + WebElement numberOfJurorsCoroners; + + @FindBy(id = "courtName") + WebElement coronersCourtName; + @FindBy(id = "courtLocCode") + WebElement coronersCourtCode; + + @FindBy(id = "poolType") + WebElement coronersPoolType; + + @FindBy(xpath = "//div/span[text()[contains(.,'Pool capacity')]]//ancestor::div/span/span[text()[contains(.,'/')]]") + WebElement coronersCapacity; + + @FindBy(xpath = "//div/span[text()[contains(.,'Pool summary')]]//ancestor::div/span/span") + WebElement coronersNumberAdded; + + @FindBy(xpath = "//dt[text()[contains(.,'Name')]]/../dd") + WebElement requestedByNameCoroners; + + @FindBy(xpath = "//dt[text()[contains(.,'Email')]]/../dd") + WebElement requestedByEmailCoroners; + + @FindBy(xpath = "//dt[text()[contains(.,'Phone')]]/../dd") + WebElement requestedByPhoneCoroners; + + @FindBy(xpath = "//a[text()[contains(.,'Create a coroner')]]") + WebElement createCoronerPoolButton; + + @FindBy(xpath = "//dd[2]/a[text()[contains(.,'Change')]]") + WebElement changeCoronerPoolRequestDetailsLink; + + @FindBy(xpath = "//dl[2]/div[1]/dd[2]/a") + WebElement changeCoronerPoolRequestedByLink; + + @FindBy(id = "requestedDateDay") + WebElement todayDayField; + + @FindBy(id = "requestedDateMonth") + WebElement todayMonthField; + + @FindBy(id = "requestedDateYear") + WebElement todayYearField; + + @FindBy(id = "requestedDate") + WebElement todayDateField; + + @FindBy(xpath = "//div[@class=\"after-header__pool-record-number\"]/h1") + WebElement coronersPoolNumber; + + @FindBy(xpath = "//div[2]/label") + WebElement firstPostCodeVotersCount; + + @FindBy(xpath = "//div[2]/input") + public + WebElement firstPostCodeVotersInput; + + public void clickCreateCoronerPool() { + log.info("Clicking on create coroners pool button"); + createCoronerPoolButton.click(); + } + + public void changeCoronerPoolRequestDetails() { + log.info("Clicking on change coroners pool request details"); + changeCoronerPoolRequestDetailsLink.click(); + } + + public void changeCoronerPoolRequestedBy() { + log.info("Clicking on change coroners pool request details"); + changeCoronerPoolRequestedByLink.click(); + } + + public String getRequestedOnDateCoroners() { + log.info("Getting requested on date coroners"); + return requestedOnDateCoroners.getText(); + } + + public String getNumberOfJurorsCoroners() { + log.info("Getting number of jurors coroners"); + return numberOfJurorsCoroners.getText(); + } + + public String getCoronersCourtName() { + log.info("Getting coroners court name"); + return coronersCourtName.getText(); + } + public String getCoronersCourtCode() { + log.info("Getting coroners court code"); + return coronersCourtCode.getText(); + } + public String getCoronersPoolType() { + log.info("Getting coroners pool type"); + return coronersPoolType.getText(); + } + public String getCoronersCapacity() { + log.info("Getting coroners capacity"); + return coronersCapacity.getText().substring(1); + } + + public String getCoronersNumberAdded() { + log.info("Getting coroners number added"); + return coronersNumberAdded.getText(); + } + + + public Integer getCoronersRowsOfCitizens() { + List rowsOfCitizens = driver.findElements(By.xpath("//tr")); + + if (rowsOfCitizens.size()>0) + return rowsOfCitizens.size() - 1; + else + return rowsOfCitizens.size(); + } + + + public String getRequestedByNameCoroners() { + log.info("Getting requested by name coroners"); + return requestedByNameCoroners.getText(); + } + + public String getRequestedByEmailCoroners() { + log.info("Getting requested by email coroners"); + return requestedByEmailCoroners.getText(); + } + + public String getRequestedByPhoneCoroners() { + log.info("Getting requested by phone coroners"); + return requestedByPhoneCoroners.getText(); + } + + public String checkCoronerDayRequested() { + log.info("Checking date is today's date"); + return todayDayField.getAttribute("value"); + } + + public String checkCoronerMonthRequested() { + log.info("Checking date is today's date"); + return todayMonthField.getAttribute("value"); + } + + public String checkCoronerYearRequested() { + log.info("Checking date is today's date"); + return todayYearField.getAttribute("value"); + } + + public String checkCoronerDateRequested() { + log.info("Checking date is today's date"); + return todayDateField.getAttribute("value"); + } + public int getCoronerPoolNextNumber() throws SQLException { + log.info("Getting the next coroner pool number from DB"); + return DBTNSD.getCoronerPoolNoNSD(); + } + + public String coronersPoolNumber() { + log.info("Getting coroners pool no displayed on page"); + return coronersPoolNumber.getText(); + } + + public Integer firstPostCodeVotersCount() { + log.info("Getting the voters count for the first postcode on page"); + String votersCountOnPage = firstPostCodeVotersCount.getText().substring(3); + Integer votersCountOnPageNumberOnly = Integer.valueOf(votersCountOnPage.replaceAll("[^0-9]", "")); + return votersCountOnPageNumberOnly; + } + + public void enterNewCoronerRequestedOnDate(String todayDateFull) { + log.info("Setting coroners pool requested on date to a date in the future"); + todayDateField.clear(); + todayDateField.sendKeys(todayDateFull); + + } + + public void coronersPoolCitizensResultsTableHeaderExists(String headerName) throws Exception { + log.info("I see header =>" + headerName); + wait.activateImplicitWait(); + WebElement coronerPoolCitizensResultsHeader = driver.findElement(By.xpath("//button[contains(text(),\"" + headerName + "\")]")); + coronerPoolCitizensResultsHeader.isDisplayed(); + } + + public void coronerPoolStatusIs(String poolStatus) throws Exception { + log.info("I see status is =>" + poolStatus); + wait.activateImplicitWait(); + WebElement coronerPoolStatusIs = driver.findElement(By.xpath("//strong[text()[contains(.,\"" + poolStatus + "\")]]")); + coronerPoolStatusIs.isDisplayed(); + } + + public Boolean exportPoolButtonInvisible() { + List elements = driver.findElements(By.id("exportPoolButton")); + return elements.isEmpty(); + + } + +} diff --git a/src/main/java/cucumber/pageObjects/CourtJurorRecord.java b/src/main/java/cucumber/pageObjects/CourtJurorRecord.java new file mode 100644 index 00000000..9fc346e0 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/CourtJurorRecord.java @@ -0,0 +1,68 @@ +package cucumber.pageObjects; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.ArrayList; +import java.util.List; + + +public class CourtJurorRecord { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(CourtJurorRecord.class); + + public CourtJurorRecord(WebDriver webDriver) { + CourtJurorRecord.driver = webDriver; + PageFactory.initElements(webDriver, this); + } + + @FindBy(xpath = "//div/strong[@class='govuk-tag govuk-tag--turquoise']") + WebElement jurorRecordTag; + + @FindBy(xpath = "//a[contains(@class, 'govuk-button') and normalize-space(text()) ='Enter summons reply']") + WebElement enterSummonsReplyButton; + + @FindBy(id = "overviewTab") + WebElement overviewTab; + + @FindBy(id = "detailsTab") + WebElement jurorDetailsTab; + + @FindBy(id = "financeTab") + WebElement financeTab; + + @FindBy(id = "attendanceTab") + WebElement attendanceTab; + + @FindBy(id = "notesTab") + WebElement notesTab; + + @FindBy(id = "historyTab") + WebElement historyTab; + + + public boolean seeJurorRecordTag() { return jurorRecordTag.isDisplayed(); } + + public boolean seeEnterSummonsReplyButton() { return enterSummonsReplyButton.isDisplayed(); } + + public boolean seeOverviewTab() { return overviewTab.isDisplayed(); } + + public boolean seeDetailsTab() { return jurorDetailsTab.isDisplayed(); } + + public boolean seeFinanceTab() { return financeTab.isDisplayed(); } + + public boolean seeAttendanceTab() { return attendanceTab.isDisplayed(); } + + public boolean seeNotesTab() { return notesTab.isDisplayed(); } + + public boolean seeHistoryTab() { return historyTab.isDisplayed(); } + + + +} + diff --git a/src/main/java/cucumber/pageObjects/DeferralMaintenance.java b/src/main/java/cucumber/pageObjects/DeferralMaintenance.java new file mode 100644 index 00000000..ca256b83 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/DeferralMaintenance.java @@ -0,0 +1,303 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedCondition; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; +import java.util.List; + +public class DeferralMaintenance { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + public DeferralMaintenance(WebDriver driver) { + DeferralMaintenance.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/h1") + WebElement pageHeading; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div[2]/h2") + WebElement courtName; + + @FindBy(id = "deferral-maintenance-show-filter") + WebElement showFilterButton; + + @FindBy(xpath = "//span[contains(text(),'Add to a pool')]") + WebElement addToAPoolButton; + + @FindBy(xpath = "//span[contains(text(),'Postpone')]") + WebElement postponeButton; + + @FindBy(id = "deferral-selected-count") + WebElement selectedCount; + + @FindBy(id = "deferral-total-count") + WebElement totalCount; + + @FindBy(xpath = "//*[@id=\"deferral-maintenance-table-wrapper\"]/div/table") + WebElement deferralsTable; + + @FindBy(id="deferral-all") + WebElement selectAllCheckBox; + + @FindBy(xpath = "//*[@id=\"deferral-maintenance-table-wrapper\"]/div/table/thead/tr/th[2]/button") + WebElement jurorNumberTableHeading; + + @FindBy(xpath = "//*[@id=\"deferral-maintenance-table-wrapper\"]/div/table/thead/tr/th[3]/button") + WebElement firstNameTableHeading; + + @FindBy(xpath = "//*[@id=\"deferral-maintenance-table-wrapper\"]/div/table/thead/tr/th[4]/button") + WebElement lastNameTableHeading; + + @FindBy(xpath = "//*[@id=\"deferral-maintenance-table-wrapper\"]/div/table/thead/tr/th[5]/button") + WebElement poolNumberTableHeading; + + @FindBy(xpath = "//*[@id=\"deferral-maintenance-table-wrapper\"]/div/table/thead/tr/th[6]/button") + WebElement deferredToTableHeading; + + @FindBy(xpath = "//*[@id=\"poolNumber\"]/div[1]/table") + WebElement activePoolsTable; + + @FindBy(id="deferral-maintenance-filter") + WebElement filterPanel; + + @FindBy(id="jurorNumber") + WebElement jurorNumberFilter; + + @FindBy(id="firstName") + WebElement firstNameFilter; + + @FindBy(id="lastName") + WebElement lastNameFilter; + + @FindBy(id="deferredTo") + WebElement deferredToFilter; + + @FindBy(id="applyFiltersButton") + WebElement applyFiltersButton; + + @FindBy(id="clearFiltersLink") + WebElement clearFiltersLink; + + @FindBy(className = "govuk-pagination__list") + WebElement paginationLinks; + + @FindBy(xpath = "//button[@data-index='1']") + WebElement jurorNumberTableHeader; + + public void clickJurorNumberHeader() { + jurorNumberTableHeader.click(); + } + public void waitforPageLoad() + + { + waitForPageLoad(driver) ; + } + + public void waitForPageLoad(WebDriver driver) { + ExpectedCondition pageLoadCondition = new + ExpectedCondition() { + public Boolean apply(WebDriver driver) { + return ((JavascriptExecutor)driver).executeScript("return document.readyState").equals("complete"); + } + }; + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(30)); + wait.until(pageLoadCondition); + } + public String getPageHeading(){ + log.info("Getting page heading"); + return pageHeading.getText(); + } + + public String getCourtName(){ + log.info("Getting court name"); + return courtName.getText(); + } + + public void clickShowFilterButton(){ + log.info("Clicking show filter button"); + showFilterButton.click(); + } + + public void clickAddToAPoolButton(){ + log.info("Clicking add to a pool button"); + addToAPoolButton.click(); + } + + public void clockPostponeButton(){ + log.info("Clicking postpone button"); + postponeButton.click(); + } + + public String getSelectedCount(){ + log.info("Getting selected count"); + return selectedCount.getText(); + } + + public String getTotalCount(){ + log.info("Getting total count"); + return totalCount.getText(); + } + + public void clickSelectAllCheckbox(){ + log.info("Clicking select all checkbox"); + selectAllCheckBox.click(); + } + + public String getJurorNumberTableHeading(){ + log.info("Getting juror number table heading"); + return jurorNumberTableHeading.getText(); + } + + public void clickJurorNumberTableHeading(){ + log.info("Clicking juror number table heading"); + jurorNumberTableHeading.click(); + } + + public String getFirstNameTableHeading(){ + log.info("Getting first name table heading"); + return firstNameTableHeading.getText(); + } + + public void clickFirstNameTableHeading(){ + log.info("Clicking first name table heading"); + firstNameTableHeading.click(); + } + + public String getLastNameTableHeading(){ + log.info("Getting last name table heading"); + return lastNameTableHeading.getText(); + } + + public void clickLastNameTableHeading(){ + log.info("Clicking last name table heading"); + lastNameTableHeading.click(); + } + + public String getPoolNumberTableHeading(){ + log.info("Getting pool number table heading"); + return poolNumberTableHeading.getText(); + } + + public void clickPoolNumberTableHeading(){ + log.info("Clicking pool number table heading"); + poolNumberTableHeading.click(); + } + + public String geDeferredToTableHeading(){ + log.info("Getting deferred to table heading"); + return deferredToTableHeading.getText(); + } + + public void clickDeferredToTableHeading(){ + log.info("Clicking deferred to table heading"); + deferredToTableHeading.click(); + } + + public void filterByJurorNumber(String jurorNumber){ + log.info("Inputting juror number filter"); + jurorNumberFilter.sendKeys(jurorNumber); + } + + public void filterByFirstName(String firstName){ + log.info("Inputting first name filter"); + firstNameFilter.sendKeys(firstName); + } + + public void filterByLastName(String lastName){ + log.info("Inputting last name filter"); + lastNameFilter.sendKeys(lastName); + } + + public void filterByDeferredTo(String date){ + log.info("Inputting deferred to filter"); + deferredToFilter.sendKeys(date); + } + + public void clickApplyFiltersButton(){ + log.info("Clicking apply filters button"); + applyFiltersButton.click(); + } + + public void clickClearFiltersLink(){ + log.info("Clicking clear filters link"); + clearFiltersLink.click(); + } + + public String getDeferralTableRow(int index){ + log.info("Getting row " + index + " in deferral table"); + List deferralRows = deferralsTable.findElements(By.tagName("tr")); + WebElement jurorDeferral = deferralRows.get(index); + List deferralDetails = jurorDeferral.findElements(By.tagName("td")); + String jurorNumber = deferralDetails.get(1).getText(); + String firstName = deferralDetails.get(2).getText(); + String lastName = deferralDetails.get(3).getText(); + String poolNumber = deferralDetails.get(4).getText(); + String deferredTo = deferralDetails.get(5).getText(); + String details = jurorNumber + ", " + firstName + ", " + lastName + ", " + poolNumber + ", " + deferredTo; + return details; + } + + public String getFirstDeferralTableRow(){ + return getDeferralTableRow(1); + } + + public String getLastDeferralTableRow(){ + return getDeferralTableRow( deferralsTable.findElements(By.tagName("tr")).size()-1); + } + + public String getNthLastDeferralTableRow(int index){ + return getDeferralTableRow( deferralsTable.findElements(By.tagName("tr")).size()-index); + } + + public void clickJurorNumber(int index){ + List deferralRows = deferralsTable.findElements(By.tagName("tr")); + WebElement jurorDeferral = deferralRows.get(index); + List deferralDetails = jurorDeferral.findElements(By.tagName("td")); + log.info("Clicking juror number: " + index); + deferralDetails.get(index).click(); + } + + public void selectJurorFromTable(String jurorNumber){ + WebElement selectCheckbox = driver.findElement(By.id("deferral-"+ jurorNumber)); + log.info("Clicking select checkbox for: " + jurorNumber); + selectCheckbox.click(); + } + + public void selectActivePool(String poolNumber){ + WebElement selectPool = driver.findElement(By.id("pool-"+ poolNumber)); + log.info("Selecting pool: " + poolNumber); + selectPool.click(); + } + + public void clickLastPaginationItem(){ + if (driver.findElements(By.className("govuk-pagination__list")).size() > 0) { + List paginationItems = paginationLinks.findElements(By.tagName("li")); + WebElement lastPaginationLink = paginationItems.get(paginationItems.size()-1); + log.info("Navigating to last page of deferral table"); + lastPaginationLink.click(); + } + } + +} diff --git a/src/main/java/cucumber/pageObjects/Groups.java b/src/main/java/cucumber/pageObjects/Groups.java new file mode 100644 index 00000000..4f4caf25 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Groups.java @@ -0,0 +1,227 @@ +package cucumber.pageObjects; + +import com.google.common.base.Verify; +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.Arrays; +import java.util.List; + +public class Groups { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Groups.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public Groups(WebDriver driver) { + Groups.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(id = "selectedGroupsTable") + WebElement selectedGroupsTable; + + public void click_iconNextTo(String text) throws Exception { + log.info("Going to select on icon next to text =>"+text); + wait.activateImplicitWait(); + + try{ + WebElement iconNextTo_text = driver.findElement(By.xpath( + + "//*[text()[contains(., \""+text+"\")]]/..//*[contains(@class,'fa')]" + //"//label[text()[contains(., '"+location_name+"')]]")) + + )); + + iconNextTo_text.click(); + } catch (Exception e) { + log.info("Could not see icon with text for =>"+text); + throw new Exception ("Could not find icon to click on - We werent being too specific either..."); + } + wait.deactivateImplicitWait(); + } + + + public Boolean text_inGroupAddedList(String expected_text) { + WebElement groupsAdded = driver.findElement(By.id("selectedGroupsPanel")); + Boolean textContained = false; + + try { + String groupsAddedText = groupsAdded.getText(); + Assert.assertTrue("Text not found!", groupsAddedText.contains(expected_text)); + } catch (AssertionError e) { + return false; + } + return true; + } + public void seeText_inGroupAddedList(String arg1) throws Exception { + log.info("Going to check whether text is present in the group added list"); + if (text_inGroupAddedList(arg1) == true) { + log.info("Saw text in group added list as expected, continuing"); + return; + } + throw new Exception("Did not see text in group as expected"); + } + + public void doNotSeeText_inGroupAddedList(String arg1) throws Exception { + log.info("Going to check whether text is >not< present in the group added list"); + if (text_inGroupAddedList(arg1) == false) { + log.info("Did not see text in group added list as expected, continuing"); + return; + } + throw new Exception("Saw text in group added list when not expected - Failing"); + } + + + /** + * Returns the WebElement of the panel + * @param headerName + * @return + */ + public WebElement getPanel_byHeaderName(String headerName) { + log.info("Looking for panel with headerName =>" + headerName); + return driver.findElement(By.xpath( + "//h3" + + " [contains(@id, 'orgName') " + + " and text()[contains(., '"+headerName+"')]" + + " ]/.." + )); + } + public void seeText_inPanelHeader(String headerName, String expectedText) { + + WebElement panel = getPanel_byHeaderName(headerName); + Assert.assertTrue("Text not found!", panel.getText().contains(expectedText)); + + log.info("Found =>"+expectedText+"<= in panel =>" + headerName +"<="); + } + + + public void click_inPanelHeader(String headerName, String linkText) { + WebElement panel = getPanel_byHeaderName(headerName); + + panel.findElement(By.linkText(linkText)).click(); + log.info("Clicked on linktext =>"+linkText+"<= successfully"); + + } + + public Integer groupsPosition_byText(String text) { + log.info("Check Position of groups by text =>" + text); + + WebElement textElement = driver.findElement(By.xpath("//table[@id='selectedGroupsTable']//td[contains(text(),'"+text+"')]")); + List strList = Arrays.asList(textElement.getAttribute("id").split("-")); + + log.info("Saw Position =>"+strList.get(1)+"<= with text =>"+text); + + return Integer.valueOf(strList.get(1)) + 1; + } + + + public void checkGroupsAddedPosition_withText(String text, Integer position) { + Integer currentPosition = groupsPosition_byText(text); + Assert.assertEquals(position, currentPosition); + log.info("Got expected position, expected =>"+position); + } + + + public void text_hasClass(String text, String className) { + wait.activateImplicitWait(); + driver.findElement(By.xpath("//*[text()[contains(.,'"+text+"')] and contains(@class, '"+className+"')]")); + wait.deactivateImplicitWait(); + ////*[text()[contains(.,'1. User Details')] and contains(@class, 'completed')]") + + log.info("Found li element which has text =>"+text+"<= with class =>"+className); + } + + /** + * Note that this step can't fail unless it cant see the element - Ensure that a check is made in cucumber to confirm the set + * @param checkUncheck + * @param rowName + * @param colName + */ + public void setCheckbox_forRowCol(String checkUncheck, String rowName, String colName) { + log.info("Going to set row =>"+rowName+"<+ with column =>"+colName+"<= to =>"+checkUncheck); + + List tables = driver.findElements(By.cssSelector("table")); + + if (tables.size() > 1) + throw new Error ("Found more than one table - We dont know which one to use"); + WebElement table = tables.get(0); + // Going to assume columns for now + String column = "1"; + if (colName.equalsIgnoreCase("Court Lists")) + column = "2"; + else if (colName.equalsIgnoreCase("Court Register")) + column = "3"; + + WebElement row = table.findElement(By.xpath("//td[contains(text(),\""+rowName+"\")]/..")); + log.info("Found row with text =>" + rowName); + + WebElement cell = row.findElement(By.cssSelector("td:nth-child("+column+")")).findElement(By.cssSelector("input")); + log.info("Found Cell at position =>"+colName); + + if (checkUncheck.equalsIgnoreCase("check") && !cell.isSelected()){ + cell.click(); + } else if (checkUncheck.equalsIgnoreCase("uncheck") && cell.isSelected()) { + cell.click(); + } + + log.info("As Expected - Icon visibility"); + } + + public void click_radioButtonWithLabel(String arg1) throws Exception { + WebElement radioButton; + wait.activateImplicitWait(); + try{ + radioButton = NAV.return_oneVisibleFromList(driver.findElements(By.xpath( + "//input[@id=(" + + "//label[text()[contains(.,\""+arg1+"\")]]" + +"/@for)]" + + "|" + + "//label[text()[contains(., \""+arg1+"\")]]/input" + + "|" + + "//label/div[@role='text' and text()[contains(., \""+arg1+"\")]]/../input[@type='radio']" + )), true); + NAV.click_onElement(radioButton); + radioButton.sendKeys(Keys.chord("", Keys.TAB)); + } catch (Exception e) { + WebElement radioButtonNext = driver.findElement(By.xpath( + "//label[text()[contains(.,'"+arg1+"')]]" + )); + NAV.click_onElement(radioButtonNext); + } + + log.info("Clicked on radio button which contained text =>" + arg1); + } + public void confirm_Radiobutton_withNameChecked(String radioButtonLabel, String selectUnSelected) { + WebElement radioButtonSelected = driver.findElement(By.xpath( + "//input[@id=(" + + "//label[text()[contains(.,'"+radioButtonLabel+"')]]" + +"/@for)]" + )); + if (selectUnSelected.equalsIgnoreCase("selected") && radioButtonSelected.isSelected()) { + log.info("Radio button with label =>"+radioButtonLabel+"<= Selected as expected"); + return; + } else if (selectUnSelected.equalsIgnoreCase("unselected") && !radioButtonSelected.isSelected()) { + log.info("Radio button with label =>"+radioButtonLabel+"<= Unselected as expected"); + } else { + Verify.verify(false, "Radio button wasnt selected as expected - Failure but continunig"); + } + } +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/Header.java b/src/main/java/cucumber/pageObjects/Header.java new file mode 100644 index 00000000..d648e125 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Header.java @@ -0,0 +1,63 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + +public class Header { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + public Header(WebDriver driver) { + Header.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(id = "apps-button") + WebElement appsButton; + + @FindBy(linkText = "Pool management") + WebElement poolManagementLink; + + @FindBy(linkText = "Summons management") + WebElement summonsManagementLink; + + public void openAppsMenu() { + log.info("Opening apps menu"); + appsButton.click(); + } + + public Boolean appsButtonInvisible() { + List elements = driver.findElements(By.id("apps-button")); + return elements.isEmpty(); + + } + + public void clickPoolManagement() { + log.info("Clicking pool management"); + poolManagementLink.click(); + } + + public void clickSummonsManagement() { + log.info("Clicking Summons management"); + summonsManagementLink.click(); + } + +} diff --git a/src/main/java/cucumber/pageObjects/JurorRecord.java b/src/main/java/cucumber/pageObjects/JurorRecord.java new file mode 100644 index 00000000..5beabd09 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/JurorRecord.java @@ -0,0 +1,446 @@ +package cucumber.pageObjects; + + +import cucumber.testdata.DatabaseTester; +import org.apache.log4j.Logger; +import org.openqa.selenium.*; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class JurorRecord { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(JurorRecord.class); + private final DatabaseTester DBT; + + public JurorRecord(WebDriver webDriver) { + JurorRecord.driver = webDriver; + PageFactory.initElements(webDriver, this); + DBT = new DatabaseTester(); + } + + @FindBy(className = "govuk-heading-l") + WebElement heading; + + @FindBy(xpath = "//div/strong[@class='govuk-tag govuk-tag--turquoise']") + WebElement jurorRecordTag; + + @FindBy(xpath = "//a[contains(@class, 'govuk-button') and normalize-space(text()) ='Enter summons reply']") + WebElement enterSummonsReplyButton; + + @FindBy(xpath = "//*[contains(text(),'Update juror record')]") + WebElement updateJurorRecordButton; + + @FindBy(id = "jurorNumber") + WebElement jurorNumber; + + @FindBy(xpath = "//div[contains(text(),\"Juror status\")]/following-sibling::div") + WebElement jurorStatus; + + @FindBy(id = "poolNumber") + WebElement poolNumber; + + @FindBy(id = "courtStartDate") + WebElement courtStartDate; + + @FindBy(id = "courtName") + WebElement courtName; + + @FindBy(id = "main-content") + WebElement mainBody; + + @FindBy(xpath = "//*[@id=\"jurorStatus\"]/span[@class='icon mod-icon-urgent']") + WebElement jurorStatusWarningIcon; + + @FindBy(id = "overviewTab") + WebElement overviewTab; + + @FindBy(id = "detailsTab") + WebElement jurorDetailsTab; + + @FindBy(id = "summonsTab") + WebElement summonsTab; + + @FindBy(xpath = "//dt[contains(text(),'Reply status')]/following-sibling::dd") + WebElement replyStatus; + + @FindBy(xpath = "//dt[contains(text(),'Processing outcome')]/following-sibling::dd") + WebElement processingOutcome; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[3]/div/dl/div[2]/dd/span/div") + WebElement processingOutcomeWarningIcon; + + @FindBy(xpath = "//dt[contains(text(),'Reply date')]/following-sibling::dd") + WebElement replyDate; + + @FindBy(xpath = "//dt[contains(text(),'Reply method')]/following-sibling::dd") + WebElement replyMethod; + + @FindBy(xpath = "//*[contains(text(),'View summons reply')]") + WebElement viewSummonsReplyLink; + + @FindBy(id = "financeTab") + WebElement financeTab; + + @FindBy(id = "attendanceTab") + WebElement attendanceTab; + + @FindBy(id = "notesTab") + WebElement notesTab; + + @FindBy(id = "historyTab") + WebElement historyTab; + + @FindBy(xpath = "//*[contains(text(),'Reassign to another pool')]") + WebElement reassignRadioButton; + + @FindBy(xpath = "//*[contains(text(),'Reassign to another pool')]") + WebElement reassignJuror; + + @FindBy(xpath = "//div[contains(string(),'Choose a pool to reassign to')][1]/following-sibling::table[1]") + WebElement reassignActivePoolsTable; + + @FindBy(xpath = "//*[contains(text(),'Transfer to another court')]") + WebElement transferCourtRadioButton; + + @FindBy(id = "attendanceDate") + WebElement attendanceDate; + + @FindBy(xpath = "//*[contains(text(),'They will be transferred to a new pool')]") + WebElement transferConfirmationBody; + + @FindBy(xpath = "/html/body/div[2]/main/div[4]/div/dl/div/dd") + WebElement policeCheckStatus; + + @FindBy(xpath = "//dt[contains(text(),'Number of deferrals')]/../dd") + WebElement numberOfDeferrals; + + @FindBy(id = "postponeTo") + WebElement newServiceStartDate; + + @FindBy(id = "deferralDateAndPool") + WebElement postponementDatePoolRadio; + + public void clickPostponementDatePoolRadio() { + postponementDatePoolRadio.click(); + } + + public void enterNewServiceStartDate(String date) { + newServiceStartDate.clear(); + newServiceStartDate.sendKeys(date); + } + + @FindBy(id = "changeJurorDetailsAnchor") + WebElement deferralChangeLink; + + @FindBy(xpath = "//dt[contains(text(),'Pool number')]/../dd") + WebElement poolNumberValue; + + @FindBy(xpath = "//dt[contains(text(),'Deferred to')]/../dd") + WebElement deferredToDate; + + @FindBy(xpath = "//a[contains(text(),'Run a police check')]") + WebElement runPoliceCheckLink; + + @FindBy(xpath = "//button[contains(text(),'Run police check')]") + WebElement runPoliceCheckButton; + + @FindBy(id = "notes") + WebElement notesField; + + @FindBy(id = "saveButton") + WebElement saveNotes; + + @FindBy(id = "addNotesButton") + WebElement addOrEditNotes; + + @FindBy(id = "logContactButton") + WebElement logNewContact; + + @FindBy(id = "courtNameOrLocation") + WebElement courtNameOrLocation; + + @FindBy(xpath = "//*[@id='ac-courtNameOrLocation']") + WebElement courtNameLocationValue; + + @FindBy(xpath = "/html/body/div[2]/main/form/div[2]/div/p") + WebElement updatedJurorName; + + @FindBy(xpath = "//div[2]/div[2]/p") + WebElement namePendingApproval; + + @FindBy(xpath = "//a[contains(text(),'Approve or reject')]") + WebElement approveOrRejectName; + + @FindBy(xpath = "//a[@href [contains(.,'/pool-management/pool-overview')]]") + WebElement poolNumberLink; + + @FindBy(xpath = "//*[contains(text(),'to approve')]") + WebElement sjoNotificationBanner; + + @FindBy(id = "rejectComments") + WebElement rejectCommentsField; + + @FindBy(id = "attendanceDate") + WebElement nextDueAtCourt; + + @FindBy(xpath = "//*[@id=\"failed-to-attend\"]") + WebElement failedToAttendCheckbox; + + + + public String getHeading() { + return heading.getText(); + } + + public boolean seeJurorRecordTag() { + return jurorRecordTag.isDisplayed(); + } + + public boolean seeEnterSummonsReplyButton() { + return enterSummonsReplyButton.isDisplayed(); + } + + public void clickUpdateJurorRecordButton() { + updateJurorRecordButton.click(); + } + + public void clickAddOrEditNotes() { + addOrEditNotes.click(); + } + + public void clickLogNewContact() { + logNewContact.click(); + } + + public void enterNotes(String notes) { + notesField.clear(); + notesField.sendKeys(notes); + } + + public void enterComments(String comments) { + rejectCommentsField.clear(); + rejectCommentsField.sendKeys(comments); + } + + public void saveNotes() { + saveNotes.click(); + } + + public String getJurorNumber() { + return jurorNumber.getText(); + } + + public String getJurorStatus() { + return jurorStatus.getText(); + } + + public String getPoolNumber() { + return poolNumber.getText(); + } + + public String getCourtStartDate() { + return courtStartDate.getText(); + } + + public String getCourtName() { + return courtName.getText(); + } + + public boolean seeJurorStatusWarningSymbol() { + log.info("Checking juror status warning symbol is present"); + return jurorStatusWarningIcon.isDisplayed(); + } + + public boolean seeOverviewTab() { + return overviewTab.isDisplayed(); + } + + public boolean seeDetailsTab() { + return jurorDetailsTab.isDisplayed(); + } + + public boolean seeSummonsTab() { + return summonsTab.isDisplayed(); + } + + public void clickSummonsTab() { + summonsTab.click(); + } + + public String getReplyStatus() { + return replyStatus.getText(); + } + + public String getProcessingOutcome() { + return processingOutcome.getText(); + } + + public boolean seeProcessingOutcomeWarningSymbol() { + log.info("Checking processing outcome warning symbol is present"); + return processingOutcomeWarningIcon.isDisplayed(); + } + + public String getReplyDate() { + return replyDate.getText(); + } + + public String getReplyMethod() { + return replyMethod.getText(); + } + + public boolean seeFinanceTab() { + return financeTab.isDisplayed(); + } + + public boolean seeAttendanceTab() { + return attendanceTab.isDisplayed(); + } + + public boolean seeNotesTab() { + return notesTab.isDisplayed(); + } + + public void clickNotesTab() { + notesTab.click(); + } + + public boolean seeHistoryTab() { + return historyTab.isDisplayed(); + } + + public void clickReassignRadioButton() { + reassignRadioButton.click(); + } + + public void clickReassignJuror() { + reassignJuror.click(); + } + + public boolean seeReassignActivePoolsTable() { + return reassignActivePoolsTable.isDisplayed(); + } + + public List getReassignActivePoolsHeadings() { + log.info("Getting reassign active pool table headings"); + List headings = reassignActivePoolsTable.findElements(By.tagName("th")); + headings.remove(0); + List headingsText = new ArrayList<>(); + for (int i = 0; i < headings.size(); i++) { + headingsText.add(headings.get(i).getText()); + } + return headingsText; + } + + public String getPoliceCheckText() { + return policeCheckStatus.getText().split("\n")[0]; + + } + + public void clickTransferCourtRadioButton() { + transferCourtRadioButton.click(); + } + + public void enterAttendanceDate(String text) { + attendanceDate.clear(); + attendanceDate.sendKeys(text); + } + + public String getTransferConfirmationBody() { + return transferConfirmationBody.getText(); + } + + public String getNumberOfDeferrals() { + return numberOfDeferrals.getText(); + } + + public void clickDeferralChange() { + deferralChangeLink.click(); + } + + public String getPoolNumberValue() { + return poolNumberValue.getText(); + } + + public String getDeferredToDate() { + return deferredToDate.getText(); + } + + public boolean runPoliceCheckIsLinkDisplayed() { + return runPoliceCheckLink.isDisplayed(); + } + + public boolean runPoliceCheckLinkInvisible() { + List elements = driver.findElements(By.xpath("//a[contains(text(),'Run a police check')]")); + return elements.isEmpty(); + } + + public boolean runPoliceCheckIsButtonDisplayed() { + return runPoliceCheckButton.isDisplayed(); + } + + public void clickRunPoliceCheckLink() { + runPoliceCheckLink.click(); + } + + public void clickRunPoliceCheckButton() { + runPoliceCheckButton.click(); + } + + + public boolean getTextCourtNameLocation(String expectedText) { + String courtsLocations = courtNameLocationValue.getAttribute("data-content"); + Boolean containsExpected = courtsLocations.contains(expectedText); + return containsExpected; + } + + public void setCourtOrLocation(String courtOrLocationCode) { + courtNameOrLocation.sendKeys(Keys.BACK_SPACE); + courtNameOrLocation.sendKeys(Keys.BACK_SPACE); + courtNameOrLocation.sendKeys(Keys.BACK_SPACE); + + courtNameOrLocation.sendKeys(courtOrLocationCode); + } + + public String getUpdatedJurorName() { + return updatedJurorName.getText(); + } + + public String jurorNamePendingApproval() { + return namePendingApproval.getText(); + } + + public void clickApproveOrRejectLink() { + approveOrRejectName.click(); + } + + public void clickPoolNumberLink() { + poolNumberLink.click(); + } + + public void clickChangeLinkInSameRowAs_inCreateJurorRecord(String link, String nextTo) throws Throwable { + By changeLink = By.xpath("//dt[contains(text(),'" + nextTo + "') or contains(text(),'" + nextTo + "')]/following-sibling::*/a[@class='govuk-link' and contains(text(),'" + link + "')]"); + + WebElement element = driver.findElement(changeLink); + element.click(); + + log.info("Found =>" + link + "<= in the same row as =>" + nextTo + "<= and clicked on 'Change' link as expected"); + } + public void sjoNotification() { + sjoNotificationBanner.getText(); + } + + public void clickSjoNotification() { + sjoNotificationBanner.click(); + } + public boolean sjoNotificationNotPresent() { + List elements = driver.findElements(By.xpath("//*[contains(text(),'to approve')]")); + return elements.isEmpty(); + } +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/JurorRecordSearch.java b/src/main/java/cucumber/pageObjects/JurorRecordSearch.java new file mode 100644 index 00000000..b2ee492f --- /dev/null +++ b/src/main/java/cucumber/pageObjects/JurorRecordSearch.java @@ -0,0 +1,164 @@ +package cucumber.pageObjects; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + +import static org.junit.Assert.assertTrue; + + +public class JurorRecordSearch { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(JurorRecordSearch.class); + + public JurorRecordSearch(WebDriver webDriver) { + JurorRecordSearch.driver = webDriver; + PageFactory.initElements(webDriver, this); + } + + @FindBy(id = "search-button") + WebElement globalSearchExpand; + + @FindBy(id = "super-nav-search") + WebElement globalSearchField; + + @FindBy(id = "poolNumber") + WebElement poolSearchField; + + @FindBy(xpath = "//div[@class='moj-header__navigation-dropdown-menu']//button") + WebElement globalSearchSubmit; + + @FindBy(id = "jurorNumber") + WebElement jurorNumber; + + @FindBy(id = "jurorStatus") + WebElement jurorStatus; + + @FindBy(id = "poolNumber") + WebElement poolNumber; + + @FindBy(id = "courtStartDate") + WebElement courtStartDate; + + @FindBy(id = "courtName") + WebElement courtName; + + @FindBy(id = "main-content") + WebElement mainBody; + + @FindBy(id = "summonsTab") + WebElement summonsTab; + + @FindBy(xpath = "//*[contains(text(),'View summons reply')]") + WebElement viewSummonsReplyLink; + + @FindBy(xpath = "//*[contains(text(),'Update juror record')]") + WebElement updateJurorRecordButton; + @FindBy(xpath = "//*[contains(text(),'Mark as deceased')]") + WebElement markAsDeceasedRadioButton; + + @FindBy(xpath = "//*[contains(text(),'Mark summons as undeliverable')]") + WebElement markAsUndeliverableRadioButton; + + @FindBy(id = "jurorDeceased") + WebElement jurorDeceasedComment; + @FindBy(xpath = "//button[@type='submit']") + WebElement continueButton; + + @FindBy(xpath = "//*[@class='moj-banner__message']/b") + WebElement bannerMessageBoldText; + + @FindBy(xpath = "//*[@class='govuk-list govuk-error-summary__list']/li/a") + WebElement errorBannerText; + + @FindBy(xpath = "//*[@id=\"main-content\"]/table") + WebElement searchResultsTable; + + @FindBy(xpath = "//*[@id=\"main-content\"]/h2") + WebElement searchResultsHeader; + + public void searchForRecordFromGlobalSearch(final String jurorNumber) { + + globalSearchExpand.click(); + globalSearchField.sendKeys(jurorNumber); + globalSearchSubmit.click(); + } + + public void searchForRecordFromPoolSearch(final String jurorNumber) { + poolSearchField.sendKeys(jurorNumber); + clickContinue(); + } + + public Boolean searchButtonInvisible() { + List elements = driver.findElements(By.id("search-button")); + return elements.isEmpty(); + + } + + public String getJurorNumber() { + return jurorNumber.getText(); + } + + public String getJurorStatus() { + return jurorStatus.getText(); + } + + public String getPoolNumber() { + return poolNumber.getText(); + } + + public String getCourtStartDate() { + return courtStartDate.getText(); + } + + public String getCourtName() { + return courtName.getText(); + } + + public String getMainBodyText() { + return mainBody.getText(); + } + + public void clickSummonsTab(){ summonsTab.click();} + + public void clickViewSummonsReplyLink(){ viewSummonsReplyLink.click();} + + public void clickUpdateJurorRecord() { updateJurorRecordButton.click();} + + public void clickMarkAsDeceasedRadioButton() { markAsDeceasedRadioButton.click();} + + public void clickMarkAsUndeliverableRadioButton() { markAsUndeliverableRadioButton.click();} + + public void enterCommentForHistory(String commentForHistory) { jurorDeceasedComment.sendKeys(commentForHistory);} + + public void clickContinue() { continueButton.click();} + + public String jurorRecordUpdatedContains() { return bannerMessageBoldText.getText();} + + public String jurorRecordUpdatedErrorBannerText() { return errorBannerText.getText();} + + public String getSearchResultsHeader() { return searchResultsHeader.getText(); } + + public void clickJurorRecordForCourt(String court){ + WebElement tableBody = searchResultsTable.findElement(By.tagName("tbody")); + List tableRows = tableBody.findElements(By.tagName("tr")); + for(int i = 0; i < tableRows.size(); i++){ + List jurorRecordColumns = tableRows.get(i).findElements(By.tagName("td")); + WebElement jurorRecordLink = jurorRecordColumns.get(0).findElement(By.tagName("a")); + String courtName = jurorRecordColumns.get(4).getText(); + if (courtName.equals(court)){ + log.info("clicking link for juror record at: " + courtName + " jurorNumber: " + jurorRecordLink.getText()); + jurorRecordLink.click(); + break; + } + } + } + +} + diff --git a/src/main/java/cucumber/pageObjects/Login.java b/src/main/java/cucumber/pageObjects/Login.java new file mode 100644 index 00000000..0acebf3f --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Login.java @@ -0,0 +1,168 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.Alert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class Login { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Login.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public Login(WebDriver driver) { + Login.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(xpath = ".//*[contains(@id, 'blobOffenceId')]") + List sampleListWebElement; + + @FindBy(id = "userID") + WebElement username_field; + + @FindBy(id = "password") + WebElement password_field; + + @FindBy(id = "newPassword") + WebElement newPassword_field; + + @FindBy(id = "confirmPassword") + WebElement confirmPassword_field; + + @FindBy(id = "continue") + WebElement continue_button; + + @FindBy(xpath = "//input[@value='Sign in']") + WebElement confirm_button; + + + @FindBy(id = "loginBtn") + WebElement login_button; // @FindBy(xpath = "//button[contains(text(),'Login')]") + + @FindBy(linkText = "Login") + WebElement loginViaADLink; + + @FindBy(xpath = "//input[@type=\"email\"]") + WebElement emailADLogin; + + @FindBy(xpath = "//input[@type=\"password\"]") + WebElement passwordADLogin; + + @FindBy(xpath = "//input[@type=\"submit\"]") + WebElement submitAD; + + public Login login(String username, String password) throws Throwable { + + username_field.clear(); + username_field.sendKeys(username); + + password_field.clear(); + password_field.sendKeys(password); + + //login_button.click(); + NAV.press_buttonByName("Sign in"); + + log.info("Logging in with Username=>"+username+"- Password=>"+password); + + return PageFactory.initElements(driver, Login.class); + } + + public Login loginWithAD(String username, String password) { + loginViaADLink.click(); + wait.waitForDisplayedElement(emailADLogin, 10); + emailADLogin.sendKeys(username); + submitAD.click(); + + wait.waitForDisplayedElement(passwordADLogin, 10); + passwordADLogin.sendKeys(password); + submitAD.click(); + + // There is an additional step where AD asks if you'd like to stay logged in + wait.waitForDisplayedElement(submitAD, 10); + submitAD.click(); + + return PageFactory.initElements(driver, Login.class); + } + + public Login login() throws Throwable { + String username = ReadProperties.main("username"); + log.info("*** NORM User *** => No Username provided, using username provided from properties =>"+username); + login(username, ReadProperties.main("password")); + + return PageFactory.initElements(driver, Login.class); + } + + public Login loginAdmin() throws Throwable { + String username = ReadProperties.main("admin_username"); + log.info("*** ADMIN USER *** => No Username provided, using username provided from properties =>"+username); + login(username, ReadProperties.main("admin_password")); + + return PageFactory.initElements(driver, Login.class); + } + + public Login passwordReset(String newPassword, String confirmPassword) throws Throwable { + + newPassword_field.sendKeys(newPassword); + confirmPassword_field.sendKeys(confirmPassword); + + log.info("Set New Password to =>"+newPassword); + log.info("Set Confirm Password to =>"+confirmPassword); + + try{ + wait.deactivateImplicitWait(); + confirm_button.click(); + wait.activateImplicitWait(); + } catch (Exception e) { + NAV.press_buttonByName("Confirm"); + } + log.info("Clicked on Continue button"); + + return PageFactory.initElements(driver, Login.class); + } + + public Login passwordReset(String password) throws Throwable { + wait.activateImplicitWait(); + passwordReset(password, password); + return PageFactory.initElements(driver, Login.class); + } + + public void authenticateAlert(String username, String password) { + Alert alert = driver.switchTo().alert(); + alert.sendKeys(username + Keys.TAB +password); + + } + + + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/MessageLoader.java b/src/main/java/cucumber/pageObjects/MessageLoader.java new file mode 100644 index 00000000..718a67aa --- /dev/null +++ b/src/main/java/cucumber/pageObjects/MessageLoader.java @@ -0,0 +1,324 @@ +package cucumber.pageObjects; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.List; + +import org.apache.chemistry.opencmis.client.api.CmisObject; +import org.apache.chemistry.opencmis.client.api.Session; +import org.apache.chemistry.opencmis.client.api.SessionFactory; +import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl; +import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException; +import org.apache.commons.io.FileUtils; +import org.apache.log4j.Logger; +import org.junit.Assert; + +import com.google.common.io.Files; + +import cucumber.testdata.DBConnection; +import cucumber.utils.AlfrescoUtils; +import cucumber.utils.ReadProperties; + +public class MessageLoader { + + private static Logger log = Logger.getLogger(MessageLoader.class); + + private DBConnection db; + private Connection conn; + private PreparedStatement pStmt = null; + + public boolean check_UUIDExists_inMGW(String GW_UUID) throws SQLException { + + db = new DBConnection(); + conn = db.getPostGresConnection("cp_mirror_gateway_db"); + + try { + + pStmt = conn.prepareStatement("select message_uuid as mu from cp_mirror_gateway_db.public.message_audit where message_uuid=?"); // SQL Statement here + pStmt.setString(1, GW_UUID); + + ResultSet rs = pStmt.executeQuery(); + + while (rs.next()) { + log.info("Saw UUID of =>" + rs.getString("mu") + "<= as expected"); + return true; + } + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } + finally { + pStmt.close(); + conn.close(); + } + log.info("Did not see UUID =>"+GW_UUID+"<= as expected"); + return false; + } + + public void check_UUIDExists_inSUBS(String GW_UUID) throws SQLException { + + db = new DBConnection(); + conn = db.getPostGresConnection("cp_subscriptionscheduler_db"); + + try { + + pStmt = conn.prepareStatement("select relates_to as mu from cp_subscriptionscheduler_db.public.message_audit where relates_to=?"); // SQL Statement here + pStmt.setString(1, GW_UUID); + + ResultSet rs = pStmt.executeQuery(); + + while (rs.next()) { + log.info("Saw relates_to of =>" + rs.getString("mu") + "<= as expected"); + return; + } + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } + finally { + pStmt.close(); + conn.close(); + } + log.info("Did not see UUID =>"+GW_UUID+"<= as expected"); + throw new Error("Did not see file name in table"); + } + public String grabUUID_fromGW_againstRelatesToCol(String relatesVal) throws SQLException { + db = new DBConnection(); + conn = db.getConnection(); + + try { + + pStmt = conn.prepareStatement("select MESSAGE_UUID from CP_SOAP_GATEWAY_OWNER.MESSAGE_AUDIT where relates_to=? order by MESSAGE_AUDIT_ID desc "); // SQL Statement here + pStmt.setString(1, relatesVal); + + ResultSet rs = pStmt.executeQuery(); + + while (rs.next()) { + log.info("Saw =>" + rs.getString("MESSAGE_UUID") + "<= for file with name =>" + relatesVal); + return rs.getString("MESSAGE_UUID"); + } + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message: " + e.getMessage()); + } + finally { + pStmt.close(); + conn.close(); + } + + return null; + } + + + public void clearWorkspace() throws IOException { + String workspace_location = ReadProperties.main("MessageLoader_workspace"); + log.info("Going to clear workspace located here =>"+workspace_location); + String git_command = "git --git-dir="+workspace_location+" --work-tree="+workspace_location+" clean -f"; + + Process rt = Runtime.getRuntime().exec(git_command); + + log.info("Directory Cleaned"); + } + + + public void emptyDirectory(String arg1) throws IOException { + String workspace_location = + ReadProperties.main("MessageLoader_workspace") + + arg1; + File workspace_dir = new File(workspace_location); + log.info("Going to clear the directory =>"+workspace_location); + try { + log.info("Saw =>"+new File(workspace_location).list().length+"<= files in the directory"); + } catch (Exception e) { + log.info("Empty Directory - Continuing"); + return; + } + FileUtils.cleanDirectory(workspace_dir); + + log.info("Cleared directory =>"+workspace_location); + + try { + log.info("Saw =>"+new File(workspace_location).list().length+"<= files in the directory"); + } catch (Exception e) { + log.info("Empty Directory - Continuing"); + return; + } + + } + + + public void create_blankFile_withName(String name, String directory) throws IOException { + log.info("Going to create an empty file with name =>"+name); + + File file = new File(ReadProperties.main("MessageLoader_workspace") + directory + name); + log.info("File Location =>"+ ReadProperties.main("MessageLoader_workspace") + directory + name); + file.createNewFile(); + + FileWriter writer = new FileWriter(file); + writer.write("Test data"); + writer.close(); + + } + + + public void delete_fromAlfresco(String fileName) { + String path = "/CrimePortal/" + fileName; + log.info("Going to delete file in location =>" + path); + + Session session = AlfrescoUtils.returnSession(); + CmisObject cmisObject = null; + try { + cmisObject = session.getObjectByPath(path); + } catch (CmisObjectNotFoundException e) { + log.info("Did not find object by path given =>" + path); + log.info("Continuing without error"); + return; + } + String id = cmisObject.getId(); + cmisObject.delete(); + log.info("Deleted Object"); + } + + + public void run_messageLoader() throws IOException, InterruptedException { + String workspace_location = ReadProperties.main("MessageLoader_workspace"); + log.info("Going to execute the messageLoader"); + ProcessBuilder pb; + Process pr; + try{ + pb = new ProcessBuilder( + "java.exe", + "-DconfigFilePath=config\\cp-ml-config.properties", + "-Dlog4j.configuration=file:config\\cp-ml-log4j.xml", + "-jar", "cp-messageloader.jar " + ); + pb.directory(new File(workspace_location)); + pb.redirectErrorStream(true); + pr = pb.start(); + + } catch (Exception e) { + pb = new ProcessBuilder( + "/usr/java/latest/bin/java", + "-DconfigFilePath=config/cp-ml-config.properties", + "-Dlog4j.configuration=file:config/cp-ml-log4j.xml", + "-jar", "/home/jenkins/artifacts/cp-messageloader.jar" + ); + + + log.info("Preparing to run in workspace =>"+workspace_location); + pb.directory(new File(workspace_location)); + pb.redirectErrorStream(true); + pr = pb.start(); + } + + + BufferedReader in = new BufferedReader(new InputStreamReader(pr.getInputStream())); + String line; + while ((line = in.readLine()) != null) { + log.info(line); + } + pr.waitFor(); + + in.close(); + + log.info("Message Loader ran"); + } + + + public void confirm_documentWithName_presentInMGW(String arg1) throws SQLException { + log.info("Going to check what the UUID is in the GW"); + + String GW_UUID = grabUUID_fromGW_againstRelatesToCol(arg1); + log.info("Going to check PostGres to confirm that UUID =>"+GW_UUID+"<= was sent to MGW"); + + //ConfirmPresent + Assert.assertTrue("Did not see UUID =>"+GW_UUID+"<= as expected in the MGW for relates_to with value =>"+arg1, + check_UUIDExists_inMGW(GW_UUID) + ); + log.info("UUID =>"+GW_UUID+"<= is present and behaving as expected"); + } + public void delete_fromGW_relatesEqual(String arg1) throws SQLException { + db = new DBConnection(); + conn = db.getConnection(); + + try { + + pStmt = conn.prepareStatement("delete from cp_soap_gateway_owner.message_audit where relates_to=?"); // SQL Statement here + pStmt.setString(1, arg1); + + ResultSet rs = pStmt.executeQuery(); + log.info("Cleaned up GW by deleting logs where file has name =>"+arg1); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } + finally { + pStmt.close(); + conn.close(); + } + } + + public void delete_fromSUBS_relatesEqual(String arg1) throws SQLException { + db = new DBConnection(); + conn = db.getPostGresConnection("cp_subscriptionscheduler_db"); + log.info("Going to delete the subscription audit rows with =>"+arg1); + + try { + + pStmt = conn.prepareStatement("delete from message_audit where relates_to=?"); // SQL Statement here + pStmt.setString(1, arg1); + + pStmt.executeUpdate(); + log.info("Cleaned up SUBS by deleting logs where file has name =>"+arg1); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } + finally { + pStmt.close(); + conn.close(); + } + } + + public Integer return_fileCount_inDirectory(String directory) { + log.info("Going to check files in directory =>"+directory); + Integer fileCount; + try { + fileCount = new File(directory).list().length; + log.info("Saw =>"+fileCount+"<= files in the directory"); + } catch (Exception e) { + log.info("Got an error checking how many files are in the directory - Returning 0 as assuming empty/does not exist"); + fileCount = 0; + } + return fileCount; + } + + public void confirm_fileCount_inDirectory(Integer fileCount, String directory) { + + String workspace_location = + ReadProperties.main("MessageLoader_workspace") + + directory; + + Assert.assertEquals(fileCount, + return_fileCount_inDirectory(workspace_location) + ); + } + + + +} diff --git a/src/main/java/cucumber/pageObjects/NavigationShared.java b/src/main/java/cucumber/pageObjects/NavigationShared.java new file mode 100644 index 00000000..e15385d4 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/NavigationShared.java @@ -0,0 +1,2104 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.DateManipulator; +import cucumber.utils.GenUtils; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedCondition; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.Select; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class NavigationShared { + private static WebDriver driver; + private static Logger log = Logger.getLogger(NavigationShared.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private String LOADING_ICON_LOCATION = "spinner"; + private GenUtils GU; + + + public NavigationShared(WebDriver driver) { + NavigationShared.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + GU = new GenUtils(driver); + + } + + @FindBy(id = "logoutNavBtn") + WebElement logout_button; + + @FindBy(id = "home") + WebElement home_link; + + @FindBy(id = "userProfileName") + WebElement userProfileName_link; + + @FindBy(id = "termsAndConditions") + WebElement termsAndConditions_link; + + @FindBy(id = "isUrgent") + WebElement urgentCheckbox; + + @FindBy(xpath="//table[@class='govuk-table']/thead/tr/th[1]") + WebElement JurorNumberLabel; + @FindBy(xpath="//table[@class='govuk-table']/thead/tr/th[2]") + WebElement JurorFirstNameLabel; + @FindBy(xpath="//table[@class='govuk-table']/thead/tr/th[3]") + WebElement JurorLastNameLabel; + @FindBy(xpath="//table[@class='govuk-table']/thead/tr/th[4]") + WebElement JurorCheckedInLabel; + + @FindBy(id = "checkOutTimeHour") + WebElement changeTimeCheckOut; + + + public NavigationShared accessLoginPage(String environment) { + String url; + + switch (environment.toLowerCase()) { + case "int": + url = ReadProperties.main("IntegrationEnvironment"); + break; + default: + throw new Error("Unexpected environment passed to me"); + } + + driver.navigate().to(url); + log.info("Navigated to =>" + url); + + wait.f_waitElementToClickable(driver.findElement(By.xpath("//button[contains(text(),'Login')]"))); // Redo + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public void accessLoginPage() throws Throwable { + log.info("No Environment Passed - Assuming Integration Environment"); + accessLoginPage("int"); + } + + public void accessAdminLoginPage() throws Throwable { + log.info("Assuming Integration Environment"); + + driver.navigate().to(ReadProperties.main("IntegrationEnvironment_ADMIN")); + log.info("Navigated to =>" + ReadProperties.main("IntegrationEnvironment_ADMIN")); + + wait.f_waitElementToClickable(driver.findElement(By.xpath("//button[contains(text(),'Login')]"))); // Redo + } + + + public void accessLoginPage(String publicBureau, String env) { + log.info("Going to access =>" + publicBureau + "<= for environment =>" + env + ""); + String url; + env = ReadProperties.systemPropertyEnvironmentOverrideCheck(env); + + url = ReadProperties.main(publicBureau.toLowerCase() + "_" + env.toLowerCase()) + "/?clang=en"; + + System.setProperty("env.database", env.toLowerCase()); + System.setProperty("envName", env.toLowerCase()); + + driver.get(url); + log.info("Navigated to the expected environment"); + } + + public void accessLoginPageWelsh(String publicBureau, String env) { + log.info("Going to access =>" + publicBureau + "<= for environment =>" + env + ""); + String url; + env = ReadProperties.systemPropertyEnvironmentOverrideCheck(env); + + url = ReadProperties.main(publicBureau.toLowerCase() + "_" + env.toLowerCase()) + "/?clang=cy"; + + System.setProperty("env.database", env.toLowerCase()); + System.setProperty("envName", env.toLowerCase()); + + driver.get(url); + log.info("Navigated to the expected environment"); + } + + public void clearCookies() throws InterruptedException { + driver.manage().deleteAllCookies(); //delete all cookies + Thread.sleep(7000); //wait 7 seconds to clear cookies. + } + + public void accessLoginPageExpenses(String publicBureau, String env) { + log.info("Going to access =>" + publicBureau + "<= for environment =>" + env + ""); + String url; + env = ReadProperties.systemPropertyEnvironmentOverrideCheck(env); + + url = ReadProperties.main(publicBureau.toLowerCase() + "_" + env.toLowerCase()); + + System.setProperty("env.database", env.toLowerCase()); + System.setProperty("envName", env.toLowerCase()); + + driver.get(url); + log.info("Navigated to the expected environment"); + } + + public void accessLoginPageWelshExpenses(String publicBureau, String env) { + log.info("Going to access =>" + publicBureau + "<= for environment =>" + env + ""); + String url; + env = ReadProperties.systemPropertyEnvironmentOverrideCheck(env); + + url = ReadProperties.main(publicBureau.toLowerCase() + "_" + env.toLowerCase()) + "/?clang=cy"; + + System.setProperty("env.database", env.toLowerCase()); + System.setProperty("envName", env.toLowerCase()); + + driver.get(url); + log.info("Navigated to the expected environment"); + } + + /** + * JM - Checks whether expected_text is presented anywhere on the page within the body tag + * If it exists, continues else fails the test with "Text not found!" appearing in the console + * + * @param expected_text + * @return + * @throws Throwable + */ + public NavigationShared textPresentOnPage(String expected_text) throws Throwable { + log.info("Going to check if text present on the page =>" + expected_text); + String bodyText = driver.findElement(By.tagName("body")).getText(); + try { + Assert.assertTrue("Text found!", bodyText.contains(expected_text)); + } catch (AssertionError e) { // Refactor this + log.info("Did not find text in initial run, waiting for up to 10 seconds for text to appear"); + try { + wait.waitForTextOnPage(expected_text); + } catch (Exception eb) { + log.info("Exception on wait for page... Trying to continue to get caught by assert"); + } + bodyText = driver.findElement(By.tagName("body")).getText(); + Assert.assertTrue("Did not see Expected Text =>" + expected_text, bodyText.contains(expected_text)); + } + + log.info("Saw Expected Text =>" + expected_text); + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public NavigationShared eligibilityErrorOnPage(String expected_text) throws Throwable { + log.info("Going to check if eligibility error is present on the page =>" + expected_text); + + WebElement eligibilityError = driver.findElement(By.xpath("//*[@class='govuk-error-message'][text()[contains(.,\"" + expected_text + "\")]]")); + eligibilityError.isDisplayed(); + + log.info("Saw Expected Text =>" + expected_text); + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public NavigationShared textNotPresentOnPage(String not_expected) { + log.info("Going to check text is not present on the page =>" + not_expected); + String bodyText = driver.findElement(By.tagName("body")).getText(); + try { + Assert.assertFalse("Text Found when not expected!", bodyText.contains(not_expected)); + } catch (AssertionError e) { // Refactor this + log.info("Found text in initial run, waiting additional 2 seconds incase it disappears"); + wait.waitForTextInvisibility(not_expected, 2); + + bodyText = driver.findElement(By.tagName("body")).getText(); + Assert.assertFalse("Text found when not expected!", bodyText.contains(not_expected)); + } + + log.info("Did not see unexpected Text =>" + not_expected); + + return PageFactory.initElements(driver, NavigationShared.class); + + } + + + public NavigationShared press_navigationButton(String button) throws Throwable { + + switch (button) { + case "forward": + driver.navigate().forward(); + log.info("Pressed forward button on browser"); + break; + case "backward": + driver.navigate().back(); + log.info("Pressed backward button on browser"); + break; + case "back": + driver.navigate().back(); + log.info("Pressed back button on browser"); + break; + case "refresh": + driver.navigate().refresh(); + log.info("Refreshed the browser"); + break; + default: + throw new Error("You did not give me an expected value. I received =>" + button); + } + + return PageFactory.initElements(driver, NavigationShared.class); + } + + /** + * JM - This needs reworking - finding by name is not appropriate. Needs to be by exact text description + * + * @param location_name + * @return + */ + public WebElement find_locationParent(String location_name) { + WebElement parentLocation; // Refactor the below to have both selects in one xpath - Could not do ti quickly + wait.deactivateImplicitWait(); + try { + parentLocation = return_oneVisibleFromList(driver.findElements(By.xpath( + "//label[text()[contains(., '" + location_name + "')]]/.." + + "| " + + "//label/strong[text()[contains(., '" + location_name + "')]]/.." + + " | " + + "//strong[text()[contains(., '" + location_name + "')]]/.." + ))); + wait.activateImplicitWait(); + } catch (Exception e) { + wait.activateImplicitWait(); + parentLocation = driver.findElement(By.xpath( // Investigate purpose of second catch instea dof one liner - Put select/option in it due to this because of implicit wait + "//label[contains(normalize-space(text()), '" + location_name + "')]" + + " | " + + "//select/option[@value='' and text()[contains(.,\"" + location_name + "\")]]" + )) + .findElement(By.xpath("..")); + } + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); + wait.until(ExpectedConditions.visibilityOf(parentLocation)); + + return parentLocation; + } + + public WebElement find_inputBy_labelName(String label_name) throws Exception { + WebElement child = null; + wait.deactivateImplicitWait(); + try { + By childXpath = By.xpath("//*[@id=(" + + "//label[text()[(normalize-space(.)=\"" + + label_name + + "\")]]" + + "/@for)]"); + + log.info(childXpath); + child = return_oneVisibleFromList(driver.findElements(childXpath), true); + } catch (Exception e) { + try { + child = return_oneVisibleFromList(driver.findElements(By.xpath( + "//*[@id=(" + + "//label[text()[contains(.,\"" + + label_name + + "\")]]" + + "/@for)]" + ))); + } catch (Exception b) { + try { + child = return_oneVisibleFromList(driver.findElements(By.xpath( + "//*[@id=(" + + "//label/strong[text()[contains(.,\"" + + label_name + + "\")]]/.." + + "/@for)]" + + " | " + + "//*[@id=(" + + "//label/span[text()[contains(.,\"" + + label_name + + "\")]]/.." + + "/@for)]" + + ))); + } catch (Exception c) { + log.info("looking for input field following label"); + child = return_oneVisibleFromList(driver.findElements(By.xpath( + "//*[./*[text()[contains(., '" + label_name + "')]]]" + "//textarea"))); + } + } + } + return child; + + } + + public NavigationShared set_valueTo(String location_name, String value) throws Throwable { + //WebElement parentLocation = find_locationParent(location_name); + //WebElement childField = parentLocation.findElement(By.cssSelector("input")); + WebElement childField; + try { + childField = find_inputBy_labelName(location_name); + + //added to address the fact chris's push includes his test data hard coded into log on fields + childField.clear(); + + } catch (Exception e) { + wait.activateImplicitWait(2); + childField = return_oneVisibleFromList( + driver.findElements(By.xpath( + "//label[text()[contains(., \"" + location_name + "\")]]//input" + + " | " + + "//textarea[@name=\"" + location_name + "\"]" + + " | " + + "//label[text()[contains(., \"" + location_name + "\")]]/../textarea" + )) + ); + } + + childField.clear(); + childField.sendKeys(value); + + if (DateManipulator.isValidDate(value)) + childField.sendKeys(Keys.TAB); + + log.info("Set input field with label =>" + location_name + "<= to =>" + value); + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public NavigationShared compare_valueTo(String location_name, String expected_value) throws Throwable { + //WebElement parentLocation = find_locationParent(location_name); + // This assumes we are checking inputs - May need to amend + String current_value; + try { + current_value = find_inputBy_labelName(location_name).getAttribute("value"); + } catch (Exception e) { + try { + current_value = return_oneVisibleFromList( + driver.findElements(By.xpath( + "//textarea[@name=\"" + location_name + "\"]" + + " | " + + "//label[text()[contains(., \"" + location_name + "\")]]/../textarea" // TODO Modify this to put it into find_inputBy_labelNAme, duplication of code + )) + ).getAttribute("value"); + assertEquals(current_value, expected_value); + + } catch (Exception | AssertionError ae) { + log.info("Unable to find current_value the new way. Trying the old way"); + WebElement parent = find_locationParent(location_name); + wait.deactivateImplicitWait(); + try { + current_value = parent + .findElement(By.cssSelector("input")) + .getAttribute("value"); + } catch (Exception b) { + current_value = parent + .findElement(By.cssSelector("span")) + .getText(); + } + } + } + + log.info("Current value =>" + current_value); + + assertEquals(current_value, expected_value); + log.info("Saw Expected Value =>" + expected_value); + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public List getButtonsByExactText(String text) { + List buttons = driver.findElements(By.xpath( + "//button[normalize-space()='" + text + "']" + + "|" + + "//button//span[normalize-space()='" + text + "']" + + "|" + + "//a[contains(@class ,'button') and normalize-space()='" + text + "']" + + "|" + + "//input[contains(@class ,'button') and (@value=\"" + text + "\")]" + )); + return buttons; + } + public NavigationShared check_Jurorcheckbox(String Juror_no) { + try { + WebElement checkbox = driver.findElement(By.xpath("//input[@value='" + Juror_no + "']")); + + log.info("Checkbox " + Juror_no + " checked:" + checkbox.isSelected()); + checkbox.click(); + log.info("Clicked on checkbox with for, checking if checked"); + if (checkbox.isSelected()) { + log.info("Return"); + return null; + } + + } catch (Exception e) { + log.error(e.getMessage()); + } + return PageFactory.initElements(driver, NavigationShared.class); + } + + public NavigationShared press_buttonByName(String button_name) throws Throwable { + log.info("Going to press button with name =>" + button_name); + wait.activateImplicitWait(); + WebElement button; + + List buttons = driver.findElements(By.xpath( + "//button[text()[contains(., '" + button_name + "')]]" + + "|" + + "//button//span[text()[contains(., '" + button_name + "')]]" + + "|" + + "//a[contains(@class ,'button') and text()[contains(., '" + button_name + "')]]" + + "|" + + "//input[contains(@class ,'button') and (@value='" + button_name + "')]" + )); + wait.deactivateImplicitWait(); + log.info("Buttons: " + buttons); + try { + button = return_oneVisibleFromList(buttons); + } catch (Exception | Error e) { + log.error("unexpected exception when waiting for element to be clickable", e); + button = return_oneVisibleFromList(getButtonsByExactText(button_name)); + } + + try { // Investigate purpose of this + wait.waitForClickableElement(button, 10); + } catch (Exception e) { + log.error("unexpected exception when waiting for element to be clickable", e); + } + + try { + button.click(); + } catch (Exception e) { + + log.info("Could not do initial click on element - Going to move to element then try again", e); + + Actions action = new Actions(driver); + action.moveToElement(button).click().perform(); + + log.info("Move to element action successful"); + } + + log.info("Clicked on button with name =>" + button_name); + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public NavigationShared refreshPage() { + + driver.navigate().refresh(); + log.info("Refreshed the page"); + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public void checkUrgentCheckbox() { + try { + urgentCheckbox.click(); + log.info("Urgent checkbox checked:" + urgentCheckbox.isSelected()); + urgentCheckbox.sendKeys(Keys.chord("", Keys.TAB)); + } catch (Exception e) { + log.error(e.getMessage()); + } + } + + public NavigationShared check_checkbox(String location_name) { + try { + WebElement checkbox = find_inputBy_labelName(location_name); + log.info("Checkbox " + location_name + " checked:" + checkbox.isSelected()); + checkbox.click(); + checkbox.sendKeys(Keys.chord("", Keys.TAB)); + log.info("Clicked on checkbox with for, checking if checked"); + log.info("Checkbox " + location_name + " checked:" + checkbox.isSelected()); + if (checkbox.isSelected()) { + log.info("Return"); + return null; + } + + } catch (Exception e) { + log.error(e.getMessage()); + } + log.info("Continue... searching by xpath"); + WebElement checkbox_location = driver.findElement(By.id( + //"//label[contains(normalize-space(text()), '"+location_name+"')]/input" + //"//label[text()[contains(., \""+location_name+"\")]]/input" + //DB test for new bureau filter checkboxes + location_name) + ); + + click_onElement(checkbox_location); //.click(); + + //wait.toBeSelected(checkbox_location); + + //Boolean selectedCheck = checkbox_location.isSelected(); // Does this prove it is a checkbox? + + //.waitForClickableElement(checkbox_location,2); + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public NavigationShared uncheck_checkbox(String location_name) { + try { + WebElement checkbox = find_inputBy_labelName(location_name); + log.info("Checkbox " + location_name + " checked:" + checkbox.isSelected()); + + if (checkbox.isSelected()) { + checkbox.click(); + } else { + log.info("Return"); + return null; + } + + } catch (Exception e) { + log.error(e.getMessage()); + } + log.info("Continue... searching by xpath"); + WebElement checkbox_location = driver.findElement(By.xpath( + "//label[text()[contains(., \"" + location_name + "\")]]/input" + )); + + if (checkbox_location.isSelected()) { + checkbox_location.click(); + } else { + log.info("Return"); + return null; + } + + + return PageFactory.initElements(driver, NavigationShared.class); + } + + public void waitForPageLoad() { + waitForPageLoad(7, 120); + } + + public void waitForPageLoad(int waitTime) { + waitForPageLoad(2, waitTime); + } + + /** + * Overloading with wait time passed - For increased waiting when required + */ + public void waitForPageLoad(int initialWait, int postWait) { + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(initialWait)); + try { + wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(LOADING_ICON_LOCATION))); + log.info("Saw Loading Icon"); + } catch (Exception e) { + log.info("Did not catch the loading icon as expected - Continuing without error. Expected?"); + return; + } + + try { + wait = new WebDriverWait(driver, Duration.ofSeconds(postWait)); + invisibilityOfElement(By.cssSelector(LOADING_ICON_LOCATION), wait); + log.info("Loading icon now gone - Continuing"); + } catch (Exception e) { + log.info("Loading icon still here? After " + postWait + " seconds - Something has gone wrong, but going to continue"); + } + } + + public void invisibilityOfElement(By by, WebDriverWait wait) { + wait.until(ExpectedConditions.invisibilityOfElementLocated(by)); + } + + public void visibilityOfElement(By by, WebDriverWait wait) { + wait.until(ExpectedConditions.visibilityOfElementLocated(by)); + } + + /** + * JM - Not applicable for JD, remove + * + * @throws InterruptedException + */ + public void waitForAngularLoad() throws InterruptedException { + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(15)); + JavascriptExecutor jsExec = (JavascriptExecutor) driver; + try { + String angularReadyScript = "return angular.element(document).injector().get('$http').pendingRequests.length === 0"; + + ExpectedCondition angularLoad = driver -> Boolean.valueOf(((JavascriptExecutor) driver) + .executeScript(angularReadyScript).toString()); + + boolean angularReady = Boolean.valueOf(jsExec.executeScript(angularReadyScript).toString()); + + if (!angularReady) { + Thread.sleep(10); + wait.until(angularLoad); + } + log.info("Page Loaded"); + } catch (Exception e) { + log.info("Something went wrong when checking if Angular has loaded... Ignoring for now"); + } + + } + + public void click_link_by_text(String arg1) { + WebElement linkText; + + try { + linkText = return_oneVisibleFromList(driver.findElements(By.linkText(arg1)), true); + } catch (Exception e) { + wait.activateImplicitWait(); + linkText = driver.findElement(By.xpath("//*[text()[contains(., \"" + arg1 + "\")]]")); + } +// wait.waitForClickableElement(linkText); + wait.activateImplicitWait(); + click_onElement(linkText); + + log.info("Clicked on URL with link text =>" + arg1); + } + + public void linkText_visible(String arg1, boolean b) { + log.info("Going to check whether link text =>" + arg1 + "<= is present on the page"); + wait.deactivateImplicitWait(); + boolean visible; + try { + driver.findElement(By.partialLinkText(arg1)); + visible = true; + } catch (Exception e) { + visible = false; + } + + if (b == visible) { + log.info("Link text present =>" + b + "<= which is expected"); + } else { + throw new Error("Link text present =>" + b + "<= which is not expected"); + } + wait.activateImplicitWait(); + } + + public void radio_button_not_visible(String radioButtonNotExpected) { + log.info("Going to check whether link radio button =>" + radioButtonNotExpected + "<= is present on the page"); + wait.deactivateImplicitWait(); + String bodyText = driver.findElement(By.tagName("input")).getText(); + try { + Assert.assertFalse("Radio button found when not expected!", bodyText.contains(radioButtonNotExpected)); + } catch (AssertionError e) { // Refactor this + log.info("Found text in initial run, waiting additional 2 seconds incase it disappears"); + wait.waitForTextInvisibility(radioButtonNotExpected, 2); + + bodyText = driver.findElement(By.tagName("body")).getText(); + Assert.assertFalse("Text found when not expected!", bodyText.contains(radioButtonNotExpected)); + } + + log.info("Did not see unexpected Text =>" + radioButtonNotExpected); + + } + + public void checkBox_Checked(String checkboxlabel, boolean expected) { + log.info("Going to check whether check box is checked =>" + checkboxlabel + "<= which is expected"); + wait.deactivateImplicitWait(); + boolean checked; + try { + WebElement checkbox = find_inputBy_labelName(checkboxlabel); + checked = checkbox.isSelected(); + } catch (Exception e) { + checked = false; + } + + if (expected == checked) { + log.info("Checkbox is checked =>" + expected + "<= which is expected"); + } else { + throw new Error("Checkbox is unchecked =>" + expected + "<= which is not expected"); + } + wait.activateImplicitWait(); + } + + public Boolean contain_icon(WebElement element) { + wait.deactivateImplicitWait(); + try { + element.findElement(By.cssSelector("span")); + log.info("Found an element with 'span' in the element passed"); + return true; + } catch (Exception e) { + log.info("Did not find an element with 'span' in the element passed"); + return false; + } + } + + public void select_fromDropdown(String option_value, String dropdown_name) { +// WebElement dropdown_location = find_inputBy_labelName(dropdown_name); + WebElement child; + try { + child = find_inputBy_labelName(dropdown_name); + } catch (Exception e) { + child = find_locationParent(dropdown_name); + // This blocks needs investigating to see whether to see if it is required, and whether it needs the try/catch or just what is in the catch + try { + if (!child.getTagName().equalsIgnoreCase("select"))// Refactor dropdown logic for global + child = child.findElement(By.cssSelector("select")); + } catch (Exception b) { + log.info("******* Investigate if this is actually hit"); + child = driver.findElement(By.xpath("..")); + if (!child.getTagName().equalsIgnoreCase("select"))// Refactor dropdown logic for global + child = child.findElement(By.cssSelector("select")); + } + } + + log.info("Found dropdown with name =>" + dropdown_name); + + Select select = new Select(child); + + select.selectByVisibleText(option_value); + log.info("Selected =>" + option_value + "<= from the dropdown with name =>" + dropdown_name); + + } + + public void select_fromDashboardDropdown(String option_value, String dropdown_name) { + WebElement child; + child = driver.findElement(By.id(dropdown_name)); + + log.info("Found dropdown with name =>" + dropdown_name); + + Select select = new Select(child); + + select.selectByVisibleText(option_value); + log.info("Selected =>" + option_value + "<= from the dropdown with name =>" + dropdown_name); + } + + // DB testing + public void new_select_fromDropdown(String option_value, String dropdown_name) { + try { + WebElement child; + child = driver.findElement(By.xpath("//label[text()[contains(., '" + dropdown_name + "')]]")); + + log.info("Found dropdown with name =>" + dropdown_name); + + Select select = new Select(child); + select.selectByVisibleText(option_value); + log.info("Selected =>" + option_value + "<= from the dropdown with name =>" + dropdown_name); + } catch (Exception e) { + log.info("Did not find an element with 'span' in the element passed"); + } + } + + public void generic_searchForText(String searchText) { + WebElement searchInput = driver.findElement(By.id("userSearch")); + + searchInput.sendKeys(searchText); + log.info("Found search field and sent it =>" + searchText); + + } + + public void generic_clickOnElementWithId(String Id) { + log.info("Clicking on element with id =>" + Id); + WebElement element = driver.findElement(By.id(Id)); + + element.click(); + log.info("Clicked on element with id =>" + Id); + + } + + /** + * Move this to another location + */ + public void waitForDocumentReady() { + + try { + new WebDriverWait(driver, Duration.ofSeconds(10)).until( + webDriver -> ((JavascriptExecutor) webDriver).executeScript("return document.readyState").equals("complete")); + log.info("Page ready -> Continuing"); + } catch (Exception e) { + log.info("Exception on waiting for document ready state -> Continuing without error"); + } + } + + public void waitforDocumentLoading() { + try { + new WebDriverWait(driver, Duration.ofSeconds(5)).until( + webDriver -> ((JavascriptExecutor) webDriver).executeScript("return document.readyState").equals("loading")); + log.info("Page ready -> Continuing"); + } catch (Exception e) { + log.info("Exception on waiting for document ready state -> Continuing without error"); + } + } + + public void click_onElement(WebElement element) { + waitForDocumentReady(); + try { + element.click(); + log.info("Clicked on element as normal - Continuing"); + return; + } catch (Exception e) { + log.info("Unable to click on element using Selenium, trying via Javascript. Element is =>" + element); + ((JavascriptExecutor) driver).executeScript("arguments[0].click();", element); + log.info("Clicked on element using javascript - Continuing"); + } + waitForDocumentReady(); + } + + public void MoveTo_click_onElement(WebElement element) { + Actions act = new Actions(driver); + new WebDriverWait(driver, Duration.ofSeconds(60)).until(ExpectedConditions.and( + ExpectedConditions.visibilityOf(element), ExpectedConditions.elementToBeClickable(element))); + + try { + act.moveToElement(element).moveToElement(element).click().build().perform(); + log.info("Performed click to move successfully for WebElement =>" + element); + } catch (Exception e) { + log.warn("Failed move to click, trying generic click on Element"); + click_onElement(element); + } + } + + public void selectCheckbox_forRowWithText(String column, String rowText) { + + String checkboxId = null; + if (column.equalsIgnoreCase("suspend")) { + checkboxId = "//input[starts-with(@id, 'suspendCheckbox')]"; + } else if (column.equalsIgnoreCase("delete")) { + checkboxId = "//input[starts-with(@id, 'deleteCheckbox')]"; + } else if (column.equalsIgnoreCase("deleted")) { + checkboxId = "//input[starts-with(@id, 'deleteCheckbox')]"; + } else { + throw new Error("Did not get a checkbox lookup that we were epxecting. Currently expecting either suspend or deleted"); + } + + log.info("Looking for checkbox called =>" + column + "<= for row with text =>" + rowText); + + List textMatches = driver.findElements(By.xpath( + "//a[text()[contains(., '" + rowText + "')]]" + )); + + if (textMatches.size() > 1) { + log.info("Found more than one element with this text - We dont know which one to use"); + throw new Error("Which button do you want me to press?"); + } + + + checkboxId = "//a[text()[contains(., '" + rowText + "')]]/../../.." + checkboxId; + log.info(checkboxId); + WebElement checkbox = driver.findElement(By.xpath(checkboxId)); + //dcheckbox.click(); + click_onElement(checkbox); + + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(2)); + try { + wait.until(ExpectedConditions.elementToBeSelected(checkbox)); + } catch (Exception e) { + log.info("Exception waiting for element to be selected - Going to continue anyway to be caught downstream"); + } + + log.info("Checked the =>" + column + "<= checkbox for row with text =>" + rowText); + + } + + public void confirmCheckbox_forRowWithText(String column, String rowText, String checkedUnchecked) { + + String checkboxId = null; + if (column.equalsIgnoreCase("suspend")) { + checkboxId = "//input[starts-with(@id, 'suspendCheckbox')]"; + } else if (column.equalsIgnoreCase("delete")) { + checkboxId = "//input[starts-with(@id, 'deleteCheckbox')]"; + } else if (column.equalsIgnoreCase("deleted")) { + checkboxId = "//input[starts-with(@id, 'deleteCheckbox')]"; + } else { + throw new Error("Did not get a checkbox lookup that we were epxecting. Currently expecting either suspend or deleted"); + } + + log.info("Looking for checkbox called =>" + column + "<= for row with text =>" + rowText); + + List textMatches = driver.findElements(By.xpath( + "//a[text()[contains(., '" + rowText + "')]]" + )); + + if (textMatches.size() > 1) { + log.info("Found more than one element with this text - We dont know which one to use"); + throw new Error("Which button do you want me to press?"); + } + checkboxId = "//a[text()[contains(., '" + rowText + "')]]/../../.." + checkboxId; + + WebElement checkbox = driver.findElement(By.xpath(checkboxId)); + + //WebElement checkbox = textMatches.get(0).findElement(checkboxId); + if (checkbox.isSelected() && checkedUnchecked.equalsIgnoreCase("checked")) { + + } else if (!checkbox.isSelected() && !checkedUnchecked.equalsIgnoreCase("checked")) { + + } else { + throw new Error("Seems that the checkbox isn't set as expected! Failing"); + } + } + + public void select_fromDropdown(String option) throws Exception { + List dropdowns = driver.findElements(By.cssSelector("select")); + WebElement dropdown = return_oneVisibleFromList(dropdowns); + + Select selector = new Select(dropdown); + selector.selectByVisibleText(option); + log.info("Selected =>" + option + "<= from the dropdown"); + } + + private WebElement return_oneVisibleFromList(List dropdowns) throws Exception { + return return_oneVisibleFromList(dropdowns, false); + } + + public WebElement return_oneVisibleFromList(List dropdowns, Boolean overrideReturn) throws Exception { + int count = 0; + WebElement uniqueDropdown = null; + if (dropdowns.size() == 1) + return dropdowns.get(0); + for (WebElement dropdown : dropdowns) { + try { + if (dropdown.isDisplayed()) { + count += 1; + if (uniqueDropdown == null) + uniqueDropdown = dropdown; + } + } catch (Exception e) { + log.info("Received error when checking whether element was displayed"); + log.info(e); + } + } + + if (count == 0) + throw new Exception("Did not get any elements from list when expected to return 1 visible element"); + else if (overrideReturn) + return uniqueDropdown; + else if (count > 1) + throw new Exception("Got more than 1 displayed element - Which one do you want me to use?"); + log.info("Received =>" + dropdowns.size() + "<= elements to check and returned one visible element"); + return uniqueDropdown; + + } + + public void element_byText_hasClass(String text, String containsClass) throws Exception { + log.info("Going to check whether =>" + text + "<= has class =>" + containsClass); + return_oneVisibleFromList(driver.findElements(By.xpath( + "//*[text()[(normalize-space(.)='" + text + "')] and contains(@class ,\"" + containsClass + "\")]" + ))); + } + + public WebElement getBlock_byHeadingText(String text) { + wait.activateImplicitWait(); + log.info("Looking for header block with text =>" + text); + WebElement headerBlock = driver.findElement(By.xpath( + "//legend/strong[text()[(normalize-space(.)=" + + "'" + text + "'" + + ")]]//ancestor::fieldset" + + " | " + + "//h1[contains(text(), '+" + text + "')]/..//nav" + )); + wait.deactivateImplicitWait(); + + return headerBlock; + } + + public WebElement getBlock_byHeadingTextExpenses(String text) { + wait.activateImplicitWait(); + log.info("Looking for header block with text =>" + text); + WebElement headerBlock = driver.findElement(By.xpath( + "//details/div/p[normalize-space()=" + + "'" + text + "']")); + wait.deactivateImplicitWait(); + + return headerBlock; + } + + // #DB new for new bureau + public WebElement getBlock_byHeadingTextBureau(String text) { + wait.activateImplicitWait(); + log.info("Looking for header block with text =>" + text); + + try { + WebElement headerBlock = driver.findElement(By.xpath( + "//h2[contains(text(),'" + text + "')]" + + "|" + + "//caption[normalize-space()=" + + "'" + text + "']")); + return headerBlock; + } catch (Exception e) { + WebElement headerBlock = driver.findElement(By.xpath( + "//h1[normalize-space()=" + + "'" + text + "']")); + return headerBlock; + } + + + } + + public WebElement getBlock_byHeadingTextLabel(String text) { + wait.activateImplicitWait(); + log.info("Looking for header block with text =>" + text); + WebElement headerBlock = driver.findElement(By.xpath( + "//fieldset/div/label[normalize-space()=" + + "'" + text + "']")); + wait.deactivateImplicitWait(); + + return headerBlock; + } + + public void seeText_underHeadingBlock(String text, String header) { + log.info("Going to see if =>" + text + "<= is present under header block with text =>" + header); + getBlock_byHeadingText(header).getText().contains(text); + log.info("Found text =>" + text + "<= under header =>" + header); + + } + + public void seeText_underHeadingBlockExpenses(String text, String header) { + log.info("Going to see if =>" + text + "<= is present under header block with text =>" + header); + getBlock_byHeadingTextExpenses(header).getText().contains(text); + log.info("Found text =>" + text + "<= under header =>" + header); + + } + + public void seeText_underHeadingBlockBureau(String text, String header) { + log.info("Going to see if =>" + text + "<= is present under header block with text =>" + header); + getBlock_byHeadingTextBureau(header).getText().contains(text); + log.info("Found text =>" + text + "<= under header =>" + header); + + } + + public void doNotSeeText_underHeadingBlock(String text, String header, boolean b) { + log.info("Going to check that =>" + text + "<= is not present under header block with text =>" + header); + getBlock_byHeadingTextExpenses(header).getText().contains(text); + log.info("Did not Found text =>" + text + "<= under header =>" + header); + boolean visible; + try { + driver.findElement(By.partialLinkText(header)); + visible = true; + } catch (Exception e) { + visible = false; + } + + if (b = !visible) { + log.info("text not present =>" + b + "<= which is expected"); + } else { + throw new Error("Link text present =>" + b + "<= which is not expected"); + } + wait.activateImplicitWait(); + } + + public void seeText_underHeadingBlockLabel(String text, String header) { + log.info("Going to see if =>" + text + "<= is present under header block with text =>" + header); + getBlock_byHeadingTextLabel(header).getText().contains(text); + log.info("Found text =>" + text + "<= under header =>" + header); + + } + + public void clickText_underHeadingBlock(String linkText, String header) { + log.info("Going to click on link with text =>" + linkText + "<= under header block with text =>" + header); + getBlock_byHeadingText(header).findElement(By.linkText(linkText)).click(); + log.info("Clicked on =>" + linkText + "<= under header with title =>" + header); + } + + private WebElement findRow_withText(String textInRow) throws Exception { + return return_oneVisibleFromList( + driver.findElements(By.xpath( + "//table//tr//td[contains(text(),\"" + textInRow + "\")]//ancestor::tr" + + " | " + + "//table//tr//td/a[contains(text(),\"" + textInRow + "\")]//ancestor::tr" + )) + ); + } + + //New See in Same Row + public void seeText_inSameRow_asText_Two(String searchText, String nextToText) { + log.info("seeText_inSameRow_asText " + searchText + ", " + nextToText); + + String ddId = ""; + + switch (nextToText) { + case "Name": + case "Enw": + ddId = "name"; + break; + case "Your name": + ddId = "thirdPartyName"; + break; + case "Your relationship to the summoned": +// case "Eich perthynas â'r unigolyn a gafodd yr wŷs": + case "Eich perthynas ": + ddId = "thirdPartyRelationship"; + break; + case "Address": + case "Cyfeiriad": + ddId = "adress"; + break; + case "Main phone": + case "Prif rif ffôn": + ddId = "primaryPhone"; + break; + case "Your main phone number": + ddId = "thirdPartyMainPhone"; + break; + case "Another phone (optional)": + case "Rhif ffôn arall (dewisol)": + ddId = "secondaryPhone"; + break; + case "Email": + case "E-bost": + ddId = "emailAddress"; + break; + case "Your email address": + ddId = "thirdPartyEmailAddress"; + break; + case "Your reason for replying on behalf of the juror": + ddId = "thirdPartyReason"; + break; + case "Date of birth": + case "Date of Birth:": + case "Dyddiad geni": + ddId = "dateOfBirth"; + break; + case "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?": + case "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?": + case "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?": + case "A yw'r unigolyn rydych yn ymateb ar ei ran wedi byw yn y Deyrnas Unedig, Ynysoedd y Sianel neu Ynys Manaw am gyfnod parhaus o bum mlynedd neu fwy ers ei ben-blwydd yn 13 oed?": + ddId = "answerLivedConsecutive"; + break; + case "Are you being detained, looked after or treated under the Mental Health Act?": + case "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?": + case "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?": + case "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?": + ddId = "mentalHealthSectionedAnswer"; + break; + case "Has it been decided that you 'lack mental capacity'?": + case "Has it been decided that the person you're replying for 'lacks mental capacity'?": + case "A benderfynwyd nad oes gennych y gallu meddyliol?": + ddId = "mentalHealthCapacityAnswer"; + break; + case "Are you currently on bail for a criminal offence?": + case "Is the person currently on bail for a criminal offence?": + case "ar hyn o bryd am gyflawni trosedd?": + case "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?": + case "A yw'r unigolyn ar fechn": + ddId = "onBailAnswer"; + break; + case "Have you been convicted of a criminal offence and been given a sentence?": + case "Has the person been convicted of a criminal offence and been given a sentence?": + case "Ydych chi wedi'ch cael yn euog o drosedd?": + case "A yw'r unigolyn wedi'i gael yn euog o drosedd?": + ddId = "convictionAnswer"; + break; + case "Confirm the date of your jury service": + case "Gwiriwch eich dyddiad dechrau": + ddId = "answerConfirmDate"; + break; + case "Explain why you wish to change the date of your jury service": + case "Eglurwch pam eich bod angen newid dyddiad eich gwasanaeth rheithgor": + ddId = "answerDeferralReason"; + break; + case "Give us 3 dates you could start jury service during the next 12 months": + case "Nodwch dri dyddiad yn y 12 mis nesaf pan fyddwch ar gael i ddechrau gwasanaethu ar reithgor": + ddId = "answerDeferralDates"; + break; + case "Say why you need to be excused from jury service": + case "Eglurwch pam na allwch chi wasanaethu ar reithgor yn ystod y 12 mis nesaf": + ddId = "answerExcusalReason"; + break; + case "Have you worked in the criminal justice system in the last 5 years?": + case "Now or in the last 5 years, has the person you're replying for worked for the Police Force, HM Prison Service, the National Crime Agency or any prosecuting authority?": + case "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?": + case "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?": + ddId = "answerCJSEmployed"; + break; + case "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your Jury Service?": + case "A oes gennych anabledd neu nam sy'n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnoch yn yr adeilad llys ble fyddwch yn cyflawni eich gwasanaeth rheithgor?": + ddId = "answerAdjustments"; + break; + case "Tell us about any special arrangements or help you need while you're doing jury service": + case "Rhowch wybod inni am unrhyw drefniadau arbennig bydd arnoch angen wrth ichi wasanaethu ar reithgor.": + ddId = "assistanceSpecialArrangements"; + break; + case "Does the person have a disability or impairment that means they'll need extra support or facilities in the court building where they are doing jury service?": + case "A oes gan yr unigolyn anabledd neu nam sy'n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnynt yn yr adeilad llys lle byddant yn cyflawni'r gwasanaeth rheithgor?": + ddId = "answerCJSEmployed"; + break; + case "Tell us about any special arrangements or help the person you're answering for needs while they're doing jury service": + case "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddynt wasanaethu ar reithgor.": + ddId = "assistanceSpecialArrangements"; + break; + case "A ydych chi yn, neu a ydych chi wedi gweithio i’r Heddlu, Gwasanaeth Carchardai EM, yr Asiantaeth Troseddu Cenedlaethol neu unrhyw awdurdod erlyn yn y 5 mlynedd diwethaf?": + ddId = "answerAdjustments"; + break; +// Expenses Check Your Answers + + case "Will you lose income?": +// case "": + ddId = "earnings"; + break; + case "Do you earn more than ": +// case "": + ddId = "earningsThreshold"; + break; + case "How much do you earn each day?": +// case "": + ddId = "earningsAmount"; + break; + case "Extra costs you wouldn't normally have?": +// case "": + ddId = "extraCosts"; + break; + case "Total value of extra costs": +// case "": + ddId = "extraCostsAmount"; + break; + case "How will you travel to court?": +// case "": + ddId = "travelType"; + break; + case "Miles by bicycle each day": +// case "": + ddId = "travelBicycle"; + break; + case "Miles by car each day": +// case "": + ddId = "travelCar"; + break; + case "Miles by motorcycle each day": +// case "": + ddId = "travelMotorcycle"; + break; + case "Cost of public transport each day": + case "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd": + ddId = "travelPublicTransport"; + break; + +// #bureau + case "Disability or impairment": + ddId = "disability"; + break; + case "Special arrangements or help the juror needs": + ddId = "reasonableAdjustment"; + break; + + } + WebElement element = driver.findElement(By.id(ddId)); + + assertTrue("nextToText is not correct", element.getText().contains(searchText)); + + log.info("Found =>" + ddId); + log.info("Found =>" + searchText); + } + + //Old See in Same Row + public void seeText_inSameRow_asText(String searchText, String nextToText) { + driver.findElement( + By.xpath( + "//table//tr//*[contains(text(),\"" + searchText + "\")]//ancestor::tr//*[text()[contains(., \"" + nextToText + "\")]]" + + " | " + + "//table//tr//*[contains(text(),\"" + nextToText + "\")]//ancestor::tr//*[text()[contains(., \"" + searchText + "\")]]" + + " | " + + "//div//dd[contains(text(),\"" + searchText + "\")]//ancestor::div//dt[text()[contains(., \"" + nextToText + "\")]]" + )); + log.info("Found =>" + searchText + "<= in the same row as =>" + nextToText + "<= as expected"); + + } + + //Old Click Change Link + public void clickText_inSameRow_asText(String clickText, String nextToText) throws Exception { + log.info("Going to click on text =>" + clickText + "<= in a row that contains text =>" + nextToText); + wait.activateImplicitWait(); + + WebElement click_text = driver.findElement( + By.xpath( + "//table//tr//td[contains(text(),\"" + nextToText + "\")]//ancestor::tr//td[text()[contains(., \"" + clickText + "\")]]" + + "|" + + "//table//tr//td//a[contains(text(),\"" + nextToText + "\")]//ancestor::tr//td//a[text()[contains(., \"" + clickText + "\")]]" + + "|" + + "//table//tr//td[contains(text(),\"" + nextToText + "\")]//ancestor::tr//td//a[text()[contains(., \"" + clickText + "\")]]" + + "|" + + "//table//tr//*[contains(text(),\"" + nextToText + "\")]//ancestor::tr//a[text()[contains(., \"" + clickText + "\")]]" +// + "|" +// + "//dt[contains(text(),\"" + nextToText + "\")]//ancestor:://div/dd//a[text()[contains(., \"" + clickText + "\")]]" + + "")); + + wait.waitForClickableElement(click_text); + click_onElement(click_text); + log.info("Clicked on =>" + clickText + "<= successfully"); + + } + + //New Click Change Link + public void clickText_inSameRow_asText_Two(String clickText, String nextToText) throws Exception { + log.info("Going to click on text =>" + clickText + "<= in a row that contains text =>" + nextToText); + wait.activateImplicitWait(); + + log.info("seeText_inSameRow_asText " + clickText + ", " + nextToText); + + String clickTextId = ""; + + switch (nextToText) { + case "Name": + case "Enw": + clickTextId = "changeName"; + break; + case "Your name": + clickTextId = "changeThirdPartyName"; + break; + case "Address": + case "Cyfeiriad": + clickTextId = "changeAddress"; + break; + case "Main phone": + case "Prif rif ffôn": + clickTextId = "changePhone"; + break; + case "Another phone (optional)": + case "Rhif ffôn arall (dewisol)": + clickTextId = "changeSecondaryPhone"; + break; + case "Email": + case "E-bost": + clickTextId = "changeEmailAddress"; + break; + case "Date of birth": + case "Dyddiad geni": + clickTextId = "changeDob"; + break; + case "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?": + case "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?": + case "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?": + clickTextId = "changeLivedConsecutive"; + break; + case "Are you being detained, looked after or treated under the Mental Health Act?": + case "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?": + case "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?": + clickTextId = "changeMentalHealthSectioned"; + break; + case "Has it been decided that you 'lack mental capacity'?": + case "Has it been decided that the person you're replying for 'lacks mental capacity'?": + case "A benderfynwyd nad oes gennych y gallu meddyliol?": + clickTextId = "changeMentalHealthCapacity"; + break; + case "Are you currently on bail for a criminal offence?": + case "Is the person currently on bail for a criminal offence?": +// case "A ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?": + case "ar hyn o bryd am gyflawni trosedd?": + clickTextId = "changeOnBail"; + break; + case "Have you been convicted of a criminal offence and been given a sentence?": + case "Has the person been convicted of a criminal offence and been given a sentence?": + case "A ydych wedi'ch cael yn euog o gyflawni trosedd?": + clickTextId = "changeConvictions"; + break; + case "Confirm the date of your jury service": + case "Cadarnhewch ddyddiad eich gwasanaeth rheithgor": + case "Confirm the date of their jury service": + case "Cadarnhewch ddyddiad ei wasanaeth rheithgor": + clickTextId = "changeConfirmDate"; + break; + case "Tell us why you need another date for your jury service": + case "Eglurwch pam eich bod angen newid dyddiad eich gwasanaeth rheithgor": + clickTextId = "changeDeferral"; + break; + case "Choose 3 Mondays when you can start jury service": + case "Give us 3 dates the person you're replying for could start jury service during the next 12 months": + case "Nodwch dri dyddiad yn y 12 mis nesaf pan fyddwch ar gael i ddechrau gwasanaethu ar reithgor": + clickTextId = "changeDeferralDates"; + break; + case "Say why you need to be excused from jury service": + case "Eglurwch pam na allwch chi wasanaethu ar reithgor yn ystod y 12 mis nesaf": + clickTextId = "changeExcusalReason"; + break; + case "Have you worked in the criminal justice system in the last 5 years?": + case "Has the person you're replying for worked in the criminal justice system in the last 5 years?": + case "A ydych chi yn, neu a ydych chi wedi gweithio i'r Heddlu, Gwasanaeth Carchardai EM, yr Asiantaeth Troseddu Cenedlaethol neu unrhyw awdurdod erlyn yn y 5 mlynedd diwethaf?": + clickTextId = "changeCJS"; + break; + case "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your Jury Service?": + case "A oes gennych anabledd neu nam sy’n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnoch yn yr adeilad llys ble fyddwch yn cyflawni eich gwasanaeth rheithgor?": + clickTextId = "changeAdjustments"; + break; + case "Please tell us about any special arrangements or help you need while you're doing jury service.": + case "Rhowch wybod inni am unrhyw drefniadau arbennig bydd arnoch angen wrth ichi wasanaethu ar reithgor.": + clickTextId = "changeSpecialArrangements"; + break; + case "Does the person have a disability or impairment that means they’ll need extra support or facilities in the court building where they are doing jury service?": + case "A oes gan yr unigolyn anabledd neu nam sy'n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnynt yn yr adeilad llys lle byddant yn cyflawni'r gwasanaeth rheithgor?": + clickTextId = "changeAdjustments"; + break; + case "Please tell us about any special arrangements or help the person you're answering for needs while they're doing jury service": + case "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddynt wasanaethu ar reithgor.": + clickTextId = "changeSpecialArrangements"; + break; + +// expenses change links + + case "Will you lose income?": + case "A fyddwch yn colli incwm?": + clickTextId = "changeEarnings"; + break; + case "Do you earn more than ": + case "A ydych yn ennill mwy na £": + clickTextId = "changeEarningsThreshold"; + break; + case "How much do you earn each day?": + case "Faint ydych chi'n ennill fesul dydd?": + clickTextId = "changeEarningsAmount"; + break; + case "Extra costs you wouldn't normally have?": + case "A oes gennych gostau ychwanegol na fyddai'n codi fel arfer?": + clickTextId = "changeExtraCosts"; + break; + case "Total value of extra costs": + case "Cyfanswm y costau ychwanegol": + clickTextId = "changeExtraCostsAmount"; + break; + case "How will you travel to court?": + case "Sut byddwch yn teithio i'r llys?": + clickTextId = "changeTravelType"; + break; + case "Miles by bicycle each day": + case "Milltiroedd ar feic fesul dydd": + clickTextId = "changeTravelBicycle"; + break; + case "Miles by car each day": + case "Milltiroedd mewn car fesul dydd": + clickTextId = "changeTravelCar"; + break; + case "Miles by motorcycle each day": + case "Milltiroedd ar feic modur fesul dydd": + clickTextId = "changeTravelMotorcycle"; + break; + case "Cost of public transport each day": + case "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd": + clickTextId = "changeTravelPublicTransport"; + break; + } + + WebElement element = driver.findElement(By.id(clickTextId)); + + element.click(); + wait.deactivateImplicitWait(); + log.info("Clicked =>" + clickTextId); + + } + + public void seeText_isBold(String text) { + log.info("Going to check if text =>" + text + "<= isBold"); + driver.findElement(By.xpath("//strong[text()[contains(., \"" + text + "\")]]")); + log.info("Found bold text =>" + text); + + } + + public void setInputFieldWith_toText(String attributeType, String attributeValue, String inputText) { + try { + log.info("Going to find field by =>" + attributeType + "<= with value =>" + attributeValue + "<= and set it to =>" + inputText); + WebElement inputField = driver.findElement(By.xpath("//input[@" + attributeType + "='" + attributeValue + "']")); + inputField.clear(); + // clear() doesn't always work so this second approach ensures the field is cleared + inputField.click(); + inputField.sendKeys(Keys.chord(Keys.CONTROL,"a", Keys.DELETE)); + inputField.sendKeys(inputText); + log.info("Found field and input text =>" + inputText); + } catch (Exception e) { + log.info("Going to find field by =>" + attributeType + "<= with value =>" + attributeValue + "<= and set it to =>" + inputText); + WebElement inputField = driver.findElement(By.xpath("//input[@" + attributeType + "='" + attributeValue + "']")); + click_onElement(inputField); + inputField.clear(); + // clear() doesn't always work so this second approach ensures the field is cleared + inputField.click(); + inputField.sendKeys(Keys.chord(Keys.CONTROL,"a", Keys.DELETE)); + inputField.sendKeys(inputText); + log.info("Found field and input text =>" + inputText); + } + } + + + // db new to click cancel link in editing bureau + public void clickLinkWithId(String linkId) { + try { + log.info("Going to find field by =>" + linkId + ""); + WebElement inputField = driver.findElement(By.xpath("//a[@id='" + linkId + "']")); + inputField.click(); + log.info("Found =>" + linkId + " and clicked it"); + } catch (Exception e) { + log.info("Going to find field by =>" + linkId + ""); + WebElement inputField = driver.findElement(By.xpath("//button[@id='" + linkId + "']")); + inputField.click(); + log.info("Found =>" + linkId + " and clicked it"); + } + } + + public void setTextAreaWith_toText(String attributeType, String attributeValue, String inputText) { + log.info("Going to find field by =>" + attributeType + "<= with value =>" + attributeValue + "<= and set it to =>" + inputText); + WebElement inputField = driver.findElement(By.xpath("//textarea[@" + attributeType + "='" + attributeValue + "']")); + inputField.clear(); + inputField.sendKeys(inputText); + log.info("Found field and input text =>" + inputText); + } + + //DB new process reply + public void setProcessReplyTo_(String optionValue) { + log.info("Going to find Process reply value =>" + optionValue + "<= and select it"); + WebElement processReply = driver.findElement(By.xpath("//a[text()[contains(., '" + optionValue + "')]]")); + processReply.click(); + log.info("Found field and input text =>" + optionValue); + } + + public void setTextAreaWith_toText_noClear(String attributeType, String attributeValue, String inputText) { + log.info("Going to find field by =>" + attributeType + "<= with value =>" + attributeValue + "<= and set it to =>" + inputText); + WebElement inputField = driver.findElement(By.xpath( + "//textarea[@" + attributeType + "='" + attributeValue + "']" + + "|" + + "//input[@" + attributeType + "='" + attributeValue + "']" + )); + inputField.sendKeys(inputText); + log.info("Found field and input text =>" + inputText); + } + + public void checkboxState_inSameRow_asText(String checkboxState, String nextToText) throws Exception { + try { + log.info("Going to confirm checkbox state is =>" + checkboxState + "<= in a row that contains text =>" + nextToText); + WebElement checkbox = driver.findElement( + By.xpath("//table//tr//td[contains(text(),\"" + nextToText + "\")]//ancestor::tr//input[@type='checkbox']")); + + if (checkboxState.equalsIgnoreCase("checked") && checkbox.isSelected()) { + log.info("Checkbox checked as expected"); + return; + } else if (checkboxState.equalsIgnoreCase("unchecked") && !checkbox.isSelected()) { + log.info("Checkbox unchecked as expected"); + return; + } + throw new Exception("Checkbox state not as expected - Failing"); + } catch (Exception e) { + log.info("Going to confirm checkbox state is =>" + checkboxState + "<= in a row that contains text =>" + nextToText); + WebElement checkbox = driver.findElement( + By.xpath("//table//tr//td//a[contains(text(),\"" + nextToText + "\")]//ancestor::tr//input[@type='checkbox']")); + + if (checkboxState.equalsIgnoreCase("checked") && checkbox.isSelected()) { + log.info("Checkbox checked as expected"); + return; + } else if (checkboxState.equalsIgnoreCase("unchecked") && !checkbox.isSelected()) { + log.info("Checkbox unchecked as expected"); + return; + } + throw new Exception("Checkbox state not as expected - Failing"); + } + } + + public void seeIconSame_rowAs(String icon, String nextToText) { + try { + log.info("Going to confirm icon is =>" + icon + "<= is in a row that contains text =>" + nextToText); + driver.findElement( +// orig By.xpath("//table//tr//td[contains(text(),\""+nextToText+"\")]//ancestor::tr//td//span[@title='"+icon+"']")); +// changed by DB to pick up the icon after the latest updates 22-10-21 + By.xpath("//tr//td//a[contains(text(),\"" + nextToText + "\")]//ancestor::tr//td//span[contains(normalize-space(text()),'" + icon + "')]")); + log.info("Saw icon in row which contained text =>" + nextToText); + } catch (Exception e) { + driver.findElement( + By.xpath("//tr//td/div/a/span[contains(text(),\"" + nextToText + "\")]//ancestor::tr//td//span[contains(text(),'" + icon + "']")); + + } + + } + + public void recordFlaggedOverdue(String nextToText) { + try { + + log.info("Going to find overdue flag for =>" + nextToText + ""); +// driver.findElement(By.xpath("//*[@title='Overdue']//ancestor::tr/td/a[contains(normalize-space(text()),'"+nextToText+"')]")); + driver.findElement(By.xpath("//*[@class='moj-badge moj-badge--red']//ancestor::tr/td/a[contains(normalize-space(text()),'" + nextToText + "')]")); + } catch (Exception e) { + log.info("Going to find overdue flag for =>" + nextToText + ""); + driver.findElement(By.xpath("//*[@title='Overdue']//ancestor::tr/td//a[contains(normalize-space(text()),'" + nextToText + "')]")); + } + } + + public void replyTypeIndicator(String nextToText, String replyType) { + try { + log.info("Going to find reply type indicator for =>" + nextToText + ""); + driver.findElement(By.xpath( + "//tr//td//span[contains(text(),\"" + replyType + "\")]//ancestor::tr//td//a[text()[contains(.,\"" + nextToText + "\")]]" + + "|" + + "//tr//td//strong[contains(text(),\"" + replyType + "\")]//ancestor::tr//td//a[text()[contains(.,\"" + nextToText + "\")]]" + )); + } catch (Exception e) { + log.info("Going to find reply type indicator for =>" + nextToText + ""); + driver.findElement(By.xpath("//*[@title='" + replyType + "']//ancestor::tr/td//a[contains(normalize-space(text()),'" + nextToText + "')]")); + } + } + + public void checkCheckboxSame_rowAs(String nextToText) { + wait.activateImplicitWait(); + WebElement checkbox = driver.findElement( + By.xpath( + "//table//tr//td/a[contains(text(),\"" + nextToText + "\")]//ancestor::tr//input[@type='checkbox']" + + " | " + + "//table//tr//td[contains(text(),\"" + nextToText + "\")]//ancestor::tr//input[@type='checkbox']" + )); + log.info("Saw checkbox in row which contained text =>" + nextToText); + wait.toBeClickAble(checkbox); + checkbox.click(); + log.info("Checked checkbox which was in the same row as =>" + nextToText); + + } + + + public void checkPageTitleIs(String expectedPageTitle) { + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(15)); + wait.until(ExpectedConditions.titleContains(expectedPageTitle)); + + log.info("Saw page title matched with =>" + expectedPageTitle); + } + + + public void press_tabKeyOnBody() { + try { + WebElement logo = driver.findElement(By.id("logo")); + //sendKeys(Keys.SHIFT); + String press = Keys.chord(Keys.SHIFT, Keys.TAB); + logo.sendKeys(press); + } catch (Exception e) { + WebElement logo = driver.findElement(By.xpath("//div[@class='govuk-header__logo']//a")); + //sendKeys(Keys.SHIFT); + String press = Keys.chord(Keys.SHIFT, Keys.TAB); + logo.sendKeys(press); + } + + log.info("Tabbed to see Skip to Main Content"); + } + + public void press_backspace(String textAreaId) { + WebElement inputField; + inputField = driver.findElement(By.xpath("//div/textarea[contains(@id," + textAreaId + ")]")); + inputField.sendKeys(Keys.BACK_SPACE); + } + + public void clear_field(String fieldId) { + WebElement inputField; + inputField = driver.findElement(By.xpath("//input[@id='" + fieldId + "']")); + inputField.sendKeys(Keys.CONTROL, "a", Keys.DELETE); + } + + public void press_a_key(String key, String inputFieldLabel) { + try { + WebElement inputField; + inputField = find_inputBy_labelName(inputFieldLabel); + inputField.sendKeys(Keys.valueOf(key.toUpperCase())); + + } catch (Exception e) { + WebElement logo = driver.findElement(By.xpath( + "//div[@class='govuk-header__logo']//a" + + "|" + + "//label[text()[(normalize-space(.)='" + inputFieldLabel + "')]]" + + "|" + + "//div[contains(text(),'" + inputFieldLabel + "')]//ancestor::div/div/textarea")); + //sendKeys(Keys.SHIFT); + String press = Keys.chord(Keys.SHIFT, Keys.TAB); + logo.sendKeys(press); + } + + log.info("Pressed backspace"); + } + + public void hitTabForMainContent() { + + } + + public void see_inURL(String urlPart) { + waitForPageLoad(); + String current_url = driver.getCurrentUrl(); + log.info("Current URL is =>" + current_url); + Assert.assertTrue(current_url.contains(urlPart)); + log.info("URL =>" + current_url + "<= contains text =>" + urlPart); + + + //osman testing + } + +// public void seeText_inSameRow_asText_inBacklog(String searchText, String nextToText) { +// WebElement element = driver.findElement(By.xpath("//div//nav//ul[contains(@class,'backlog-summary')]/li[contains(normalize-space(text()),'"+nextToText+"')]/span[text()='"+searchText+"']")); +// log.info("Found =>" + searchText + "<= in the same row as =>" + nextToText + "<= as expected"); +// Boolean value = element.isDisplayed(); +// assertTrue(value); +// log.info("element exists on UI"); + + + public void seeText_inSameRow_asText_inBacklog(String searchText, String nextToText) { + WebElement element = driver.findElement(By.xpath("//div[contains(@class,'jd-assign-replies-" + nextToText + "')]/div[contains(normalize-space(text()),'" + searchText + "')]")); + log.info("Found =>" + searchText + "<= in the same row as =>" + nextToText + "<= as expected"); + Boolean value = element.isDisplayed(); + assertTrue(value); + log.info("element exists on UI"); + + } + + public void seeText_inAllocateReplies(String searchText, String elementName) { + WebElement element = driver.findElement(By.name(elementName)); + String text = element.getAttribute("value"); + assertEquals(searchText, text); + } + + //work allocation specific + public WebElement getBoxHeaderText(String text, String boxName) { + try { + wait.activateImplicitWait(); + log.info("Looking for text =>" + text + "<= under =>" + boxName); + WebElement boxHeader = driver.findElement(By.xpath( + "//div/h1[contains(@class,'heading-small') and contains(normalize-space(text()),'" + boxName + "')]/../nav/ul/li[contains(normalize-space(text()),'" + text + "')]")); + wait.deactivateImplicitWait(); + return boxHeader; + } catch (Exception e) { + wait.activateImplicitWait(); + log.info("Looking for text =>" + text + "<= under =>" + boxName); + WebElement boxHeader = driver.findElement(By.xpath( + "//div/h1[contains(@class,'govuk-heading-xl no-margin no-bold inline') and contains(normalize-space(text()),'" + boxName + "')]/../nav/ul/li[contains(normalize-space(text()),'" + text + "')]")); + wait.deactivateImplicitWait(); + return boxHeader; + } + } + + public void checkButtonIsDisabled(String buttonName) { + log.info("Going to see if =>" + buttonName + "<= is disabled =>"); + WebElement element = driver.findElement(By.xpath("//button[contains(normalize-space(text()),'" + buttonName + "')] ")); + //WebElement element1 = driver.findElement(By.xpath("//button[contains(normalize-space(text()),'"+buttonName+"')] and (contains(@disabled=1")); + String value = element.getAttribute("disabled"); + Assert.assertNotNull("Button was enabled when not expected", value); + log.info("Found =>" + buttonName + "<= is disabled=>"); + } + +// public void totalAssignedCount(String countName, String countValue) { +// log.info("Going to check that total assigned =>"+countName+"<= count is =>"+countValue+"<="); +// String assignedCount = driver.findElement(By.id(countName)).getText(); +// Assert.assertEquals(countValue, assignedCount); +// log.info("=>"+countName+"<= Assigned Count is as expected"); +// +// } + + public void totalAssignedCount(String countName, String countValue) { + log.info("Going to check that total assigned =>" + countName + "<= count is =>" + countValue + "<="); + String assignedCount = driver.findElement(By.xpath("//td[contains(normalize-space(text()), '" + countName + "')]")).getText(); + Assert.assertEquals(countValue, assignedCount); + log.info("=>" + countName + "<= Assigned Count is as expected"); + + } + + public void switchToNewWindow() { + new WebDriverWait(driver, Duration.ofSeconds(100)).until(ExpectedConditions.numberOfWindowsToBe(2)); + String currentWindowHandle = driver.getWindowHandle(); + log.info("current window is " + currentWindowHandle); + for (String winHandle : driver.getWindowHandles()) { + log.info("Window in for loop is " + winHandle); + if (!winHandle.equals(currentWindowHandle)) { + log.info("switching to" + winHandle); + driver.switchTo().window(winHandle); + return; + } + } + log.error("No new window when one was expected"); + } + + public void closeWindowAndSwitchToDefaultWindow() { + if (driver.getWindowHandles().size() != 2) { + log.error("Window count expected to be 2 but is " + driver.getWindowHandles().size()); + } +// driver.close(); + new WebDriverWait(driver, Duration.ofSeconds(40)).until(ExpectedConditions.numberOfWindowsToBe(1)); + if (driver.getWindowHandles().size() != 1) { + log.error("Window count expected to be 1 but is " + driver.getWindowHandles().size()); + } + for (String winHandle : driver.getWindowHandles()) { + log.info("switching to" + winHandle); + driver.switchTo().window(winHandle); + log.info("switched to window"); + return; + } + return; + + } + + // @When("^I set \"([^\"]*)\" to \"([^\"]*)\"$") + public void set_value_to(String arg1, String arg2) throws Throwable { + + if (arg2.contains("{") && arg2.contains("}")) { + arg2 = arg2.replace("{", "").replace("}", ""); + arg2 = DateManipulator.formatDate( + DateManipulator.processString(arg2, false), + "dd/MM/yyyy" + ); + } + try { + WebElement childField; + childField = find_inputBy_labelName(arg1); + childField.clear(); + set_valueTo(arg1, arg2); + } catch (Exception e) { + WebElement newChildField; + newChildField = find_inputBy_labelName(arg1); + newChildField.clear(); + waitForPageLoad(); + set_valueTo(arg1, arg2); + } + } + + + public void seeText_inSameRow_asText_inPoolRequests(String dataItem, String selectedOption) throws Throwable { + WebElement element = driver.findElement(By.xpath("//dd[contains(text(),'" + selectedOption + "')]//ancestor::div//dt[contains(text(),'" + dataItem + "')]")); + log.info("Found =>" + selectedOption + "<= in the same row as =>" + dataItem + "<= as expected"); + boolean value = element.isDisplayed(); + assertTrue(value); + log.info("element exists on UI"); + } + + public void clickChangeLinkInSameRowAs_inPoolRequests(String link, String nextTo) throws Throwable { + try { + WebElement element = driver.findElement(By.xpath("//a[contains(text(),'" + link + "')]//ancestor::div//dt[contains(text(),'" + nextTo + "')]")); + element.click(); + } catch (Exception e) { + WebElement element = driver.findElement(By.xpath("//a[contains(text(),'" + link + "')]//ancestor::div//dd[contains(text(),'" + nextTo + "')]")); + element.click(); + } + log.info("Found =>" + link + "<= in the same row as =>" + nextTo + "<= as expected"); + + } + + +// public void typeIntoNotesModal(String text) { +// +// Alert alert = driver.switchTo().alert(); +// driver.switchTo().alert().sendKeys(text); +// driver.switchTo().alert().accept(); +// WebElement modal = driver.findElement(By.xpath("//section/text area[contains(@class,'modal-textarea'")); +// WebElement modal = driver.findElement(By.xpath("//div[contains(@class,'modal')]/section/text area[contains(@class,'modal-textarea'")); +// modal.clear(); +// modal.sendKeys(text); + + + @FindBy(id = "date1Month") + WebElement attendanceMonth1Field; + + @FindBy(id = "date1Year") + WebElement attendanceYear1Field; + + @FindBy(id = "date1Day") + WebElement attendanceDay1Field; + + @FindBy(id = "date2Day") + WebElement attendanceDay2Field; + + @FindBy(id = "date2Month") + WebElement attendanceMonth2Field; + + @FindBy(id = "date2Year") + WebElement attendanceYear2Field; + + @FindBy(id = "date3Day") + WebElement attendanceDay3Field; + + @FindBy(id = "date3Month") + WebElement attendanceMonth3Field; + + @FindBy(id = "date3Year") + WebElement attendanceYear3Field; + + @FindBy(id = "attendanceDateDay") + WebElement newAttendanceDay3Field; + + @FindBy(id = "attendanceDateMonth") + WebElement newAttendanceMonth3Field; + + @FindBy(id = "attendanceDateYear") + WebElement newAttendanceYear3Field; + + @FindBy(id = "attendanceDate") + WebElement newAttendanceDateField; + + @FindBy(id = "deferralDate") + WebElement deferToDate; + + @FindBy(id = "dobDay") + WebElement dobDayField; + + @FindBy(id = "dobMonth") + WebElement dobMonthField; + + @FindBy(id = "dobYear") + WebElement dobYearField; + + @FindBy(id = "deferDate1") + WebElement deferDate1Field; + + @FindBy(id = "deferDate2") + WebElement deferDate2Field; + + @FindBy(id = "deferDate3") + WebElement deferDate3Field; + + @FindBy(id = "completionDate") + WebElement completionDateField; + + @FindBy(id = "postponeTo") + WebElement postponeServiceStartDateField; + + @FindBy(id = "startDate") + WebElement trialStartDate; + + @FindBy(id = "serviceStartDate") + WebElement serviceStartDate; + + + public void enterNewDate(String attDateSequence, final String day, final String month, final String year) { + log.info("Entering new date"); + switch (attDateSequence) { + case "First": + attendanceDay1Field.clear(); + attendanceDay1Field.sendKeys(day); + + attendanceMonth1Field.clear(); + attendanceMonth1Field.sendKeys(month); + + attendanceYear1Field.clear(); + attendanceYear1Field.sendKeys(year); + break; + + case "Second": + attendanceDay2Field.clear(); + attendanceDay2Field.sendKeys(day); + + attendanceMonth2Field.clear(); + attendanceMonth2Field.sendKeys(month); + + attendanceYear2Field.clear(); + attendanceYear2Field.sendKeys(year); + break; + + case "Third": + attendanceDay3Field.clear(); + attendanceDay3Field.sendKeys(day); + + attendanceMonth3Field.clear(); + attendanceMonth3Field.sendKeys(month); + + attendanceYear3Field.clear(); + attendanceYear3Field.sendKeys(year); + break; + + case "DOB": + dobDayField.clear(); + dobDayField.sendKeys(day); + + dobMonthField.clear(); + dobMonthField.sendKeys(month); + + dobYearField.clear(); + dobYearField.sendKeys(year); + break; + + } + } + + public void enterNewSingleDate(String defDateSeq, String mondayDateValue) { + log.info("Entering new date"); + switch (defDateSeq) { + case "First": + deferDate1Field.clear(); + deferDate1Field.sendKeys(mondayDateValue); + break; + + case "Second": + deferDate2Field.clear(); + deferDate2Field.sendKeys(mondayDateValue); + break; + + case "Third": + deferDate3Field.clear(); + deferDate3Field.sendKeys(mondayDateValue); + break; + + case "Change the attendance date for this pool": + newAttendanceDateField.clear(); + newAttendanceDateField.sendKeys(mondayDateValue); + break; + + case "Change the service start date for this pool": + newAttendanceDateField.clear(); + newAttendanceDateField.sendKeys(mondayDateValue); + break; + + case "Deferral": + deferToDate.clear(); + deferToDate.sendKeys(mondayDateValue); + break; + + case "Completion date": + completionDateField.clear(); + completionDateField.sendKeys(mondayDateValue); + break; + + case "Postpone service start date": + postponeServiceStartDateField.clear(); + postponeServiceStartDateField.sendKeys(mondayDateValue); + break; + + case "Start date for Trial": + trialStartDate.clear(); + trialStartDate.sendKeys(mondayDateValue); + break; + + case "Service start date for new pool": + serviceStartDate.clear(); + serviceStartDate.sendKeys(mondayDateValue); + break; + + case "Service start date for transfer": + newAttendanceDateField.clear(); + newAttendanceDateField.sendKeys(mondayDateValue); + break; + } + } + public void appendURL(String uRL) { + String expected_text = "Page not found"; + String bodyText = driver.findElement(By.tagName("body")).getText(); + log.info("Going to check if text present on the page =>" + expected_text); + String url = driver.getCurrentUrl().substring(0, 36); + String newurl = url + "/pool-management"; + driver.navigate().to(newurl); + Assert.assertTrue("page is found in error", bodyText.contains(expected_text)); + + } + + public void iSeeInUrl (String getCurrentUrl){ + waitForPageLoad(); + driver.getCurrentUrl(); + log.info(getCurrentUrl + "pool-management"); + Assert.assertTrue(true); + log.info("URL =>" + getCurrentUrl + "pool-management"); + } + + public String getProtocolFromURLString(String urlString) { + Pattern p = Pattern.compile("(https?://)"); + Matcher m = p.matcher(urlString); + m.find(); + return m.group(1); + } + public String getHeadingText( ) { + log.info("Going to see next due date text is present in the page =>" ); + return driver.findElements(By.className("govuk-body")).get(0).getText(); + } + public NavigationShared continueBtnOnPage(String expected_text) throws Throwable { + + log.info("Going to check the availability of continue button =>"); + WebElement continueBtn = driver.findElement(By.className("govuk-button")); + continueBtn.isDisplayed(); + log.info("Saw Expected Text =>" + expected_text); + return PageFactory.initElements(driver, NavigationShared.class); + + } + + public String getJurorNumber(){ + log.info("Getting Juror number label "); + return JurorNumberLabel.getText(); + } + public String getFirstName(){ + log.info("Getting Jurors first name label "); + return JurorFirstNameLabel.getText(); + } + public String getLastName(){ + log.info("Getting jurors last name label"); + return JurorLastNameLabel.getText(); + } + public String getCheckedIn(){ + log.info("Getting jurors check in label"); + return JurorCheckedInLabel.getText(); + } +} diff --git a/src/main/java/cucumber/pageObjects/Notify.java b/src/main/java/cucumber/pageObjects/Notify.java new file mode 100644 index 00000000..81f722ec --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Notify.java @@ -0,0 +1,67 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +import cucumber.testdata.DataSetup; +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class Notify { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Notify.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public Notify(WebDriver driver) { + Notify.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(id = "notificationsCheck") + WebElement notificationsCheck; + + public String fetch_password(String username) { + return null; + } + + + public void amNot_subscribedToNotifications() { + wait.activateImplicitWait(); + notificationsCheck.getAttribute("class").contains("fa-times-circle"); + log.info("Saw that on the current page, there icon contained fa-times-circle for icon with NotificationsCheck ID - We are not subscribed to Notifications! (As Expected)"); + } + + public void am_subscribedToNotifications() { + wait.activateImplicitWait(); + notificationsCheck.getAttribute("class").contains("fa-check-circle"); + log.info("Saw that on the current page, there icon contained fa-check-circle for icon with NotificationsCheck ID - We are subscribed to Notifications! (As Expected)"); + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/Organisations.java b/src/main/java/cucumber/pageObjects/Organisations.java new file mode 100644 index 00000000..99ad8cd7 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Organisations.java @@ -0,0 +1,85 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.Arrays; +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +import com.google.common.base.Verify; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class Organisations { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Organisations.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public Organisations(WebDriver driver) { + Organisations.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(id = "selectedGroupsTable") + WebElement selectedGroupsTable; + + public WebElement return_userRowByText(String text) { + WebElement userRow = driver.findElement(By.xpath("//table//a[text()[contains(., '"+text+"')]]//ancestor::tr")); + log.info("Found user in table - Checking notify"); + return userRow; + } + + /** + * We know it is false if it has class => fa fa-times-circle + * @param text + */ + public void confirmTextUserNot_subscribedToNotifications(String text) { + log.info(String.format("Going to check whether user text passed =>%s<= can be found in the table",text)); + WebElement userRow = return_userRowByText(text); + + userRow.findElement(By.cssSelector("td:first-of-type > div > .fa-times-circle")); + log.info(String.format("Saw CSS with check circle - %s is subscribed", text)); + + } + + /** + * We know it is true if it has class => fa fa-check-circle + * @param text + */ + public void confirmTextUser_subscribedToNotifications(String text) { + log.info(String.format("Going to check whether user text passed =>%s<= can be found in the table",text)); + WebElement userRow = return_userRowByText(text); + + userRow.findElement(By.cssSelector("td:first-of-type > div > .fa-check-circle")); + log.info(String.format("Saw CSS with check circle - %s is subscribed", text)); + + } + + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/PoolOverview.java b/src/main/java/cucumber/pageObjects/PoolOverview.java new file mode 100644 index 00000000..7e3af4eb --- /dev/null +++ b/src/main/java/cucumber/pageObjects/PoolOverview.java @@ -0,0 +1,238 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; + +public class PoolOverview { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + public PoolOverview(WebDriver driver) { + PoolOverview.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + @FindBy(xpath = "//span[contains(text(),'Court name')]/following-sibling::span") + WebElement courtName; + + @FindBy(xpath = "//span[contains(text(),'Court location code')]/following-sibling::span") + WebElement courtLocationCode; + + @FindBy(xpath = "//span[contains(text(),'Court start date')]/following-sibling::span") + WebElement courtStartDate; + + @FindBy(xpath = "//span[contains(text(),'Court start date')]//ancestor::div/span[2]") + WebElement overviewCourtStartDate; + + @FindBy(xpath = "//span[contains(text(),'Additional requirements')]/following-sibling::span") + WebElement additionalRequirements; + + @FindBy(xpath = "//div[@class='bullet required']/../span") + WebElement numberOfJurorsRequested; + + @FindBy(xpath = "//div[@class='bullet available']/following-sibling::span[@class='amount']") + WebElement numberOfJurorsConfirmed; + + @FindBy(xpath = "//div[@class='bullet unavailable']/following-sibling::span[@class='amount']") + WebElement numberOfJurorsUnavailable; + + @FindBy(xpath = "//div[@class='bullet unresolved']/following-sibling::span[@class='amount']") + WebElement numberOfJurorsNotResponded; + + @FindBy(xpath = "//div[@class='bullet surplus']/following-sibling::span[@class='amount']") + WebElement numberOfJurorsSurplus; + + @FindBy(id = "deletePoolButton") + WebElement deleteButton; + + @FindBy(id = "cancelLink") + WebElement cancelLink; + + @FindBy(xpath = "//div[@class='total']/span[@class='number']") + WebElement numberOfJurorsSummoned; + + @FindBy(xpath = "//div[@class=\"pool-values__summary\"]/span[2]") + WebElement currentPoolSize; + + @FindBy(className = "govuk-heading-l") + WebElement heading; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[1]/div/div/strong") + WebElement status; + + @FindBy(id = "poolJurorReassign") + WebElement jurorsTable; + + public String getCourtName() { + log.info("Getting court name"); + return courtName.getText(); + } + + public String getCourtLocationCode() { + log.info("Getting court location code"); + return courtLocationCode.getText(); + } + + public String getCourtStartDate() { + log.info("Getting court start date"); + return courtStartDate.getText(); + } + + public String getConvertedStartDate() throws ParseException { + String overviewStartDate = overviewCourtStartDate.getText(); + + DateFormat df = new SimpleDateFormat("EEEE dd MMM yyyy"); + Date convertedStartDate = df.parse(overviewStartDate); + + String newDateFormat = "EEEE dd MMMM yyyy"; + String newStartDate = new SimpleDateFormat(newDateFormat).format(convertedStartDate); + + log.info("Getting court start date"); + return newStartDate; + } + + public String getAdditionalRequirements() { + log.info("Getting additional requirements"); + return additionalRequirements.getText(); + } + + public String getNumberOfJurorsRequested() { + log.info("Getting number of jurors requested"); + return numberOfJurorsRequested.getText(); + } + + public String getNumberOfJurorsConfirmed() { + log.info("Getting number of jurors confirmed"); + return numberOfJurorsConfirmed.getText(); + } + + public String getNumberOfJurorsUnavailable() { + log.info("Getting number of jurors unavailable"); + return numberOfJurorsUnavailable.getText(); + } + + public String getNumberOfJurorsNotResponded() { + log.info("Getting number of jurors not responded"); + return numberOfJurorsNotResponded.getText(); + } + + public String getNumberOfJurorsSurplus() { + log.info("Getting number of jurors surplus"); + return numberOfJurorsSurplus.getText(); + } + + public String getNumberOfJurorsSummoned() { + log.info("Getting number of jurors summoned"); + return numberOfJurorsSummoned.getText(); + } + + public String getNumberOfJurorsRequired() { + log.info("Getting number of jurors required"); + return numberOfJurorsRequested.getText(); + } + + public String getCurrentPoolSize() { + log.info("Getting current pool size"); + return currentPoolSize.getText(); + } + + public void clickDelete() { + log.info("Clicking delete pool request"); + deleteButton.click(); + } + + public void clickCancel() { + log.info("Clicking cancel"); + cancelLink.click(); + } + + public String getHeading() { + log.info("Getting heading"); + return heading.getText(); + } + + public String getStatus() { + log.info("Getting status"); + return status.getText(); + } + + public boolean statusExists() { + By statusLocator = By.xpath("//*[@id=\"main-content\"]/div[1]/div/div/strong"); + List status = driver.findElements(statusLocator); + if (status.size() > 0) { + return true; + } else { + return false; + } + } + + public Map getPoolOverviewDetails() { + log.info("Getting pool overview details for pool: " + getHeading()); + Map data = new HashMap<>(); + data.put("poolRecord", getHeading()); + data.put("court", getCourtName()); + data.put("courtCode", getCourtLocationCode()); + data.put("courtStartDate", getCourtStartDate()); + return data; + } + + public String getJurorTableRow(int index){ + log.info("Getting row " + index + " in juror table"); + List jurorRows = jurorsTable.findElements(By.tagName("tr")); + WebElement jurorRow = jurorRows.get(index); + List jurorDetails = jurorRow.findElements(By.tagName("td")); + String jurorNumber = jurorDetails.get(0).getText(); + String firstName = jurorDetails.get(1).getText(); + String lastName = jurorDetails.get(2).getText(); + String postcode = jurorDetails.get(3).getText(); + String owner = jurorDetails.get(4).getText(); + String status = jurorDetails.get(5).getText(); + String details = jurorNumber + ", " + firstName + ", " + lastName + ", " + postcode + ", " + owner + ", " + status; + return details; + } + + public String getJurorNumberInRow(int row){ + log.info("Getting juror number in row " + row + " of juror table"); + List jurorRows = jurorsTable.findElements(By.tagName("tr")); + WebElement jurorRow = jurorRows.get(row); + List jurorDetails = jurorRow.findElements(By.tagName("td")); + String jurorNumber = jurorDetails.get(1).getText(); + return jurorNumber; + } + public String[] historyHeaderAndDescInPos(int posInList){ + String[] elementsInPosition; + String historyHeader = driver.findElement(By.xpath("//*[@class='moj-timeline__item'][" + posInList + "]/div[1]/h2")).getText(); + String historyDesc = driver.findElement(By.xpath("//*[@class='moj-timeline__item'][" + posInList + "]/div[2]/p")).getText(); + String historyTime = driver.findElement(By.xpath("//*[@class='moj-timeline__item'][" + posInList + "]/p/time")).getText(); + + elementsInPosition = new String[]{ + historyHeader, + historyDesc, + historyTime + }; + return elementsInPosition; + + } + +} diff --git a/src/main/java/cucumber/pageObjects/PoolRequests.java b/src/main/java/cucumber/pageObjects/PoolRequests.java new file mode 100644 index 00000000..c0021de0 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/PoolRequests.java @@ -0,0 +1,686 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.openqa.selenium.*; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +public class PoolRequests { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + private Groups GRP; + private final Header HEADER_PAGE; + + public PoolRequests(WebDriver driver) { + PoolRequests.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + HEADER_PAGE = PageFactory.initElements(driver, Header.class); + } + + @FindBy(linkText = "Create pool") + WebElement requestNewPoolLink; + + @FindBy(xpath = "//h1") + WebElement pageHeading; + + @FindBy(id = "continueButton") + WebElement continueButton; + + @FindBy(id = "deferralMaintenanceAnchor") + WebElement deferraMaintenanceLink; + + @FindBy(id = "confirmButton") + WebElement confirmButton; + + @FindBy(xpath = "//label[@for=\"selectedCourtName\"]/following-sibling::dl[1]//dd[@class=\"govuk-summary-list__value\"]") + WebElement courtName; + + @FindBy(xpath = "//dl[@id=\"attendanceDate\"]//dd[1]") + WebElement courtDate; + @FindBy(xpath = "//dl[@id=\"requestDetails\"]//div[3]//dd[1]") + WebElement courtDateCheckDetails; + + @FindBy(xpath = "//dl[@id=\"attendanceDate\"]//dd[1]") + WebElement courtDateRequestPool; + + @FindBy(xpath = "//dl[@id=\"attendanceTime\"]//dd[@class=\"govuk-summary-list__value\"]") + WebElement courtTime; + + @FindBy(xpath = "//div[@class=\"govuk-summary-list__row govuk-summary-list__row--no-actions\"]//dd[@class=\"govuk-summary-list__value\"]") + public List courtAttendanceTime; + + @FindBy(xpath = "//label[@for=\"selectedCourtName\"]/following-sibling::dl[1]//a[@class=\"govuk-link\"]") + WebElement changeCourtLink; + + @FindBy(css = "#attendanceDate a") + WebElement changeDateLink; + + @FindBy(css = "#attendanceTime a") + WebElement changeTimeLink; + + @FindBy(css = "#poolNumber a") + WebElement changePoolNumberLink; + + @FindBy(id = "attendanceTimeHour") + WebElement timeHours; + + @FindBy(id = "attendanceTimeMinute") + WebElement timeMinutes; + + @FindBy(xpath = "//input[@id=\"courtNameOrLocation\"]") + WebElement courtTextBox; + + @FindBy(xpath = "//button[@type=\"submit\"]") + WebElement submitButton; + + @FindBy(id = "courtNameOrLocation__option--0") + WebElement courtDropdownFirstOption; + + + @FindBy(id = "attendanceDate") + WebElement attendanceDateField; + + @FindBy(id = "additionalRequirements-2") + WebElement onCallPoolCheckbox; + + @FindBy(id = "numberOfJurorsRequired") + WebElement numberOfJurorsField; + + @FindBy(className = "govuk-error-summary") + WebElement errorSummary; + + @FindBy(css = "#numberOfCourtDeferrals a") + WebElement changeDeferralsLink; + + @FindBy(id = "numberOfDeferrals") + WebElement numberOfDeferralsField; + + @FindBy(linkText = "Cancel") + WebElement cancelLink; + + @FindBy(id = "courtNameOrLocation") + WebElement filterField; + + @FindBy(className = "autocomplete__option") + WebElement filterAutocompleteOption; + + @FindBy(xpath = "//button[@type=\"submit\"]") + WebElement filterButton; + + @FindBy(className = "govuk-body") + WebElement attendanceDateWarning; + + @FindBy(linkText = "Continue") + WebElement warningContinue; + + @FindBy(css = "#poolRequestsTable td:nth-child(1) .govuk-link ") + WebElement firstPoolRequestLink; + + @FindBy(className = "moj-banner__message") + WebElement bannerMessage; + + @FindBy(id = "courtNameOrLocation") + WebElement courtNameTextBox; + + @FindBy(id = "courtNameOrLocation__option--0") + WebElement courtNameLocationOption1; + + @FindBy(css = ".govuk-summary-list__key.govuk-heading-m") + WebElement tableHeading; + + @FindBy(id = "activePoolsAnchor") + WebElement activePoolsLink; + + @FindBy(xpath = "//dt[@class=\"govuk-summary-list__key\"]/a") + WebElement existingPoolNumber; + + @FindBy(xpath = "//span[@class='govuk-caption-l']") + WebElement summonCitizensPoolNumber; + + + @FindBy(id = "poolNumber") + WebElement poolNumberInput; + + + @FindBy(id = "searchAnchor") + WebElement searchTab; + @FindBy(xpath = "//*[@id=\"poolRequestsTable\"]/tbody/tr/td[1]/a[1]") + WebElement poolNumberSummary; + @FindBy(xpath = "//*[@id=\"poolNumber\"]/div[2]/dd") + WebElement poolNumberOnDetails; + @FindBy(xpath = "/html/body/div[3]/main/div[3]/div[3]/div/div/div[1]/p/time") + WebElement timelineDateAndTime; + + @FindBy(xpath = "/html/body/div[3]/main/div[1]/div[2]/a") + WebElement requestNewPoolButton; + + @FindBy(xpath = "/html/body/div[3]/main/div/div/form/div/button") + WebElement requestPoolButton; + + @FindBy(xpath = "/html/body/div[3]/main/div[3]/div[4]/a") + WebElement summonJurorsButton; + + @FindBy(xpath = "/html/body/div[3]/main/div/div/form/div[5]/button") + WebElement createPoolAndSummonCitizensButton; + + @FindBy(id = "membersListTable") + WebElement jurorPartNumbertable; + + public void clickSearchTab() { + searchTab.click(); + } + + public void enterAndSelectCourtAsBureau(String courtName) { + log.info("Entering and selecting court"); + courtNameTextBox.sendKeys(courtName); + courtNameLocationOption1.click(); + submitButton.click(); + } + + @FindBy(xpath = ("//button[contains(text(),'Create a pool')]")) + WebElement createAPool; + + @FindBy(xpath = ("//a[contains(text(),'Create a nil pool')]")) + WebElement createNilPool; + + @FindBy(xpath = "//div/strong[@class='govuk-tag govuk-tag--blue']") + WebElement poolStatusRequestedTag; + + @FindBy(xpath = "//strong[contains(text(),'Active')]") + WebElement poolStatusActiveTag; + + + @FindBy(className = "govuk-pagination__next") + WebElement nextPaginationLink; + + @FindBy(id = "poolRequestsTable") + WebElement activePoolsTable; + + @FindBy(xpath = "//td[2]/a") + WebElement firstJurorInList; + + @FindBy(xpath = "//div[@class='moj-banner moj-banner--success']//a") + WebElement courtOnlyPoolRequestSuccessLink; + + public void clickNewlyCreatedCourtOnlyPoolLink() { + courtOnlyPoolRequestSuccessLink.click(); + } + + + public void openPoolManagement() { + log.info("Opening Pool Management"); + HEADER_PAGE.openAppsMenu(); + HEADER_PAGE.clickPoolManagement(); + } + + public void openSummonsManagement() { + log.info("Opening Summons Management"); + HEADER_PAGE.openAppsMenu(); + HEADER_PAGE.clickSummonsManagement(); + } + + public void clickCreateNilPool() { + log.info("Clicking create nil pool"); + createNilPool.click(); + } + + public void clickCreateAPool() { + log.info("Clicking create a pool"); + createAPool.click(); + } + + public boolean tabPresentAndCorrect(final String tabName) { + log.info("Checking tab is present and correct"); + clickTab(tabName); + NAV.waitForPageLoad(); +// return tabFocussed(tabName) & tableHeadingsVisible(); + return tableHeadingsVisible(); + } + + public void clickTab(final String tabName) { + log.info("Clicking tab"); + driver.findElement(By.linkText(tabName)).click(); + } + + public void clickActivePools() { + log.info("Click active pools"); + activePoolsLink.click(); + } + + private Boolean tabFocussed(final String tabName) { + log.info("Checking tab is focussed"); + WebElement tab = driver.findElement(By.linkText(tabName)); + return Objects.equals(tab.getAttribute("aria-current"), "page"); + } + + private Boolean tableHeadingsVisible() { + log.info("Checking table headings are visible"); + List tableHeadings = driver.findElements(By.xpath("//th")); + return Objects.equals(tableHeadings.size(), 4); + } + + public void clickNewPoolLink() { + log.info("Clicking New Pool link"); + requestNewPoolLink.click(); + } + + public String getPageHeading() { + log.info("Getting page heading"); + return pageHeading.getText(); + } + + public String getTableHeading() { + log.info("Getting table heading"); + return tableHeading.getText(); + } + + public String getAttendanceDateWarning() { + log.info("Getting attendance date warning"); + return attendanceDateWarning.getText(); + } + + public void clickContinue() { + log.info("Clicking continue"); + continueButton.click(); + } + + public void clickConfirm() { + log.info("Clicking confirm"); + confirmButton.click(); + } + + public void continueFromWarningPage() { + log.info("Continuing from warning page"); + warningContinue.click(); + } + + public String getRequestedCourtName() { + log.info("Getting court name"); + return courtName.getText(); + } + + public String getRequestedCourtDate() { + log.info("Getting court date"); + try { + return courtDateCheckDetails.getText(); + } catch (Exception e) { + return courtDateRequestPool.getText(); + } + } + + public void clickChangeCourt() { + log.info("Clicking change court"); + changeCourtLink.click(); + } + + public void enterAndSelectCourt(final String court) { + log.info("Selecting new court"); + courtTextBox.sendKeys(court); + selectFirstCourtDropdownOption(); + } + + private void selectFirstCourtDropdownOption() { + log.info("Selecing court from dropdown"); + courtDropdownFirstOption.click(); + } + + public void confirmNewCourtSelection() { + log.info("Clicking continue on court selection page"); + submitButton.click(); + } + + public void clickChangeDate() { + log.info("Clicking change date"); + changeDateLink.click(); + } + + public void enterNewDate(String weekendDateValue) { + log.info("Entering new date"); + attendanceDateField.clear(); + attendanceDateField.sendKeys(weekendDateValue); + + } + + + public void confirmNewDate() { + log.info("Clicking continue on date change page"); + submitButton.click(); + } + + public String getAttendanceTime() { + log.info("Getting attendance time"); + return courtTime.getText(); + } + public void clickChangeTime() { + log.info("Clicking change time"); + changeTimeLink.click(); + } + + public void clickChangePoolNumber() { + log.info("Clicking change pool number"); + changePoolNumberLink.click(); + } + + public boolean changePoolNumberInvisible() { + List elements = driver.findElements(By.cssSelector("#poolNumber a")); + return elements.isEmpty(); + + } + + public void fillTime(final String hour, final String minute) { + log.info("Filling time fields"); + timeHours.clear(); + timeHours.sendKeys(hour); + + timeMinutes.clear(); + timeMinutes.sendKeys(minute); + + } + + public void confirmNewTimeEntry() { + log.info("Confirming new time"); + submitButton.click(); + } + + public void selectPoolType(final PoolType poolType) { + log.info("Setting pool type"); + String selector = "//input[@value=\"%s\"]"; + + if (poolType.equals(PoolType.CIVIL)) + selector = String.format(selector, "CIV"); + if (poolType.equals(PoolType.CROWN)) + selector = String.format(selector, "CRO"); + if (poolType.equals(PoolType.HIGH)) + selector = String.format(selector, "HGH"); + + driver.findElement(By.xpath(selector)).click(); + } + + public void clickOnCallPoolCheckbox() { + log.info("Clicking on call pool checkbox"); + onCallPoolCheckbox.click(); + } + + public void enterNumberOfJurors(final String numberOfJurors) { + log.info("Entering number of jurors"); + numberOfJurorsField.clear(); + numberOfJurorsField.sendKeys(numberOfJurors); + } + + public String getErrorSummaryText() { + log.info("Getting error summary text"); + return errorSummary.getText(); + } + + public void clickToChangeDeferrals() { + log.info("Clicking change deferrals link"); + changeDeferralsLink.click(); + } + + public void enterNumberOfCourtDeferrals(final String numberOfDeferrals) { + log.info("Entering number of court deferrals"); + numberOfDeferralsField.sendKeys(numberOfDeferrals); + } + + public void submitCourtDeferrals() { + log.info("Submitting court deferrals"); + submitButton.click(); + } + + public void clickCancel() { + log.info("Clicking cancel"); + cancelLink.click(); + } + + public void clickPoolNumber(String poolNumber) { + log.info("Clicking pool number"); + driver.findElement(By.linkText(poolNumber)).click(); + } + + public Map getPoolRequestByNumber(final String poolNumber) { + log.info("Getting pool request for pool: " + poolNumber); + + List poolLink = driver.findElements(By.xpath("//a[contains(text(),'" + poolNumber + "')]")); + + while (poolLink.size() != 1) { + log.info("Clicking next pagination"); + clickNextPagination(); + poolLink = driver.findElements(By.xpath("//a[contains(text(),'" + poolNumber + "')]")); + System.out.println("Pool Found: "+ poolLink.size()); + } + + String jurorsRequired = driver.findElement(By.xpath( + String.format("//td[@data-sort-value=\"%s\"]/../td[2]", poolNumber) + )).getText(); + String court = driver.findElement(By.xpath( + String.format("//td[@data-sort-value=\"%s\"]/../td[3]", poolNumber) + )).getText(); + String attendanceDate = driver.findElement(By.xpath( + String.format("//td[@data-sort-value=\"%s\"]/../td[4]", poolNumber) + )).getText(); + + Map data = new HashMap<>(); + data.put("jurorsRequired", jurorsRequired); + data.put("court", court); + data.put("attendanceDate", attendanceDate); + return data; + } + + public void enterFilterString(final String filterQuery) throws InterruptedException { + log.info("Filtering by: " + filterQuery); + filterField.clear(); + filterField.sendKeys(filterQuery); + wait.waitForDisplayedElement(driver.findElement(By.className("autocomplete__option")), 10); + } + + public void clickFilterAutocompleteOption() { + WebElement autocompleteOption = driver.findElement(By.className("autocomplete__option")); + autocompleteOption.click(); + } + + public void clickFilterButton() { + filterButton.click(); + } + + public List getPoolRequestCourtNames() { + List elements = driver.findElements(By.xpath("//tr//td[3]")); + return elements.stream().map(WebElement::getText).collect(Collectors.toList()); + } + + public List getActivePoolRequestCourtNames() { + List elements = driver.findElements(By.xpath("//tr//td[4]")); + return elements.stream().map(WebElement::getText).collect(Collectors.toList()); + } + + public int countTableRows() { + return driver.findElements(By.xpath("//tr/td[@class=\"govuk-table__cell\"][1]")).size(); + } + + public void clickFirstRequestLink() { + log.info("Clicking first request link"); + firstPoolRequestLink.click(); + } + + public String getFirstRequestNumber() { + log.info("Getting first request number"); + return firstPoolRequestLink.getText(); + } + + public String getExistingPoolNumber() { + log.info("Getting existing pool number"); + return existingPoolNumber.getText(); + } + + public String getSummonCitizensPoolNumber() { + log.info("Getting pool number on summon citizens page"); + return summonCitizensPoolNumber.getText(); + } + + public void inputExistingPoolNumber() { + log.info("Input existing pool number"); + poolNumberInput.clear(); + poolNumberInput.sendKeys(getExistingPoolNumber()); + } + + public void inputExistingPoolNumberAlt(String poolNumber) { + log.info("Input existing pool number"); + poolNumberInput.clear(); + poolNumberInput.sendKeys(poolNumber); + } + + public void inputValidPoolNumber(String newPoolNo) { + log.info("Input valid pool number"); + + poolNumberInput.clear(); + poolNumberInput.sendKeys(newPoolNo); + } + + public String getBannerMessage() { + log.info("Getting banner message"); + return bannerMessage.getText(); + } + + public boolean requestIsVisibleByNumber(String poolNumber) { + log.info("Checking for visibility of pool request"); + try { + driver.findElement(By.linkText(poolNumber)); + return true; + } catch (NoSuchElementException e) { + return false; + } + } + + public enum PoolType { + CIVIL, + CROWN, + HIGH + } + + public boolean seePoolStatusRequestedTag() { + return poolStatusRequestedTag.isDisplayed(); + } + + public boolean seePoolStatusActiveTag() { + return poolStatusActiveTag.isDisplayed(); + } + + public String getNewPoolNumberOnSummary() { + return poolNumberSummary.getText(); + } + + public String getPoolNumberOnDetails() { + return poolNumberOnDetails.getText(); + } + + public void clickDeferralMaintenance() { + log.info("Click deferral maintenance"); + deferraMaintenanceLink.click(); + } + + public String seePoolHistoryUpdatedTime() { + log.info("Getting updated date and time"); + return timelineDateAndTime.getText(); + } + + public void clickNextPagination() { + nextPaginationLink.click(); + } + + public void clickActivePoolNumber(String poolNo) { + log.info("Finding and clicking active pool number"); + boolean lastPage = false; + while (!lastPage) { + List activePoolOverviewLink = driver.findElements(By.xpath("//*[contains(text(),'" + poolNo + "')]")); + if (activePoolOverviewLink.size() >= 1) { + activePoolOverviewLink.get(0).click(); + break; + } else { + if (driver.findElements(By.className("govuk-pagination__next")).size() < 1) { + lastPage = true; + } else { + log.info("Clicking next pagination"); + clickNextPagination(); + } + } + } + } + + + public void clickInactivePoolNumber(String poolNo) { + log.info("Finding and clicking active pool number"); + boolean lastPage = false; + while (!lastPage) { + List activePoolOverviewLink = driver.findElements(By.xpath("//a[contains(text(),'" + poolNo + "')]")); + if (activePoolOverviewLink.size() >= 1) { + activePoolOverviewLink.get(0).click(); + break; + } else { + if (driver.findElements(By.className("govuk-pagination__next")).size() < 1) { + lastPage = true; + } else { + log.info("Clicking next pagination"); + clickNextPagination(); + } + } + } + } + + public void clickNewPoolRequestsButton() { + log.info("Clicking request new pool button"); + requestNewPoolButton.click(); + } + + public void clickRequestPoolButton() { + log.info("Clicking request pool button"); + requestPoolButton.click(); + } + + public void clickSummonJurorsButton() { + log.info("Clicking summon jurors button"); + requestPoolButton.click(); + } + + public void clickCreatePoolAndSummonCitizensButton() { + log.info("Clicking create pool and summon citizens button"); + requestPoolButton.click(); + } + + public void selectFirstJurorInList() { + log.info("Clicked first juror in list"); + firstJurorInList.click(); + } + + public void checkJurorCheckboxSame_rowAs(String nextToText) { + wait.activateImplicitWait(); + WebElement checkbox = driver.findElement( + By.xpath( + "//input [@type='checkbox'] [@value=" + nextToText + "]" + )); + log.info("Saw checkbox in row which contained text =>" + nextToText); + checkbox.click(); + log.info("Checked checkbox which was in the same row as =>" + nextToText); + + } +} + diff --git a/src/main/java/cucumber/pageObjects/PoolSearch.java b/src/main/java/cucumber/pageObjects/PoolSearch.java new file mode 100644 index 00000000..f105e00d --- /dev/null +++ b/src/main/java/cucumber/pageObjects/PoolSearch.java @@ -0,0 +1,175 @@ +package cucumber.pageObjects; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + +public class PoolSearch { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(PoolSearch.class); + + public PoolSearch(WebDriver webDriver) { + PoolSearch.driver = webDriver; + PageFactory.initElements(driver, this); + } + + @FindBy(id = "poolNumber") + WebElement poolNo; + + @FindBy(id = "courtNameOrLocation") + WebElement locationCode; + + @FindBy(id = "serviceStartDate") + WebElement serviceStartDate; + + @FindBy(id = "poolStatus") + WebElement poolRequested; + + @FindBy(id = "poolStatus-2") + WebElement poolActive; + + @FindBy(id = "poolStatus-3") + WebElement poolCompleted; + + @FindBy(id = "poolStage") + WebElement withTheBureau; + + @FindBy(id = "poolStage-2") + WebElement atCourt; + + @FindBy(id = "poolType") + WebElement crownCourt; + + @FindBy(id = "poolType-2") + WebElement civilCourt; + + @FindBy(id = "poolType-3") + WebElement highCourt; + + @FindBy(css = "#advancedSearch span") + WebElement expandAdvanced; + + @FindBy(xpath = "//button[@type='submit']") + WebElement continueButton; + + @FindBy(className = "after-header__pool-record-label") + WebElement poolRecordHeader; + + @FindBy(css = "div h2") + WebElement poolSearchError; + + @FindBy(xpath = "//div[@class='govuk-grid-column-full']/h3") + WebElement poolSearchResultsTableHeader; + + @FindBy(className = "govuk-table__body") + WebElement poolSearchResultsTable; + @FindBy(className = "govuk-pagination__next") + public + WebElement nextButton; + + + + public void enterPoolNo(String text) { + poolNo.sendKeys(text); + } + + public void enterLocationCode(String text) { + locationCode.sendKeys(text); + } + + public void enterServiceStartDate(String text) { + serviceStartDate.sendKeys(text); + } + + public void clickAdvancedSearch() { + expandAdvanced.click(); + } + + public void clickPoolRequested() { poolRequested.click(); } + + public void clickPoolActive() { poolActive.click(); } + + public void clickPoolCompleted() { poolCompleted.click(); } + + public void clickWithTheBureau() { withTheBureau.click(); } + + public void clickAtCourt() { atCourt.click(); } + + public void clickCrownCourt() { crownCourt.click(); } + + public void clickCivilCourt() { civilCourt.click(); } + + public void clickHighCourt() { + highCourt.click(); + } + + public void clickContinue() { + continueButton.click(); + } + + public boolean poolRequestedIsSelected() { return poolRequested.isSelected(); } + + public boolean poolActiveIsSelected() { return poolActive.isSelected(); } + + public boolean poolCompletedIsSelected() { return poolCompleted.isSelected(); } + + public boolean withTheBureauIsSelected() { return withTheBureau.isSelected(); } + + public boolean atCourtIsSelected() { return atCourt.isSelected(); } + + public boolean crownCourtIsSelected() { return crownCourt.isSelected(); } + + public boolean civilCourtIsSelected() { return civilCourt.isSelected(); } + + public boolean highCourtIsSelected() { return highCourt.isSelected(); } + + public boolean poolRecordIsDisplayed() { + return poolRecordHeader.isDisplayed(); + } + + public String getPoolSearchErrorText() { + return poolSearchError.getText(); + } + + public String getPoolSearchResultText(){ + return poolSearchResultsTableHeader.getText(); + } + + public Integer getPoolSearchNumberOfResults(){ + By element = By.className("govuk-pagination__next"); + List nextNavButton = driver.findElements(element) ; + int numberOfRows = 0; + if(!nextNavButton.isEmpty()) while (!nextNavButton.isEmpty()) { + numberOfRows = numberOfRows + poolSearchResultsTable.findElements(By.tagName("tr")).size(); + log.info("Number of rows: " + numberOfRows); + nextButton.click(); + nextNavButton = driver.findElements(element); + } + if(nextNavButton.isEmpty()) { + numberOfRows = numberOfRows + poolSearchResultsTable.findElements(By.tagName("tr")).size(); + log.info("Number of rows: " + numberOfRows); + } + + return numberOfRows; + } + + public void clickPoolNumberInSearchList(String poolnumber) { + + try { + if (driver.findElement(By.xpath("//a[contains(text(),'" + poolnumber + "' )]")).isDisplayed()) { + driver.findElement(By.xpath("//input[@id='pool-"+ poolnumber + "']")).click(); + } + + } catch (Exception e) { + log.info("Received error when searching for the expected pool number from the ressign list"); + log.info(e); + } + } +} + diff --git a/src/main/java/cucumber/pageObjects/PoolSummoningProgress.java b/src/main/java/cucumber/pageObjects/PoolSummoningProgress.java new file mode 100644 index 00000000..3fffece2 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/PoolSummoningProgress.java @@ -0,0 +1,64 @@ +package cucumber.pageObjects; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + +public class PoolSummoningProgress { + private static WebDriver driver; + private static final Logger log = Logger.getLogger(PoolSearch.class); + + public PoolSummoningProgress(WebDriver webDriver) { + PoolSummoningProgress.driver = webDriver; + PageFactory.initElements(driver, this); + } + @FindBy(id = "summoningProgressAnchor") + WebElement summoningProgressTab; + @FindBy(xpath = "//*[@class='govuk-heading-l' and contains(text(),'Summoning progress')]") + WebElement summoningProgressBanner; + @FindBy(id = "courtNameOrLocation") + WebElement courtNameOrLocationInput; + @FindBy(id = "poolType") + WebElement crownRadioButton; + @FindBy(id = "poolType-2") + WebElement civilRadioButton; + @FindBy(id = "poolType-3") + WebElement highRadioButton; + @FindBy(xpath = "//*[@class='govuk-button' and contains(text(),'Search')]") + WebElement searchButton; + + public void clickSummoningProgressTab() { + summoningProgressTab.click(); + } + public boolean summoningProgressBannerIsDisplayed(){return summoningProgressBanner.isDisplayed();} + + public void enterCourtCodeForSearch(String courtCode) { courtNameOrLocationInput.sendKeys(courtCode); + } + + public void clickCrownRadioButton() {crownRadioButton.click(); + } + + public void clickCivilRadioButton() {civilRadioButton.click(); + } + + public void clickHighRadioButton() {highRadioButton.click(); + } + public void clickSearch(){searchButton.click();} + public String[] getRowOfTableContainingPoolNumber(String poolCreated){ + List rowContainingPool = driver.findElements(By.xpath("//*[text()='" +poolCreated+"']/parent::*/parent::*/td")); + int index = 0; + int noOfElements = rowContainingPool.size(); + String[] row = new String[noOfElements]; + + do { + row[index] = rowContainingPool.get(index).getText(); + index++; + } while (index < noOfElements); + return row; + } +} diff --git a/src/main/java/cucumber/pageObjects/Profile.java b/src/main/java/cucumber/pageObjects/Profile.java new file mode 100644 index 00000000..9ea418b2 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Profile.java @@ -0,0 +1,78 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class Profile { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Profile.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + + + public Profile(WebDriver driver) { + Profile.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + + } + + @FindBy(id = "confirmAccountDetailsCorrect") + WebElement confirmAccountDetailsCorrect_checkbox; + + @FindBy(id = "continue") + WebElement continue_button; + + public Boolean checkbox_state() throws Throwable { + + Boolean confirmAccountDetailsCorrect_state = confirmAccountDetailsCorrect_checkbox.isSelected(); + + log.info("Confirm Account Details Correct Checkbox =>" + confirmAccountDetailsCorrect_state); + + return confirmAccountDetailsCorrect_state; + } + + public Profile termsAndConditions_check() throws Throwable { + + confirmAccountDetailsCorrect_checkbox.click(); + + log.info("Terms and Conditions checked"); + checkbox_state(); + + return PageFactory.initElements(driver, Profile.class); + } + + public Profile continueButton_click() throws Throwable { + + confirmAccountDetailsCorrect_checkbox.click(); + + log.info("Clicked on Continue Button"); + + return PageFactory.initElements(driver, Profile.class); + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/Scheduler.java b/src/main/java/cucumber/pageObjects/Scheduler.java new file mode 100644 index 00000000..1edfcd05 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Scheduler.java @@ -0,0 +1,66 @@ +package cucumber.pageObjects; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.apache.log4j.Logger; + +import com.google.common.base.Charsets; +import com.google.common.io.Files; + +import cucumber.testdata.DBConnection; +import cucumber.utils.ReadProperties; + +public class Scheduler { + + private static Logger log = Logger.getLogger(Scheduler.class); + + private DBConnection db; + private Connection conn; + private PreparedStatement cStmt = null; + + + public void insertIntoSchedule_notifyRequest(String content) throws SQLException { + db = new DBConnection(); + conn = db.getPostGresConnection("cp_subscriptionscheduler_db"); + + try { + cStmt = conn.prepareStatement("insert into schedule_notify_request (notify_time, notify_request_message) values " + + "(" + + "'2018-06-23 10:22:22.560000'," + + "?" + + ")"); + + cStmt.setString(1, content); + + cStmt.executeUpdate(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message: " + e.getMessage()); + } + finally { + cStmt.close(); + conn.close(); + } + } + + + public void loadFile_intoScheduleNotifyRequestTable(String file_name) throws IOException, Exception { + String content = Files.toString(new File("src/test/resources/schedule_notify_request_DATA/"+file_name+"_request.xml"), Charsets.UTF_8); + insertIntoSchedule_notifyRequest(content); + log.info("Successfully Sent the following to the database => \n"+content); + } + +} diff --git a/src/main/java/cucumber/pageObjects/ScreenShotTaker.java b/src/main/java/cucumber/pageObjects/ScreenShotTaker.java new file mode 100644 index 00000000..143a1a04 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/ScreenShotTaker.java @@ -0,0 +1,46 @@ +package cucumber.pageObjects; + +import java.io.File; +import java.io.IOException; +import org.apache.log4j.Logger; +import org.openqa.selenium.OutputType; +import org.openqa.selenium.TakesScreenshot; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +import org.apache.commons.io.FileUtils; + +public class ScreenShotTaker { + private static Logger log = Logger.getLogger(ScreenShotTaker.class); + private WaitUtil_v2 wait1; + private WaitUtils wait; + private WebDriver driver; + + public ScreenShotTaker(WebDriver webDriver) { + this.driver = webDriver; + wait1 = new WaitUtil_v2(driver); + wait = new WaitUtils(driver); + } + + + public ScreenShotTaker captureScreenShot(){ + File src = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); + try { + + FileUtils.copyFile(src, new File("ScreenShot/" + System.currentTimeMillis() + ".png")); + log.info("Took Screenshot as called"); + + } catch (IOException e) { + + log.info(e.getMessage()); + + } + + return PageFactory.initElements(driver, ScreenShotTaker.class); + } +} diff --git a/src/main/java/cucumber/pageObjects/Search.java b/src/main/java/cucumber/pageObjects/Search.java new file mode 100644 index 00000000..b76c2144 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Search.java @@ -0,0 +1,58 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class Search { + private static WebDriver driver; + private static Logger log = Logger.getLogger(Search.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public Search(WebDriver driver) { + Search.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + + + public void search_personOrganisationTopSearch(String arg1) { + WebElement searchBox = driver.findElement(By.id("searchBox")); + searchBox.sendKeys(arg1); + searchBox.sendKeys(Keys.ENTER); + + log.info("Searched and pressed enter for text =>"+arg1); + } + + + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/SharedDriver.java b/src/main/java/cucumber/pageObjects/SharedDriver.java new file mode 100644 index 00000000..3f2520de --- /dev/null +++ b/src/main/java/cucumber/pageObjects/SharedDriver.java @@ -0,0 +1,147 @@ +package cucumber.pageObjects; + +import java.io.File; +import java.util.concurrent.TimeUnit; + +import org.openqa.selenium.UnexpectedAlertBehaviour; +//import org.openqa.selenium.Dimension; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.firefox.FirefoxBinary; +import org.openqa.selenium.firefox.FirefoxDriver; +import org.openqa.selenium.firefox.FirefoxOptions; +import org.openqa.selenium.firefox.FirefoxProfile; +import org.openqa.selenium.ie.InternetExplorerDriver; +import org.openqa.selenium.ie.InternetExplorerOptions; +import org.openqa.selenium.phantomjs.PhantomJSDriver; +import org.openqa.selenium.phantomjs.PhantomJSDriverService; +import org.openqa.selenium.remote.CapabilityType; +import org.openqa.selenium.remote.DesiredCapabilities; +import org.openqa.selenium.support.events.EventFiringWebDriver; +//msedge +import org.openqa.selenium.Capabilities; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.remote.RemoteWebDriver; +import org.openqa.selenium.remote.service.DriverCommandExecutor; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.edge.EdgeDriver; +import org.openqa.selenium.edge.EdgeOptions; +import org.openqa.selenium.support.ui.ExpectedCondition; +import org.openqa.selenium.support.ui.WebDriverWait; + + +import cucumber.utils.ReadProperties; + +public class SharedDriver extends EventFiringWebDriver { + + private static WebDriver REAL_DRIVER; + private static Thread CLOSE_THREAD = new Thread() { + @Override + public void run() { + REAL_DRIVER.quit(); + } + }; + + static { + + String usingDriver = ReadProperties.machine("usingDriver"); + String usingProxy = ReadProperties.machine("usingProxy"); + String headlessChrome = ReadProperties.machine("headlessChrome"); + + + if (System.getProperty("envDriver") != null) + usingDriver = System.getProperty("envDriver"); + + if (usingDriver.toLowerCase().equals("ie")) { + System.setProperty("webdriver.ie.driver", ReadProperties.machine("ie_driver")); + InternetExplorerOptions options = new InternetExplorerOptions(); + options.introduceFlakinessByIgnoringSecurityDomains(); + org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy(); + proxy.setProxyType(org.openqa.selenium.Proxy.ProxyType.DIRECT); + options.setProxy(proxy); + + REAL_DRIVER = new InternetExplorerDriver(options); + } else if (usingDriver.equalsIgnoreCase("msedge")) { + System.setProperty("webdriver.edge.driver", "src/test/resources/msedgedriver.exe"); + EdgeOptions options = new EdgeOptions(); + try { + REAL_DRIVER = new EdgeDriver(options); + } catch (Exception e) { // intended settings for running in jenkins + System.setProperty("webdriver.edge.driver", "/usr/bin/msedgedriver"); + options.addArguments("--headless"); + options.addArguments("--window-size=1920,1080"); + options.addArguments("--disable-dev-shm-usage"); + options.addArguments("--remote-allow-origins=*"); + REAL_DRIVER = new EdgeDriver(options); + } + } else if (usingDriver.toLowerCase().equals("phantomjs")){ + DesiredCapabilities DesireCaps = new DesiredCapabilities(); + DesireCaps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "src/test/resources/phantomjs.exe"); + REAL_DRIVER = new PhantomJSDriver(DesireCaps); + } else if (usingDriver.equalsIgnoreCase("firefox")){ + System.setProperty("webdriver.gecko.driver", "src/test/resources/geckodriver.exe"); + FirefoxOptions options = new FirefoxOptions(); + options.addArguments("--headless"); + try { + REAL_DRIVER = new FirefoxDriver(options); + } catch (Exception e) { // intended settings for running in jenkins + System.setProperty("webdriver.gecko.driver", "/usr/bin/geckodriver"); + REAL_DRIVER = new FirefoxDriver(options); + } + } else { // Assuming Chrome + // These settings are intended for Windows machines + System.setProperty("webdriver.chrome.driver","src/test/resources/drivers/chromedriver91.exe"); + ChromeOptions options = new ChromeOptions(); + options.addArguments("--disable-features=VizDisplayCompositor"); + options.addArguments("--start-maximized"); +// options.addArguments("--no-proxy-server"); +// options.addArguments("--version"); + options.addArguments("--incognito"); + options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.IGNORE); + if (headlessChrome.equalsIgnoreCase("true")) { + options.addArguments("--headless"); + options.addArguments("--window-size=1920,1080"); + } else { + //options.addArguments("--start-maximized"); + } + try { + REAL_DRIVER = new ChromeDriver(options); + } catch (Exception e) { + try { + // These settings are intended for dev macbooks + System.setProperty("webdriver.chrome.driver","/usr/local/bin/chromedriver"); + REAL_DRIVER = new ChromeDriver(options); + } catch (Exception f) { // intended settings for running in jenkins + System.setProperty("webdriver.chrome.driver","src/test/resources/drivers/chromedriver-linux64_118.0.5993.70/chromedriver"); + options.addArguments("--headless"); + options.addArguments("--window-size=1920,1080"); + options.addArguments("--disable-dev-shm-usage"); + REAL_DRIVER = new ChromeDriver(options); + } + } + } + + REAL_DRIVER.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); + REAL_DRIVER.manage().deleteAllCookies(); + + // REAL_DRIVER.manage().window().setSize(new Dimension(1024,728)); + Runtime.getRuntime().addShutdownHook(CLOSE_THREAD); + } + + public SharedDriver() { + super(REAL_DRIVER); + + } + + @Override + public void close() { + if (Thread.currentThread() != CLOSE_THREAD) { + throw new UnsupportedOperationException( + "You shouldn't close this WebDriver. It's shared and will close when the JVM exits."); + } + super.close(); + } + +} diff --git a/src/main/java/cucumber/pageObjects/SummonCitizens.java b/src/main/java/cucumber/pageObjects/SummonCitizens.java new file mode 100644 index 00000000..1b1d8674 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/SummonCitizens.java @@ -0,0 +1,102 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + +public class SummonCitizens { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Search.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + private Groups GRP; + private final Header HEADER_PAGE; + + public SummonCitizens(WebDriver driver) { + SummonCitizens.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + HEADER_PAGE = PageFactory.initElements(driver, Header.class); + } + + @FindBy(xpath = "//p[contains(text(),\"Jurors requested\")]//ancestor::div/div/form/div/p[2]") + WebElement summonCitizensNumberOfJurorsRequested; + + @FindBy(xpath = "//p[contains(text(),\"Jurors required to complete this request\")]/following-sibling::p") + WebElement summonCitizensNumberOfJurorsRequired; + + @FindBy(xpath = "//dl[@id='catchmentArea']/div/dd") + WebElement summonCitizensCourtCatchmentArea; + + @FindBy(xpath = "//dl[@id='bureauDeferrals']/div/dd") + WebElement summonCitizensDeferrals; + + @FindBy(xpath = "//a[@href='#citizensToSummon']") + WebElement numberOfCitizensSummonedError; + + @FindBy(xpath = "//dl[@id='bureauDeferrals']/div/dd/a[contains(text(),'Change')]") + WebElement changeDeferralsLink; + + @FindBy(xpath = "//dl[@id='catchmentArea']/div/dd/a[contains(text(),'Change')]") + WebElement changeCatchmentLink; + + @FindBy(xpath = "//button[contains(text(),'Create pool and summon citizens')]") + WebElement summonedCitizensSubmitButton; + + public String getSummonCitizensNumberOfJurorsRequested() { + log.info("Getting number of jurors requested on summons citizens page"); + return summonCitizensNumberOfJurorsRequested.getText(); + } + + public String getSummonCitizensNumberOfJurorsRequired() { + log.info("Getting number of jurors required on summons citizens page"); + return summonCitizensNumberOfJurorsRequired.getText(); + } + + public String getSummonCitizensCourtCatchmentArea() { + log.info("Getting court catchment area on summons citizens page"); + return summonCitizensCourtCatchmentArea.getText(); + } + + public String getSummonCitizensDeferrals() { + log.info("Getting number of deferrals on summons citizens page"); + return summonCitizensDeferrals.getText(); + } + + public String getNumberOfCitizensSummonedError() { + log.info("Getting pool attendance date"); + return numberOfCitizensSummonedError.getText(); + } + + public boolean summonedCitizensChangeDeferralsIsPresent() { + return changeDeferralsLink.isDisplayed(); + } + + public boolean summonedCitizensChangeCatchmentIsPresent() { + return changeCatchmentLink.isDisplayed(); + } + + public boolean summonedCitizensSubmitButtonIsPresent() { + return summonedCitizensSubmitButton.isDisplayed(); + } + + public Boolean summonCitizensButtonInvisible() { + List elements = driver.findElements(By.id("summonCitizensButton")); + return elements.isEmpty(); + } +} diff --git a/src/main/java/cucumber/pageObjects/SummonsReply.java b/src/main/java/cucumber/pageObjects/SummonsReply.java new file mode 100644 index 00000000..892e2c8a --- /dev/null +++ b/src/main/java/cucumber/pageObjects/SummonsReply.java @@ -0,0 +1,644 @@ +package cucumber.pageObjects; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; +import java.util.stream.Collectors; + +public class SummonsReply { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(SummonsReply.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final AngularJsHTTPCallWait aJsWait; + private final NavigationShared NAV; + + private final Header HEADER_PAGE; + + public SummonsReply(WebDriver driver) { + SummonsReply.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + HEADER_PAGE = PageFactory.initElements(driver, Header.class); + } + + @FindBy(linkText = "Enter summons reply") + WebElement enterSummonsReplyButton; + + @FindBy(id = "dobDay") + WebElement dobDay; + + @FindBy(id = "dateOfBirthDay") + WebElement dateOfBirthDay; + + @FindBy(id = "dobMonth") + WebElement dobMonth; + + @FindBy(id = "dateOfBirthMonth") + WebElement dateOfBirthMonth; + + @FindBy(id = "dobYear") + WebElement dobYear; + + @FindBy(id = "dateOfBirthYear") + WebElement dateOfBirthYear; + + @FindBy(id = "primaryPhone") + WebElement mainPhone; + + @FindBy(id = "secondaryPhone") + WebElement altPhone; + + @FindBy(id = "emailAddress") + WebElement email; + + @FindBy(id = "jurorCompletedOnBehalf") + WebElement completedOnBehalfYes; + + @FindBy(id = "jurorCompletedOnBehalf-2") + WebElement completedOnBehalfNo; + + @FindBy(id = "thirdPartyReason") + WebElement thirdPartyReasonNotHere; + + @FindBy(id = "continueButton") + WebElement continueButton; + + @FindBy(id = "livedConsecutive") + WebElement livedConsecutivelyYes; + + @FindBy(id = "livedConsecutive-2") + WebElement livedConsecutivelyNo; + + @FindBy(id = "mentalHealthAct") + WebElement mentalHealthActYes; + + @FindBy(id = "mentalHealthAct-2") + WebElement mentalHealthActNo; + + @FindBy(id = "mentalHealthCapacity") + WebElement lackCapacityYes; + @FindBy(id = "mentalHealthCapacity-2") + WebElement lackCapacityNo; + + @FindBy(id = "onBail") + WebElement onBailYes; + + @FindBy(id = "onBail-2") + WebElement onBailNo; + + @FindBy(id = "convicted") + WebElement criminalOffenceYes; + + @FindBy(id = "convicted-2") + WebElement criminalOffenceNo; + + @FindBy(id = "deferralValue") + WebElement canServeDate; + + @FindBy(id = "deferralValue-2") + WebElement deferralRequest; + + @FindBy(id = "deferralValue-3") + WebElement excusalRequest; + + @FindBy(id = "cjsEmploymentResponse") + WebElement cjsEmploymentYes; + + @FindBy(id = "cjsEmploymentResponse-2") + WebElement cjsEmploymentNo; + + @FindBy(id = "signed") + WebElement signedYes; + + @FindBy(id = "signed-2") + WebElement signedNo; + + @FindBy(id = "adjustmentsResponse") + WebElement adjustmentsYes; + + @FindBy(id = "adjustmentsResponse-2") + WebElement adjustmentsNo; + + @FindBy(id = "welsh") + WebElement welsh; + + @FindBy(id = "doneButton") + WebElement doneButton; + + @FindBy(className = "govuk-heading-l") + WebElement heading; + + @FindBy(id= "fixNameAnchor") + WebElement changeName; + @FindBy(id = "addressChangeAnchor") + WebElement changeAddress; + + @FindBy(id = "firstName") + WebElement firstNameField; + + @FindBy(id = "address1") + WebElement address1; + + @FindBy(id = "saveButton") + WebElement saveChanges; + + @FindBy(xpath = "//div/h2[contains(text(),'Address')]/../../div[4]/div/p") + WebElement jurorAddress; + + @FindBy(xpath = "//div/h2[contains(text(),'Name')]/../../div[2]/div/p") + WebElement jurorName; + + @FindBy(id = "cjsSystemOptionsPolice") + WebElement policeForceCheckbox; + + @FindBy(id = "cjsSystemPoliceDetails") + WebElement policeForceTextBox; + + @FindBy(xpath = "//*[@Class='moj-badge moj-badge--red']") + WebElement superUrgentFlag; + + @FindBy(id = "processReply") + WebElement processReplyButton; + + @FindBy(xpath = "//input[@value='excusal']") + WebElement excusalRadioButton; + + @FindBy(id = "excusalDecision") + WebElement grantExcusalRadioButton; + + @FindBy(id = "excusalDecision-2") + WebElement refuseExcusalRadioButton; + + @FindBy(xpath = "//div[@class='moj-banner__message']") + WebElement responseBanner; + + @FindBy(id = "processActionType") + WebElement markAsResponded; + + @FindBy(id = "processActionType-2") + WebElement processActionDeferralRequest; + + @FindBy(id = "responded") + WebElement confirmMarkAsRespondedCheckbox; + @FindBy(xpath = "//button[text()[contains(.,'Confirm')]]") + WebElement markAsRespondedConfirmButton; + + @FindBy(xpath = "//div[@Class='moj-banner moj-banner--success']") + WebElement processedSuccessBanner; + + @FindBy(xpath = "//div[@Class='moj-banner moj-banner--success']/div/a") + WebElement processedSuccessBannerLink; + + @FindBy(xpath = "//a[contains(text(),'Cancel')]") + WebElement cancelLink; + + @FindBy(xpath = "//a[@ID='cancelAnchor'][contains(text(),'process later')]") + WebElement cancelAnchorProcessLater; + + @FindBy(xpath ="//*[@class='info with-icon']") + WebElement jurorStatus; + @FindBy(xpath = "//*[@class='govuk-body']") + WebElement reassignErrorText; + + @FindBy(xpath = "//*[@class='govuk-error-summary']") + WebElement respondedError; + + @FindBy(xpath = "//*[@class='govuk-error-summary']/div/ul/li/a") + WebElement respondedErrorText; + + @FindBy(xpath = "//dt[contains(text(),'Reply status')]/../..//strong") + WebElement replyStatus; + + @FindBy(id = "jurorNumber") + WebElement jurorNumber; + + @FindBy(id = "jurorLastName") + WebElement jurorLastName; + + @FindBy(id = "jurorPostcode") + WebElement jurorPostcode; + + @FindBy(id = "deferralReason") + WebElement digitalDeferralReason; + + @FindBy(name = "deferDate1") + WebElement firstChoice; + + @FindBy(name = "deferDate2") + WebElement secondChoice; + + @FindBy(name = "deferDate3") + WebElement thirdChoice; + + @FindBy(name = "deferredToDate1") + WebElement firstChoicePaper; + + @FindBy(name = "deferredToDate2") + WebElement secondChoicePaper; + + @FindBy(name = "deferredToDate3") + WebElement thirdChoicePaper; + + @FindBy(name = "deferralDate") + WebElement altChoicePaper; + + @FindBy(xpath = "//input[@value='otherDate']") + WebElement deferralOptionDifferent; + + + @FindBy(xpath = "/html/body/div[2]/main/form/div[3]/div/div[1]/div/div[1]/button") + WebElement dateOfBirthButton; + + @FindBy(id = "dateOfBirth") + WebElement dateOfBirth; + + @FindBy(id = "thirdParty") + WebElement thirdPartyRadioButton; + + @FindBy(id = "extraSupport") + WebElement additionalRequirementsButton; + + @FindBy(xpath = "/html/body/div[3]/main/nav/div[1]/div/div[1]/nav/ul/li[1]") + WebElement jurorDetailsTab; + + @FindBy(xpath = "/html/body/div[3]/main/nav/div[1]/div/div[1]/nav/ul/li[2]/a") + WebElement eligibilityTab; + + @FindBy(xpath = "/html/body/div[3]/main/nav/div[1]/div/div[1]/nav/ul/li[3]/a") + WebElement deferralOrExcusalTab; + + @FindBy(xpath = "/html/body/div[3]/main/nav/div[1]/div/div[1]/nav/ul/li[4]/a") + WebElement cjsEmploymentTab; + + @FindBy(xpath = "/html/body/div[3]/main/nav/div[1]/div/div[1]/nav/ul/li[5]/a") + WebElement reasonableAdjustmentsTab; + + @FindBy(xpath = "/html/body/div[3]/main/nav/div[1]/div/div[1]/nav/ul/li[6]/a") + WebElement signatureTab; + + @FindBy(xpath = "/html/body/div[2]/main/div/div/form/div[1]/fieldset/div/div[2]/input") + WebElement residencyNoButton; + + @FindBy(id = "processReply") + WebElement processNowButton; + + + public String getReplyStatus() { + return replyStatus.getText(); + } + + public void selectExcusalRadio() { + excusalRadioButton.click(); + } + + public void selectGrantExcusalRadio() { + grantExcusalRadioButton.click(); + } + + public void selectRefuseExcusalRadio() { + refuseExcusalRadioButton.click(); + } + + public String getHeadingText() { + return heading.getText(); + } + + public void clickEnterSummonsReplyButton() { + enterSummonsReplyButton.click(); + } + + public void enterDobDay(String text) { + try { + dobDay.clear(); + dobDay.sendKeys(text); + } catch (Exception e) { + dateOfBirthDay.clear(); + dateOfBirthDay.sendKeys(text); + } + } + + public void enterDobMonth(String text) { + try { + dobMonth.clear(); + dobMonth.sendKeys(text); + } catch (Exception e) { + dateOfBirthMonth.clear(); + dateOfBirthMonth.sendKeys(text); + } + } + + public void enterDobYear(String text) { + try { + dobYear.clear(); + dobYear.sendKeys(text); + } catch (Exception e) { + dateOfBirthYear.clear(); + dateOfBirthYear.sendKeys(text); + } + } + + public void enterPrimaryPhone(String text) { + mainPhone.clear(); + mainPhone.sendKeys(text); + } + + public void enterSecondaryPhone(String text) { + altPhone.clear(); + altPhone.sendKeys(text); + } + public String reassignErrorText() { + return reassignErrorText.getText(); + } + public void enterEmail(String text) { + email.clear(); + email.sendKeys(text); + } + + public void selectYesOnBehalfOf() { + completedOnBehalfYes.click(); + } + + public void selectNoOnBehalfOf() { + completedOnBehalfNo.click(); + } + + public void selectThirdPartyReasonNotHere() { + thirdPartyReasonNotHere.click(); + } + public void clickContinue() { + continueButton.click(); + } + + public void clickLivedConsecutivelyYes() { + livedConsecutivelyYes.click(); + } + + public void clickLivedConsecutivelyNo() { + livedConsecutivelyNo.click(); + } + + public void clickMentalHealthActYes() { + mentalHealthActYes.click(); + } + + public void clickMentalHealthActNo() {mentalHealthActNo.click();} + public void clickLackCapacityYes() { + lackCapacityYes.click(); + } + + public void clickLackCapacityNo() { + lackCapacityNo.click(); + } + + public void clickOnBailYes() { + onBailYes.click(); + } + + public void clickOnBailNo() { + onBailNo.click(); + } + + public void clickCriminalOffenceYes() { + criminalOffenceYes.click(); + } + + public void clickCriminalOffenceNo() { + criminalOffenceNo.click(); + } + + public void clickCanServeDate() { + canServeDate.click(); + } + + public void clickDeferralRequest() { + deferralRequest.click(); + } + + public void clickExcusalRequest() { + excusalRequest.click(); + } + + public void clickCjsEmploymentYes() { + cjsEmploymentYes.click(); + } + + public void clickCjsEmploymentNo() { + cjsEmploymentNo.click(); + } + + public void clickAdjustmentsYes() {adjustmentsYes.click();} + + public void clickAdjustmentsNo() { + adjustmentsNo.click(); + } + + + public void clickWelsh() { + welsh.click(); + } + + public void clickSignedYes() { + signedYes.click(); + } + + public void clickSignedNo() { + signedNo.click(); + } + + public void clickDoneButton() { + doneButton.click(); + } + + public void enterDateOfBirth(String text) { + dateOfBirth.clear(); + dateOfBirth.sendKeys(text); + } + + public void clickDateOfBirthButton() { + dateOfBirthButton.click(); + } + + public void clickYesThirdPartyJurorDetailsButton() { + thirdPartyRadioButton.click(); + } + + public void clickYesAdditionalRequirementsJurorDetailsButton() { + additionalRequirementsButton.click(); + } + + public void clickJurorDetailsTab() { + jurorDetailsTab.click(); + } + + public void clickEligibilityTab() { + eligibilityTab.click(); + } + + + public void clickdeferralOrExcusalTab() { + deferralOrExcusalTab.click(); + } + + + public void clickcjsEmploymentTab() { + cjsEmploymentTab.click(); + } + + + public void clickreasonableAdjustmentsTab() { + reasonableAdjustmentsTab.click(); + } + + + public void clicksignatureTab() { + signatureTab.click(); + } + + public void clickresidencyNoButton() { + residencyNoButton.click(); + + } + public void clickProcessNowButton() { + processNowButton.click(); + } + + public List getErrors() { + return driver.findElements(By.xpath( + "//ul[@class=\"govuk-list govuk-error-summary__list\"]//li" + )).stream().map(WebElement::getText).collect(Collectors.toList()); + } + + public void clickChangeName() { + changeName.click(); + } + + public void enterFirstName(String name) { + firstNameField.clear(); + firstNameField.sendKeys(name); + } + public void clickChangeAddress() { + changeAddress.click(); + } + public void enterAddressLineOne(String address) { + address1.clear(); + address1.sendKeys(address); + } + + public void saveChanges() { + saveChanges.click(); + } + + public String getJurorName() { + return jurorName.getText(); + } + + public String getJurorAddress() { + return jurorAddress.getText(); + } + + public void selectPoliceForceYes() { + policeForceCheckbox.click(); + } + + public void enterPoliceForceDetails(String text) { + policeForceTextBox.sendKeys(text); + } + + public String getSuperUrgentFlag(){ return superUrgentFlag.getText();} + + public boolean processReplyButtonIsPresent() { + return processReplyButton.isDisplayed(); + } + + public void clickProcessReplyButton(){ processReplyButton.click();} + + public static Boolean processedSuccessBannerInvisible() { + List elements = driver.findElements(By.xpath("//div[@class=\"moj-banner moj-banner--success\"]")); + return elements.isEmpty(); + } + + public String getResponseBannerText() { return responseBanner.getText(); + } + + public void clickMarkAsResponded() { + markAsResponded.click(); + } + public void clickProcessAcionDeferralRequest() { + processActionDeferralRequest.click(); + } + public void clickMarkAsRespondedCheckbox(){confirmMarkAsRespondedCheckbox.click();} + public void clickConfirmMarkAsRespondedButton() { + markAsRespondedConfirmButton.click(); + } + + public boolean processedSuccessBannerIsPresent() { + return processedSuccessBanner.isDisplayed(); + } + public String processSuccessBannerLink(){ return processedSuccessBannerLink.getText();} + + public void clickProcessSuccessBannerLink(){ processedSuccessBannerLink.click();} + + public void clickCancelLink() { + cancelLink.click(); + } + + public String getJurorStatus() { + return jurorStatus.getText(); + } + public boolean errorIsPresent() { + return respondedError.isDisplayed(); + } + + public String getErrorText() { + return respondedErrorText.getText(); + } + + public Boolean enterSummonsReplyButtonInvisible() { + List elements = driver.findElements(By.xpath("//a[contains(text(),'Enter summons reply')]")); + return elements.isEmpty(); + + } + + public void clickNoToReplyLater() { cancelAnchorProcessLater.click(); } + + public void setJurorNumber(String jurorNo){ jurorNumber.sendKeys(jurorNo);} + + public void setJurorLname(String jurorLname){ jurorLastName.sendKeys(jurorLname);} + + public void setJurorPostcode(String jurorPost){jurorPostcode.sendKeys(jurorPost);} + + public void setDigitalDeferralReason(String deferralReason){digitalDeferralReason.sendKeys(deferralReason);} + + public void setFirstChoice(String firstChoiceDate){firstChoice.clear(); firstChoice.sendKeys(firstChoiceDate);} + + public void setSecondChoice(String secondChoiceDate){secondChoice.clear(); secondChoice.sendKeys(secondChoiceDate);} + + public void setThirdChoice(String thirdChoiceDate){thirdChoice.clear(); thirdChoice.sendKeys(thirdChoiceDate);} + + public void setFirstChoicePaper(String firstChoiceDate){firstChoicePaper.clear(); firstChoicePaper.sendKeys(firstChoiceDate);} + + public void setSecondChoicePaper(String secondChoiceDate){secondChoicePaper.clear(); secondChoicePaper.sendKeys(secondChoiceDate);} + + public void setThirdChoicePaper(String thirdChoiceDate){thirdChoicePaper.clear(); thirdChoicePaper.sendKeys(thirdChoiceDate);} + + public void setAltChoicePaper(String altChoiceDate){altChoicePaper.clear(); altChoicePaper.sendKeys(altChoiceDate);} + + public void deferralOptionDifferent(){deferralOptionDifferent.click();} + + public void clickPoolCreatedForDeferral(String poolNumber) { + driver.findElement(By.xpath("//*[contains(text(),'"+poolNumber+"')]/../../input")).click(); + } +} diff --git a/src/main/java/cucumber/pageObjects/SuspendDelete.java b/src/main/java/cucumber/pageObjects/SuspendDelete.java new file mode 100644 index 00000000..d0b6494a --- /dev/null +++ b/src/main/java/cucumber/pageObjects/SuspendDelete.java @@ -0,0 +1,58 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.ReadProperties; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class SuspendDelete { + private static WebDriver driver; + private static Logger log = Logger.getLogger(SuspendDelete.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + private NavigationShared NAV; + + + public SuspendDelete(WebDriver driver) { + SuspendDelete.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + NAV = new NavigationShared(driver); + } + + public void seeText_underHeading(String text, String heading) { + log.info("Going to check heading with text =>"+heading+"<= has text =>"+ text+"<= under neath it"); + wait.deactivateImplicitWait(); + driver.findElement(By.xpath("//h2[normalize-space(text()=\"" + + heading + + "\")]/..//*[text()[contains(.,\"" + + text + + "\")]]")); + } + + + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/Trials.java b/src/main/java/cucumber/pageObjects/Trials.java new file mode 100644 index 00000000..ca845b5f --- /dev/null +++ b/src/main/java/cucumber/pageObjects/Trials.java @@ -0,0 +1,155 @@ +package cucumber.pageObjects; + +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; + +public class Trials { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(Trials.class); + + private WaitUtils wait; + private WaitUtil_v2 wait1; + private NavigationShared NAV; + private Header HEADER_PAGE; + + public Trials(WebDriver driver) { + Trials.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + NAV = new NavigationShared(driver); + HEADER_PAGE = PageFactory.initElements(driver, Header.class); + } + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[1]/dd") + WebElement defendantName; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[2]/dd") + WebElement trialType; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[3]/dd") + WebElement trialStartDate; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[4]/dd") + WebElement judgeSelected; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[5]/dd") + WebElement courtRoom; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[6]/dd") + WebElement trialProtection; + + @FindBy(name = "selectedPools") + WebElement poolNumberCheckbox; + + @FindBy(id = "numberOfJurors") + WebElement enterNoOfJurorsForPanel; + + @FindBy(id = "checkInTimeHour") + WebElement confirmAttendanceCheckInHour; + + @FindBy(id = "checkInTimeMinute") + WebElement confirmAttendanceCheckInMinute; + + @FindBy(id = "checkInTime-am") + WebElement confirmAttendanceCheckInRadioButtonAm; + + @FindBy(id = "checkInTime-pm") + WebElement confirmAttendanceCheckInRadioButtonPm; + + @FindBy(id = "checkOutTimeHour") + WebElement confirmAttendanceCheckOutHour; + + @FindBy(id = "checkOutTimeMinute") + WebElement confirmAttendanceCheckOutMinute; + + @FindBy(id = "checkOutTime-am") + WebElement confirmAttendanceCheckOutRadioButtonAm; + + @FindBy(id = "checkOutTime-pm") + WebElement confirmAttendanceCheckOutRadioButtonPm; + + public Map getTrialDetails() { + Map details = new HashMap<>(); + + details.put("defendantName", defendantName.getText()); + details.put("trialType", trialType.getText()); + details.put("judgeSelected", judgeSelected.getText()); + details.put("courtRoom", courtRoom.getText()); + details.put("trialProtection", trialProtection.getText()); + + return details; + } + + public void checkPoolNumberCheckbox() { + log.info("Clicked pool number checkbox"); + poolNumberCheckbox.click(); + } + + public void jurorsForPanel(String noOfJurors) { + enterNoOfJurorsForPanel.clear(); + enterNoOfJurorsForPanel.sendKeys(noOfJurors); + } + + public void jurorCheckInMinute(String checkInTime) { + confirmAttendanceCheckInMinute.clear(); + confirmAttendanceCheckInMinute.sendKeys(checkInTime); + } + + public void jurorCheckInHour(String checkInTime) { + confirmAttendanceCheckInHour.clear(); + confirmAttendanceCheckInHour.sendKeys(checkInTime); + } + + public void jurorCheckInRadioButtonAm() { + confirmAttendanceCheckInRadioButtonAm.click(); + } + + public void jurorCheckInRadioButtonPm() { + confirmAttendanceCheckInRadioButtonPm.click(); + } + + public void jurorCheckOutMinute(String checkOutTime) { + confirmAttendanceCheckOutMinute.clear(); + confirmAttendanceCheckOutMinute.sendKeys(checkOutTime); + } + + public void jurorCheckOutHour(String checkOutTime) { + confirmAttendanceCheckOutHour.clear(); + confirmAttendanceCheckOutHour.sendKeys(checkOutTime); + } + + public void jurorCheckOutRadioButtonAm() { + confirmAttendanceCheckOutRadioButtonAm.click(); + } + + public void jurorCheckOutRadioButtonPm() { + confirmAttendanceCheckOutRadioButtonPm.click(); + } + + public void selectStatusForEmpanelledJuror(String formId, String jurorNumber, String status) { + String radioButtonXPath = "//form[@id='" + formId + "']//input[@name='" + jurorNumber + "' and @value='" + status + "']"; + try { + WebElement radioButton = driver.findElement(By.xpath(radioButtonXPath)); + radioButton.click(); + + log.info("Selected radio button with name '" + jurorNumber + "' and value '" + status + "'"); + } catch (NoSuchElementException e) { + log.error("Radio button with name '" + jurorNumber + "' and value '" + status + "' not found"); + } + } +} + diff --git a/src/main/java/cucumber/pageObjects/TrialsAndAttendance.java b/src/main/java/cucumber/pageObjects/TrialsAndAttendance.java new file mode 100644 index 00000000..82389846 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/TrialsAndAttendance.java @@ -0,0 +1,459 @@ +package cucumber.pageObjects; + +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; + +public class TrialsAndAttendance { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(TrialsAndAttendance.class); + + private WaitUtils wait; + private WaitUtil_v2 wait1; + private NavigationShared NAV; + private Header HEADER_PAGE; + + public TrialsAndAttendance(WebDriver driver) { + TrialsAndAttendance.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + NAV = new NavigationShared(driver); + HEADER_PAGE = PageFactory.initElements(driver, Header.class); + } + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[1]/dd") + WebElement defendantName; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[2]/dd") + WebElement trialType; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[3]/dd") + WebElement trialStartDate; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[4]/dd") + WebElement judgeSelected; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[5]/dd") + WebElement courtRoom; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[2]/div/dl/div[6]/dd") + WebElement trialProtection; + + @FindBy(name = "selectedPools") + WebElement poolNumberCheckbox; + + @FindBy(id = "numberOfJurors") + WebElement enterNoOfJurorsForPanel; + + @FindBy(id = "checkInTimeHour") + WebElement confirmAttendanceCheckInHour; + + @FindBy(id = "checkInTimeMinute") + WebElement confirmAttendanceCheckInMinute; + + @FindBy(id = "checkInTime-am") + WebElement confirmAttendanceCheckInRadioButtonAm; + + @FindBy(id = "checkInTime-pm") + WebElement confirmAttendanceCheckInRadioButtonPm; + + @FindBy(id = "checkOutTimeHour") + WebElement confirmAttendanceCheckOutHour; + + @FindBy(id = "checkOutTimeMinute") + WebElement confirmAttendanceCheckOutMinute; + + @FindBy(id = "checkOutTime-am") + WebElement confirmAttendanceCheckOutRadioButtonAm; + + @FindBy(id = "checkOutTime-pm") + WebElement confirmAttendanceCheckOutRadioButtonPm; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[4]/div/dl/div[2]/dd") + WebElement jurorAttendances; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div[4]/div/dl/div[3]/dd[1]") + WebElement jurorAbsences; + + @FindBy(xpath = "//th[@class=\"govuk-table__header\"]/button") + public List headerTableName; + + + @FindBy(xpath = "//div[@class=\"govuk-button-group mod-flex mod-justify-end\"]/a") + public List trialManagementButtonName; + + @FindBy(id = "returnPanelButton") + WebElement trialManagementBtnReturnPanelnumber; + + @FindBy(xpath = "//div[@class=\"govuk-grid-column-one-half trial-detail__header\"]/div/h1") + WebElement trialHeaderNumber; + @FindBy(xpath = "//div[@class=\"govuk-grid-column-one-half trial-detail__header\"]/div/strong") + WebElement trialStatus; + + @FindBy(xpath = "//div[@class=\"govuk-grid-column-one-half\"]/span[1]") + WebElement jurorsWaitingLabelText; + + @FindBy(xpath = "//div[@class=\"govuk-grid-column-full\"]/strong") + WebElement unConfiredSatusLabelText; + + @FindBy(xpath = "//div[@class=\"govuk-form-group\"]/fieldset/legend") + WebElement recordAttendenceLabelText; + @FindBy(xpath = "//div[@class=\"govuk-grid-column-full\"]/strong") + WebElement confirmedLabelText; + + @FindBy(xpath = "//span[@class=\"govuk-caption-l\"]") + WebElement changeTimeAttendenceTextLabel; + + @FindBy(xpath = "//h1[@class=\"govuk-heading-l\"]") + WebElement changeTimeAttendenceJurorNameTextLabel; + + @FindBy(xpath = "//div[@class=\"govuk-form-group\"]/fieldset/legend") + public List changeTimeEnterCheckInAndsCheckoutTimeTextLabel; + + @FindBy(xpath = "//div[@class=\"govuk-summary-list__row\"]/dt[1]") + public List trialManagemntLabeltext; + + @FindBy(xpath = "//div[@class=\"govuk-summary-list__row govuk-summary-list__row--no-actions\"]//dd[@class=\"govuk-summary-list__value\"]") + public List courtAttendanceTime; + + @FindBy(id = "attendanceDate") + WebElement nextDueAtCourt; + + @FindBy(xpath = "//*[@id=\"failed-to-attend\"]") + WebElement failedToAttendCheckbox; + + @FindBy(id = "checkInJurorNumber") + WebElement checkInJuror; + + @FindBy(id = "checkOutJurorNumber") + WebElement checkOutJuror; + + @FindBy(id = "selectedGroupsTable") + WebElement selectedGroupsTable; + @FindBy(id = "checkOutTime-am") + List checkboxCheckAM; + @FindBy(id = "checkOutTime-pm") + List checkboxCheckPM; + + @FindBy(id = "checkOutTimeHour") + WebElement selectchangeTimeCheckoutHour; + @FindBy(id = "checkOutTimeMinute") + WebElement selectchangeTimeCheckoutMinute; + + @FindBy(className = "govuk-pagination__next") + WebElement nextPaginationLink; + + public Map getTrialDetails() { + Map details = new HashMap<>(); + + details.put("defendantName", defendantName.getText()); + details.put("trialType", trialType.getText()); + details.put("judgeSelected", judgeSelected.getText()); + details.put("courtRoom", courtRoom.getText()); + details.put("trialProtection", trialProtection.getText()); + + return details; + } + + public void checkPoolNumberCheckbox() { + log.info("Clicked pool number checkbox"); + poolNumberCheckbox.click(); + } + + public void jurorsForPanel(String noOfJurors) { + enterNoOfJurorsForPanel.clear(); + enterNoOfJurorsForPanel.sendKeys(noOfJurors); + } + + public void jurorCheckInMinute(String checkInTime) { + confirmAttendanceCheckInMinute.clear(); + confirmAttendanceCheckInMinute.sendKeys(checkInTime); + } + + public void jurorCheckInHour(String checkInTime) { + confirmAttendanceCheckInHour.clear(); + confirmAttendanceCheckInHour.sendKeys(checkInTime); + } + + public void jurorCheckInRadioButtonAm() { + confirmAttendanceCheckInRadioButtonAm.click(); + } + + public void jurorCheckInRadioButtonPm() { + confirmAttendanceCheckInRadioButtonPm.click(); + } + + public void jurorCheckOutMinute(String checkOutTime) { + confirmAttendanceCheckOutMinute.clear(); + confirmAttendanceCheckOutMinute.sendKeys(checkOutTime); + } + + public void jurorCheckOutHour(String checkOutTime) { + confirmAttendanceCheckOutHour.clear(); + confirmAttendanceCheckOutHour.sendKeys(checkOutTime); + } + + public void jurorCheckOutRadioButtonAm() { + confirmAttendanceCheckOutRadioButtonAm.click(); + } + + public void jurorCheckOutRadioButtonPm() { + confirmAttendanceCheckOutRadioButtonPm.click(); + } + + public void selectStatusForEmpanelledJuror(String formId, String jurorNumber, String status) { + String radioButtonXPath = "//form[@id='" + formId + "']//input[@name='" + jurorNumber + "' and @value='" + status + "']"; + try { + WebElement radioButton = driver.findElement(By.xpath(radioButtonXPath)); + radioButton.click(); + + log.info("Selected radio button with name '" + jurorNumber + "' and value '" + status + "'"); + } catch (NoSuchElementException e) { + log.error("Radio button with name '" + jurorNumber + "' and value '" + status + "' not found"); + } + } + + public void tabPresent(final String tabName) { + log.info("Checking tab is present and correct"); + verifyHeaderTabAndLabels(tabName); + } + + public Map getAttendanceDetails() { + Map details = new HashMap<>(); + details.put("Attendances", jurorAttendances.getText()); + details.put("Absences", jurorAbsences.getText()); + return details; + } + + public void verifyHeaderTabAndLabels(final String tabName) { + log.info("Clicking tab"); + switch (tabName) { + case "Juror number": + Assert.assertTrue("Expected Text not found", headerTableName.get(0).getText().equals(tabName)); + log.info(" Text - " + headerTableName.get(0).getText() + " - is visible on the page "); + break; + case "First name": + Assert.assertTrue("Expected Text not found", headerTableName.get(1).getText().equals(tabName)); + log.info(" Text - " + headerTableName.get(1).getText() + " - is visible on the page "); + break; + case "Last name": + Assert.assertTrue("Expected Text not found", headerTableName.get(2).getText().equals(tabName)); + log.info(" Text - " + headerTableName.get(2).getText() + " - is visible on the page "); + break; + case "Status": + Assert.assertTrue("Expected Text not found", headerTableName.get(3).getText().equals(tabName)); + log.info(" Text - " + headerTableName.get(3).getText() + " - is visible on the page "); + break; + case "Checked in": + Assert.assertTrue("Expected Text not found", headerTableName.get(4).getText().equals(tabName)); + log.info(" Text - " + headerTableName.get(4).getText() + " - is visible on the page "); + break; + case "Checked out": + Assert.assertTrue("Expected Text not found", headerTableName.get(5).getText().equals(tabName)); + log.info(" Text - " + headerTableName.get(5).getText() + " - is visible on the page "); + break; + case "Defendants": + Assert.assertTrue("Expected Text not found", trialManagemntLabeltext.get(0).getText().equals(tabName)); + log.info(" Text - " + trialManagemntLabeltext.get(0).getText() + " - is visible on the page "); + break; + case "Trial type": + Assert.assertTrue("Expected Text not found", trialManagemntLabeltext.get(1).getText().equals(tabName)); + log.info(" Text - " + trialManagemntLabeltext.get(1).getText() + " - is visible on the page "); + break; + case "Trial start date": + Assert.assertTrue("Expected Text not found", trialManagemntLabeltext.get(2).getText().equals(tabName)); + log.info(" Text - " + trialManagemntLabeltext.get(2).getText() + " - is visible on the page "); + break; + case "Judge": + Assert.assertTrue("Expected Text not found", trialManagemntLabeltext.get(3).getText().equals(tabName)); + log.info(" Text - " + trialManagemntLabeltext.get(3).getText() + " - is visible on the page "); + break; + case "Courtroom": + Assert.assertTrue("Expected Text not found", trialManagemntLabeltext.get(4).getText().equals(tabName)); + log.info(" Text - " + trialManagemntLabeltext.get(4).getText() + " - is visible on the page "); + break; + case "Protected?": + Assert.assertTrue("Expected Text not found", trialManagemntLabeltext.get(5).getText().equals(tabName)); + log.info(" Text - " + trialManagemntLabeltext.get(5).getText() + " - is visible on the page "); + break; + case "Print panel list": + Assert.assertTrue("Expected Text not found", trialManagementButtonName.get(0).getText().equals(tabName)); + log.info(" Text - " + trialManagementButtonName.get(0).getText() + " - is visible on the page "); + break; + case "Print ballot cards": + Assert.assertTrue("Expected Text not found", trialManagementButtonName.get(1).getText().equals(tabName)); + log.info(" Text - " + trialManagementButtonName.get(1).getText() + " - is visible on the page "); + break; + case "Empanel jury": + Assert.assertTrue("Expected Text not found", trialManagementButtonName.get(2).getText().equals(tabName)); + log.info(" Text - " + trialManagementButtonName.get(2).getText() + " - is visible on the page "); + break; + case "End trial": + Assert.assertTrue("Expected Text not found", trialManagementButtonName.get(3).getText().equals(tabName)); + log.info(" Text - " + trialManagementButtonName.get(3).getText() + " - is visible on the page "); + break; + case "Return panel members": + Assert.assertTrue("Expected Text not found", trialManagementBtnReturnPanelnumber.getText().equals(tabName)); + log.info(" Text - " + trialManagementBtnReturnPanelnumber.getText() + " - is visible on the page "); + break; + case "Active": + Assert.assertTrue("Expected Text not found", trialStatus.getText().equals(tabName)); + log.info(" Text - " + trialStatus.getText() + " - is visible on the page "); + break; + case "Trial Number": + Assert.assertTrue("Expected Text not found", trialHeaderNumber.getText().equals(tabName)); + log.info(" Text - " + trialHeaderNumber.getText() + " - is visible on the page "); + break; + case "Jurors in waiting": + Assert.assertTrue("Expected Text not found", jurorsWaitingLabelText.getText().equals(tabName)); + log.info(" Text - " + jurorsWaitingLabelText.getText() + " - is visible on the page "); + break; + case "UNCONFIRMED": + Assert.assertTrue("Expected Text not found", unConfiredSatusLabelText.getText().equals(tabName)); + log.info(" Text - " + unConfiredSatusLabelText.getText() + " - is visible on the page "); + break; + case "Record attendance": + Assert.assertTrue("Expected Text not found", recordAttendenceLabelText.getText().equals(tabName)); + log.info(" Text - " + recordAttendenceLabelText.getText() + " - is visible on the page "); + break; + case "CONFIRMED": + Assert.assertTrue("Expected Text not found", confirmedLabelText.getText().equals(tabName)); + log.info(" Text - " + confirmedLabelText.getText() + " - is visible on the page "); + break; + case "Attendance": + Assert.assertTrue("Expected Text not found", changeTimeAttendenceTextLabel.getText().equals(tabName)); + log.info(" Text - " + changeTimeAttendenceTextLabel.getText() + " - is visible on the page "); + break; + + case "name": + Assert.assertTrue("Expected Text not found", changeTimeAttendenceJurorNameTextLabel.getText().equals(tabName)); + log.info(" Text - " + changeTimeAttendenceJurorNameTextLabel.getText() + " - is visible on the page "); + break; + + case "Enter check in time": + Assert.assertTrue("Expected Text not found", changeTimeEnterCheckInAndsCheckoutTimeTextLabel.get(0).getText().equals(tabName)); + log.info(" Text - " + changeTimeEnterCheckInAndsCheckoutTimeTextLabel.get(0).getText() + " - is visible on the page "); + break; + case "Enter check out time": + Assert.assertTrue("Expected Text not found", changeTimeEnterCheckInAndsCheckoutTimeTextLabel.get(1).getText().equals(tabName)); + log.info(" Text - " + changeTimeEnterCheckInAndsCheckoutTimeTextLabel.get(1).getText() + " - is visible on the page "); + break; + + default: + log.info("Expected element text is not present on the page"); + break; + } + + } + + public String getNewAttendanceTime() { + log.info("Getting attendance time"); + return courtAttendanceTime.get(2).getText(); + } + + public void enterNextDueAtCourt(String date) { + nextDueAtCourt.clear(); + nextDueAtCourt.sendKeys(date); + } + + public void checkFailedToAttendBox() { + failedToAttendCheckbox.click(); + } + + public void failedToAttendRadioButtonNotOnScreen() { + List elements = driver.findElements(By.xpath("//*[contains(text(),'Change juror status to')]")); + + if (!elements.isEmpty()) { + throw new IllegalStateException("Failed to attend radio button found on screen"); + } + } + + public void jurorCheckIn(String checkIn) { + checkInJuror.clear(); + checkInJuror.sendKeys(checkIn); + } + + public void jurorCheckOut(String checkIn) { + checkOutJuror.clear(); + checkOutJuror.sendKeys(checkIn); + } + + public void setRecordAttendnceChangeTimeTextbox(String selection, String data) { + + switch (selection) { + case "Hour": + log.info("clicking the check out hour "); + selectchangeTimeCheckoutHour.clear(); + selectchangeTimeCheckoutHour.sendKeys(data); + break; + + case "Minute": + log.info("clicking the check out minute"); + selectchangeTimeCheckoutMinute.clear(); + selectchangeTimeCheckoutMinute.sendKeys(data); + break; + + default: + log.info("Expected textbox is not available "); + } + + } + + public void click_CheckoutRadioButton(String selection) throws Exception { + log.info("Clicked on radio button which contained text =>" + selection); + + switch (selection) { + case "am": + driver.findElements(By.id("checkOutTime-am")).get(0).click(); + log.info("checked the checkbox named label AM"); + break; + + case "pm": + driver.findElements(By.id("checkOutTime-pm")).get(0).click(); + ; + log.info("checked the checkbox named label PM"); + break; + + default: + log.info("Expected checkbox is not clicked"); + } + } + + + public void clickNextPagination() { + nextPaginationLink.click(); + } + + public void clickActiveTrialNumber(String trial_no) { + log.info("Finding and clicking active trial number"); + boolean lastPage = false; + while (!lastPage) { + List activeTrialLink = driver.findElements(By.xpath("//*[contains(text(),'" + trial_no + "')]")); + if (activeTrialLink.size() >= 1) { + activeTrialLink.get(0).click(); + break; + } else { + if (driver.findElements(By.className("govuk-pagination__next")).size() < 1) { + lastPage = true; + } else { + log.info("Clicking next pagination"); + clickNextPagination(); + } + } + } + } +} + diff --git a/src/main/java/cucumber/pageObjects/ViewSummonsReply.java b/src/main/java/cucumber/pageObjects/ViewSummonsReply.java new file mode 100644 index 00000000..3f24de48 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/ViewSummonsReply.java @@ -0,0 +1,317 @@ +package cucumber.pageObjects; + +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindAll; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.FindBys; +import org.openqa.selenium.support.PageFactory; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ViewSummonsReply { + + private static WebDriver driver; + private static final Logger log = Logger.getLogger(SummonsReply.class); + private final WaitUtils wait; + private final WaitUtil_v2 wait1; + private final NavigationShared NAV; + + private final Header HEADER_PAGE; + + public ViewSummonsReply(WebDriver driver) { + ViewSummonsReply.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + NAV = new NavigationShared(driver); + HEADER_PAGE = PageFactory.initElements(driver, Header.class); + } + + @FindBy(id = "juror-details-section-menu-item") + WebElement jurorDetailsTab; + + @FindBy(id = "jurorName") + WebElement jurorDetailsName; + + @FindBy(className = "govuk-heading-l") + WebElement jurorNameHeader; + + @FindBy(id = "jurorAddress") + WebElement jurorDetailsAddress; + + @FindBy(id = "jurorDateOfBirth") + WebElement jurorDetailsDob; + + @FindBy(id = "jurorPrimaryPhone") + WebElement jurorDetailsMainPhone; + + @FindBy(id = "jurorSecondaryPhone") + WebElement jurorDetailsAltPhone; + + @FindBy(id = "jurorEmailAddress") + WebElement jurorDetailsEmail; + + @FindBy(id = "eligibility-section-menu-item") + WebElement eligibilityTab; + + @FindBy(id = "residency") + WebElement eligibilityResidency; + + @FindBy(id = "mentalHealth") + WebElement eligibilityMha; + + @FindBy(id = "mentalHealthCapacity") + WebElement eligibilityMca; + + @FindBy(id = "bail") + WebElement eligibilityBail; + + @FindBy(id = "convictions") + WebElement eligibilityConvictions; + + @FindBy(id = "deferral-excusal-section-menu-item") + WebElement deferralTab; + + @FindBy(id = "deferralOrExcusal") + WebElement deferralStatus; + + @FindBy(id = "cjs-employment-section-menu-item") + WebElement cjsTab; + + @FindBy(id = "cjsEmploymentDetails") + WebElement cjsStatus; + + @FindBy(id = "adjustments-section-menu-item") + WebElement adjustmentsTab; + + @FindBy(id = "disability") + WebElement adjustmentsStatus; + + @FindBy(id = "reasonableAdjustment") + WebElement opticReferenceNo; + + @FindBy(id="opticReference") + WebElement opticReferenceInput; + + @FindBy(id = "signature-section-menu-item") + WebElement signatureTab; + + @FindBy(css = "#view-signature dd") + WebElement signatureStatus; + + @FindBy(id = "processAwaitingInformation") + WebElement markAwaitingInformation; + + @FindBy(id = "moj-actions-button-menu") + WebElement moreActionsButton; + + @FindBy(xpath = "//div[@class='info']/strong") + WebElement replyStatus; + + @FindBy(xpath = "//div[text()[contains(.,'Reply type')]]//ancestor::div/div[@class='info']/strong") + WebElement replyTypeValue; + + @FindBy(xpath = "//div[text()[contains(.,'Reply status')]]//ancestor::div/div[@class='info']/strong") + WebElement replyStatusValue; + + @FindBy(id = "awaitingInformation") + WebElement awaitingJuror; + + @FindBy(id = "awaitingInformation-2") + WebElement awaitingCourt; + + @FindBy(id = "awaitingInformation-3") + WebElement awaitingTransfer; + + @FindBy(xpath = "//div/strong[@class='govuk-tag govuk-tag--purple']") + WebElement summonsReplyTag; + + @FindBy(xpath = "//div[text()[contains(.,'Reply method')]]") + WebElement replyMethodLabel; + + @FindBy(xpath = "//div[text()[contains(.,'Reply method')]]//ancestor::div/div[@class='info']") + WebElement replyMethodValue; + + @FindBy(xpath = "//div[text()[contains(.,'Service start date')]]") + WebElement serviceStartDateLabel; + + @FindBy(xpath = "//div[3]/div[1]/div[3]/div[2]") + WebElement assignedToStaff; + + @FindBy(xpath = "//*[@id=\"ineligibleAgeConfirm\"]/h2") + WebElement ineligibilityAgeConfirmHeader; + + @FindBy(id = "disqualifyButton") + WebElement disqualifyButton; + + @FindBy(xpath = "//*[@id=\"ineligibleAgeConfirm\"]/div/a") + WebElement changeDateLink; + + @FindBy(xpath = "//div[text() = 'Juror status']/../div[2]") + WebElement jurorStatus; + + @FindBy(id = "oldJurorName") + WebElement previousName; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/div[2]") + WebElement accomodateJurorName; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/div[4]") + WebElement accomodateJurorNumber; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/div[6]") + WebElement accomodateJurorMainPhone; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/div[8]") + WebElement accomodateJurorEmail; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/ul/li") + WebElement accomodateJurorAdjustmentReason; + + @FindBy(xpath = "//*[@id=\"main-content\"]/div/div/div[10]") + WebElement accomodateJurorAdjustmentNeeded; + + + public String getPreviousName() { + return previousName.getText(); + } + + public void clickJurorDetailsTab() { + jurorDetailsTab.click(); + } + + public void clickEligibilityTab() { + eligibilityTab.click(); + } + + public void clickDeferralTab() { + deferralTab.click(); + } + + public void clickCjsTab() { + cjsTab.click(); + } + + public void clickAdjustmentsTab() { + adjustmentsTab.click(); + } + + public void clickSignatureTab() { + signatureTab.click(); + } + + public Map getJurorDetails() { + Map details = new HashMap<>(); + + details.put("jurorName", jurorDetailsName.getText()); + details.put("jurorAddress", jurorDetailsAddress.getText()); + details.put("jurorDob", jurorDetailsDob.getText()); + details.put("jurorMainPhone", jurorDetailsMainPhone.getText()); + details.put("jurorAltPhone", jurorDetailsAltPhone.getText()); + details.put("jurorEmail", jurorDetailsEmail.getText()); + + return details; + } + + public Map getJurorEligibility() { + Map eligibility = new HashMap<>(); + + eligibility.put("jurorResidency", eligibilityResidency.getText()); + eligibility.put("jurorMha", eligibilityMha.getText()); + eligibility.put("jurorMca", eligibilityMca.getText()); + eligibility.put("jurorBail", eligibilityBail.getText()); + eligibility.put("jurorConvictions", eligibilityConvictions.getText()); + + return eligibility; + } + + public String getDeferral() { + return deferralStatus.getText(); + } + + public String getCjsStatus() { + return cjsStatus.getText(); + } + + public String getAdjustmentStatus() { + return adjustmentsStatus.getText(); + } + + public String getOpticeReferenceNo() { return opticReferenceNo.getText(); } + + public void enterOpticReferenceNumber(String reference){ + opticReferenceInput.sendKeys(reference); + } + + public String getSignatureStatus() { + return signatureStatus.getText(); + } + + public boolean jurorNameHeaderIsPresent(){return jurorNameHeader.isDisplayed();}; + + public void clickAwaitingInformation(){markAwaitingInformation.click();} + + public void clickMoreActions(){moreActionsButton.click();} + + public String getReplyStatus(){return replyStatus.getText();} + + public void clickAwaitingCourt(){awaitingCourt.click();} + + public void clickAwaitingJuror(){awaitingJuror.click();} + + public void clickAwaitingTransfer(){awaitingTransfer.click();} + + public boolean seeSummonsReplyTag() { return summonsReplyTag.isDisplayed(); } + + public String getStatusValue(){return replyStatusValue.getText();} + + public String getTypeValue(){return replyTypeValue.getText();} + + public boolean seeReplyMethodLabel(){ + return replyMethodLabel.isDisplayed(); + } + + public String seeReplyMethodValue(){ + return replyMethodValue.getText(); + } + + public boolean seeServiceStartDateLabel(){ + return serviceStartDateLabel.isDisplayed(); + } + + public String getAssignedToStaff(){ + return assignedToStaff.getText(); + } + + public String ineligibilityAgeConfirmHeaderText() { return ineligibilityAgeConfirmHeader.getText();} + + public void clickDisqualifyButton() { disqualifyButton.click();} + + public void clickChangeDateLink() { changeDateLink.click();} + + public String getJurorStatus() { return jurorStatus.getText();} + + public Map getCheckAccommodateJurorDetails() { + Map details = new HashMap<>(); + + details.put("jurorName", accomodateJurorName.getText()); + details.put("jurorNumber", accomodateJurorNumber.getText()); + details.put("jurorMainPhone", accomodateJurorMainPhone.getText()); + details.put("jurorEmail", accomodateJurorEmail.getText()); + details.put("jurorAdjustmentReason", accomodateJurorAdjustmentReason.getText()); + details.put("jurorAdjustment", accomodateJurorAdjustmentNeeded.getText()); + + return details; + } + + + +} diff --git a/src/main/java/cucumber/pageObjects/aSamplePO.java b/src/main/java/cucumber/pageObjects/aSamplePO.java new file mode 100644 index 00000000..9e2102a1 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/aSamplePO.java @@ -0,0 +1,60 @@ +package cucumber.pageObjects; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.apache.log4j.Logger; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +import cucumber.utils.AngularJsHTTPCallWait; +import cucumber.utils.WaitUtil_v2; +import cucumber.utils.WaitUtils; + +public class aSamplePO { + private static WebDriver driver; + private static Logger log = Logger.getLogger(aSamplePO.class); + private WaitUtils wait; + private WaitUtil_v2 wait1; + private AngularJsHTTPCallWait aJsWait; + + + public aSamplePO(WebDriver driver) { + aSamplePO.driver = driver; + PageFactory.initElements(driver, this); + wait = new WaitUtils(driver); + wait1 = new WaitUtil_v2(driver); + aJsWait = new AngularJsHTTPCallWait(driver); + + } + + @FindBy(xpath = ".//*[contains(@id, 'blobOffenceId')]") + List sampleListWebElement; + + @FindBy(xpath = "//div[@id='result_87']/a/abbr") + WebElement sampleWebElement; + + + public aSamplePO sample() throws Throwable { + + // Do something + log.info("Ensure something is logged!"); + + return PageFactory.initElements(driver, aSamplePO.class); + } + + +} \ No newline at end of file diff --git a/src/main/java/cucumber/pageObjects/aSamplePOWithDB.java b/src/main/java/cucumber/pageObjects/aSamplePOWithDB.java new file mode 100644 index 00000000..31bf91c3 --- /dev/null +++ b/src/main/java/cucumber/pageObjects/aSamplePOWithDB.java @@ -0,0 +1,38 @@ +package cucumber.pageObjects; + +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; + +import org.apache.log4j.Logger; + +import cucumber.testdata.DBConnection; + +public class aSamplePOWithDB { + + private static Logger log = Logger.getLogger(aSamplePOWithDB.class); + + private DBConnection db; + private Connection conn; + private CallableStatement cStmt = null; + + + public void runSQL() throws SQLException { + db = new DBConnection(); + conn = db.getConnection(); + + try { + cStmt = conn.prepareCall("call footgunnoref()"); // SQL Statement here + cStmt.execute(); + log.info("Transactional Data is cleared on Weblogic Test"); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message: " + e.getMessage()); + } + finally { + cStmt.close(); + conn.close(); + } + } + +} diff --git a/src/main/java/cucumber/testdata/DBConnection.java b/src/main/java/cucumber/testdata/DBConnection.java new file mode 100644 index 00000000..4d9fb9b3 --- /dev/null +++ b/src/main/java/cucumber/testdata/DBConnection.java @@ -0,0 +1,75 @@ +package cucumber.testdata; + +import cucumber.utils.ReadProperties; +import org.apache.log4j.Logger; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.Properties; + +public class DBConnection { + + private static Logger log = Logger.getLogger(DBConnection.class); + + public Connection getConnection() throws SQLException { + + return getConnection("Default"); + } + + public Connection getConnection(String environment) throws SQLException { + Connection conn = null; + Properties props = new Properties(); + String oracle_jdbc; + environment = ReadProperties.systemPropertyEnvironmentOverrideCheck(environment); + log.info("Attempting to make connection to =>"+environment); + + + if (environment.equalsIgnoreCase("Default")) { + props.put("user", ReadProperties.main("oracle_username")); + props.put("password", ReadProperties.main("oracle_password")); + oracle_jdbc = ReadProperties.main("oracle_jdbc"); + + } else { + props.put("user", ReadProperties.main("database_" + environment + "_username")); + props.put("password", ReadProperties.main("database_" + environment + "_password")); + oracle_jdbc = ReadProperties.main("database_"+environment); + } + + + try { + conn = DriverManager.getConnection( + oracle_jdbc, + props + ); + log.info("Successfully made database connection to =>"+environment); + } catch (SQLException e) { + e.printStackTrace(); + log.info("Unable to make connection to database"); + } + conn.setAutoCommit(false); + return conn; + } + + + // TODO - This method and everything that calls it is unused in the Juror project, it doesn't break anything but will need stripping out at some point. + + public Connection getPostGresConnection(String database) { + Connection conn = null; + Properties props = new Properties(); + log.info("Making postgres connection"); + + props.put("user", ReadProperties.main("postgres_username")); + props.put("password", ReadProperties.main("postgres_password")); + try { + conn = DriverManager.getConnection( + ReadProperties.main("postgres_jdbc")+database, + props + ); + log.info("Successfully made to postgres database"); + } catch (SQLException e) { + e.printStackTrace(); + } + return conn; + } +} diff --git a/src/main/java/cucumber/testdata/DataSetup.java b/src/main/java/cucumber/testdata/DataSetup.java new file mode 100644 index 00000000..694d1ae9 --- /dev/null +++ b/src/main/java/cucumber/testdata/DataSetup.java @@ -0,0 +1,273 @@ +package cucumber.testdata; + +import cucumber.pageObjects.aSamplePOWithDB; +import cucumber.utils.RequestHandler; +import org.apache.log4j.Logger; + +import java.sql.CallableStatement; +import java.sql.Connection; + +import static org.junit.Assert.assertEquals; + +public class DataSetup { + + private static Logger log = Logger.getLogger(aSamplePOWithDB.class); + + private DBConnection db; + private Connection conn; + private CallableStatement stmt = null; + + /** + * Refactor me - Add Environmental Logic + * @param username + */ + public void setUser_firstTimeLogin(String username) { + + // Add Environment selector here + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/create/basic"; + + try { + RequestHandler.request_post(url); + resetUser(username); + } catch (Exception e) { + log.warn("Unexpected Exception after creating user and resetting it"); + } + } + + public void setAdmin_firstTimeLogin(String username) { + + // Add Environment selector here + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/create/admin/basic"; + + try { + RequestHandler.request_post(url); + resetUser(username); + } catch (Exception e) { + log.warn("Unexpected Exception after creating user and resetting it"); + } + } + + public void resetUser(String username) { + // Add Environment selector here + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/reset/all"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception after creating user and resetting it"); + } + } + + public void setUser_attribute(String username, String attribute, String attributeValue) { + //http://10.200.11.4:8000/10.200.11.11/user/fred@gmail.com/attribute/telephoneNumber/replace/12333 + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/attribute/" + + attribute + + "/replace/" + + attributeValue; + + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception after Setting User Attribute"); + } + + } + + public void setUser_password(String username, String password) { + //http://10.200.11.4:8000/10.200.11.11/user/fred@gmail.com/reset/password/password + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/reset/" + + "password/" + + password; + + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception after Setting User Password"); + } + + } + + public void setUser_compliant(String username) { + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/create/" + + "compliant"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception after trying to create a compliant user"); + } + } + + public void setAdmin_compliant(String username) { + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/create/admin/" + + "compliant"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception after trying to create a compliant admin user"); + } + } + + + public void setUser_contentSubscription(String username, String group, String content, String area, String subscription) { + ////user//subscription/group//content//area//subscriptionType// + subscription = subscription.replaceAll(" ", "%20"); + group = group.replaceAll(" ", "%20"); + content = content.replaceAll(" ", "%20"); + area = area.replaceAll(" ", "%20"); + + + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/subscription/group/" + + group + + "/content/" + + content + + "/area/" + + area + + "/subscriptionType/" + + subscription + + "/"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception after trying to setup contentSubscriptions for user"); + } + + } + + public void setupDocumentData(String documentType, String ljaCode, String groupDescription, String courtroom, + String sessionDate) { + // http://10.200.11.4:8000/10.200.11.11/alfresco/lja/2163/sessionDate/17012018/ou/B01LA/courtroom/00/document/CL + + groupDescription = groupDescription.replaceAll(" ", "%20"); + documentType = documentType.replaceAll(" ", "%20"); + + String url = "http://10.200.11.4:8000/10.200.11.13/alfresco/lja/" + + ljaCode + + "/sessionDate/" + + sessionDate + + "/ou/" + + groupDescription + + "/courtroom/" + + courtroom + + "/document/" + + documentType + + ""; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception after trying to add documents to alfresco"); + } + + } + + public void checkUser_attributeAgainst_trueFalse(String username, String attribute, String attributeValue, Boolean expected) throws Exception { + // http://10.200.11.4:8000/10.200.11.11/user/jorge/attribute/lastLoginDate + Boolean actual = false; + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/attribute/" + + attribute + + "/compare/" + + attributeValue; + + try { + RequestHandler.return_request_post(url, 200); + actual = true; + } catch (Exception e) { + log.warn("Did not get 200, returning false and continuing"); + } + log.info("Checking against Attribute value =>"+attributeValue); + assertEquals(actual, expected); + log.info("Attribute value is =>"+attributeValue+"<= as expected"); + + } + + public void deleteUser_byName(String username) { + + String url = "http://10.200.11.4:8000/10.200.11.11/user/" + + username + + "/delete"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception when trying to delete"); + } + } + + public void deleteOrganisation_byName(String organisation) { + String url = "http://10.200.11.4:8000/10.200.11.11/organisation/" + + organisation + + "/delete"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception when trying to delete"); + } + } + + public void createOrganisation_byName(String organisation) { + String url = "http://10.200.11.4:8000/10.200.11.11/organisation/" + + organisation + + "/create/basic"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception when trying to create organisation"); + } + } + + public void createEntry_forOrganisation_byName(String organisation, String entry) { + ////organisation//entry//create/basic + String url = "http://10.200.11.4:8000/10.200.11.11/organisation/" + + organisation + + "/entry/" + + entry + + "/create/basic"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception when trying to create organisation"); + } + } + + public void createEntry_forOrganisationGroup_byName(String organisation, String ou, String cn) { + String url = "http://10.200.11.4:8000/10.200.11.11/common_name/" + + cn + + "/group/" + + ou + + "/organisation/" + + organisation + + "/create/basic"; + try { + RequestHandler.request_post(url); + } catch (Exception e) { + log.warn("Unexpected Exception when trying to create organisation"); + } + } + + public String returnPassword_byUsername_fromNotify(String username) { + String url = "http://10.200.11.4:8000/10.200.11.11/notify/" + + username + + "/password"; + try { + return RequestHandler.return_request_post(url); + } catch (Exception e) { + return "password"; + } + } + +} diff --git a/src/main/java/cucumber/testdata/DatabaseTester.java b/src/main/java/cucumber/testdata/DatabaseTester.java new file mode 100644 index 00000000..ea2dc623 --- /dev/null +++ b/src/main/java/cucumber/testdata/DatabaseTester.java @@ -0,0 +1,3928 @@ +package cucumber.testdata; + + +import cucumber.utils.DateManipulator; +import cucumber.utils.ReadProperties; +import org.apache.log4j.Logger; +import org.junit.Assert; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAdjusters; +import java.util.Calendar; +import java.util.Date; + +public class DatabaseTester { + + private static Logger log = Logger.getLogger(DatabaseTester.class); + + private DBConnection db; + private Connection conn; + private PreparedStatement pStmt = null; + private String holidayDate; + private String holidayOwner; + private Date calendar; + private int newCoronerPoolNumber; + + public static String oracleWeeksInFuture(int noWeeks) { + String datePattern = "dd-MMM-yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, noWeeks); + + return new SimpleDateFormat(datePattern).format(date.getTime()); + } + + public static String oracleMondayWeeksInFuture(int noWeeks) { + String datePattern = "dd-MMM-yyyy"; + LocalDate nextMonday = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + nextMonday = nextMonday.plusWeeks(noWeeks); + DateTimeFormatter dateToFormat = DateTimeFormatter.ofPattern(datePattern); + + return nextMonday.format(dateToFormat); + } + + public boolean check_UUIDExists_inMGW(String GW_UUID) throws SQLException { + + db = new DBConnection(); + conn = db.getPostGresConnection("cp_mirror_gateway_db"); + + try { + + pStmt = conn.prepareStatement("select message_uuid as mu from cp_mirror_gateway_db.public.message_audit where message_uuid=?"); // SQL Statement here + pStmt.setString(1, GW_UUID); + + ResultSet rs = pStmt.executeQuery(); + + while (rs.next()) { + log.info("Saw UUID of =>" + rs.getString("mu") + "<= as expected"); + return true; + } + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + return false; + } + + public void column_existsIn(String frontBackEnd, String database, String table, String colName) throws SQLException { + // SQL injectable due to parameters + if (frontBackEnd.equalsIgnoreCase("front")) { + db = new DBConnection(); + conn = db.getPostGresConnection(database); + pStmt = conn.prepareStatement("select column_name from information_schema.columns where table_name=? and column_name=?"); + pStmt.setString(1, table); + pStmt.setString(2, colName); + } else if (frontBackEnd.equalsIgnoreCase("back")) { + throw new Error("Implementation for the backend has not been implemented"); + } else { + throw new Error("Don't know which front/backend database we are looking for"); + } + + ResultSet rs = pStmt.executeQuery(); + int rows = 0; + while (rs.next()) { + rows++; + } + + Assert.assertEquals("Saw =>" + rows + "<= when expected 1", 1, rows); + log.info("Saw that column =>" + colName + "<= existed in table =>" + table + "<= for database =>" + database); + } + + public void rowsExistIn_Where(int rowCountExpected, + String environment, String database, String table, + String colA, String colAParameter, + String colB, String colBParameter, + String colC, String colCParameter) throws SQLException { + try { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection(environment); + + if (colAParameter == "NULL") { + pStmt = conn.prepareStatement( + "select 1 from " + database + "." + table + " " + + "where " + + colA + " is NULL and " + + colB + "=? and " + + colC + "=?"); + log.info("select 1 from " + database + "." + table + " " + + "where " + + colA + " is NULL and " + + colB + "=? and " + + colC + "=?"); + pStmt.setString(1, colBParameter); + pStmt.setString(2, colCParameter); + } else { + pStmt = conn.prepareStatement( + "select 1 from " + database + "." + table + " " + + "where " + + colA + "=? and " + + colB + "=? and " + + colC + "=?"); + + pStmt.setString(1, colAParameter); + pStmt.setString(2, colBParameter); + pStmt.setString(3, colCParameter); + } + + ResultSet rs = pStmt.executeQuery(); + int rowCountActual = 0; + while (rs.next()) { + rowCountActual++; + } + Assert.assertEquals("Saw =>" + rowCountActual + "<= when expected =>" + rowCountExpected, rowCountExpected, rowCountActual); + log.info("Saw =>" + rowCountActual + "<= row(s) as expected when checking table =>" + table + "<= with values =>" + colAParameter + "<=, =>" + colBParameter + "<=, =>" + colCParameter); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message: " + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void rowsExistIn_Where(Integer arg1, String arg2, String arg3, String arg4, String arg5, String arg6, + String arg7, String arg8, String arg9, Integer arg10) { + // TODO Auto-generated method stub + + } + + /** + * select * from SYS.all_tables where owner='CP_SOAP_GATEWAY_OWNER' + * + * @param tableName + * @param schemaName + * @param frontBackEnd + * @throws SQLException + */ + public void tableExistsIn(String tableName, String schemaName, String frontBackEnd) throws SQLException { + db = new DBConnection(); + if (frontBackEnd.equalsIgnoreCase("back")) { + conn = db.getConnection(); + } + try { + pStmt = conn.prepareStatement( + "select 1 from SYS.all_Tables " + + "where " + + "table_name = ? and " + + "owner = ?" + ); + + pStmt.setString(1, tableName.toUpperCase()); + pStmt.setString(2, schemaName.toUpperCase()); + ResultSet rs = pStmt.executeQuery(); + int rowCountActual = 0; + while (rs.next()) { + rowCountActual++; + } + Assert.assertEquals("Saw =>" + rowCountActual + "<= when expected =>1", 1, rowCountActual); + log.info(String.format("Saw that %s exists in schema %s", tableName, schemaName)); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + /** + * Assuming oracle + * select * from SYS.ALL_TAB_COLS where owner='CP_SOAP_GATEWAY_OWNER' and table_name='MESSAGE_AUDIT' and VERSION_NUMBER='20' + * + * @param schemaName + * @param tableName + * @param columnName + * @param columnLookup + * @param columnLookupValue + * @throws SQLException + */ + public void schemaTable_hasColumnWithThat(String schemaName, String tableName, String columnName, + String columnLookup, String columnLookupValue) throws SQLException { + db = new DBConnection(); + conn = db.getConnection(); + + log.info("Going to lookup column =>" + columnLookup); + try { + /* + pStmt = conn.prepareStatement( + "select 1 from SYS.ALL_TAB_COLS " + + "where " + + "table_name = ? and " + + "owner = ? and " + + "column_name = ? and " + + columnLookup.replaceAll("/[^\\w-]/", "") +" = ?" + ); + */ + + pStmt = conn.prepareStatement( + "SELECT * FROM ( " + + "SELECT to_char( " + columnLookup + + ") as lookup " + + "FROM SYS.ALL_TAB_COLS " + + "WHERE " + + "owner = ? AND " + + "table_name = ? AND " + + "column_name = ?" + + ") " + + "WHERE lookup = ?" + ); + log.info("SELECT * FROM ( " + + "SELECT to_char( " + columnLookup + + ") as lookup " + + "FROM SYS.ALL_TAB_COLS " + + "WHERE " + + "owner = ? AND " + + "table_name = ? AND " + + "column_name = ?" + + ") " + + "WHERE lookup = ?"); + + pStmt.setString(1, schemaName.toUpperCase()); + pStmt.setString(2, tableName.toUpperCase()); + pStmt.setString(3, columnName.toUpperCase()); + //if (columnLookupValue.chars().allMatch(Character::isDigit)) { + // pStmt.setInt(4, Integer.parseInt(columnLookupValue)); + //} else { + pStmt.setString(4, columnLookupValue.toUpperCase()); + // } + ResultSet rs = pStmt.executeQuery(); + int rowCountActual = 0; + while (rs.next()) { + rowCountActual++; + } + Assert.assertEquals("Saw =>" + rowCountActual + "<= when expected =>1", 1, rowCountActual); + log.info(String.format("Saw %s.%s has column %s which has attribute %s with value %s", + schemaName, tableName, columnName, columnLookup, columnLookupValue)); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message=>" + e.getMessage()); + throw new AssertionError("Did not get expected value"); + } finally { + pStmt.close(); + conn.close(); + } + } + + /** + * Assuming oracle + * SELECT cols.column_name FROM all_constraints cons NATURAL JOIN all_cons_columns cols WHERE cons.constraint_type = 'P' AND table_name = UPPER('MESSAGE_AUDIT'); + * + * @param schemaName + * @param tableName + * @param constraintType + * @param columnName + * @throws SQLException + */ + public void schemaTable_hasConstraint(String schemaName, String tableName, String constraintType, + String columnName) throws SQLException { + + db = new DBConnection(); + conn = db.getConnection(); + try { + pStmt = conn.prepareStatement( + "select 1 from all_constraints cons " + + "NATURAL JOIN " + + "all_cons_columns cols " + + "WHERE " + + "CONS.CONSTRAINT_TYPE = ? AND " + + "OWNER = ? AND " + + "TABLE_NAME = ? AND " + + "COLUMN_NAME = ?" + ); + + pStmt.setString(1, constraintType.toUpperCase()); + pStmt.setString(2, schemaName.toUpperCase()); + pStmt.setString(3, tableName.toUpperCase()); + pStmt.setString(4, columnName.toUpperCase()); + ResultSet rs = pStmt.executeQuery(); + int rowCountActual = 0; + while (rs.next()) { + rowCountActual++; + } + Assert.assertEquals("Saw =>" + rowCountActual + "<= when expected =>1", 1, rowCountActual); + log.info(String.format("Saw that %s exists in schema %s", tableName, schemaName)); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void updateJurorPool_toSetColumn_asValue(String part_no, String columnName, String columnValue) throws SQLException { + if (columnValue.contains(" time")) { + columnValue = DateManipulator.processString(columnValue); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + log.info("Going to update the database by setting =>" + columnName + "<= to =>" + columnValue + "<= for =>" + part_no); + try { + pStmt = conn.prepareStatement("update JUROR.POOL set " + columnName + "='" + columnValue + "' where part_no='" + part_no + "'"); + if (columnValue.contains("-") && columnValue.contains(":")) { + pStmt = conn.prepareStatement("update JUROR.POOL set " + columnName + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where part_no='" + part_no + "'"); + pStmt.setString(1, columnValue); + } + + pStmt.execute(); + conn.commit(); + log.info("Update Successful "); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void updateJurorUniquePool_toSetAttendanceDate(String pool_no, String columnValue) throws SQLException { + if (columnValue.contains(" time")) { + columnValue = DateManipulator.processString(columnValue); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + log.info("Going to update the database by setting attendance date on unique pool to =>" + columnValue + "<= for =>" + pool_no); + try { + pStmt = conn.prepareStatement("update JUROR.UNIQUE_POOL set RETURN_DATE =? , NEXT_DATE =? where part_no=?"); + if (columnValue.contains("-") && columnValue.contains(":")) { + pStmt = conn.prepareStatement("update JUROR.UNIQUE_POOL set RETURN_DATE =TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'), NEXT_DATE =TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where pool_no=?"); + } + pStmt.setString(1, columnValue); + pStmt.setString(2, columnValue); + pStmt.setString(3, pool_no); + + pStmt.executeUpdate(); + conn.commit(); + log.info("Update Successful "); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + //Danielle update Juror data for dashboard + public void updateJuror_table_toSetColumn_asValue(String part_no, String table, String columnName, String columnValue, String columnNameA, String columnValueA) throws SQLException { + if (columnValue.contains(" time")) { + columnValue = DateManipulator.processString(columnValue); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + +// log.info("Going to update the database by setting =>"+table+"<= . =>"+columnName+"<= to =>"+columnValue+"<= where =>"+columnName1+"<= is =>"+columnValue1+"<= for =>"+part_no); + try { + pStmt = conn.prepareStatement("update JUROR." + table + " set " + columnName + "='" + columnValue + "' where part_no='" + part_no + "' and " + columnNameA + "=?"); + pStmt.setString(1, columnValueA); + + if (table.contains("UNIQUE_POOL")) { + pStmt = conn.prepareStatement("update JUROR." + table + " set " + columnName + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where pool_no ='" + columnValueA + "'"); + pStmt.setString(1, columnValue); + + } else if (columnValue.contains("-") && columnValue.contains(":")) { + pStmt = conn.prepareStatement("update JUROR." + table + " set " + columnName + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where part_no='" + part_no + "' and " + columnNameA + "=?"); + pStmt.setString(1, columnValue); + pStmt.setString(2, columnValueA); + } + + pStmt.executeQuery(); + log.info("Update Successful "); +// +// } catch (SQLException e) { +// e.printStackTrace(); +// log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //Danielle update Juror Digital data for dashboard + public void updateJurorDigital(String column, String part_no, String value) throws SQLException { + if (value.contains(" time")) { + value = DateManipulator.processString(value); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("update juror_digital.juror_response set " + column + " = '" + value + "' where juror_number='" + part_no + "'"); + pStmt.execute(); +// if (value.contains("-") && value.contains(":")) { +// pStmt = conn.prepareStatement("update juror_digital.juror_response set " + column + "=NOW() where juror_number='" + part_no + "'"); +// pStmt.execute(); +// } else if (column.contains("COMPLETED_AT")) { +// pStmt = conn.prepareStatement("update juror_digital.juror_response set " + column + "=NOW() where juror_number='" + part_no + "'"); +// pStmt.execute(); +// } + + log.info("Updated juror digital " + column + ""); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + //Danielle enable/disable a Bureau user account + public void enableBureauUser(String username, String login_enabled_yn, String value) throws SQLException { + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("update juror_mod.users set " + login_enabled_yn + "=? where owner='400' and username='" + username + "'"); + pStmt.setString(1, value); + + + pStmt.execute(); + log.info("Updated juror password to enable/disable " + login_enabled_yn + " for user " + username + ""); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void expiredBureauUser(String username) throws SQLException { + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("update juror_mod.users set PASSWORD_CHANGED_DATE=current_date-365 where owner='400' and username='" + username + "'"); + pStmt.execute(); + log.info("Updated juror password to expire password for user " + username + ""); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void onDatabaseTable_seeColWithColValue_whereColColvalue(String environment, String database, String databaseTable, + String expectedColumn, String expectedColumnValue, String whereColumn, String whereColumnValue) throws SQLException { + + rowsExistIn_Where( + 1, + environment, + database, + databaseTable, + expectedColumn, + expectedColumnValue, + whereColumn, + whereColumnValue, + whereColumn, + whereColumnValue + ); + } + + public void onDatabaseTable_seeColWithColValue_whereColColvalue(String environment, String database, + String databaseTable, String expectedColumn, String expectedColumnValue, String whereColumn, + String whereColumnValue, String whereColumnB, String whereColumnValueB) throws SQLException { + + rowsExistIn_Where( + 1, + environment, + database, + databaseTable, + expectedColumn, + expectedColumnValue, + whereColumn, + whereColumnValue, + whereColumnB, + whereColumnValueB + ); + } + + public void requestInfoLetterGenerated(String jurorPartNo) throws SQLException { + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("select * from juror.request_lett where part_no = '" + jurorPartNo + "'"); + + pStmt.executeQuery(); + log.info("Selected info letter from request_lett for " + jurorPartNo); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + + } + + public void onDatabaseTable_seeColIsNull_whereColColvalue(String environment, String database, String databaseTable, + String expectedNullColumn, String whereColumn, String whereColumnValue) throws SQLException { + + rowsExistIn_Where( + 1, + environment, + database, + databaseTable, + expectedNullColumn, + "NULL", + whereColumn, + whereColumnValue, + whereColumn, + whereColumnValue + ); + + } + + /** + * JM - Delete from JD.STAFF table where name = + * + * @param staffName + * @throws SQLException + */ + public void staffWithName_doesNotExist(String staffName) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + + pStmt = conn.prepareStatement("delete from juror_MOD.USERS where name=?"); // SQL Statement here + pStmt.setString(1, staffName); + + pStmt.execute(); + log.info("Delete all JUROR_MOD.USERS rows where Name =>" + staffName); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + /* + * Delete row from where juror_number + juror_response + juror_response_aud + juror_response_cjs_employment + juror_response_special_needs + + change_log + change_log_item + + staff_juror_response_audit + */ + public void clean_juror_digital(String part_no) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror_digital.juror_response_aud where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_response_aud where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.juror_response_cjs_employment where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_response_cjs_employment where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.juror_response_special_needs where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_response_special_needs where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.change_log_item where change_log in (select id from juror_digital.change_log where juror_number=?)"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from change_log where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.change_log where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from change_log where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.STAFF_JUROR_RESPONSE_AUDIT where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from STAFF_JUROR_RESPONSE_AUDIT where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.juror_response where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_response where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.paper_response where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from paper_response where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.paper_response_cjs_employment where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from paper_response_cjs_employment where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_digital.paper_response_special_needs where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from paper_response_special_needs where juror_number=>" + part_no); + + //for locked out scenarios + pStmt = conn.prepareStatement("delete from juror_digital.bureau_auth where username=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from bureau_auth where username=>" + part_no); + + //for locked out scenarios + pStmt = conn.prepareStatement("delete from juror_digital.pool_extend where part_no=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from pool_extend where part_no=>" + part_no); + + //delete optic ref + pStmt = conn.prepareStatement("delete from juror_digital.POOL_MEMBER_EXT where part_no=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from POOL_MEMBER_EXT where part_=>" + part_no); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + //Insert an RSUM row in PART_HIST + public void insertRSUMRow(String part_no, String pool_no) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror.part_hist (owner, part_no, date_part, history_code, user_id, other_information, pool_no, last_update)" + + "VALUES ('400', '" + part_no + "', CURRENT_DATE, 'RSUM', 'CPASS', 'File -JURY081001.0001', '" + pool_no + "', CURRENT_DATE)"); + pStmt.execute(); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //Insert a RESP row in PART_HIST + public void insertRESPRow(String part_no, String pool_no) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror.part_hist (owner, part_no, date_part, history_code, user_id, other_information, pool_no, last_update)" + + "VALUES ('400', '" + part_no + "', CURRENT_DATE, 'RESP', 'CPASS', 'Responded', '" + pool_no + "', CURRENT_DATE)"); + pStmt.execute(); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //Insert a PUND row in PART_HIST + public void insertPUNDRow(String part_no, String pool_no) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror.part_hist (owner, part_no, date_part, history_code, user_id, other_information, pool_no, last_update)" + + "VALUES ('400', '" + part_no + "', CURRENT_DATE, 'PUND', 'CPASS', NULL, '" + pool_no + "', CURRENT_DATE)"); + pStmt.execute(); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //Clean Dashboard tables + public void clean_dashboard() throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror_digital.stats_auto_processed"); + pStmt.execute(); + log.info("Deleted from juror_stats_auto_processed"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_not_responded"); + pStmt.execute(); + log.info("Deleted from juror_stats_not_responded"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_response_times"); + pStmt.execute(); + log.info("Deleted from juror_stats_response_times"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_thirdparty_online"); + pStmt.execute(); + log.info("Deleted from juror_stats_thirdparty_online"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_unprocessed_responses"); + pStmt.execute(); + log.info("Deleted from juror_stats_unprocessed_responses"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_welsh_online_responses"); + pStmt.execute(); + log.info("Deleted from juror_stats_welsh_online_responses"); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void clean_jurorTablesPreSetList(String part_no, String pool_no, String owner) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror.part_hist where part_no=? and owner!=? OR part_no=? and pool_no!=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.setString(3, part_no); + pStmt.setString(4, pool_no); + pStmt.execute(); + log.info("Cleared JUROR.PART_HIST for part_no=>" + part_no + "<= and owner =>" + owner + "OR part_no =>" + part_no + "<= and pool_no NOT =>" + pool_no); + + pStmt = conn.prepareStatement("delete from juror.CONFIRM_LETT where part_no=? and owner=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.execute(); + log.info("Cleared JUROR.CONFIRM_LETT for part_no=>" + part_no + "<= and owner =>" + owner); + + pStmt = conn.prepareStatement("delete from juror.defer_dbf where part_no=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared JUROR.defer_dbf for part_no=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror.def_lett where part_no=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared JUROR.def_lett for part_no=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror.def_denied where part_no=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared JUROR.def_denied for part_no=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror.exc_lett where part_no=? and owner=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.execute(); + log.info("Cleared JUROR.exc_lett for part_no=>" + part_no + "<= and owner =>" + owner); + + pStmt = conn.prepareStatement("delete from juror.exc_denied_lett where part_no=? and owner=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.execute(); + log.info("Cleared JUROR.exc_denied_lett for part_no=>" + part_no + "<= and owner =>" + owner); + + pStmt = conn.prepareStatement("delete from juror.disq_lett where part_no=? and owner=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.execute(); + log.info("Cleared JUROR.disq_lett for part_no=>" + part_no + "<= and owner =>" + owner); + + pStmt = conn.prepareStatement("delete from juror.part_amendments where part_no=? and owner=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.execute(); + log.info("Cleared JUROR.part_amendments for part_no=>" + part_no + "<= and owner =>" + owner); + + pStmt = conn.prepareStatement("delete from juror.phone_log where part_no=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared JUROR.phone_log for part_no=>" + part_no + ""); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void clean_juror(String part_no, String pool_no, String owner) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror.pool where part_no=? and owner!=? OR part_no=? and pool_no!=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.setString(3, part_no); + pStmt.setString(4, pool_no); + pStmt.execute(); + log.info("Cleared JUROR.POOL for part_no=>" + part_no + "<= and owner is not " + owner); + + pStmt = conn.prepareStatement("update juror.pool set" + + " status='1', " + + " responded='N', " + + " title = NULL," + + " dob = NULL," + + " ADDRESS3 = NULL," + + " ADDRESS4 = 'London'," + + " ADDRESS5 = NULL," + + " ADDRESS6 = NULL," + + " H_PHONE = NULL," + + " W_PHONE = NULL," + + " W_PH_LOCAL = NULL," + + " TIMES_SEL = NULL," + + " TRIAL_NO = NULL," + + " JUROR_NO = NULL," + + " EXC_CODE = NULL," + + " DATE_EXCUS = NULL," + + " DATE_DISQ = NULL," + + " DISQ_CODE = NULL," + + " ACC_EXC = NULL," + + " NO_DEF_POS = NULL," + + " DEF_DATE = NULL," + + " USER_EDTQ = NULL," + + " NOTES = NULL," + + " WELSH = NULL," + + " PHOENIX_DATE = NULL," + + " PHOENIX_CHECKED = NULL," + + " POLICE_CHECK = NULL," + + " M_PHONE = NULL," + + " H_EMAIL = NULL," + + " CONTACT_PREFERENCE = NULL," + + " READ_ONLY ='N'," + + " NOTIFICATIONS ='0'," + + " IS_ACTIVE ='Y'" + + " where " + + " part_no = ? and pool_no = ?"); + + pStmt.setString(1, part_no); + pStmt.setString(2, pool_no); + + pStmt.executeUpdate(); + + log.info("Cleaned up juror table where part_no=>" + part_no); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + // #danielle + public void resetPooltoPendingAllocation(String pool_no) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_digital.juror_response set" + + " staff_login = NULL," + + " staff_assignment_date = NULL " + + " where processing_status='TODO' and juror_number in " + + "( " + + "select part_no from juror.pool where " + + " pool_no = ?" + + ")" + ); + + + pStmt.setString(1, pool_no); + + pStmt.executeUpdate(); + log.info("Reset to PENDING ALLOCATION where pool_no=>" + pool_no); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void straightThroughDisabled() throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_digital.app_settings set value='TRUE' where setting in (" + + "'STRAIGHT_THROUGH_ACCEPTANCE_DISABLED', " + + "'STRAIGHT_THROUGH_AGE_EXCUSAL_DISABLED'," + + "'STRAIGHT_THROUGH_DECEASED_EXCUSAL_DISABLED')"); + pStmt.execute(); + log.info("Updated app_settings to disable straight_through"); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void deleteCourtCopyOfRecord(String partNo) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("DELETE FROM JUROR.POOL WHERE OWNER !='400' AND PART_NO='" + partNo + "'"); + pStmt.execute(); + log.info("Deleted court version of juror record for juror " + partNo); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void deleteAdditionalBureauRecords(String partNo, String poolNo) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("DELETE FROM JUROR.POOL WHERE OWNER ='400' AND POOL_NO != '" + poolNo + "' AND part_no='" + partNo + "'"); + pStmt.execute(); + conn.commit(); + + pStmt = conn.prepareStatement("UPDATE JUROR.POOL SET IS_ACTIVE='Y' WHERE OWNER ='400' AND IS_ACTIVE='N' AND part_no='" + partNo + "'"); + pStmt.execute(); + + log.info("Deleted court version of juror record for juror " + partNo); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void straightThroughEnabled() throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_digital.app_settings set value='FALSE' where setting in (" + + "'STRAIGHT_THROUGH_ACCEPTANCE_DISABLED', " + + "'STRAIGHT_THROUGH_AGE_EXCUSAL_DISABLED'," + + "'STRAIGHT_THROUGH_DECEASED_EXCUSAL_DISABLED')"); + pStmt.execute(); + log.info("Updated app_settings to enable straight_through"); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + //update juror_response set date_received = TO_DATE('2018/02/06 10:00:00', 'YYYY/MM/DD HH:MI:SS') where juror_number='645700997' + public void dateReceviedFor_setTo_workingDaysBeforeCurrent(String part_no, Integer workingDays) throws SQLException { + String dateToUpdateTo = DateManipulator.addWorkingDaysToCurrentDate(-6); + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_digital.juror_response set date_received = TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where juror_number=?"); + pStmt.setString(1, dateToUpdateTo); + pStmt.setString(2, part_no); + pStmt.execute(); + log.info("Updated app_settings to disable straight_through"); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void clean_jurorTable_wherePartNoOwner(String tableName, String part_no, String owner) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror." + tableName + " where part_no=? and owner=?"); + pStmt.setString(1, part_no); + pStmt.setString(2, owner); + pStmt.execute(); + log.info("Cleared down table =>" + tableName + "<= for part_no=>" + part_no + "<= and owner =>" + owner); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + + public void resetUser(String username) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("update juror_mod.users set password_changed_date=NOW() where username=?"); + pStmt.setString(1, username); + pStmt.execute(); + log.info("Updated password changed date for =>" + username + "<= to let us login"); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void resetJurorDigitalDatabase() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Delete from juror_digital.change_log_item Where change_log in (select c.id from juror_digital.change_log c, juror_digital.juror_response r where c.juror_number = r.juror_number and processing_status = 'TODO')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Delete from juror_digital.change_log Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Delete from juror_digital.staff_juror_response_audit Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response_aud Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response_cjs_employment Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response_special_needs Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response Where processing_status = 'TODO'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void usernameHasCourt_setAs(String username, int courtPosition, String courtRoom) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + String courtColumnName = "COURT_" + courtPosition; + try { + pStmt = conn.prepareStatement("update juror_digital.staff set " + courtColumnName + "=? where login=?"); + pStmt.setString(1, courtRoom); + pStmt.setString(2, username); + pStmt.execute(); + log.info("Set " + courtColumnName + " to =>" + courtRoom + "<= for user =>" + username); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteTeam() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Delete from juror_mod.users where username='TeamPickListUser'"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewPoolRequests() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Delete from juror.unique_pool where new_request='T'"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertConfLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror.confirm_lett (owner, part_no, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', null, null)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted conf letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteConfLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.confirm_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted conf letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertDeferralLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String def_date = System.getProperty("POOL.DEF_DATE"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.def_lett (owner, part_no, date_def, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + def_date + "', '" + exc_code + "', null, null)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted def letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteDeferralLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.def_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted def letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertExcusalLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String exc_date = System.getProperty("POOL.DATE_EXCUS"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.exc_lett (owner, part_no, date_exc, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + exc_date + "', '" + exc_code + "', null, null)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted exc letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteExcusalLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.exc_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted exc letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertPostponementLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String date = System.getProperty("POOL.LAST_UPDATE"); + pStmt = conn.prepareStatement("INSERT INTO juror.postpone_lett (owner, part_no, date_postpone, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + date + "', null, null)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted postpone letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deletePostponementLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.postpone_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted postpone letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertDefDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String def_date = System.getProperty("POOL.DATE_DEF"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.def_denied (owner, part_no, date_def, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + def_date + "', '" + exc_code + "' null, null)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted def denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteDefDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.def_denied WHERE PART_NO = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted def_denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertExcDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String exc_date = System.getProperty("POOL.DATE_EXCUS"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.exc_denied_lett (owner, part_no, date_excused, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + exc_date + "', '" + exc_code + "' null, null)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted exc denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteExcDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.exc_denied_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted exc_denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertDisqualifiedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String disq_date = System.getProperty("POOL.DATE_DISQ"); + String disq_code = System.getProperty("POOL.DISQ_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.disq_lett (owner, part_no, disq_code, disq_date, date_printed, printed)" + + "VALUES ('400', '" + part_no + "', '" + disq_code + "', '" + disq_date + "' null, null)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted disqualifed letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteDisqualifiedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.disq_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted disqualified letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewRecordsForPartNo(String partNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.defer_dbf WHERE part_no = '" + partNo + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror.pool WHERE part_no = '" + partNo + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_digital.paper_response WHERE juror_number = '" + partNo + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_digital.juror_response WHERE juror_number = '" + partNo + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new records for juror '" + partNo + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewPool(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.defer_dbf WHERE part_no in (select part_no from juror.pool where pool_no in ('" + court + "111111', '" + court + "222222', '" + court + "333333','" + court + "444444', '" + court + "999999'))"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror.pool WHERE pool_no in ('" + court + "111111', '" + court + "222222', '" + court + "333333', '" + court + "444444', '" + court + "999999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror.pool WHERE part_no in ('6" + court + "11111', '6" + court + "22222', '6" + court + "33333', '6" + court + "44444','6" + court + "99999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror.unique_pool WHERE pool_no in ('" + court + "111111', '" + court + "222222', '" + court + "333333', '" + court + "444444', '" + court + "999999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_digital.pool_request_ext WHERE pool_no in ('" + court + "111111', '" + court + "222222', '" + court + "333333', '" + court + "444444', '" + court + "999999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_digital.pool_request_ext WHERE pool_no in ('" + court + "111111', '" + court + "222222', '" + court + "333333', '" + court + "444444', '" + court + "999999')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new pool for court '" + court + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + + public void deletePoolNumber(String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.defer_dbf WHERE part_no in (select part_no from juror.pool where pool_no in ('" + poolNumber + "'))"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror.pool WHERE pool_no in ('" + poolNumber + "')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror.pool WHERE part_no in ('" + poolNumber + "')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror.unique_pool WHERE pool_no in ('" + poolNumber + "')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_digital.pool_request_ext WHERE pool_no in ('" + poolNumber + "')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_digital.pool_request_ext WHERE pool_no in ('" + poolNumber + "')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted pool deleted -- '" + poolNumber + " --- " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //osman testing + public void deleteRequestLett(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.request_lett WHERE part_no in (select part_no from juror.pool where pool_no in ('" + court + "999999', '" + court + "222222', '" + court + "333333'))"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted request lett for court '" + court + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteRequestLettForPartNo(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.request_lett WHERE part_no = '" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted request lett for part_no '" + part_no + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deletePaperResponses() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("DELETE FROM JUROR_DIGITAL.PAPER_RESPONSE"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_DIGITAL.PAPER_RESPONSE_CJS_EMPLOYMENT"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_DIGITAL.PAPER_RESPONSE_SPECIAL_NEEDS"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted paper replies"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public String getTodaysDateEEEddMMMyyyy() { + String datePattern = "EEE d MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + return new SimpleDateFormat(datePattern).format((calendar).getTime()); + } + + public void insertNewPoolWithDeferral(String court, String noWeeks) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String datePattern = "dd MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER,POOL_NO,JURISDICTION_CODE,RETURN_DATE,NEXT_DATE,NO_REQUESTED,POOL_TOTAL,REG_SPC,POOL_TYPE,LOC_CODE,NEW_REQUEST,LAST_UPDATE,READ_ONLY,DEFERRALS_USED,ADDITIONAL_SUMMONS,ATTEND_TIME)" + + "VALUES ('" + court + "','" + court + "111111',null,to_date(CURRENT_DATE,'DD-MON-RR'),to_date(CURRENT_DATE,'DD-MON-RR'),10,10,'R','CRO','" + court + "','N',to_date(CURRENT_DATE,'DD-MON-RR'),'N',null,null,to_date(CURRENT_DATE,'DD-MON-RR'))"); + pStmt.execute(); + +// #insert the pool rows + pStmt = conn.prepareStatement("Insert into juror.pool (OWNER,PART_NO,POOL_NO,POLL_NUMBER,TITLE,LNAME,FNAME,DOB,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,H_PHONE,W_PHONE,W_PH_LOCAL,TIMES_SEL,TRIAL_NO,JUROR_NO,REG_SPC,RET_DATE,DEF_DATE,RESPONDED,DATE_EXCUS,EXC_CODE,ACC_EXC,DATE_DISQ,DISQ_CODE,MILEAGE,LOCATION,USER_EDTQ,STATUS,NOTES,NO_ATTENDANCES,IS_ACTIVE,NO_DEF_POS,NO_ATTENDED,NO_FTA,NO_AWOL,POOL_SEQ,EDIT_TAG,POOL_TYPE,LOC_CODE,NEXT_DATE,ON_CALL,PERM_DISQUAL,PAY_COUNTY_EMP,PAY_EXPENSES,SPEC_NEED,SPEC_NEED_MSG,SMART_CARD,AMT_SPENT,COMPLETION_FLAG,COMPLETION_DATE,SORT_CODE,BANK_ACCT_NAME,BANK_ACCT_NO,BLDG_SOC_ROLL_NO,WAS_DEFERRED,ID_CHECKED,POSTPONE,WELSH,PAID_CASH,TRAVEL_TIME,SCAN_CODE,FINANCIAL_LOSS,POLICE_CHECK,LAST_UPDATE,READ_ONLY,SUMMONS_FILE,REMINDER_SENT,PHOENIX_DATE,PHOENIX_CHECKED,M_PHONE,H_EMAIL,CONTACT_PREFERENCE,NOTIFICATIONS,SERVICE_COMP_COMMS_STATUS,TRANSFER_DATE)" + + "values ('400','6" + court + "11111','" + court + "111111','857',null,'LNAME','FNAME',null,'1 STREET NAME','ANYTOWN',null,'London',null,null,'NN1 3HQ',null,null,null,null,null,null,'R',to_date(CURRENT_DATE+50,'DD-MON-RR'),null,'N',null,null,null,null,null,null,null,null,1,null,null,'Y',null,null,null,null,'0067',null,'CRO','" + court + "',to_date(CURRENT_DATE+50,'DD-MON-RR'),'N',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,to_date(CURRENT_DATE-30,'DD-MON-RR'),'Y',null,null,null,null,null,null,null,0,null,CURRENT_DATE-20)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Insert into juror.pool (OWNER,PART_NO,POOL_NO,POLL_NUMBER,TITLE,LNAME,FNAME,DOB,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,H_PHONE,W_PHONE,W_PH_LOCAL,TIMES_SEL,TRIAL_NO,JUROR_NO,REG_SPC,RET_DATE,DEF_DATE,RESPONDED,DATE_EXCUS,EXC_CODE,ACC_EXC,DATE_DISQ,DISQ_CODE,MILEAGE,LOCATION,USER_EDTQ,STATUS,NOTES,NO_ATTENDANCES,IS_ACTIVE,NO_DEF_POS,NO_ATTENDED,NO_FTA,NO_AWOL,POOL_SEQ,EDIT_TAG,POOL_TYPE,LOC_CODE,NEXT_DATE,ON_CALL,PERM_DISQUAL,PAY_COUNTY_EMP,PAY_EXPENSES,SPEC_NEED,SPEC_NEED_MSG,SMART_CARD,AMT_SPENT,COMPLETION_FLAG,COMPLETION_DATE,SORT_CODE,BANK_ACCT_NAME,BANK_ACCT_NO,BLDG_SOC_ROLL_NO,WAS_DEFERRED,ID_CHECKED,POSTPONE,WELSH,PAID_CASH,TRAVEL_TIME,SCAN_CODE,FINANCIAL_LOSS,POLICE_CHECK,LAST_UPDATE,READ_ONLY,SUMMONS_FILE,REMINDER_SENT,PHOENIX_DATE,PHOENIX_CHECKED,M_PHONE,H_EMAIL,CONTACT_PREFERENCE,NOTIFICATIONS,SERVICE_COMP_COMMS_STATUS,TRANSFER_DATE)" + + "values ('" + court + "','6" + court + "11111','" + court + "111111','857',null,'LNAME','FNAME',null,'1 STREET NAME','ANYTOWN',null,'London',null,null,'NN1 3HQ',null,null,null,null,null,null,'R',to_date(CURRENT_DATE+50,'DD-MON-RR'),to_date('" + expectedDate + "','DD-MON-RR'),'Y',to_date(CURRENT_DATE,'DD-MON-RR'),'A',null,null,null,null,null,null,7,null,null,'Y',1,null,null,null,'0067',null,'CRO','" + court + "',null,'N',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,to_date(CURRENT_DATE-30,'DD-MON-RR'),'N',null,null,null,null,null,null,null,0,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO JUROR.DEFER_DBF(OWNER, PART_NO, DEFER_TO, CHECKED, LOC_CODE)" + + "VALUES ('" + court + "','6" + court + "11111',to_date('" + expectedDate + "','DD-MON-RR'),'N','" + court + "')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertCourtPoolWithDeferral(String court, String pool_no, String part_no, String no_weeks) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + if (getCountFromUniquePool(pool_no) == 0) + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER,POOL_NO,JURISDICTION_CODE,RETURN_DATE,NEXT_DATE,NO_REQUESTED,POOL_TOTAL,REG_SPC,POOL_TYPE,LOC_CODE,NEW_REQUEST,LAST_UPDATE,READ_ONLY,DEFERRALS_USED,ADDITIONAL_SUMMONS,ATTEND_TIME)" + + "VALUES ('" + court + "','" + pool_no + "',null,to_date(CURRENT_DATE,'DD-MON-RR'),to_date(CURRENT_DATE,'DD-MON-RR'),10,10,'R','CRO','" + court + "','N',to_date(CURRENT_DATE,'DD-MON-RR'),'N',null,null,to_date(CURRENT_DATE,'DD-MON-RR'))"); + pStmt.execute(); + + if (getCountFromPool(part_no, pool_no) == 0) + pStmt = conn.prepareStatement("Insert into juror.pool (OWNER,PART_NO,POOL_NO,POLL_NUMBER,TITLE,LNAME,FNAME,DOB,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,H_PHONE,W_PHONE,W_PH_LOCAL,TIMES_SEL,TRIAL_NO,JUROR_NO,REG_SPC,RET_DATE,DEF_DATE,RESPONDED,DATE_EXCUS,EXC_CODE,ACC_EXC,DATE_DISQ,DISQ_CODE,MILEAGE,LOCATION,USER_EDTQ,STATUS,NOTES,NO_ATTENDANCES,IS_ACTIVE,NO_DEF_POS,NO_ATTENDED,NO_FTA,NO_AWOL,POOL_SEQ,EDIT_TAG,POOL_TYPE,LOC_CODE,NEXT_DATE,ON_CALL,PERM_DISQUAL,PAY_COUNTY_EMP,PAY_EXPENSES,SPEC_NEED,SPEC_NEED_MSG,SMART_CARD,AMT_SPENT,COMPLETION_FLAG,COMPLETION_DATE,SORT_CODE,BANK_ACCT_NAME,BANK_ACCT_NO,BLDG_SOC_ROLL_NO,WAS_DEFERRED,ID_CHECKED,POSTPONE,WELSH,PAID_CASH,TRAVEL_TIME,SCAN_CODE,FINANCIAL_LOSS,POLICE_CHECK,LAST_UPDATE,READ_ONLY,SUMMONS_FILE,REMINDER_SENT,PHOENIX_DATE,PHOENIX_CHECKED,M_PHONE,H_EMAIL,CONTACT_PREFERENCE,NOTIFICATIONS,SERVICE_COMP_COMMS_STATUS,TRANSFER_DATE)" + + "values ('400','" + part_no + "','" + pool_no + "','857',null,'LNAME','FNAME',null,'1 STREET NAME','ANYTOWN',null,'London',null,null,'NN1 3HQ',null,null,null,null,null,null,'R',to_date(CURRENT_DATE+50,'DD-MON-RR'),null,'N',null,null,null,null,null,null,null,null,1,null,null,'Y',null,null,null,null,'0067',null,'CRO','" + court + "',to_date(CURRENT_DATE+50,'DD-MON-RR'),'N',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,to_date(CURRENT_DATE-30,'DD-MON-RR'),'Y',null,null,null,null,null,null,null,0,null,CURRENT_DATE-20)"); + pStmt.execute(); + + try { + String datePattern = "dd MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(no_weeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + pStmt = conn.prepareStatement("Insert into juror.pool (OWNER,PART_NO,POOL_NO,POLL_NUMBER,TITLE,LNAME,FNAME,DOB,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,H_PHONE,W_PHONE,W_PH_LOCAL,TIMES_SEL,TRIAL_NO,JUROR_NO,REG_SPC,RET_DATE,DEF_DATE,RESPONDED,DATE_EXCUS,EXC_CODE,ACC_EXC,DATE_DISQ,DISQ_CODE,MILEAGE,LOCATION,USER_EDTQ,STATUS,NOTES,NO_ATTENDANCES,IS_ACTIVE,NO_DEF_POS,NO_ATTENDED,NO_FTA,NO_AWOL,POOL_SEQ,EDIT_TAG,POOL_TYPE,LOC_CODE,NEXT_DATE,ON_CALL,PERM_DISQUAL,PAY_COUNTY_EMP,PAY_EXPENSES,SPEC_NEED,SPEC_NEED_MSG,SMART_CARD,AMT_SPENT,COMPLETION_FLAG,COMPLETION_DATE,SORT_CODE,BANK_ACCT_NAME,BANK_ACCT_NO,BLDG_SOC_ROLL_NO,WAS_DEFERRED,ID_CHECKED,POSTPONE,WELSH,PAID_CASH,TRAVEL_TIME,SCAN_CODE,FINANCIAL_LOSS,POLICE_CHECK,LAST_UPDATE,READ_ONLY,SUMMONS_FILE,REMINDER_SENT,PHOENIX_DATE,PHOENIX_CHECKED,M_PHONE,H_EMAIL,CONTACT_PREFERENCE,NOTIFICATIONS,SERVICE_COMP_COMMS_STATUS,TRANSFER_DATE)" + + "values ('" + court + "','" + part_no + "','" + pool_no + "','857',null,'LNAME','FNAME',null,'1 STREET NAME','ANYTOWN',null,'London',null,null,'NN1 3HQ',null,null,null,null,null,null,'R',to_date(CURRENT_DATE+50,'DD-MON-RR'),to_date('" + expectedDate + "','DD-MON-RR'),'Y',to_date(CURRENT_DATE,'DD-MON-RR'),'A',null,null,null,null,null,null,7,null,null,'Y',1,null,null,null,'0067',null,'CRO','" + court + "',null,'N',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,to_date(CURRENT_DATE-30,'DD-MON-RR'),'N',null,null,null,null,null,null,null,0,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO JUROR.DEFER_DBF(OWNER, PART_NO, DEFER_TO, CHECKED, LOC_CODE)" + + "VALUES ('" + court + "','" + part_no + "',to_date('" + expectedDate + "','DD-MON-RR'),'N','" + court + "')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void clearDeferralsForWeeksAndCourt(int noWeeks, String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + int numberOfDays = noWeeks * 7; + + pStmt = conn.prepareStatement("DELETE FROM JUROR.DEFER_DBF WHERE LOC_CODE='"+ court +"' AND DEFER_TO=TRUNC(CURRENT_DATE + (8 - TO_NUMBER(TO_CHAR(CURRENT_DATE, 'D'))) +" + numberOfDays + ")"); + + pStmt.execute(); + + System.out.println("Deferrals deleted for date falling in " + noWeeks + "weeks - for court -" + court); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted deferrals" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertCourtPoolWithDeferralExistingJuror(String court, String pool_no, String part_no, String no_weeks, String loc_code) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String datePattern = "dd MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(no_weeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + pStmt = conn.prepareStatement("Insert into juror.pool (OWNER,PART_NO,POOL_NO,POLL_NUMBER,TITLE,LNAME,FNAME,DOB,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,H_PHONE,W_PHONE,W_PH_LOCAL,TIMES_SEL,TRIAL_NO,JUROR_NO,REG_SPC,RET_DATE,DEF_DATE,RESPONDED,DATE_EXCUS,EXC_CODE,ACC_EXC,DATE_DISQ,DISQ_CODE,MILEAGE,LOCATION,USER_EDTQ,STATUS,NOTES,NO_ATTENDANCES,IS_ACTIVE,NO_DEF_POS,NO_ATTENDED,NO_FTA,NO_AWOL,POOL_SEQ,EDIT_TAG,POOL_TYPE,LOC_CODE,NEXT_DATE,ON_CALL,PERM_DISQUAL,PAY_COUNTY_EMP,PAY_EXPENSES,SPEC_NEED,SPEC_NEED_MSG,SMART_CARD,AMT_SPENT,COMPLETION_FLAG,COMPLETION_DATE,SORT_CODE,BANK_ACCT_NAME,BANK_ACCT_NO,BLDG_SOC_ROLL_NO,WAS_DEFERRED,ID_CHECKED,POSTPONE,WELSH,PAID_CASH,TRAVEL_TIME,SCAN_CODE,FINANCIAL_LOSS,POLICE_CHECK,LAST_UPDATE,READ_ONLY,SUMMONS_FILE,REMINDER_SENT,PHOENIX_DATE,PHOENIX_CHECKED,M_PHONE,H_EMAIL,CONTACT_PREFERENCE,NOTIFICATIONS,SERVICE_COMP_COMMS_STATUS,TRANSFER_DATE)" + + "values ('" + court + "','" + part_no + "','" + pool_no + "','857',null,'LNAME','FNAME',null,'1 STREET NAME','ANYTOWN',null,'London',null,null,'NN1 3HQ',null,null,null,null,null,null,'R',to_date(CURRENT_DATE+50,'DD-MON-RR'),to_date('" + expectedDate + "','DD-MON-RR'),'Y',to_date(CURRENT_DATE,'DD-MON-RR'),'A',null,null,null,null,null,null,7,null,null,'Y',1,null,null,null,'0067',null,'CRO','" + court + "',null,'N',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,to_date(CURRENT_DATE-30,'DD-MON-RR'),'N',null,null,null,null,null,null,null,0,null,null)"); + + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO JUROR.DEFER_DBF(OWNER, PART_NO, DEFER_TO, CHECKED, LOC_CODE)" + + "VALUES ('" + court + "','" + part_no + "',to_date('" + expectedDate + "','DD-MON-RR'),'N','" + loc_code + "')"); + + pStmt.execute(); + System.out.println("Deferral entered for -" + expectedDate + "- for juror -" + part_no + "- into pool -" + pool_no + "- and the owner is -" + court + "- loc_code -" + loc_code); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolCompletedPool(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER, POOL_NO, RETURN_DATE, NEXT_DATE, NO_REQUESTED, POOL_TOTAL, REG_SPC, POOL_TYPE, LOC_CODE, NEW_REQUEST, READ_ONLY, DEFERRALS_USED)" + + "VALUES('" + court + "', '" + court + "111111', CURRENT_DATE-10, CURRENT_DATE-10, 0, 0, 'R', 'CRO', '" + court + "', 'N', 'y', NULL)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER, POOL_NO, RETURN_DATE, NEXT_DATE, NO_REQUESTED, POOL_TOTAL, REG_SPC, POOL_TYPE, LOC_CODE, NEW_REQUEST, READ_ONLY, DEFERRALS_USED)" + + "VALUES('400', '" + court + "111111', CURRENT_DATE-10, CURRENT_DATE-10, 0, 0, 'R', 'CRO', '" + court + "', 'N', 'N', NULL)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (OWNER, PART_NO, POOL_NO, LNAME, FNAME, DOB, ADDRESS, ADDRESS4, ZIP, REG_SPC, RET_DATE, RESPONDED, USER_EDTQ, STATUS, IS_ACTIVE, POOL_SEQ, POOL_TYPE, LOC_CODE, NEXT_DATE, ON_CALL, COMPLETION_FLAG, COMPLETION_DATE, WAS_DEFERRED, READ_ONLY)" + + "VALUES('400', '6" + court + "11111', '" + court + "111111', 'PERSON', 'TEST', TIMESTAMP '1990-05-16 00:00:00.000000', '542 STREET NAME', 'ANYTOWN', 'CH1 2AN', 'R', TIMESTAMP '2023-01-23 00:00:00.000000', 'Y', 'BUREAU_USER', 2, 'Y', '0001', 'CRO', '" + court + "', TIMESTAMP '2023-01-23 00:00:00.000000', 'N', 'N', NULL, 'N', 'Y');"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertJurorWithDeferralIntoPool(String poolNo, String court, String noWeeks, String jurorPartNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String datePattern = "dd MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + +// #insert the pool rows + pStmt = conn.prepareStatement("Insert into juror.pool (OWNER,PART_NO,POOL_NO,POLL_NUMBER,TITLE,LNAME,FNAME,DOB,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,H_PHONE,W_PHONE,W_PH_LOCAL,TIMES_SEL,TRIAL_NO,JUROR_NO,REG_SPC,RET_DATE,DEF_DATE,RESPONDED,DATE_EXCUS,EXC_CODE,ACC_EXC,DATE_DISQ,DISQ_CODE,MILEAGE,LOCATION,USER_EDTQ,STATUS,NOTES,NO_ATTENDANCES,IS_ACTIVE,NO_DEF_POS,NO_ATTENDED,NO_FTA,NO_AWOL,POOL_SEQ,EDIT_TAG,POOL_TYPE,LOC_CODE,NEXT_DATE,ON_CALL,PERM_DISQUAL,PAY_COUNTY_EMP,PAY_EXPENSES,SPEC_NEED,SPEC_NEED_MSG,SMART_CARD,AMT_SPENT,COMPLETION_FLAG,COMPLETION_DATE,SORT_CODE,BANK_ACCT_NAME,BANK_ACCT_NO,BLDG_SOC_ROLL_NO,WAS_DEFERRED,ID_CHECKED,POSTPONE,WELSH,PAID_CASH,TRAVEL_TIME,SCAN_CODE,FINANCIAL_LOSS,POLICE_CHECK,LAST_UPDATE,READ_ONLY,SUMMONS_FILE,REMINDER_SENT,PHOENIX_DATE,PHOENIX_CHECKED,M_PHONE,H_EMAIL,CONTACT_PREFERENCE,NOTIFICATIONS,SERVICE_COMP_COMMS_STATUS,TRANSFER_DATE)" + + "values ('400'," + jurorPartNo + ",'" + poolNo + "','857',null,'LNAME','FNAME',null,'1 STREET NAME','ANYTOWN',null,'London',null,null,'NN1 3HQ',null,null,null,null,null,null,'R',to_date(CURRENT_DATE+50,'DD-MON-RR'),null,'N',null,null,null,null,null,null,null,null,1,null,null,'Y',null,null,null,null,'0067',null,'CRO','" + court + "',to_date(CURRENT_DATE+50,'DD-MON-RR'),'N',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,to_date(CURRENT_DATE-30,'DD-MON-RR'),'Y',null,null,null,null,null,null,null,0,null,CURRENT_DATE-20)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("Insert into juror.pool (OWNER,PART_NO,POOL_NO,POLL_NUMBER,TITLE,LNAME,FNAME,DOB,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,H_PHONE,W_PHONE,W_PH_LOCAL,TIMES_SEL,TRIAL_NO,JUROR_NO,REG_SPC,RET_DATE,DEF_DATE,RESPONDED,DATE_EXCUS,EXC_CODE,ACC_EXC,DATE_DISQ,DISQ_CODE,MILEAGE,LOCATION,USER_EDTQ,STATUS,NOTES,NO_ATTENDANCES,IS_ACTIVE,NO_DEF_POS,NO_ATTENDED,NO_FTA,NO_AWOL,POOL_SEQ,EDIT_TAG,POOL_TYPE,LOC_CODE,NEXT_DATE,ON_CALL,PERM_DISQUAL,PAY_COUNTY_EMP,PAY_EXPENSES,SPEC_NEED,SPEC_NEED_MSG,SMART_CARD,AMT_SPENT,COMPLETION_FLAG,COMPLETION_DATE,SORT_CODE,BANK_ACCT_NAME,BANK_ACCT_NO,BLDG_SOC_ROLL_NO,WAS_DEFERRED,ID_CHECKED,POSTPONE,WELSH,PAID_CASH,TRAVEL_TIME,SCAN_CODE,FINANCIAL_LOSS,POLICE_CHECK,LAST_UPDATE,READ_ONLY,SUMMONS_FILE,REMINDER_SENT,PHOENIX_DATE,PHOENIX_CHECKED,M_PHONE,H_EMAIL,CONTACT_PREFERENCE,NOTIFICATIONS,SERVICE_COMP_COMMS_STATUS,TRANSFER_DATE)" + + "values ('" + court + "'," + jurorPartNo + ",'" + poolNo + "','857',null,'LNAME','FNAME',null,'1 STREET NAME','ANYTOWN',null,'London',null,null,'NN1 3HQ',null,null,null,null,null,null,'R',to_date(CURRENT_DATE+50,'DD-MON-RR'),to_date('" + expectedDate + "','DD-MON-RR'),'Y',to_date(CURRENT_DATE,'DD-MON-RR'),'A',null,null,null,null,null,null,7,null,null,'Y',1,null,null,null,'0067',null,'CRO','" + court + "',null,'N',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,to_date(CURRENT_DATE-30,'DD-MON-RR'),'N',null,null,null,null,null,null,null,0,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO JUROR.DEFER_DBF(OWNER, PART_NO, DEFER_TO, CHECKED, LOC_CODE)" + + "VALUES ('" + court + "','" + jurorPartNo + "',to_date('" + expectedDate + "','DD-MON-RR'),'N','" + court + "')"); + + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolTransferredToCourt(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER,POOL_NO,JURISDICTION_CODE,RETURN_DATE,NEXT_DATE,NO_REQUESTED,POOL_TOTAL,REG_SPC,POOL_TYPE,LOC_CODE,NEW_REQUEST,LAST_UPDATE,READ_ONLY,DEFERRALS_USED,ADDITIONAL_SUMMONS,ATTEND_TIME)" + + "VALUES ('" + court + "','" + court + "333333',null,(SELECT CURRENT_DATE FROM DUAL),(SELECT CURRENT_DATE FROM DUAL),10,10,'R','CRO','" + court + "','N',(SELECT CURRENT_DATE FROM DUAL),'N',null,null,(SELECT CURRENT_DATE FROM DUAL))"); + pStmt.execute(); + +// #insert the pool rows +// #bureau row + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status, transfer_date)" + + "VALUES ('6" + court + "33333', 'Edward', 'Palmer', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "333333', 'N', 'N', 'Y', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1, (SELECT CURRENT_DATE FROM DUAL))"); + pStmt.execute(); + +// #court row + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('6" + court + "33333', 'Edward', 'Palmer', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '" + court + "', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "333333', 'N', 'N', 'N', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolTransferredToCourtNew(String court, String partNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { +// #insert the pool rows +// #bureau row + pStmt = conn.prepareStatement("UPDATE JUROR.POOL SET TRANSFER_DATE = CURRENT_DATE-1, IS_ACTIVE='N', RESPONDED='Y', READ_ONLY='Y' WHERE PART_NO = '" + partNumber + "' AND OWNER = '400'"); + pStmt.execute(); + +// #court row + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + partNumber + "', 'Edward', 'Palmer', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '" + court + "', '" + court + "', '44776-301-1110', 'N', 1000,'" + poolNumber + "', 'N', 'N', 'N', 0, 'N', CURRENT_DATE, 1)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolRecord(String court, String newPartNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + newPartNo + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "222222', 'N', 'N', 'N', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1)"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPool(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER,POOL_NO,JURISDICTION_CODE,RETURN_DATE,NEXT_DATE,NO_REQUESTED,POOL_TOTAL,REG_SPC,POOL_TYPE,LOC_CODE,NEW_REQUEST,LAST_UPDATE,READ_ONLY,DEFERRALS_USED,ADDITIONAL_SUMMONS,ATTEND_TIME)" + + "VALUES ('" + court + "','" + court + "222222',null,(SELECT CURRENT_DATE FROM DUAL),(SELECT CURRENT_DATE FROM DUAL),10,10,'R','CRO','" + court + "','N',(SELECT CURRENT_DATE FROM DUAL),'N',null,null,(SELECT CURRENT_DATE FROM DUAL))"); + pStmt.execute(); + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('6" + court + "22222', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "222222', 'N', 'N', 'N', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewJurorIntoPool(String court, String jurorNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + jurorNumber + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + poolNumber + "', 'N', 'N', 'N', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into pool " + poolNumber + " " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewJurorIntoPoolValidForDigitalReply(String court, String jurorNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status, next_date)" + + "VALUES ('" + jurorNumber + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + poolNumber + "', 'N', 'N', 'N', 0, 'N', CURRENT_DATE+60, 1, TRUNC(CURRENT_DATE + (8 - TO_NUMBER(TO_CHAR(CURRENT_DATE, 'D'))) + 56))"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into pool " + poolNumber + " " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewJurorIntoPoolWithOwnerSameAsCourt(String court, String jurorNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status, next_date)" + + "VALUES ('" + jurorNumber + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '" + court + "', '" + court + "', '44776-301-1110', 'N', 1000,'" + poolNumber + "', 'N', 'N', 'N', 0, 'N', CURRENT_DATE+60, 1, TRUNC(CURRENT_DATE + (8 - TO_NUMBER(TO_CHAR(CURRENT_DATE, 'D'))) + 56))"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into pool " + poolNumber + " " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolRequestLetter(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER,POOL_NO,JURISDICTION_CODE,RETURN_DATE,NEXT_DATE,NO_REQUESTED,POOL_TOTAL,REG_SPC,POOL_TYPE,LOC_CODE,NEW_REQUEST,LAST_UPDATE,READ_ONLY,DEFERRALS_USED,ADDITIONAL_SUMMONS,ATTEND_TIME)" + + "VALUES ('" + court + "','" + court + "999999',null,(SELECT CURRENT_DATE FROM DUAL),(SELECT CURRENT_DATE FROM DUAL),10,10,'R','CRO','" + court + "','N',(SELECT CURRENT_DATE FROM DUAL),'N',null,null,(SELECT CURRENT_DATE FROM DUAL))"); + pStmt.execute(); + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('6" + court + "99999', 'Edward', 'Palmer', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "222222', 'N', 'N', 'N', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPaperSummonsReply(String newJurorRecordNumber, String poolNo) throws SQLException { + insertNewPaperSummonsReplyWithResponseName(newJurorRecordNumber, "Andy", "Marshall", poolNo); + } + + public void insertNewPaperSummonsReplyWithResponseName(String newJurorRecordNumber, String firstName, String lastName, String poolNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + // Insert the Juror into JUROR.POOL + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, address5, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + newJurorRecordNumber + "', 'Andy', 'Marshall', 'pauline74@kingyslmail.top', 'Mr', TIMESTAMP'1981-12-23 00:00:00.0', '7 Poppy Square', 'New Theo', '', '', '', 'W1 1AB', '+44(0)949194874', '00713 952962', 'Y', '400', '415', '0123456789', 'N', 0, " + poolNo + ", 'N', 'N', 'N', 0, 'N', TIMESTAMP'2024-01-01 00:00:00.0', 1)"); + pStmt.execute(); + // Insert the Response into JUROR_DIGITAL.PAPER_RESPONSE + pStmt = conn.prepareStatement("INSERT INTO JUROR_DIGITAL.PAPER_RESPONSE (JUROR_NUMBER, DATE_RECEIVED, TITLE, FIRST_NAME, LAST_NAME, ADDRESS, ADDRESS2, ADDRESS3, ADDRESS4, ADDRESS5, ZIP, PROCESSING_STATUS, DATE_OF_BIRTH, PHONE_NUMBER, ALT_PHONE_NUMBER, EMAIL, RESIDENCY, MENTAL_HEALTH_ACT, MENTAL_HEALTH_CAPACITY, BAIL, CONVICTIONS, DEFERRAL, EXCUSAL, SIGNED, WELSH)" + + "VALUES ('" + newJurorRecordNumber + "', TIMESTAMP'2023-05-05 17:21:10.3','Mr','" + firstName + "','" + lastName + "','7 Poppy Square','New Theo','','','','W1 1AB','TODO',TIMESTAMP'1981-12-23 00:00:00.0','+44(0)949194874','00713 952962','pauline74@kingyslmail.top','Y','N','N','N','N','N','N','Y','N')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into Juror.Pool and new paper response into Juror_Digital.Paper_Response" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertReasonableAdjustments(String jurorRecordNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + // Insert the Juror into JUROR.POOL + pStmt = conn.prepareStatement("INSERT INTO JUROR_DIGITAL.PAPER_RESPONSE_SPECIAL_NEEDS (juror_number, spec_need, spec_need_detail, ID)" + + "VALUES ('" + jurorRecordNumber + "', 'L', 'Limited mobility', 125)"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserting special needs into JUROR_DIGITAL.PAPER_RESPONSE_SPECIAL_NEED" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertCJSStatus(String jurorRecordNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + // Insert the Juror into JUROR.POOL + pStmt = conn.prepareStatement("INSERT INTO JUROR_DIGITAL.PAPER_RESPONSE_CJS_EMPLOYMENT (juror_number, cjs_employer, cjs_employer_details, ID)" + + "VALUES ('" + jurorRecordNumber + "', 'HMCTS', 'CJS Employment notes', 125)"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserting special needs into JUROR_DIGITAL.PAPER_RESPONSE_SPECIAL_NEED" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewSummonsReply(String newJurorRecordNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + // Insert the Juror into JUROR.POOL + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + newJurorRecordNumber + "', 'Fname', 'Lname', 'Milne0@email.com', 'Rev', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '415', '44776-301-1110', 'N', 0, 415230501, 'N', 'N', 'N', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1)"); + pStmt.execute(); + // Insert the Response into JUROR_DIGITAL.JUROR_RESPONSE + pStmt = conn.prepareStatement("INSERT INTO JUROR_DIGITAL.JUROR_RESPONSE (JUROR_NUMBER,DATE_RECEIVED,TITLE,FIRST_NAME,LAST_NAME,ADDRESS,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,ADDRESS6,ZIP,PROCESSING_STATUS,DATE_OF_BIRTH,PHONE_NUMBER,ALT_PHONE_NUMBER,EMAIL,THIRDPARTY_REASON,RESIDENCY,RESIDENCY_DETAIL,MENTAL_HEALTH_ACT,MENTAL_HEALTH_ACT_DETAILS,BAIL,BAIL_DETAILS,CONVICTIONS,CONVICTIONS_DETAILS,DEFERRAL_REASON,DEFERRAL_DATE,SPECIAL_NEEDS_ARRANGEMENTS,EXCUSAL_REASON, VERSION, JUROR_PHONE_DETAILS, JUROR_EMAIL_DETAILS, URGENT, SUPER_URGENT)" + + "VALUES ('" + newJurorRecordNumber + "',(SELECT CURRENT_DATE - interval '0' minute FROM DUAL),'Rev','Fname','Lname','1 Test Street','Scotland','Strathaven','United Kingdom',null,null,'ML106AD','TODO',null,null,null,null,null,'0',null,'0',null,'0',null,'0',null,null,null,null,null,555,'Y', 'Y', 'N', 'N')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into Juror.Pool and new paper response into Juror_Digital.Juror_Response" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewSummonsReplyExcusal(String newJurorRecordNumber, String excusalReason) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, address, address2, address3, address4, zip, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, completion_flag, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + newJurorRecordNumber + "', 'Eleanor', 'Milne', 'Milne0@email.com', 'Rev', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '415', '44776-301-1110', 'N', 0, 415230501, 'N', 'N', 'N', 0, 'N', (SELECT CURRENT_DATE FROM DUAL), 1)"); + pStmt.execute(); + + // Insert the Response into JUROR_DIGITAL.JUROR_RESPONSE + pStmt = conn.prepareStatement("INSERT INTO JUROR_DIGITAL.JUROR_RESPONSE (JUROR_NUMBER, DATE_RECEIVED, TITLE, FIRST_NAME, LAST_NAME, ADDRESS, ADDRESS2, ADDRESS3, ADDRESS4, ADDRESS5, ADDRESS6, ZIP, PROCESSING_STATUS, DATE_OF_BIRTH, PHONE_NUMBER, ALT_PHONE_NUMBER, EMAIL, RESIDENCY, RESIDENCY_DETAIL, MENTAL_HEALTH_ACT, MENTAL_HEALTH_ACT_DETAILS, BAIL, BAIL_DETAILS, CONVICTIONS, CONVICTIONS_DETAILS, DEFERRAL_REASON, DEFERRAL_DATE, SPECIAL_NEEDS_ARRANGEMENTS, EXCUSAL_REASON, PROCESSING_COMPLETE, VERSION, THIRDPARTY_FNAME, THIRDPARTY_LNAME, RELATIONSHIP, MAIN_PHONE, OTHER_PHONE, EMAIL_ADDRESS, THIRDPARTY_REASON, THIRDPARTY_OTHER_REASON, JUROR_PHONE_DETAILS, JUROR_EMAIL_DETAILS, STAFF_LOGIN, STAFF_ASSIGNMENT_DATE, URGENT, SUPER_URGENT, COMPLETED_AT, WELSH)" + + "VALUES ('" + newJurorRecordNumber + "',(SELECT CURRENT_DATE - interval '0' minute FROM DUAL),'Rev', 'Eleanor', 'Milne', '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', NULL, NULL, 'ML106AD', 'TODO', TIMESTAMP '1981-12-23 00:00:00.000000', '44135101-1110', '44135201-1110', 'test@test.com', 'Y', NULL, 'N', NULL, 'N', NULL, 'N', NULL, NULL, NULL, NULL, '" + excusalReason + "', '', 555, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', 'Y', NULL, NULL, 'N', 'N', NULL, 'N')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into Juror.Pool and new paper response into Juror_Digital.Juror_Response" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewPaperSummonsReply(String createdJurorRecordNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + //Delete the specified Juror from Juror.Pool + pStmt = conn.prepareStatement("DELETE FROM JUROR.POOL WHERE PART_NO = '" + createdJurorRecordNumber + "'"); + pStmt.execute(); + + //Delete the specified paper response from Juror_Digital.Paper_Response + pStmt = conn.prepareStatement("DELETE FROM JUROR_DIGITAL.PAPER_RESPONSE WHERE JUROR_NUMBER = '" + createdJurorRecordNumber + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new juror.pool and juror_digital.paper_response records with the part_no and juror_number of " + createdJurorRecordNumber + " respectively - " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteTestPoolAndJurors(String poolRequestNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + //Delete the specified Juror from Juror.UNIQUE_POOL + pStmt = conn.prepareStatement("DELETE FROM JUROR.UNIQUE_POOL WHERE POOL_NO = '" + poolRequestNumber + "'"); + pStmt.execute(); + + //Delete the specified Juror from Juror.POOL + pStmt = conn.prepareStatement("DELETE FROM JUROR.POOL WHERE POOL_NO = '" + poolRequestNumber + "'"); + pStmt.execute(); + + //Delete the pool history from Juror.POOL_HIST + pStmt = conn.prepareStatement("DELETE FROM JUROR.POOL_HIST WHERE POOL_NO = '" + poolRequestNumber + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new juror.unique_pool, juror.pool and juror.pool_hist records with the pool_no " + poolRequestNumber + " respectively - " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewSummonsReply(String createdJurorRecordNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + //Delete the specified Juror from Juror.Pool + pStmt = conn.prepareStatement("DELETE FROM JUROR.POOL WHERE PART_NO = '" + createdJurorRecordNumber + "'"); + pStmt.execute(); + + //Delete the specified paper response from Juror_Digital.Paper_Response + pStmt = conn.prepareStatement("DELETE FROM JUROR_DIGITAL.JUROR_RESPONSE WHERE JUROR_NUMBER = '" + createdJurorRecordNumber + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new juror.pool and juror_digital.Juror_response records with the part_no and juror_number of " + createdJurorRecordNumber + " respectively - " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertHolidayInTheFuture(Integer noOfWeeks, String owner) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + String datePattern = "dd MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + holidayDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + holidayOwner = owner; + + try { + + pStmt = conn.prepareStatement("INSERT INTO JUROR.HOLIDAYS(OWNER,HOLIDAY,DESCRIPTION)" + + "VALUES ('" + owner + "','" + holidayDate + "','Test holiday')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted bank holiday for '" + owner + "' on '" + holidayDate + "' " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertHolidayMondayInTheFuture(Integer noOfWeeks, String owner) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + String datePattern = "dd MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + holidayDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + holidayOwner = owner; + + try { + + pStmt = conn.prepareStatement("INSERT INTO JUROR.HOLIDAYS(OWNER,HOLIDAY,DESCRIPTION)" + + "VALUES ('" + owner + "','" + holidayDate + "','Test holiday')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted bank holiday for '" + owner + "' on '" + holidayDate + "' " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void clean_pool_requests() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("DELETE FROM JUROR.UNIQUE_POOL WHERE LAST_UPDATE newPoolDate = new ThreadLocal<>(); + private int newCoronerPoolNumber; + + public static String oracleWeeksInFuture(int noWeeks) { + String datePattern = "dd-MMM-yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, noWeeks); + + return new SimpleDateFormat(datePattern).format(date.getTime()); + } + + public void rowsExistIn_WhereNSD(int rowCountExpected, + String environment, String database, String table, + String colA, String colAParameter, + String colB, String colBParameter, + String colC, String colCParameter) throws SQLException { + try { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection(environment); + + if (colAParameter == "NULL") { + pStmt = conn.prepareStatement( + "select 1 from " + database + "." + table + " " + + "where " + + colA + " is NULL and " + + colB + "=? and " + + colC + "=?"); + log.info("select 1 from " + database + "." + table + " " + + "where " + + colA + " is NULL and " + + colB + "=? and " + + colC + "=?"); + pStmt.setString(1, colBParameter); + pStmt.setString(2, colCParameter); + } else { + pStmt = conn.prepareStatement( + "select 1 from " + database + "." + table + " " + + "where " + + colA + "=? and " + + colB + "=? and " + + colC + "=?"); + + pStmt.setString(1, colAParameter); + pStmt.setString(2, colBParameter); + pStmt.setString(3, colCParameter); + } + + ResultSet rs = pStmt.executeQuery(); + int rowCountActual = 0; + while (rs.next()) { + rowCountActual++; + } + Assert.assertEquals("Saw =>" + rowCountActual + "<= when expected =>" + rowCountExpected, rowCountExpected, rowCountActual); + log.info("Saw =>" + rowCountActual + "<= row(s) as expected when checking table =>" + table + "<= with values =>" + colAParameter + "<=, =>" + colBParameter + "<=, =>" + colCParameter); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message: " + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void rowsExistIn_Where(Integer arg1, String arg2, String arg3, String arg4, String arg5, String arg6, + String arg7, String arg8, String arg9, Integer arg10) { + + } + + public void updateJurorPool_toSetColumn_asValueNSD(String part_no, String columnName, String columnValue) throws SQLException { + if (columnValue.contains(" time")) { + columnValue = DateManipulator.processString(columnValue); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + log.info("Going to update the database by setting =>" + columnName + "<= to =>" + columnValue + "<= for =>" + part_no); + try { + pStmt = conn.prepareStatement("update JUROR_MOD.JUROR_POOL set " + columnName + "=? where juror_number=?"); + if (columnValue.contains("-") && columnValue.contains(":")) { + pStmt = conn.prepareStatement("update JUROR_MOD.JUROR_POOL set " + columnName + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where juror_number=?"); + } + pStmt.setString(1, columnValue); + pStmt.setString(2, part_no); + + pStmt.execute(); + conn.commit(); + log.info("Update Successful "); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void updateJuror_JurorPool_toSetColumn_asValueNSD(String part_no, String columnName, String columnValue) throws SQLException { + if (columnValue.contains(" time")) { + columnValue = DateManipulator.processString(columnValue); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + log.info("Going to update the database by setting =>" + columnName + "<= to =>" + columnValue + "<= for =>" + part_no); + try { + pStmt = conn.prepareStatement("update JUROR_MOD.JUROR set " + columnName + "=? where juror_number=?"); + if (columnValue.contains("-") && columnValue.contains(":")) { + pStmt = conn.prepareStatement("update JUROR_MOD.JUROR set " + columnName + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where juror_number=?"); + } + pStmt.setString(1, columnValue); + pStmt.setString(2, part_no); + + pStmt.execute(); + conn.commit(); + log.info("Update Successful "); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void updateJuror_toSetColumn_asValueNSD(String part_no, String columnName, String columnValue) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + log.info("Going to update the database by setting =>" + columnName + "<= to =>" + columnValue + "<= for =>" + part_no); + try { + pStmt = conn.prepareStatement("update JUROR_MOD.JUROR set " + columnName + "=? where juror_number=?"); + pStmt.setString(1, columnValue); + pStmt.setString(2, part_no); + + pStmt.execute(); + conn.commit(); + log.info("Update Successful "); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void updateJurorPool_toInactiveNSD(String part_no) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + log.info("Going to update the database by setting =>" + part_no + " to inactive"); + try { + pStmt = conn.prepareStatement("update JUROR_MOD.JUROR_POOL set IS_ACTIVE = NULL where juror_number=?"); + pStmt.setString(1, part_no); + + pStmt.execute(); + conn.commit(); + log.info("Update Successful "); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void updateJurorUniquePool_toSetAttendanceDateNSD(String pool_no, String columnValue) throws SQLException { + if (columnValue.contains(" time")) { + columnValue = DateManipulator.processString(columnValue); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + log.info("Going to update the database by setting attendance date on juror_mod.pool to =>" + columnValue + "<= for =>" + pool_no); + try { + pStmt = conn.prepareStatement("update JUROR_MOD.POOL set RETURN_DATE =? where pool_no=?"); + if (columnValue.contains("-") && columnValue.contains(":")) { + pStmt = conn.prepareStatement("update JUROR_MOD.POOL set RETURN_DATE =TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where pool_no=?"); + } + pStmt.setString(1, columnValue); + pStmt.setString(2, pool_no); + + pStmt.execute(); + conn.commit(); + log.info("Update Successful "); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + //Danielle update Juror data for dashboard + public void updateJuror_table_toSetColumn_asValueNSD(String part_no, String table, String columnName, String columnValue, String columnNameA, String columnValueA) throws SQLException { + if (columnValue.contains(" time")) { + columnValue = DateManipulator.processString(columnValue); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + +// log.info("Going to update the database by setting =>"+table+"<= . =>"+columnName+"<= to =>"+columnValue+"<= where =>"+columnName1+"<= is =>"+columnValue1+"<= for =>"+part_no); + try { + pStmt = conn.prepareStatement("update JUROR_MOD." + table + " set " + columnName + "='" + columnValue + "' where juror_number='" + part_no + "' and " + columnNameA + "=?"); + pStmt.setString(1, columnValueA); + + if (table.equals("POOL")) { + pStmt = conn.prepareStatement("update JUROR_MOD." + table + " set " + columnName + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where pool_no ='" + columnValueA + "'"); + pStmt.setString(1, columnValue); + + } else if (columnValue.contains("-") && columnValue.contains(":")) { + pStmt = conn.prepareStatement("update JUROR_MOD." + table + " set " + columnName + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where juror_number='" + part_no + "' and " + columnNameA + "=?"); + pStmt.setString(1, columnValue); + pStmt.setString(2, columnValueA); + } + + pStmt.executeQuery(); + log.info("Update Successful "); +// + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //Danielle update Juror Digital data for dashboard + public void updateJurorDigitalNSD(String column, String part_no, String value) throws SQLException { + if (value.contains(" time")) { + value = DateManipulator.processString(value); + } + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("update juror_mod.juror_response set " + column + "=? where juror_number=" + part_no + ""); + pStmt.setString(1, value); + + if (value.contains("-") && value.contains(":")) { + pStmt = conn.prepareStatement("update juror_mod.juror_response set " + column + "=TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where juror_number=" + part_no + ""); + pStmt.setString(1, value); + } else if (column.contains("COMPLETED_AT")) { + pStmt = conn.prepareStatement("update juror_mod.juror_response set " + column + "=TO_TIMESTAMP(?, 'YYYY-MM-DD HH24:MI:SS') where juror_number=" + part_no + ""); + pStmt.setString(1, value); + } + pStmt.executeQuery(); + log.info("Updated juror_response " + column + ""); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + //Danielle enable/disable a Bureau user account + public void enableBureauUserNSD(String username, String login_enabled_yn, String value) throws SQLException { + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("update juror_mod.users set " + login_enabled_yn + "=? where owner='400' and username='" + username + "'"); + pStmt.setString(1, value); + + pStmt.execute(); + log.info("Updated user to enable/disable " + login_enabled_yn + " for user " + username + ""); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void onDatabaseTable_seeColWithColValue_whereColColvalueNSD(String environment, String database, String databaseTable, + String expectedColumn, String expectedColumnValue, String whereColumn, String whereColumnValue) throws SQLException { + + rowsExistIn_Where( + 1, + environment, + database, + databaseTable, + expectedColumn, + expectedColumnValue, + whereColumn, + whereColumnValue, + whereColumn, + Integer.valueOf(whereColumnValue) + ); + } + + public void onDatabaseTable_seeColWithColValue_whereColColvalueNSD(String environment, String database, + String databaseTable, String expectedColumn, String expectedColumnValue, String whereColumn, + String whereColumnValue, String whereColumnB, String whereColumnValueB) throws SQLException { + + rowsExistIn_Where( + 1, + environment, + database, + databaseTable, + expectedColumn, + expectedColumnValue, + whereColumn, + whereColumnValue, + whereColumnB, + Integer.valueOf(whereColumnValueB) + ); + } + + public void requestInfoLetterGenerated(String jurorPartNo) throws SQLException { + + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("select * from juror.request_lett where part_no = '" + jurorPartNo + "'"); + + pStmt.executeQuery(); + log.info("Selected info letter from request_lett for " + jurorPartNo); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + + } + + public void onDatabaseTable_seeColIsNull_whereColColvalueNSD(String environment, String database, String databaseTable, + String expectedNullColumn, String whereColumn, String whereColumnValue) throws SQLException { + + rowsExistIn_Where( + 1, + environment, + database, + databaseTable, + expectedNullColumn, + "NULL", + whereColumn, + whereColumnValue, + whereColumn, + Integer.valueOf(whereColumnValue) + ); + + } + + + public void staffWithName_doesNotExistNSD(String staffName) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + + pStmt = conn.prepareStatement("delete from juror_mod.users where name=?"); + pStmt.setString(1, staffName); + + ResultSet rs = pStmt.executeQuery(); + log.info("Delete all JUROR_MOD.USERS rows where Name =>" + staffName); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + pStmt.close(); + conn.close(); + } + } + + public void clean_juror_pool(String part_no) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror_mod.juror_pool where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_mod.juror_pool where juror_number=>" + part_no); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void clean_juror_digitalNSD(String part_no) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror_mod.juror_response_aud where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_response_aud where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_response_cjs_employment where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_response_cjs_employment where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_reasonable_adjustment where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_reasonable_adjustment where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.STAFF_JUROR_RESPONSE_AUDIT where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from STAFF_JUROR_RESPONSE_AUDIT where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_response where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_response where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.appearance where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Deleted from juror_mod.appearance where juror_number=>" + part_no); +// +// //for locked out scenarios +// pStmt = conn.prepareStatement("delete from juror_digital.bureau_auth where username=?"); +// pStmt.setString(1, part_no); +// pStmt.executeQuery(); +// log.info("Deleted from bureau_auth where username=>" + part_no); +// + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void cleanTestDataNSD(String pool_number, String juror_number) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror_mod.juror_response_aud where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_response_aud where juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_response_cjs_employment where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_response_cjs_employment where juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_reasonable_adjustment where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_reasonable_adjustment where juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.STAFF_JUROR_RESPONSE_AUDIT where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from STAFF_JUROR_RESPONSE_AUDIT where juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_response where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_response where juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_history where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Cleared JUROR_MOD.juror_history for juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.bulk_print_data where juror_no='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Cleared juror_mod.bulk_print_data for part_no=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_audit where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Cleared juror_mod.juror_audit for juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.rev_info where revision_number in (select revision from juror_mod.juror_audit where juror_number='" + juror_number + "')"); + pStmt.execute(); + conn.commit(); + log.info("Cleared juror_mod.rev_info for juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.contact_log where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Cleared juror_mod.contact_log for juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.appearance where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_mod.appearance where juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_pool where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_mod.juror_pool where juror_number=>" + juror_number); + + pStmt = conn.prepareStatement("delete from juror_mod.juror where juror_number='" + juror_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_mod.juror where juror_number=>" + juror_number); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void cleanTestDataPoolNSD(String pool_number, String juror_number) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + + try { + if (getCountFromJurorPoolByPoolNoNSD(pool_number) == 0) + pStmt = conn.prepareStatement("delete from juror_mod.pool where pool_no='" + pool_number + "'"); + pStmt.execute(); + conn.commit(); + log.info("Deleted from juror_mod.pool where juror_number=>" + pool_number); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void createPoolNSD(String court, String noWeeks, String owner, String pool_number) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + + else + conn = db.getConnection("demo"); + + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + String attDate = new SimpleDateFormat("yyyy-MM-d").format(calendar.getTime()); + newPoolDate.set(new SimpleDateFormat("E d MMM yyy").format(calendar.getTime())); + + try { + + if (getCountFromUniquePoolNSD(pool_number) == 0) + pStmt = conn.prepareStatement("INSERT INTO juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, nil_pool, total_no_required, date_created)" + + "VALUES ('" + pool_number + "', '" + owner + "', '" + attDate + "', 20, 'CRO', '" + court + "', 'N', NOW(), NULL, null, false, 0, NOW())"); + pStmt.execute(); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void createJurorsNSD(String pool_number, String juror_number) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('" + juror_number + "','857',null,'lname','fname',null,'address',null,null,'Address Line Four',null,'CH2 2AA',null,null,null,'Y',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number, pool_number, owner, user_edtq, is_active, status, times_sel, def_date, location, no_attendances, no_attended, no_fta, no_awol, pool_seq, edit_tag, next_date, on_call, smart_card, was_deferred, deferral_code, id_checked, postpone, paid_cash, scan_code, last_update, reminder_sent, transfer_date, date_created)" + + " VALUES ('" + juror_number + "', '" + pool_number + "', '400', 'MODTESTBUREAU', true, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0001', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NOW(), NULL, NULL, NOW())"); + pStmt.execute(); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public int getNextIdNSD(String tableName) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + conn = db.getConnection(env_property); + try { + pStmt = conn.prepareStatement("select MAX(id) from " + tableName + ""); + ResultSet rs = pStmt.executeQuery(); + rs.next(); + log.info("Got max ID from " + tableName); + return rs.getInt(1) + 1; + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + pStmt.close(); + conn.close(); + } + return 0; + } + + public int getNextPoolNoNSD(String newPoolNo) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + conn = db.getConnection(env_property); + try { + pStmt = conn.prepareStatement("select MAX(pool_no) from JUROR_MOD.pool where pool_no like '" + newPoolNo + "%'"); + ResultSet rs = pStmt.executeQuery(); + rs.next(); + log.info("Got max pool number plus 1"); + return rs.getInt(1) + 1; + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + pStmt.close(); + conn.close(); + } + return 0; + } + + public void insertCourtroomsNSD(String court) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror_mod.courtroom (owner,room_number,description)" + + "VALUES ('" + court + "','Court','COURT ROOM')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO juror_mod.courtroom (owner,room_number,description)" + + "VALUES ('" + court + "','ChkOut','PARTICIPANT CHECKED OUT')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO juror_mod.courtroom (owner,room_number,description)" + + "VALUES ('" + court + "','Navail','Not Available')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("INSERT INTO juror_mod.courtroom (owner,room_number,description)" + + "VALUES ('" + court + "','Asmbly','JURY ASSEMBLY ROOM')"); + pStmt.execute(); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteCourtroomsNSD(String court) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE from juror_mod.courtroom where owner = '" + court + "'"); + pStmt.execute(); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //Insert an RSUM row in PART_HIST + public void insertRSUMRowNSD(String part_no, String pool_no) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror_mod.juror_history (juror_number,date_created, history_code, user_id, other_information,pool_number)" + + "VALUES ('" + part_no + "', NOW(), 'RSUM', 'CPASS', 'File -JURY081001.0001', '" + pool_no + "')"); + pStmt.execute(); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertRESPRowNSD(String part_no, String pool_no, Integer newId) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror_mod.juror_history (juror_number,date_created, history_code, user_id, other_information,pool_number)" + + "VALUES ('" + part_no + "', NOW(), 'RESP', 'CPASS', 'File -JURY081001.0001', '" + pool_no + "')"); + pStmt.execute(); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertPUNDRowNSD(String part_no, String pool_no, Integer newId) throws SQLException { + + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror_mod.juror_history (juror_number,date_created, history_code, user_id, other_information,pool_number)" + + "VALUES ('" + part_no + "', NOW(), 'PUND', 'CPASS', 'File -JURY081001.0001', '" + pool_no + "')"); + pStmt.execute(); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void clean_dashboardNSD() throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror_digital.stats_auto_processed"); + pStmt.executeQuery(); + log.info("Deleted from juror_stats_auto_processed"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_not_responded"); + pStmt.executeQuery(); + log.info("Deleted from juror_stats_not_responded"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_response_times"); + pStmt.executeQuery(); + log.info("Deleted from juror_stats_response_times"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_thirdparty_online"); + pStmt.executeQuery(); + log.info("Deleted from juror_stats_thirdparty_online"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_unprocessed_responses"); + pStmt.executeQuery(); + log.info("Deleted from juror_stats_unprocessed_responses"); + + pStmt = conn.prepareStatement("delete from juror_digital.stats_welsh_online_responses"); + pStmt.executeQuery(); + log.info("Deleted from juror_stats_welsh_online_responses"); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void clean_jurorTablesPreSetListNSD(String part_no, String pool_no, String owner) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("delete from juror_mod.juror_history where (juror_number=? and history_code !='RSUM') OR (juror_number=? and pool_number!=?)"); + pStmt.setString(1, part_no); + pStmt.setString(2, part_no); + pStmt.setString(3, pool_no); + pStmt.execute(); + log.info("Cleared JUROR_MOD.juror_history for juror_number=>" + part_no + "<= and history_code is not RSUM OR juror_number =>" + part_no + "<= and pool_number NOT =>" + pool_no); + + pStmt = conn.prepareStatement("delete from juror_mod.bulk_print_data where juror_no=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared juror_mod.bulk_print_data for part_no=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.juror_audit where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared juror_mod.juror_audit for juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.rev_info where revision_number in (select revision from juror_mod.juror_audit where juror_number=?)"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared juror_mod.rev_info for juror_number=>" + part_no); + + pStmt = conn.prepareStatement("delete from juror_mod.contact_log where juror_number=?"); + pStmt.setString(1, part_no); + pStmt.execute(); + log.info("Cleared juror_mod.contact_log for juror_number=>" + part_no + ""); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void clean_jurorNSD(String part_no, String pool_no, String owner) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + if (getCountFromJurorPoolNSD(part_no, pool_no) > 1) + pStmt = conn.prepareStatement("delete from juror_mod.juror_pool where" + + " juror_number = '" + part_no + "'" + + " and " + + " is_active is not true"); + + pStmt.execute(); + conn.commit(); + + if (getCountFromJurorPoolNSD(part_no, pool_no) == 0) + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number, pool_number, owner, user_edtq, is_active, status, times_sel, def_date, location, no_attendances, no_attended, no_fta, no_awol, pool_seq, edit_tag, next_date, on_call, smart_card, was_deferred, deferral_code, id_checked, postpone, paid_cash, scan_code, last_update, reminder_sent, transfer_date, date_created)" + + " VALUES ('" + part_no + "', '" + pool_no + "', '400', 'MODTESTBUREAU', true, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0001', NULL, '2024-03-19', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-01-09 11:25:00.791', NULL, NULL, '2024-01-09 11:25:00.791')"); + + pStmt.execute(); + conn.commit(); + + if (checkForTransferredPoolRecordsNSD(part_no) > 1) + pStmt = conn.prepareStatement("delete from juror_mod.juror_pool where" + + " juror_number = '" + part_no + "'" + + " and " + + " transfer_date is null"); + + pStmt.execute(); + conn.commit(); + + try { + + pStmt = conn.prepareStatement("update juror_mod.juror set" + + " responded=false, " + + " title = NULL," + + " dob = NULL," + + " ADDRESS_LINE_3 = NULL," + + " ADDRESS_LINE_4 = 'London'," + + " ADDRESS_LINE_5 = NULL," + + " H_PHONE = NULL," + + " W_PHONE = NULL," + + " W_PH_LOCAL = NULL," + + " EXCUSAL_CODE = NULL," + + " DATE_EXCUSED = NULL," + + " DATE_DISQ = NULL," + + " DISQ_CODE = NULL," + + " ACC_EXC = NULL," + + " NO_DEF_POS = NULL," + + " USER_EDTQ = NULL," + + " NOTES = NULL," + + " WELSH = NULL," + + " POLICE_CHECK = NULL," + + " M_PHONE = NULL," + + " H_EMAIL = NULL," + + " CONTACT_PREFERENCE = NULL," + + " OPTIC_REFERENCE = NULL," + + " NOTIFICATIONS ='0'" + + " where " + + " juror_number = '" + part_no + "'"); + + pStmt.execute(); + + log.info("Cleaned up juror table where juror_number=>" + part_no); + + pStmt = conn.prepareStatement("update juror_mod.juror_pool set" + + " status='1', " + + " TIMES_SEL = NULL," + + " DEF_DATE = NULL," + + " USER_EDTQ = NULL," + + " OWNER = '400'," + + " ON_CALL = NULL," + + " POOL_NUMBER = '" + pool_no + "'," + + " TRANSFER_DATE = NULL," + + " IS_ACTIVE =true" + + " where " + + " juror_number = '" + part_no + "'"); + + pStmt.execute(); + + pStmt = conn.prepareStatement("update juror_mod.pool set" + + " OWNER = '400'" + + " where " + + " pool_no = '" + pool_no + "'"); + + pStmt.execute(); + + log.info("Cleaned up juror_pool table where juror_number=>" + part_no); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void resetPooltoPendingAllocationNSD(String pool_no) throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_mod.juror_response set" + + " staff_login = NULL," + + " staff_assignment_date = NULL " + + " where processing_status='TODO' and juror_number in " + + "( " + + "select juror_number from juror_mod.juror_pool where " + + " juror_number = ?" + + ")" + ); + + pStmt.setString(1, pool_no); + + pStmt.execute(); + log.info("Reset to PENDING ALLOCATION where pool_no=>" + pool_no); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void straightThroughDisabledNSD() throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_digital.app_settings set value='TRUE' where setting in (" + + "'STRAIGHT_THROUGH_ACCEPTANCE_DISABLED', " + + "'STRAIGHT_THROUGH_AGE_EXCUSAL_DISABLED'," + + "'STRAIGHT_THROUGH_DECEASED_EXCUSAL_DISABLED')"); + pStmt.execute(); + log.info("Updated app_settings to disable straight_through"); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void straightThroughEnabledNSD() throws SQLException { + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_digital.app_settings set value='FALSE' where setting in (" + + "'STRAIGHT_THROUGH_ACCEPTANCE_DISABLED', " + + "'STRAIGHT_THROUGH_AGE_EXCUSAL_DISABLED'," + + "'STRAIGHT_THROUGH_DECEASED_EXCUSAL_DISABLED')"); + pStmt.execute(); + log.info("Updated app_settings to enable straight_through"); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + log.info(11); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void dateReceviedFor_setTo_workingDaysBeforeCurrentNSD(String part_no, Integer workingDays) throws SQLException { + String dateToUpdateTo = DateManipulator.addWorkingDaysToCurrentDate(-workingDays); + db = new DBConnection(); + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + try { + pStmt = conn.prepareStatement("update juror_mod.juror_response set date_received = TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS') where juror_number=?"); + pStmt.setString(1, dateToUpdateTo); + pStmt.setString(2, part_no); + pStmt.execute(); + log.info("Updated juror_response to change response date to 2 days ago"); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void resetUserNSD(String username) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("update juror_mod.users set password_changed_date=NOW() where username=?"); + pStmt.setString(1, username); + pStmt.executeQuery(); + log.info("Updated password changed date for =>" + username + "<= to let us login"); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + + } + + public void resetJurorDigitalDatabase() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Delete from juror_digital.change_log_item Where change_log in (select c.id from juror_digital.change_log c, juror_digital.juror_response r where c.juror_number = r.juror_number and processing_status = 'TODO')"); + pStmt.executeQuery(); + + pStmt = conn.prepareStatement("Delete from juror_digital.change_log Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.executeQuery(); + + pStmt = conn.prepareStatement("Delete from juror_digital.staff_juror_response_audit Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.executeQuery(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response_aud Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.executeQuery(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response_cjs_employment Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.executeQuery(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response_special_needs Where juror_number in (select juror_number from juror_digital.juror_response where processing_status = 'TODO')"); + pStmt.executeQuery(); + + pStmt = conn.prepareStatement("Delete from juror_digital.juror_response Where processing_status = 'TODO'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void usernameHasCourt_setAsNSD(String username, int courtPosition, String courtRoom) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + String courtColumnName = "COURT_" + courtPosition; + try { + pStmt = conn.prepareStatement("update juror_digital.staff set " + courtColumnName + "=? where login=?"); + pStmt.setString(1, courtRoom); + pStmt.setString(2, username); + pStmt.executeQuery(); + log.info("Set " + courtColumnName + " to =>" + courtRoom + "<= for user =>" + username); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteTeam() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Delete from juror_digital.staff where login='TeamPickListUser'"); + pStmt.executeQuery(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewPoolRequestsNSD() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Delete from juror_mod.pool where new_request='T' and pool_no not in (select pool_number from juror_mod.juror_pool)"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertConfLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO juror.confirm_lett (owner, part_no, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', null, null)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted conf letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteConfLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.confirm_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted conf letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertDeferralLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String def_date = System.getProperty("POOL.DEF_DATE"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.def_lett (owner, part_no, date_def, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + def_date + "', '" + exc_code + "', null, null)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted def letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteDeferralLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.def_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted def letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertExcusalLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String exc_date = System.getProperty("POOL.DATE_EXCUS"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.exc_lett (owner, part_no, date_exc, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + exc_date + "', '" + exc_code + "', null, null)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted exc letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteExcusalLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.exc_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted exc letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertPostponementLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String date = System.getProperty("POOL.LAST_UPDATE"); + pStmt = conn.prepareStatement("INSERT INTO juror.postpone_lett (owner, part_no, date_postpone, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + date + "', null, null)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted postpone letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deletePostponementLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.postpone_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted postpone letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertDefDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String def_date = System.getProperty("POOL.DATE_DEF"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.def_denied (owner, part_no, date_def, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + def_date + "', '" + exc_code + "' null, null)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted def denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteDefDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.def_denied WHERE PART_NO = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted def_denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertExcDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String exc_date = System.getProperty("POOL.DATE_EXCUS"); + String exc_code = System.getProperty("POOL.EXC_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.exc_denied_lett (owner, part_no, date_excused, exc_code, printed, date_printed)" + + "VALUES ('400', '" + part_no + "', '" + exc_date + "', '" + exc_code + "' null, null)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted exc denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteExcDeniedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.exc_denied_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted exc_denied letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertDisqualifiedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String disq_date = System.getProperty("POOL.DATE_DISQ"); + String disq_code = System.getProperty("POOL.DISQ_CODE"); + pStmt = conn.prepareStatement("INSERT INTO juror.disq_lett (owner, part_no, disq_code, disq_date, date_printed, printed)" + + "VALUES ('400', '" + part_no + "', '" + disq_code + "', '" + disq_date + "' null, null)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted disqualifed letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteDisqualifiedLettRow(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.disq_lett WHERE PART_NO = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted disqualified letter" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewRecordsForPartNoNSD(String partNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_pool WHERE juror_number = '" + partNo + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_history WHERE juror_number = '" + partNo + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror WHERE juror_number = '" + partNo + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_response WHERE juror_number = '" + partNo + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new records for juror '" + partNo + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewPoolNSD(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_pool WHERE juror_number in (select juror_number from juror_mod.juror_pool where pool_number in ('" + court + "111111', '" + court + "222222', '" + court + "333333', '" + court + "444444', '" + court + "999999'))"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.contact_log WHERE juror_number in ('6" + court + "11111', '6" + court + "22222', '6" + court + "33333', '6" + court + "44444','6" + court + "99999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_history WHERE juror_number in ('6" + court + "11111', '6" + court + "22222', '6" + court + "33333', '6" + court + "44444','6" + court + "99999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror WHERE juror_number in ('6" + court + "11111', '6" + court + "22222', '6" + court + "33333', '6" + court + "44444','6" + court + "99999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.pool WHERE pool_no in ('" + court + "111111', '" + court + "222222', '" + court + "333333', '" + court + "444444','" + court + "999999')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_response WHERE juror_number in (select juror_number from juror_mod.pool where pool_no in ('" + court + "111111', '" + court + "222222', '" + court + "33333', '" + court + "444444','" + court + "999999'))"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new pool for court '" + court + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewPoolMultiStatusNSD(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_pool WHERE juror_number in (select juror_number from juror_mod.juror_pool where pool_number in ('" + court + "911911'))"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.contact_log WHERE juror_number in ('6" + court + "91101', '6" + court + "91102', '6" + court + "91103', '6" + court + "91104','6" + court + "91105','6" + court + "91106','6" + court + "91107','6" + court + "91108','6" + court + "91109','6" + court + "91110','6" + court + "91111','6" + court + "91112','6" + court + "91113')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_history WHERE juror_number in ('6" + court + "91101', '6" + court + "91102', '6" + court + "91103', '6" + court + "91104','6" + court + "91105','6" + court + "91106','6" + court + "91107','6" + court + "91108','6" + court + "91109','6" + court + "91110','6" + court + "91111','6" + court + "91112','6" + court + "91113')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror WHERE juror_number in ('6" + court + "91101', '6" + court + "91102', '6" + court + "91103', '6" + court + "91104','6" + court + "91105','6" + court + "91106','6" + court + "91107','6" + court + "91108','6" + court + "91109','6" + court + "91110','6" + court + "91111','6" + court + "91112','6" + court + "91113')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.pool WHERE pool_no in ('" + court + "911911')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new pool for court '" + court + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + + public void deletePoolNumberNSD(String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror WHERE juror_number in (select juror_number from juror_mod.juror_pool where pool_no in ('" + poolNumber + "'))"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.juror_pool WHERE pool_number in ('" + poolNumber + "')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM juror_mod.pool WHERE pool_no in ('" + poolNumber + "')"); + pStmt.execute(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted pool deleted -- '" + poolNumber + " --- " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + //osman testing + public void deleteRequestLett(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.request_lett WHERE part_no in (select part_no from juror.pool where pool_no in ('" + court + "999999', '" + court + "222222', '" + court + "333333'))"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted request lett for court '" + court + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteRequestLettForPartNo(String part_no) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("DELETE FROM juror.request_lett WHERE part_no = '" + part_no + "'"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted request lett for part_no '" + part_no + "' + e.getMessage()"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deletePaperResponsesNSD() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.juror_response_cjs_employment"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.juror_response_aud"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.juror_reasonable_adjustment"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.STAFF_JUROR_RESPONSE_AUDIT"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.JUROR_RESPONSE"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted paper replies"); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public String getTodaysDateEEEddMMMyyyyNSD() { + String datePattern = "EEE d MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + return new SimpleDateFormat(datePattern).format((calendar).getTime()); + } + + public void insertNewPoolWithDeferralNSD(String court, String noWeeks) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String datePattern = "YYYY-MM-DD"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + pStmt = conn.prepareStatement("Insert into juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, total_no_required, date_created)" + + "values ('" + court + "111111','" + court + "','" + localDate + "','5','CRO','" + court + "','T',NOW(),null,TIMESTAMP'2022-04-01 09:30:00.0','5',NOW())"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('6" + court + "11111','857',null,'lname','fname',null,'address',null,null,null,null,'CH2 2AA',null,null,null,'Y',null,null,null,null,null,null,null,'1',null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number,pool_number,owner,user_edtq,is_active,status,times_sel,def_date,location,no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,was_deferred,deferral_code,id_checked,postpone,paid_cash,scan_code,last_update,reminder_sent,transfer_date,date_created)" + + "values ('6" + court + "11111','" + court + "111111','" + court + "',null,'Y','7',null,'" + localDate + "','415','0',null,null,null,null,null,'" + localDate + "',null,null,'Y','O',null,null,null,null,CURRENT_DATE,null,null,CURRENT_DATE)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertCourtPoolWithDeferralNSD(String court, String pool_no, String part_no, String no_weeks) throws SQLException { + db = new DBConnection(); + + String datePattern = "YYYY-MM-DD"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(no_weeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + if (getCountFromUniquePoolNSD(pool_no) == 0) + pStmt = conn.prepareStatement("Insert into juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, total_no_required, date_created)" + + "values ('" + pool_no + "','" + court + "','" + mondayDate + "','5','CRO','" + court + "','T',NOW(),null,TIMESTAMP'2022-04-01 09:30:00.0','5',NOW())"); + pStmt.execute(); + + if (getCountFromPoolNSD(part_no, pool_no) == 0) + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,COMPLETION_DATE,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('" + part_no + "','857',null,'lname','fname',null,'address',null,null,null,null,'CH1 2NN',null,null,null,'Y',null,null,null,null,null,null,null,'1',null,null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + if (getCountFromJurorPoolNSD(part_no, pool_no) == 0) + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number,pool_number,owner,user_edtq,is_active,status,times_sel,def_date,mileage,location,no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,amt_spent,was_deferred,deferral_code,id_checked,postpone,paid_cash,travel_time,scan_code,financial_loss,last_update,reminder_sent,transfer_date,date_created)" + + "values ('" + part_no + "','" + pool_no + "','" + court + "',null,true,'2',null,CURRENT_DATE-10,null,'" + court + "','0',null,null,null,null,null,CURRENT_DATE-10,'N',null,null,'Y','O',null,null,null,null,null,null,CURRENT_DATE,null,null,CURRENT_DATE)"); + pStmt.execute(); + + try { + + pStmt = conn.prepareStatement("update juror_mod.pool set OWNER='" + court + "' where pool_no ='" + pool_no + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("update juror_mod.juror_pool set TRANSFER_DATE=current_date, IS_ACTIVE='Y', OWNER='" + court + "', NEXT_DATE='" + mondayDate + "',STATUS='7',WAS_DEFERRED='Y', DEFERRAL_CODE='O', DEF_DATE='" + mondayDate + "', pool_number='" + pool_no + "' where juror_number='" + part_no + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("update juror_mod.juror set RESPONDED='Y', NO_DEF_POS='1' where juror_number='" + part_no + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void clearDeferralsForWeeksAndCourtNSD(int noWeeks, String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + int numberOfDays = noWeeks * 7; + + pStmt = conn.prepareStatement("update juror_mod.juror_pool set status='2' where is_active='Y' and status='7' and owner= '" + court + "' and def_date =CURRENT_DATE+" + numberOfDays); + pStmt.execute(); + + System.out.println("Deferrals deleted for date falling in " + noWeeks + "weeks - for court -" + court); + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted deferrals" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertCourtPoolWithDeferralExistingJurorNSD(String court, String pool_no, String part_no, String no_weeks, String loc_code) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String datePattern = "YYYY-MM-DD"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(no_weeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate)); + + pStmt = conn.prepareStatement("update juror_mod.juror_pool set OWNER='" + court + "', NEXT_DATE='" + mondayDate + "',STATUS='7',WAS_DEFERRED='Y', DEFERRAL_CODE='O', DEF_DATE='" + mondayDate + "' where juror_number='" + part_no + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("update juror_mod.juror set RESPONDED='Y', NO_DEF_POS='1' where juror_number='" + part_no + "'"); + pStmt.execute(); + + System.out.println("Deferral entered for -" + expectedDate + "- for juror -" + part_no + "- into pool -" + pool_no + "- and the owner is -" + court + "- loc_code -" + loc_code); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolCompletedPoolNSD(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("Insert into juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, total_no_required, date_created)" + + "values ('" + court + "111111','" + court + "',CURRENT_DATE-10,'5','CRO','" + court + "','N',NOW(),null,TIMESTAMP'2022-04-01 09:30:00.0','5',NOW())"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('6" + court + "11111','857',null,'lname','fname',null,'address',null,null,null,null,'CH1 2NN',null,null,null,'Y',null,null,null,null,null,null,null,'1',null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number,pool_number,owner,user_edtq,is_active,status,times_sel,def_date,location,no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,was_deferred,deferral_code,id_checked,postpone,paid_cash,scan_code,last_update,reminder_sent,transfer_date,date_created)" + + "values ('6" + court + "11111','" + court + "111111','" + court + "',null,true,'13',null,CURRENT_DATE-10,'" + court + "','0',null,null,null,null,null,CURRENT_DATE-10,'N',null,'Y','O',null,null,null,null,CURRENT_DATE,null,null,CURRENT_DATE)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertJurorWithDeferralIntoPoolNSD(String poolNo, String court, String noWeeks, String jurorPartNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + String datePattern = "YYYY-MM-DD"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + +// #insert the pool, juror_pool and juror rows + pStmt = conn.prepareStatement("Insert into juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, total_no_required, date_created)" + + "values ('" + poolNo + "','" + court + "','" + expectedDate + "','5','CRO','" + court + "','T',NOW(),null,TIMESTAMP'2022-04-01 09:30:00.0','5',NOW())"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('" + jurorPartNo + "','857',null,'lname','fname',null,'address',null,null,null,null,'CH1 2NN',null,null,null,'Y',null,null,null,null,null,null,null,'1',null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number,pool_number,owner,user_edtq,is_active,status,times_sel,def_date,mileage,location,no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,amt_spent,was_deferred,deferral_code,id_checked,postpone,paid_cash,travel_time,scan_code,financial_loss,last_update,reminder_sent,transfer_date,date_created)" + + "values ('" + jurorPartNo + "','" + poolNo + "','" + court + "',null,'Y','2',null,'" + expectedDate + "',null,'415','0',null,null,null,null,'N',null,null,null,null,'Y','O',null,null,null,null,null,null,CURRENT_DATE,null,null,CURRENT_DATE)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolTransferredToCourt(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER,POOL_NO,JURISDICTION_CODE,RETURN_DATE,NEXT_DATE,NO_REQUESTED,POOL_TOTAL,REG_SPC,POOL_TYPE,LOC_CODE,NEW_REQUEST,LAST_UPDATE,READ_ONLY,DEFERRALS_USED,ADDITIONAL_SUMMONS,ATTEND_TIME)" + + "VALUES ('" + court + "','" + court + "333333',null,(SELECT SYSDATE FROM DUAL),(SELECT SYSDATE FROM DUAL),10,10,'R','CRO','" + court + "','N',(SELECT SYSDATE FROM DUAL),'N',null,null,(SELECT SYSDATE FROM DUAL))"); + pStmt.executeQuery(); + +// #insert the pool rows +// #bureau row + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_LINE_4, POSTCODE, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, read_only, contact_preference, reg_spc, ret_date, status, transfer_date)" + + "VALUES ('6" + court + "33333', 'Edward', 'Palmer', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "333333', 'N', 'Y', 0, 'N', (SELECT SYSDATE FROM DUAL), 1, (SELECT SYSDATE FROM DUAL))"); + pStmt.executeQuery(); + +// #court row + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_LINE_4, POSTCODE, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('6" + court + "33333', 'Edward', 'Palmer', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '" + court + "', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "333333', 'N', 'N', 0, 'N', (SELECT SYSDATE FROM DUAL), 1)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolTransferredToCourtNewNSD(String court, String partNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("UPDATE JUROR_MOD.JUROR_POOL SET NEXT_DATE=CURRENT_DATE, TRANSFER_DATE = CURRENT_DATE-1, OWNER='" + court + "' WHERE POOL_NUMBER = '" + poolNumber + "' AND JUROR_NUMBER='" + partNumber + "' AND OWNER = '400'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("UPDATE JUROR_MOD.POOL SET OWNER='" + court + "' WHERE POOL_NO = '" + poolNumber + "' AND OWNER = '400'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolRecord(String court, String newPartNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_LINE_4, POSTCODE, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + newPartNo + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "222222', 'N', 'N', 0, 'N', (SELECT SYSDATE FROM DUAL), 1)"); + pStmt.executeQuery(); + + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolNSD(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("Insert into juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, total_no_required, date_created)" + + "values ('" + court + "222222','" + court + "',CURRENT_DATE+10,'5','CRO','" + court + "','N',NOW(),null,TIMESTAMP'2022-04-01 09:30:00.0','5',NOW())"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('6" + court + "22222','857',null,'lname','fname',null,'address',null,null,null,null,'CH1 2NN',null,null,null,'N',null,null,null,null,null,null,null,'0',null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number,pool_number,owner,user_edtq,is_active,status,times_sel,def_date,mileage,location,no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,amt_spent,was_deferred,deferral_code,id_checked,postpone,paid_cash,travel_time,scan_code,financial_loss,last_update,reminder_sent,transfer_date,date_created)" + + "values ('6" + court + "22222','" + court + "222222','" + court + "',null,'Y','2',null,null,null,'" + court + "','0',null,null,null,null,null,CURRENT_DATE+10,null,'N',null,'N',null,null,null,null,null,null,null,CURRENT_DATE,null,null,CURRENT_DATE)"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewJurorIntoPoolNSD(String court, String jurorNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_LINE_4, POSTCODE, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('" + jurorNumber + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + poolNumber + "', 'N', 'N', 0, 'N', (SELECT SYSDATE FROM DUAL), 1)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into pool " + poolNumber + " " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewJurorIntoPoolValidForDigitalReply(String court, String jurorNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_LINE_4, POSTCODE, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, read_only, contact_preference, reg_spc, ret_date, status, next_date)" + + "VALUES ('" + jurorNumber + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + poolNumber + "', 'N', 'N', 0, 'N', SYSDATE+60, 1, TRUNC(SYSDATE + (8 - TO_NUMBER(TO_CHAR(SYSDATE, 'D'))) + 56))"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into pool " + poolNumber + " " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewJurorIntoPoolWithOwnerSameAsCourt(String court, String jurorNumber, String poolNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_LINE_4, POSTCODE, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, read_only, contact_preference, reg_spc, ret_date, status, next_date)" + + "VALUES ('" + jurorNumber + "', 'Fname', 'Lname', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '" + court + "', '" + court + "', '44776-301-1110', 'N', 1000,'" + poolNumber + "', 'N', 'N', 0, 'N', SYSDATE+60, 1, TRUNC(SYSDATE + (8 - TO_NUMBER(TO_CHAR(SYSDATE, 'D'))) + 56))"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into pool " + poolNumber + " " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPoolRequestLetter(String court) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("INSERT INTO JUROR.UNIQUE_POOL (OWNER,POOL_NO,JURISDICTION_CODE,RETURN_DATE,NEXT_DATE,NO_REQUESTED,POOL_TOTAL,REG_SPC,POOL_TYPE,LOC_CODE,NEW_REQUEST,LAST_UPDATE,READ_ONLY,DEFERRALS_USED,ADDITIONAL_SUMMONS,ATTEND_TIME)" + + "VALUES ('" + court + "','" + court + "999999',null,(SELECT SYSDATE FROM DUAL),(SELECT SYSDATE FROM DUAL),10,10,'R','CRO','" + court + "','N',(SELECT SYSDATE FROM DUAL),'N',null,null,(SELECT SYSDATE FROM DUAL))"); + pStmt.executeQuery(); + +// #insert the pool rows + pStmt = conn.prepareStatement("INSERT INTO JUROR.POOL (part_no, fname, lname, h_email, title, dob, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_LINE_4, POSTCODE, h_phone, w_phone, is_active, owner, loc_code, m_phone, responded, poll_number, pool_no, on_call, read_only, contact_preference, reg_spc, ret_date, status)" + + "VALUES ('6" + court + "99999', 'Edward', 'Palmer', 'email-one@email.com', 'Mr', TO_DATE('1976-07-18 00:00:01', 'YYYY-MM-DD HH24:MI:SS'), '1 Test Street', 'Scotland', 'Strathaven', 'United Kingdom', 'ML106AD', '44135101-1110', '44135201-1110', 'Y', '400', '" + court + "', '44776-301-1110', 'N', 1000,'" + court + "222222', 'N', 'N', 0, 'N', (SELECT SYSDATE FROM DUAL), 1)"); + pStmt.executeQuery(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new pool" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewPaperSummonsReplyNSD(String newJurorRecordNumber, String poolNo) throws SQLException { + insertNewPaperSummonsReplyWithResponseNameNSD(newJurorRecordNumber, "Andy", "Marshall", poolNo); + } + + public void insertNewPaperSummonsReplyWithResponseNameNSD(String newJurorRecordNumber, String firstName, String lastName, String poolNo) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Insert into juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, total_no_required, date_created)" + + "values ('" + poolNo + "','400',CURRENT_DATE+112,'5','CRO','415','N',NOW(),null,TIMESTAMP'2022-04-01 09:30:00.0','5',NOW())"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('" + newJurorRecordNumber + "','857',null,'lname','fname',null,'address',null,null,null,null,'CH1 2NN',null,null,null,'N',null,null,null,null,null,null,null,'1',null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number,pool_number,owner,user_edtq,is_active,status,times_sel,def_date,mileage,location,no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,amt_spent,was_deferred,deferral_code,id_checked,postpone,paid_cash,travel_time,scan_code,financial_loss,last_update,reminder_sent,transfer_date,date_created)" + + "values ('" + newJurorRecordNumber + "','" + poolNo + "','400',null,'Y','7',null,CURRENT_DATE,null,'415','0',null,null,null,null,null,CURRENT_DATE,null,null,null,'Y','O',null,null,null,null,null,null,CURRENT_DATE,null,null,CURRENT_DATE)"); + pStmt.execute(); + + // Insert the Response into JUROR_MOD.JUROR_RESPONSE + pStmt = conn.prepareStatement("INSERT INTO JUROR_mod.JUROR_RESPONSE (JUROR_NUMBER,DATE_RECEIVED,TITLE,FIRST_NAME,LAST_NAME,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,PROCESSING_STATUS,DATE_OF_BIRTH,PHONE_NUMBER,ALT_PHONE_NUMBER,EMAIL,RESIDENCY,RESIDENCY_DETAIL,MENTAL_HEALTH_ACT,MENTAL_HEALTH_CAPACITY,MENTAL_HEALTH_ACT_DETAILS,BAIL,BAIL_DETAILS,CONVICTIONS,CONVICTIONS_DETAILS,DEFERRAL,DEFERRAL_REASON,DEFERRAL_DATE,REASONABLE_ADJUSTMENTS_ARRANGEMENTS,EXCUSAL,EXCUSAL_REASON,PROCESSING_COMPLETE,SIGNED,version,THIRDPARTY_FNAME,THIRDPARTY_LNAME,RELATIONSHIP,MAIN_PHONE,OTHER_PHONE,EMAIL_ADDRESS,THIRDPARTY_REASON,THIRDPARTY_OTHER_REASON,JUROR_PHONE_DETAILS,JUROR_EMAIL_DETAILS,STAFF_LOGIN,STAFF_ASSIGNMENT_DATE,URGENT,SUPER_URGENT,COMPLETED_AT,WELSH,REPLY_TYPE)" + + "VALUES ('" + newJurorRecordNumber + "',CURRENT_DATE-1,'Mr','" + firstName + "','" + lastName + "','7 Poppy Square','New Theo','','','','W1 1AB','TODO',CURRENT_DATE-10000,null,null,null,'Y',null,'N','N',NULL,'N',null,'N',null,null,null,null,null,null,null,'N','N','0',null,null,null,null,null,null,null,null,null,null,'MODTESTBUREAU',null,'N','N',null,'N','Paper')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into Juror.Pool and new paper response into Juror_Digital.Paper_Response" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertNewSummonsReplyNSD(String newJurorRecordNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + pStmt = conn.prepareStatement("Insert into juror_mod.pool (pool_no, owner, return_date, no_requested, pool_type, loc_code, new_request, last_update, additional_summons, attend_time, total_no_required, date_created)" + + "values ('415230501','400',CURRENT_DATE+112,'5','CRO','415','N',NOW(),null,TIMESTAMP'2022-04-01 09:30:00.0','5',NOW())"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror (juror_number,poll_number,title,last_name,first_name,dob,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,h_phone,w_phone,w_ph_local,responded,date_excused,excusal_code,acc_exc,date_disq,disq_code,user_edtq,notes,no_def_pos,perm_disqual,reasonable_adj_code,reasonable_adj_msg,smart_card,sort_code,bank_acct_name,bank_acct_no,bldg_soc_roll_no,welsh,police_check,last_update,summons_file,m_phone,h_email,contact_preference,notifications,date_created,optic_reference,pending_title,pending_first_name,pending_last_name)" + + "values ('" + newJurorRecordNumber + "','857',null,'lname','fname',null,'address',null,null,null,null,null,'CH1 2NN',null,null,'N',null,null,null,null,null,null,null,'1',null,null,null,null,null,null,null,null,'N',null,null,null,null,null,null,'0',null,null,null,null,null)"); + pStmt.execute(); + + pStmt = conn.prepareStatement("insert into juror_mod.juror_pool (juror_number,pool_number,owner,user_edtq,is_active,status,times_sel,def_date,mileage,location,no_attendances,no_attended,no_fta,no_awol,pool_seq,edit_tag,next_date,on_call,smart_card,amt_spent,was_deferred,deferral_code,id_checked,postpone,paid_cash,travel_time,scan_code,financial_loss,last_update,reminder_sent,transfer_date,date_created)" + + "values ('" + newJurorRecordNumber + "','415230501','400',null,'Y','7',null,CURRENT_DATE,null,'415','0',null,null,null,null,null,CURRENT_DATE,null,null,null,'Y','O',null,null,null,null,null,null,CURRENT_DATE,null,null,CURRENT_DATE)"); + pStmt.execute(); + + // Insert the Response into JUROR_MOD.JUROR_RESPONSE + pStmt = conn.prepareStatement("INSERT INTO JUROR_mod.JUROR_RESPONSE (JUROR_NUMBER,DATE_RECEIVED,TITLE,FIRST_NAME,LAST_NAME,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,ADDRESS_LINE_4,ADDRESS_LINE_5,POSTCODE,PROCESSING_STATUS,DATE_OF_BIRTH,PHONE_NUMBER,ALT_PHONE_NUMBER,EMAIL,RESIDENCY,RESIDENCY_DETAIL,MENTAL_HEALTH_ACT,MENTAL_HEALTH_CAPACITY,MENTAL_HEALTH_ACT_DETAILS,BAIL,BAIL_DETAILS,CONVICTIONS,CONVICTIONS_DETAILS,DEFERRAL,DEFERRAL_REASON,DEFERRAL_DATE,REASONABLE_ADJUSTMENTS_ARRANGEMENTS,EXCUSAL,EXCUSAL_REASON,PROCESSING_COMPLETE,SIGNED,version,THIRDPARTY_FNAME,THIRDPARTY_LNAME,RELATIONSHIP,MAIN_PHONE,OTHER_PHONE,EMAIL_ADDRESS_LINE_1,THIRDPARTY_REASON,THIRDPARTY_OTHER_REASON,JUROR_PHONE_DETAILS,JUROR_EMAIL_DETAILS,STAFF_LOGIN,STAFF_ASSIGNMENT_DATE,URGENT,SUPER_URGENT,COMPLETED_AT,WELSH,REPLY_TYPE)" + + "VALUES ('" + newJurorRecordNumber + "',CURRENT_DATE-1,'Mr','Fname','Lname','7 Poppy Square','New Theo','','','','W1 1AB','TODO',CURRENT_DATE-10000,null,null,null,'Y',null,'N','N',NULL,'N',null,'N',null,null,null,null,null,null,null,'N','N','0',null,null,null,null,null,null,null,null,null,null,'MODTESTBUREAU',null,'N','N',null,'N','Digital')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted new juror into Juror.Pool and new paper response into Juror_Digital.Juror_Response" + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteNewPaperSummonsReplyNSD(String createdJurorRecordNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.JUROR_POOL WHERE JUROR_NUMBER = '" + createdJurorRecordNumber + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.POOL WHERE POOL_NO IN (SELECT POOL_NO FROM JUROR_MOD.JUROR_POOL WHERE JUROR_NUMBER = '" + createdJurorRecordNumber + "')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.JUROR WHERE JUROR_NUMBER = '" + createdJurorRecordNumber + "'"); + pStmt.execute(); + + //Delete the specified paper response from Juror_Digital.Paper_Response + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.JUROR_RESPONSE WHERE JUROR_NUMBER = '" + createdJurorRecordNumber + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new juror and juror_response records with the juror_number of " + createdJurorRecordNumber + " respectively - " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void deleteTestPoolAndJurorsNSD(String poolRequestNumber) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.JUROR WHERE JUROR_NUMBER IN (SELECT JUROR_NUMBER FROM JUROR_MOD.POOL WHERE POOL_NO = '" + poolRequestNumber + "')"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.JUROR_POOL WHERE POOL_NUMBER = '" + poolRequestNumber + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.POOL WHERE POOL_NO = '" + poolRequestNumber + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.JUROR_HISTORY WHERE POOL_NUMBER = '" + poolRequestNumber + "'"); + pStmt.execute(); + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.POOL_HISTORY WHERE POOL_NO = '" + poolRequestNumber + "'"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:deleted new juror.unique_pool, juror.pool and juror.pool_hist records with the pool_no " + poolRequestNumber + " respectively - " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + + public void insertHolidayInTheFutureNSD(Integer noOfWeeks, String owner) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + String datePattern = "YYYY-MM-DD"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + holidayDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + holidayOwner = owner; + + try { + + pStmt = conn.prepareStatement("INSERT INTO JUROR_MOD.HOLIDAY(OWNER,HOLIDAY,DESCRIPTION,PUBLIC)" + + "VALUES ('" + owner + "','" + mondayDate + "','Test holiday', 'N')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted bank holiday for '" + owner + "' on '" + mondayDate + "' " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void insertHolidayMondayInTheFutureNSD(Integer noOfWeeks, String owner) throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + String datePattern = "YYYY-MM-DD"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + holidayDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + holidayOwner = owner; + + try { + + pStmt = conn.prepareStatement("INSERT INTO JUROR_MOD.HOLIDAY(OWNER,HOLIDAY,DESCRIPTION,PUBLIC)" + + "VALUES ('" + owner + "','" + localDateMonday + "','Test holiday', 'N')"); + pStmt.execute(); + + } catch (SQLException e) { + e.printStackTrace(); + log.error("Message:inserted bank holiday for '" + owner + "' on '" + holidayDate + "' " + e.getMessage()); + } finally { + conn.commit(); + pStmt.close(); + conn.close(); + } + } + + public void clean_pool_requestsNSD() throws SQLException { + db = new DBConnection(); + + String env_property = System.getProperty("env.database"); + + if (env_property != null) + conn = db.getConnection(env_property); + else + conn = db.getConnection("demo"); + + try { + + pStmt = conn.prepareStatement("DELETE FROM JUROR_MOD.POOL WHERE LAST_UPDATE parameter = new HashMap(); + + // user credentials + parameter.put(SessionParameter.USER, + ReadProperties.main("alfresco_user") + ); + parameter.put(SessionParameter.PASSWORD, + ReadProperties.main("alfresco_password") + ); + + // connection settings + parameter.put(SessionParameter.BROWSER_URL, + ReadProperties.main("alfresco_url") + ); + parameter.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value()); + + + parameter.put(SessionParameter.REPOSITORY_ID, + ReadProperties.main("alfresco_repository_id") + ); + + // create session + Session session = factory.createSession(parameter); + + //List repositories = factory.getRepositories(parameter); + //Session session = repositories.get(0).createSession(); + log.info("Made successful connection to alfresco =>" + + ReadProperties.main("alfresco_url") + ); + return session; + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/utils/AngularJsHTTPCallWait.java b/src/main/java/cucumber/utils/AngularJsHTTPCallWait.java new file mode 100644 index 00000000..74f79edd --- /dev/null +++ b/src/main/java/cucumber/utils/AngularJsHTTPCallWait.java @@ -0,0 +1,43 @@ +package cucumber.utils; + +import java.time.Duration; +import org.apache.log4j.Logger; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.ui.ExpectedCondition; +import org.openqa.selenium.support.ui.WebDriverWait; + +public class AngularJsHTTPCallWait { + + private WebDriver driver; + private static Logger log = Logger.getLogger(AngularJsHTTPCallWait.class); + public AngularJsHTTPCallWait(WebDriver driver){ + + } + + public void untilAngularFinishHttpCalls(long timeOutSeconds) { + + final String javaScriptToLoadAngular = + "var injector = window.angular.element('body').injector();" + + "var $http = injector.get('$http');" + + "return ($http.pendingRequests.length === 0)"; + + ExpectedCondition pendingHttpCallsCondition = new ExpectedCondition() { + + public Boolean apply(WebDriver driver) { + + return ((JavascriptExecutor) driver).executeScript(javaScriptToLoadAngular).equals(true); + + } + + }; + + // WebDriverWait angularWait = new WebDriverWait(driver, timeOutSeconds); + new WebDriverWait(driver,Duration.ofSeconds(timeOutSeconds)).until(pendingHttpCallsCondition); + // WebDriverWait angularWait = new WebDriverWait(driver, timeOutSeconds); + // angularWait.until(pendingHttpCallsCondition); + log.info("Wait until Angular Finish Http Calls"); + } + + +} diff --git a/src/main/java/cucumber/utils/DateManipulator.java b/src/main/java/cucumber/utils/DateManipulator.java new file mode 100644 index 00000000..b89e7681 --- /dev/null +++ b/src/main/java/cucumber/utils/DateManipulator.java @@ -0,0 +1,128 @@ +package cucumber.utils; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAdjusters; +import java.util.Calendar; +import java.util.Date; +import java.util.Properties; + +import org.apache.log4j.Logger; + +import cucumber.pageObjects.SuspendDelete; + +public class DateManipulator { + private static Logger log = Logger.getLogger(DateManipulator.class); + + //https://stackoverflow.com/questions/24177516/get-first-next-monday-after-certain-date + private static Boolean checkDate_isMonday(LocalDate ld) { + log.info("Going to check whether =>"+ld+"<= is a Monday"); + return ld.getDayOfWeek().toString() == "MONDAY"; + } + + private static String returnWorkingDay_fromNextMondays(Integer mondays) { + LocalDate ld = LocalDate.now(); + log.info("Current Date =>"+ld); + + if (!checkDate_isMonday(ld)) { + ld = ld.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + log.info("Current date was not a Monday, I have now adjusted the logic to begin from Monday the =>" + ld); + } else if (checkDate_isMonday(ld) && mondays == 1) { + ld = ld.with(TemporalAdjusters.next(DayOfWeek.FRIDAY)); + log.info("Current date was Monday and 1 Monday's time was requested" + + ", I have now adjusted the date to the Friday of this week =>" + ld); + return ld.toString(); + } + + log.info("Next Monday =>"+ld); + ld = ld.plusWeeks(mondays-1); + log.info("Next =>"+mondays+"<= mondays monday =>"+ld); + return ld.toString(); + } + + public static String processString(String columnValue) { + String partText = null; + if (columnValue.contains("mondays time")) { + partText = returnWorkingDay_fromNextMondays( + Integer.parseInt(columnValue.split(" mondays time")[0]) + ); + if (!partText.contains(":")) + partText += " 00:00:00"; + } + return partText; + } + + /** + * Do this properly TODO + * @param columnValue + * @param time + * @return + */ + public static String processString(String columnValue, Boolean time) { + if (time) + return processString(columnValue); + return processString(columnValue).replace(" 00:00:00", ""); + } + + private static Boolean amIAWeekDay(String day) { + if (day.equalsIgnoreCase("saturday") || day.equalsIgnoreCase("sunday")) + return false; + return true; + } + + /** + * Unsure on best implementation, looping for now + * @param workingDays + * @return + */ + public static String addWorkingDaysToCurrentDate(Integer workingDays) { + LocalDate ld = LocalDate.now(); + Integer baseInt = 1; + if (workingDays < 0) + baseInt = -1; + workingDays = workingDays * -1; + while (true) { + if (workingDays == 0) + break; + ld = ld.plusDays(baseInt); + if (amIAWeekDay(ld.getDayOfWeek().toString())) + workingDays--; + } + String date = ld.toString(); + if (!date.contains(":")) + date += " 00:00:00"; + return date; + } + + public static String formatDate(String processString, String format) { + try { + LocalDate datetime = LocalDate.parse(processString, DateTimeFormatter.ofPattern("yyyy-MM-dd")); + processString = datetime.format(DateTimeFormatter.ofPattern(format)); + return processString; + } catch (Exception e) { + log.info(1); + } + return "1"; + + } + + public static boolean isValidDate(String inDate) { + SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss:ms"); + dateFormat.setLenient(false); + try { + dateFormat.parse(inDate.trim()); + } catch (ParseException pe) { + return false; + } + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/utils/ExternalCommandUtils.java b/src/main/java/cucumber/utils/ExternalCommandUtils.java new file mode 100644 index 00000000..4cc98aba --- /dev/null +++ b/src/main/java/cucumber/utils/ExternalCommandUtils.java @@ -0,0 +1,62 @@ +package cucumber.utils; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +import org.apache.chemistry.opencmis.client.api.Repository; +import org.apache.chemistry.opencmis.client.api.Session; +import org.apache.chemistry.opencmis.client.api.SessionFactory; +import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl; +import org.apache.chemistry.opencmis.commons.SessionParameter; +import org.apache.chemistry.opencmis.commons.enums.BindingType; +import org.apache.log4j.Logger; + +import cucumber.pageObjects.MessageLoader; + +public class ExternalCommandUtils { + + private static Logger log = Logger.getLogger(MessageLoader.class); + + public static Session returnSession() { + + SessionFactory factory = SessionFactoryImpl.newInstance(); + + Map parameter = new HashMap(); + + // user credentials + parameter.put(SessionParameter.USER, + ReadProperties.main("alfresco_user") + ); + parameter.put(SessionParameter.PASSWORD, + ReadProperties.main("alfresco_password") + ); + + // connection settings + parameter.put(SessionParameter.BROWSER_URL, + ReadProperties.main("alfresco_url") + ); + parameter.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value()); + + + parameter.put(SessionParameter.REPOSITORY_ID, + ReadProperties.main("alfresco_repository_id") + ); + + // create session + Session session = factory.createSession(parameter); + + //List repositories = factory.getRepositories(parameter); + //Session session = repositories.get(0).createSession(); + log.info("Made successful connection to alfresco =>" + + ReadProperties.main("alfresco_url") + ); + return session; + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/utils/GenUtils.java b/src/main/java/cucumber/utils/GenUtils.java new file mode 100644 index 00000000..b96adbd9 --- /dev/null +++ b/src/main/java/cucumber/utils/GenUtils.java @@ -0,0 +1,48 @@ +package cucumber.utils; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; + +public class GenUtils { + private WebDriver driver; + private static int TIME_IN_SECONDS = 60; + private static Logger log = Logger.getLogger(GenUtils.class); + + public GenUtils(WebDriver driver) { + this.driver = driver; + } + + public WebElement lookupWebElement_byPlaceholder(String lookup){ + log.info("Looking for element with placeholder =>"+lookup); + return driver.findElement(By.xpath(".//*[contains(@placeholder, '" + + lookup + + "')]")); + } + + public String runReturn_JS(String jsCode) { + + JavascriptExecutor js =(JavascriptExecutor)driver; + String out = js.executeScript(jsCode).toString(); + + log.info("Ran jscode =>"+jsCode); + log.info("Saw =>"+out); + + return out; + } + + public void exec_JS(String jsCode) { + ((JavascriptExecutor) driver).executeScript(jsCode); + log.info("Ran jscode =>"+jsCode); + } + + public void setAttributeValue(WebElement elem, String param, String value){ + JavascriptExecutor js = (JavascriptExecutor) driver; + String scriptSetAttrValue = "arguments[0].setAttribute(arguments[1],arguments[2])"; + js.executeScript(scriptSetAttrValue, elem, param, value); + log.info("For element, set =>"+param+"<= to =>"+value); + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/utils/ReadProperties.java b/src/main/java/cucumber/utils/ReadProperties.java new file mode 100644 index 00000000..904288bb --- /dev/null +++ b/src/main/java/cucumber/utils/ReadProperties.java @@ -0,0 +1,73 @@ +package cucumber.utils; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Properties; + +import org.apache.log4j.Logger; + +import cucumber.pageObjects.NavigationShared; + +public class ReadProperties { + private static Logger log = Logger.getLogger(ReadProperties.class); + + public static String main(String property) { + Properties prop = new Properties(); + + File file = new File("src/test/resources/environment.properties"); + FileInputStream fileInput = null; + + try { + fileInput = new FileInputStream(file); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + + try { + prop.load(fileInput); + } catch (IOException e) { + e.printStackTrace(); + } + + String propertyValue = prop.getProperty(property); + if (propertyValue == null) { + log.info("Getting value for "+property+" from Environment Variable"); + propertyValue = System.getenv(property.toUpperCase()); + } + return propertyValue; + } + + public static String machine(String property) { + Properties prop = new Properties(); + + File file = new File("src/test/resources/workstation.properties"); + FileInputStream fileInput = null; + + try { + fileInput = new FileInputStream(file); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + + try { + prop.load(fileInput); + } catch (IOException e) { + e.printStackTrace(); + } + + return prop.getProperty(property); + } + + public static String systemPropertyEnvironmentOverrideCheck(String env) { + String systemEnv = System.getProperty ("envName"); + if (systemEnv != null) { + log.info("The script asked me to use =>"+env+"<= but this has been overriden by System property to use =>"+systemEnv); + return systemEnv.toLowerCase(); + } + + return env; + } + +} \ No newline at end of file diff --git a/src/main/java/cucumber/utils/RequestHandler.java b/src/main/java/cucumber/utils/RequestHandler.java new file mode 100644 index 00000000..3396824f --- /dev/null +++ b/src/main/java/cucumber/utils/RequestHandler.java @@ -0,0 +1,145 @@ +package cucumber.utils; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Properties; + +import org.apache.http.HttpHost; +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.conn.params.ConnRoutePNames; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.apache.log4j.Logger; + +public class RequestHandler { + private static Logger log = Logger.getLogger(RequestHandler.class); + + public static String sendJsonRequest(String url, String payload, String xauthHeaderValue) { + log.info("Preparing to post to =>"+url); + System.out.println("12"); + HttpClient httpClient = HttpClientBuilder.create().build(); //Use this instead + //If using proxy + HttpHost proxy = new HttpHost("proxy.logica.com"); + httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); + + try { + + HttpPost request = new HttpPost(url); + StringEntity params =new StringEntity(payload); + request.addHeader("Content-Type", "application/json"); + request.addHeader("x-auth", xauthHeaderValue); + + request.setEntity(params); + HttpResponse response = httpClient.execute(request); + + String responseText = "1"; // To do - response text, expecting 'OK' + log.info("Sent Post Successfully. Response =>"+responseText); + + }catch (Exception ex) { + log.warn("Exception on Post"); + //handle exception here + + } finally { + //Deprecated + //httpClient.getConnectionManager().shutdown(); + } + + return "1"; + } + + /** + * Expand to include payload + Proxy + * @param url + */ + public static void request_post(String url) { + + HttpClient httpClient = HttpClientBuilder.create().build(); + String responseText = "Error"; + + log.info("Preparing to post to =>"+url); + HttpResponse response = null; + + try { + HttpPost request = new HttpPost(url); + response = httpClient.execute(request); + responseText = response.toString(); // To do - response text, expecting 'OK' + log.info("Sent Post Successfully. Response =>"+responseText); + + //String jsonString = EntityUtils.toString(response.getEntity()); + //log.info(jsonString); + + }catch (Exception ex) { + log.warn("Exception on Post"); + log.warn("URL => "+url); + log.warn(ex); + //handle exception here + } + + try { + String jsonString = EntityUtils.toString(response.getEntity()); + log.info(jsonString); + } catch (Exception e){ + log.info("*** Unable ot get jsonString from response"); + } + } + + /** + * JM - Poor implementation, refactor this /????/ + * @param url + * @param expectedResponseCode + * @throws Exception + */ + public static void return_request_post(String url, int expectedResponseCode) throws Exception { + + HttpClient httpClient = HttpClientBuilder.create().build(); + String responseText = "Error"; + + try { + HttpPost request = new HttpPost(url); + HttpResponse response = httpClient.execute(request); + responseText = response.toString(); // To do - response text, expecting 'OK' + log.info("Sent Post Successfully. Response =>"+responseText); + + if (response.getStatusLine().getStatusCode() != expectedResponseCode) { + throw new Exception("Did not get expected value"); + } + + String jsonString = EntityUtils.toString(response.getEntity()); + log.info("Got =>"+jsonString); + + }catch (Exception ex) { + log.warn("URL => "+url); + log.warn(ex); + throw new Exception("Exception on Post"); + } + } + + /** + * JM - Copy from above, all requires refactor + */ + public static String return_request_post(String url) throws Exception{ + HttpClient httpClient = HttpClientBuilder.create().build(); + String responseText = null; + log.info("Making request =>"+url); + try { + HttpPost request = new HttpPost(url); + HttpResponse response = httpClient.execute(request); + responseText = response.toString(); // To do - response text, expecting 'OK' + log.info("Sent Post Successfully. Response =>"+responseText); + + String jsonString = EntityUtils.toString(response.getEntity()); + log.info("Got =>"+jsonString); + return jsonString; + + }catch (Exception ex) { + log.warn("URL => "+url); + log.warn(ex); + throw new Exception("Exception on Post"); + } + } +} \ No newline at end of file diff --git a/src/main/java/cucumber/utils/WaitUtil_v2.java b/src/main/java/cucumber/utils/WaitUtil_v2.java new file mode 100644 index 00000000..a6f8c5b6 --- /dev/null +++ b/src/main/java/cucumber/utils/WaitUtil_v2.java @@ -0,0 +1,85 @@ +package cucumber.utils; + +import java.util.List; +import java.time.Duration; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.StaleElementReferenceException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedCondition; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.FluentWait; +import org.openqa.selenium.support.ui.Wait; + +import com.google.common.base.Function; + +public class WaitUtil_v2 { + + private WebDriver driver; + private static Logger log = Logger.getLogger(WaitUtil_v2.class); + private Boolean flag; + + public WaitUtil_v2(WebDriver driver) { + this.driver = driver; + } + + public void Expect1(final String text1, final String text2) { + Wait wait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(105)) + .pollingEvery(Duration.ofSeconds(5)) + .ignoring(NoSuchElementException.class) + .ignoring(StaleElementReferenceException.class); + + Function ex2 = new Function() { + @Override + public Boolean apply(WebDriver e) { + log.info(" starting fluent wait"); + WebElement fw = e.findElement(By.className(text1)); + boolean fws = fw.getText().contains(text2); + log.info(" ending fluent wait"); + return fws; + } + }; + wait.until(ex2); + } + + public void Expect1CssOnly(final String text1) { + Wait wait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(55)) + .pollingEvery(Duration.ofSeconds(5)) + .ignoring(NoSuchElementException.class) + .ignoring(StaleElementReferenceException.class); + + Function ex2 = new Function() { + @Override + public Boolean apply(WebDriver e) { + log.info(" starting fluent wait"); + WebElement t = e.findElement(By.cssSelector(text1)); + return t.isEnabled(); + } + }; + wait.until(ex2); + } + + public void waitForButtonToBeVisible_List_2(final List text1) { + Wait wait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(60)) + .pollingEvery(Duration.ofSeconds(10)) + .ignoring(StaleElementReferenceException.class) + .ignoring(NoSuchElementException.class); + + + Function>> ex2 = new Function>>() { + @Override + public ExpectedCondition> apply( + WebDriver e) { + log.info(" waitForButtonToBeVisible_List_2"); + return ExpectedConditions.visibilityOfAllElements(text1); + } + }; + wait.until(ex2); + } +} diff --git a/src/main/java/cucumber/utils/WaitUtils.java b/src/main/java/cucumber/utils/WaitUtils.java new file mode 100644 index 00000000..f66683d4 --- /dev/null +++ b/src/main/java/cucumber/utils/WaitUtils.java @@ -0,0 +1,158 @@ +package cucumber.utils; + +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.StaleElementReferenceException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.FluentWait; +import org.openqa.selenium.support.ui.Wait; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.concurrent.TimeUnit; + +public class WaitUtils { + private WebDriver driver; + private static int TIME_IN_SECONDS = 60; + private static Logger log = Logger.getLogger(WaitUtils.class); + + // not in use + //private static int TIME_OUT = 20; + //private static int POLLING = 500; + + public WaitUtils(WebDriver driver) { + this.driver = driver; + } + + public void waitForList(List name) { + new WebDriverWait(driver, Duration.ofSeconds(TIME_IN_SECONDS)).ignoring(StaleElementReferenceException.class) + .until(ExpectedConditions + .visibilityOfAllElements(name)); + + } + + public void waitForClickableElement(WebElement name, int wait_time) { + log.info("Waiting for element to be clickable"); + new WebDriverWait(driver, Duration.ofSeconds(wait_time)).ignoring(StaleElementReferenceException.class) + .until(ExpectedConditions.elementToBeClickable(name)); + log.info("Element now clickable => "+name); + } + public void waitForClickableElement(WebElement name) { + waitForClickableElement(name, TIME_IN_SECONDS); + } + + public void waitForDisplayedElement(WebElement name, int wait_time) { + log.info("Waiting for element to be displayed"); + new WebDriverWait(driver, Duration.ofSeconds(wait_time)).ignoring(StaleElementReferenceException.class) + .until(ExpectedConditions.visibilityOf(name)); + log.info("Element now visible => "+name); + + } + + public void waitForTextOnPage(String text) { + waitForTextOnPage(text, 10); + } + + public void waitForTextOnPage(String text, int wait_time) { + //By byXpath = By.xpath("//*[contains(normalize-space(text()),'" + By byXpath = By.xpath("//*[contains(.,'" // This resolves issues where elements are parallel to text + + text + + "')]"); + WebElement element = (new WebDriverWait(driver, Duration.ofSeconds(wait_time))) + .until(ExpectedConditions.presenceOfElementLocated(byXpath)); + } + + public void waitForTextInvisibility(String text, int wait_time) { + deactivateImplicitWait(); + By byXpath = By.xpath("//*[contains(.,'" // This resolves issues where elements are parallel to text + + text + + "')]"); + log.info("Waiting for text =>" + text + "<= to disappear"); + Boolean element = (new WebDriverWait(driver, Duration.ofSeconds(wait_time))) + .until(ExpectedConditions.invisibilityOfElementLocated(byXpath)); + log.info("Finished waiting, element visibility =>" + element); + } + + + public void waitForNonList(WebElement name) { + new WebDriverWait(driver, Duration.ofSeconds(TIME_IN_SECONDS)).until(ExpectedConditions + .visibilityOf(name)); + } + + public void waitForElementNoLongerInTheDOM(WebElement name) { + new WebDriverWait(driver, Duration.ofSeconds(TIME_IN_SECONDS)).until(ExpectedConditions.stalenessOf(name)); + } + + public void waitUntilTitle(WebElement element, String text) { + new WebDriverWait(driver, Duration.ofSeconds(TIME_IN_SECONDS)).until(ExpectedConditions + .textToBePresentInElement(element, text)); + } + + public void activateImplicitWait() { + activateImplicitWait(10); + } + + public void activateImplicitWait (Integer seconds) { + log.info("Activated Implicit wait for =>"+seconds+"<= seconds"); + driver.manage().timeouts().implicitlyWait(seconds, TimeUnit.SECONDS); // Activate implicitlyWait() + } + + + public void deactivateImplicitWait() { + + driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); // nullify implicitlyWait() + log.info("Deactivate Implicit wait"); + } + + + public void toBeClickAble(WebElement element){ + + new WebDriverWait(driver, Duration.ofSeconds(TIME_IN_SECONDS)).until(ExpectedConditions.elementToBeClickable(element)); + + } + + public void toBeSelected(WebElement element) { + new WebDriverWait(driver, Duration.ofSeconds(TIME_IN_SECONDS)).until(ExpectedConditions.elementToBeSelected(element)); + } + + public void f_wait(List name) { + Wait wait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(30)) + .pollingEvery(Duration.ofMillis(500)) + .ignoring(NoSuchElementException.class) + .ignoring(StaleElementReferenceException.class); + + wait.until(ExpectedConditions.visibilityOfAllElements(name)); + } + + public void f_waitNoList(WebElement name) { + FluentWait wait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(60)) + .pollingEvery(Duration.ofSeconds(5)) + .ignoring(NoSuchElementException.class) + .ignoring(StaleElementReferenceException.class); + + wait.until(ExpectedConditions.visibilityOf(name)); + } + + public void f_waitElementToClickable(WebElement element) { + log.info("Waiting for element to be clickable"); + Wait wait = new FluentWait(driver) + .withTimeout(Duration.ofSeconds(30)) + .pollingEvery(Duration.ofMillis(500)) + .ignoring(NoSuchElementException.class) + .ignoring(StaleElementReferenceException.class); + + wait.until(ExpectedConditions.elementToBeClickable(element)); + + } + + + + + +} diff --git a/src/main/java/cucumber/utils/XmlReaderDemo.java b/src/main/java/cucumber/utils/XmlReaderDemo.java new file mode 100644 index 00000000..c00542b1 --- /dev/null +++ b/src/main/java/cucumber/utils/XmlReaderDemo.java @@ -0,0 +1,13 @@ +package cucumber.utils; + +public class XmlReaderDemo { + + public static void main(String[] args) { + + XmlReader_v1 xml = new XmlReader_v1(); + xml.read1(); + + + } + +} diff --git a/src/main/java/cucumber/utils/XmlReader_v1.java b/src/main/java/cucumber/utils/XmlReader_v1.java new file mode 100644 index 00000000..a6b438af --- /dev/null +++ b/src/main/java/cucumber/utils/XmlReader_v1.java @@ -0,0 +1,52 @@ +package cucumber.utils; + +import java.io.File; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +public class XmlReader_v1 { + + public void read1() { + + try { + + File file = new File("src/main/resources/standingData.xml"); + + DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + + Document doc = dBuilder.parse(file); + doc.getDocumentElement().normalize(); + System.out.println("Root element :" + + doc.getDocumentElement().getNodeName()); + + NodeList nList = doc.getElementsByTagName("terminalentry"); + + for (int x = 0; x < nList.getLength(); x++) { + Node nNode = nList.item(x); + if (nNode.getNodeType() == Node.ELEMENT_NODE) { + Element eElement = (Element) nNode; + System.out.println("\n"); + /* + * System.out.println(" Result Code and Title : " + x + + * " , " + eElement.getAttribute("value") + ", " + + * eElement.getAttribute("title")); + */ + System.out.println("text is : " + + eElement.getElementsByTagName("label").item(0) + .getTextContent()); + + } + } + + } catch (Exception e) { + System.out.println(e.getMessage()); + } + } +} diff --git a/src/test/java/cucumber/steps/StepDef.java b/src/test/java/cucumber/steps/StepDef.java new file mode 100644 index 00000000..c0ed1ba6 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef.java @@ -0,0 +1,190 @@ +package cucumber.steps; + +import io.cucumber.java.en.*; +import cucumber.pageObjects.*; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Stream; + +public class StepDef { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + private ScreenShotTaker SST; + + public StepDef(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + } + + @Given("^I am on the Login Page$") + public void accessLoginPage() throws Throwable { + NAV.accessLoginPage(); + NAV.waitForAngularLoad(); + } + + @Given("^I am on the Admin Login Page$") + public void accessAdminLoginPage() throws Throwable { + NAV.accessAdminLoginPage(); + NAV.waitForPageLoad(); + } + + @Given("^I am looking at cookies on \"([^\"]*)\" \"([^\"]*)\"$") + public void loadPage_forCookies(String publicBureau, String env) throws Throwable { + NAV.accessLoginPage(publicBureau, env); + } + + + @Given("^I am looking at cookies on Welsh \"([^\"]*)\" \"([^\"]*)\"$") + public void loadPage_forCookiesWelsh(String publicBureau, String env) throws Throwable { + NAV.accessLoginPageWelsh(publicBureau, env); + } + + ; + + + @Given("^I am on \"([^\"]*)\" \"([^\"]*)\"$") + public void loadPage_for(String publicBureau, String env) throws Throwable { + NAV.accessLoginPage(publicBureau, env); + try { + NAV.press_buttonByName("Accept analytics cookies"); + NAV.press_buttonByName("Hide cookie message"); + } catch (Exception e) { + } + } + + ; + + + @Given("^I am on the welsh version of \"([^\"]*)\" \"([^\"]*)\"") + public void loadPage_for_Welsh(String publicBureau, String env) throws Throwable { + NAV.accessLoginPageWelsh(publicBureau, env); +// NAV.press_buttonByName("Derbyn cwcis dadansoddol"); +// NAV.press_buttonByName("Cuddio"); + try { + NAV.press_buttonByName("Derbyn cwcis dadansoddol"); + NAV.press_buttonByName("Cuddio"); + } catch (Exception e) { + } + } + + ; + + @Given("^I am on expenses on \"([^\"]*)\" \"([^\"]*)\"$") + public void loadPage_for_Expenses(String publicBureau, String env) throws Throwable { + NAV.accessLoginPageExpenses(publicBureau, env); + try { + NAV.press_buttonByName("Accept analytics cookies"); + } catch (Exception e) { + } + + } + + ; + + @Given("^I am on the Welsh version of expenses on \"([^\"]*)\" \"([^\"]*)\"$") + public void loadPage_for_Welsh_Expenses(String publicBureau, String env) throws Throwable { + NAV.accessLoginPageWelshExpenses(publicBureau, env); + try { + NAV.press_buttonByName("Accept analytics cookies"); + } catch (Exception e) { + } + } + + ; + + + @Then("^I log in as \"([^\"]*)\"$") + public void loginWith_usernameOnly(String username) throws Throwable { + LGN.login(username, System.getenv(username + "_PASSWORD")); + NAV.waitForPageLoad(180); // 3 Minute login timeout - Up from 120 seconds - Up from 60 seconds + } + @Then("^I log in with \"([^\"]*)\" and \"([^\"]*)\"$") + public void loginWith_usernameAndPassword(String username, String password) throws Throwable { + LGN.login(username, password); + NAV.waitForPageLoad(180); // 3 Minute login timeout - Up from 120 seconds - Up from 60 seconds + } + + @Then("^I log in via AD with \"([^\"]*)\" and \"([^\"]*)\"$") + public void loginViaADWith_usernameAndPassword(String username, String password) throws Throwable { + LGN.loginWithAD(username, password); + NAV.waitForPageLoad(180); // 3 Minute login timeout - Up from 120 seconds - Up from 60 seconds + } + + @When("^I log in$") + public void login() throws Throwable { + LGN.login(); + } + + @When("^I log in the admin portal$") + public void loginAdmin() throws Throwable { + LGN.loginAdmin(); + } + + @When("^I log out$") + public void logout() throws Throwable { + throw new Error("No java defined for this action"); + } + + @When("^I reset the password to \"([^\"]*)\"$") + public void resetPasswordTo(String arg1) throws Throwable { + NAV.set_valueTo("New password:", arg1); + NAV.set_valueTo("Confirm password:", arg1); + NAV.press_buttonByName("Confirm"); + } + + @When("^I see \"([^\"]*)\" in the URL$") + public void see_inURL(String urlPart) { + NAV.see_inURL(urlPart); + } + + ; + +// @Then("^the URL equals \"([^\"]*)\"$") +// public void urlEquals(String expectedURL) { +// NAV.urlEquals(expectedURL); +// }; + + @When("^I press \"([^\"]*)\" in \"([^\"]*)\"$") + public void press_a_key(String key, String inputFieldLabel) { + NAV.press_a_key(key, inputFieldLabel); + } + + ; + + @When("^I press backspace in text area with id \"([^\"]*)\"$") + public void press_backspace(String textAreaId) { + NAV.press_backspace(textAreaId); + } + + ; + + @When("^I clear field with id \"([^\"]*)\"$") + public void clear_field(String fieldId) { + NAV.clear_field(fieldId); + + } + + @Given("^I navigate to \"([^\"]*)\" URL$") + public void iSeeInUrl(String appendURL) { + String currentUrl = webDriver.getCurrentUrl(); + String protocol = NAV.getProtocolFromURLString(currentUrl); + String subUrl = currentUrl.split("https?://")[1].split("/")[0]; + webDriver.get(protocol + subUrl + appendURL); + NAV.iSeeInUrl(subUrl); + + } + + @And("^I set a breakpoint$") + public void iSetABreakpoint() { + System.out.println("setting breakpoint"); + } +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_Database.java b/src/test/java/cucumber/steps/StepDef_Database.java new file mode 100644 index 00000000..5418cf49 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_Database.java @@ -0,0 +1,680 @@ +package cucumber.steps; + +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.*; +import cucumber.testdata.DatabaseTester; + +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.ZoneId; +import java.util.*; + +import static cucumber.steps.StepDef_jurorpool.poolDate; +import static cucumber.steps.StepDef_jurorpool.poolNumber; +import static org.junit.Assert.assertEquals; + + +public class StepDef_Database { + + private DatabaseTester DBT; + + + public StepDef_Database() { + DBT = new DatabaseTester(); + } + + @Given("^\"([^\"]*)\" exists in \"([^\"]*)\" \"([^\"]*)\" for the \"([^\"]*)\" end$") + public void column_existsIn(String colName, String database, String table, String frontBackEnd) throws SQLException { + DBT.column_existsIn(frontBackEnd, database, table, colName); + } + + @Then("^I see (\\d+) row for \"([^\"]*)\" \"([^\"]*)\" \"([^\"]*)\" where \"([^\"]*)\" is \"([^\"]*)\" and \"([^\"]*)\" is \"([^\"]*)\" and \"([^\"]*)\" is \"([^\"]*)\"$") + public void row_existsWhereFrontDatabaseTable( + Integer rowCount, + String frontBackEnd, String database, String table, + String colA, String colAParameter, + String colB, String colBParameter, + String colC, String colCParameter) throws SQLException { + + DBT.rowsExistIn_Where( + rowCount, + frontBackEnd, database, table, + colA, colAParameter, + colB, colBParameter, + colC, colCParameter + ); + } + + @Then("^I see (\\d+) row for \"([^\"]*)\" \"([^\"]*)\" \"([^\"]*)\" where \"([^\"]*)\" is \"([^\"]*)\" and \"([^\"]*)\" is \"([^\"]*)\" and \"([^\"]*)\" is (\\d+)$") + public void row_existsWhereFrontDatabaseTable(Integer arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9, Integer arg10) { + + DBT.rowsExistIn_Where( + arg1, + arg2, arg3, arg4, + arg5, arg6, + arg7, arg8, + arg9, arg10 + ); + } + + @Given("^\"([^\"]*)\" table exists within the \"([^\"]*)\" schema$") + public void table_existsInSchema(String tableName, String schemaName) throws SQLException { + DBT.tableExistsIn( + tableName, + schemaName, + "back" + ); + } + + @Then("^\"([^\"]*)\"\\.\"([^\"]*)\" has column \"([^\"]*)\" with \"([^\"]*)\" \"([^\"]*)\"$") + public void schemaTable_hasColumnWithThat(String schemaName, String tableName, String columnName, String columnLookup, String columnLookupValue) throws SQLException { + DBT.schemaTable_hasColumnWithThat( + schemaName, + tableName, + columnName, + columnLookup, + columnLookupValue + ); + } + + @Then("^\"([^\"]*)\"\\.\"([^\"]*)\" has constraint type \"([^\\\"]*)\\\" for column \"([^\"]*)\"$") + public void schemaTable_hasConstraint(String schemaName, String tableName, String constraintType, String columnName) throws SQLException { + DBT.schemaTable_hasConstraint( + schemaName, + tableName, + constraintType, + columnName + ); + } + + ; + + @Given("^\"([^\"]*)\" has \"([^\"]*)\" as \"([^\"]*)\"$") + public void updateJurorPool_toSetColumn_asValue(String part_no, String columnName, String columnValue) throws SQLException { + DBT.updateJurorPool_toSetColumn_asValue(part_no, columnName, columnValue); + } + + ; + + @Given("^pool \"([^\"]*)\" has attendance date as \"([^\"]*)\"$") + public void updateJurorUniquePool_toSetAttendanceDate_asValue(String pool_no, String columnValue) throws SQLException { + DBT.updateJurorUniquePool_toSetAttendanceDate(pool_no, columnValue); + } + + //Danielle update Juror data for Dashboard + @Given("^\"([^\"]*)\" has \"([^\"]*)\" . \"([^\"]*)\" as \"([^\"]*)\" where \"([^\"]*)\" is \"([^\"]*)\"$") + public void updateJuror_table_toSetColumn_asValue(String part_no, String table, String columnName, String columnValue, String columnNameA, String columnValueA) throws SQLException { + DBT.updateJuror_table_toSetColumn_asValue(part_no, table, columnName, columnValue, columnNameA, columnValueA); + } + + ; + + //Danielle update Juror Digital data for Dashboard + @Given("^the \"([^\"]*)\" for juror \"([^\"]*)\" is set to \"([^\"]*)\"$") + public void updateJurorDigital(String column, String part_no, String value) throws SQLException { + DBT.updateJurorDigital(column, part_no, value); + } + + ; + + //Danielle enable/disable a Bureau user account + @Given("^bureau username \"([^\"]*)\" has \"([^\"]*)\" set to \"([^\"]*)\"$") + public void enableBureauUser(String username, String login_enabled_yn, String value) throws SQLException { + DBT.enableBureauUser(username, login_enabled_yn, value); + } + + @Given("^bureau username \"([^\"]*)\" has an expired password$") + public void expiredBureauUser(String username) throws SQLException { + DBT.expiredBureauUser(username); + } + + //Danielle insert an RSUM row for dashboard test + @Given("^an RSUM row is generated for juror \"([^\"]*)\" in pool \"([^\"]*)\"$") + public void insertRSUMRow(String part_no, String pool_no) throws SQLException { + DBT.insertRSUMRow(part_no, pool_no); + } + + ; + + @Given("^an RESP row is generated for juror \"([^\"]*)\" in pool \"([^\"]*)\"$") + public void insertRESPRow(String part_no, String pool_no) throws SQLException { + DBT.insertRESPRow(part_no, pool_no); + } + + ; + + @Given("^an PUND row is generated for juror \"([^\"]*)\" in pool \"([^\"]*)\"$") + public void insertPUNDRow(String part_no, String pool_no) throws SQLException { + DBT.insertPUNDRow(part_no, pool_no); + } + + ; + + @Given("^juror has data set$") + public void updateJurorPool_byDataTAble(DataTable arg1) throws SQLException { + List> list = arg1.asMaps(String.class, String.class); + Set columnNames = list.get(0).keySet(); + + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String columnValue = null; + for (String columnName : columnNames) { + if (!columnName.equalsIgnoreCase("part_no")) { + columnValue = list.get(i).get(columnName); + updateJurorPool_toSetColumn_asValue( + part_no, + columnName, + columnValue + ); + } + } + } + } + + @Then("^on \"([^\"]*)\" \\. \"([^\"]*)\" I see \"([^\"]*)\" is \"([^\"]*)\" where \"([^\"]*)\" is \"([^\"]*)\"$") + public void onDatabaseTable_seeColWithColValue_whereColColvalue( + String database, String databaseTable, + String expectedColumn, String expectedColumnValue, + String whereColumn, String whereColumnValue) throws SQLException { + + DBT.onDatabaseTable_seeColWithColValue_whereColColvalue( + "demo", + database, databaseTable, + expectedColumn, expectedColumnValue, + whereColumn, whereColumnValue + ); + } + + @Then("^I check that a \"([^\"]*)\" letter has been generated$") + public void requestInfoLetterGenerated(String jurorPartNo) throws SQLException { + StepDef_jurorpool.jurorPartNumber.set(jurorPartNo); + + DBT.requestInfoLetterGenerated(jurorPartNo); + } + + @Then("^on \"([^\"]*)\" \\. \"([^\"]*)\" I see \"([^\"]*)\" is \"([^\"]*)\" where \"([^\"]*)\" is \"([^\"]*)\" and \"([^\"]*)\" is \"([^\"]*)\"$") + public void onDatabaseTable_seeColWithColValue_whereColColvalue + (String database, String databaseTable, + String expectedColumn, String expectedColumnValue, + String whereColumn, String whereColumnValue, + String whereColumnB, String whereColumnValueB) throws SQLException { + + DBT.onDatabaseTable_seeColWithColValue_whereColColvalue( + "demo", + database, databaseTable, + expectedColumn, expectedColumnValue, + whereColumn, whereColumnValue, + whereColumnB, whereColumnValueB + ); + } + + @Then("^on \"([^\"]*)\" \\. \"([^\"]*)\" I see \"([^\"]*)\" is null where \"([^\"]*)\" is \"([^\"]*)\" and \"([^\"]*)\" is \"([^\"]*)\"$") + public void onDatabaseTable_seeColWithColValue_whereColColvalue_whereColColValue( + String database, String databaseTable, + String expectedColumn, // String expectedColumnValue, + String whereColumn, String whereColumnValue, + String whereColumnTwo, String whereColumnValueTwo) throws SQLException { + + DBT.rowsExistIn_Where( + 1, + "demo", + database, + databaseTable, + expectedColumn, + "NULL", + whereColumn, + whereColumnValue, + whereColumnTwo, + whereColumnValueTwo + ); + } + + @Then("^on \"([^\"]*)\" \\. \"([^\"]*)\" I see \"([^\"]*)\" is null where \"([^\"]*)\" is \"([^\"]*)\"$") + public void onDatabaseTable_seeColWithColValue_whereColColvalue( + String database, String databaseTable, + String expectedNullColumn, + String whereColumn, String whereColumnValue) throws SQLException { + + DBT.onDatabaseTable_seeColIsNull_whereColColvalue( + "demo", + database, databaseTable, + expectedNullColumn, //, expectedColumnValue, + whereColumn, whereColumnValue + ); + } + + @Given("^staff with name \"([^\"]*)\" does not exist$") + public void staffWithName_doesNotExist(String staffName) throws SQLException { + DBT.staffWithName_doesNotExist(staffName); + } + + @Given("^pool no \"([^\"]*)\" is reset to pending allocation$") + public void resetPooltoPendingAllocation(String pool_no) throws SQLException { + DBT.resetPooltoPendingAllocation(pool_no); + } + + //cleans dashboard tables + @Given("^the dashboard tables have been cleared") + public void cleanDashboard() throws SQLException { + DBT.clean_dashboard(); + } + + @Given("^the juror numbers have not been processed$") + public void resetJurorDetails(DataTable arg1) throws SQLException { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_no = list.get(i).get("pool_no"); + String owner = list.get(i).get("owner"); + + DBT.clean_juror_digital(part_no); + DBT.clean_juror(part_no, pool_no, owner); + DBT.clean_jurorTablesPreSetList(part_no, pool_no, owner); + DBT.deleteConfLettRow(part_no); + DBT.deleteDeferralLettRow(part_no); + DBT.deleteExcusalLettRow(part_no); + /* + DBT.clean_jurorTable_wherePartNoOwner("part_his", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("confirm_lett", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("defer_dbf", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("def_lett", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("def_denied", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("exc_lett", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("exec_denied_lett", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("disq_lett", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("part_amendments", part_no, owner); + DBT.clean_jurorTable_wherePartNoOwner("phone_log", part_no, owner); + */ + } + } + + @Given("^I have deleted additonal Bureau pool records for juror \"([^\"]*)\" not in pool \"([^\"]*)\"$") + public void deleteAdditionalBureauRecords(String partNo, String poolNo) throws SQLException { + DBT.deleteAdditionalBureauRecords(partNo, poolNo); + } + + @Given("^there is only a bureau copy of the record for juror \"([^\"]*)\"$") + public void deleteCourtCopyOfRecord(String partNo) throws SQLException { + DBT.deleteCourtCopyOfRecord(partNo); + } + + @Given("^auto straight through processing has been disabled$") + public void straightThroughDisabled() throws SQLException { + DBT.straightThroughDisabled(); + } + + @Given("^auto straight through processing has been enabled$") + public void straightThroughEnabled() throws SQLException { + DBT.straightThroughEnabled(); + } + + @Given("^the date received for the juror response \"([^\"]*)\" is set to (\\d+) working days before the current date$") + public void dateReceviedFor_setTo_workingDaysBeforeCurrent(String part_no, Integer workingDays) throws SQLException { + DBT.dateReceviedFor_setTo_workingDaysBeforeCurrent(part_no, workingDays); + } + + @Given("^\"([^\"]*)\" has court (\\d+) set as \"([^\"]*)\"$") + public void usernameHasCourt_setAs(String username, int courtPosition, String courtRoom) throws SQLException { + DBT.usernameHasCourt_setAs(username, courtPosition, courtRoom); + } + + @Given("^test team is deleted$") + public void deleteTeam() throws SQLException { + DBT.deleteTeam(); + } + + @Given("^new pool requests are deleted$") + public void deleteNewPoolRequests() throws SQLException { + DBT.deleteNewPoolRequests(); + } + + @Given("^a confirmation letter is generated for juror \"([^\"]*)\"$") + public void insertConfLettRow(String part_no) throws SQLException { + DBT.insertConfLettRow(part_no); + } + + @Given("^a deferral letter is generated for juror \"([^\"]*)\"$") + public void insertDeferralLettRow(String part_no) throws SQLException { + DBT.insertDeferralLettRow(part_no); + } + + @Given("^an excusal letter is generated for juror \"([^\"]*)\"$") + public void insertExcusalLettRow(String part_no) throws SQLException { + DBT.insertExcusalLettRow(part_no); + } + + @Given("^a postponement letter is generated for juror \"([^\"]*)\"$") + public void insertPostponementLettRow(String part_no) throws SQLException { + DBT.insertPostponementLettRow(part_no); + } + + @Given("^a deferral denied letter is generated for juror \"([^\"]*)\"$") + public void insertDefDeniedLettRow(String part_no) throws SQLException { + DBT.insertDefDeniedLettRow(part_no); + } + + @Given("^an excusal denied letter is generated for juror \"([^\"]*)\"$") + public void insertExcDeniedLettRow(String part_no) throws SQLException { + DBT.insertDefDeniedLettRow(part_no); + } + + @Given("^a disqualified letter is generated for juror \"([^\"]*)\"$") + public void insertDisqualifiedLettRow(String part_no) throws SQLException { + DBT.insertDisqualifiedLettRow(part_no); + } + + + @Given("^the new pool for court \"([^\"]*)\" is deleted$") + public void deleteNewPool(String court) throws SQLException { + DBT.deleteNewPool(court); + } + + @Given("^the request letter for court \"([^\"]*)\" is deleted$") + public void deleteRequestLett(String court) throws SQLException { + DBT.deleteRequestLett(court); + } + + @Given("^the request letter for part_no \"([^\"]*)\" is deleted$") + public void deleteRequestLettForPartNo(String part_no) throws SQLException { + DBT.deleteRequestLettForPartNo(part_no); + } + + @Given("^a new pool is inserted for court \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") + public void insertNewPoolWithDeferral(String court, String noWeeks) throws SQLException { + String partNumber = "6" + court + "11111"; + StepDef_jurorpool.jurorPartNumber.set(partNumber); + DBT.insertNewPoolWithDeferral(court, noWeeks); + } + + @Given("^a new pool is inserted which is owned by the court and includes a deferred juror$") + public void insertNewPoolWithDeferral(DataTable arg1) throws SQLException { + + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_no = list.get(i).get("pool_no"); + String owner = list.get(i).get("owner"); + String no_weeks = list.get(i).get("no_weeks"); + + StepDef_jurorpool.jurorPartNumber.set(part_no); + + DBT.insertCourtPoolWithDeferral(owner, pool_no, part_no, no_weeks); + } + } + + @Given("^a deferral is inserted for an existing juror$") + public void insertDeferralExistingJuror(DataTable arg1) throws SQLException { + + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_no = list.get(i).get("pool_no"); + String owner = list.get(i).get("owner"); + String no_weeks = list.get(i).get("no_weeks"); + String loc_code = list.get(i).get("loc_code"); + if (loc_code == null) { + loc_code = owner; + } + StepDef_jurorpool.jurorPartNumber.set(part_no); + + DBT.insertCourtPoolWithDeferralExistingJuror(owner, pool_no, part_no, no_weeks, loc_code); + } + } + + + @Given("^the juror \"([^\"]*)\" is inserted into pool \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future for court \"([^\"]*)\"$") + public void jurorWithDeferralInsertedIntoPool(String jurorPartNo, String poolNumber, String noWeeks, String court) throws SQLException { + DBT.insertJurorWithDeferralIntoPool(poolNumber, court, noWeeks, jurorPartNo); + } + + @Given("^a new completed pool is inserted for court \"([^\"]*)\"$") + public void insertNewPoolCompleted(String court) throws SQLException { + String partNumber = "6" + court + "11111"; + StepDef_jurorpool.jurorPartNumber.set(partNumber); + DBT.insertNewPoolCompletedPool(court); + } + + @Given("^records for juror \"([^\"]*)\" are deleted$") + public void deleteNewPoolRecords(String partNo) throws SQLException { + DBT.deleteNewRecordsForPartNo(partNo); + } + + @Given("^a new pool is inserted for court \"([^\"]*)\" with part_no \"([^\"]*)\"$") + public void insertNewPool(String court, String newPartNo) throws SQLException { + StepDef_jurorpool.jurorPartNumber.set(newPartNo); + StepDef_jurorpool.summonsReplyNumber = newPartNo; + DBT.insertNewPoolRecord(court, newPartNo); + } + + @Given("^a new pool is inserted for court \"([^\"]*)\"$") + public void insertNewPool(String court) throws SQLException { + String partNumber = ("6" + court + "22222"); + StepDef_jurorpool.jurorPartNumber.set(partNumber); + StepDef_jurorpool.summonsReplyNumber = partNumber; + DBT.insertNewPool(court); + } + + @Given("^a new pool is inserted for court \"([^\"]*)\" for request letter$") + public void insertNewPoolRequestLetter(String court) throws SQLException { + String partNumber = ("6" + court + "99999"); + StepDef_jurorpool.jurorPartNumber.set(partNumber); + DBT.insertNewPoolRequestLetter(court); + } + + + @Given("^a new pool is inserted for court \"([^\"]*)\" where record has transferred to the court$") + public void insertNewPoolTransferredToCourt(String court) throws SQLException { + String partNumber = ("6" + court + "33333"); + StepDef_jurorpool.jurorPartNumber.set(partNumber); + DBT.insertNewPoolTransferredToCourt(court); + DBT.insertRSUMRow(partNumber, (court + "222222")); + } + + @Given("^I have cleared down deferrals for \"([^\"]*)\" weeks in the future for court \"([^\"]*)\"$") + public void clearDownDeferralsForWeeksInFuture(int weeks, String court) throws SQLException { + DBT.clearDeferralsForWeeksAndCourt(weeks, court); + } + + @Given("^a new pool is inserted for where record has transferred to the court$") + public void insertNewPoolTransferredToCourtNew(DataTable arg1) throws SQLException { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String partNumber = list.get(i).get("part_no"); + String poolNumber = list.get(i).get("pool_no"); + String court = list.get(i).get("owner"); + + DBT.insertNewPoolTransferredToCourtNew(court, partNumber, poolNumber); + DBT.insertRSUMRow(partNumber, poolNumber); + } + } + + @Given("^paper responses are deleted$") + public void deletePaperResponses() throws SQLException { + DBT.deletePaperResponses(); + } + + @Given("^new pool requests with creation date > list = arg1.asMaps(String.class, String.class); + + for (int i = 0; i < list.size(); i++) { + String jurorNumber = list.get(i).get("jurorNumber"); + String lastName = list.get(i).get("lastName"); + String zip = list.get(i).get("zip"); + String retDate = list.get(i).get("retDate"); + String nextDate = list.get(i).get("nextDate"); + + DBTNSD.updateJurorPool_toSetColumn_asValueNSD(jurorNumber, "ret_date", retDate); + DBTNSD.updateJurorPool_toSetColumn_asValueNSD(jurorNumber, "next_date", nextDate); + DBTNSD.updateJuror_toSetColumn_asValueNSD(jurorNumber, "last_name", lastName); + DBTNSD.updateJuror_toSetColumn_asValueNSD(jurorNumber, "zip", zip); + } + } + + @Then("^on \"([^\"]*)\" \\. \"([^\"]*)\" I see \"([^\"]*)\" is \"([^\"]*)\" where \"([^\"]*)\" is \"([^\"]*)\" new schema$") + public void onDatabaseTable_seeColWithColValue_whereColColvalueNSD( + String database, String databaseTable, + String expectedColumn, String expectedColumnValue, + String whereColumn, String whereColumnValue) throws SQLException { + + DBTNSD.onDatabaseTable_seeColWithColValue_whereColColvalueNSD( + "demo", + database, databaseTable, + expectedColumn, expectedColumnValue, + whereColumn, whereColumnValue + ); + } + + @Then("^on \"([^\"]*)\" \\. \"([^\"]*)\" I see \"([^\"]*)\" is null where \"([^\"]*)\" is \"([^\"]*)\" and \"([^\"]*)\" is \"([^\"]*)\" new schema$") + public void onDatabaseTable_seeColWithColValue_whereColColvalue_whereColColValueNSD( + String database, String databaseTable, + String expectedColumn, // String expectedColumnValue, + String whereColumn, String whereColumnValue, + String whereColumnTwo, String whereColumnValueTwo) throws SQLException { + + DBTNSD.rowsExistIn_WhereNSD( + 1, + "demo", + database, + databaseTable, + expectedColumn, + "NULL", + whereColumn, + whereColumnValue, + whereColumnTwo, + String.valueOf(Integer.valueOf(whereColumnValueTwo)) + ); + } + + @Then("^on \"([^\"]*)\" \\. \"([^\"]*)\" I see \"([^\"]*)\" is null where \"([^\"]*)\" is \"([^\"]*)\" new schema$") + public void onDatabaseTable_seeColWithColValue_whereColColvalueNSD( + String database, String databaseTable, + String expectedNullColumn, + String whereColumn, String whereColumnValue) throws SQLException { + + DBTNSD.onDatabaseTable_seeColIsNull_whereColColvalueNSD( + "demo", + database, databaseTable, + expectedNullColumn, //, expectedColumnValue, + whereColumn, whereColumnValue + ); + } + + @Given("^staff with name \"([^\"]*)\" does not exist new schema$") + public void staffWithName_doesNotExistNSD(String staffName) throws SQLException { + DBTNSD.staffWithName_doesNotExistNSD(staffName); + } + + @Given("^pool no \"([^\"]*)\" is reset to pending allocation new schema$") + public void resetPooltoPendingAllocationNSD(String pool_no) throws SQLException { + DBTNSD.resetPooltoPendingAllocationNSD(pool_no); + } +// +// //cleans dashboard tables +// @Given("^the dashboard tables have been cleared new schema") +// public void cleanDashboardNSD() throws SQLException { +// DBTNSD.clean_dashboardNSD(); +// } + + @Given("^juror_pool records are cleared down for \"([^\"]*)\"$") + public void cleanJurorPoolNSD(String part_no) throws SQLException { + DBTNSD.clean_juror_pool(part_no); + } + + @Given("^the juror numbers have not been processed new schema$") + public void resetJurorDetailsNSD(DataTable arg1) throws SQLException { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_no = list.get(i).get("pool_no"); + String owner = list.get(i).get("owner"); + + DBTNSD.clean_juror_digitalNSD(part_no); + DBTNSD.clean_jurorNSD(part_no, pool_no, owner); + DBTNSD.clean_jurorTablesPreSetListNSD(part_no, pool_no, owner); + } + } + + @Given("^a bureau owned pool is created with jurors") + public void poolCreatedWithJurors(DataTable arg1) throws SQLException { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String court = list.get(i).get("court"); + String juror_number = list.get(i).get("juror_number"); + String pool_number = list.get(i).get("pool_number"); + String noWeeks = list.get(i).get("att_date_weeks_in_future"); + String owner = list.get(i).get("owner"); + + DBTNSD.cleanTestDataNSD(pool_number, juror_number); + DBTNSD.cleanTestDataPoolNSD(juror_number, pool_number); + DBTNSD.createPoolNSD(court, noWeeks, owner, pool_number); + DBTNSD.createJurorsNSD(pool_number, juror_number); + } + } + + @Given("^I have inserted court rooms for \"([^\"]*)\"$") + public void insertCourtroomsNSD(String court) throws SQLException { + DBTNSD.insertCourtroomsNSD(court); + } + + @Given("^I have deleted court rooms for \"([^\"]*)\"$") + public void deleteCourtroomsNSD(String court) throws SQLException { + DBTNSD.deleteCourtroomsNSD(court); + } + + @Given("^auto straight through processing has been disabled new schema$") + public void straightThroughDisabledNSD() throws SQLException { + DBTNSD.straightThroughDisabledNSD(); + } + + @Given("^auto straight through processing has been enabled new schema$") + public void straightThroughEnabledNSD() throws SQLException { + DBTNSD.straightThroughEnabledNSD(); + } + + @Given("^the date received for the juror response \"([^\"]*)\" is set to (\\d+) working days before the current date new schema$") + public void dateReceviedFor_setTo_workingDaysBeforeCurrentNSD(String part_no, Integer workingDays) throws SQLException { + DBTNSD.dateReceviedFor_setTo_workingDaysBeforeCurrentNSD(part_no, workingDays); + } + + // @Given("^\"([^\"]*)\" has court (\\d+) set as \"([^\"]*)\" new schema$") +// public void usernameHasCourt_setAs(String username, int courtPosition, String courtRoom) throws SQLException { +// DBTNSD.usernameHasCourt_setAsNSD(username, courtPosition, courtRoom); +// } +// +// @Given("^test team is deleted$") +// public void deleteTeamNSD() throws SQLException { +// DBT.deleteTeam(); +// } +// + @Given("^new pool requests are deleted new schema$") + public void deleteNewPoolRequestsNSD() throws SQLException { + DBTNSD.deleteNewPoolRequestsNSD(); + } + + // +// +// @Then("^I check that a \"([^\"]*)\" letter has been generated$") +// public void requestInfoLetterGeneratedNSD(String jurorPartNo) throws SQLException { +// StepDef_jurorpool.jurorPartNumber.set(jurorPartNo); +// +// DBT.requestInfoLetterGenerated(jurorPartNo); +// } +// +// @Given("^a confirmation letter is generated for juror \"([^\"]*)\"$") +// public void insertConfLettRowNSD(String part_no) throws SQLException { +// DBT.insertConfLettRow(part_no); +// } +// +// @Given("^a deferral letter is generated for juror \"([^\"]*)\"$") +// public void insertDeferralLettRowNSD(String part_no) throws SQLException { +// DBT.insertDeferralLettRow(part_no); +// } +// +// @Given("^an excusal letter is generated for juror \"([^\"]*)\"$") +// public void insertExcusalLettRowNSD(String part_no) throws SQLException { +// DBT.insertExcusalLettRow(part_no); +// } +// +// @Given("^a postponement letter is generated for juror \"([^\"]*)\"$") +// public void insertPostponementLettRowNSD(String part_no) throws SQLException { +// DBT.insertPostponementLettRow(part_no); +// } +// +// @Given("^a deferral denied letter is generated for juror \"([^\"]*)\"$") +// public void insertDefDeniedLettRowNSD(String part_no) throws SQLException { +// DBT.insertDefDeniedLettRow(part_no); +// } +// +// @Given("^an excusal denied letter is generated for juror \"([^\"]*)\"$") +// public void insertExcDeniedLettRowNSD(String part_no) throws SQLException { +// DBT.insertDefDeniedLettRow(part_no); +// } +// +// @Given("^a disqualified letter is generated for juror \"([^\"]*)\"$") +// public void insertDisqualifiedLettRowNSD(String part_no) throws SQLException { +// DBT.insertDisqualifiedLettRow(part_no); +// } +// +// + @Given("^the new pool for court \"([^\"]*)\" is deleted new schema$") + public void deleteNewPoolNSD(String court) throws SQLException { + DBTNSD.deleteNewPoolNSD(court); + } + + @Given("^the new pool for court \"([^\"]*)\" with multiple statuses is deleted new schema$") + public void deleteNewPoolMultiStatusNSD(String court) throws SQLException { + DBTNSD.deleteNewPoolMultiStatusNSD(court); + } + + // +// @Given("^the request letter for court \"([^\"]*)\" is deleted$") +// public void deleteRequestLettNSD(String court) throws SQLException { +// DBT.deleteRequestLett(court); +// } +// +// @Given("^the request letter for part_no \"([^\"]*)\" is deleted$") +// public void deleteRequestLettForPartNoNSD(String part_no) throws SQLException { +// DBT.deleteRequestLettForPartNo(part_no); +// } +// + @Given("^a new pool is inserted for court \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future new schema$") + public void insertNewPoolWithDeferralNSD(String court, String noWeeks) throws SQLException { + String partNumber = "6" + court + "11111"; + StepDef_jurorpool.jurorPartNumber.set(partNumber); + DBTNSD.insertNewPoolWithDeferralNSD(court, noWeeks); + } + + @Given("^a new pool is inserted which is owned by the court and includes a deferred juror new schema$") + public void insertNewPoolWithDeferralNSD(DataTable arg1) throws SQLException { + + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_no = list.get(i).get("pool_no"); + String owner = list.get(i).get("owner"); + String no_weeks = list.get(i).get("no_weeks"); + + StepDef_jurorpool.jurorPartNumber.set(part_no); + + DBTNSD.insertCourtPoolWithDeferralNSD(owner, pool_no, part_no, no_weeks); + } + } + + @Given("^a deferral is inserted for an existing juror new schema$") + public void insertDeferralExistingJurorNSD(DataTable arg1) throws SQLException { + + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_no = list.get(i).get("pool_no"); + String owner = list.get(i).get("owner"); + String no_weeks = list.get(i).get("no_weeks"); + String loc_code = list.get(i).get("loc_code"); + if (loc_code == null) { + loc_code = owner; + } + StepDef_jurorpool.jurorPartNumber.set(part_no); + + DBTNSD.insertCourtPoolWithDeferralExistingJurorNSD(owner, pool_no, part_no, no_weeks, loc_code); + } + } + + @Given("^the juror \"([^\"]*)\" is inserted into pool \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future for court \"([^\"]*)\" new schema$") + public void jurorWithDeferralInsertedIntoPoolNSD(String jurorPartNo, String poolNumber, String noWeeks, String court) throws SQLException { + DBTNSD.insertJurorWithDeferralIntoPoolNSD(poolNumber, court, noWeeks, jurorPartNo); + } + + @Given("^a new completed pool is inserted for court \"([^\"]*)\" new schema$") + public void insertNewPoolCompletedNSD(String court) throws SQLException { + String partNumber = "6" + court + "11111"; + StepDef_jurorpool.jurorPartNumber.set(partNumber); + DBTNSD.insertNewPoolCompletedPoolNSD(court); + } + + @Given("^records for juror \"([^\"]*)\" are deleted new schema$") + public void deleteNewPoolRecordsNSD(String partNo) throws SQLException { + DBTNSD.deleteNewRecordsForPartNoNSD(partNo); + } + + @Given("^a new pool is inserted for court \"([^\"]*)\" new schema$") + public void insertNewPool(String court) throws SQLException { + String partNumber = ("6" + court + "22222"); + StepDef_jurorpool.jurorPartNumber.set(partNumber); + StepDef_jurorpool.summonsReplyNumber = partNumber; + DBTNSD.insertNewPoolNSD(court); + } + + @Given("^I have cleared down deferrals for \"([^\"]*)\" weeks in the future for court \"([^\"]*)\" new schema$") + public void clearDownDeferralsForWeeksInFutureNSD(int weeks, String court) throws SQLException { + DBTNSD.clearDeferralsForWeeksAndCourtNSD(weeks, court); + } + + @Given("^a new pool is inserted for where record has transferred to the court new schema$") + public void insertNewPoolTransferredToCourtNewNSD(DataTable arg1) throws SQLException { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String partNumber = list.get(i).get("part_no"); + String poolNumber = list.get(i).get("pool_no"); + String court = list.get(i).get("owner"); + + DBTNSD.insertNewPoolTransferredToCourtNewNSD(court, partNumber, poolNumber); + DBTNSD.insertRSUMRowNSD(partNumber, poolNumber); + } + } + + @Given("^paper responses are deleted new schema$") + public void deletePaperResponsesNSD() throws SQLException { + DBTNSD.deletePaperResponsesNSD(); + } + + @Given("^new pool requests with creation date data = table.asMap(String.class, String.class); + + assertEquals(coronersRequestedOnDate, CORONERS_POOL_PAGE.getRequestedOnDateCoroners()); + assertEquals(data.get("courtName"), CHECK_POOL_REQUEST_PAGE.getCourtName()); + assertEquals(data.get("totalJurorsRequired"), CORONERS_POOL_PAGE.getNumberOfJurorsCoroners()); + assertEquals(data.get("requestedByName"), CORONERS_POOL_PAGE.getRequestedByNameCoroners()); + assertEquals(data.get("requestedByEmail"), CORONERS_POOL_PAGE.getRequestedByEmailCoroners()); + assertEquals(data.get("requestedByPhone"), CORONERS_POOL_PAGE.getRequestedByPhoneCoroners()); + + newCoronersPoolNumber = CORONERS_POOL_PAGE.getCoronerPoolNextNumber(); + } + + @And("^I should see the coroner's court pool$") + public void iShouldSeeTheCoronersCourtPool(DataTable table) throws SQLException { + Map expectedData = table.asMap(String.class, String.class); + + assertEquals(newCoronersPoolNumber.toString(), CORONERS_POOL_PAGE.coronersPoolNumber()); + assertEquals(expectedData.get("court"), CORONERS_POOL_PAGE.getCoronersCourtName()); + assertEquals(expectedData.get("courtCode"), CORONERS_POOL_PAGE.getCoronersCourtCode()); + assertEquals(expectedData.get("poolType"), CORONERS_POOL_PAGE.getCoronersPoolType()); + assertEquals(expectedData.get("jurorsAdded"), CORONERS_POOL_PAGE.getCoronersNumberAdded()); + assertEquals(expectedData.get("jurorsRequired"), CORONERS_POOL_PAGE.getCoronersCapacity()); + assertEquals(expectedData.get("rowsOfCitizens"), CORONERS_POOL_PAGE.getCoronersRowsOfCitizens().toString()); + } + + @And("^coroners court contact details are$") + public void iShouldSeeTheCoronersCourtContactDetails(DataTable table) throws SQLException { + Map expectedData = table.asMap(String.class, String.class); + + assertEquals(coronersRequestedOnDate.toString(), CORONERS_POOL_PAGE.getRequestedOnDateCoroners()); + assertEquals(expectedData.get("name"), CORONERS_POOL_PAGE.getRequestedByNameCoroners()); + assertEquals(expectedData.get("email"), CORONERS_POOL_PAGE.getRequestedByEmailCoroners()); + assertEquals(expectedData.get("phone"), CORONERS_POOL_PAGE.getRequestedByPhoneCoroners()); + } + + @When("^I set first postcode field to more than is available$") + public void iSetVotersToMoreThanIsAvailable() { + String votersCountPlus1 = String.valueOf(CORONERS_POOL_PAGE.firstPostCodeVotersCount() + 1); + CORONERS_POOL_PAGE.firstPostCodeVotersInput.sendKeys(votersCountPlus1); + } + + @When("^I set the Coroners pool requested on date to a Monday \"([^\"]*)\" weeks in the future$") + public void iSetTheCoronersPoolRequestedOnDateToAMondayInTheFuture(Integer noOfWeeks) { + String datePattern = "dd/MM/yyyy"; + String fullDatePatternConverted = "d MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + String todayDateFull = new SimpleDateFormat(datePattern).format(mondayDate); + String todayDateFullConverted = new SimpleDateFormat(fullDatePatternConverted).format(mondayDate); + + + coronersRequestedOnDate = todayDateFullConverted; + CORONERS_POOL_PAGE.enterNewCoronerRequestedOnDate(todayDateFull); + NAV.waitForPageLoad(); + + } + + @When("^I click on the change coroners pool request details link$") + public void iClickChangeCoronerPoolRequestDetails() { + CORONERS_POOL_PAGE.changeCoronerPoolRequestDetails(); + } + + @When("^I click on the change coroners pool requested By link$") + public void iClickChangeCoronerPoolRequestedBy() { + CORONERS_POOL_PAGE.changeCoronerPoolRequestedBy(); + } + + @Then("^I am able to see the coroners pool juror headers$") + public void iAmAbleToSeeAndInteractWithThePoolRequestTabsAndFields() throws Exception { + CORONERS_POOL_PAGE.coronersPoolCitizensResultsTableHeaderExists("Juror number"); + CORONERS_POOL_PAGE.coronersPoolCitizensResultsTableHeaderExists("First name"); + CORONERS_POOL_PAGE.coronersPoolCitizensResultsTableHeaderExists("Last name"); + CORONERS_POOL_PAGE.coronersPoolCitizensResultsTableHeaderExists("Postcode"); + } + + @Then("^I see pool status is \"([^\"]*)\"$") + public void iSeePoolStatusIs(String poolStatus) throws Exception { + CORONERS_POOL_PAGE.coronerPoolStatusIs(poolStatus); + } + + @When("^the Export pool button is not visible$") + public void exportPoolButtonInvisible() { + assertTrue("export pool button is visible", CORONERS_POOL_PAGE.exportPoolButtonInvisible()); + } + + +} diff --git a/src/test/java/cucumber/steps/StepDef_courtJurorRecord.java b/src/test/java/cucumber/steps/StepDef_courtJurorRecord.java new file mode 100644 index 00000000..d765239d --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_courtJurorRecord.java @@ -0,0 +1,75 @@ +package cucumber.steps; + +import io.cucumber.java.en.*; +import cucumber.pageObjects.*; +import cucumber.testdata.DatabaseTester; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +import static org.junit.Assert.*; + + +public class StepDef_courtJurorRecord { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + + private static WebDriver driver; + private ScreenShotTaker SST; + private final PoolRequests POOL_REQUESTS_PAGE; + private final CheckPoolRequest CHECK_POOL_REQUEST_PAGE; + private final PoolOverview POOL_OVERVIEW_PAGE; + private final ActivePools ACTIVE_POOLS_PAGE; + private final SummonsReply SUMMONS_REPLY; + private final ViewSummonsReply VIEW_SUMMONS_REPLY; + private final PoolSearch POOL_SEARCH; + + private final Header HEADER_PAGE; + private final DatabaseTester DBT; + private final JurorRecordSearch JUROR_RECORD_SEARCH; + + private final CourtJurorRecord COURT_JUROR_RECORD; + + private String poolRequestNumber; + private static String summonsReplyNumber; + public static String selectedAttendanceDate; + public static String jurorRecordNumber; + public static String poolNumber; + public static String originalReplyStatus; + + public StepDef_courtJurorRecord(SharedDriver webDriver, DatabaseTester dbt, CourtJurorRecord court_juror_record) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + POOL_REQUESTS_PAGE = PageFactory.initElements(webDriver, PoolRequests.class); + ACTIVE_POOLS_PAGE = PageFactory.initElements(webDriver, ActivePools.class); + CHECK_POOL_REQUEST_PAGE = PageFactory.initElements(webDriver, CheckPoolRequest.class); + POOL_OVERVIEW_PAGE = PageFactory.initElements(webDriver, PoolOverview.class); + JUROR_RECORD_SEARCH = PageFactory.initElements(webDriver, JurorRecordSearch.class); + SUMMONS_REPLY = PageFactory.initElements(webDriver, SummonsReply.class); + POOL_SEARCH = PageFactory.initElements(webDriver, PoolSearch.class); + VIEW_SUMMONS_REPLY = PageFactory.initElements(webDriver, ViewSummonsReply.class); + DBT = dbt; + HEADER_PAGE = PageFactory.initElements(webDriver, Header.class); + COURT_JUROR_RECORD = court_juror_record; + } + + @Then("^I am on the court Juror Record for juror \"([^\"]*)\"$") + public void iAmOnCourtJurorRecord(String jurorRecordNumber) throws Throwable { + NAV.waitForPageLoad(); + NAV.textPresentOnPage(jurorRecordNumber); + assertTrue(COURT_JUROR_RECORD.seeJurorRecordTag()); + assertTrue(COURT_JUROR_RECORD.seeEnterSummonsReplyButton()); + assertTrue(COURT_JUROR_RECORD.seeOverviewTab()); + assertTrue(COURT_JUROR_RECORD.seeDetailsTab()); + assertTrue(COURT_JUROR_RECORD.seeFinanceTab()); + assertTrue(COURT_JUROR_RECORD.seeAttendanceTab()); + assertTrue(COURT_JUROR_RECORD.seeNotesTab()); + assertTrue(COURT_JUROR_RECORD.seeHistoryTab()); + + } +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_data.java b/src/test/java/cucumber/steps/StepDef_data.java new file mode 100644 index 00000000..b2d8e68c --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_data.java @@ -0,0 +1,128 @@ +package cucumber.steps; + +import org.openqa.selenium.WebDriver; + +import io.cucumber.java.PendingException; +import io.cucumber.java.en.*; +import cucumber.pageObjects.Login; +import cucumber.pageObjects.NavigationShared; +import cucumber.pageObjects.SharedDriver; +import cucumber.pageObjects.aSamplePO; +import cucumber.testdata.DataSetup; +import cucumber.testdata.DatabaseTester; +import io.cucumber.java.Before; +import io.cucumber.java.After; + + +import org.openqa.selenium.support.PageFactory; + +public class StepDef_data { + + private aSamplePO SPO; + private Login LGN; + private DataSetup DBB; + private NavigationShared NAV; + private DatabaseTester DBT; + private final WebDriver webDriver; + + public StepDef_data(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + DBB = PageFactory.initElements(webDriver, DataSetup.class); + DBT = PageFactory.initElements(webDriver, DatabaseTester.class); + } + + @When("^that \"([^\"]*)\" has never logged in before$") + public void makeUserFirstTime(String username) throws Throwable { + DBB.setUser_firstTimeLogin(username); + } + + + @Given("^that admin user \"([^\"]*)\" has never logged in before$") + public void makeUserFirstTime_admin (String username) { + DBB.setAdmin_firstTimeLogin(username); + }; + + + @When("^I have reset user \"([^\"]*)\"$") + public void resetUser(String username) throws Throwable { + DBT.resetUser(username); + } + + @Given("^I have cleared down the juror digital database$") + public void resetJurorDigitalDatabase() throws Throwable { + DBT.resetJurorDigitalDatabase(); + } + + @Given("^\"([^\"]*)\" has attribute \"([^\"]*)\" set as \"([^\"]*)\"$") + public void setAttribute(String username, String attribute, String attributeValue) { + DBB.setUser_attribute(username, attribute, attributeValue); + } + + @Given("^\"([^\"]*)\" attribute \"([^\"]*)\" is not \"([^\"]*)\"$") + public void notAttribute(String username, String attribute, String attributeValue) throws Exception { + DBB.checkUser_attributeAgainst_trueFalse(username, attribute, attributeValue, false); + } + + @Given("^I reset \"([^\"]*)\" password to \"([^\"]*)\"$") + public void set_password_to(String username, String password) { + DBB.setUser_password(username, password); + } + + @Given("^\"([^\"]*)\" is compliant$") + public void compliantUser(String username) { + DBB.setUser_compliant(username); + } + @Given("^admin \"([^\"]*)\" is compliant$") + public void compliantAdmin(String username) { + DBB.setAdmin_compliant(username); + } + + @Given("^\"([^\"]*)\" is in group \"([^\"]*)\" in area \"([^\"]*)\" with content \"([^\"]*)\" and subscription type of \"([^\"]*)\"$") + public void setUser_groupContentSubscription_for_area(String username, String group, String content, String area, String subscription) { + DBB.setUser_contentSubscription(username, group, area, content, subscription); + } + + @Given("^\"([^\"]*)\" for lja \"([^\"]*)\" with ou group \"([^\"]*)\" for courtroom \"([^\"]*)\" is present on \"([^\"]*)\"$") + public void setupDocumentData_lja_group_courtroom_date(String documentType, String ljaCode, String groupDescription, String courtroom, String sessionDate) { + DBB.setupDocumentData( + documentType, + ljaCode, + groupDescription, + courtroom, + sessionDate + ); + } + + @Given("^that \"([^\"]*)\" does not exist$") + public void deleteUser_withName(String username) { + DBB.deleteUser_byName(username); + } + + @Given("^Organisation group with name \"([^\"]*)\" does not exist$") + public void deleteOrganisation_withName(String organisation) { + DBB.deleteOrganisation_byName(organisation); + }; + + @Given("^Organisation group with name \"([^\"]*)\" exists$") + public void createOrganisation_withName(String organisation){ + DBB.createOrganisation_byName(organisation); + }; + + @Given("^Organisation \"([^\"]*)\" has entry \"([^\"]*)\"$") + public void organisation_withEntry(String organisation, String entry) { + DBB.createEntry_forOrganisation_byName(organisation, entry); + }; + + @Given("^Organisation \"([^\"]*)\" has an entry called \"([^\"]*)\" under \"([^\"]*)\"$") + public void createOrganisationGroup_entry(String organisation, String cn, String ou){ + DBB.createEntry_forOrganisationGroup_byName(organisation, ou, cn); + }; + + + + + +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_groups.java b/src/test/java/cucumber/steps/StepDef_groups.java new file mode 100644 index 00000000..96191a51 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_groups.java @@ -0,0 +1,93 @@ +package cucumber.steps; + +import cucumber.pageObjects.*; +import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +public class StepDef_groups { + + private aSamplePO SPO; + private Login LGN; + private Groups GRP; + private Organisations ORG; + private NavigationShared NAV; + private final WebDriver webDriver; + + public StepDef_groups(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + GRP = PageFactory.initElements(webDriver, Groups.class); + ORG = PageFactory.initElements(webDriver, Organisations.class); + } + + @Given("^I click on the icon next to \"([^\"]*)\"$") + public void click_iconNextTo(String text) throws Exception{ + try{ + GRP.click_iconNextTo(text); + } catch (Exception e) { + NAV.waitForPageLoad(); + GRP.click_iconNextTo(text); + } + } + + @Then("^I see \"([^\"]*)\" in the Groups added list$") + public void see_inGroupAddedList(String arg1) throws Exception { + try{ + GRP.seeText_inGroupAddedList(arg1); + } catch (Exception e) { + NAV.waitForPageLoad(); + GRP.seeText_inGroupAddedList(arg1); + } + } + + @Then("^I do not see \"([^\"]*)\" in the Groups added list$") + public void doNotSee_inGroupAddedList(String arg1) throws Exception { + try{ + GRP.doNotSeeText_inGroupAddedList(arg1); + } catch (Exception e) { + NAV.waitForPageLoad(); + GRP.doNotSeeText_inGroupAddedList(arg1); + } + } + + @Then("^in the panel for header \"([^\"]*)\" I see \"([^\"]*)\"$") + public void see_inPanelHeader(String headerName, String expectedText){ + GRP.seeText_inPanelHeader(headerName, expectedText); + } + + @Then("^in the panel for header \"([^\"]*)\" I click on \"([^\"]*)\"$") + public void click_inPanelHeader(String headerName, String expectedText){ + try{ + GRP.click_inPanelHeader(headerName, expectedText); + } catch (Exception e) { + NAV.waitForPageLoad(); + GRP.click_inPanelHeader(headerName, expectedText); + } + NAV.waitForPageLoad(); + }; + + @When("^I \"([^\"]*)\" the checkbox for \"([^\"]*)\" \"([^\"]*)\"$") + public void setCheckbox_forRowCol(String checkUncheck, String rowName, String colName){ + GRP.setCheckbox_forRowCol(checkUncheck, rowName, colName); + }; + + @When("^I set the radio button to \"([^\"]*)\"$") + public void setRadioButton(String arg1) throws Throwable { + try{ + NAV.waitForPageLoad(); + GRP.click_radioButtonWithLabel(arg1); + } catch (Throwable e) { + NAV.waitForPageLoad(); + GRP.click_radioButtonWithLabel(arg1); + } + }; + @Then("^the radio button \"([^\"]*)\" is \"([^\"]*)\"$") + public void confirm_Radiobutton_withNameChecked(String radioButtonLabel, String selectUnSelected){ + GRP.confirm_Radiobutton_withNameChecked(radioButtonLabel, selectUnSelected); + }; +} diff --git a/src/test/java/cucumber/steps/StepDef_hooks.java b/src/test/java/cucumber/steps/StepDef_hooks.java new file mode 100644 index 00000000..8ff7ea19 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_hooks.java @@ -0,0 +1,60 @@ +package cucumber.steps; + +import org.apache.log4j.Logger; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.OutputType; +import org.openqa.selenium.TakesScreenshot; +import org.openqa.selenium.WebDriver; + +import cucumber.pageObjects.Login; +import cucumber.pageObjects.NavigationShared; +import cucumber.pageObjects.ScreenShotTaker; +import cucumber.pageObjects.Search; +import cucumber.pageObjects.SharedDriver; +import cucumber.pageObjects.aSamplePO; + +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; + +import org.openqa.selenium.support.PageFactory; + +public class StepDef_hooks { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + private ScreenShotTaker SST; + private static Logger log = Logger.getLogger(StepDef_hooks.class); + + public StepDef_hooks(SharedDriver webDriver) { + this.webDriver = webDriver; + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + } + + @After + public void afterScenario(Scenario scenario) { + if (scenario.isFailed()) { + try { + JavascriptExecutor jse = (JavascriptExecutor)webDriver; + jse.executeScript("document.body.style.zoom = '50%';"); + } catch (Exception e) { + //Untested + } + try { + byte[] screenshot = ((TakesScreenshot)webDriver).getScreenshotAs(OutputType.BYTES); + log.info("Took a screenshot"); + scenario.attach(screenshot, "image/png",scenario.getName()); + log.info("Embeded screenshot into the cucumber scenario as image/png"); + } catch (Exception e) { + log.error("Failed to embedd with error =>" + e); + } + } + } + +} + diff --git a/src/test/java/cucumber/steps/StepDef_jurorRecord.java b/src/test/java/cucumber/steps/StepDef_jurorRecord.java new file mode 100644 index 00000000..1f2ca457 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_jurorRecord.java @@ -0,0 +1,377 @@ +package cucumber.steps; + +import cucumber.pageObjects.*; +import cucumber.testdata.DatabaseTester; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.And; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.PageFactory; + +import java.text.SimpleDateFormat; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAdjusters; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.*; + +public class StepDef_jurorRecord { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + + private static WebDriver driver; + private ScreenShotTaker SST; + private final PoolRequests POOL_REQUESTS_PAGE; + private final CheckPoolRequest CHECK_POOL_REQUEST_PAGE; + private final PoolOverview POOL_OVERVIEW_PAGE; + private final ActivePools ACTIVE_POOLS_PAGE; + private final SummonsReply SUMMONS_REPLY; + private final ViewSummonsReply VIEW_SUMMONS_REPLY; + private final PoolSearch POOL_SEARCH; + + private final Header HEADER_PAGE; + private final DatabaseTester DBT; + private final JurorRecordSearch JUROR_RECORD_SEARCH; + private final CourtJurorRecord COURT_JUROR_RECORD; + private final JurorRecord JUROR_RECORD; + + private String poolRequestNumber; + private static String summonsReplyNumber; + public static String selectedAttendanceDate; + public static String jurorRecordNumber; + public static String poolNumber; + public static String originalReplyStatus; + + public StepDef_jurorRecord(SharedDriver webDriver, DatabaseTester dbt, JurorRecord juror_record) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + POOL_REQUESTS_PAGE = PageFactory.initElements(webDriver, PoolRequests.class); + ACTIVE_POOLS_PAGE = PageFactory.initElements(webDriver, ActivePools.class); + CHECK_POOL_REQUEST_PAGE = PageFactory.initElements(webDriver, CheckPoolRequest.class); + POOL_OVERVIEW_PAGE = PageFactory.initElements(webDriver, PoolOverview.class); + JUROR_RECORD_SEARCH = PageFactory.initElements(webDriver, JurorRecordSearch.class); + SUMMONS_REPLY = PageFactory.initElements(webDriver, SummonsReply.class); + POOL_SEARCH = PageFactory.initElements(webDriver, PoolSearch.class); + VIEW_SUMMONS_REPLY = PageFactory.initElements(webDriver, ViewSummonsReply.class); + DBT = dbt; + HEADER_PAGE = PageFactory.initElements(webDriver, Header.class); + COURT_JUROR_RECORD = PageFactory.initElements(webDriver, CourtJurorRecord.class); + JUROR_RECORD = juror_record; + } + + @Then("^I am on the Juror Record for juror \"([^\"]*)\"$") + public void iAmOnJurorRecord(String jurorRecordNumber) throws Throwable { + NAV.waitForPageLoad(); + NAV.textPresentOnPage(jurorRecordNumber); + assertTrue(JUROR_RECORD.seeJurorRecordTag()); + assertTrue(JUROR_RECORD.seeOverviewTab()); + assertTrue(JUROR_RECORD.seeDetailsTab()); + assertTrue(JUROR_RECORD.seeSummonsTab()); + assertTrue(JUROR_RECORD.seeFinanceTab()); + assertTrue(JUROR_RECORD.seeAttendanceTab()); + assertTrue(JUROR_RECORD.seeNotesTab()); + assertTrue(JUROR_RECORD.seeHistoryTab()); + + } + + @Then("^I see the Juror Record tag$") + public void jurorRecordTagIsVisible() { + assertTrue(JUROR_RECORD.seeJurorRecordTag()); + } + + @Then("^I see the juror's status on the juror record screen is \"([^\"]*)\"$") + public void jurorStatusHasUpdatedTo(String jurorStatus) { + assertEquals(jurorStatus, JUROR_RECORD.getJurorStatus()); + } + + @Then("^I see the court name on the juror record screen is \"([^\"]*)\"$") + public void courtNameOnJurorRecordIs(String courtName) { + assertEquals(courtName, JUROR_RECORD.getCourtName()); + } + + @Then("^the warning icon is displayed next to the juror status$") + public void jurorStatusWarningSymbol() { + assertTrue(JUROR_RECORD.seeJurorStatusWarningSymbol()); + } + + @When("^I click on the Summons Reply tab$") + public void clickSummonsTab() { + JUROR_RECORD.clickSummonsTab(); + } + + @Then("^I see the reply status of the summons reply on juror record is \"([^\"]*)\"$") + public void sumonsReplyStatus(String replyStatus) { + assertEquals(replyStatus, JUROR_RECORD.getReplyStatus()); + } + + @Then("^I see the processing outcome of the summons reply on juror record is \"([^\"]*)\"$") + public void summonsReplyProcessingOutcome(String processingOutcome) { + assertEquals(processingOutcome, JUROR_RECORD.getProcessingOutcome()); + } + + @Then("^the warning icon is displayed next to the processing outcome$") + public void processingOutcomeWarningSymbol() { + assertTrue(JUROR_RECORD.seeProcessingOutcomeWarningSymbol()); + } + + @Then("^I see the reply method of the summons reply on juror record is \"([^\"]*)\"$") + public void summonsReplyReplyMethod(String replyMethod) { + assertEquals(replyMethod, JUROR_RECORD.getReplyMethod()); + } + + @Then("^I see the reply date of the summons reply on juror record is \"([^\"]*)\"$") + public void summonsReplyReplyDate(String replyDate) { + String expectedDate = replyDate; + if (replyDate.equals("today")) { + String datePattern = "d MMMM YYYY"; + Calendar date = Calendar.getInstance(); + expectedDate = new SimpleDateFormat(datePattern).format(date.getTime()); + } + assertEquals(expectedDate, JUROR_RECORD.getReplyDate()); + } + + @When("^I click the reassign to another pool radio button$") + public void clickReassignPoolRadioButton() { + JUROR_RECORD.clickReassignRadioButton(); + } + + public void clickJurorFromReassignlist() { + List jurors = driver.findElements(By.tagName("a")); + for (WebElement lijurors : jurors) { + if (lijurors.getText().contains(poolNumber)) ; + JUROR_RECORD.clickReassignJuror(); + } + + } + + @Then("^I see the reassign active pools table$") + public void seeReassignActivePoolsTable() { + assertTrue(JUROR_RECORD.seeReassignActivePoolsTable()); + List tableHeadings = JUROR_RECORD.getReassignActivePoolsHeadings(); + assertEquals("Pool number", tableHeadings.get(0)); + assertEquals("Summoning status", tableHeadings.get(1)); + assertEquals("Service start date", tableHeadings.get(2)); + } + + @Then("^the juror record pool number has updated to \"([^\"]*)\"$") + public void getJurorRecordPoolNumber(String poolNo) { + assertEquals(poolNo, JUROR_RECORD.getPoolNumber()); + } + + @Then("^the juror record court name has updated to \"([^\"]*)\"$") + public void getJurorRecordCourtName(String courtName) { + assertEquals(courtName, JUROR_RECORD.getCourtName()); + } + + @Then("^I see police check has updated to \"([^\"]*)\"$") + public void iSeePoliceCheckHasUpdatedTo(String policeCheckStatus) { + assertEquals(policeCheckStatus, JUROR_RECORD.getPoliceCheckText()); + } + + @And("^I see the police check value is \"([^\"]*)\"$") + public void iSeePoliceValueIs(String policeCheckStatus) { + assertEquals(policeCheckStatus, JUROR_RECORD.getPoliceCheckText()); + } + + @And("^I see the police check value is not \"([^\"]*)\"$") + public void iSeePoliceValueIsNot(String policeCheckStatus) { + assertNotEquals(policeCheckStatus, JUROR_RECORD.getPoliceCheckText()); + } + + @When("^I click the transfer to another pool radio button$") + public void clickTransferCourtRadioButton() { + JUROR_RECORD.clickTransferCourtRadioButton(); + } + + @Then("^I am on the select a court to transfer to page$") + public void seeCourtToTransferToPage() { + assertEquals("Select a court to transfer to", JUROR_RECORD.getHeading()); + } + + @When("^I set attendance date to \"([^\"]*)\" Mondays in the future$") + public void setAttendanceDateMondaysInFuture(String noWeeks) { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + //Add a leading 0 to anything less than double digits + JUROR_RECORD.enterAttendanceDate(localDateMonday.format(DateTimeFormatter.ofPattern("dd/MM/YYYY"))); + } + + @When("^I set attendance date to a date that doesn't exist") + public void setAttendanceDateInvalid() { + JUROR_RECORD.enterAttendanceDate("01/13/2023"); + } + + @And("^I see the number of deferrals is \"([^\"]*)\"$") + public void iSeeTheNumberOfDeferralsIs(String noOfDeferrals) { + assertEquals(noOfDeferrals, JUROR_RECORD.getNumberOfDeferrals()); + } + + @Then("^I set the \"([^\"]*)\" choice to \"([^\"]*)\" Mondays in the future$") + public void iSetTheChoiceTo(String weekChoice, int mondaysInFuture) { + try { + switch (weekChoice.toLowerCase()) { + case "first": + SUMMONS_REPLY.setFirstChoicePaper(StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture)); + break; + case "second": + SUMMONS_REPLY.setSecondChoicePaper(StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture)); + break; + case "third": + SUMMONS_REPLY.setThirdChoicePaper(StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture)); + break; + case "alternate": + case "only": + case "new": + SUMMONS_REPLY.setAltChoicePaper(StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture)); + break; + } + } catch (Exception e) { + switch (weekChoice.toLowerCase()) { + case "first": + SUMMONS_REPLY.setFirstChoice(StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture)); + break; + case "second": + SUMMONS_REPLY.setSecondChoice(StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture)); + break; + case "third": + SUMMONS_REPLY.setThirdChoice(StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture)); + break; + } + } + } + + @Then("^I select to Choose a different date") + public void selectDifferentDate() { + SUMMONS_REPLY.deferralOptionDifferent(); + } + + @And("^I select the pool I created for the deferral$") + public void iSelectThePoolICreatedForTheDeferral() { + ArrayList pools = StepDef_jurorpool.poolNumbers.get(); + System.out.println(pools.get(0)); + SUMMONS_REPLY.clickPoolCreatedForDeferral(pools.get(0)); + } + + @And("^I click the change link for the juror deferral$") + public void iClickTheChangeLinkForTheJurorDeferral() { + JUROR_RECORD.clickDeferralChange(); + } + + @And("^I see under pool details the pool number is \"([^\"]*)\"$") + public void iSeeUnderPoolDetailsThePoolNumberIs(String poolNumberValue) { + assertEquals(poolNumberValue, JUROR_RECORD.getPoolNumberValue()); + } + + @And("^I see Deferred to is \"([^\"]*)\" Mondays in the future$") + public void iSeeDeferredToIsMondaysInTheFuture(int mondaysInFuture) { + String originalDatePattern = "dd/MM/yyyy"; + String datePattern = "EEEE dd MMMM yyyy"; + CharSequence dateToPattern = StepDef_jurorpool.mondayWeeksInFuture(mondaysInFuture); + DateTimeFormatter originalDate = DateTimeFormatter.ofPattern(originalDatePattern); + DateTimeFormatter formattedDate = DateTimeFormatter.ofPattern(datePattern); + LocalDate date = LocalDate.parse(dateToPattern, originalDate); + System.out.println(); + assertEquals(formattedDate.format(date), JUROR_RECORD.getDeferredToDate()); + } + + @And("^I see the link to run a police check$") + public void iSeeTheLinkToRunAPoliceCheck() { + assertTrue(JUROR_RECORD.runPoliceCheckIsLinkDisplayed()); + } + + @And("^I do not see the link to run a police check$") + public void iDoNotSeeTheLinkToRunAPoliceCheck() { + assertTrue(JUROR_RECORD.runPoliceCheckLinkInvisible()); + } + + @And("^I see the button to run a police check$") + public void iSeeTheButtonToRunAPoliceCheck() { + assertTrue(JUROR_RECORD.runPoliceCheckIsButtonDisplayed()); + } + + @And("^I click the link to run a police check$") + public void iClickTheLinkToRunAPoliceCheck() { + JUROR_RECORD.clickRunPoliceCheckLink(); + } + + @And("^I click the button to run a police check$") + public void iClickTheButtonToRunAPoliceCheck() { + JUROR_RECORD.clickRunPoliceCheckButton(); + } + + + @And("^I see \"([^\"]*)\" in the dropdown box$") + public void iSeeInTheDropdownBox(String expectedText) { + assertTrue(JUROR_RECORD.getTextCourtNameLocation(expectedText)); + } + + @When("^I set the court or location to \"([^\"]*)\"$") + public void iSetTheCourtOrLocationTo(String courtOrLocationCode) { + JUROR_RECORD.setCourtOrLocation(courtOrLocationCode); + } + + @And("^I see the juror name has updated to \"([^\"]*)\"$") + public void iSeeTheJurorNameHasUpdatedTo(String jurorName) { + assertEquals(jurorName, JUROR_RECORD.getUpdatedJurorName()); + } + + @And("^I see the juror's new name \"([^\"]*)\" is pending approval$") + public void iSeeTheJurorNameIsPendingApproval(String jurorNamePendingApproval) { + assertEquals(jurorNamePendingApproval, JUROR_RECORD.jurorNamePendingApproval()); + } + + @When("^I click on the Approve or reject link$") + public void selectApproveOrReject() { + JUROR_RECORD.clickApproveOrRejectLink(); + } + + @When("^I click on the pool number link on Juror Record$") + public void clickPoolNumberLink() { + JUROR_RECORD.clickPoolNumberLink(); + } + + @Then("^I click on the \"([^\"]*)\" link in the same row as \"([^\"]*)\" on Check your answers$") + public void clickChangeLinkInSameRowAs_inCreateJurorRecord(String link, String nextTo) throws Throwable { + NAV.waitForPageLoad(2); + JUROR_RECORD.clickChangeLinkInSameRowAs_inCreateJurorRecord(link, nextTo); + } + + @When("^I see senior jury officer notification banner$") + public void seeSjoNotificationBanner() { + JUROR_RECORD.sjoNotification(); + } + + @When("^I do not see the senior jury officer notification banner$") + public void doNotseeSjoNotificationBanner() { + JUROR_RECORD.sjoNotificationNotPresent(); + } + + @When("^I click on the jurors to approve link from the sjo notification$") + public void clickLinkOnSjoNotificationBanner() { + JUROR_RECORD.clickSjoNotification(); + + } + + @When("^I comment \"([^\"]*)\" as reason for my rejection of juror$") + public void recordCommentsWithText(String comments) { + JUROR_RECORD.enterComments(comments); + } + +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_jurorpool.java b/src/test/java/cucumber/steps/StepDef_jurorpool.java new file mode 100644 index 00000000..cdbb1011 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_jurorpool.java @@ -0,0 +1,3044 @@ +package cucumber.steps; + +import cucumber.pageObjects.*; +import cucumber.testdata.DatabaseTester; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.PendingException; +import io.cucumber.java.en.And; +import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.junit.ComparisonFailure; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.PageFactory; + +import java.awt.*; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.UnsupportedFlavorException; +import java.io.IOException; +import java.sql.SQLException; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.*; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAdjusters; +import java.util.List; +import java.util.*; + +import static org.junit.Assert.*; + + +public class StepDef_jurorpool { + + private final CoronersPool CORONERS_POOL_PAGE; + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + + private static WebDriver driver; + private ScreenShotTaker SST; + private final PoolRequests POOL_REQUESTS_PAGE; + private final CheckPoolRequest CHECK_POOL_REQUEST_PAGE; + private final PoolOverview POOL_OVERVIEW_PAGE; + private final ActivePools ACTIVE_POOLS_PAGE; + private final SummonsReply SUMMONS_REPLY; + private final ViewSummonsReply VIEW_SUMMONS_REPLY; + private final PoolSearch POOL_SEARCH; + private final AdditionalSummons ADDITIONAL_SUMMONS; + private final DeferralMaintenance DEFERRAL_MAINTENANCE; + private final Header HEADER_PAGE; + private final DatabaseTester DBT; + private final Groups GRP; + private final JurorRecordSearch JUROR_RECORD_SEARCH; + private final JurorRecord JUROR_RECORD; + + private final TrialsAndAttendance TRL; + public static ThreadLocal poolRequestNumber = new ThreadLocal<>(); + static String summonsReplyNumber; + public static ThreadLocal selectedAttendanceDate = new ThreadLocal<>(); + public static String jurorRecordNumber; + public static String jurorPoolNumber; + public static ThreadLocal jurorPartNumber = new ThreadLocal<>(); + public static ThreadLocal poolNumber = new ThreadLocal<>(); + public static ThreadLocal poolDate = new ThreadLocal<>(); + public static String originalReplyStatus; + public static String summonedNumber; + public static ThreadLocal> poolNumbers = ThreadLocal.withInitial(ArrayList::new); + public static ArrayList dateTimeRecorded = new ArrayList<>(); + public static ArrayList dateTimeRecordedHigher = new ArrayList<>(); + public static ArrayList dateTimeRecordedLower = new ArrayList<>(); + public static ThreadLocal opticReference = new ThreadLocal<>(); + private static final Logger log = Logger.getLogger(ActivePools.class); + + public StepDef_jurorpool(CoronersPool coroners_pool_page, SharedDriver webDriver, DatabaseTester dbt, TrialsAndAttendance trl) { + CORONERS_POOL_PAGE = coroners_pool_page; + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + POOL_REQUESTS_PAGE = PageFactory.initElements(webDriver, PoolRequests.class); + ACTIVE_POOLS_PAGE = PageFactory.initElements(webDriver, ActivePools.class); + CHECK_POOL_REQUEST_PAGE = PageFactory.initElements(webDriver, CheckPoolRequest.class); + POOL_OVERVIEW_PAGE = PageFactory.initElements(webDriver, PoolOverview.class); + JUROR_RECORD_SEARCH = PageFactory.initElements(webDriver, JurorRecordSearch.class); + JUROR_RECORD = PageFactory.initElements(webDriver, JurorRecord.class); + SUMMONS_REPLY = PageFactory.initElements(webDriver, SummonsReply.class); + POOL_SEARCH = PageFactory.initElements(webDriver, PoolSearch.class); + VIEW_SUMMONS_REPLY = PageFactory.initElements(webDriver, ViewSummonsReply.class); + DBT = dbt; + HEADER_PAGE = PageFactory.initElements(webDriver, Header.class); + ADDITIONAL_SUMMONS = PageFactory.initElements(webDriver, AdditionalSummons.class); + DEFERRAL_MAINTENANCE = PageFactory.initElements(webDriver, DeferralMaintenance.class); + GRP = PageFactory.initElements(webDriver, Groups.class); + TRL = PageFactory.initElements(webDriver, TrialsAndAttendance.class); + } + + @Given("^I go to the launch screen of the bureau app$") + public void iGoToTheLaunchScreenOfTheBureauApp() { + //Need to know the url and user permission sets of the application + } + + @And("^I verify reassign error message with the text \"([^\"]*)\"$") + public void reassignErrorMessageWithTheText(String errorText) { + NAV.waitForPageLoad(); + assertEquals(errorText, SUMMONS_REPLY.reassignErrorText()); + } + + @And("^I log in as a \"([^\"]*)\"$") + public void iLogInAsA(String arg0) throws Throwable { + // Will the user log in or will it be a single sign on? + // Do we need to worry about 2fa? + // Need to know permission sets + throw new PendingException(); + } + + @When("^I navigate to the pool request screen$") + public void iNavigateToThePoolRequestScreen() { + POOL_REQUESTS_PAGE.openPoolManagement(); + } + + @When("^I navigate to summons management$") + public void iNavigateToSummonsManagementScreen() { + POOL_REQUESTS_PAGE.openSummonsManagement(); + } + + @When("^I click the create nil pool link$") + public void iClickCreatePool() { + POOL_REQUESTS_PAGE.clickCreateAPool(); + POOL_REQUESTS_PAGE.clickCreateNilPool(); + } + + @And("^a pool has been created$") + public void poolHasBeenCreated() throws Throwable { + iClickTheLinkToTheNewPoolScreen(); + POOL_REQUESTS_PAGE.enterAndSelectCourtAsBureau("DORCHESTER"); + iChangeThePoolTypeTo("Civil"); + iSetTheNumberOfJurorsTo("0"); + iClickTheRequestPoolButton(); + iSaveTheNewPoolRequest(); + } + + ; + + @Then("^I am able to see and interact with the pool request tabs and fields$") + public void iAmAbleToSeeAndInteractWithThePoolRequestTabsAndFields() { + assertTrue(POOL_REQUESTS_PAGE.tabPresentAndCorrect("Coroner courts")); + assertTrue(POOL_REQUESTS_PAGE.tabPresentAndCorrect("Civil courts")); + assertTrue(POOL_REQUESTS_PAGE.tabPresentAndCorrect("Crown courts")); + } + + @When("^I filter the pool request page by \"([^\"]*)\"$") + public void iFilterThePoolRequestPageByCourtNameAndCourtCode(final String filterQuery) throws InterruptedException { + POOL_REQUESTS_PAGE.enterFilterString(filterQuery); + } + + @Then("^the pool request page will show the filtered courts that the user has access to$") + public void thePoolRequestPageWillShowTheFilteredCourtsThatTheUserHasAccessTo() { + assertTrue(POOL_REQUESTS_PAGE.countTableRows() > 0); + } + + @When("^I select the pool that I have just created to move to the pool summary page$") + public void aPoolNumberIsSelectedToMoveToTheCreateAPoolSummaryPage() { + try { + NAV.click_link_by_text(poolNumber.get()); + } catch (Exception e) { + System.out.println("Pool not found, trying another method"); + POOL_REQUESTS_PAGE.clickTab("Search"); + POOL_SEARCH.enterPoolNo(poolNumber.get()); + POOL_SEARCH.clickContinue(); + } + } + + @When("^I click on the pool I have added jurors to$") + public void clickOnPoolIHaveAddedJurorsToOnActivePools() { + POOL_REQUESTS_PAGE.clickActivePoolNumber(poolRequestNumber.get()); + } + + @When("^I click the delete pool request button$") + public void iClickDeletePoolRequest() { + POOL_OVERVIEW_PAGE.clickDelete(); + } + + @Then("^I am asked if I'm sure I want to delete$") + public void iAmAskedIfIWantToDelete() { + assertEquals("Are you sure you want to delete this request?", POOL_OVERVIEW_PAGE.getHeading()); + } + + @Then("^I am asked if I'm sure I want to delete this pool$") + public void iAmAskedIfIWantToDeleteThisPool() { + assertEquals("Are you sure you want to delete this pool?", POOL_OVERVIEW_PAGE.getHeading()); + } + + @When("^I click the confirm deletion button$") + public void iClickConfirmDeletion() { + POOL_OVERVIEW_PAGE.clickDelete(); + } + + @When("^I click the cancel deletion link$") + public void iClickCancelDeletion() { + POOL_OVERVIEW_PAGE.clickCancel(); + } + + @Then("^a message is displayed on the pool requests page informing me that the pool has been deleted$") + public void messageConfirmsDeletion() { + String expectedMessage = String.format("Pool %s successfully deleted", poolRequestNumber.get()); + + assertEquals(expectedMessage, POOL_REQUESTS_PAGE.getBannerMessage()); + } + + @Then("^the pool is no longer visible$") + public void poolNoLongerVisible() { + assertFalse(POOL_REQUESTS_PAGE.requestIsVisibleByNumber(poolRequestNumber.get())); + } + + @Then("^I check the selected \"([^\"]*)\" is \"([^\"]*)\"$") + public void checkTheSelectedDataItemIsCorrect(String dataItem, String selectedOption) throws Throwable { + NAV.seeText_inSameRow_asText_inPoolRequests(dataItem, selectedOption); + } + + @Then("^I click on the \"([^\"]*)\" link in the same row as \"([^\"]*)\" on Pool Requests$") + public void clickChangeLinkInSameRowAs_inPoolRequests(String link, String nextTo) throws Throwable { + NAV.clickChangeLinkInSameRowAs_inPoolRequests(link, nextTo); + } + + @Then("^the system will display non-editable information on the pool summary screen$") + public void theSystemWillDisplayNonEditableInformationOnThePoolSummaryScreen(DataTable table) throws ParseException { + Map data = table.asMap(String.class, String.class); + + assertEquals(data.get("jurorsRequested"), POOL_OVERVIEW_PAGE.getNumberOfJurorsRequested()); + assertEquals(data.get("jurorsConfirmed"), POOL_OVERVIEW_PAGE.getNumberOfJurorsConfirmed()); + assertEquals(data.get("jurorsSummoned"), POOL_OVERVIEW_PAGE.getNumberOfJurorsSummoned()); + assertEquals(data.get("currentPoolSize"), POOL_OVERVIEW_PAGE.getCurrentPoolSize()); + assertEquals(data.get("courtName"), POOL_OVERVIEW_PAGE.getCourtName()); + assertEquals(data.get("courtLocationCode"), POOL_OVERVIEW_PAGE.getCourtLocationCode()); + if (poolDate.get() != null) { + assertEquals(poolDate.get(), POOL_OVERVIEW_PAGE.getConvertedStartDate()); + } + } + + @Then("^the pool summary donut displays$") + public void thePoolSummaryDonutDisplays(DataTable table) throws ParseException { + Map data = table.asMap(String.class, String.class); + + assertEquals(data.get("summoned"), POOL_OVERVIEW_PAGE.getNumberOfJurorsSummoned()); + assertEquals(data.get("required"), POOL_OVERVIEW_PAGE.getNumberOfJurorsRequired()); + assertEquals(data.get("confirmed"), POOL_OVERVIEW_PAGE.getNumberOfJurorsConfirmed()); + assertEquals(data.get("unavailable"), POOL_OVERVIEW_PAGE.getNumberOfJurorsUnavailable()); + assertEquals(data.get("notResponded"), POOL_OVERVIEW_PAGE.getNumberOfJurorsNotResponded()); + assertEquals(data.get("surplus"), POOL_OVERVIEW_PAGE.getNumberOfJurorsSurplus()); + } + + @Then("^the system will display non-editable information on the nil pool summary screen$") + public void theSystemWillDisplayNonEditableInformationOnTheNilPoolSummaryScreen(DataTable table) throws Exception { + Map expectedData = table.asMap(String.class, String.class); + + //Converting Attendance Date to same format as Overview Page for assertion + String datePattern = "EEEEE dd MMM yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, 9); + Date actualDate = new SimpleDateFormat(datePattern).parse(selectedAttendanceDate.get()); + DateFormat dateFormat = new SimpleDateFormat(datePattern); + String startDate = dateFormat.format(actualDate); + + Map actualData = POOL_OVERVIEW_PAGE.getPoolOverviewDetails(); + assertEquals(poolRequestNumber.get(), actualData.get("poolRecord")); + assertEquals(expectedData.get("court"), actualData.get("court")); + assertEquals(expectedData.get("courtCode"), actualData.get("courtCode")); + assertEquals(startDate, actualData.get("courtStartDate")); + } + + @Then("^I do not see the nil pool status$") + public void iDoNotSeeTheNilPoolStatus() { + assertFalse(POOL_OVERVIEW_PAGE.statusExists()); + } + + @When("^I select to create a nil pool$") + public void iClickCreateNilPool() throws Throwable { + NAV.press_buttonByName("Create pool"); + GRP.click_radioButtonWithLabel("Nil pool - no jurors to be added"); + NAV.press_buttonByName("Continue"); + } + + @And("^the max number of deferrals will be displayed for the selected day$") + public void theMaxNumberOfDeferralsWillBeDisplayedForTheSelectedDay() { + // Need to know the max deferral number is + } + + @And("^I select a usable postcode from the list$") + public void iSelectAUsablePostcodeFromTheList() { + // Need to know what postcodes will be available to use. + } + + @And("^I see the pool number of the pool$") + public void iSeeThePoolNumber() { + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); + } + + @And("^I submit the pool request$") + public void iSubmitThePoolRequest() { + POOL_REQUESTS_PAGE.clickConfirm(); + // Click the confirm button + } + + @Then("^I'll go to the pool summary screen$") + public void iLlGoToThePoolSummaryScreen() { + NAV.click_link_by_text("Active pools"); + } + + @Then("^I can see that this is a nil pool$") + public void iCanSeeThisIsANilPool() { + String heading = POOL_REQUESTS_PAGE.getPageHeading(); + assertEquals("", heading); + } + + @And("^I can see a list of summoned jurors$") + public void iCanSeeAListOfSummonedJurors() { + // Need a list of jurors that could be summoned. + // Need to confirm a list of jurors are visible on the page + } + + @Then("^the pool request page will show the filtered courts$") + public void thePoolRequestPageWillShowTheFilteredCourts() { + assertEquals(summonedNumber, CORONERS_POOL_PAGE.getCoronersRowsOfCitizens().toString()); + } + + @When("^I click the link to the new pool screen$") + public void iClickTheLinkToTheNewPoolScreen() throws InterruptedException { + POOL_REQUESTS_PAGE.clickNewPoolLink(); + } + + @Then("^I am taken to the new pool screen$") + public void iShouldBeTakenToTheNewPoolScreen() { + assertEquals("Request a new pool", POOL_REQUESTS_PAGE.getPageHeading()); + } + + @Then("^I am taken to summons management$") + public void iShouldBeTakenToSummonsManagement() { + assertEquals("Your work", POOL_REQUESTS_PAGE.getPageHeading()); + } + + @And("^I should see the court to request the pool from as \"([^\"]*)\"$") + public void iShouldSeeTheCourtToRequestThePoolFrom(final String court) { + String actualCourt = POOL_REQUESTS_PAGE.getRequestedCourtName(); + assertEquals(court, actualCourt); + } + + @And("^I see the attendance date of the pool$") + public void iShouldSeeTheAttendanceDateOfThePool() { + //Takes current date and adds 9 weeks to get expected date + String datePattern = "EEEEE dd MMMMM yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, 9); + String expectedDate = new SimpleDateFormat(datePattern).format(date.getTime()); + + String actualDate = POOL_REQUESTS_PAGE.getRequestedCourtDate(); + + assertEquals(expectedDate, actualDate); + + selectedAttendanceDate.set(actualDate); + } + + @When("^I click the change link for the chosen court$") + public void iClickTheChangeLinkForTheChosenCourt() { + POOL_REQUESTS_PAGE.clickChangeCourt(); + } + + @And("^select another available court \"([^\"]*)\"$") + public void selectAnotherAvailableCourt(final String court) { + POOL_REQUESTS_PAGE.enterAndSelectCourt(court); + POOL_REQUESTS_PAGE.confirmNewCourtSelection(); + } + + @Then("^the court to request the pool from has changed to \"([^\"]*)\"$") + public void theCourtToRequestThePoolFromHasChanged(final String court) { + String actualCourt = POOL_REQUESTS_PAGE.getRequestedCourtName(); + assertEquals(court, actualCourt); + } + + @When("^I see the default attendance date$") + public void iSeeTheDefaultAttendanceDate() { + // Need the element for the attendance date + // Default attendance date should be set to 9 weeks from current date + } + + @When("^I click the change link for the attendance date$") + public void iClickTheChangeLinkForTheAttendanceDate() { + POOL_REQUESTS_PAGE.clickChangeDate(); + } + + @And("^I select a new date$") + public void iSelectANewDate() { + String datePattern = "dd/MM/yyyy"; + String fullDatePattern = "EEEEE dd MMMMM yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, 10); + selectedAttendanceDate.set(new SimpleDateFormat(fullDatePattern).format(date.getTime())); + String newDate = new SimpleDateFormat(datePattern).format(date.getTime()); + + POOL_REQUESTS_PAGE.enterNewDate(newDate); + POOL_REQUESTS_PAGE.confirmNewDate(); + + } + + @And("^I select a new date \"([^\"]*)\" week in the future$") + public void iSelectANewDate(int weekInFuture) { + String datePattern = "dd/MM/yyyy"; + String fullDatePattern = "EEEEE dd MMMMM yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, weekInFuture); + selectedAttendanceDate.set(new SimpleDateFormat(fullDatePattern).format(date.getTime())); + String newDate = new SimpleDateFormat(datePattern).format(date.getTime()); + + POOL_REQUESTS_PAGE.enterNewDate(newDate); + POOL_REQUESTS_PAGE.confirmNewDate(); + + } + + @Then("^I should have a new attendance date$") + public void iShouldHaveANewAttendanceDate() { + String datePattern = "EEEEE dd MMMMM yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, 10); + String expectedDate = new SimpleDateFormat(datePattern).format(date.getTime()); + + String actualDate = POOL_REQUESTS_PAGE.getRequestedCourtDate(); + + assertEquals(expectedDate, actualDate); + } + + @Then("^I should see the attendance time present is \"([^\"]*)\"$") + public void iShouldSeeTheAttendanceTimePresent(String attendTime) { + final String actualAttendanceTime = POOL_REQUESTS_PAGE.getAttendanceTime(); + assertEquals(attendTime, actualAttendanceTime); + } + @When("^I click the change link for the attendance time$") + public void iClickTheChangeLinkForTheAttendanceTime() { + POOL_REQUESTS_PAGE.clickChangeTime(); + } + + @And("^I select a new time$") + public void iSelectANewTime() { + POOL_REQUESTS_PAGE.fillTime("10", "00"); + POOL_REQUESTS_PAGE.confirmNewTimeEntry(); + // How will time be presented to select? + } + + @Then("^i should have set a new attendance time$") + public void iShouldHaveSetANewAttendanceTime() { + final String actualAttendanceTime = POOL_REQUESTS_PAGE.getAttendanceTime(); + + assertEquals("10:00", actualAttendanceTime); + } + + @When("^I click the change link for the pool number$") + public void iClickTheChangeLinkForThePoolNumber() { + POOL_REQUESTS_PAGE.clickChangePoolNumber(); + } + + @When("^I do not see Change link in the same row as Pool number$") + public void doNotSeeChangePoolNumberLink() { + assertTrue("change pool number is visible", POOL_REQUESTS_PAGE.changePoolNumberInvisible()); + } + + @When("^I input a pool number that is already being used$") + public void inputPoolNumberAlreadyInUse() { + POOL_REQUESTS_PAGE.inputExistingPoolNumber(); + } + + @When("^I change the pool type to \"([^\"]*)\"$") + public void iChangeThePoolTypeTo(String courtType) throws Throwable { + // Need to change the pool type. Is it done by change link? Dropdown box? + if (courtType.equals("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + + if (courtType.equals("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + + if (courtType.equals("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + } + + @And("^I set the pool to be on call$") + public void iSetThePoolToBeOnCall() { + POOL_REQUESTS_PAGE.clickOnCallPoolCheckbox(); + } + + @When("^I set the number of jurors to \"([^\"]*)\"$") + public void iSetTheNumberOfJurorsTo(String numberOfJurors) throws Throwable { + POOL_REQUESTS_PAGE.enterNumberOfJurors(numberOfJurors); + } + + @When("^I click continue on the pool request page$") + public void iClickContinueOnPoolRequest() { + POOL_REQUESTS_PAGE.clickContinue(); + } + + @When("^I click continue on the postponement page$") + public void iClickContinueOnPostponement() { + POOL_REQUESTS_PAGE.clickContinue(); + } + + @When("^I click the create nil pool confirmation button$") + public void iClickCreateNilConfirmation() { + POOL_REQUESTS_PAGE.submitCourtDeferrals(); + } + + @Then("^I should see the check your answers page for a nil pool$") + public void iShouldSeeCheckYourAnswersForNilPool() { + final String header = POOL_REQUESTS_PAGE.getPageHeading(); + assertEquals("Check your answers", header); + final String tableHeader = POOL_REQUESTS_PAGE.getTableHeading(); + assertEquals("Nil pool details", tableHeader); + } + + @Then("^I should see an error stating the number of jurors exceeds the maximum$") + public void iShouldSeeAnErrorStatingTheNumberOfJurorsExceedsTheMaximum() { + final String errorText = POOL_REQUESTS_PAGE.getErrorSummaryText(); + assertTrue(errorText.contains("Enter a number that is less than 3,000")); + } + + @And("^I click the change link for the court deferrals$") + public void iClickTheChangeLinkForTheCourtDeferrals() { + POOL_REQUESTS_PAGE.clickToChangeDeferrals(); + } + + @And("^I change the number of court deferrals to \"([^\"]*)\"$") + public void iChangeTheNumberOfCourtDeferralsTo(String arg0) { + POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals(arg0); + POOL_REQUESTS_PAGE.submitCourtDeferrals(); + } + + @Then("^I should see an error stating the number of deferrals is too high$") + public void iShouldSeeAnErrorStatingTheNumberOfDeferralsIsTooHigh() { + final String errorText = POOL_REQUESTS_PAGE.getErrorSummaryText(); + assertTrue(errorText.contains("Enter the same or less than the number available")); + POOL_REQUESTS_PAGE.clickCancel(); + } + + @Then("^I see available deferrals count is \"([^\"]*)\"$") + public void numberOfCourtDeferralsAvailable(String numberofDeferralsDisplayed) throws Throwable { + assertEquals(numberofDeferralsDisplayed, CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); + } + + @Then("^I should see the number of court deferrals set to \"([^\"]*)\"$") + public void iShouldSeeTheNumberOfCourtDeferralsSetTo(String arg0) throws Throwable { + // Confirm that the number of court deferrals is set correctly. + throw new PendingException(); + } + + @Then("^I set Number of deferred jurors to include to \"([^\"]*)\" more than is available$") + public void setDeferralsToMoreThanIsAvailable(Integer noDeferrals) throws InterruptedException { + Integer noDefsAvailable = Integer.valueOf(CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); + Integer highDefsNo = noDefsAvailable + noDeferrals; + POOL_REQUESTS_PAGE.clickToChangeDeferrals(); + POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals(String.valueOf(highDefsNo)); + POOL_REQUESTS_PAGE.submitCourtDeferrals(); + + } + + @When("^I click the request pool button$") + public void iClickTheRequestPoolButton() throws InterruptedException { + + try { + assertTrue(CHECK_POOL_REQUEST_PAGE.poolNumberNotVisible()); + POOL_REQUESTS_PAGE.clickContinue(); + } catch (Exception e) { + poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); + POOL_REQUESTS_PAGE.clickContinue(); + } + } + + @Then("^I should be taken to the check pool request page$") + public void iShouldBeTakenToTheCheckPoolRequestPage() { + final String checkPoolRequestHeader = CHECK_POOL_REQUEST_PAGE.getHeading(); + assertEquals("Check your pool request", checkPoolRequestHeader); + } + + @And("^I should see the details of the pool$") + public void iShouldSeeTheDetailsOfThePool(DataTable table) { + Map data = table.asMap(String.class, String.class); + poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); + + assertEquals(selectedAttendanceDate.get(), CHECK_POOL_REQUEST_PAGE.getAttendanceDate()); + assertEquals(data.get("courtName"), CHECK_POOL_REQUEST_PAGE.getCourtName()); + assertEquals(data.get("poolType"), CHECK_POOL_REQUEST_PAGE.getPoolType()); + assertEquals(data.get("totalJurorsRequired"), CHECK_POOL_REQUEST_PAGE.getNumberOfJurors()); + assertEquals(data.get("numberOfDeferrals"), CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); + assertEquals(data.get("additionalJurors"), CHECK_POOL_REQUEST_PAGE.getNumberOfAdditionalJurors()); + } + + @And("^I should see the details of the nil pool$") + public void iShouldSeeTheDetailsOfTheNilPool(DataTable table) { + Map data = table.asMap(String.class, String.class); + poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); + + assertEquals(data.get("courtName"), CHECK_POOL_REQUEST_PAGE.getCourtName()); + assertEquals(data.get("poolType"), CHECK_POOL_REQUEST_PAGE.getPoolType()); + assertEquals(data.get("additionalRequirements"), CHECK_POOL_REQUEST_PAGE.getAdditionalRequirements()); + assertEquals(data.get("totalJurorsRequired"), CHECK_POOL_REQUEST_PAGE.getNumberOfJurors()); + assertEquals(data.get("numberOfDeferrals"), CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); + assertEquals(data.get("additionalJurors"), CHECK_POOL_REQUEST_PAGE.getNumberOfAdditionalJurors()); + } + + @When("^I click the change button for the check pool request page$") + public void iClickTheChangeButtonForTheCheckPoolRequestPage() { + CHECK_POOL_REQUEST_PAGE.clickChangeLink(); + } + + @And("^I edit details of the pool request$") + public void iEditDetailsOfThePoolRequest() { + POOL_REQUESTS_PAGE.enterNumberOfJurors("15"); + } + + @And("^I save the changes to the pool request$") + public void iSaveTheChangesToThePoolRequest() { + POOL_REQUESTS_PAGE.clickContinue(); + } + + @Then("^the pool request should be edited successfully$") + public void thePoolRequestShouldBeEditedSuccessfully() { + assertEquals("15", CHECK_POOL_REQUEST_PAGE.getNumberOfJurors()); + } + + @When("^I save the new pool request$") + public void iSaveTheNewPoolRequest() { + poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); + CHECK_POOL_REQUEST_PAGE.submitRequest(); + } + + @When("^I click the link for the successfully created court only pool$") + public void iClickNewlyCreatedCourtOnlyPoolLink() { + POOL_REQUESTS_PAGE.clickNewlyCreatedCourtOnlyPoolLink(); + } + + @Then("^I should be taken to the pool summary page$") + public void iShouldBeTakenToThePoolSummaryPage() { + assertEquals("Pool requests", POOL_REQUESTS_PAGE.getPageHeading()); + } + + @And("^I should see the newly created pool request$") + public void iShouldSeeTheNewlyCreatedPoolRequest(DataTable table) { + Map expectedData = table.asMap(String.class, String.class); + + Map actualData = POOL_REQUESTS_PAGE.getPoolRequestByNumber(poolRequestNumber.get()); + assertEquals(expectedData.get("court"), actualData.get("court")); + + String expectedJurorsRequired = expectedData.get("jurorsRequired"); + if (expectedJurorsRequired == null) { + expectedJurorsRequired = ""; + } + assertEquals(expectedJurorsRequired, actualData.get("jurorsRequired")); + } + + @When("^I click the link to the choose court screen$") + public void iClickTheLinkToTheChooseCourtScreen() { + // Need the element of the link to the choose court screen + } + + @When("^I click on active pools$") + public void iClickOnActivePools() { + POOL_REQUESTS_PAGE.clickActivePools(); + } + + @Then("^I see the following active pools headers$") + public void iSeeTheFollowingActivePoolsHeaders(DataTable dataTable) { + List expectedData = dataTable.asList(String.class); + List actualData = ACTIVE_POOLS_PAGE.getTableHeaders(); + expectedData.forEach( + item -> assertTrue( + "Active pools headers does not contain " + item, + actualData.contains(item) + ) + ); + } + + @Then("^the court name displayed is one of the following") + public void courtNameIsOnly(DataTable dataTable) { + List expectedData = dataTable.asList(String.class); + List actualData = ACTIVE_POOLS_PAGE.getCourtNames(); + actualData.forEach(item -> assertTrue( + "Unexpected court name in active pools", + expectedData.contains(item) + ) + ); + + } + + @When("^I click the \"([^\"]*)\" courts tab$") + public void iClickTheCrownCourtsTab(String courtType) { + POOL_REQUESTS_PAGE.clickTab(courtType + " courts"); + } + + @When("^I click on the pool number$") + public void iClickThePoolNumber() { + POOL_REQUESTS_PAGE.clickPoolNumber(poolRequestNumber.get()); + } + + @Then("^I should be on the choose court screen$") + public void iShouldBeOnTheChooseCourtScreen() { + // Need to confirm the user has landed on the choose court screen + } + + @When("^I select a court to request a pool for$") + public void iSelectACourtToRequestAPoolFor() { + // How does the user select the court? Dropdown list? Free text? + } + + @Then("^I should see the link to the request a new pool screen$") + public void iShouldSeeTheLinkToTheRequestANewPoolScreen() { + // Need the element of the link to the request a new pool screen + } + + @And("^I have navigated to the request a new pool page$") + public void iHaveNavigatedToTheRequestANewPoolPage() { + // Need to create the user journey to the request a new pool page + } + + @When("^I create a bank holiday \"([^\"]*)\" weeks in the future for court/bureau \"([^\"]*)\"$") + public void insertHolidayInTheFuture(Integer noOfWeeks, String holidayOwner) throws SQLException { + DBT.insertHolidayInTheFuture(noOfWeeks, holidayOwner); + } + + @When("^I create a bank holiday \"([^\"]*)\" Mondays in the future for court/bureau \"([^\"]*)\"$") + public void insertHolidayMondayInTheFuture(Integer noOfWeeks, String holidayOwner) throws SQLException { + DBT.insertHolidayMondayInTheFuture(noOfWeeks, holidayOwner); + } + + @When("^I delete bank holiday") + public void iDeleteBankHoliday() throws SQLException { + DBT.deleteHoliday(); + } + + @When("^I have deleted all holidays") + public void deleteAllHolidays() throws SQLException { + DBT.deleteAllHolidays(); + } + + @Then("^I should see a warning stating I have selected a bank holiday") + public void iShouldSeeAWarningStatingIHaveSelectedABankHoliday() { + String actualHeading = POOL_REQUESTS_PAGE.getPageHeading(); + String actualWarning = POOL_REQUESTS_PAGE.getAttendanceDateWarning(); + + assertTrue(actualWarning.contains("s a UK bank holiday. You can continue or go back and change the date.")); + assertEquals("The attendance date is a bank holiday", actualHeading); + } + + @When("^I set the attendance date to a weekend$") + public void iSetTheAttendanceDateToAWeekend() { + String datePattern = "dd/MM/yyyy"; + String fullDatePattern = "EEEEE dd MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, 9); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateWeekend = localDate.with(TemporalAdjusters.next(DayOfWeek.SATURDAY)); + Date weekendDate = Date.from(localDateWeekend.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + selectedAttendanceDate.set(new SimpleDateFormat(fullDatePattern).format(weekendDate.getTime())); + String weekendDateValue = new SimpleDateFormat(datePattern).format(weekendDate.getTime()); + + POOL_REQUESTS_PAGE.enterNewDate(weekendDateValue); + POOL_REQUESTS_PAGE.confirmNewDate(); + } + + @Then("^I should see a warning stating I have selected a weekend$") + public void iShouldSeeAWarningStatingIHaveSelectedAWeekend() { + String actualHeading = POOL_REQUESTS_PAGE.getPageHeading(); + String actualWarning = POOL_REQUESTS_PAGE.getAttendanceDateWarning(); + + assertEquals("You’ve selected an attendance date that’s a Saturday or a Sunday. You can continue or go back and change the date.", actualWarning); + assertEquals("The attendance date is a weekend", actualHeading); + + } + + @When("^I click the link to continue from the warning page$") + public void iClickTheLinkToContinue() { + POOL_REQUESTS_PAGE.continueFromWarningPage(); + + } + + @Given("^a transferred juror record exists with both court and bureau records$") + public void transferredJurorRecordExistsWithCourtAndBureauRecords() { + jurorRecordNumber = "987654321"; + } + + @Given("^a juror record which is valid for paper summons reply exists$") + public void paperSummonsJurorExists() { + jurorRecordNumber = "111000002"; + } + + @Given("^a juror record of \"([^\"]*)\" has been entered which is valid for paper summons reply$") + public void createPaperSummonsReplyJuror(String newJurorRecordNumber) throws SQLException { + DBT.insertNewPaperSummonsReply(newJurorRecordNumber, "415230501"); + summonsReplyNumber = newJurorRecordNumber; + } + + @Given("^a juror record of \"([^\"]*)\" has been entered which is valid for paper summons reply for the pool$") + public void createPaperSummonsReplyJurorForPool(String newJurorRecordNumber) throws SQLException { + DBT.insertNewPaperSummonsReply(newJurorRecordNumber, poolNumber.get()); + summonsReplyNumber = newJurorRecordNumber; + } + + @Given("^a juror record of \"([^\"]*)\" has been entered which is valid for paper summons reply with name change$") + public void createPaperSummonsReplyJurorChangedName(String newJurorRecordNumber) throws SQLException { + DBT.insertNewPaperSummonsReplyWithResponseName(newJurorRecordNumber, "Changed", "Name", "415230501"); + summonsReplyNumber = newJurorRecordNumber; + } + + @Given("^CJS employment, reasonable adjustments reasons have been entered for \"([^\"]*)\"$") + public void cjsAndAdjustmentsEntered(String jurorNumber) throws SQLException { + DBT.insertReasonableAdjustments(jurorNumber); + DBT.insertCJSStatus(jurorNumber); + } + + @Given("^a juror record of \"([^\"]*)\" has been entered which is valid for summons reply$") + public void createSummonsReplyJuror(String newJurorRecordNumber) throws SQLException { + DBT.insertNewSummonsReply(newJurorRecordNumber); + summonsReplyNumber = newJurorRecordNumber; + jurorPartNumber.set(newJurorRecordNumber); + } + + @Given("^a juror record of \"([^\"]*)\" has been entered with an excusal reason of \"([^\"]*)\"$") + public void createSummonsReplyExcusalJuror(String newJurorRecordNumber, String excusalReason) throws SQLException { + DBT.insertNewSummonsReplyExcusal(newJurorRecordNumber, excusalReason); + summonsReplyNumber = newJurorRecordNumber; + } + + @Given("^I clear down the data for the paper juror record \"([^\"]*)\"$") + public void deletePaperSummonsJuror(String createdJurorRecordNumber) throws SQLException { + DBT.deleteNewPaperSummonsReply(createdJurorRecordNumber); + } + + @Given("^I clear down the data for the juror record \"([^\"]*)\"$") + public void deleteSummonsJuror(String createdJurorRecordNumber) throws SQLException { + DBT.deleteNewSummonsReply(createdJurorRecordNumber); + } + + @Given("^I clear down the data for the pool$") + public void deleteTestPoolAndJurors() throws SQLException { + DBT.deleteTestPoolAndJurors(poolNumber.get()); + } + + @And("^I click the More Actions button$") + public void clickMoreActions() { + VIEW_SUMMONS_REPLY.clickMoreActions(); + } + + @And("^I click Awaiting Information$") + public void clickAwaitingInformation() { + VIEW_SUMMONS_REPLY.clickAwaitingInformation(); + } + + @Then("^I mark this reply as awaiting information from \"([^\"]*)\"$") + public void markAwaitingInformationFrom(String awaitingInformationFrom) { + try { + if (Objects.equals(awaitingInformationFrom, "Court")) { + System.out.println("Selecting Court"); + VIEW_SUMMONS_REPLY.clickAwaitingCourt(); + } + ; + if (Objects.equals(awaitingInformationFrom, "Juror")) { + VIEW_SUMMONS_REPLY.clickAwaitingJuror(); + } + if (Objects.equals(awaitingInformationFrom, "Translation unit")) { + VIEW_SUMMONS_REPLY.clickAwaitingTransfer(); + } + } catch (Exception e) { + System.out.println("Invalid Reply Type entered - " + e); + } + } + + @When("^the user searches for the juror record from the global search bar$") + public void userSearchesForJurorRecord() throws InterruptedException { + JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch(jurorPartNumber.get()); + } + + @When("^the user searches for juror record \"([^\"]*)\" from the global search bar$") + public void userSearchesForJurorRecord(String partNo) throws InterruptedException { + JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch(partNo); + + } + + @And("^I search for juror \"([^\"]*)\"$") + public void clickGlobalSearch(String jurorNumber) { + JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch(jurorNumber); + } + + @And("^I search for pool number$") + public void globalSearchForPool() { + JUROR_RECORD_SEARCH.searchForRecordFromPoolSearch(poolNumber.get()); + } + + @When("^I check the search juror button is not visible$") + public void searchJurorButtonNotVisible() { + assertTrue("search button was visible", JUROR_RECORD_SEARCH.searchButtonInvisible()); + } + + @When("^I check the Apps button is not visible$") + public void appsButtonInvisible() { + assertTrue("apps button is visible", HEADER_PAGE.appsButtonInvisible()); + } + + @When("^the user enters an incorrect juror record number$") + public void userEntersInvalidJurorRecordNumber() throws InterruptedException { + JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch("999999999"); + } + + @Then("^an error message is displayed explaining that there are no matching results$") + public void anErrorMessageIsDisplayedForSearch() { + String mainText = JUROR_RECORD_SEARCH.getMainBodyText(); + assertTrue(mainText.contains("There are no matching results")); + assertTrue(mainText.contains("Improve your search by:")); + assertTrue(mainText.contains("double-checking your spelling")); + assertTrue(mainText.contains("searching by the complete juror number only")); + } + + @Then("^the juror record is displayed with the following fields$") + public void jurorRecordDisplayedWithFollowingFields(DataTable table) { + Map data = table.asMap(String.class, String.class); + assertEquals(data.get("Juror number"), JUROR_RECORD_SEARCH.getJurorNumber()); + assertEquals(data.get("Juror status"), JUROR_RECORD_SEARCH.getJurorStatus()); + assertEquals(data.get("Pool number"), JUROR_RECORD_SEARCH.getPoolNumber()); + assertEquals(DBT.getTodaysDateEEEddMMMyyyy(), JUROR_RECORD_SEARCH.getCourtStartDate()); + assertEquals(data.get("Court name"), JUROR_RECORD_SEARCH.getCourtName()); + } + + @Given("^multiple pool records from multiple courts exist$") + public void multiplePoolRecordsMultipleCourtsExist() { + //TODO - data creation when we have launch darkly/AD + } + + @When("^the user filters by \"([^\"]*)\"$") + public void userEntersIntoFilterField(String court) throws InterruptedException { + POOL_REQUESTS_PAGE.enterFilterString(court); + POOL_REQUESTS_PAGE.clickFilterAutocompleteOption(); + POOL_REQUESTS_PAGE.clickFilterButton(); + } + + @Then("^only records from \"([^\"]*)\" are displayed$") + public void onlyRecordsFromAreDisplayed(String expectedCourt) { + List courtList = POOL_REQUESTS_PAGE.getPoolRequestCourtNames(); + courtList.forEach( + e -> assertEquals(expectedCourt, e) + ); + } + + @Then("^no records are displayed$") + public void noRecordsAreDisplayed() { + List courtList = POOL_REQUESTS_PAGE.getPoolRequestCourtNames(); + assertTrue(courtList.isEmpty()); + } + + @Then("^only active records from \"([^\"]*)\" are displayed$") + public void onlyActiveRecordsFromAreDisplayed(String expectedCourt) { + List courtList = POOL_REQUESTS_PAGE.getActivePoolRequestCourtNames(); + courtList.forEach( + e -> assertEquals(expectedCourt, e) + ); + } + + @When("^I enter a juror details phone number of \"([^\"]*)\"$") + public void enterReplyDetailsPhone(String phone) { + SUMMONS_REPLY.enterPrimaryPhone(phone); + } + + @Then("^an error is displayed on the juror summons reply page saying \"([^\"]*)\"$") + public void replyDetailsErrorIsDisplayed(String error) { + assertTrue(SUMMONS_REPLY.getErrors().contains(error)); + } + + @When("^I enter a juror details email of \"([^\"]*)\"$") + public void enterReplyDetailsEmail(String email) { + SUMMONS_REPLY.enterEmail(email); + } + + @When("^I click save on the juror details change page$") + public void saveJurorDetailsChange() { + SUMMONS_REPLY.saveChanges(); + } + + @When("^I enter a first name of \"([^\"]*)\" on the juror summons reply change name page$") + public void enterJurorDetailsFirstName(String name) { + SUMMONS_REPLY.enterFirstName(name); + + } + + @When("^I enter an address line 1 of \"([^\"]*)\" on the juror summons reply change address page$") + public void enterJurorDetailsAddress1(String address) { + SUMMONS_REPLY.enterAddressLineOne(address); + } + + @Then("^I see a name of \"([^\"]*)\" on the juror details reply page$") + public void iSeeNameOfJurorDetails(String name) { + assertTrue(SUMMONS_REPLY.getJurorName().contains(name)); + } + + @Then("^I see an address of \"([^\"]*)\" on the juror details reply page$") + public void iSeeAddressOfJurorDetails(String address) { + assertTrue(SUMMONS_REPLY.getJurorAddress().contains(address)); + } + + @When("^I click the change name link on the juror details reply page$") + public void clickChangeJurorDetailsName() { + SUMMONS_REPLY.clickChangeName(); + } + + @When("^I click the change address link on the juror details reply page$") + public void clickChangeJurorDetailsAddress() { + SUMMONS_REPLY.clickChangeAddress(); + } + + @Then("^no active records are displayed$") + public void noActiveRecordsAreDisplayed() { + List courtList = POOL_REQUESTS_PAGE.getActivePoolRequestCourtNames(); + assertTrue(courtList.isEmpty()); + } + + @And("^I click the Enter summons reply button$") + public void clickEnterSummonsReplyButton() { + SUMMONS_REPLY.clickEnterSummonsReplyButton(); + } + + @Then("^the juror details form is displayed$") + public void verifyEnterSummonsFormDisplayed() { + assertEquals("Juror details", SUMMONS_REPLY.getHeadingText()); + } + + @Then("^the juror details form is not displayed$") + public void verifyEnterSummonsFormNotDisplayed() { + assertNotEquals("Juror details", SUMMONS_REPLY.getHeadingText()); + } + + @When("^I fill in all of the juror details for the summons reply$") + public void fillJurorDetailsForSummonsReply() { + SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); + + SUMMONS_REPLY.enterPrimaryPhone("0777777777"); + SUMMONS_REPLY.enterSecondaryPhone("0777777771"); + SUMMONS_REPLY.enterEmail("test@test.com"); + } + + @And("^I enter a date of birth in the summons reply that will make the juror too old$") + public void enterDateOfBirthTooOld() { + SUMMONS_REPLY.enterDateOfBirth("01/01/1945"); + + } + + @And("^I change a date of birth of a juror that will make more than 75 years$") + public void enterDateOfBirthTMorethan75Years() { + String datePattern = "dd/MM/yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.MONTH, 1); + date.add(Calendar.YEAR, -76); + String enterDOBDate = new SimpleDateFormat(datePattern).format(date.getTime()); + SUMMONS_REPLY.enterDateOfBirth(enterDOBDate); + } + + @And("^I enter a date of birth in the summons reply that will make the juror too young$") + public void enterDateOfBirthTooYoung() { + int yearYoung = ((Year.now().getValue()) - 16); + + SUMMONS_REPLY.enterDateOfBirth("01/01/" + yearYoung); + + } + + @And("^I enter a date of birth that will make the juror between 18 and 75$") + public void enterDateOfBirthJustRight() { + int yearYoung = ((Year.now().getValue()) - 30); + + SUMMONS_REPLY.enterDateOfBirth("18/07/" + yearYoung); + + } + + @And("^I click continue on the juror summons reply page$") + public void clickContinueOnJurorSummonsReplyPage() { + SUMMONS_REPLY.clickContinue(); + } + + @Then("^the juror summons reply eligibility page is displayed$") + public void verifyJurorSummonsReplyEligibilityPageDisplayed() { + assertEquals("Eligibility", SUMMONS_REPLY.getHeadingText()); + } + + @When("^I answer the juror summons reply eligibility questions$") + public void answerJurorSummonsReplyEligibilityQuestions() { + SUMMONS_REPLY.clickLivedConsecutivelyYes(); + SUMMONS_REPLY.clickMentalHealthActNo(); + SUMMONS_REPLY.clickLackCapacityNo(); + SUMMONS_REPLY.clickOnBailNo(); + SUMMONS_REPLY.clickCriminalOffenceNo(); + } + + @Then("^the juror summons reply types page is displayed$") + public void verifyJurorSummonsReplyTypesPageDisplayed() { + assertEquals("Reply types", SUMMONS_REPLY.getHeadingText()); + } + + @When("^I select that the juror can serve on the summons date$") + public void selectJurorCanServeOnSummonsDate() { + SUMMONS_REPLY.clickCanServeDate(); + } + + @Then("^the juror summons reply CJS employment page is displayed$") + public void verifyJurorSummonsReplyCJSEmploymentPageDisplayed() { + assertEquals("CJS employment", SUMMONS_REPLY.getHeadingText()); + } + + @When("^I select that the juror has not worked in the criminal justice system$") + public void selectJurorNotWorkedInCriminalJusticeSystem() { + SUMMONS_REPLY.clickCjsEmploymentNo(); + } + + @When("^I select that the juror has worked for the police force$") + public void yesToPoliceForce() { + SUMMONS_REPLY.clickCjsEmploymentYes(); + SUMMONS_REPLY.selectPoliceForceYes(); + } + + @When("^I enter over 2000 characters in the Which police force\\? text box$") + public void over2000charactersPolice() { + String longText = StringUtils.repeat("Test", 501); + SUMMONS_REPLY.enterPoliceForceDetails(longText); + } + + @Then("^the juror summons reply reasonable adjustments page is displayed$") + public void verifyJurorSummonsReplyReasonableAdjustmentsPageDisplayed() { + assertEquals("Reasonable adjustments", SUMMONS_REPLY.getHeadingText()); + } + + @When("^I select that the juror does not need adjustments$") + public void selectJurorDoesNotNeedAdjustments() { + SUMMONS_REPLY.clickAdjustmentsNo(); + } + + @When("^I select that the juror wants communications in Welsh$") + public void selectJurorWantsWelshComms() { + SUMMONS_REPLY.clickWelsh(); + } + + @Then("^the juror summons reply Signature page is displayed$") + public void verifyJurorSummonsReplySignaturePageDisplayed() { + assertEquals("Signature", SUMMONS_REPLY.getHeadingText()); + } + + @When("^I select that the summons reply has been signed$") + public void selectSummonsReplyHasBeenSigned() { + SUMMONS_REPLY.clickSignedYes(); + } + + @And("^I click done on the juror summons reply page$") + public void clickDoneOnJurorSummonsReplyPage() { + SUMMONS_REPLY.clickDoneButton(); + } + + @Then("^the view summons reply page is displayed$") + public void verifyViewSummonsReplyPageDisplayed() { + // TODO - when view is completed + } + + @Given("^a standard paper summons reply has been entered$") + public void standardPaperSummonsHasBeenEntered() { + summonsReplyNumber = "111000000"; + } + + + @Given("^I navigate to the paper summons reply$") + public void iNavigateToThePaperSummonsReply() { + String currentUrl = webDriver.getCurrentUrl(); + String protocol = NAV.getProtocolFromURLString(currentUrl); + String subUrl = currentUrl.split("https?://")[1].split("/")[0]; + webDriver.get(protocol + subUrl + String.format("/summons-replies/response/%s/paper", summonsReplyNumber)); + } + + @Given("^I navigate to the summons reply$") + public void iNavigateToTheSummonsReply() { + String currentUrl = webDriver.getCurrentUrl(); + String protocol = NAV.getProtocolFromURLString(currentUrl); + String subUrl = currentUrl.split("https?://")[1].split("/")[0]; + webDriver.get(protocol + subUrl + String.format("/response/%s", summonsReplyNumber)); + } + + @When("^I select Process reply$") + public void selectProcessReply() throws Throwable { + NAV.press_buttonByName("Process reply"); + } + + @When("^I select the Excusal radio button$") + public void selectExcusal() { + SUMMONS_REPLY.selectExcusalRadio(); + } + + @When("^I click continue on the process reply page$") + public void clickContinueProcessReply() { + SUMMONS_REPLY.clickContinue(); + } + + @When("^I select the Grant Excusal radio button$") + public void selectGrantExcusalRadio() { + SUMMONS_REPLY.selectGrantExcusalRadio(); + } + + @Then("^I see the excusal success message for \"([^\"]*)\"$") + public void iSeeExcusalSuccessMessage(String excusalReason) { + String bannerText = SUMMONS_REPLY.getResponseBannerText(); + assertTrue(bannerText.contains("successfully processed")); + assertTrue(bannerText.contains("Excusal granted")); + assertTrue(bannerText.contains(excusalReason)); + } + + @And("^I see the name of the juror on the page header$") + public void iSeeTheJurorsNameInTheHeader() { + assertTrue("The Juror's name is NOT present in the header.", VIEW_SUMMONS_REPLY.jurorNameHeaderIsPresent()); + } + + @And("^I see the reply status on the page$") + public void iSeeTheReplyStatus() { + originalReplyStatus = VIEW_SUMMONS_REPLY.getReplyStatus(); + } + + @And("^I see the reply status has updated to \"([^\"]*)\"$") + public void replyStatusHasBeenUpdated(String updatedReplyStatus) { + assertEquals("Reply Status is not as expected", updatedReplyStatus, VIEW_SUMMONS_REPLY.getReplyStatus()); + } + + @Then("^I see the following summons reply details under the juror details tab$") + public void iSeeTheFollowingSummonsReplyDetailsUnderJurorDetails(DataTable dataTable) { + Map expectedData = dataTable.asMap(String.class, String.class); + Map actualData = VIEW_SUMMONS_REPLY.getJurorDetails(); + assertEquals(expectedData.get("jurorName"), actualData.get("jurorName")); + assertEquals(expectedData.get("jurorAddress"), actualData.get("jurorAddress")); + assertEquals(expectedData.get("jurorDob"), actualData.get("jurorDob")); + assertEquals(expectedData.get("jurorMainPhone"), actualData.get("jurorMainPhone")); + assertEquals(expectedData.get("jurorAltPhone"), actualData.get("jurorAltPhone")); + assertEquals(expectedData.get("jurorEmail"), actualData.get("jurorEmail")); + } + + @And("^I see the reply \"([^\"]*)\" on the response is \"([^\"]*)\"$") + public void replyTypeStatus(String flag, String value) { + + if (flag.equals("type")) + assertEquals("Reply " + flag + " is not as expected", value, VIEW_SUMMONS_REPLY.getTypeValue()); + + if (flag.equals("status")) + assertEquals("Reply " + flag + " is not as expected", value, VIEW_SUMMONS_REPLY.getStatusValue()); + } + + @Then("^I see the following summons reply details under the eligibility tab$") + public void iSeeTheFollowingSummonsReplyDetailsUnderEligibilityDetails(DataTable dataTable) { + Map expectedData = dataTable.asMap(String.class, String.class); + Map actualData = VIEW_SUMMONS_REPLY.getJurorEligibility(); + + assertEquals(expectedData.get("jurorResidency"), actualData.get("jurorResidency")); + assertEquals(expectedData.get("jurorMca"), actualData.get("jurorMca")); + assertEquals(expectedData.get("jurorBail"), actualData.get("jurorBail")); + assertEquals(expectedData.get("jurorConvictions"), actualData.get("jurorConvictions")); + } + + @When("^I click the juror details eligibility tab$") + public void iClickTheEligibilityTab() { + VIEW_SUMMONS_REPLY.clickEligibilityTab(); + } + + @When("^I click the juror details deferral tab$") + public void iClickTheDeferralTab() { + VIEW_SUMMONS_REPLY.clickDeferralTab(); + } + + @Then("^I see the deferral status is \"([^\"]*)\"$") + public void iSeeTheDeferralStatusIs(String status) { + status = status.replace("\\n", "\n").replace("\\", ""); + assertEquals(status, VIEW_SUMMONS_REPLY.getDeferral()); + } + + @When("^I click the juror details CJS tab$") + public void iClickTheCJSTab() { + VIEW_SUMMONS_REPLY.clickCjsTab(); + } + + @Then("^I see the CJS status is \"([^\"]*)\"$") + public void iSeeTheCJSStatusIs(String status) { + // This is not nice, but I believe there's a bug in Cucumber making it necessary + status = status.replace("\\n", "\n").replace("\\", ""); + assertEquals(status, VIEW_SUMMONS_REPLY.getCjsStatus()); + } + + @Then("^I see a previous name of \"([^\"]*)\"$") + public void iSeePreviousNameOf(String previousName) { + // This is not nice, but I believe there's a bug in Cucumber making it necessary + previousName = previousName.replace("\\n", "\n").replace("\\", ""); + assertEquals(previousName, VIEW_SUMMONS_REPLY.getPreviousName()); + } + + @When("^I click the juror details adjustments tab$") + public void iClickTheAdjustmentsTab() { + VIEW_SUMMONS_REPLY.clickAdjustmentsTab(); + } + + @Then("^I see the adjustments status is \"([^\"]*)\"$") + public void iSeeTheAdjustmentsStatusIs(String status) { + // This is not nice, but I believe there's a bug in Cucumber making it necessary + status = status.replace("\\n", "\n").replace("\\", ""); + assertEquals(status, VIEW_SUMMONS_REPLY.getAdjustmentStatus()); + } + + @When("^I click the juror details signature tab$") + public void iClickTheSignatureTab() { + VIEW_SUMMONS_REPLY.clickSignatureTab(); + } + + @Then("^I see the signature status is \"([^\"]*)\"$") + public void iSeeTheSignatureStatusIs(String status) { + assertEquals(status, VIEW_SUMMONS_REPLY.getSignatureStatus()); + } + + @Given("^I navigate to the pool search screen$") + public void navigateToPoolSearch() { + iNavigateToThePoolRequestScreen(); + POOL_REQUESTS_PAGE.clickSearchTab(); + } + + @When("^I enter the pool number \"([^\"]*)\" on the pool search screen$") + public void enterPoolNumberInSearch(String poolNo) { + POOL_SEARCH.enterPoolNo(poolNo); + } + + @When("^I enter the pool number of the pool I have just created on the pool search screen$") + public void enterCreatedPoolNumberInSearch() { + POOL_SEARCH.enterPoolNo(poolNumber.get()); + } + + @When("^I select the newly created pool from the reassign page$") + public void selectPoolFromReassignnSearchList() { + POOL_SEARCH.clickPoolNumberInSearchList(poolNumber.get()); + } + + @When("^I enter a location code of \"([^\"]*)\" for the pool search$") + public void enterLocationCodeInPoolSearch(String locationCode) { + POOL_SEARCH.enterLocationCode(locationCode); + } + + @When("^I enter a date of \"([^\"]*)\" for the pool search$") + public void enterPoolDateInSearch(String date) { + POOL_SEARCH.enterServiceStartDate(date); + + } + + @When("^I search for the pool$") + public void clickPoolSearch() { + POOL_SEARCH.clickContinue(); + } + + @When("^I expand the pool search advanced search criteria$") + public void expandPoolSearchAdvanced() { + POOL_SEARCH.clickAdvancedSearch(); + } + + @When("^I select the Requested option in the advanced pool search section$") + public void selectRequestedPoolSearch() { + POOL_SEARCH.clickPoolRequested(); + } + + @When("^I select the Active option in the advanced pool search section$") + public void selectActivePoolSearch() { + POOL_SEARCH.clickPoolActive(); + } + + @When("^I select the Completed option in the advanced pool search section$") + public void selectCompletedPoolSearch() { + POOL_SEARCH.clickPoolCompleted(); + } + + @When("^I select the With the Bureau option in the advanced pool search section$") + public void selectWithTheBureauPoolSearch() { + POOL_SEARCH.clickWithTheBureau(); + } + + @When("^I select the At Court option in the advanced pool search section$") + public void selectAtCourtPoolSearch() { + POOL_SEARCH.clickAtCourt(); + } + + @When("^I select the Crown Court option in the advanced pool search section$") + public void selectCrownCourtPoolSearch() { + POOL_SEARCH.clickCrownCourt(); + } + + @When("^I select the Civil Court option in the advanced pool search section$") + public void selectCivilCourtPoolSearch() { + POOL_SEARCH.clickCivilCourt(); + } + + @When("^I select the High Court option in the advanced pool search section$") + public void selectHighCourtPoolSearch() { + POOL_SEARCH.clickHighCourt(); + } + + @When("^I select all the tick boxes in the advanced search section$") + public void selectAllAdvancedTickBoxes() { + //Pool Status + POOL_SEARCH.clickPoolRequested(); + POOL_SEARCH.clickPoolActive(); + POOL_SEARCH.clickPoolCompleted(); + + //Pool Stage + POOL_SEARCH.clickWithTheBureau(); + POOL_SEARCH.clickAtCourt(); + + //Pool Type + POOL_SEARCH.clickCrownCourt(); + POOL_SEARCH.clickCivilCourt(); + POOL_SEARCH.clickHighCourt(); + } + + @Then("^all the tick boxes in the advanced search section are still selected$") + public void allTheAdvancedTickBoxesAreSelected() { + //Pool Status + assertTrue(POOL_SEARCH.poolRequestedIsSelected()); + assertTrue(POOL_SEARCH.poolActiveIsSelected()); + assertTrue(POOL_SEARCH.poolCompletedIsSelected()); + + //Pool Stage + assertTrue(POOL_SEARCH.withTheBureauIsSelected()); + assertTrue(POOL_SEARCH.atCourtIsSelected()); + + //Pool Type + assertTrue(POOL_SEARCH.crownCourtIsSelected()); + assertTrue(POOL_SEARCH.civilCourtIsSelected()); + assertTrue(POOL_SEARCH.highCourtIsSelected()); + } + + @Then("^the pool is displayed$") + public void thePoolIsDisplayed() { + assertTrue(POOL_SEARCH.poolRecordIsDisplayed()); + } + + @Then("^no pool search result is found$") + public void noPoolSearchFound() { + assertEquals("There are no matching results", POOL_SEARCH.getPoolSearchErrorText()); + } + + @Then("^the pool search results are found$") + public void poolSearchFound() { + Integer numberOfResultsInHeader = Integer.valueOf(POOL_SEARCH.getPoolSearchResultText().replaceAll("[^0-9]", "")); + assertEquals(numberOfResultsInHeader, POOL_SEARCH.getPoolSearchNumberOfResults()); + } + + @Then("^I am on the modernisation version of View Summons Reply$") + public void iAmOnModernisationVersionOfSummonsReply() { + NAV.waitForPageLoad(); + assertTrue(VIEW_SUMMONS_REPLY.seeSummonsReplyTag()); + assertTrue(VIEW_SUMMONS_REPLY.seeReplyMethodLabel()); + assertTrue(VIEW_SUMMONS_REPLY.seeServiceStartDateLabel()); + } + + @Then("^I see Reply Method is \"([^\"]*)\"$") + public void replyMethodIs(String replyMethod) { + assertEquals(replyMethod, VIEW_SUMMONS_REPLY.seeReplyMethodValue()); + } + + @Then("^I see assigned to is \"([^\"]*)\"$") + public void replyIsAssignedTo(String staff) { + assertEquals(staff, VIEW_SUMMONS_REPLY.getAssignedToStaff()); + } + + @And("^I am asked if the date of birth is correct$") + public void iAmAskedIfTheDateOfBirthIsCorrect() { + assertEquals("Is their date of birth correct?", VIEW_SUMMONS_REPLY.ineligibilityAgeConfirmHeaderText()); + } + + @Then("^I click yes to disqualify the juror$") + public void iClickYesToDisqualifyTheJuror() { + VIEW_SUMMONS_REPLY.clickDisqualifyButton(); + } + + @Then("^I click no to change the date of birth to the correct date$") + public void iClickNoToChangeTheDateOfBirthToTheCorrectDate() { + VIEW_SUMMONS_REPLY.clickChangeDateLink(); + } + + @And("^I see the juror status has updated to \"([^\"]*)\"$") + public void iSeeTheJurorStatusHasUpdatedTo(String jurorStatus) { + assertEquals(jurorStatus, VIEW_SUMMONS_REPLY.getJurorStatus()); + } + + @And("^I see the super urgent flag$") + public void iSeeTheSuperUrgentFlag() { + assertEquals("SUPER URGENT", SUMMONS_REPLY.getSuperUrgentFlag()); + } + + @And("^I see \"([^\"]*)\" in the response banner$") + public void iSeeResponseBannerText(String bannerText) { + assertEquals(bannerText, SUMMONS_REPLY.getResponseBannerText()); + } + + @And("^I see \"([^\"]*)\" in the pool banner$") + public void iSeePoolBannerText(String bannerText) { + assertEquals(bannerText, SUMMONS_REPLY.getResponseBannerText()); + } + + @And("^I see the process reply button$") + public void iSeeTheProcessReplyButton() { + assertTrue(SUMMONS_REPLY.processReplyButtonIsPresent()); + } + + @And("^I do not see the process reply button$") + public void iDoNotSeeTheProcessReplyButton() { + assertFalse(SUMMONS_REPLY.processReplyButtonIsPresent()); + } + + @And("^I record an unhappy path paper summons response$") + public void iRecordUnhappyPathPaperResponse() throws Throwable { + SUMMONS_REPLY.clickEnterSummonsReplyButton(); + + SUMMONS_REPLY.clickChangeName(); + NAV.set_valueTo("First name", "Changed fname"); + NAV.set_valueTo("Last name", "Changed lname"); + SUMMONS_REPLY.saveChanges(); + NAV.waitForPageLoad(); + + SUMMONS_REPLY.clickChangeAddress(); + NAV.set_valueTo("Address line 1", "Changed address line 1"); + SUMMONS_REPLY.saveChanges(); + NAV.waitForPageLoad(); + + SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); + + SUMMONS_REPLY.enterPrimaryPhone("0777777777"); + SUMMONS_REPLY.enterSecondaryPhone("0777777771"); + SUMMONS_REPLY.enterEmail("test@test.com"); + + NAV.check_checkbox("Yes, send Welsh language communications"); + + NAV.set_valueTo("Relationship to juror", "Spouse"); + SUMMONS_REPLY.selectThirdPartyReasonNotHere(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickLivedConsecutivelyNo(); + SUMMONS_REPLY.clickMentalHealthActYes(); + SUMMONS_REPLY.clickLackCapacityYes(); + SUMMONS_REPLY.clickOnBailYes(); + SUMMONS_REPLY.clickCriminalOffenceYes(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickDeferralRequest(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCjsEmploymentYes(); + NAV.check_checkbox("Police force"); + NAV.set_valueTo("Which police force?", "West Midlands Police"); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickAdjustmentsYes(); + NAV.set_valueTo("What help does the juror need at court?", "Reasonable adjustments reasons"); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickSignedNo(); + SUMMONS_REPLY.clickDoneButton(); + } + + @And("^I record a happy path paper summons response$") + public void iRecordHappyPathPaperResponse() throws Throwable { + SUMMONS_REPLY.clickEnterSummonsReplyButton(); + + SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); + + SUMMONS_REPLY.enterPrimaryPhone("0777777777"); + SUMMONS_REPLY.enterSecondaryPhone("0777777771"); + SUMMONS_REPLY.enterEmail("test@test.com"); + + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickLivedConsecutivelyYes(); + SUMMONS_REPLY.clickMentalHealthActNo(); + SUMMONS_REPLY.clickLackCapacityNo(); + SUMMONS_REPLY.clickOnBailNo(); + SUMMONS_REPLY.clickCriminalOffenceNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCanServeDate(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCjsEmploymentNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickAdjustmentsNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickSignedYes(); + SUMMONS_REPLY.clickDoneButton(); + } + + @And("^I record a happy path paper summons response and process now$") + public void iRecordHappyPathPaperResponseProcessed() throws Throwable { + SUMMONS_REPLY.clickEnterSummonsReplyButton(); + + SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); + + SUMMONS_REPLY.enterPrimaryPhone("0777777777"); + SUMMONS_REPLY.enterSecondaryPhone("0777777771"); + SUMMONS_REPLY.enterEmail("test@test.com"); + + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickLivedConsecutivelyYes(); + SUMMONS_REPLY.clickMentalHealthActNo(); + SUMMONS_REPLY.clickLackCapacityNo(); + SUMMONS_REPLY.clickOnBailNo(); + SUMMONS_REPLY.clickCriminalOffenceNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCanServeDate(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCjsEmploymentNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickAdjustmentsNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickSignedYes(); + SUMMONS_REPLY.clickDoneButton(); + NAV.press_buttonByName("Yes, process now"); + } + + @And("^I record a happy path deferral paper summons response$") + public void iRecordHappyPathDeferralPaperResponse() throws Throwable { + SUMMONS_REPLY.clickEnterSummonsReplyButton(); + + SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); + + SUMMONS_REPLY.enterPrimaryPhone("0777777777"); + SUMMONS_REPLY.enterSecondaryPhone("0777777771"); + SUMMONS_REPLY.enterEmail("test@test.com"); + + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickLivedConsecutivelyYes(); + SUMMONS_REPLY.clickMentalHealthActNo(); + SUMMONS_REPLY.clickLackCapacityNo(); + SUMMONS_REPLY.clickOnBailNo(); + SUMMONS_REPLY.clickCriminalOffenceNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickDeferralRequest(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCjsEmploymentNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickAdjustmentsNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickSignedYes(); + SUMMONS_REPLY.clickDoneButton(); + } + + @And("^I record an excusal request paper summons response$") + public void iRecordExcusalRequestPaperResponse() throws Throwable { + SUMMONS_REPLY.clickEnterSummonsReplyButton(); + + SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); + + SUMMONS_REPLY.enterPrimaryPhone("0777777777"); + SUMMONS_REPLY.enterSecondaryPhone("0777777771"); + SUMMONS_REPLY.enterEmail("test@test.com"); + + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickLivedConsecutivelyYes(); + SUMMONS_REPLY.clickMentalHealthActNo(); + SUMMONS_REPLY.clickLackCapacityNo(); + SUMMONS_REPLY.clickOnBailNo(); + SUMMONS_REPLY.clickCriminalOffenceNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickExcusalRequest(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCjsEmploymentNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickAdjustmentsNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickSignedYes(); + SUMMONS_REPLY.clickDoneButton(); + } + + @And("^I record a paper summons response with reasonable adjustments$") + public void iRecordAPaperResponseWithReasonableAdjustments() throws Throwable { + SUMMONS_REPLY.clickEnterSummonsReplyButton(); + + SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); + + SUMMONS_REPLY.enterPrimaryPhone("0777777777"); + SUMMONS_REPLY.enterSecondaryPhone("0777777771"); + SUMMONS_REPLY.enterEmail("test@test.com"); + + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickLivedConsecutivelyYes(); + SUMMONS_REPLY.clickMentalHealthActNo(); + SUMMONS_REPLY.clickLackCapacityNo(); + SUMMONS_REPLY.clickOnBailNo(); + SUMMONS_REPLY.clickCriminalOffenceNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCanServeDate(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickCjsEmploymentNo(); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickAdjustmentsYes(); + NAV.set_valueTo("What help does the juror need at court?", "Reasonable adjustments reasons"); + SUMMONS_REPLY.clickContinue(); + + SUMMONS_REPLY.clickSignedYes(); + SUMMONS_REPLY.clickDoneButton(); + } + + @And("^I click the process reply button$") + public void iClickTheProcessReplyButton() { + SUMMONS_REPLY.clickProcessReplyButton(); + } + + @Then("^I mark the reply as responded$") + public void iMarkTheReplyAsResponded() { + SUMMONS_REPLY.clickMarkAsResponded(); + } + + @Then("^I select deferral request$") + public void iSelectDeferralRequest() { + SUMMONS_REPLY.clickProcessAcionDeferralRequest(); + } + + @And("^I click the checkbox to mark the reply as responded$") + public void clickMarkTheReplyAsRespondedCheckbox() { + SUMMONS_REPLY.clickMarkAsRespondedCheckbox(); + } + + @And("^I confirm I want to mark the reply as responded$") + public void iConfirmIWantToMarkTheReplyAsResponded() { + SUMMONS_REPLY.clickConfirmMarkAsRespondedButton(); + } + + @And("^I check the processed success banner is present for the reply I just processed$") + public void processedSuccessBannerIsPresent() { + assertTrue(SUMMONS_REPLY.processedSuccessBannerIsPresent()); + assertEquals(jurorPartNumber.get(), SUMMONS_REPLY.processSuccessBannerLink()); + } + + @Then("^I click the link for the juror record$") + public void iClickTheLinkForTheJurorRecord() { + SUMMONS_REPLY.clickProcessSuccessBannerLink(); + } + + @And("^I see the juror status on the juror record screen has updated to \"([^\"]*)\"$") + public void jurorStatusHasUpdatedTo(String jurorResponse) { + assertEquals(jurorResponse, JUROR_RECORD_SEARCH.getJurorStatus()); + } + + @Then("^I click the cancel link$") + public void iClickTheCancelLink() { + SUMMONS_REPLY.clickCancelLink(); + } + + @And("^I see the juror status on the juror record screen is \"([^\"]*)\"$") + public void iSeeTheJurorStatusOnTheJurorRecordScreenIs(String jurorStatus) { + assertEquals(jurorStatus, JUROR_RECORD.getJurorStatus()); + } + + @And("^I click confirm on the $") + public void iClickConfirm() { + } + + @And("^there is an error message with the text \"([^\"]*)\"$") + public void thereIsAnErrorMessageWithTheText(String errorText) { + assertTrue(SUMMONS_REPLY.errorIsPresent()); + assertEquals(errorText, SUMMONS_REPLY.getErrorText()); + } + + @Given("^I clear all reasonable adjustments from the juror record \"([^\"]*)\"$") + public void deleteReasonableAdjustments(String createdJurorRecordNumber) throws SQLException { + DBT.deleteReasonableAdjustment(createdJurorRecordNumber); + } + + @Given("^a juror record of has been entered with a reasonable adjustment$") + public void createSummonsReplyReasonableAdjustmentJuror(DataTable dataTable) throws SQLException { + Map jurorDetails = dataTable.asMap(String.class, String.class); + DBT.insertNewSummonsReplyReasonableAdjustment(jurorDetails.get("newJurorRecordNumber"), jurorDetails.get("newJurorAdjustmentCode"), jurorDetails.get("newJurorAdjustment")); + summonsReplyNumber = jurorDetails.get("newJurorRecordNumber"); + } + + @Given("^a juror record paper response has been entered with a reasonable adjustment$") + public void createPaperSummonsReplyReasonableAdjustmentJuror(DataTable dataTable) throws SQLException { + Map jurorDetails = dataTable.asMap(String.class, String.class); + DBT.insertNewPaperSummonsReplyReasonableAdjustment(jurorDetails.get("newJurorRecordNumber"), jurorDetails.get("newJurorAdjustmentCode"), jurorDetails.get("newJurorAdjustment")); + summonsReplyNumber = jurorDetails.get("newJurorRecordNumber"); + } + + @Then("^I am on the check can accommodate screen$") + public void iAmOnTheCheckCanAccomodateScreen() { + String URL = webDriver.getCurrentUrl(); + Assert.assertTrue(URL.contains("check-can-accommodate")); + } + + @Then("^I see the following juror information on the check can accommodate screen$") + public void iSeeTheFollowingJurorInformationOnTheCheckCanAccommodateScreen(DataTable dataTable) { + Map expectedData = dataTable.asMap(String.class, String.class); + Map actualData = VIEW_SUMMONS_REPLY.getCheckAccommodateJurorDetails(); + + assertEquals(expectedData.get("jurorName"), actualData.get("jurorName")); + assertEquals(expectedData.get("jurorNumber"), actualData.get("jurorNumber")); + assertEquals(expectedData.get("jurorMainPhone"), actualData.get("jurorMainPhone")); + assertEquals(expectedData.get("jurorEmail"), actualData.get("jurorEmail")); + assertEquals(expectedData.get("jurorAdjustmentReason"), actualData.get("jurorAdjustmentReason")); + assertEquals(expectedData.get("jurorAdjustment"), actualData.get("jurorAdjustment")); + + } + + @Then("^I can paste the following information \"([^\"]*)\"$") + public void iCanPasteTheJurorInformation(String expectedText) throws IOException, UnsupportedFlavorException { + expectedText = expectedText.replace("\\n", "\n").replace("\\", ""); + String copiedText = (String) Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.stringFlavor); + assertEquals(expectedText, copiedText); + } + + @When("^I enter the optic reference number \"([^\"]*)\"$") + public void iEnterTheOpticReferenceNumber(String reference) { + VIEW_SUMMONS_REPLY.enterOpticReferenceNumber(reference); + } + + @Then("^The newly created optic reference \"([^\"]*)\" is displayed$") + public void theNewlyCreatedOpticReferenceIsDisplayed(String reference) { + assertEquals(reference, VIEW_SUMMONS_REPLY.getOpticeReferenceNo()); + } + + @Then("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\"$") + public void createNewPoolRequest(String poolRequestType, String court) throws Throwable { + NAV.press_buttonByName("Create pool"); + GRP.click_radioButtonWithLabel("Request new pool"); + NAV.press_buttonByName("Continue"); + NAV.set_valueTo("Enter a court name or location code", court); + NAV.press_buttonByName("Continue"); + NAV.waitForPageLoad(); + POOL_REQUESTS_PAGE.clickToChangeDeferrals(); + POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals("0"); + NAV.press_buttonByName("Continue"); + + if (poolRequestType.equals("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + if (poolRequestType.equals("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + if (poolRequestType.equals("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + NAV.set_value_to("Number of jurors", "150"); + NAV.press_buttonByName("Continue"); + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); + poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); + poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); + poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); + + ArrayList pools = poolNumbers.get(); + System.out.println("Getting Pool Number --- " + poolNumber.get()); + + pools.add(poolNumber.get()); + System.out.println("Values in pools array --- " + pools.toString()); + + NAV.press_buttonByName("Request pool"); + } + + @And("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\" using the same pool number$") + public void iCreateACourtPoolRequestForCourtUsingAsThePoolNumber(String poolRequestType, String court) throws Throwable { + NAV.press_buttonByName("Request a new pool"); + NAV.set_valueTo("Enter a court name or location code", court); + NAV.press_buttonByName("Continue"); + NAV.waitForPageLoad(); + if (poolRequestType.equals("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + if (poolRequestType.equals("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + if (poolRequestType.equals("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + NAV.set_value_to("Number of jurors", "150"); + NAV.press_buttonByName("Continue"); + iClickTheChangeLinkForThePoolNumber(); + POOL_REQUESTS_PAGE.inputExistingPoolNumberAlt(poolNumber.get()); + NAV.press_buttonByName("Change"); + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); + poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); + poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); + + ArrayList pools = poolNumbers.get(); + pools.add(poolNumber.get()); + + System.out.println(poolNumber.get()); + NAV.press_buttonByName("Request pool"); + } + + @And("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\" with \"([^\"]*)\" deferral$") + public void iCreateACourtPoolRequestForCourtWithDeferral(String poolRequestType, String court, String deferralsNumber) throws Throwable { + NAV.press_buttonByName("Create pool"); + GRP.click_radioButtonWithLabel("Request new pool"); + NAV.press_buttonByName("Continue"); + NAV.set_valueTo("Enter a court name or location code", court); + NAV.press_buttonByName("Continue"); + NAV.waitForPageLoad(); + iClickTheChangeLinkForTheCourtDeferrals(); + iChangeTheNumberOfCourtDeferralsTo(deferralsNumber); + if (poolRequestType.equals("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + if (poolRequestType.equals("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + if (poolRequestType.equals("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + NAV.set_value_to("Number of jurors", "150"); + + + NAV.press_buttonByName("Continue"); + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); + poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); + poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); + //poolNumbers.add(poolNumber); + System.out.println(poolNumber.get()); + NAV.press_buttonByName("Request pool"); + } + + @Then("^I create a \"([^\"]*)\" court pool request$") + public void createNewPoolRequest(String poolRequestType) throws Throwable { + NAV.press_buttonByName("Create pool"); + GRP.click_radioButtonWithLabel("Request new pool"); + NAV.press_buttonByName("Continue"); + GRP.click_radioButtonWithLabel(poolRequestType); + NAV.set_value_to("Number of jurors", "150"); + + POOL_REQUESTS_PAGE.clickToChangeDeferrals(); + NAV.set_value_to("Number of deferred jurors to include in this pool", "0"); + NAV.press_buttonByName("Continue"); + { + if (poolRequestType.equals("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + if (poolRequestType.equals("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + if (poolRequestType.equals("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + } + + NAV.set_value_to("Number of jurors", "150"); + NAV.press_buttonByName("Continue"); + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getCourtNewPoolRequestNumber()); + poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); + NAV.press_buttonByName("Request pool"); + } + + @Then("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\", \"([^\"]*)\" weeks in the future$") + public void createNewPoolRequestWeeksInFuture(String poolRequestType, String court, Integer weeksInFuture) throws Throwable { + String datePattern = "dd/MM/yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, weeksInFuture); + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + if (weeksInFuture == 0) { + localDate = localDate.plusDays(1); + } + if (localDate.getDayOfWeek() == DayOfWeek.SATURDAY || localDate.getDayOfWeek() == DayOfWeek.SUNDAY) { + localDate = localDate.plusDays(2); + } + Date newDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + String newDateValues = new SimpleDateFormat(datePattern).format((newDate).getTime()); + + + NAV.press_buttonByName("Create pool"); + GRP.click_radioButtonWithLabel("Request new pool"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter a court name or location code", court); + NAV.press_buttonByName("Continue"); + //NAV.waitForPageLoad(); + POOL_REQUESTS_PAGE.clickChangeDate(); + POOL_REQUESTS_PAGE.enterNewDate(newDateValues); + NAV.press_buttonByName("Change"); + + POOL_REQUESTS_PAGE.clickToChangeDeferrals(); + POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals("0"); + NAV.press_buttonByName("Continue"); + { + if (poolRequestType.equals("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + if (poolRequestType.equals("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + if (poolRequestType.equals("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + } + NAV.set_value_to("Number of jurors", "150"); + NAV.press_buttonByName("Continue"); + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getCourtNewPoolRequestNumber()); + poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); + NAV.press_buttonByName("Request pool"); + } + + @Then("^I create an active \"([^\"]*)\" court pool request for court \"([^\"]*)\", \"([^\"]*)\" Mondays in the future$") + public void createNewActivePoolRequestMondaysInFuture(String poolRequestType, String court, int mondaysInFuture) throws Throwable { + NAV.press_buttonByName("Create pool"); + GRP.click_radioButtonWithLabel("Request new pool"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter a court name or location code", court); + NAV.press_buttonByName("Continue"); + //NAV.waitForPageLoad(); + POOL_REQUESTS_PAGE.clickChangeDate(); + POOL_REQUESTS_PAGE.enterNewDate(mondayWeeksInFuture(mondaysInFuture)); + NAV.press_buttonByName("Change"); + + POOL_REQUESTS_PAGE.clickToChangeDeferrals(); + POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals("0"); + NAV.press_buttonByName("Continue"); + + { + if (poolRequestType.equalsIgnoreCase("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + if (poolRequestType.equalsIgnoreCase("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + if (poolRequestType.equalsIgnoreCase("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + } + NAV.set_value_to("Number of jurors", "150"); + NAV.press_buttonByName("Continue"); + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getCourtNewPoolRequestNumber()); + + ArrayList pools = poolNumbers.get(); + pools.add(poolNumber.get()); + + poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); + NAV.press_buttonByName("Request pool"); + + POOL_REQUESTS_PAGE.clickInactivePoolNumber(poolNumber.get()); + NAV.press_buttonByName("Summon jurors"); + NAV.set_value_to("Citizens to summon", "1"); + NAV.press_buttonByName("Create pool and summon citizens"); + POOL_REQUESTS_PAGE.clickTab("Pool requests"); + } + + @Then("^I create \"([^\"]*)\" new \"([^\"]*)\" pool requests each a week apart in court \"([^\"]*)\"$") + public void createMultiplePoolRequestsWeeksApart(Integer noOfPools, String courtType, String court) throws Throwable { + Integer newPoolsCreated = 0; + do { + createNewPoolRequestWeeksInFuture(courtType, court, newPoolsCreated); + String poolNo = POOL_REQUESTS_PAGE.getNewPoolNumberOnSummary(); + + ArrayList pools = poolNumbers.get(); + pools.add(poolNo); + + POOL_REQUESTS_PAGE.clickFirstRequestLink(); + NAV.press_buttonByName("Summon jurors"); + NAV.set_value_to("Citizens to summon", "1"); + NAV.press_buttonByName("Create pool and summon citizens"); + POOL_REQUESTS_PAGE.clickTab("Pool requests"); + newPoolsCreated = newPoolsCreated + 1; + } while (newPoolsCreated < noOfPools); + String poolsCreated = poolNumbers.toString().replace("[", "(").replace("]", ")"); + System.out.println("Pools Created: " + poolsCreated); + } + + @Then("^I create \"([^\"]*)\" new \"([^\"]*)\" pool requests each a week apart in court \"([^\"]*)\" with \"([^\"]*)\" jurors to summon$") + public void createMultiplePoolRequestsWeeksApartSpecifiedJurorsToSummon(Integer noOfPools, String courtType, String court, String jurorsToSummon) throws Throwable { + Integer newPoolsCreated = 0; + do { + createNewPoolRequestWeeksInFuture(courtType, court, newPoolsCreated + 1); + String poolNo = POOL_REQUESTS_PAGE.getNewPoolNumberOnSummary(); + + ArrayList pools = poolNumbers.get(); + pools.add(poolNo); + + POOL_REQUESTS_PAGE.clickFirstRequestLink(); + NAV.press_buttonByName("Summon jurors"); + NAV.set_value_to("Citizens to summon", jurorsToSummon); + NAV.press_buttonByName("Create pool and summon citizens"); + POOL_REQUESTS_PAGE.clickTab("Pool requests"); + newPoolsCreated = newPoolsCreated + 1; + } while (newPoolsCreated < noOfPools); + String poolsCreated = poolNumbers.toString().replace("[", "(").replace("]", ")"); + System.out.println("Pools Created: " + poolsCreated); + } + + @Then("^I see the pool status is REQUESTED") + public void seePoolStatusRequestedTag() throws Throwable { + assertTrue(POOL_REQUESTS_PAGE.seePoolStatusRequestedTag()); + } + + @Then("^I see the pool status is ACTIVE") + public void seePoolStatusActiveTag() throws Throwable { + assertTrue(POOL_REQUESTS_PAGE.seePoolStatusActiveTag()); + } + + @Then("^I can see the newly created pool$") + public void seeNewPoolRequest() throws Throwable { + String mainText = JUROR_RECORD_SEARCH.getMainBodyText(); + By element = By.className("govuk-pagination__next"); + List nextNavButton = webDriver.findElements(element); + + if (!mainText.contains(poolNumber.get())) while (!nextNavButton.isEmpty()) { + POOL_SEARCH.nextButton.click(); + nextNavButton = webDriver.findElements(element); + } + + if (mainText.contains(poolNumber.get())) { + assertTrue(mainText.contains(poolNumber.get())); + } + } + + @And("^I make a note of the pool number$") + public void iMakeANoteOfThePoolNumber() { + poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); + ArrayList pools = poolNumbers.get(); + pools.add(poolNumber.get()); + System.out.println(poolNumber.get()); + } + + @Then("^I see the refuse excusal success message for \"([^\"]*)\"$") + public void iSeeRefuseExcusalSuccessMessage(String excusalReason) { + String bannerText = SUMMONS_REPLY.getResponseBannerText(); + assertTrue(bannerText.contains("successfully processed")); + assertTrue(bannerText.contains("Excusal refused")); + assertTrue(bannerText.contains(excusalReason)); + } + + @When("^I select the Refuse Excusal radio button$") + public void selectRefuseExcusalRadio() { + SUMMONS_REPLY.selectRefuseExcusalRadio(); + } + + @And("^I click the update juror record button$") + public void iClickTheUpdateJurorRecordButton() { + JUROR_RECORD_SEARCH.clickUpdateJurorRecord(); + } + + @Then("^I click the summons reply tab$") + public void iClickTheSummonsReplyTab() { + JUROR_RECORD_SEARCH.clickSummonsTab(); + } + + @And("^I click on the view summons reply link$") + public void iClickOnTheViewSummonsReplyLink() { + JUROR_RECORD_SEARCH.clickViewSummonsReplyLink(); + } + + @And("^I select the mark as deceased radio button$") + public void iSelectTheMarkAsDeceasedRadioButton() { + JUROR_RECORD_SEARCH.clickMarkAsDeceasedRadioButton(); + } + + @And("^I select the mark as undeliverable radio button$") + public void iSelectTheMarkAsUndeliverableRadioButton() { + JUROR_RECORD_SEARCH.clickMarkAsUndeliverableRadioButton(); + } + + @And("^I press the Juror number table header$") + public void iPressTheJurorNumberTableHeader() { + DEFERRAL_MAINTENANCE.clickJurorNumberHeader(); + } + + @And("^I add a comment of \"([^\"]*)\" to be recorded in the jurors history$") + public void iAddACommentOfToBeRecordedInTheJurorsHistory(String commentForHistory) { + JUROR_RECORD_SEARCH.enterCommentForHistory(commentForHistory); + } + + @Then("^I click continue on the update juror record screen$") + public void iClickContinueToMarkTheJurorAsDeceased() { + JUROR_RECORD_SEARCH.clickContinue(); + } + + @And("^I see the juror record updated banner containing \"([^\"]*)\"$") + public void iSeeTheJurorRecordUpdatedBannerContaining(String bannerContains) { + assertEquals(bannerContains, JUROR_RECORD_SEARCH.jurorRecordUpdatedContains()); + } + + @And("^I see \"([^\"]*)\" in the error banner$") + public void iSeeInTheErrorBanner(String errorText) { + assertEquals(errorText, JUROR_RECORD_SEARCH.jurorRecordUpdatedErrorBannerText()); + } + + @Then("^I see the summons reply status is \"([^\"]*)\"$") + public void iSeeTheSummonsReplyStatusIs(String expectedStatus) { + assertEquals(expectedStatus, SUMMONS_REPLY.getReplyStatus()); + } + + @Then("^The system shall display the following non editable details on the additional summons screen$") + public void theSystemWillDisplayNonEditableInformationOnTheAdditionalSummonsScreen(DataTable dataTable) { + Map data = dataTable.asMap(String.class, String.class); + assertEquals(poolNumber.get(), ADDITIONAL_SUMMONS.getPoolNumber()); + assertEquals(data.get("jurorsRequested"), ADDITIONAL_SUMMONS.getJurorsRequested()); + assertEquals(data.get("jurorsConfirmed"), ADDITIONAL_SUMMONS.getJurorsConfirmed()); + assertEquals(data.get("jurorsRequired"), ADDITIONAL_SUMMONS.getJurorsRequired()); + assertEquals(data.get("citizensSummoned"), ADDITIONAL_SUMMONS.getCitizensSummoned()); + assertEquals(data.get("catchmentArea"), ADDITIONAL_SUMMONS.getCatchmentArea()); + } + + + @Then("^The system shall display the non editable details on the Confirm attendance screen$") + public void theSystemWillDisplayNonEditableInformationOnTheConfirmAttendenpage() { + assertEquals(("Juror number"), NAV.getJurorNumber()); + assertEquals(("First name"), NAV.getFirstName()); + assertEquals(("Last name"), NAV.getLastName()); + assertEquals(("Checked in"), NAV.getCheckedIn()); + } + + @When("^I set extra citizens to summon to \"([^\"]*)\"$") + public void iEnterExtraCitizensToSummon(String noCitizens) { + ADDITIONAL_SUMMONS.setExtraCitizensToSummon(noCitizens); + } + + @Then("^juror \"([^\"]*)\" has been sent a summons letter$") + public void checkJurorSummonsLetter(String jurorNo) throws SQLException { + DBT.checkJurorSummonsLetter(jurorNo); + assertEquals("Juror summons letter sent to " + jurorNo, DBT.checkJurorSummonsLetter(jurorNo)); + + } + + @Then("^The \"([^\"]*)\" new jurors have been sent a summons letter$") + public void checkNewJurorSummonsLetter(String noJurors) throws SQLException { + int jurorRows = Integer.parseInt(noJurors); + for (int index = 1; index <= jurorRows; index++) { + String jurorNo = POOL_OVERVIEW_PAGE.getJurorNumberInRow(index); + assertEquals("Juror summons letter sent to " + jurorNo, DBT.checkJurorSummonsLetter(jurorNo)); + } + } + + @Then("^there is an error message with the text \"([^\"]*)\" on the additional summons page$") + public void thereIsAnErrorMessageWithTheTextOnAdditionalSummons(String errorText) { + assertTrue(ADDITIONAL_SUMMONS.errorIsPresent()); + assertEquals(errorText, ADDITIONAL_SUMMONS.getErrorText()); + } + + @When("^I click the change catchment area link$") + public void clickChangeCatchmentArea() { + ADDITIONAL_SUMMONS.clickChangeCatchmentAreaLink(); + } + + @When("^I click all postcode checkboxes$") + public void clickAllPostcodeCheckboxes() { + ADDITIONAL_SUMMONS.clickAllPostcodeCheckboxes(); + } + + + @When("^I click on deferral maintenance$") + public void iClickOnDeferralMaintenance() { + POOL_REQUESTS_PAGE.clickDeferralMaintenance(); + } + + @Then("^I am taken to the deferral maintenance screen for the selected court \"([^\"]*)\"$") + public void iAmTakenToTheDeferralMaintenanceScreenForTheSelectedCourt(String courtName) { + assertEquals("Deferral maintenance", DEFERRAL_MAINTENANCE.getPageHeading()); + assertEquals(courtName, DEFERRAL_MAINTENANCE.getCourtName()); + } + + @Then("^The deferrals table is displayed$") + public void theDeferralsTableIsDisplayed() { + assertEquals("Juror number", DEFERRAL_MAINTENANCE.getJurorNumberTableHeading()); + assertEquals("First name", DEFERRAL_MAINTENANCE.getFirstNameTableHeading()); + assertEquals("Last name", DEFERRAL_MAINTENANCE.getLastNameTableHeading()); + assertEquals("Pool number", DEFERRAL_MAINTENANCE.getPoolNumberTableHeading()); + assertEquals("Deferred to", DEFERRAL_MAINTENANCE.geDeferredToTableHeading()); + } + + @Then("^The first deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") + public void theFirstDeferralInTheTableIs(String deferral, String noWeeks) { + + String datePattern = "E dd MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getFirstDeferralTableRow()); + } + + @Then("^Row \"([^\"]*)\" deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") + public void rowDeferralInTheTableIs(String rowNo, String deferral, String noWeeks) { + + String datePattern = "E dd MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + int row = Integer.parseInt(rowNo); + + assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getDeferralTableRow(row)); + } + + @Then("^The last deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") + public void theLastDeferralInTheTableIs(String deferral, String noWeeks) { + String datePattern = "E dd MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getLastDeferralTableRow()); + } + + @Then("^Row \"([^\"]*)\" from last deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") + public void rowFromLastDeferralInTheTableIs(String rowNo, String deferral, String noWeeks) { + + String datePattern = "E dd MMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + int row = Integer.parseInt(rowNo); + + assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getNthLastDeferralTableRow(row)); + } + + @When("^I select juror \"([^\"]*)\" from the deferrals table$") + public void iSelectJurorFromTheDeferralsTable(String jurorNumber) { + DEFERRAL_MAINTENANCE.selectJurorFromTable(jurorNumber); + } + + @When("^I select pool \"([^\"]*)\" from the active pools table$") + public void iSelectPoolFromTheActivePoolsTable(String poolNumber) { + DEFERRAL_MAINTENANCE.selectActivePool(poolNumber); + } + + @When("^I set the \"([^\"]*)\" deferral filter to \"([^\"]*)\"$") + public void iSetTheDeferralFilterTo(String filter, String input) { + DEFERRAL_MAINTENANCE.clickShowFilterButton(); + DEFERRAL_MAINTENANCE.clickClearFiltersLink(); + switch (filter) { + case "juror number": + DEFERRAL_MAINTENANCE.filterByJurorNumber(input); + break; + case "first name": + DEFERRAL_MAINTENANCE.filterByFirstName(input); + break; + case "last name": + DEFERRAL_MAINTENANCE.filterByLastName(input); + break; + case "deferred to": + DEFERRAL_MAINTENANCE.filterByDeferredTo(input); + break; + } + DEFERRAL_MAINTENANCE.clickApplyFiltersButton(); + DEFERRAL_MAINTENANCE.clickShowFilterButton(); + } + + @When("^I set the deferral deferred to filter to \"([^\"]*)\" Mondays in the future$") + public void iSetTheDeferralDeferredToFilterTo(String noWeeks) { + DEFERRAL_MAINTENANCE.clickShowFilterButton(); + DEFERRAL_MAINTENANCE.clickClearFiltersLink(); + + String datePattern = "dd/MM/yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + DEFERRAL_MAINTENANCE.filterByDeferredTo(expectedDate); + DEFERRAL_MAINTENANCE.clickApplyFiltersButton(); + DEFERRAL_MAINTENANCE.clickShowFilterButton(); + } + + @When("^I filter on name \"([^\"]*)\"$") + public void iFilterOnName(String lastName) { + DEFERRAL_MAINTENANCE.clickShowFilterButton(); + + DEFERRAL_MAINTENANCE.filterByLastName(lastName); + DEFERRAL_MAINTENANCE.clickApplyFiltersButton(); + DEFERRAL_MAINTENANCE.clickShowFilterButton(); + } + + @When("^I navigate to the last page of deferral maintenance$") + public void iNavigateToTheLastPageOfDeferralMaintenance() { + DEFERRAL_MAINTENANCE.clickLastPaginationItem(); + } + + @Then("^I see the disqualification success message for \"([^\"]*)\"$") + public void iSeeDisqualificationSuccessMessage(String disqualificationReason) { + String bannerText = SUMMONS_REPLY.getResponseBannerText(); + assertTrue(bannerText.contains("successfully processed")); + assertTrue(bannerText.contains("Disqualified")); + assertTrue(bannerText.contains(disqualificationReason)); + } + + @Then("^I see the summons reply disqualification success message$") + public void iSeeSummonsReplyDisqualificationSuccessMessage() { + String bannerText = SUMMONS_REPLY.getResponseBannerText(); + assertTrue(bannerText.contains("Summons reply processed")); + assertTrue(bannerText.contains("Disqualified")); + } + + @When("^I answer the juror summons reply eligibility questions with juror Residency set to No$") + public void answerJurorResidency() { + SUMMONS_REPLY.clickLivedConsecutivelyNo(); + SUMMONS_REPLY.clickMentalHealthActNo(); + SUMMONS_REPLY.clickLackCapacityNo(); + SUMMONS_REPLY.clickOnBailNo(); + SUMMONS_REPLY.clickCriminalOffenceNo(); + } + + @When("^I select that the juror does need adjustments$") + public void selectJurorDoesNeedAdjustments() { + SUMMONS_REPLY.clickAdjustmentsYes(); + + } + + @When("^I enter a pool number that is the current pool number plus 1$") + public void poolNumberPlusOne() throws Throwable { + Integer newPoolNo = Integer.valueOf(poolRequestNumber.get()) + 1; + NAV.set_valueTo("Pool number", String.valueOf(newPoolNo)); + NAV.press_buttonByName("Change"); + poolRequestNumber.set(String.valueOf(newPoolNo)); + + } + + @Then("^I see updated date and time in Pool History timeline$") + public void iSeeCurrentDateAndTime() { + final String seePoolHistoryUpdatedTime = POOL_REQUESTS_PAGE.seePoolHistoryUpdatedTime(); + + assertFalse("moj-timeline_date", seePoolHistoryUpdatedTime.isEmpty()); + } + + @And("^I click no, to process the summons reply later$") + public void iClickNoToProcessTheSummonsReplyLater() { + SUMMONS_REPLY.clickNoToReplyLater(); + } + + @When("^I navigate to the active pool \"([^\"]*)\" overview$") + public void navigateActivePoolOverview(String poolNo) { + POOL_REQUESTS_PAGE.clickActivePoolNumber(poolNo); + } + + @And("^a new juror record \"([^\"]*)\" is inserted into pool \"([^\"]*)\" in court \"([^\"]*)\"$") + public void aNewJurorRecordIsInsertedIntoPoolInCourt(String jurorRecordNumber, String existingPoolNumber, String court) throws SQLException { + jurorPartNumber.set(jurorRecordNumber); + DBT.insertNewJurorIntoPool(court, jurorRecordNumber, existingPoolNumber); + } + + + @And("^I see the title \"([^\"]*)\" in position \"([^\"]*)\" of the history$") + public void iSeeTitleInPositionOfTheHistory(String historyMessage, int positionInList) { + String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); + assertEquals(historyMessage, elementsInPosition[0]); + } + + @And("^I do not see the title \"([^\"]*)\" in position \"([^\"]*)\" of the history$") + public void iDoNotSeeTheTitleInPositionOfTheHistory(String historyMessage, int positionInList) throws Throwable { + String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); + assertNotEquals(historyMessage, elementsInPosition[0]); + } + + @And("^I see the description \"([^\"]*)\" in position \"([^\"]*)\" of the history$") + public void iSeeDescInPositionOfTheHistory(String historyMessage, int positionInList) { + String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); + assertEquals(historyMessage, elementsInPosition[1]); + } + + @And("^I see the correct date and time in position \"([^\"]*)\" of the history$") + public void iSeeDateTimeInPositionOfTheHistory(int positionInList) { + String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); + try { + System.out.println("Trying Normal Value"); + System.out.println("Date Time Recorded: " + dateTimeRecorded.get(positionInList - 1)); + System.out.println("Date Time On Page: " + elementsInPosition[2]); + assertEquals(dateTimeRecorded.get(positionInList - 1), elementsInPosition[2]); + } catch (ComparisonFailure eNormal) { + try { + System.out.println("Trying Higher Value"); + System.out.println("Date Time Recorded: " + dateTimeRecordedHigher.get(positionInList - 1)); + System.out.println("Date Time On Page: " + elementsInPosition[2]); + assertEquals(dateTimeRecordedHigher.get(positionInList - 1), elementsInPosition[2]); + } catch (ComparisonFailure eHigher) { + try { + System.out.println("Trying Lower Value"); + System.out.println("Date Time Recorded: " + dateTimeRecordedLower.get(positionInList - 1)); + System.out.println("Date Time On Page: " + elementsInPosition[2]); + assertEquals(dateTimeRecordedLower.get(positionInList - 1), elementsInPosition[2]); + } catch (ComparisonFailure eLower) { + System.out.println("Date on page does not match exactly or match 1-+ minutes"); + } + + } + } + } + + @And("^I make a note of the time$") + public void iMakeANoteOfTheTime() { + String datePattern = "d MMMM yyyy"; + String timePattern = "h:mma"; + + LocalDate localDate = LocalDate.now(); + LocalTime localTime = LocalTime.now(); + LocalTime localTimeHigher = LocalTime.now().minusMinutes(1); + LocalTime localTimeLower = LocalTime.now().plusMinutes(1); + + DateTimeFormatter newDateToFormat = DateTimeFormatter.ofPattern(datePattern); + DateTimeFormatter newTimeToFormat = DateTimeFormatter.ofPattern(timePattern); + + String date = localDate.format(newDateToFormat); + String time = localTime.format(newTimeToFormat); + String timeHigher = localTimeHigher.format(newTimeToFormat); + String timeLower = localTimeLower.format(newTimeToFormat); + + String[] newDateValues = {date, time, timeHigher, timeLower}; + String formedDate = (newDateValues[0] + " at " + newDateValues[1].toLowerCase()); + String formedDateHigher = (newDateValues[0] + " at " + newDateValues[2].toLowerCase()); + String formedDateLower = (newDateValues[0] + " at " + newDateValues[3].toLowerCase()); + dateTimeRecorded.add(formedDate); + dateTimeRecordedHigher.add(formedDateHigher); + dateTimeRecordedLower.add(formedDateLower); + + System.out.println("Time Recorded: " + formedDate); + } + + @And("^I clear down the data in dateTimeRecorded$") + public void iCleardownDateTimeRecorded() { + dateTimeRecorded.clear(); + dateTimeRecordedHigher.clear(); + dateTimeRecordedLower.clear(); + } + + @When("^I click to add or edit notes$") + public void clickAddOrEditNotes() { + JUROR_RECORD.clickAddOrEditNotes(); + } + + @When("^I enter over 2000 characters in the Notes text box$") + public void over2000charactersNotes() { + String longText = StringUtils.repeat("Test", 501); + JUROR_RECORD.enterNotes(longText); + } + + @When("^I enter \"([^\"]*)\" in the Notes text box$") + public void enterIntoNotes(String notes) { + JUROR_RECORD.enterNotes(notes); + } + + @When("^I click the save notes button$") + public void saveNotes() { + JUROR_RECORD.saveNotes(); + } + + @When("^I record notes \"([^\"]*)\"$") + public void recordNotesWithText(String notes) { + JUROR_RECORD.clickNotesTab(); + JUROR_RECORD.clickAddOrEditNotes(); + JUROR_RECORD.enterNotes(notes); + JUROR_RECORD.saveNotes(); + } + + @When("^I record call log \"([^\"]*)\"$") + public void recordCallLog(String callLog) throws Exception { + JUROR_RECORD.clickNotesTab(); + NAV.click_link_by_text("Contact log"); + JUROR_RECORD.clickLogNewContact(); + NAV.select_fromDropdown("Request Deferral", "Select the type of enquiry made"); + GRP.click_radioButtonWithLabel("No"); + JUROR_RECORD.enterNotes(callLog); + JUROR_RECORD.saveNotes(); + } + + @Then("^a second juror record is shown in the search results for \"([^\"]*)\"$") + public void transferredJurorRecordCreatedInSearch(String jurorNumber) { + assertEquals((2 + " results for \"" + jurorNumber + "\""), JUROR_RECORD_SEARCH.getSearchResultsHeader()); + } + + @When("^I click the juror record search link for court name \"([^\"]*)\"$") + public void clickJurorRecordSearchLinkForCourt(String courtName) { + JUROR_RECORD_SEARCH.clickJurorRecordForCourt(courtName); + } + + + @When("^I enter a date \"([^\"]*)\" mondays in the future for the new service start date$") + public void enterServiceStartDateMondaysInFuture(Integer mondays) { + JUROR_RECORD.enterNewServiceStartDate(mondayWeeksInFuture(mondays)); + } + + @When("^I select a postponement date$") + public void clickPostponementDate() { + JUROR_RECORD.clickPostponementDatePoolRadio(); + } + + @And("^I record a digital response for a juror with a deferral$") + public void iRecordADigitalResponseForAJurorWithADeferral(DataTable jurorDetails) throws Throwable { + Map juror = jurorDetails.asMap(String.class, String.class); + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + + SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); + SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); + SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); + NAV.press_buttonByName("Continue"); + NAV.textNotPresentOnPage("There is a problem"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Main phone", "0123456789"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter your email address", "test@test.com"); + NAV.set_valueTo("Enter your email address again", "test@test.com"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", "1970"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Confirm you're eligible for jury service"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No, I need to change the date"); + NAV.press_buttonByName("Continue"); + + SUMMONS_REPLY.setDigitalDeferralReason("Test Digital Deferral Reason"); + NAV.press_buttonByName("Continue"); + + SUMMONS_REPLY.setFirstChoice(mondayWeeksInFuture(11)); + SUMMONS_REPLY.setSecondChoice(mondayWeeksInFuture(12)); + SUMMONS_REPLY.setThirdChoice(mondayWeeksInFuture(13)); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The information I have given is true to the best of my knowledge."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + } + + @And("^I record a digital response for a juror that is too old$") + public void iRecordADigitalResponseForAJurorTooOld(DataTable jurorDetails) throws Throwable { + Map juror = jurorDetails.asMap(String.class, String.class); + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + + SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); + SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); + SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); + NAV.press_buttonByName("Continue"); + NAV.textNotPresentOnPage("There is a problem"); + + //Is the name we have for you correct + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //Is this your address + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //What is your phone number + NAV.set_valueTo("Main phone", "0123456789"); + NAV.press_buttonByName("Continue"); + + //What is your email address + NAV.set_valueTo("Enter your email address", "test@test.com"); + NAV.set_valueTo("Enter your email address again", "test@test.com"); + NAV.press_buttonByName("Continue"); + + //What is your date of birth + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", "1945"); + + NAV.press_buttonByName("Continue"); + + //Confirm your date of birth + NAV.textPresentOnPage("Confirm your date of birth"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //Check your answers now + NAV.check_checkbox("The information I have given is true to the best of my knowledge."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + NAV.textPresentOnPage("Your age means you cannot do jury service"); + + } + + @And("^I record a digital response for a juror that is too young$") + public void iRecordADigitalResponseForAJurorTooYoung(DataTable jurorDetails) throws Throwable { + Map juror = jurorDetails.asMap(String.class, String.class); + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + + SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); + SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); + SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); + NAV.press_buttonByName("Continue"); + NAV.textNotPresentOnPage("There is a problem"); + + //Is the name we have for you correct + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //Is this your address + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //What is your phone number + NAV.set_valueTo("Main phone", "0123456789"); + NAV.press_buttonByName("Continue"); + + //What is your email address + NAV.set_valueTo("Enter your email address", "test@test.com"); + NAV.set_valueTo("Enter your email address again", "test@test.com"); + NAV.press_buttonByName("Continue"); + + //What is your date of birth + String yearYoung = String.valueOf((Year.now().getValue() - 10)); + + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", yearYoung); + NAV.press_buttonByName("Continue"); + + //Confirm your date of birth + NAV.textPresentOnPage("Confirm your date of birth"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //Check your answers now + NAV.check_checkbox("The information I have given is true to the best of my knowledge."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + NAV.textPresentOnPage("Your age means you cannot do jury service"); + + } + + @And("^I record a digital response for a juror that provides an incorrect DoB and corrects it$") + public void iRecordADigitalResponseForAJurorIncorrectDobProvidedCorrected(DataTable jurorDetails) throws Throwable { + Map juror = jurorDetails.asMap(String.class, String.class); + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + + SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); + SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); + SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); + NAV.press_buttonByName("Continue"); + NAV.textNotPresentOnPage("There is a problem"); + + //Is the name we have for you correct + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //Is this your address + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + //What is your phone number + NAV.set_valueTo("Main phone", "0123456789"); + NAV.press_buttonByName("Continue"); + + //What is your email address + NAV.set_valueTo("Enter your email address", "test@test.com"); + NAV.set_valueTo("Enter your email address again", "test@test.com"); + NAV.press_buttonByName("Continue"); + + //What is your date of birth + String yearYoung = String.valueOf((Year.now().getValue() - 10)); + + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", yearYoung); + NAV.press_buttonByName("Continue"); + NAV.press_buttonByName("Continue"); + + //Confirm your date of birth + NAV.textPresentOnPage("Confirm your date of birth"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + //What is your date of birth - corrected + String yearCorrect = String.valueOf((Year.now().getValue() - 25)); + + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", yearCorrect); + + NAV.press_buttonByName("Continue"); + + //Confirm you're eligible + NAV.textPresentOnPage("Confirm you're eligible for jury service"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes, I can start"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + //Check your answers now + NAV.check_checkbox("The information I have given is true to the best of my knowledge."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + + + public static String weeksInFuture(int noWeeks) { + String datePattern = "dd/MM/yyyy"; + Calendar date = Calendar.getInstance(); + date.add(Calendar.WEEK_OF_MONTH, noWeeks); + + return new SimpleDateFormat(datePattern).format(date.getTime()); + } + + + public static String mondayWeeksInFuture(int noWeeks) { + String datePattern = "dd/MM/yyyy"; + LocalDate nextMonday = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + nextMonday = nextMonday.plusWeeks(noWeeks); + DateTimeFormatter dateToFormat = DateTimeFormatter.ofPattern(datePattern); + + return nextMonday.format(dateToFormat); + } + + @Then("^I see the reply type has been updated to \"([^\"]*)\"$") + public void replyTypeHasBeenUpdated(String updatedReplyType) { + assertEquals("Reply Type is not as expected", updatedReplyType, VIEW_SUMMONS_REPLY.getTypeValue()); + } + + @When("^I change the jurors date of birth$") + public void enterDobJurorDetails() { + SUMMONS_REPLY.enterDateOfBirth("11/4/1979"); + + } + + @When("^I select the date picker button$") + public void clickDateOfBirthButton() { + SUMMONS_REPLY.clickDateOfBirthButton(); + + } + + @When("^I select the yes radio button from the Third Party Juror details$") + public void clickThirdPartyYesButton() { + SUMMONS_REPLY.clickYesThirdPartyJurorDetailsButton(); + + } + + @When("^I select the yes radio button from the Additional Requirements Juror details$") + public void clickAdditionalRequirementsYesButton() { + SUMMONS_REPLY.clickYesAdditionalRequirementsJurorDetailsButton(); + NAV.waitForPageLoad(); + } + + @When("^I select the Juror Details tab from the summons reply page$") + public void clickJurorDetailsTab() { + SUMMONS_REPLY.clickJurorDetailsTab(); + + } + + @When("^I select the Eligibility tab from the summons reply page$") + public void clickEligibilityTab() { + SUMMONS_REPLY.clickEligibilityTab(); + + } + + @When("^I select the Deferral or Excusal tab from the summons reply page$") + public void clickdeferralOrExcusalTab() { + SUMMONS_REPLY.clickdeferralOrExcusalTab(); + + } + + @When("^I select the CJS Employment tab from the summons reply page$") + public void clickcjsEmploymentTab() { + SUMMONS_REPLY.clickcjsEmploymentTab(); + + } + + @When("^I select the reasonable adjustments tab from the summons reply page$") + public void clickreasonableAdjustmentsTab() { + SUMMONS_REPLY.clickreasonableAdjustmentsTab(); + + } + + @When("^I select the Signature tab from the summons reply page$") + public void clicksignatureTab() { + SUMMONS_REPLY.clicksignatureTab(); + + } + + @When("^I set residency in the UK radio button to No$") + public void residencytoNo() { + SUMMONS_REPLY.clickresidencyNoButton(); + + } + + @Then("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\" and summon jurors$") + public void createPoolRequestAndSummonJurors(String poolRequestType, String court) throws Throwable { + NAV.press_buttonByName("Create pool"); + GRP.click_radioButtonWithLabel("Request new pool"); + NAV.press_buttonByName("Continue"); + NAV.set_valueTo("Enter a court name or location code", court); + NAV.press_buttonByName("Continue"); + NAV.waitForPageLoad(); + + if (poolRequestType.equals("Civil")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); + if (poolRequestType.equals("Crown")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); + if (poolRequestType.equals("High")) + POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); + NAV.set_value_to("Number of jurors", "150"); + NAV.press_buttonByName("Continue"); + poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); + poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); + poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); + poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); + + ArrayList pools = poolNumbers.get(); + System.out.println("Getting Pool Number --- " + poolNumber.get()); + + pools.add(poolNumber.get()); + System.out.println("Values in pools array --- " + pools.toString()); + + NAV.press_buttonByName("Request pool"); + + POOL_REQUESTS_PAGE.clickInactivePoolNumber(poolNumber.get()); + NAV.press_buttonByName("Summon jurors"); + NAV.set_value_to("Citizens to summon", "1"); + NAV.press_buttonByName("Create pool and summon citizens"); + } + + @When("^I select one of the jurors I have just summoned$") + public void selectFirstJurorInList() { + POOL_REQUESTS_PAGE.selectFirstJurorInList(); + } + + @When("^I select one of the active pools available$") + public void selectFirstPoolNoInList() { + ACTIVE_POOLS_PAGE.selectFirstPoolNoInList(); + } + + @When("^I select the checkbox in the same row as \"([^\"]*)\" in pool table$") + public void selectJurorCheckbox(String nextToText) { + POOL_REQUESTS_PAGE.checkJurorCheckboxSame_rowAs(nextToText); + } + + @When("^I check the select all checkbox$") + public void selectAllcheckbox() { + ACTIVE_POOLS_PAGE.checkSelectAllCheckbox(); + } + + @When("^I check the select all checkbox on pool overview$") + public void selectAllcheckboxOnPoolOverview() { + NAV.waitForPageLoad(); + ACTIVE_POOLS_PAGE.checkSelectAllCheckboxOnPoolOverview(); + } + @When("^I check the select all checkbox on pool overview as bureau user$") + public void checkSelectAllCheckboxOnPoolOverviewForBureau() { + NAV.waitForPageLoad(); + ACTIVE_POOLS_PAGE.bureauCheckSelectAllCheckboxOnPoolOverview(); + } + + @When("^I select one of the active pools available from the create juror record screen$") + public void selectAnyPoolNoList() { + ACTIVE_POOLS_PAGE.selectAnyActivePool(); + } + @When("^I see juror \"([^\"]*)\" in the jurors cannot be moved table$") + public void seeJurorsInCannotBeMovedTableStep(String jurorNumber) { + boolean isJurorPresent = ACTIVE_POOLS_PAGE.seeJurorsInCannotBeMovedTable(jurorNumber); + if (isJurorPresent) { + log.info("Juror " + jurorNumber + " is present in the jurors cannot be moved table."); + } else { + log.info("Juror " + jurorNumber + " is not present in the jurors cannot be moved table."); + } + } + } + diff --git a/src/test/java/cucumber/steps/StepDef_jurorpoolNewSchema.java b/src/test/java/cucumber/steps/StepDef_jurorpoolNewSchema.java new file mode 100644 index 00000000..c1d9e5f2 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_jurorpoolNewSchema.java @@ -0,0 +1,2898 @@ +package cucumber.steps; + +import cucumber.pageObjects.*; +import cucumber.testdata.DatabaseTester; +import cucumber.testdata.DatabaseTesterNewSchemaDesign; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; + + +public class StepDef_jurorpoolNewSchema { + + private final CoronersPool CORONERS_POOL_PAGE; + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + + private static WebDriver driver; + private ScreenShotTaker SST; + private final PoolRequests POOL_REQUESTS_PAGE; + private final CheckPoolRequest CHECK_POOL_REQUEST_PAGE; + private final PoolOverview POOL_OVERVIEW_PAGE; + private final ActivePools ACTIVE_POOLS_PAGE; + private final SummonsReply SUMMONS_REPLY; + private final ViewSummonsReply VIEW_SUMMONS_REPLY; + private final PoolSearch POOL_SEARCH; + private final AdditionalSummons ADDITIONAL_SUMMONS; + private final DeferralMaintenance DEFERRAL_MAINTENANCE; + private final Header HEADER_PAGE; + private final DatabaseTester DBT; + + private final DatabaseTesterNewSchemaDesign DBTNSD; + private final Groups GRP; + private final JurorRecordSearch JUROR_RECORD_SEARCH; + private final JurorRecord JUROR_RECORD; + + public static ThreadLocal poolRequestNumber = new ThreadLocal<>(); + static String summonsReplyNumber; + public static ThreadLocal selectedAttendanceDate = new ThreadLocal<>(); + public static String jurorRecordNumber; + public static String jurorPoolNumber; + public static ThreadLocal jurorPartNumber = new ThreadLocal<>(); + public static ThreadLocal poolNumber = new ThreadLocal<>(); + public static ThreadLocal poolDate = new ThreadLocal<>(); + public static String originalReplyStatus; + public static String summonedNumber; + public static ThreadLocal> poolNumbers = ThreadLocal.withInitial(ArrayList::new); + public static ArrayList dateTimeRecorded = new ArrayList<>(); + public static ArrayList dateTimeRecordedHigher = new ArrayList<>(); + public static ArrayList dateTimeRecordedLower = new ArrayList<>(); + public static ThreadLocal opticReference = new ThreadLocal<>(); + + public StepDef_jurorpoolNewSchema(CoronersPool coroners_pool_page, SharedDriver webDriver, DatabaseTesterNewSchemaDesign dbtnsd) { + CORONERS_POOL_PAGE = coroners_pool_page; + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + POOL_REQUESTS_PAGE = PageFactory.initElements(webDriver, PoolRequests.class); + ACTIVE_POOLS_PAGE = PageFactory.initElements(webDriver, ActivePools.class); + CHECK_POOL_REQUEST_PAGE = PageFactory.initElements(webDriver, CheckPoolRequest.class); + POOL_OVERVIEW_PAGE = PageFactory.initElements(webDriver, PoolOverview.class); + JUROR_RECORD_SEARCH = PageFactory.initElements(webDriver, JurorRecordSearch.class); + JUROR_RECORD = PageFactory.initElements(webDriver, JurorRecord.class); + SUMMONS_REPLY = PageFactory.initElements(webDriver, SummonsReply.class); + POOL_SEARCH = PageFactory.initElements(webDriver, PoolSearch.class); + VIEW_SUMMONS_REPLY = PageFactory.initElements(webDriver, ViewSummonsReply.class); + HEADER_PAGE = PageFactory.initElements(webDriver, Header.class); + ADDITIONAL_SUMMONS = PageFactory.initElements(webDriver, AdditionalSummons.class); + DEFERRAL_MAINTENANCE = PageFactory.initElements(webDriver, DeferralMaintenance.class); + GRP = PageFactory.initElements(webDriver, Groups.class); + DBTNSD = PageFactory.initElements(webDriver, DatabaseTesterNewSchemaDesign.class); + DBT = PageFactory.initElements(webDriver, DatabaseTester.class); + } + +// @Given("^I go to the launch screen of the bureau app$") +// public void iGoToTheLaunchScreenOfTheBureauApp() { +// //Need to know the url and user permission sets of the application +// } +// +// @And("^I log in as a \"([^\"]*)\"$") +// public void iLogInAsA(String arg0) throws Throwable { +// // Will the user log in or will it be a single sign on? +// // Do we need to worry about 2fa? +// // Need to know permission sets +// throw new PendingException(); +// } +// +// @When("^I navigate to the pool request screen$") +// public void iNavigateToThePoolRequestScreen() { +// POOL_REQUESTS_PAGE.openPoolManagement(); +// } +// +// @When("^I navigate to summons management$") +// public void iNavigateToSummonsManagementScreen() { +// POOL_REQUESTS_PAGE.openSummonsManagement(); +// } +// +// @When("^I click the create nil pool link$") +// public void iClickCreatePool() { +// POOL_REQUESTS_PAGE.clickCreateAPool(); +// POOL_REQUESTS_PAGE.clickCreateNilPool(); +// } +// +// @And("^a pool has been created$") +// public void poolHasBeenCreated() throws Throwable { +// iClickTheLinkToTheNewPoolScreen(); +// POOL_REQUESTS_PAGE.enterAndSelectCourtAsBureau("DORCHESTER"); +// iChangeThePoolTypeTo("Civil"); +// iSetTheNumberOfJurorsTo("0"); +// iClickTheRequestPoolButton(); +// iSaveTheNewPoolRequest(); +// } +// +// ; +// +// @Then("^I am able to see and interact with the pool request tabs and fields$") +// public void iAmAbleToSeeAndInteractWithThePoolRequestTabsAndFields() { +// assertTrue(POOL_REQUESTS_PAGE.tabPresentAndCorrect("Coroner courts")); +// assertTrue(POOL_REQUESTS_PAGE.tabPresentAndCorrect("Civil courts")); +// assertTrue(POOL_REQUESTS_PAGE.tabPresentAndCorrect("Crown courts")); +// } +// +// @When("^I filter the pool request page by \"([^\"]*)\"$") +// public void iFilterThePoolRequestPageByCourtNameAndCourtCode(final String filterQuery) throws InterruptedException { +// POOL_REQUESTS_PAGE.enterFilterString(filterQuery); +// } +// +// @Then("^the pool request page will show the filtered courts that the user has access to$") +// public void thePoolRequestPageWillShowTheFilteredCourtsThatTheUserHasAccessTo() { +// assertTrue(POOL_REQUESTS_PAGE.countTableRows() > 0); +// } +// +// @When("^I select the pool that I have just created to move to the pool summary page$") +// public void aPoolNumberIsSelectedToMoveToTheCreateAPoolSummaryPage() { +// try { +// NAV.click_link_by_text(poolNumber.get()); +// } catch (Exception e) { +// System.out.println("Pool not found, trying another method"); +// POOL_REQUESTS_PAGE.clickTab("Search"); +// POOL_SEARCH.enterPoolNo(poolNumber.get()); +// POOL_SEARCH.clickContinue(); +// } +// } +// +// @When("^I click on the pool I have added jurors to$") +// public void clickOnPoolIHaveAddedJurorsToOnActivePools() { +// POOL_REQUESTS_PAGE.clickActivePoolNumber(poolRequestNumber.get()); +// } +// +// @When("^I click the delete pool request button$") +// public void iClickDeletePoolRequest() { +// POOL_OVERVIEW_PAGE.clickDelete(); +// } +// +// @Then("^I am asked if I'm sure I want to delete$") +// public void iAmAskedIfIWantToDelete() { +// assertEquals("Are you sure you want to delete this request?", POOL_OVERVIEW_PAGE.getHeading()); +// } +// +// @Then("^I am asked if I'm sure I want to delete this pool$") +// public void iAmAskedIfIWantToDeleteThisPool() { +// assertEquals("Are you sure you want to delete this pool?", POOL_OVERVIEW_PAGE.getHeading()); +// } +// +// @When("^I click the confirm deletion button$") +// public void iClickConfirmDeletion() { +// POOL_OVERVIEW_PAGE.clickDelete(); +// } +// +// @When("^I click the cancel deletion link$") +// public void iClickCancelDeletion() { +// POOL_OVERVIEW_PAGE.clickCancel(); +// } +// +// @Then("^a message is displayed on the pool requests page informing me that the pool has been deleted$") +// public void messageConfirmsDeletion() { +// String expectedMessage = String.format("Pool %s successfully deleted", poolRequestNumber.get()); +// +// assertEquals(expectedMessage, POOL_REQUESTS_PAGE.getBannerMessage()); +// } +// +// @Then("^the pool is no longer visible$") +// public void poolNoLongerVisible() { +// assertFalse(POOL_REQUESTS_PAGE.requestIsVisibleByNumber(poolRequestNumber.get())); +// } +// +// @Then("^I check the selected \"([^\"]*)\" is \"([^\"]*)\"$") +// public void checkTheSelectedDataItemIsCorrect(String dataItem, String selectedOption) throws Throwable { +// NAV.seeText_inSameRow_asText_inPoolRequests(dataItem, selectedOption); +// } +// +// @Then("^I click on the \"([^\"]*)\" link in the same row as \"([^\"]*)\" on Pool Requests$") +// public void clickChangeLinkInSameRowAs_inPoolRequests(String link, String nextTo) throws Throwable { +// NAV.clickChangeLinkInSameRowAs_inPoolRequests(link, nextTo); +// } +// +// @Then("^the system will display non-editable information on the pool summary screen$") +// public void theSystemWillDisplayNonEditableInformationOnThePoolSummaryScreen(DataTable table) throws ParseException { +// Map data = table.asMap(String.class, String.class); +// +// assertEquals(data.get("jurorsRequested"), POOL_OVERVIEW_PAGE.getNumberOfJurorsRequested()); +// assertEquals(data.get("jurorsConfirmed"), POOL_OVERVIEW_PAGE.getNumberOfJurorsConfirmed()); +// assertEquals(data.get("jurorsSummoned"), POOL_OVERVIEW_PAGE.getNumberOfJurorsSummoned()); +// assertEquals(data.get("currentPoolSize"), POOL_OVERVIEW_PAGE.getCurrentPoolSize()); +// assertEquals(data.get("courtName"), POOL_OVERVIEW_PAGE.getCourtName()); +// assertEquals(data.get("courtLocationCode"), POOL_OVERVIEW_PAGE.getCourtLocationCode()); +// if (poolDate.get() != null) { +// assertEquals(poolDate.get(), POOL_OVERVIEW_PAGE.getConvertedStartDate()); +// } +// } +// +// @Then("^the pool summary donut displays$") +// public void thePoolSummaryDonutDisplays(DataTable table) throws ParseException { +// Map data = table.asMap(String.class, String.class); +// +// assertEquals(data.get("summoned"), POOL_OVERVIEW_PAGE.getNumberOfJurorsSummoned()); +// assertEquals(data.get("required"), POOL_OVERVIEW_PAGE.getNumberOfJurorsRequired()); +// assertEquals(data.get("confirmed"), POOL_OVERVIEW_PAGE.getNumberOfJurorsConfirmed()); +// assertEquals(data.get("unavailable"), POOL_OVERVIEW_PAGE.getNumberOfJurorsUnavailable()); +// assertEquals(data.get("notResponded"), POOL_OVERVIEW_PAGE.getNumberOfJurorsNotResponded()); +// assertEquals(data.get("surplus"), POOL_OVERVIEW_PAGE.getNumberOfJurorsSurplus()); +// } +// +// @Then("^the system will display non-editable information on the nil pool summary screen$") +// public void theSystemWillDisplayNonEditableInformationOnTheNilPoolSummaryScreen(DataTable table) throws Exception { +// Map expectedData = table.asMap(String.class, String.class); +// +// //Converting Attendance Date to same format as Overview Page for assertion +// String datePattern = "EEEEE dd MMM yyyy"; +// Calendar date = Calendar.getInstance(); +// date.add(Calendar.WEEK_OF_MONTH, 9); +// Date actualDate = new SimpleDateFormat(datePattern).parse(selectedAttendanceDate.get()); +// DateFormat dateFormat = new SimpleDateFormat(datePattern); +// String startDate = dateFormat.format(actualDate); +// +// Map actualData = POOL_OVERVIEW_PAGE.getPoolOverviewDetails(); +// assertEquals(poolRequestNumber.get(), actualData.get("poolRecord")); +// assertEquals(expectedData.get("court"), actualData.get("court")); +// assertEquals(expectedData.get("courtCode"), actualData.get("courtCode")); +// assertEquals(startDate, actualData.get("courtStartDate")); +// } +// +// @Then("^I do not see the nil pool status$") +// public void iDoNotSeeTheNilPoolStatus() { +// assertFalse(POOL_OVERVIEW_PAGE.statusExists()); +// } +// +// +// @And("^the max number of deferrals will be displayed for the selected day$") +// public void theMaxNumberOfDeferralsWillBeDisplayedForTheSelectedDay() { +// // Need to know the max deferral number is +// } +// +// @And("^I select a usable postcode from the list$") +// public void iSelectAUsablePostcodeFromTheList() { +// // Need to know what postcodes will be available to use. +// } +// +// @And("^I see the pool number of the pool$") +// public void iSeeThePoolNumber() { +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); +// } +// +// @And("^I submit the pool request$") +// public void iSubmitThePoolRequest() { +// POOL_REQUESTS_PAGE.clickConfirm(); +// // Click the confirm button +// } +// +// @Then("^I'll go to the pool summary screen$") +// public void iLlGoToThePoolSummaryScreen() { +// NAV.click_link_by_text("Active pools"); +// } +// +// @Then("^I can see that this is a nil pool$") +// public void iCanSeeThisIsANilPool() { +// String heading = POOL_REQUESTS_PAGE.getPageHeading(); +// assertEquals("", heading); +// } +// +// @And("^I can see a list of summoned jurors$") +// public void iCanSeeAListOfSummonedJurors() { +// // Need a list of jurors that could be summoned. +// // Need to confirm a list of jurors are visible on the page +// } +// +// @Then("^the pool request page will show the filtered courts$") +// public void thePoolRequestPageWillShowTheFilteredCourts() { +// assertEquals(summonedNumber, CORONERS_POOL_PAGE.getCoronersRowsOfCitizens().toString()); +// } +// +// @When("^I click the link to the new pool screen$") +// public void iClickTheLinkToTheNewPoolScreen() throws InterruptedException { +// POOL_REQUESTS_PAGE.clickNewPoolLink(); +// } +// +// @Then("^I am taken to the new pool screen$") +// public void iShouldBeTakenToTheNewPoolScreen() { +// assertEquals("Request a new pool", POOL_REQUESTS_PAGE.getPageHeading()); +// } +// +// @Then("^I am taken to summons management$") +// public void iShouldBeTakenToSummonsManagement() { +// assertEquals("Your work", POOL_REQUESTS_PAGE.getPageHeading()); +// } +// +// @And("^I should see the court to request the pool from as \"([^\"]*)\"$") +// public void iShouldSeeTheCourtToRequestThePoolFrom(final String court) { +// String actualCourt = POOL_REQUESTS_PAGE.getRequestedCourtName(); +// assertEquals(court, actualCourt); +// } +// +// @And("^I see the attendance date of the pool$") +// public void iShouldSeeTheAttendanceDateOfThePool() { +// //Takes current date and adds 9 weeks to get expected date +// String datePattern = "EEEEE dd MMMMM yyyy"; +// Calendar date = Calendar.getInstance(); +// date.add(Calendar.WEEK_OF_MONTH, 9); +// String expectedDate = new SimpleDateFormat(datePattern).format(date.getTime()); +// +// String actualDate = POOL_REQUESTS_PAGE.getRequestedCourtDate(); +// +// assertEquals(expectedDate, actualDate); +// +// selectedAttendanceDate.set(actualDate); +// } +// +// @When("^I click the change link for the chosen court$") +// public void iClickTheChangeLinkForTheChosenCourt() { +// POOL_REQUESTS_PAGE.clickChangeCourt(); +// } +// +// @And("^select another available court \"([^\"]*)\"$") +// public void selectAnotherAvailableCourt(final String court) { +// POOL_REQUESTS_PAGE.enterAndSelectCourt(court); +// POOL_REQUESTS_PAGE.confirmNewCourtSelection(); +// } +// +// @Then("^the court to request the pool from has changed to \"([^\"]*)\"$") +// public void theCourtToRequestThePoolFromHasChanged(final String court) { +// String actualCourt = POOL_REQUESTS_PAGE.getRequestedCourtName(); +// assertEquals(court, actualCourt); +// } +// +// @When("^I see the default attendance date$") +// public void iSeeTheDefaultAttendanceDate() { +// // Need the element for the attendance date +// // Default attendance date should be set to 9 weeks from current date +// } +// +// @When("^I click the change link for the attendance date$") +// public void iClickTheChangeLinkForTheAttendanceDate() { +// POOL_REQUESTS_PAGE.clickChangeDate(); +// } +// +// @And("^I select a new date$") +// public void iSelectANewDate() { +// String datePattern = "dd/MM/yyyy"; +// String fullDatePattern = "EEEEE dd MMMMM yyyy"; +// Calendar date = Calendar.getInstance(); +// date.add(Calendar.WEEK_OF_MONTH, 10); +// selectedAttendanceDate.set(new SimpleDateFormat(fullDatePattern).format(date.getTime())); +// String newDate = new SimpleDateFormat(datePattern).format(date.getTime()); +// +// POOL_REQUESTS_PAGE.enterNewDate(newDate); +// POOL_REQUESTS_PAGE.confirmNewDate(); +// +// } +// +// @And("^I select a new date \"([^\"]*)\" week in the future$") +// public void iSelectANewDate(int weekInFuture) { +// String datePattern = "dd/MM/yyyy"; +// String fullDatePattern = "EEEEE dd MMMMM yyyy"; +// Calendar date = Calendar.getInstance(); +// date.add(Calendar.WEEK_OF_MONTH, weekInFuture); +// selectedAttendanceDate.set(new SimpleDateFormat(fullDatePattern).format(date.getTime())); +// String newDate = new SimpleDateFormat(datePattern).format(date.getTime()); +// +// POOL_REQUESTS_PAGE.enterNewDate(newDate); +// POOL_REQUESTS_PAGE.confirmNewDate(); +// +// } +// +// @Then("^I should have a new attendance date$") +// public void iShouldHaveANewAttendanceDate() { +// String datePattern = "EEEEE dd MMMMM yyyy"; +// Calendar date = Calendar.getInstance(); +// date.add(Calendar.WEEK_OF_MONTH, 10); +// String expectedDate = new SimpleDateFormat(datePattern).format(date.getTime()); +// +// String actualDate = POOL_REQUESTS_PAGE.getRequestedCourtDate(); +// +// assertEquals(expectedDate, actualDate); +// } +// +// @Then("^I should see the attendance time present is \"([^\"]*)\"$") +// public void iShouldSeeTheAttendanceTimePresent(String attendTime) { +// final String actualAttendanceTime = POOL_REQUESTS_PAGE.getAttendanceTime(); +// +// assertEquals(attendTime, actualAttendanceTime); +// } +// +// @When("^I click the change link for the attendance time$") +// public void iClickTheChangeLinkForTheAttendanceTime() { +// POOL_REQUESTS_PAGE.clickChangeTime(); +// } +// +// @And("^I select a new time$") +// public void iSelectANewTime() { +// POOL_REQUESTS_PAGE.fillTime("10", "00"); +// POOL_REQUESTS_PAGE.confirmNewTimeEntry(); +// // How will time be presented to select? +// } +// +// @Then("^i should have set a new attendance time$") +// public void iShouldHaveSetANewAttendanceTime() { +// final String actualAttendanceTime = POOL_REQUESTS_PAGE.getAttendanceTime(); +// +// assertEquals("10:00", actualAttendanceTime); +// } +// +// @When("^I click the change link for the pool number$") +// public void iClickTheChangeLinkForThePoolNumber() { +// POOL_REQUESTS_PAGE.clickChangePoolNumber(); +// } +// +// @When("^I do not see Change link in the same row as Pool number$") +// public void doNotSeeChangePoolNumberLink() { +// assertTrue("change pool number is visible", POOL_REQUESTS_PAGE.changePoolNumberInvisible()); +// } +// +// @When("^I input a pool number that is already being used$") +// public void inputPoolNumberAlreadyInUse() { +// POOL_REQUESTS_PAGE.inputExistingPoolNumber(); +// } +// +// @When("^I insert a valid pool number$") +// public void inputValidPoolNumber() { +// String shortPoolNo = POOL_REQUESTS_PAGE.getExistingPoolNumber().substring(0, 7); +// String newPoolNo = shortPoolNo + "99"; +// poolNumber.set(newPoolNo); +// POOL_REQUESTS_PAGE.inputValidPoolNumber(newPoolNo); +// } + + @When("^I insert a valid pool number for court \"([^\"]*)\"$") + public void inputValidPoolNumberNSD(String locCode) throws SQLException { + + //this block of code works out the current pool number prefix based on the date 11 weeks from today + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_YEAR, 9); + String month = String.format("%02d", calendar.get(Calendar.MONTH) + 1); + String year = String.valueOf(calendar.get(Calendar.YEAR)).substring(2); + String newPoolNo = locCode + year + month; + String incrementedPoolNo = String.valueOf(DBTNSD.getNextPoolNoNSD(newPoolNo)); + poolNumber.set(incrementedPoolNo); + POOL_REQUESTS_PAGE.inputValidPoolNumber(incrementedPoolNo); + } +// +// @When("^I change the pool type to \"([^\"]*)\"$") +// public void iChangeThePoolTypeTo(String courtType) throws Throwable { +// // Need to change the pool type. Is it done by change link? Dropdown box? +// if (courtType.equals("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// +// if (courtType.equals("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// +// if (courtType.equals("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// } +// +// @And("^I set the pool to be on call$") +// public void iSetThePoolToBeOnCall() { +// POOL_REQUESTS_PAGE.clickOnCallPoolCheckbox(); +// } +// +// @When("^I set the number of jurors to \"([^\"]*)\"$") +// public void iSetTheNumberOfJurorsTo(String numberOfJurors) throws Throwable { +// POOL_REQUESTS_PAGE.enterNumberOfJurors(numberOfJurors); +// } +// +// @When("^I click continue on the pool request page$") +// public void iClickContinueOnPoolRequest() { +// POOL_REQUESTS_PAGE.clickContinue(); +// } +// +// @When("^I click continue on the postponement page$") +// public void iClickContinueOnPostponement() { +// POOL_REQUESTS_PAGE.clickContinue(); +// } +// +// @When("^I click the create nil pool confirmation button$") +// public void iClickCreateNilConfirmation() { +// POOL_REQUESTS_PAGE.submitCourtDeferrals(); +// } +// +// @Then("^I should see the check your answers page for a nil pool$") +// public void iShouldSeeCheckYourAnswersForNilPool() { +// final String header = POOL_REQUESTS_PAGE.getPageHeading(); +// assertEquals("Check your answers", header); +// final String tableHeader = POOL_REQUESTS_PAGE.getTableHeading(); +// assertEquals("Nil pool details", tableHeader); +// } +// +// @Then("^I should see an error stating the number of jurors exceeds the maximum$") +// public void iShouldSeeAnErrorStatingTheNumberOfJurorsExceedsTheMaximum() { +// final String errorText = POOL_REQUESTS_PAGE.getErrorSummaryText(); +// assertTrue(errorText.contains("Enter a number that is less than 3,000")); +// } +// +// @And("^I click the change link for the court deferrals$") +// public void iClickTheChangeLinkForTheCourtDeferrals() { +// POOL_REQUESTS_PAGE.clickToChangeDeferrals(); +// } +// +// @And("^I change the number of court deferrals to \"([^\"]*)\"$") +// public void iChangeTheNumberOfCourtDeferralsTo(String arg0) { +// POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals(arg0); +// POOL_REQUESTS_PAGE.submitCourtDeferrals(); +// } +// +// @Then("^I should see an error stating the number of deferrals is too high$") +// public void iShouldSeeAnErrorStatingTheNumberOfDeferralsIsTooHigh() { +// final String errorText = POOL_REQUESTS_PAGE.getErrorSummaryText(); +// assertTrue(errorText.contains("Enter the same or less than the number available")); +// POOL_REQUESTS_PAGE.clickCancel(); +// } +// +// @Then("^I see available deferrals count is \"([^\"]*)\"$") +// public void numberOfCourtDeferralsAvailable(String numberofDeferralsDisplayed) throws Throwable { +// assertEquals(numberofDeferralsDisplayed, CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); +// } +// +// @Then("^I should see the number of court deferrals set to \"([^\"]*)\"$") +// public void iShouldSeeTheNumberOfCourtDeferralsSetTo(String arg0) throws Throwable { +// // Confirm that the number of court deferrals is set correctly. +// throw new PendingException(); +// } +// +// @Then("^I set Number of deferred jurors to include to \"([^\"]*)\" more than is available$") +// public void setDeferralsToMoreThanIsAvailable(Integer noDeferrals) throws InterruptedException { +// Integer noDefsAvailable = Integer.valueOf(CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); +// Integer highDefsNo = noDefsAvailable + noDeferrals; +// POOL_REQUESTS_PAGE.clickToChangeDeferrals(); +// POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals(String.valueOf(highDefsNo)); +// POOL_REQUESTS_PAGE.submitCourtDeferrals(); +// +// } +// +// @When("^I click the request pool button$") +// public void iClickTheRequestPoolButton() throws InterruptedException { +// +// try { +// assertTrue(CHECK_POOL_REQUEST_PAGE.poolNumberNotVisible()) ; +// POOL_REQUESTS_PAGE.clickContinue(); +// } +// +// catch (Exception e) { +// poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); +// POOL_REQUESTS_PAGE.clickContinue(); +// } +// } +// +// @Then("^I should be taken to the check pool request page$") +// public void iShouldBeTakenToTheCheckPoolRequestPage() { +// final String checkPoolRequestHeader = CHECK_POOL_REQUEST_PAGE.getHeading(); +// assertEquals("Check your pool request", checkPoolRequestHeader); +// } +// +// @And("^I should see the details of the pool$") +// public void iShouldSeeTheDetailsOfThePool(DataTable table) { +// Map data = table.asMap(String.class, String.class); +// poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); +// +// assertEquals(selectedAttendanceDate.get(), CHECK_POOL_REQUEST_PAGE.getAttendanceDate()); +// assertEquals(data.get("courtName"), CHECK_POOL_REQUEST_PAGE.getCourtName()); +// assertEquals(data.get("poolType"), CHECK_POOL_REQUEST_PAGE.getPoolType()); +// assertEquals(data.get("totalJurorsRequired"), CHECK_POOL_REQUEST_PAGE.getNumberOfJurors()); +// assertEquals(data.get("numberOfDeferrals"), CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); +// assertEquals(data.get("additionalJurors"), CHECK_POOL_REQUEST_PAGE.getNumberOfAdditionalJurors()); +// } +// +// @And("^I should see the details of the nil pool$") +// public void iShouldSeeTheDetailsOfTheNilPool(DataTable table) { +// Map data = table.asMap(String.class, String.class); +// poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); +// +// assertEquals(data.get("courtName"), CHECK_POOL_REQUEST_PAGE.getCourtName()); +// assertEquals(data.get("poolType"), CHECK_POOL_REQUEST_PAGE.getPoolType()); +// assertEquals(data.get("additionalRequirements"), CHECK_POOL_REQUEST_PAGE.getAdditionalRequirements()); +// assertEquals(data.get("totalJurorsRequired"), CHECK_POOL_REQUEST_PAGE.getNumberOfJurors()); +// assertEquals(data.get("numberOfDeferrals"), CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); +// assertEquals(data.get("additionalJurors"), CHECK_POOL_REQUEST_PAGE.getNumberOfAdditionalJurors()); +// } +// +// @When("^I click the change button for the check pool request page$") +// public void iClickTheChangeButtonForTheCheckPoolRequestPage() { +// CHECK_POOL_REQUEST_PAGE.clickChangeLink(); +// } +// +// @And("^I edit details of the pool request$") +// public void iEditDetailsOfThePoolRequest() { +// POOL_REQUESTS_PAGE.enterNumberOfJurors("15"); +// } +// +// @And("^I save the changes to the pool request$") +// public void iSaveTheChangesToThePoolRequest() { +// POOL_REQUESTS_PAGE.clickContinue(); +// } +// +// @Then("^the pool request should be edited successfully$") +// public void thePoolRequestShouldBeEditedSuccessfully() { +// assertEquals("15", CHECK_POOL_REQUEST_PAGE.getNumberOfJurors()); +// } +// +// @When("^I save the new pool request$") +// public void iSaveTheNewPoolRequest() { +// poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getPoolNumber()); +// CHECK_POOL_REQUEST_PAGE.submitRequest(); +// } +// +// @Then("^I should be taken to the pool summary page$") +// public void iShouldBeTakenToThePoolSummaryPage() { +// assertEquals("Pool requests", POOL_REQUESTS_PAGE.getPageHeading()); +// } +// +// @And("^I should see the newly created pool request$") +// public void iShouldSeeTheNewlyCreatedPoolRequest(DataTable table) { +// Map expectedData = table.asMap(String.class, String.class); +// +// Map actualData = POOL_REQUESTS_PAGE.getPoolRequestByNumber(poolRequestNumber.get()); +// assertEquals(expectedData.get("court"), actualData.get("court")); +// +// String expectedJurorsRequired = expectedData.get("jurorsRequired"); +// if (expectedJurorsRequired == null){ +// expectedJurorsRequired = ""; +// } +// assertEquals(expectedJurorsRequired, actualData.get("jurorsRequired")); +// } +// +// @When("^I click the link to the choose court screen$") +// public void iClickTheLinkToTheChooseCourtScreen() { +// // Need the element of the link to the choose court screen +// } +// +// @When("^I click on active pools$") +// public void iClickOnActivePools() { +// POOL_REQUESTS_PAGE.clickActivePools(); +// } +// +// @Then("^I see the following active pools headers$") +// public void iSeeTheFollowingActivePoolsHeaders(DataTable dataTable) { +// List expectedData = dataTable.asList(String.class); +// List actualData = ACTIVE_POOLS_PAGE.getTableHeaders(); +// expectedData.forEach( +// item -> assertTrue( +// "Active pools headers does not contain " + item, +// actualData.contains(item) +// ) +// ); +// } +// +// @Then("^the court name displayed is one of the following") +// public void courtNameIsOnly(DataTable dataTable) { +// List expectedData = dataTable.asList(String.class); +// List actualData = ACTIVE_POOLS_PAGE.getCourtNames(); +// actualData.forEach(item -> assertTrue( +// "Unexpected court name in active pools", +// expectedData.contains(item) +// ) +// ); +// +// } +// +// @When("^I click the \"([^\"]*)\" courts tab$") +// public void iClickTheCrownCourtsTab(String courtType) { +// POOL_REQUESTS_PAGE.clickTab(courtType + " courts"); +// } +// +// @When("^I click on the pool number$") +// public void iClickThePoolNumber() { +// POOL_REQUESTS_PAGE.clickPoolNumber(poolRequestNumber.get()); +// } +// +// @Then("^I should be on the choose court screen$") +// public void iShouldBeOnTheChooseCourtScreen() { +// // Need to confirm the user has landed on the choose court screen +// } +// +// @When("^I select a court to request a pool for$") +// public void iSelectACourtToRequestAPoolFor() { +// // How does the user select the court? Dropdown list? Free text? +// } +// +// @Then("^I should see the link to the request a new pool screen$") +// public void iShouldSeeTheLinkToTheRequestANewPoolScreen() { +// // Need the element of the link to the request a new pool screen +// } +// +// @And("^I have navigated to the request a new pool page$") +// public void iHaveNavigatedToTheRequestANewPoolPage() { +// // Need to create the user journey to the request a new pool page +// } +// + @When("^I create a bank holiday \"([^\"]*)\" weeks in the future for court/bureau \"([^\"]*)\" new schema$") + public void insertHolidayInTheFutureNSD(Integer noOfWeeks, String holidayOwner) throws SQLException { + DBTNSD.insertHolidayInTheFutureNSD(noOfWeeks, holidayOwner); + } + + @When("^I create a bank holiday \"([^\"]*)\" Mondays in the future for court/bureau \"([^\"]*)\" new schema$") + public void insertHolidayMondayInTheFutureNSD(Integer noOfWeeks, String holidayOwner) throws SQLException { + DBTNSD.insertHolidayMondayInTheFutureNSD(noOfWeeks, holidayOwner); + } + + @When("^I delete bank holiday new schema") + public void iDeleteBankHolidayNSD() throws SQLException { + DBTNSD.deleteHolidayNSD(); + } + + @When("^I have deleted all holidays new schema") + public void deleteAllHolidaysNSD() throws SQLException { + DBTNSD.deleteAllHolidaysNSD(); + } +// +// @Then("^I should see a warning stating I have selected a bank holiday") +// public void iShouldSeeAWarningStatingIHaveSelectedABankHoliday() { +// String actualHeading = POOL_REQUESTS_PAGE.getPageHeading(); +// String actualWarning = POOL_REQUESTS_PAGE.getAttendanceDateWarning(); +// +// assertTrue(actualWarning.contains("s a UK bank holiday. You can continue or go back and change the date.")); +// assertEquals("The attendance date is a bank holiday", actualHeading); +// } +// +// @When("^I set the attendance date to a weekend$") +// public void iSetTheAttendanceDateToAWeekend() { +// String datePattern = "dd/MM/yyyy"; +// String fullDatePattern = "EEEEE dd MMMMM yyyy"; +// Calendar calendar = Calendar.getInstance(); +// calendar.add(Calendar.WEEK_OF_MONTH, 9); +// +// LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); +// LocalDate localDateWeekend = localDate.with(TemporalAdjusters.next(DayOfWeek.SATURDAY)); +// Date weekendDate = Date.from(localDateWeekend.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); +// +// selectedAttendanceDate.set(new SimpleDateFormat(fullDatePattern).format(weekendDate.getTime())); +// String weekendDateValue = new SimpleDateFormat(datePattern).format(weekendDate.getTime()); +// +// POOL_REQUESTS_PAGE.enterNewDate(weekendDateValue); +// POOL_REQUESTS_PAGE.confirmNewDate(); +// } +// +// @Then("^I should see a warning stating I have selected a weekend$") +// public void iShouldSeeAWarningStatingIHaveSelectedAWeekend() { +// String actualHeading = POOL_REQUESTS_PAGE.getPageHeading(); +// String actualWarning = POOL_REQUESTS_PAGE.getAttendanceDateWarning(); +// +// assertEquals("You’ve selected an attendance date that’s a Saturday or a Sunday. You can continue or go back and change the date.", actualWarning); +// assertEquals("The attendance date is a weekend", actualHeading); +// +// } +// +// @When("^I click the link to continue from the warning page$") +// public void iClickTheLinkToContinue() { +// POOL_REQUESTS_PAGE.continueFromWarningPage(); +// +// } +// +// @Given("^a transferred juror record exists with both court and bureau records$") +// public void transferredJurorRecordExistsWithCourtAndBureauRecords() { +// jurorRecordNumber = "987654321"; +// } +// +// @Given("^a juror record which is valid for paper summons reply exists$") +// public void paperSummonsJurorExists() { +// jurorRecordNumber = "111000002"; +// } +// + @Given("^a juror record of \"([^\"]*)\" has been entered which is valid for paper summons reply new schema$") + public void createPaperSummonsReplyJuror(String newJurorRecordNumber) throws SQLException { + DBTNSD.insertNewPaperSummonsReplyNSD(newJurorRecordNumber, "415230501"); + summonsReplyNumber = newJurorRecordNumber; + } + + @Given("^I clear down the data for the paper juror record \"([^\"]*)\" new schema$") + public void deletePaperSummonsJurorNSD(String createdJurorRecordNumber) throws SQLException { + DBTNSD.deleteNewPaperSummonsReplyNSD(createdJurorRecordNumber); + } + + + @Given("^I clear down the data for the pool new schema$") + public void deleteTestPoolAndJurorsNSD() throws SQLException { + DBTNSD.deleteTestPoolAndJurorsNSD(poolNumber.get()); + } +// +// @And("^I click the More Actions button$") +// public void clickMoreActions() { +// VIEW_SUMMONS_REPLY.clickMoreActions(); +// } +// +// @And("^I click Awaiting Information$") +// public void clickAwaitingInformation() { +// VIEW_SUMMONS_REPLY.clickAwaitingInformation(); +// } +// +// @Then("^I mark this reply as awaiting information from \"([^\"]*)\"$") +// public void markAwaitingInformationFrom(String awaitingInformationFrom) { +// try { +// if (Objects.equals(awaitingInformationFrom, "Court")) { +// System.out.println("Selecting Court"); +// VIEW_SUMMONS_REPLY.clickAwaitingCourt(); +// } +// ; +// if (Objects.equals(awaitingInformationFrom, "Juror")) { +// VIEW_SUMMONS_REPLY.clickAwaitingJuror(); +// } +// if (Objects.equals(awaitingInformationFrom, "Translation unit")) { +// VIEW_SUMMONS_REPLY.clickAwaitingTransfer(); +// } +// } catch (Exception e) { +// System.out.println("Invalid Reply Type entered - " + e); +// } +// } +// +// @When("^the user searches for the juror record from the global search bar$") +// public void userSearchesForJurorRecord() throws InterruptedException { +// JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch(jurorPartNumber.get()); +// } +// +// @When("^the user searches for juror record \"([^\"]*)\" from the global search bar$") +// public void userSearchesForJurorRecord(String partNo) throws InterruptedException { +// JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch(partNo); +// +// } +// +// @And("^I search for juror \"([^\"]*)\"$") +// public void clickGlobalSearch(String jurorNumber) { +// JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch(jurorNumber); +// } +// +// @And("^I search for pool number$") +// public void globalSearchForPool() { +// JUROR_RECORD_SEARCH.searchForRecordFromPoolSearch(poolNumber.get()); +// } +// +// @When("^I check the search juror button is not visible$") +// public void searchJurorButtonNotVisible() { +// assertTrue("search button was visible", JUROR_RECORD_SEARCH.searchButtonInvisible()); +// } +// +// @When("^I check the Apps button is not visible$") +// public void appsButtonInvisible() { +// assertTrue("apps button is visible", HEADER_PAGE.appsButtonInvisible()); +// } +// +// @When("^the user enters an incorrect juror record number$") +// public void userEntersInvalidJurorRecordNumber() throws InterruptedException { +// JUROR_RECORD_SEARCH.searchForRecordFromGlobalSearch("999999999"); +// } +// +// @Then("^an error message is displayed explaining that there are no matching results$") +// public void anErrorMessageIsDisplayedForSearch() { +// String mainText = JUROR_RECORD_SEARCH.getMainBodyText(); +// assertTrue(mainText.contains("There are no matching results")); +// assertTrue(mainText.contains("Improve your search by:")); +// assertTrue(mainText.contains("double-checking your spelling")); +// assertTrue(mainText.contains("searching by the complete juror number only")); +// } +// + @Then("^the juror record is displayed with the following fields new schema$") + public void jurorRecordDisplayedWithFollowingFields(DataTable table) { + Map data = table.asMap(String.class, String.class); + assertEquals(data.get("Juror number"), JUROR_RECORD_SEARCH.getJurorNumber()); + assertEquals(data.get("Juror status"), JUROR_RECORD_SEARCH.getJurorStatus()); + assertEquals(data.get("Pool number"), JUROR_RECORD_SEARCH.getPoolNumber()); + assertEquals(DBTNSD.newPoolDate.get() , JUROR_RECORD_SEARCH.getCourtStartDate()); + assertEquals(data.get("Court name"), JUROR_RECORD_SEARCH.getCourtName()); + } +// +// @Given("^multiple pool records from multiple courts exist$") +// public void multiplePoolRecordsMultipleCourtsExist() { +// } +// +// @When("^the user filters by \"([^\"]*)\"$") +// public void userEntersIntoFilterField(String court) throws InterruptedException { +// POOL_REQUESTS_PAGE.enterFilterString(court); +// POOL_REQUESTS_PAGE.clickFilterAutocompleteOption(); +// POOL_REQUESTS_PAGE.clickFilterButton(); +// } +// +// @Then("^only records from \"([^\"]*)\" are displayed$") +// public void onlyRecordsFromAreDisplayed(String expectedCourt) { +// List courtList = POOL_REQUESTS_PAGE.getPoolRequestCourtNames(); +// courtList.forEach( +// e -> assertEquals(expectedCourt, e) +// ); +// } +// +// @Then("^no records are displayed$") +// public void noRecordsAreDisplayed() { +// List courtList = POOL_REQUESTS_PAGE.getPoolRequestCourtNames(); +// assertTrue(courtList.isEmpty()); +// } +// +// @Then("^only active records from \"([^\"]*)\" are displayed$") +// public void onlyActiveRecordsFromAreDisplayed(String expectedCourt) { +// List courtList = POOL_REQUESTS_PAGE.getActivePoolRequestCourtNames(); +// courtList.forEach( +// e -> assertEquals(expectedCourt, e) +// ); +// } +// +// @When("^I enter a juror details phone number of \"([^\"]*)\"$") +// public void enterReplyDetailsPhone(String phone) { +// SUMMONS_REPLY.enterPrimaryPhone(phone); +// } +// +// @Then("^an error is displayed on the juror summons reply page saying \"([^\"]*)\"$") +// public void replyDetailsErrorIsDisplayed(String error) { +// assertTrue(SUMMONS_REPLY.getErrors().contains(error)); +// } +// +// @When("^I enter a juror details email of \"([^\"]*)\"$") +// public void enterReplyDetailsEmail(String email) { +// SUMMONS_REPLY.enterEmail(email); +// } +// +// @When("^I click save on the juror details change page$") +// public void saveJurorDetailsChange() { +// SUMMONS_REPLY.saveChanges(); +// } +// +// @When("^I enter a first name of \"([^\"]*)\" on the juror summons reply change name page$") +// public void enterJurorDetailsFirstName(String name) { +// SUMMONS_REPLY.enterFirstName(name); +// +// } +// +// @When("^I enter an address line 1 of \"([^\"]*)\" on the juror summons reply change address page$") +// public void enterJurorDetailsAddress1(String address) { +// SUMMONS_REPLY.enterAddressLineOne(address); +// } +// +// @Then("^I see a name of \"([^\"]*)\" on the juror details reply page$") +// public void iSeeNameOfJurorDetails(String name) { +// assertTrue(SUMMONS_REPLY.getJurorName().contains(name)); +// } +// +// @Then("^I see an address of \"([^\"]*)\" on the juror details reply page$") +// public void iSeeAddressOfJurorDetails(String address) { +// assertTrue(SUMMONS_REPLY.getJurorAddress().contains(address)); +// } +// +// @When("^I click the change name link on the juror details reply page$") +// public void clickChangeJurorDetailsName() { +// SUMMONS_REPLY.clickChangeName(); +// } +// +// @When("^I click the change address link on the juror details reply page$") +// public void clickChangeJurorDetailsAddress() { +// SUMMONS_REPLY.clickChangeAddress(); +// } +// +// @Then("^no active records are displayed$") +// public void noActiveRecordsAreDisplayed() { +// List courtList = POOL_REQUESTS_PAGE.getActivePoolRequestCourtNames(); +// assertTrue(courtList.isEmpty()); +// } +// +// @And("^I click the Enter summons reply button$") +// public void clickEnterSummonsReplyButton() { +// SUMMONS_REPLY.clickEnterSummonsReplyButton(); +// } +// +// @Then("^the juror details form is displayed$") +// public void verifyEnterSummonsFormDisplayed() { +// assertEquals("Juror details", SUMMONS_REPLY.getHeadingText()); +// } +// +// @Then("^the juror details form is not displayed$") +// public void verifyEnterSummonsFormNotDisplayed() { +// assertNotEquals("Juror details", SUMMONS_REPLY.getHeadingText()); +// } +// +// @When("^I fill in all of the juror details for the summons reply$") +// public void fillJurorDetailsForSummonsReply() { +// SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); +// +// SUMMONS_REPLY.enterPrimaryPhone("0777777777"); +// SUMMONS_REPLY.enterSecondaryPhone("0777777771"); +// SUMMONS_REPLY.enterEmail("test@test.com"); +// } +// +// @And("^I enter a date of birth in the summons reply that will make the juror too old$") +// public void enterDateOfBirthTooOld() { +// SUMMONS_REPLY.enterDateOfBirth("01/01/1945"); +// +// } +// +// @And("^I enter a date of birth in the summons reply that will make the juror too young$") +// public void enterDateOfBirthTooYoung() { +// int yearYoung = ((Year.now().getValue()) - 16); +// +// SUMMONS_REPLY.enterDateOfBirth("01/01/" + yearYoung); +// +// } +// +// @And("^I enter a date of birth that will make the juror between 18 and 75$") +// public void enterDateOfBirthJustRight() { +// int yearYoung = ((Year.now().getValue()) - 30); +// +// SUMMONS_REPLY.enterDateOfBirth("18/07/" + yearYoung); +// +// } +// +// @And("^I click continue on the juror summons reply page$") +// public void clickContinueOnJurorSummonsReplyPage() { +// SUMMONS_REPLY.clickContinue(); +// } +// +// @Then("^the juror summons reply eligibility page is displayed$") +// public void verifyJurorSummonsReplyEligibilityPageDisplayed() { +// assertEquals("Eligibility", SUMMONS_REPLY.getHeadingText()); +// } +// +// @When("^I answer the juror summons reply eligibility questions$") +// public void answerJurorSummonsReplyEligibilityQuestions() { +// SUMMONS_REPLY.clickLivedConsecutivelyYes(); +// SUMMONS_REPLY.clickMentalHealthActNo(); +// SUMMONS_REPLY.clickLackCapacityNo(); +// SUMMONS_REPLY.clickOnBailNo(); +// SUMMONS_REPLY.clickCriminalOffenceNo(); +// } +// +// @Then("^the juror summons reply types page is displayed$") +// public void verifyJurorSummonsReplyTypesPageDisplayed() { +// assertEquals("Reply types", SUMMONS_REPLY.getHeadingText()); +// } +// +// @When("^I select that the juror can serve on the summons date$") +// public void selectJurorCanServeOnSummonsDate() { +// SUMMONS_REPLY.clickCanServeDate(); +// } +// +// @Then("^the juror summons reply CJS employment page is displayed$") +// public void verifyJurorSummonsReplyCJSEmploymentPageDisplayed() { +// assertEquals("CJS employment", SUMMONS_REPLY.getHeadingText()); +// } +// +// @When("^I select that the juror has not worked in the criminal justice system$") +// public void selectJurorNotWorkedInCriminalJusticeSystem() { +// SUMMONS_REPLY.clickCjsEmploymentNo(); +// } +// +// @When("^I select that the juror has worked for the police force$") +// public void yesToPoliceForce() { +// SUMMONS_REPLY.clickCjsEmploymentYes(); +// SUMMONS_REPLY.selectPoliceForceYes(); +// } +// +// @When("^I enter over 2000 characters in the Which police force\\? text box$") +// public void over2000charactersPolice() { +// String longText = StringUtils.repeat("Test", 501); +// SUMMONS_REPLY.enterPoliceForceDetails(longText); +// } +// +// @Then("^the juror summons reply reasonable adjustments page is displayed$") +// public void verifyJurorSummonsReplyReasonableAdjustmentsPageDisplayed() { +// assertEquals("Reasonable adjustments", SUMMONS_REPLY.getHeadingText()); +// } +// +// @When("^I select that the juror does not need adjustments$") +// public void selectJurorDoesNotNeedAdjustments() { +// SUMMONS_REPLY.clickAdjustmentsNo(); +// } +// +// @When("^I select that the juror wants communications in Welsh$") +// public void selectJurorWantsWelshComms() { +// SUMMONS_REPLY.clickWelsh(); +// } +// +// @Then("^the juror summons reply Signature page is displayed$") +// public void verifyJurorSummonsReplySignaturePageDisplayed() { +// assertEquals("Signature", SUMMONS_REPLY.getHeadingText()); +// } +// +// @When("^I select that the summons reply has been signed$") +// public void selectSummonsReplyHasBeenSigned() { +// SUMMONS_REPLY.clickSignedYes(); +// } +// +// @And("^I click done on the juror summons reply page$") +// public void clickDoneOnJurorSummonsReplyPage() { +// SUMMONS_REPLY.clickDoneButton(); +// } +// +// @Then("^the view summons reply page is displayed$") +// public void verifyViewSummonsReplyPageDisplayed() { +// } +// +// @Given("^a standard paper summons reply has been entered$") +// public void standardPaperSummonsHasBeenEntered() { +// summonsReplyNumber = "111000000"; +// } +// +// +// @Given("^I navigate to the paper summons reply$") +// public void iNavigateToThePaperSummonsReply() { +// String currentUrl = webDriver.getCurrentUrl(); +// String protocol = NAV.getProtocolFromURLString(currentUrl); +// String subUrl = currentUrl.split("https?://")[1].split("/")[0]; +// webDriver.get(protocol + subUrl + String.format("/summons-replies/response/%s/paper", summonsReplyNumber)); +// } +// +// @Given("^I navigate to the summons reply$") +// public void iNavigateToTheSummonsReply() { +// String currentUrl = webDriver.getCurrentUrl(); +// String protocol = NAV.getProtocolFromURLString(currentUrl); +// String subUrl = currentUrl.split("https?://")[1].split("/")[0]; +// webDriver.get(protocol + subUrl + String.format("/response/%s", summonsReplyNumber)); +// } +// +// @When("^I select Process reply$") +// public void selectProcessReply() throws Throwable { +// NAV.press_buttonByName("Process reply"); +// } +// +// @When("^I select the Excusal radio button$") +// public void selectExcusal() { +// SUMMONS_REPLY.selectExcusalRadio(); +// } +// +// @When("^I click continue on the process reply page$") +// public void clickContinueProcessReply() { +// SUMMONS_REPLY.clickContinue(); +// } +// +// @When("^I select the Grant Excusal radio button$") +// public void selectGrantExcusalRadio() { +// SUMMONS_REPLY.selectGrantExcusalRadio(); +// } +// +// @Then("^I see the excusal success message for \"([^\"]*)\"$") +// public void iSeeExcusalSuccessMessage(String excusalReason) { +// String bannerText = SUMMONS_REPLY.getResponseBannerText(); +// assertTrue(bannerText.contains("successfully processed")); +// assertTrue(bannerText.contains("Excusal granted")); +// assertTrue(bannerText.contains(excusalReason)); +// } +// +// @And("^I see the name of the juror on the page header$") +// public void iSeeTheJurorsNameInTheHeader() { +// assertTrue("The Juror's name is NOT present in the header.", VIEW_SUMMONS_REPLY.jurorNameHeaderIsPresent()); +// } +// +// @And("^I see the reply status on the page$") +// public void iSeeTheReplyStatus() { +// originalReplyStatus = VIEW_SUMMONS_REPLY.getReplyStatus(); +// } +// +// @And("^I see the reply status has updated to \"([^\"]*)\"$") +// public void replyStatusHasBeenUpdated(String updatedReplyStatus) { +// assertEquals("Reply Status is not as expected", updatedReplyStatus, VIEW_SUMMONS_REPLY.getReplyStatus()); +// } +// +// @Then("^I see the following summons reply details under the juror details tab$") +// public void iSeeTheFollowingSummonsReplyDetailsUnderJurorDetails(DataTable dataTable) { +// Map expectedData = dataTable.asMap(String.class, String.class); +// Map actualData = VIEW_SUMMONS_REPLY.getJurorDetails(); +// +// assertEquals(expectedData.get("jurorName"), actualData.get("jurorName")); +// assertEquals(expectedData.get("jurorAddress"), actualData.get("jurorAddress")); +// assertEquals(expectedData.get("jurorDob"), actualData.get("jurorDob")); +// assertEquals(expectedData.get("jurorMainPhone"), actualData.get("jurorMainPhone")); +// assertEquals(expectedData.get("jurorAltPhone"), actualData.get("jurorAltPhone")); +// assertEquals(expectedData.get("jurorEmail"), actualData.get("jurorEmail")); +// } +// +// @And("^I see the reply \"([^\"]*)\" on the response is \"([^\"]*)\"$") +// public void replyTypeStatus(String flag, String value) { +// +// if (flag.equals("type")) +// assertEquals("Reply " + flag + " is not as expected", value, VIEW_SUMMONS_REPLY.getTypeValue()); +// +// if (flag.equals("status")) +// assertEquals("Reply " + flag + " is not as expected", value, VIEW_SUMMONS_REPLY.getStatusValue()); +// } +// +// @Then("^I see the following summons reply details under the eligibility tab$") +// public void iSeeTheFollowingSummonsReplyDetailsUnderEligibilityDetails(DataTable dataTable) { +// Map expectedData = dataTable.asMap(String.class, String.class); +// Map actualData = VIEW_SUMMONS_REPLY.getJurorEligibility(); +// +// assertEquals(expectedData.get("jurorResidency"), actualData.get("jurorResidency")); +// assertEquals(expectedData.get("jurorMca"), actualData.get("jurorMca")); +// assertEquals(expectedData.get("jurorBail"), actualData.get("jurorBail")); +// assertEquals(expectedData.get("jurorConvictions"), actualData.get("jurorConvictions")); +// } +// +// @When("^I click the juror details eligibility tab$") +// public void iClickTheEligibilityTab() { +// VIEW_SUMMONS_REPLY.clickEligibilityTab(); +// } +// +// @When("^I click the juror details deferral tab$") +// public void iClickTheDeferralTab() { +// VIEW_SUMMONS_REPLY.clickDeferralTab(); +// } +// +// @Then("^I see the deferral status is \"([^\"]*)\"$") +// public void iSeeTheDeferralStatusIs(String status) { +// status = status.replace("\\n", "\n").replace("\\", ""); +// assertEquals(status, VIEW_SUMMONS_REPLY.getDeferral()); +// } +// +// @When("^I click the juror details CJS tab$") +// public void iClickTheCJSTab() { +// VIEW_SUMMONS_REPLY.clickCjsTab(); +// } +// +// @Then("^I see the CJS status is \"([^\"]*)\"$") +// public void iSeeTheCJSStatusIs(String status) { +// // This is not nice, but I believe there's a bug in Cucumber making it necessary +// status = status.replace("\\n", "\n").replace("\\", ""); +// assertEquals(status, VIEW_SUMMONS_REPLY.getCjsStatus()); +// } +// +// @Then("^I see a previous name of \"([^\"]*)\"$") +// public void iSeePreviousNameOf(String previousName) { +// // This is not nice, but I believe there's a bug in Cucumber making it necessary +// previousName = previousName.replace("\\n", "\n").replace("\\", ""); +// assertEquals(previousName, VIEW_SUMMONS_REPLY.getPreviousName()); +// } +// +// @When("^I click the juror details adjustments tab$") +// public void iClickTheAdjustmentsTab() { +// VIEW_SUMMONS_REPLY.clickAdjustmentsTab(); +// } +// +// @Then("^I see the adjustments status is \"([^\"]*)\"$") +// public void iSeeTheAdjustmentsStatusIs(String status) { +// // This is not nice, but I believe there's a bug in Cucumber making it necessary +// status = status.replace("\\n", "\n").replace("\\", ""); +// assertEquals(status, VIEW_SUMMONS_REPLY.getAdjustmentStatus()); +// } +// +// @When("^I click the juror details signature tab$") +// public void iClickTheSignatureTab() { +// VIEW_SUMMONS_REPLY.clickSignatureTab(); +// } +// +// @Then("^I see the signature status is \"([^\"]*)\"$") +// public void iSeeTheSignatureStatusIs(String status) { +// assertEquals(status, VIEW_SUMMONS_REPLY.getSignatureStatus()); +// } +// +// @Given("^I navigate to the pool search screen$") +// public void navigateToPoolSearch() { +// iNavigateToThePoolRequestScreen(); +// POOL_REQUESTS_PAGE.clickSearchTab(); +// } +// +// @When("^I enter the pool number \"([^\"]*)\" on the pool search screen$") +// public void enterPoolNumberInSearch(String poolNo) { +// POOL_SEARCH.enterPoolNo(poolNo); +// } +// +// @When("^I enter the pool number of the pool I have just created on the pool search screen$") +// public void enterCreatedPoolNumberInSearch() { +// POOL_SEARCH.enterPoolNo(poolNumber.get()); +// } +// +// @When("^I enter a location code of \"([^\"]*)\" for the pool search$") +// public void enterLocationCodeInPoolSearch(String locationCode) { +// POOL_SEARCH.enterLocationCode(locationCode); +// } +// +// @When("^I enter a date of \"([^\"]*)\" for the pool search$") +// public void enterPoolDateInSearch(String date) { +// POOL_SEARCH.enterServiceStartDate(date); +// +// } +// +// @When("^I search for the pool$") +// public void clickPoolSearch() { +// POOL_SEARCH.clickContinue(); +// } +// +// @When("^I expand the pool search advanced search criteria$") +// public void expandPoolSearchAdvanced() { +// POOL_SEARCH.clickAdvancedSearch(); +// } +// +// @When("^I select the Requested option in the advanced pool search section$") +// public void selectRequestedPoolSearch() { +// POOL_SEARCH.clickPoolRequested(); +// } +// +// @When("^I select the Active option in the advanced pool search section$") +// public void selectActivePoolSearch() { +// POOL_SEARCH.clickPoolActive(); +// } +// +// @When("^I select the Completed option in the advanced pool search section$") +// public void selectCompletedPoolSearch() { +// POOL_SEARCH.clickPoolCompleted(); +// } +// +// @When("^I select the With the Bureau option in the advanced pool search section$") +// public void selectWithTheBureauPoolSearch() { +// POOL_SEARCH.clickWithTheBureau(); +// } +// +// @When("^I select the At Court option in the advanced pool search section$") +// public void selectAtCourtPoolSearch() { +// POOL_SEARCH.clickAtCourt(); +// } +// +// @When("^I select the Crown Court option in the advanced pool search section$") +// public void selectCrownCourtPoolSearch() { +// POOL_SEARCH.clickCrownCourt(); +// } +// +// @When("^I select the Civil Court option in the advanced pool search section$") +// public void selectCivilCourtPoolSearch() { +// POOL_SEARCH.clickCivilCourt(); +// } +// +// @When("^I select the High Court option in the advanced pool search section$") +// public void selectHighCourtPoolSearch() { +// POOL_SEARCH.clickHighCourt(); +// } +// +// @When("^I select all the tick boxes in the advanced search section$") +// public void selectAllAdvancedTickBoxes() { +// //Pool Status +// POOL_SEARCH.clickPoolRequested(); +// POOL_SEARCH.clickPoolActive(); +// POOL_SEARCH.clickPoolCompleted(); +// +// //Pool Stage +// POOL_SEARCH.clickWithTheBureau(); +// POOL_SEARCH.clickAtCourt(); +// +// //Pool Type +// POOL_SEARCH.clickCrownCourt(); +// POOL_SEARCH.clickCivilCourt(); +// POOL_SEARCH.clickHighCourt(); +// } +// +// @Then("^all the tick boxes in the advanced search section are still selected$") +// public void allTheAdvancedTickBoxesAreSelected() { +// //Pool Status +// assertTrue(POOL_SEARCH.poolRequestedIsSelected()); +// assertTrue(POOL_SEARCH.poolActiveIsSelected()); +// assertTrue(POOL_SEARCH.poolCompletedIsSelected()); +// +// //Pool Stage +// assertTrue(POOL_SEARCH.withTheBureauIsSelected()); +// assertTrue(POOL_SEARCH.atCourtIsSelected()); +// +// //Pool Type +// assertTrue(POOL_SEARCH.crownCourtIsSelected()); +// assertTrue(POOL_SEARCH.civilCourtIsSelected()); +// assertTrue(POOL_SEARCH.highCourtIsSelected()); +// } +// +// @Then("^the pool is displayed$") +// public void thePoolIsDisplayed() { +// assertTrue(POOL_SEARCH.poolRecordIsDisplayed()); +// } +// +// @Then("^no pool search result is found$") +// public void noPoolSearchFound() { +// assertEquals("There are no matching results", POOL_SEARCH.getPoolSearchErrorText()); +// } +// +// @Then("^the pool search results are found$") +// public void poolSearchFound() { +// Integer numberOfResultsInHeader = Integer.valueOf(POOL_SEARCH.getPoolSearchResultText().replaceAll("[^0-9]", "")); +// assertEquals(numberOfResultsInHeader, POOL_SEARCH.getPoolSearchNumberOfResults()); +// } +// +// @Then("^I am on the modernisation version of View Summons Reply$") +// public void iAmOnModernisationVersionOfSummonsReply() { +// NAV.waitForPageLoad(); +// assertTrue(VIEW_SUMMONS_REPLY.seeSummonsReplyTag()); +// assertTrue(VIEW_SUMMONS_REPLY.seeReplyMethodLabel()); +// assertTrue(VIEW_SUMMONS_REPLY.seeServiceStartDateLabel()); +// } +// +// @Then("^I see Reply Method is \"([^\"]*)\"$") +// public void replyMethodIs(String replyMethod) { +// assertEquals(replyMethod, VIEW_SUMMONS_REPLY.seeReplyMethodValue()); +// } +// +// @Then("^I see assigned to is \"([^\"]*)\"$") +// public void replyIsAssignedTo(String staff) { +// assertEquals(staff, VIEW_SUMMONS_REPLY.getAssignedToStaff()); +// } +// +// @And("^I am asked if the date of birth is correct$") +// public void iAmAskedIfTheDateOfBirthIsCorrect() { +// assertEquals("Is their date of birth correct?", VIEW_SUMMONS_REPLY.ineligibilityAgeConfirmHeaderText()); +// } +// +// @Then("^I click yes to disqualify the juror$") +// public void iClickYesToDisqualifyTheJuror() { +// VIEW_SUMMONS_REPLY.clickDisqualifyButton(); +// } +// +// @Then("^I click no to change the date of birth to the correct date$") +// public void iClickNoToChangeTheDateOfBirthToTheCorrectDate() { +// VIEW_SUMMONS_REPLY.clickChangeDateLink(); +// } +// +// @And("^I see the juror status has updated to \"([^\"]*)\"$") +// public void iSeeTheJurorStatusHasUpdatedTo(String jurorStatus) { +// assertEquals(jurorStatus, VIEW_SUMMONS_REPLY.getJurorStatus()); +// } +// +// @And("^I see the super urgent flag$") +// public void iSeeTheSuperUrgentFlag() { +// assertEquals("SUPER URGENT", SUMMONS_REPLY.getSuperUrgentFlag()); +// } +// +// @And("^I see \"([^\"]*)\" in the response banner$") +// public void iSeeResponseBannerText(String bannerText) { +// assertEquals(bannerText, SUMMONS_REPLY.getResponseBannerText()); +// } +// +// @And("^I see \"([^\"]*)\" in the pool banner$") +// public void iSeePoolBannerText(String bannerText) { +// assertEquals(bannerText, SUMMONS_REPLY.getResponseBannerText()); +// } +// +// @And("^I see the process reply button$") +// public void iSeeTheProcessReplyButton() { +// assertTrue(SUMMONS_REPLY.processReplyButtonIsPresent()); +// } +// +// @And("^I do not see the process reply button$") +// public void iDoNotSeeTheProcessReplyButton() { +// assertFalse(SUMMONS_REPLY.processReplyButtonIsPresent()); +// } +// +// @And("^I record an unhappy path paper summons response$") +// public void iRecordUnhappyPathPaperResponse() throws Throwable { +// SUMMONS_REPLY.clickEnterSummonsReplyButton(); +// +// SUMMONS_REPLY.clickChangeName(); +// NAV.set_valueTo("First name", "Changed fname"); +// NAV.set_valueTo("Last name", "Changed lname"); +// SUMMONS_REPLY.saveChanges(); +// NAV.waitForPageLoad(); +// +// SUMMONS_REPLY.clickChangeAddress(); +// NAV.set_valueTo("Address line 1", "Changed address line 1"); +// SUMMONS_REPLY.saveChanges(); +// NAV.waitForPageLoad(); +// +// SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); +// +// SUMMONS_REPLY.enterPrimaryPhone("0777777777"); +// SUMMONS_REPLY.enterSecondaryPhone("0777777771"); +// SUMMONS_REPLY.enterEmail("test@test.com"); +// +// NAV.check_checkbox("Yes, send Welsh language communications"); +// +// NAV.set_valueTo("Relationship to juror", "Spouse"); +// SUMMONS_REPLY.selectThirdPartyReasonNotHere(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickLivedConsecutivelyNo(); +// SUMMONS_REPLY.clickMentalHealthActYes(); +// SUMMONS_REPLY.clickLackCapacityYes(); +// SUMMONS_REPLY.clickOnBailYes(); +// SUMMONS_REPLY.clickCriminalOffenceYes(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickDeferralRequest(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCjsEmploymentYes(); +// NAV.check_checkbox("Police force"); +// NAV.set_valueTo("Which police force?", "West Midlands Police"); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickAdjustmentsYes(); +// NAV.set_valueTo("What help does the juror need at court?", "Reasonable adjustments reasons"); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickSignedNo(); +// SUMMONS_REPLY.clickDoneButton(); +// } +// +// @And("^I record a happy path paper summons response$") +// public void iRecordHappyPathPaperResponse() throws Throwable { +// SUMMONS_REPLY.clickEnterSummonsReplyButton(); +// +// SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); +// +// SUMMONS_REPLY.enterPrimaryPhone("0777777777"); +// SUMMONS_REPLY.enterSecondaryPhone("0777777771"); +// SUMMONS_REPLY.enterEmail("test@test.com"); +// +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickLivedConsecutivelyYes(); +// SUMMONS_REPLY.clickMentalHealthActNo(); +// SUMMONS_REPLY.clickLackCapacityNo(); +// SUMMONS_REPLY.clickOnBailNo(); +// SUMMONS_REPLY.clickCriminalOffenceNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCanServeDate(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCjsEmploymentNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickAdjustmentsNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickSignedYes(); +// SUMMONS_REPLY.clickDoneButton(); +// } +// +// @And("^I record a happy path paper summons response and process now$") +// public void iRecordHappyPathPaperResponseProcessed() throws Throwable { +// SUMMONS_REPLY.clickEnterSummonsReplyButton(); +// +// SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); +// +// SUMMONS_REPLY.enterPrimaryPhone("0777777777"); +// SUMMONS_REPLY.enterSecondaryPhone("0777777771"); +// SUMMONS_REPLY.enterEmail("test@test.com"); +// +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickLivedConsecutivelyYes(); +// SUMMONS_REPLY.clickMentalHealthActNo(); +// SUMMONS_REPLY.clickLackCapacityNo(); +// SUMMONS_REPLY.clickOnBailNo(); +// SUMMONS_REPLY.clickCriminalOffenceNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCanServeDate(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCjsEmploymentNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickAdjustmentsNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickSignedYes(); +// SUMMONS_REPLY.clickDoneButton(); +// SUMMONS_REPLY.clickProcessNowButton(); +// } +// +// @And("^I record a happy path deferral paper summons response$") +// public void iRecordHappyPathDeferralPaperResponse() throws Throwable { +// SUMMONS_REPLY.clickEnterSummonsReplyButton(); +// +// SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); +// +// SUMMONS_REPLY.enterPrimaryPhone("0777777777"); +// SUMMONS_REPLY.enterSecondaryPhone("0777777771"); +// SUMMONS_REPLY.enterEmail("test@test.com"); +// +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickLivedConsecutivelyYes(); +// SUMMONS_REPLY.clickMentalHealthActNo(); +// SUMMONS_REPLY.clickLackCapacityNo(); +// SUMMONS_REPLY.clickOnBailNo(); +// SUMMONS_REPLY.clickCriminalOffenceNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickDeferralRequest(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCjsEmploymentNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickAdjustmentsNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickSignedYes(); +// SUMMONS_REPLY.clickDoneButton(); +// } +// +// @And("^I record an excusal request paper summons response$") +// public void iRecordExcusalRequestPaperResponse() throws Throwable { +// SUMMONS_REPLY.clickEnterSummonsReplyButton(); +// +// SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); +// +// SUMMONS_REPLY.enterPrimaryPhone("0777777777"); +// SUMMONS_REPLY.enterSecondaryPhone("0777777771"); +// SUMMONS_REPLY.enterEmail("test@test.com"); +// +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickLivedConsecutivelyYes(); +// SUMMONS_REPLY.clickMentalHealthActNo(); +// SUMMONS_REPLY.clickLackCapacityNo(); +// SUMMONS_REPLY.clickOnBailNo(); +// SUMMONS_REPLY.clickCriminalOffenceNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickExcusalRequest(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCjsEmploymentNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickAdjustmentsNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickSignedYes(); +// SUMMONS_REPLY.clickDoneButton(); +// } +// @And("^I record a paper summons response with reasonable adjustments$") +// public void iRecordAPaperResponseWithReasonableAdjustments() throws Throwable { +// SUMMONS_REPLY.clickEnterSummonsReplyButton(); +// +// SUMMONS_REPLY.enterDateOfBirth("18/07/1976"); +// +// SUMMONS_REPLY.enterPrimaryPhone("0777777777"); +// SUMMONS_REPLY.enterSecondaryPhone("0777777771"); +// SUMMONS_REPLY.enterEmail("test@test.com"); +// +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickLivedConsecutivelyYes(); +// SUMMONS_REPLY.clickMentalHealthActNo(); +// SUMMONS_REPLY.clickLackCapacityNo(); +// SUMMONS_REPLY.clickOnBailNo(); +// SUMMONS_REPLY.clickCriminalOffenceNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCanServeDate(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickCjsEmploymentNo(); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickAdjustmentsYes(); +// NAV.set_valueTo("What help does the juror need at court?", "Reasonable adjustments reasons"); +// SUMMONS_REPLY.clickContinue(); +// +// SUMMONS_REPLY.clickSignedYes(); +// SUMMONS_REPLY.clickDoneButton(); +// } +// +// @And("^I click the process reply button$") +// public void iClickTheProcessReplyButton() { +// SUMMONS_REPLY.clickProcessReplyButton(); +// } +// +// @Then("^I mark the reply as responded$") +// public void iMarkTheReplyAsResponded() { +// SUMMONS_REPLY.clickMarkAsResponded(); +// } +// +// @Then("^I select deferral request$") +// public void iSelectDeferralRequest() { +// SUMMONS_REPLY.clickProcessAcionDeferralRequest(); +// } +// +// @And("^I click the checkbox to mark the reply as responded$") +// public void clickMarkTheReplyAsRespondedCheckbox() { +// SUMMONS_REPLY.clickMarkAsRespondedCheckbox(); +// } +// +// @And("^I confirm I want to mark the reply as responded$") +// public void iConfirmIWantToMarkTheReplyAsResponded() { +// SUMMONS_REPLY.clickConfirmMarkAsRespondedButton(); +// } +// +// @And("^I check the processed success banner is present for the reply I just processed$") +// public void processedSuccessBannerIsPresent() { +// assertTrue(SUMMONS_REPLY.processedSuccessBannerIsPresent()); +// assertEquals(jurorPartNumber.get(), SUMMONS_REPLY.processSuccessBannerLink()); +// } +// +// @Then("^I click the link for the juror record$") +// public void iClickTheLinkForTheJurorRecord() { +// SUMMONS_REPLY.clickProcessSuccessBannerLink(); +// } +// +// @And("^I see the juror status on the juror record screen has updated to \"([^\"]*)\"$") +// public void jurorStatusHasUpdatedTo(String jurorResponse) { +// assertEquals(jurorResponse, JUROR_RECORD_SEARCH.getJurorStatus()); +// } +// +// @Then("^I click the cancel link$") +// public void iClickTheCancelLink() { +// SUMMONS_REPLY.clickCancelLink(); +// } +// +// @And("^I see the juror status on the juror record screen is \"([^\"]*)\"$") +// public void iSeeTheJurorStatusOnTheJurorRecordScreenIs(String jurorStatus) { +// assertEquals(jurorStatus, JUROR_RECORD.getJurorStatus()); +// } +// +// @And("^I click confirm on the $") +// public void iClickConfirm() { +// } +// +// @And("^there is an error message with the text \"([^\"]*)\"$") +// public void thereIsAnErrorMessageWithTheText(String errorText) { +// assertTrue(SUMMONS_REPLY.errorIsPresent()); +// assertEquals(errorText, SUMMONS_REPLY.getErrorText()); +// } +// +// @Then("^I am on the check can accommodate screen$") +// public void iAmOnTheCheckCanAccomodateScreen() { +// String URL = webDriver.getCurrentUrl(); +// Assert.assertTrue(URL.contains("check-can-accommodate")); +// } +// +// @Then("^I see the following juror information on the check can accommodate screen$") +// public void iSeeTheFollowingJurorInformationOnTheCheckCanAccommodateScreen(DataTable dataTable) { +// Map expectedData = dataTable.asMap(String.class, String.class); +// Map actualData = VIEW_SUMMONS_REPLY.getCheckAccommodateJurorDetails(); +// +// assertEquals(expectedData.get("jurorName"), actualData.get("jurorName")); +// assertEquals(expectedData.get("jurorNumber"), actualData.get("jurorNumber")); +// assertEquals(expectedData.get("jurorMainPhone"), actualData.get("jurorMainPhone")); +// assertEquals(expectedData.get("jurorEmail"), actualData.get("jurorEmail")); +// assertEquals(expectedData.get("jurorAdjustmentReason"), actualData.get("jurorAdjustmentReason")); +// assertEquals(expectedData.get("jurorAdjustment"), actualData.get("jurorAdjustment")); +// +// } +// +// @Then("^I can paste the following information \"([^\"]*)\"$") +// public void iCanPasteTheJurorInformation(String expectedText) throws IOException, UnsupportedFlavorException { +// expectedText = expectedText.replace("\\n", "\n").replace("\\", ""); +// String copiedText = (String) Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.stringFlavor); +// assertEquals(expectedText, copiedText); +// } +// +// @When("^I enter the optic reference number \"([^\"]*)\"$") +// public void iEnterTheOpticReferenceNumber(String reference) { +// VIEW_SUMMONS_REPLY.enterOpticReferenceNumber(reference); +// } +// +// @Then("^The newly created optic reference \"([^\"]*)\" is displayed$") +// public void theNewlyCreatedOpticReferenceIsDisplayed(String reference) { +// assertEquals(reference, VIEW_SUMMONS_REPLY.getOpticeReferenceNo()); +// } +// +// @Then("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\"$") +// public void createNewPoolRequest(String poolRequestType, String court) throws Throwable { +// NAV.press_buttonByName("Create pool"); +// GRP.click_radioButtonWithLabel("Request new pool"); +// NAV.press_buttonByName("Continue"); +// NAV.set_valueTo("Enter a court name or location code", court); +// NAV.press_buttonByName("Continue"); +// NAV.waitForPageLoad(); +// POOL_REQUESTS_PAGE.clickToChangeDeferrals(); +// POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals("0"); +// NAV.press_buttonByName("Continue"); +// +// if (poolRequestType.equals("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// if (poolRequestType.equals("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// if (poolRequestType.equals("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// NAV.set_value_to("Number of jurors", "150"); +// NAV.press_buttonByName("Continue"); +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); +// poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); +// poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); +// poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); +// +// ArrayList pools = poolNumbers.get(); +// System.out.println("Getting Pool Number --- " + poolNumber.get()); +// +// pools.add(poolNumber.get()); +// System.out.println("Values in pools array --- " + pools.toString()); +// +// NAV.press_buttonByName("Request pool"); +// } +// +// @And("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\" using the same pool number$") +// public void iCreateACourtPoolRequestForCourtUsingAsThePoolNumber(String poolRequestType, String court) throws Throwable { +// NAV.press_buttonByName("Request a new pool"); +// NAV.set_valueTo("Enter a court name or location code", court); +// NAV.press_buttonByName("Continue"); +// NAV.waitForPageLoad(); +// if (poolRequestType.equals("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// if (poolRequestType.equals("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// if (poolRequestType.equals("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// NAV.set_value_to("Number of jurors", "150"); +// NAV.press_buttonByName("Continue"); +// iClickTheChangeLinkForThePoolNumber(); +// POOL_REQUESTS_PAGE.inputExistingPoolNumberAlt(poolNumber.get()); +// NAV.press_buttonByName("Change"); +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); +// poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); +// poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); +// +// ArrayList pools = poolNumbers.get(); +// pools.add(poolNumber.get()); +// +// System.out.println(poolNumber.get()); +// NAV.press_buttonByName("Request pool"); +// } +// +// @And("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\" with \"([^\"]*)\" deferral$") +// public void iCreateACourtPoolRequestForCourtWithDeferral(String poolRequestType, String court, String deferralsNumber) throws Throwable { +// NAV.press_buttonByName("Create pool"); +// GRP.click_radioButtonWithLabel("Request new pool"); +// NAV.press_buttonByName("Continue"); +// NAV.set_valueTo("Enter a court name or location code", court); +// NAV.press_buttonByName("Continue"); +// NAV.waitForPageLoad(); +// iClickTheChangeLinkForTheCourtDeferrals(); +// iChangeTheNumberOfCourtDeferralsTo(deferralsNumber); +// if (poolRequestType.equals("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// if (poolRequestType.equals("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// if (poolRequestType.equals("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// NAV.set_value_to("Number of jurors", "150"); +// +// +// NAV.press_buttonByName("Continue"); +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); +// poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); +// poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); +// //poolNumbers.add(poolNumber); +// System.out.println(poolNumber.get()); +// NAV.press_buttonByName("Request pool"); +// } +// +// @Then("^I create a \"([^\"]*)\" court pool request$") +// public void createNewPoolRequest(String poolRequestType) throws Throwable { +// NAV.press_buttonByName("Request a new pool"); +// NAV.waitForPageLoad(); +// POOL_REQUESTS_PAGE.clickToChangeDeferrals(); +// NAV.set_value_to("Number of deferred jurors to include in this pool", "0"); +// NAV.press_buttonByName("Continue"); +// { +// if (poolRequestType.equals("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// if (poolRequestType.equals("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// if (poolRequestType.equals("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// } +// +// +// NAV.set_value_to("Number of jurors", "150"); +// NAV.press_buttonByName("Continue"); +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getCourtNewPoolRequestNumber()); +// poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); +// NAV.press_buttonByName("Request pool"); +// } +// +// @Then("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\", \"([^\"]*)\" weeks in the future$") +// public void createNewPoolRequestWeeksInFuture(String poolRequestType, String court, Integer weeksInFuture) throws Throwable { +// String datePattern = "dd/MM/yyyy"; +// Calendar calendar = Calendar.getInstance(); +// calendar.add(Calendar.WEEK_OF_MONTH, weeksInFuture); +// LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); +// if (weeksInFuture == 0) { +// localDate = localDate.plusDays(1); +// } +// if ( localDate.getDayOfWeek() == DayOfWeek.SATURDAY || localDate.getDayOfWeek() == DayOfWeek.SUNDAY){ +// localDate = localDate.plusDays(2); +// } +// Date newDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); +// String newDateValues = new SimpleDateFormat(datePattern).format((newDate).getTime()); +// +// +// NAV.press_buttonByName("Create pool"); +// GRP.click_radioButtonWithLabel("Request new pool"); +// NAV.press_buttonByName("Continue"); +// +// NAV.set_valueTo("Enter a court name or location code", court); +// NAV.press_buttonByName("Continue"); +// //NAV.waitForPageLoad(); +// POOL_REQUESTS_PAGE.clickChangeDate(); +// POOL_REQUESTS_PAGE.enterNewDate(newDateValues); +// NAV.press_buttonByName("Change"); +// +// POOL_REQUESTS_PAGE.clickToChangeDeferrals(); +// POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals("0"); +// NAV.press_buttonByName("Continue"); +// { +// if (poolRequestType.equals("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// if (poolRequestType.equals("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// if (poolRequestType.equals("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// } +// NAV.set_value_to("Number of jurors", "150"); +// NAV.press_buttonByName("Continue"); +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getCourtNewPoolRequestNumber()); +// poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); +// NAV.press_buttonByName("Request pool"); +// } +// +// @Then("^I create an active \"([^\"]*)\" court pool request for court \"([^\"]*)\", \"([^\"]*)\" Mondays in the future$") +// public void createNewActivePoolRequestMondaysInFuture(String poolRequestType, String court, int mondaysInFuture) throws Throwable { +// NAV.press_buttonByName("Create pool"); +// GRP.click_radioButtonWithLabel("Request new pool"); +// NAV.press_buttonByName("Continue"); +// +// NAV.set_valueTo("Enter a court name or location code", court); +// NAV.press_buttonByName("Continue"); +// //NAV.waitForPageLoad(); +// POOL_REQUESTS_PAGE.clickChangeDate(); +// POOL_REQUESTS_PAGE.enterNewDate(mondayWeeksInFuture(mondaysInFuture)); +// NAV.press_buttonByName("Change"); +// +// POOL_REQUESTS_PAGE.clickToChangeDeferrals(); +// POOL_REQUESTS_PAGE.enterNumberOfCourtDeferrals("0"); +// NAV.press_buttonByName("Continue"); +// +// { +// if (poolRequestType.equalsIgnoreCase("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// if (poolRequestType.equalsIgnoreCase("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// if (poolRequestType.equalsIgnoreCase("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// } +// NAV.set_value_to("Number of jurors", "150"); +// NAV.press_buttonByName("Continue"); +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getCourtNewPoolRequestNumber()); +// +// ArrayList pools = poolNumbers.get(); +// pools.add(poolNumber.get()); +// +// poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); +// NAV.press_buttonByName("Request pool"); +// +// POOL_REQUESTS_PAGE.clickInactivePoolNumber(poolNumber.get()); +// NAV.press_buttonByName("Summon jurors"); +// NAV.set_value_to("Citizens to summon", "1"); +// NAV.press_buttonByName("Create pool and summon citizens"); +// POOL_REQUESTS_PAGE.clickTab("Pool requests"); +// } +// +// @Then("^I create \"([^\"]*)\" new \"([^\"]*)\" pool requests each a week apart in court \"([^\"]*)\"$") +// public void createMultiplePoolRequestsWeeksApart(Integer noOfPools, String courtType, String court) throws Throwable { +// Integer newPoolsCreated = 0; +// do { +// createNewPoolRequestWeeksInFuture(courtType, court, newPoolsCreated); +// String poolNo = POOL_REQUESTS_PAGE.getNewPoolNumberOnSummary(); +// +// ArrayList pools = poolNumbers.get(); +// pools.add(poolNo); +// +// POOL_REQUESTS_PAGE.clickFirstRequestLink(); +// NAV.press_buttonByName("Summon jurors"); +// NAV.set_value_to("Citizens to summon", "1"); +// NAV.press_buttonByName("Create pool and summon citizens"); +// POOL_REQUESTS_PAGE.clickTab("Pool requests"); +// newPoolsCreated = newPoolsCreated + 1; +// } while (newPoolsCreated < noOfPools); +// String poolsCreated = poolNumbers.toString().replace("[", "(").replace("]", ")"); +// System.out.println("Pools Created: " + poolsCreated); +// } +// +// @Then("^I create \"([^\"]*)\" new \"([^\"]*)\" pool requests each a week apart in court \"([^\"]*)\" with \"([^\"]*)\" jurors to summon$") +// public void createMultiplePoolRequestsWeeksApartSpecifiedJurorsToSummon(Integer noOfPools, String courtType, String court, String jurorsToSummon) throws Throwable { +// Integer newPoolsCreated = 0; +// do { +// createNewPoolRequestWeeksInFuture(courtType, court, newPoolsCreated + 1); +// String poolNo = POOL_REQUESTS_PAGE.getNewPoolNumberOnSummary(); +// +// ArrayList pools = poolNumbers.get(); +// pools.add(poolNo); +// +// POOL_REQUESTS_PAGE.clickFirstRequestLink(); +// NAV.press_buttonByName("Summon jurors"); +// NAV.set_value_to("Citizens to summon", jurorsToSummon); +// NAV.press_buttonByName("Create pool and summon citizens"); +// POOL_REQUESTS_PAGE.clickTab("Pool requests"); +// newPoolsCreated = newPoolsCreated + 1; +// } while (newPoolsCreated < noOfPools); +// String poolsCreated = poolNumbers.toString().replace("[", "(").replace("]", ")"); +// System.out.println("Pools Created: " + poolsCreated); +// } +// +// @Then("^I see the pool status is REQUESTED") +// public void seePoolStatusRequestedTag() throws Throwable { +// assertTrue(POOL_REQUESTS_PAGE.seePoolStatusRequestedTag()); +// } +// +// @Then("^I see the pool status is ACTIVE") +// public void seePoolStatusActiveTag() throws Throwable { +// assertTrue(POOL_REQUESTS_PAGE.seePoolStatusActiveTag()); +// } +// +// @Then("^I can see the newly created pool$") +// public void seeNewPoolRequest() throws Throwable { +// String mainText = JUROR_RECORD_SEARCH.getMainBodyText(); +// assertTrue(mainText.contains(poolNumber.get())); +// } +// +// @And("^I make a note of the pool number$") +// public void iMakeANoteOfThePoolNumber() { +// poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); +// ArrayList pools = poolNumbers.get(); +// pools.add(poolNumber.get()); +// System.out.println(poolNumber.get()); +// } +// +// @Then("^I see the refuse excusal success message for \"([^\"]*)\"$") +// public void iSeeRefuseExcusalSuccessMessage(String excusalReason) { +// String bannerText = SUMMONS_REPLY.getResponseBannerText(); +// assertTrue(bannerText.contains("successfully processed")); +// assertTrue(bannerText.contains("Excusal refused")); +// assertTrue(bannerText.contains(excusalReason)); +// } +// +// @When("^I select the Refuse Excusal radio button$") +// public void selectRefuseExcusalRadio() { +// SUMMONS_REPLY.selectRefuseExcusalRadio(); +// } +// +// @And("^I click the update juror record button$") +// public void iClickTheUpdateJurorRecordButton() { +// JUROR_RECORD_SEARCH.clickUpdateJurorRecord(); +// } +// +// @Then("^I click the summons reply tab$") +// public void iClickTheSummonsReplyTab() { +// JUROR_RECORD_SEARCH.clickSummonsTab(); +// } +// +// @And("^I click on the view summons reply link$") +// public void iClickOnTheViewSummonsReplyLink() { +// JUROR_RECORD_SEARCH.clickViewSummonsReplyLink(); +// } +// +// @And("^I select the mark as deceased radio button$") +// public void iSelectTheMarkAsDeceasedRadioButton() { +// JUROR_RECORD_SEARCH.clickMarkAsDeceasedRadioButton(); +// } +// +// @And("^I select the mark as undeliverable radio button$") +// public void iSelectTheMarkAsUndeliverableRadioButton() { +// JUROR_RECORD_SEARCH.clickMarkAsUndeliverableRadioButton(); +// } +// +// @And("^I add a comment of \"([^\"]*)\" to be recorded in the jurors history$") +// public void iAddACommentOfToBeRecordedInTheJurorsHistory(String commentForHistory) { +// JUROR_RECORD_SEARCH.enterCommentForHistory(commentForHistory); +// } +// +// @Then("^I click continue on the update juror record screen$") +// public void iClickContinueToMarkTheJurorAsDeceased() { +// JUROR_RECORD_SEARCH.clickContinue(); +// } +// +// @And("^I see the juror record updated banner containing \"([^\"]*)\"$") +// public void iSeeTheJurorRecordUpdatedBannerContaining(String bannerContains) { +// assertEquals(bannerContains, JUROR_RECORD_SEARCH.jurorRecordUpdatedContains()); +// } +// +// @And("^I see \"([^\"]*)\" in the error banner$") +// public void iSeeInTheErrorBanner(String errorText) { +// assertEquals(errorText, JUROR_RECORD_SEARCH.jurorRecordUpdatedErrorBannerText()); +// } +// +// @Then("^I see the summons reply status is \"([^\"]*)\"$") +// public void iSeeTheSummonsReplyStatusIs(String expectedStatus) { +// assertEquals(expectedStatus, SUMMONS_REPLY.getReplyStatus()); +// } +// +// @Then("^The system shall display the following non editable details on the additional summons screen$") +// public void theSystemWillDisplayNonEditableInformationOnTheAdditionalSummonsScreen(DataTable dataTable) { +// Map data = dataTable.asMap(String.class, String.class); +// assertEquals(poolNumber.get(), ADDITIONAL_SUMMONS.getPoolNumber()); +// assertEquals(data.get("jurorsRequested"), ADDITIONAL_SUMMONS.getJurorsRequested()); +// assertEquals(data.get("jurorsConfirmed"), ADDITIONAL_SUMMONS.getJurorsConfirmed()); +// assertEquals(data.get("jurorsRequired"), ADDITIONAL_SUMMONS.getJurorsRequired()); +// assertEquals(data.get("citizensSummoned"), ADDITIONAL_SUMMONS.getCitizensSummoned()); +// assertEquals(data.get("catchmentArea"), ADDITIONAL_SUMMONS.getCatchmentArea()); +// } +// +// @When("^I set extra citizens to summon to \"([^\"]*)\"$") +// public void iEnterExtraCitizensToSummon(String noCitizens) { +// ADDITIONAL_SUMMONS.setExtraCitizensToSummon(noCitizens); +// } + + @Then("^The \"([^\"]*)\" new jurors have been sent a summons letter new schema$") + public void checkNewJurorSummonsLetterNSD(String noJurors) throws SQLException { + int jurorRows = Integer.parseInt(noJurors); + + for (int index = 1; index <= jurorRows; index++) { + String jurorNo = POOL_OVERVIEW_PAGE.getJurorNumberInRow(index); + assertEquals("Juror summons letter sent to " + jurorNo, DBTNSD.checkJurorSummonsLetterNSD(jurorNo)); + } + } +// +// @Then("^there is an error message with the text \"([^\"]*)\" on the additional summons page$") +// public void thereIsAnErrorMessageWithTheTextOnAdditionalSummons(String errorText) { +// assertTrue(ADDITIONAL_SUMMONS.errorIsPresent()); +// assertEquals(errorText, ADDITIONAL_SUMMONS.getErrorText()); +// } +// +// @When("^I click the change catchment area link$") +// public void clickChangeCatchmentArea() { +// ADDITIONAL_SUMMONS.clickChangeCatchmentAreaLink(); +// } +// +// @When("^I click all postcode checkboxes$") +// public void clickAllPostcodeCheckboxes() { +// ADDITIONAL_SUMMONS.clickAllPostcodeCheckboxes(); +// } +// +// +// @When("^I click on deferral maintenance$") +// public void iClickOnDeferralMaintenance() { +// POOL_REQUESTS_PAGE.clickDeferralMaintenance(); +// } +// +// @Then("^I am taken to the deferral maintenance screen for the selected court \"([^\"]*)\"$") +// public void iAmTakenToTheDeferralMaintenanceScreenForTheSelectedCourt(String courtName) { +// assertEquals("Deferral maintenance", DEFERRAL_MAINTENANCE.getPageHeading()); +// assertEquals(courtName, DEFERRAL_MAINTENANCE.getCourtName()); +// } +// +// @Then("^The deferrals table is displayed$") +// public void theDeferralsTableIsDisplayed() { +// assertEquals("Juror number", DEFERRAL_MAINTENANCE.getJurorNumberTableHeading()); +// assertEquals("First name", DEFERRAL_MAINTENANCE.getFirstNameTableHeading()); +// assertEquals("Last name", DEFERRAL_MAINTENANCE.getLastNameTableHeading()); +// assertEquals("Pool number", DEFERRAL_MAINTENANCE.getPoolNumberTableHeading()); +// assertEquals("Deferred to", DEFERRAL_MAINTENANCE.geDeferredToTableHeading()); +// } +// +// @Then("^The first deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") +// public void theFirstDeferralInTheTableIs(String deferral, String noWeeks) { +// +// String datePattern = "E dd MMM yyyy"; +// Calendar calendar = Calendar.getInstance(); +// calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); +// +// LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); +// LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); +// Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); +// +// String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); +// +// assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getFirstDeferralTableRow()); +// } +// +// @Then("^Row \"([^\"]*)\" deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") +// public void rowDeferralInTheTableIs(String rowNo, String deferral, String noWeeks) { +// +// String datePattern = "E dd MMM yyyy"; +// Calendar calendar = Calendar.getInstance(); +// calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); +// +// LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); +// LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); +// Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); +// +// String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); +// +// int row = Integer.parseInt(rowNo); +// +// assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getDeferralTableRow(row)); +// } +// +// @Then("^The last deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") +// public void theLastDeferralInTheTableIs(String deferral, String noWeeks) { +// String datePattern = "E dd MMM yyyy"; +// Calendar calendar = Calendar.getInstance(); +// calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); +// +// LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); +// LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); +// Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); +// +// String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); +// assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getLastDeferralTableRow()); +// } +// +// @Then("^Row \"([^\"]*)\" from last deferral in the table is \"([^\"]*)\" with a deferral date \"([^\"]*)\" Mondays in the future$") +// public void rowFromLastDeferralInTheTableIs(String rowNo, String deferral, String noWeeks) { +// +// String datePattern = "E dd MMM yyyy"; +// Calendar calendar = Calendar.getInstance(); +// calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); +// +// LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); +// LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); +// Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); +// +// String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); +// +// int row = Integer.parseInt(rowNo); +// +// assertEquals(deferral + ", " + expectedDate, DEFERRAL_MAINTENANCE.getNthLastDeferralTableRow(row)); +// } +// +// @When("^I select juror \"([^\"]*)\" from the deferrals table$") +// public void iSelectJurorFromTheDeferralsTable(String jurorNumber) { +// DEFERRAL_MAINTENANCE.selectJurorFromTable(jurorNumber); +// } +// +// @When("^I select pool \"([^\"]*)\" from the active pools table$") +// public void iSelectPoolFromTheActivePoolsTable(String poolNumber) { +// DEFERRAL_MAINTENANCE.selectActivePool(poolNumber); +// } +// +// @When("^I set the \"([^\"]*)\" deferral filter to \"([^\"]*)\"$") +// public void iSetTheDeferralFilterTo(String filter, String input) { +// DEFERRAL_MAINTENANCE.clickShowFilterButton(); +// DEFERRAL_MAINTENANCE.clickClearFiltersLink(); +// switch (filter) { +// case "juror number": +// DEFERRAL_MAINTENANCE.filterByJurorNumber(input); +// break; +// case "first name": +// DEFERRAL_MAINTENANCE.filterByFirstName(input); +// break; +// case "last name": +// DEFERRAL_MAINTENANCE.filterByLastName(input); +// break; +// case "deferred to": +// DEFERRAL_MAINTENANCE.filterByDeferredTo(input); +// break; +// } +// DEFERRAL_MAINTENANCE.clickApplyFiltersButton(); +// DEFERRAL_MAINTENANCE.clickShowFilterButton(); +// } +// +// @When("^I set the deferral deferred to filter to \"([^\"]*)\" Mondays in the future$") +// public void iSetTheDeferralDeferredToFilterTo(String noWeeks) { +// DEFERRAL_MAINTENANCE.clickShowFilterButton(); +// DEFERRAL_MAINTENANCE.clickClearFiltersLink(); +// +// String datePattern = "dd/MM/yyyy"; +// Calendar calendar = Calendar.getInstance(); +// calendar.add(Calendar.WEEK_OF_MONTH, Integer.parseInt(noWeeks)); +// +// LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); +// LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); +// Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); +// +// String expectedDate = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); +// +// DEFERRAL_MAINTENANCE.filterByDeferredTo(expectedDate); +// DEFERRAL_MAINTENANCE.clickApplyFiltersButton(); +// DEFERRAL_MAINTENANCE.clickShowFilterButton(); +// } +// +// @When("^I filter on name \"([^\"]*)\"$") +// public void iFilterOnName(String lastName) { +// DEFERRAL_MAINTENANCE.clickShowFilterButton(); +// +// DEFERRAL_MAINTENANCE.filterByLastName(lastName); +// DEFERRAL_MAINTENANCE.clickApplyFiltersButton(); +// DEFERRAL_MAINTENANCE.clickShowFilterButton(); +// } +// +// @When("^I navigate to the last page of deferral maintenance$") +// public void iNavigateToTheLastPageOfDeferralMaintenance() { +// DEFERRAL_MAINTENANCE.clickLastPaginationItem(); +// } +// +// @Then("^I see the disqualification success message for \"([^\"]*)\"$") +// public void iSeeDisqualificationSuccessMessage(String disqualificationReason) { +// String bannerText = SUMMONS_REPLY.getResponseBannerText(); +// assertTrue(bannerText.contains("successfully processed")); +// assertTrue(bannerText.contains("Disqualified")); +// assertTrue(bannerText.contains(disqualificationReason)); +// } +// +// @Then("^I see the summons reply disqualification success message$") +// public void iSeeSummonsReplyDisqualificationSuccessMessage() { +// String bannerText = SUMMONS_REPLY.getResponseBannerText(); +// assertTrue(bannerText.contains("Summons reply processed")); +// assertTrue(bannerText.contains("Disqualified")); +// } +// +// @When("^I answer the juror summons reply eligibility questions with juror Residency set to No$") +// public void answerJurorResidency() { +// SUMMONS_REPLY.clickLivedConsecutivelyNo(); +// SUMMONS_REPLY.clickMentalHealthActNo(); +// SUMMONS_REPLY.clickLackCapacityNo(); +// SUMMONS_REPLY.clickOnBailNo(); +// SUMMONS_REPLY.clickCriminalOffenceNo(); +// } +// +// @When("^I select that the juror does need adjustments$") +// public void selectJurorDoesNeedAdjustments() { +// SUMMONS_REPLY.clickAdjustmentsYes(); +// +// } +// +// @When("^I enter a pool number that is the current pool number plus 1$") +// public void poolNumberPlusOne() throws Throwable { +// Integer newPoolNo = Integer.valueOf(poolRequestNumber.get()) + 1; +// NAV.set_valueTo("Pool number", String.valueOf(newPoolNo)); +// NAV.press_buttonByName("Change"); +// poolRequestNumber.set(String.valueOf(newPoolNo)); +// +// } +// +// @Then("^I see updated date and time in Pool History timeline$") +// public void iSeeCurrentDateAndTime() { +// final String seePoolHistoryUpdatedTime = POOL_REQUESTS_PAGE.seePoolHistoryUpdatedTime(); +// +// assertFalse("moj-timeline_date", seePoolHistoryUpdatedTime.isEmpty()); +// } +// +// @And("^I click no, to process the summons reply later$") +// public void iClickNoToProcessTheSummonsReplyLater() { +// SUMMONS_REPLY.clickNoToReplyLater(); +// } +// +// @When("^I navigate to the active pool \"([^\"]*)\" overview$") +// public void navigateActivePoolOverview(String poolNo) { +// POOL_REQUESTS_PAGE.clickActivePoolNumber(poolNo); +// } +// +// @And("^I see the title \"([^\"]*)\" in position \"([^\"]*)\" of the history$") +// public void iSeeTitleInPositionOfTheHistory(String historyMessage, int positionInList) { +// String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); +// assertEquals(historyMessage, elementsInPosition[0]); +// } +// +// @And("^I do not see the title \"([^\"]*)\" in position \"([^\"]*)\" of the history$") +// public void iDoNotSeeTheTitleInPositionOfTheHistory(String historyMessage, int positionInList) throws Throwable { +// String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); +// assertNotEquals(historyMessage, elementsInPosition[0]); +// } +// +// @And("^I see the description \"([^\"]*)\" in position \"([^\"]*)\" of the history$") +// public void iSeeDescInPositionOfTheHistory(String historyMessage, int positionInList) { +// String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); +// assertEquals(historyMessage, elementsInPosition[1]); +// } +// +// @And("^I see the correct date and time in position \"([^\"]*)\" of the history$") +// public void iSeeDateTimeInPositionOfTheHistory(int positionInList) { +// String[] elementsInPosition = POOL_OVERVIEW_PAGE.historyHeaderAndDescInPos(positionInList); +// try { +// System.out.println("Trying Normal Value"); +// System.out.println("Date Time Recorded: " + dateTimeRecorded.get(positionInList - 1)); +// System.out.println("Date Time On Page: " + elementsInPosition[2]); +// assertEquals(dateTimeRecorded.get(positionInList - 1), elementsInPosition[2]); +// } catch (ComparisonFailure eNormal) { +// try { +// System.out.println("Trying Higher Value"); +// System.out.println("Date Time Recorded: " + dateTimeRecordedHigher.get(positionInList - 1)); +// System.out.println("Date Time On Page: " + elementsInPosition[2]); +// assertEquals(dateTimeRecordedHigher.get(positionInList - 1), elementsInPosition[2]); +// } catch (ComparisonFailure eHigher) { +// try { +// System.out.println("Trying Lower Value"); +// System.out.println("Date Time Recorded: " + dateTimeRecordedLower.get(positionInList - 1)); +// System.out.println("Date Time On Page: " + elementsInPosition[2]); +// assertEquals(dateTimeRecordedLower.get(positionInList - 1), elementsInPosition[2]); +// } catch (ComparisonFailure eLower) { +// System.out.println("Date on page does not match exactly or match 1-+ minutes"); +// } +// +// } +// } +// } +// +// @And("^I make a note of the time$") +// public void iMakeANoteOfTheTime() { +// String datePattern = "d MMMM yyyy"; +// String timePattern = "h:mma"; +// +// LocalDate localDate = LocalDate.now(); +// LocalTime localTime = LocalTime.now(); +// LocalTime localTimeHigher = LocalTime.now().minusMinutes(1); +// LocalTime localTimeLower = LocalTime.now().plusMinutes(1); +// +// DateTimeFormatter newDateToFormat = DateTimeFormatter.ofPattern(datePattern); +// DateTimeFormatter newTimeToFormat = DateTimeFormatter.ofPattern(timePattern); +// +// String date = localDate.format(newDateToFormat); +// String time = localTime.format(newTimeToFormat); +// String timeHigher = localTimeHigher.format(newTimeToFormat); +// String timeLower = localTimeLower.format(newTimeToFormat); +// +// String[] newDateValues = {date, time, timeHigher, timeLower}; +// String formedDate = (newDateValues[0] + " at " + newDateValues[1].toLowerCase()); +// String formedDateHigher = (newDateValues[0] + " at " + newDateValues[2].toLowerCase()); +// String formedDateLower = (newDateValues[0] + " at " + newDateValues[3].toLowerCase()); +// dateTimeRecorded.add(formedDate); +// dateTimeRecordedHigher.add(formedDateHigher); +// dateTimeRecordedLower.add(formedDateLower); +// +// System.out.println("Time Recorded: " + formedDate); +// } +// +// @And("^I clear down the data in dateTimeRecorded$") +// public void iCleardownDateTimeRecorded() { +// dateTimeRecorded.clear(); +// dateTimeRecordedHigher.clear(); +// dateTimeRecordedLower.clear(); +// } +// +// @When("^I click to add or edit notes$") +// public void clickAddOrEditNotes() { +// JUROR_RECORD.clickAddOrEditNotes(); +// } +// +// @When("^I enter over 2000 characters in the Notes text box$") +// public void over2000charactersNotes() { +// String longText = StringUtils.repeat("Test", 501); +// JUROR_RECORD.enterNotes(longText); +// } +// +// @When("^I enter \"([^\"]*)\" in the Notes text box$") +// public void enterIntoNotes(String notes) { +// JUROR_RECORD.enterNotes(notes); +// } +// +// @When("^I click the save notes button$") +// public void saveNotes() { +// JUROR_RECORD.saveNotes(); +// } +// +// @When("^I record notes \"([^\"]*)\"$") +// public void recordNotesWithText(String notes) { +// JUROR_RECORD.clickNotesTab(); +// JUROR_RECORD.clickAddOrEditNotes(); +// JUROR_RECORD.enterNotes(notes); +// JUROR_RECORD.saveNotes(); +// } +// +// @When("^I record call log \"([^\"]*)\"$") +// public void recordCallLog(String callLog) throws Exception { +// JUROR_RECORD.clickNotesTab(); +// NAV.click_link_by_text("Contact log"); +// JUROR_RECORD.clickLogNewContact(); +// NAV.select_fromDropdown("Request Deferral", "Select the type of enquiry made"); +// GRP.click_radioButtonWithLabel("No"); +// JUROR_RECORD.enterNotes(callLog); +// JUROR_RECORD.saveNotes(); +// } +// +// @Then("^a second juror record is shown in the search results for \"([^\"]*)\"$") +// public void transferredJurorRecordCreatedInSearch(String jurorNumber) { +// assertEquals((2 + " results for \"" + jurorNumber + "\""), JUROR_RECORD_SEARCH.getSearchResultsHeader()); +// } +// +// @When("^I click the juror record search link for court name \"([^\"]*)\"$") +// public void clickJurorRecordSearchLinkForCourt(String courtName) { +// JUROR_RECORD_SEARCH.clickJurorRecordForCourt(courtName); +// } +// +// +// @When("^I enter a date \"([^\"]*)\" mondays in the future for the new service start date$") +// public void enterServiceStartDateMondaysInFuture(Integer mondays) { +// JUROR_RECORD.enterNewServiceStartDate(mondayWeeksInFuture(mondays)); +// } +// +// @When("^I select a postponement date$") +// public void clickPostponementDate() { +// JUROR_RECORD.clickPostponementDatePoolRadio(); +// } +// +// @And("^I record a digital response for a juror with a deferral$") +// public void iRecordADigitalResponseForAJurorWithADeferral(DataTable jurorDetails) throws Throwable { +// Map juror = jurorDetails.asMap(String.class, String.class); +// GRP.click_radioButtonWithLabel("I am replying for myself"); +// NAV.press_buttonByName("Continue"); +// +// SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); +// SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); +// SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); +// NAV.press_buttonByName("Continue"); +// NAV.textNotPresentOnPage("There is a problem"); +// +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// NAV.set_valueTo("Main phone", "0123456789"); +// NAV.press_buttonByName("Continue"); +// +// NAV.set_valueTo("Enter your email address", "test@test.com"); +// NAV.set_valueTo("Enter your email address again", "test@test.com"); +// NAV.press_buttonByName("Continue"); +// +// NAV.set_valueTo("Day", "01"); +// NAV.set_valueTo("Month", "01"); +// NAV.set_valueTo("Year", "1970"); +// NAV.press_buttonByName("Continue"); +// +// NAV.textPresentOnPage("Confirm you're eligible for jury service"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No, I need to change the date"); +// NAV.press_buttonByName("Continue"); +// +// SUMMONS_REPLY.setDigitalDeferralReason("Test Digital Deferral Reason"); +// NAV.press_buttonByName("Continue"); +// +// SUMMONS_REPLY.setFirstChoice(mondayWeeksInFuture(11)); +// SUMMONS_REPLY.setSecondChoice(mondayWeeksInFuture(12)); +// SUMMONS_REPLY.setThirdChoice(mondayWeeksInFuture(13)); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// NAV.check_checkbox("The information I have given is true to the best of my knowledge."); +// NAV.press_buttonByName("Submit"); +// +// NAV.textPresentOnPage("You have completed your reply"); +// } +// +// @And("^I record a digital response for a juror that is too old$") +// public void iRecordADigitalResponseForAJurorTooOld(DataTable jurorDetails) throws Throwable { +// Map juror = jurorDetails.asMap(String.class, String.class); +// GRP.click_radioButtonWithLabel("I am replying for myself"); +// NAV.press_buttonByName("Continue"); +// +// SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); +// SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); +// SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); +// NAV.press_buttonByName("Continue"); +// NAV.textNotPresentOnPage("There is a problem"); +// +// //Is the name we have for you correct +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //Is this your address +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //What is your phone number +// NAV.set_valueTo("Main phone", "0123456789"); +// NAV.press_buttonByName("Continue"); +// +// //What is your email address +// NAV.set_valueTo("Enter your email address", "test@test.com"); +// NAV.set_valueTo("Enter your email address again", "test@test.com"); +// NAV.press_buttonByName("Continue"); +// +// //What is your date of birth +// NAV.set_valueTo("Day", "01"); +// NAV.set_valueTo("Month", "01"); +// NAV.set_valueTo("Year", "1945"); +// +// NAV.press_buttonByName("Continue"); +// +// //Confirm your date of birth +// NAV.textPresentOnPage("Confirm your date of birth"); +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //Check your answers now +// NAV.check_checkbox("The information I have given is true to the best of my knowledge."); +// NAV.press_buttonByName("Submit"); +// +// NAV.textPresentOnPage("You have completed your reply"); +// NAV.textPresentOnPage("Your age means you cannot do jury service"); +// +// } +// +// @And("^I record a digital response for a juror that is too young$") +// public void iRecordADigitalResponseForAJurorTooYoung(DataTable jurorDetails) throws Throwable { +// Map juror = jurorDetails.asMap(String.class, String.class); +// GRP.click_radioButtonWithLabel("I am replying for myself"); +// NAV.press_buttonByName("Continue"); +// +// SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); +// SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); +// SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); +// NAV.press_buttonByName("Continue"); +// NAV.textNotPresentOnPage("There is a problem"); +// +// //Is the name we have for you correct +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //Is this your address +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //What is your phone number +// NAV.set_valueTo("Main phone", "0123456789"); +// NAV.press_buttonByName("Continue"); +// +// //What is your email address +// NAV.set_valueTo("Enter your email address", "test@test.com"); +// NAV.set_valueTo("Enter your email address again", "test@test.com"); +// NAV.press_buttonByName("Continue"); +// +// //What is your date of birth +// String yearYoung = String.valueOf((Year.now().getValue() - 10)); +// +// NAV.set_valueTo("Day", "01"); +// NAV.set_valueTo("Month", "01"); +// NAV.set_valueTo("Year", yearYoung); +// NAV.press_buttonByName("Continue"); +// +// //Confirm your date of birth +// NAV.textPresentOnPage("Confirm your date of birth"); +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //Check your answers now +// NAV.check_checkbox("The information I have given is true to the best of my knowledge."); +// NAV.press_buttonByName("Submit"); +// +// NAV.textPresentOnPage("You have completed your reply"); +// NAV.textPresentOnPage("Your age means you cannot do jury service"); +// +// } +// +// @And("^I record a digital response for a juror that provides an incorrect DoB and corrects it$") +// public void iRecordADigitalResponseForAJurorIncorrectDobProvidedCorrected(DataTable jurorDetails) throws Throwable { +// Map juror = jurorDetails.asMap(String.class, String.class); +// GRP.click_radioButtonWithLabel("I am replying for myself"); +// NAV.press_buttonByName("Continue"); +// +// SUMMONS_REPLY.setJurorNumber(juror.get("jurorNumber")); +// SUMMONS_REPLY.setJurorLname(juror.get("jurorLname")); +// SUMMONS_REPLY.setJurorPostcode(juror.get("jurorPostcode")); +// NAV.press_buttonByName("Continue"); +// NAV.textNotPresentOnPage("There is a problem"); +// +// //Is the name we have for you correct +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //Is this your address +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// //What is your phone number +// NAV.set_valueTo("Main phone", "0123456789"); +// NAV.press_buttonByName("Continue"); +// +// //What is your email address +// NAV.set_valueTo("Enter your email address", "test@test.com"); +// NAV.set_valueTo("Enter your email address again", "test@test.com"); +// NAV.press_buttonByName("Continue"); +// +// //What is your date of birth +// String yearYoung = String.valueOf((Year.now().getValue() - 10)); +// +// NAV.set_valueTo("Day", "01"); +// NAV.set_valueTo("Month", "01"); +// NAV.set_valueTo("Year", yearYoung); +// NAV.press_buttonByName("Continue"); +// NAV.press_buttonByName("Continue"); +// +// //Confirm your date of birth +// NAV.textPresentOnPage("Confirm your date of birth"); +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// //What is your date of birth - corrected +// String yearCorrect = String.valueOf((Year.now().getValue() - 25)); +// +// NAV.set_valueTo("Day", "01"); +// NAV.set_valueTo("Month", "01"); +// NAV.set_valueTo("Year", yearCorrect); +// +// NAV.press_buttonByName("Continue"); +// +// //Confirm you're eligible +// NAV.textPresentOnPage("Confirm you're eligible for jury service"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("Yes, I can start"); +// NAV.press_buttonByName("Continue"); +// +// GRP.click_radioButtonWithLabel("No"); +// NAV.press_buttonByName("Continue"); +// +// //Check your answers now +// NAV.check_checkbox("The information I have given is true to the best of my knowledge."); +// NAV.press_buttonByName("Submit"); +// +// NAV.textPresentOnPage("You have completed your reply"); +// +// } +// +// +// public static String weeksInFuture(int noWeeks) { +// String datePattern = "dd/MM/yyyy"; +// Calendar date = Calendar.getInstance(); +// date.add(Calendar.WEEK_OF_MONTH, noWeeks); +// +// return new SimpleDateFormat(datePattern).format(date.getTime()); +// } +// +// +// public static String mondayWeeksInFuture(int noWeeks) { +// String datePattern = "dd/MM/yyyy"; +// LocalDate nextMonday = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.MONDAY)); +// nextMonday = nextMonday.plusWeeks(noWeeks); +// DateTimeFormatter dateToFormat = DateTimeFormatter.ofPattern(datePattern); +// +// return nextMonday.format(dateToFormat); +// } +// +// @Then("^I see the reply type has been updated to \"([^\"]*)\"$") +// public void replyTypeHasBeenUpdated(String updatedReplyType) { +// assertEquals("Reply Type is not as expected", updatedReplyType, VIEW_SUMMONS_REPLY.getTypeValue()); +// } +// +// @When("^I change the jurors date of birth$") +// public void enterDobJurorDetails() { +// SUMMONS_REPLY.enterDateOfBirth("11/4/1979"); +// +// } +// +// @When("^I select the date picker button$") +// public void clickDateOfBirthButton() { +// SUMMONS_REPLY.clickDateOfBirthButton(); +// +// } +// +// @When("^I select the yes radio button from the Third Party Juror details$") +// public void clickThirdPartyYesButton() { +// SUMMONS_REPLY.clickYesThirdPartyJurorDetailsButton(); +// +// } +// +// @When("^I select the yes radio button from the Additional Requirements Juror details$") +// public void clickAdditionalRequirementsYesButton() { +// SUMMONS_REPLY.clickYesAdditionalRequirementsJurorDetailsButton(); +// +// } +// +// @When("^I select the Juror Details tab from the summons reply page$") +// public void clickJurorDetailsTab() { +// SUMMONS_REPLY.clickJurorDetailsTab(); +// +// } +// +// @When("^I select the Eligibility tab from the summons reply page$") +// public void clickEligibilityTab() { +// SUMMONS_REPLY.clickEligibilityTab(); +// +// } +// +// @When("^I select the Deferral or Excusal tab from the summons reply page$") +// public void clickdeferralOrExcusalTab() { +// SUMMONS_REPLY.clickdeferralOrExcusalTab(); +// +// } +// +// @When("^I select the CJS Employment tab from the summons reply page$") +// public void clickcjsEmploymentTab() { +// SUMMONS_REPLY.clickcjsEmploymentTab(); +// +// } +// +// @When("^I select the reasonable adjustments tab from the summons reply page$") +// public void clickreasonableAdjustmentsTab() { +// SUMMONS_REPLY.clickreasonableAdjustmentsTab(); +// +// } +// +// @When("^I select the Signature tab from the summons reply page$") +// public void clicksignatureTab() { +// SUMMONS_REPLY.clicksignatureTab(); +// +// } +// +// @When("^I set residency in the UK radio button to No$") +// public void residencytoNo() { +// SUMMONS_REPLY.clickresidencyNoButton(); +// +// } +// +// @Then("^I create a \"([^\"]*)\" court pool request for court \"([^\"]*)\" and summon jurors$") +// public void createPoolRequestAndSummonJurors(String poolRequestType, String court) throws Throwable { +// NAV.press_buttonByName("Create pool"); +// GRP.click_radioButtonWithLabel("Request new pool"); +// NAV.press_buttonByName("Continue"); +// NAV.set_valueTo("Enter a court name or location code", court); +// NAV.press_buttonByName("Continue"); +// NAV.waitForPageLoad(); +// +// if (poolRequestType.equals("Civil")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CIVIL); +// if (poolRequestType.equals("Crown")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.CROWN); +// if (poolRequestType.equals("High")) +// POOL_REQUESTS_PAGE.selectPoolType(PoolRequests.PoolType.HIGH); +// NAV.set_value_to("Number of jurors", "150"); +// NAV.press_buttonByName("Continue"); +// poolNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); +// poolRequestNumber.set(CHECK_POOL_REQUEST_PAGE.getNewPoolRequestNumber()); +// poolDate.set(CHECK_POOL_REQUEST_PAGE.getNewPoolAttendanceDate()); +// poolNumber.set(POOL_REQUESTS_PAGE.getPoolNumberOnDetails()); +// +// ArrayList pools = poolNumbers.get(); +// System.out.println("Getting Pool Number --- " + poolNumber.get()); +// +// pools.add(poolNumber.get()); +// System.out.println("Values in pools array --- " + pools.toString()); +// +// NAV.press_buttonByName("Request pool"); +// +// POOL_REQUESTS_PAGE.clickInactivePoolNumber(poolNumber.get()); +// NAV.press_buttonByName("Summon jurors"); +// NAV.set_value_to("Citizens to summon", "1"); +// NAV.press_buttonByName("Create pool and summon citizens"); +// } +// +// @When("^I select one of the jurors I have just summoned$") +// public void selectFirstJurorInList() { +// POOL_REQUESTS_PAGE.selectFirstJurorInList(); +// } +// @When("^I select one of the active pools available$") +// public void selectFirstPoolNoInList() { +// ACTIVE_POOLS_PAGE.selectFirstPoolNoInList(); +// } +// @When("^I select the checkbox in the same row as \"([^\"]*)\" in pool table$") +// public void selectJurorCheckbox(String nextToText) { +// POOL_REQUESTS_PAGE.checkJurorCheckboxSame_rowAs(nextToText); +// } +// +// @When("^I check the select all checkbox$") +// public void selectAllcheckbox() { +// ACTIVE_POOLS_PAGE.checkSelectAllCheckbox(); +// } +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_login.java b/src/test/java/cucumber/steps/StepDef_login.java new file mode 100644 index 00000000..ff835ec9 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_login.java @@ -0,0 +1,45 @@ +package cucumber.steps; + +import org.openqa.selenium.WebDriver; + +import cucumber.pageObjects.Login; +import cucumber.pageObjects.NavigationShared; +import cucumber.pageObjects.SharedDriver; +import cucumber.pageObjects.aSamplePO; + +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; + +import org.openqa.selenium.support.PageFactory; + +public class StepDef_login { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + + public StepDef_login(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + } + + + @When("^I change my password to \"([^\"]*)\"$") + public void refreshPage(String password) throws Throwable { + try{ + LGN.passwordReset(password); + } catch (Exception e) { + NAV.waitForPageLoad(); + LGN.passwordReset(password); + } + NAV.waitForPageLoad(); + } + +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_navigation.java b/src/test/java/cucumber/steps/StepDef_navigation.java new file mode 100644 index 00000000..8028b315 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_navigation.java @@ -0,0 +1,819 @@ +package cucumber.steps; + +import cucumber.pageObjects.*; +import cucumber.utils.DateManipulator; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.And; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import org.apache.log4j.Logger; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.PageFactory; + +import java.text.SimpleDateFormat; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.temporal.TemporalAdjusters; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +public class StepDef_navigation { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private Bureau BUR; + private Groups GRP; + private ScreenShotTaker SST; + private ClickOverrider CO; + private StepDef_jurorpool STP; + private final WebDriver webDriver; + + private final CheckPoolRequest CHECK_POOL_REQUEST_PAGE; + private String poolRequestNumber; + public static String holidayAttendanceDate; + private static Logger log = Logger.getLogger(StepDef_navigation.class); + + public StepDef_navigation(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + GRP = PageFactory.initElements(webDriver, Groups.class); + BUR = PageFactory.initElements(webDriver, Bureau.class); + CO = PageFactory.initElements(webDriver, ClickOverrider.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + CHECK_POOL_REQUEST_PAGE = PageFactory.initElements(webDriver, CheckPoolRequest.class); + } + + + @When("^I see \"(.*)\" on the page$") + public void text_on_page_check(String arg1) throws Throwable { + if (arg1.contains("{") && arg1.contains("}")) { + arg1 = arg1.replace("{", "").replace("}", ""); + arg1 = DateManipulator.formatDate( + DateManipulator.processString(arg1, false), + "dd/MM/yyyy" + ); + } + + try { + NAV.textPresentOnPage(arg1); + } catch (AssertionError | Exception e) { + NAV.waitForPageLoad(); + NAV.textPresentOnPage(arg1); + } + } + + @When("^I do not see \"(.*)\" on the page$") + public void text_not_on_page_check(String arg1) throws Throwable{ + try{ + NAV.textNotPresentOnPage(arg1); + } catch (Exception e) { + NAV.textNotPresentOnPage(arg1); + } + } + + @When("^I verify the text \"(.*)\" on the page$") + public void Verifytext_on_page_check(String arg1) throws Throwable { + if (arg1.contains("{") && arg1.contains("}")) { + arg1 = arg1.replace("{", "").replace("}", ""); + arg1 = DateManipulator.formatDate( + DateManipulator.processString(arg1, false), + "dd/MM/yyyy" + ); + } + + try { + NAV.textPresentOnPage(arg1); + } catch (AssertionError | Exception e) { + NAV.waitForPageLoad(); + NAV.textPresentOnPage(arg1); + } + } + @When("^I verify the banner message \"(.*)\" on the page$") + public void verifyBannerMessage_on_page_check(String arg1) throws Throwable { + if (arg1.contains("{") && arg1.contains("}")) { + arg1 = arg1.replace("{", "").replace("}", ""); + arg1 = DateManipulator.formatDate( + DateManipulator.processString(arg1, false), + "dd/MM/yyyy" + ); + } + + try { + NAV.textPresentOnPage(arg1); + } catch (AssertionError | Exception e) { + NAV.waitForPageLoad(); + NAV.textPresentOnPage(arg1); + } + } + @Then("^on the page I see$") + public void seeOnThePage_datatable (DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for(int i=0; i> list = arg1.asMaps(String.class, String.class); + for(int i=0; i> list = arg1.asLists(String.class); + for(int i=0; i<=list.size(); i++) { //i starts from 1 because i=0 represents the header + set_value_to( + list.get(0).get(i), + list.get(1).get(i) + ); + } + } + + @Then("^I cannot set \"([^\"]*)\" to \"([^\"]*)\"$") + public void set_value_to_Negative(String arg1, String arg2) throws Throwable { + // Performance Issue - To Review + try { + NAV.set_valueTo(arg1, arg2); + throw new AssertionError("I was able to set the value when not expected"); + } catch (Exception e) { + } + } + + @When("^\"([^\"]*)\" is \"([^\"]*)\"$") + public void compare_value_to(String arg1, String arg2) throws Throwable { + + if (arg2.contains("{") && arg2.contains("}")) { + arg2 = arg2.replace("{", "").replace("}", ""); + arg2 = DateManipulator.formatDate( + DateManipulator.processString(arg2, false), + "dd/MM/yyyy" + ); + } + + try { + NAV.compare_valueTo(arg1, arg2); + } catch (AssertionError e) { + NAV.compare_valueTo(arg1, arg2); + } catch (Exception e) { + NAV.compare_valueTo(arg1, arg2); + } + } + + @When("^I refresh the page$") + public void refreshPage() throws Throwable { + NAV.refreshPage(); + } + + @When("^I check the \"([^\"]*)\" checkbox$") + public void check_checkbox(String arg1) throws Throwable { + try { + NAV.check_checkbox(arg1); + NAV.checkBox_Checked(arg1, true); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.check_checkbox(arg1); + NAV.checkBox_Checked(arg1, true); + } + } + + @When("^I check the Urgent checkbox on Search screen$") + public void checkUrgentCheckbox() throws Throwable { + try { + NAV.waitForPageLoad(); + NAV.checkUrgentCheckbox(); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.checkUrgentCheckbox(); + } + } + + @When("^I uncheck the \"([^\"]*)\" checkbox$") + public void uncheck_checkbox(String arg1) throws Throwable { + try { + NAV.uncheck_checkbox(arg1); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.uncheck_checkbox(arg1); + } + } + + @When("^I respond the juror response in Juror Digital$") + public void respondJurorResponseInJurorDigital() throws Throwable { + NAV.press_buttonByName("Process reply"); + NAV.setProcessReplyTo_("Responded"); + NAV.check_checkbox("Mark juror as 'responded'"); + NAV.press_buttonByName("Confirm"); + NAV.textPresentOnPage("COMPLETED"); + } + + @When("^I click on the \"(.*)\" link$") + public void click_link(String arg1) throws Throwable { + + try{ + if (CO.checkWhetherInList(arg1)) + return; + } catch (Exception e) {} + + // Temporary workaround - This only occurs for one link + if (arg1.equalsIgnoreCase("back")) { + try{ + BUR.pressBackLink(); + } catch (Exception e) { + NAV.waitForPageLoad(); + BUR.pressBackLink(); + } + return; + } + try{ + NAV.click_link_by_text(arg1); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.click_link_by_text(arg1); + } + } + @Then("^I do not see link with text \"([^\"]*)\"$") + public void doNotSee_linkText(String arg1) { + NAV.linkText_visible(arg1, false); + } + + @When("^I see link with text \"([^\"]*)\"$") + public void linkText_visible(String arg1) { + NAV.linkText_visible(arg1, true); + } + + @When("^I select \"([^\"]*)\" from the \"([^\"]*)\" dropdown$") + public void select_fromDropdown(String option_value, String dropdown_name) { + try{ + NAV.select_fromDropdown(option_value, dropdown_name); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.select_fromDropdown(option_value, dropdown_name); + } + } + + @When("^I select \"([^\"]*)\" from Process reply$") + public void select_fromProcessReply(String optionValue) throws Throwable{ + try{ + NAV.press_buttonByName("Process reply"); + NAV.setProcessReplyTo_(optionValue); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.setProcessReplyTo_(optionValue); + } + } + + @When("^I select \"([^\"]*)\" from the \"([^\"]*)\" dropdown on the Dashboard$") + public void select_fromDashboardDropdown(String option_value, String dropdown_name) { + try{ + NAV.select_fromDashboardDropdown(option_value, dropdown_name); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.select_fromDashboardDropdown(option_value, dropdown_name); + } + } + + @Then("^I cannot select \"([^\"]*)\" from the \"([^\"]*)\" dropdown$") + public void select_fromDropdownNegative(String arg1, String arg2){ + // Performance Issue - To Review + try { + NAV.select_fromDropdown(arg1, arg2); + throw new AssertionError("I was able to select from the dropdown when not expected"); + } catch (Exception e) { + } + } + + @Then("^I see \"([^\"]*)\" in position (\\d+) on the groups added list$") + public void checkGroupsAddedPosition_withText(String text, Integer position){ + try{ + GRP.checkGroupsAddedPosition_withText(text, position); + } catch (Exception e) { + NAV.waitForPageLoad(); + GRP.checkGroupsAddedPosition_withText(text, position); + } + } + + @Then("^the \"([^\"]*)\" text has class \"([^\"]*)\"$") + public void text_hasClass(String text, String className){ + GRP.text_hasClass(text, className); + } + + @When("^I search for \"([^\"]*)\"$") + public void searchFor(String arg1){ + NAV.generic_searchForText(arg1); + } + + @When("^I select the \"([^\"]*)\" checkbox for \"([^\"]*)\"$") + public void selectCheckbox_forRowWithText(String column, String rowText){ + NAV.selectCheckbox_forRowWithText(column, rowText); + } + + @Then("^the \"([^\"]*)\" checkbox for \"([^\"]*)\" is \"([^\"]*)\"$") + public void confirmCheckbox_forRowWithText (String column, String rowText, String checkedUnchecked){ + NAV.confirmCheckbox_forRowWithText(column, rowText, checkedUnchecked); + } + + @Then("^the \"([^\"]*)\" button is disabled$") + public void buttonIsDisabled(String buttonLabel) throws Throwable{ + NAV.checkButtonIsDisabled(buttonLabel); + + } + + + @When("^I select \"([^\"]*)\" from the dropdown$") + public void select_fromDropdown (String option) throws Exception { + try { + NAV.select_fromDropdown(option); + } catch (Error e) { + NAV.waitForPageLoad(3, 60); + NAV.select_fromDropdown(option); + } catch (Exception e) { + NAV.waitForPageLoad(3, 60); + NAV.select_fromDropdown(option); + } + } + + @Then("^I see \"([^\"]*)\" has class \"([^\"]*)\"$") + public void seeElement_byText_hasClass(String text, String containsClass) throws Exception { + try { + NAV.element_byText_hasClass(text, containsClass); + } catch (Exception e) { + NAV.element_byText_hasClass(text, containsClass); + } + } + + @Then("^I see \"([^\"]*)\" under \"([^\"]*)\"$") + public void seeText_underHeadingBlock(String text, String header) { + NAV.seeText_underHeadingBlock(text, header); + } + + ; + + @Then("^on Expenses I see \"([^\"]*)\" under \"([^\"]*)\"$") + public void seeText_underHeadingBlockExpenses(String text, String header) { + NAV.seeText_underHeadingBlockExpenses(text, header); + } + + ; + + // bureau + @Then("^on Bureau I see \"([^\"]*)\" under \"([^\"]*)\"$") + public void seeText_underHeadingBlockBureau(String text, String header) { + NAV.seeText_underHeadingBlockBureau(text, header); + } + + + @Then("^I do not see \"([^\"]*)\" under \"([^\"]*)\"$") + public void doNotSeeText_underHeadingBlock(String text, String header) { + NAV.doNotSeeText_underHeadingBlock(text, header, true); + } + + + @Then("^I see \"([^\"]*)\" under the label \"([^\"]*)\"$") + public void seeText_underHeadingBlockLabel(String text, String header){ + NAV.seeText_underHeadingBlockLabel(text, header); + } + + @When("^I click on the \"([^\"]*)\" link under \"([^\"]*)\"$") + public void clickLink_underHeadingBlock(String linkText, String header){ + NAV.clickText_underHeadingBlock(linkText, header); + } + + //Old See in Same Row + @Then("^I see \"([^\"]*)\" in the same row as \"([^\"]*)\"$") + public void seeText_inSameRow_asText(String searchText, String nextToText) { + try { + NAV.seeText_inSameRow_asText(searchText, nextToText); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.seeText_inSameRow_asText(searchText, nextToText); + } + } + + + ; + + //New See in Same Row + @Then("^I see text \"([^\"]*)\" in the same row as \"([^\"]*)\"$") + public void seeText_inSameRow_asText_Two(String searchText, String nextToText) { + try { + NAV.seeText_inSameRow_asText_Two(searchText, nextToText); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.seeText_inSameRow_asText_Two(searchText, nextToText); + } + } + + + + //Old Click Change Link + @When("^I click on \"([^\"]*)\" in the same row as \"([^\"]*)\"$") + public void clickText_inSameRow_asText(String clickText, String nextToText) throws Exception { + try { + NAV.clickText_inSameRow_asText(clickText, nextToText); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.clickText_inSameRow_asText(clickText, nextToText); + } + } + + ; + + //New Click Change Link + @When("^I click on the \"([^\"]*)\" link in the same row as \"([^\"]*)\"$") + public void clickText_inSameRow_asText_Two(String clickText, String nextToText) throws Exception { + try { + NAV.clickText_inSameRow_asText_Two(clickText, nextToText); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.clickText_inSameRow_asText_Two(clickText, nextToText); + } + } + + @Then("^\"([^\"]*)\" text is bold$") + public void seeText_isBold (String text) { + NAV.seeText_isBold (text); + } + + @When("^I set input field with \"([^\"]*)\" of \"([^\"]*)\" to \"([^\"]*)\"$") + public void setInputFieldWith_toText (String attributeType, String attributeValue, String inputText) { + NAV.setInputFieldWith_toText (attributeType, attributeValue, inputText); + } + + @When("^I set the \"([^\"]*)\" date to a Monday \"([^\"]*)\" weeks in the future$") + public void iSetTheAttendanceDateToAMondayInTheFuture(String attDateSequence, Integer noOfWeeks) { + String datePattern = "dd/MM/yyyy"; + String fullDatePattern = "EEEEE dd MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String mondayDateValue = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + holidayAttendanceDate = new SimpleDateFormat(fullDatePattern).format(mondayDate.getTime()); + + NAV.enterNewSingleDate(attDateSequence, mondayDateValue); + NAV.waitForPageLoad(); + + } + + @When("^I set the date of birth to a Monday \"([^\"]*)\" weeks in the future$") + public void iSetTheDateOfBirthToAMondayInTheFuture(Integer noOfWeeks) { + String datePattern = "dd MM yyyy"; + String fullDatePattern = "EEEEE dd MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + String attDateSequence = "DOB"; + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + Date mondayDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + String[] mondayDateValues = new SimpleDateFormat(datePattern).format((mondayDate).getTime()).split(" "); + holidayAttendanceDate = new SimpleDateFormat(fullDatePattern).format(mondayDate.getTime()); + + NAV.enterNewDate(attDateSequence, mondayDateValues[0], mondayDateValues[1], mondayDateValues[2]); + NAV.waitForPageLoad(); + + } + + @When("^I set the \"([^\"]*)\" single date field to a Monday \"([^\"]*)\" weeks in the future$") + public void iSetTheAttendanceSingleDateFieldToAMondayInTheFuture(String deferDateSeq, Integer noOfWeeks) { + String datePattern = "dd/MM/yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String mondayDateValue = new SimpleDateFormat(datePattern).format((mondayDate).getTime()); + + NAV.enterNewSingleDate(deferDateSeq, mondayDateValue); + NAV.waitForPageLoad(); + + } + @And("^I should see the details of the pool with a bank holiday date$") + public void iShouldSeeTheDetailsOfThePoolWithBankHolidayDate(DataTable table) { + Map data = table.asMap(String.class, String.class); + poolRequestNumber = CHECK_POOL_REQUEST_PAGE.getPoolNumber(); + + assertEquals(holidayAttendanceDate, CHECK_POOL_REQUEST_PAGE.getAttendanceDate()); + assertEquals(data.get("courtName"), CHECK_POOL_REQUEST_PAGE.getCourtName()); + assertEquals(data.get("poolType"), CHECK_POOL_REQUEST_PAGE.getPoolType()); + assertEquals(data.get("totalJurorsRequired"), CHECK_POOL_REQUEST_PAGE.getNumberOfJurors()); + assertEquals(data.get("numberOfDeferrals"), CHECK_POOL_REQUEST_PAGE.getNumberOfDeferrals()); + assertEquals(data.get("additionalJurors"), CHECK_POOL_REQUEST_PAGE.getNumberOfAdditionalJurors()); + } + + @When("^I validate the \"([^\"]*)\" deferral date is \"([^\"]*)\" weeks in the future$") + public void iValidateDeferralDateInTheFuture (String attDateSequence, Integer noOfWeeks) throws Throwable { + try {String fullDatePattern = "d MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String mondayDateValues = new SimpleDateFormat(fullDatePattern).format((mondayDate).getTime()).toString(); + + NAV.seeText_inSameRow_asText(mondayDateValues, attDateSequence); + } catch (Exception e) { + String shortDatePattern = "dd/MM/yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String mondayDateValues = new SimpleDateFormat(shortDatePattern).format((mondayDate).getTime()).toString(); + + NAV.seeText_inSameRow_asText(mondayDateValues, attDateSequence); + + } + } + + ; + + @When("^I select deferral date \"([^\"]*)\" weeks in the future$") + public void iSelectDeferralDate(Integer noOfWeeks) throws Throwable { + String fullDatePattern = "d MMMMM yyyy"; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.WEEK_OF_MONTH, noOfWeeks); + + LocalDate localDate = calendar.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDateMonday = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); + Date mondayDate = Date.from(localDateMonday.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); + + String mondayDateValues = new SimpleDateFormat(fullDatePattern).format((mondayDate).getTime()).toString(); + + GRP.click_radioButtonWithLabel(mondayDateValues); + + } + + ; + + + @When("^I click link with ID \"([^\"]*)\"$") + public void clickLinkWithId(String linkId) { + NAV.clickLinkWithId(linkId); + } + + ; + + @When("^I set text area with \"([^\"]*)\" of \"([^\"]*)\" to \"([^\"]*)\"$") + public void setTextAreaWith_toText(String attributeType, String attributeValue, String inputText) { + NAV.setTextAreaWith_toText(attributeType, attributeValue, inputText); + } + + ; + + @When("^I append text area with \"([^\"]*)\" of \"([^\"]*)\" with \"([^\"]*)\"$") + public void setTextAreaWith_toText_noClear (String attributeType, String attributeValue, String inputText) { + NAV.setTextAreaWith_toText_noClear (attributeType, attributeValue, inputText); + } + + @Then("^the checkbox in the same row as \"([^\"]*)\" is \"([^\"]*)\"$") + public void checkboxSame_rowAs (String nextToText, String checkboxState) throws Exception { + try { + NAV.checkboxState_inSameRow_asText(checkboxState, nextToText); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.checkboxState_inSameRow_asText(checkboxState, nextToText); + } + } + + @Then("^I see \"([^\"]*)\" icon in the same row as \"([^\"]*)\"$") + public void seeIconSame_rowAs (String icon, String nextToText) { + try { + NAV.seeIconSame_rowAs(icon, nextToText); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.seeIconSame_rowAs(icon, nextToText); + } + } + + ; + + @Then("^I see \"([^\"]*)\" is flagged as overdue$") + public void recordFlaggedOverdue(String nextToText) { + NAV.recordFlaggedOverdue(nextToText); + } + + ; + + @Then("^I see \"([^\"]*)\" has reply type indicator \"([^\"]*)\"$") + public void replyTypeIndicator(String nextToText, String replyType) { + NAV.replyTypeIndicator(nextToText, replyType); + } + + ; + + @When("^I check the checkbox in the same row as \"([^\"]*)\"$") + public void checkCheckboxSame_rowAs(String nextToText) { + try { + NAV.checkCheckboxSame_rowAs(nextToText); + } catch (Exception e) { + NAV.waitForPageLoad(); + NAV.checkCheckboxSame_rowAs(nextToText); + } + } + + ; + + @Then("^the page title is \"([^\"]*)\"$") + public void checkPageTitleIs (String expectedPageTitle) { + NAV.checkPageTitleIs (expectedPageTitle); + } + + @When("^I hit the tab key$") + public void hitKey() throws Throwable { + NAV.waitForPageLoad(); + NAV.press_tabKeyOnBody(); + + } + + @When("^I hit the tab key for the skip main content link$") + public void hitTabForMainContent() { + NAV.hitTabForMainContent(); + } + + ; + + @Then("^I see \"([^\"]*)\" in the same row as \"([^\"]*)\" in Backlog box") + public void seeText_inSameRow_asText_inBacklog(String searchText, String nextToText) { + try { + NAV.seeText_inSameRow_asText_inBacklog(searchText, nextToText); + } catch (Exception e) { + NAV.seeText_inSameRow_asText_inBacklog(searchText, nextToText); + } + } + + ; + + @Then("^I see \"([^\"]*)\" in \"([^\"]*)\" Allocate Replies box") + public void seeText_inAllocateReplies(String searchText, String elementName) { + try { + NAV.seeText_inAllocateReplies(searchText, elementName); + } catch (Exception e) { + NAV.seeText_inAllocateReplies(searchText, elementName); + } + } + + ; + + @Then("^\"([^\"]*)\" is checked$") + public void isCheckboxChecked(String checkBoxLabel) { + try { + NAV.checkBox_Checked(checkBoxLabel, true); + } catch (Exception e) { + NAV.checkBox_Checked(checkBoxLabel, true); + } + } + + ; + + @Then("^\"([^\"]*)\" is unchecked$") + public void isCheckboxUnchecked(String checkBoxLabel) { + try { + NAV.checkBox_Checked(checkBoxLabel, false); + } catch (Exception e) { + NAV.checkBox_Checked(checkBoxLabel, false); + } + + } + + ; + + @Then("^I see \"([^\"]*)\" under \"([^\"]*)\" box$") + public void getBoxHeaderText(String text, String boxName) { + try{NAV.getBoxHeaderText(text, boxName); + } + catch(Exception e) { + NAV.getBoxHeaderText(text, boxName); + } + } + + @Then("^\"([^\"]*)\" assigned replies count is \"([^\"]*)\"$") + public void totalAssignedCount(String countName, String countValue) { + try { + NAV.totalAssignedCount(countName, countValue); + } catch (Exception e) { + } + } + +// @When("^I cannot navigate from Bureau to \"([^\"]*)\"$") +// public void appendURL(String uRL) { + // NAV.appendURL(uRL); +// } + + @Then("^I take a screenshot$") + + public void takeScreenshot() { + + SST.captureScreenShot(); + } + + @When("^I see error \"(.*)\"$") + public void eligibilityErrorCheck(String arg1) throws Throwable { + try { + NAV.eligibilityErrorOnPage(arg1); + } catch (AssertionError | Exception e) { + NAV.waitForPageLoad(); + NAV.eligibilityErrorOnPage(arg1); + } + } + @When("^I verify confirmation text of jurors next due to attend \"(.*)\" on the page$") + public void text_on_page_Verify(String arg1) throws Throwable { + assertEquals(arg1, NAV.getHeadingText()); + } + @When("^I verify button \"(.*)\" on the page$") + public void buttonContinue_on_page_Verify(String arg1) throws Throwable { + NAV.continueBtnOnPage( arg1); + } +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_notify.java b/src/test/java/cucumber/steps/StepDef_notify.java new file mode 100644 index 00000000..00409637 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_notify.java @@ -0,0 +1,56 @@ +package cucumber.steps; + +import org.openqa.selenium.WebDriver; + +import cucumber.pageObjects.Login; +import cucumber.pageObjects.NavigationShared; +import cucumber.pageObjects.Notify; +import cucumber.pageObjects.SharedDriver; +import cucumber.pageObjects.aSamplePO; +import cucumber.testdata.DataSetup; + +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; + +import org.openqa.selenium.support.PageFactory; + +public class StepDef_notify { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private Notify NOT; + private DataSetup DBB; + private final WebDriver webDriver; + + public StepDef_notify(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + NOT = PageFactory.initElements(webDriver, Notify.class); + DBB = PageFactory.initElements(webDriver, DataSetup.class); + } + + + @When("^I log in with \"([^\"]*)\" and my temporary password$") + public void logInWith_NotifyTemporaryPassword (String username) throws Throwable{ + String password = DBB.returnPassword_byUsername_fromNotify(username); + LGN.login(username, password); + }; + + @Then("^I can see I am not subscribed to Notifications$") + public void amNot_subscribedToNotifications(){ + NOT.amNot_subscribedToNotifications(); + }; + + @Then("^I can see I am subscribed to Notifications$") + public void am_subscribedToNotifications(){ + NOT.am_subscribedToNotifications(); + }; + +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_organisations.java b/src/test/java/cucumber/steps/StepDef_organisations.java new file mode 100644 index 00000000..df43ac64 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_organisations.java @@ -0,0 +1,48 @@ +package cucumber.steps; + +import org.openqa.selenium.WebDriver; +import cucumber.pageObjects.Groups; +import cucumber.pageObjects.Login; +import cucumber.pageObjects.NavigationShared; +import cucumber.pageObjects.Organisations; +import cucumber.pageObjects.SharedDriver; +import cucumber.pageObjects.aSamplePO; + +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; + +import org.openqa.selenium.support.PageFactory; + +public class StepDef_organisations { + + private aSamplePO SPO; + private Login LGN; + private Groups GRP; + private Organisations ORG; + private NavigationShared NAV; + private final WebDriver webDriver; + + public StepDef_organisations(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + GRP = PageFactory.initElements(webDriver, Groups.class); + ORG = PageFactory.initElements(webDriver, Organisations.class); + } + + @Then("^I see \"([^\"]*)\" is not subscribed to Notifications$") + public void textUser_notSubscribedToNotifications (String text){ + ORG.confirmTextUserNot_subscribedToNotifications(text); + }; + + @Then("^I see \"([^\"]*)\" is subscribed to Notifications$") + public void textUser_subscribedToNotifications(String text){ + ORG.confirmTextUser_subscribedToNotifications(text); + }; + +} diff --git a/src/test/java/cucumber/steps/StepDef_response.java b/src/test/java/cucumber/steps/StepDef_response.java new file mode 100644 index 00000000..769c6cc0 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_response.java @@ -0,0 +1,2092 @@ +package cucumber.steps; + + +import cucumber.pageObjects.*; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.Given; +import io.cucumber.java.en.When; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertTrue; + +public class StepDef_response { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private Groups GRP; + private final WebDriver webDriver; + private ScreenShotTaker SST; + private final SummonsReply SUMMONS_REPLY; + + public StepDef_response(SharedDriver webDriver, SummonsReply summons_reply) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + GRP = PageFactory.initElements(webDriver, Groups.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + SUMMONS_REPLY = summons_reply; + } + + @Given("^I have completed the response for$") + public void searchComplete_response(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("bureau", env); + + LGN.login(); + NAV.click_link_by_text("Search"); + NAV.set_valueTo("Juror number", part_no); + NAV.press_buttonByName("Search"); + NAV.textPresentOnPage("1 results for"); + NAV.textPresentOnPage("Date received"); + NAV.clickText_inSameRow_asText(part_no, part_no); + NAV.textPresentOnPage("Record status"); + try { +// NAV.select_fromDropdown("Excusal", "Process reply"); + NAV.press_buttonByName("Process reply"); + NAV.setProcessReplyTo_("Excusal"); + GRP.click_radioButtonWithLabel("Accept excusal"); + NAV.textPresentOnPage("Reason for excusal re"); + NAV.select_fromDropdown("D - DECEASED", "Reason for the excusal request"); + NAV.press_buttonByName("Confirm"); + } catch (Exception | AssertionError e) { + NAV.textPresentOnPage("COMPLETED"); + NAV.textPresentOnPage("Responded"); + } + + } + } + + ; + + @Given("^I have submitted a first party English straight through response$") + public void submitFirstEnglishStraightThroughResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + +// NAV.press_buttonByName("Start now"); + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find your juror number on your jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is the name we have for you correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this your address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Main phone", "07551179225"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", "1990"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Confirm you're eligible for jury service"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Have you worked in the"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Are you currently"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Have you been"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Are you being detained"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Has it been decided that you 'lack mental capacity'?"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes, I can start on"); + NAV.press_buttonByName("Continue"); + +// GRP.click_radioButtonWithLabel("Yes"); +// NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Do you have a disability"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("The information I have given is true to the best of my knowle"); + NAV.check_checkbox("The information I have given is true to the best of my knowle"); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + ; + + //| part_no |pool_number | last_name |postcode | email | + @Given("^I have submitted a third party English straight through response$") + public void submitThirdEnglishStraightThroughResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + +// NAV.press_buttonByName("Start now"); + GRP.click_radioButtonWithLabel("I am replying for someone else"); + NAV.press_buttonByName("Continue"); +// NAV.textPresentOnPage("The juror number can be found on the jury s"); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("What is your name?"); + NAV.set_valueTo("First name", "FirstName"); + NAV.set_valueTo("Last name", "LastName"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your relationship to the person"); + NAV.set_valueTo("How do you know the person you're replying for?", "Friend"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your contact information"); + NAV.check_checkbox("By phone (UK Numbers only)"); + NAV.set_valueTo("Main phone", "07551179225"); + NAV.check_checkbox("By email"); + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Why are you replying for the other person?"); + GRP.click_radioButtonWithLabel("The person is not here"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Is the name we have for them correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this their address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + +// NAV.textPresentOnPage("Please give the date of birth for the person you're replying for"); + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "1981"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("We might need to get in touch with the person to ask them more questions or give them information about their jury service"); + GRP.click_radioButtonWithLabel("Use the phone number that you have already given to contact you"); + GRP.click_radioButtonWithLabel("Use the email address that you have already given to contact you"); + NAV.press_buttonByName("Continue"); + +// #eligibility + NAV.press_buttonByName("Continue"); + +// #residency + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + +// #cjs + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + +// #bail + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + +// #convictions + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + +// #MH1 + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + +// #MH2 + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + +// #I can do service + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + +// #reasonable adjustments + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The answers I have given for the person I'm replying for are true as far as I know."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + ; + + //| part_no |pool_number | last_name |postcode | email | + @Given("^I have submitted a first party Welsh straight through response$") + public void submitFirstWelshStraightThroughResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPageWelsh("public", env); + +// NAV.click_link_by_text("Welsh (Cymraeg)"); +// NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb dros fy hun"); + NAV.press_buttonByName("Parhau"); +// NAV.textPresentOnPage("Gellir dod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor"); +// NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Rhif rheithiwr", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("A yw'r enw sydd gennym ar eich cyfer chi yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Eich cyfeiriad chi yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Prif rif ff", "07590309447"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Do"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Ydych chi ar fechn"); + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Ydych chi wedi"); + GRP.click_radioButtonWithLabel("Naddo"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Na"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Na"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Ydw, rydw i'n gallu dechrau"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + ; + + //| part_no |pool_number | last_name |postcode | email | + @Given("^I have submitted a third party Welsh straight through response$") + public void submitThirdWelshStraightThroughResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + NAV.click_link_by_text("Welsh (Cymraeg)"); + NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb ar ran rhywun arall"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Gellir dod o hyd i'r rhif rheithiwr ar y llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Beth yw eich enw?"); + NAV.set_valueTo("Enw cyntaf", "FirstName"); + NAV.set_valueTo("Cyfenw", "LastName"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich perthynas â'r unigolyn"); + NAV.set_valueTo("Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?", "Friend"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich manylion cyswllt"); + NAV.check_checkbox("Dros y ffôn (rhifau yn y DU yn unig)"); + NAV.set_valueTo("Prif rif ffôn", "07551179225"); + NAV.check_checkbox("Trwy e-bost"); + NAV.set_valueTo("Nodwch gyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch gyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Pam ydych chi'n ymateb ar ran yr unigolyn arall?"); + GRP.click_radioButtonWithLabel("Nid yw'r unigolyn yma"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r enw sydd gennym ar ei gyfer yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Ei gyfeiriad ef yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran"); + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor"); + GRP.click_radioButtonWithLabel("Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi"); + GRP.click_radioButtonWithLabel("Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn rydych chi'n ymateb ar ei ran yn gymwys i wasanaethu ar reithgor?"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Do"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn yn glaf dan"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn ddiffyg galluedd meddyliol"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn ar fechnïaeth"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn wedi'i gael"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Ydi, mae'r unigolyn yn gallu dechrau"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Naddo"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn anabledd neu nam"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @Given("^I have submitted a first party English ineligibilty response$") + public void submitFirstEnglishIneligbileResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String details = list.get(i).get("details"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find your juror number on your jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is the name we have for you correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this your address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Main phone", "01234561234"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", "1990"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Confirm you're eligible"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.set_valueTo("Provide details", "Not resident"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Are you currently"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.set_valueTo("Provide details", "Bailed"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Have you been"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.setTextAreaWith_toText("id", "convictedDetails", "Convicted"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Are you being detained"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.set_valueTo("Provide details", "Am detained"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Has it been decided that you 'lack mental capacity'?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.set_valueTo("Provide brief details about why it was decided you lack mental capacity", "Lack capacity"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes, I can start on"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Do you have a disability"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The information I have given is true to the best of my knowle"); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I submit a digital response with reasonable adjustment$") + public void submitDigitalReasonableAdjustmentResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String details = list.get(i).get("details"); + String adjustmentNeededCap = list.get(i).get("adjustmentNeededCap"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Main phone", "01234561234"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Day", "01"); + NAV.set_valueTo("Month", "01"); + NAV.set_valueTo("Year", "1990"); + NAV.press_buttonByName("Continue"); + + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes, I can start on"); + NAV.press_buttonByName("Continue"); + + + GRP.click_radioButtonWithLabel("Yes"); + NAV.check_checkbox(adjustmentNeededCap); + NAV.set_valueTo("Tell us about any special arrangements", details); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The information I have given is true to the best of my knowle"); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I have submitted a third party English ineligibilty response$") + public void submitThirdEnglishIneligbileResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for someone else"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find their juror number on the jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("What is your name?"); + NAV.set_valueTo("First name", "FirstName"); + NAV.set_valueTo("Last name", "LastName"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your relationship to the person"); + NAV.set_valueTo("How do you know the person you're replying for?", "Friend"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your contact information"); + NAV.check_checkbox("By phone (UK Numbers only)"); + NAV.set_valueTo("Main phone", "02078211818"); + NAV.check_checkbox("By email"); + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Why are you replying for the other person?"); + GRP.click_radioButtonWithLabel("The person is not here"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Is the name we have for them correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this their address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Give the date of birth for the person you're replying for"); + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "1981"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("We might need to get in touch with the person to ask them more questions or give them information about their jury service"); + GRP.click_radioButtonWithLabel("Use the phone number that you have already given to contact you"); + GRP.click_radioButtonWithLabel("Use the email address that you have already given to contact you"); + NAV.press_buttonByName("Continue"); + +// #eligibility + NAV.press_buttonByName("Continue"); + +// #residency + GRP.click_radioButtonWithLabel("No"); + NAV.set_valueTo("Provide details about where the person you are answering for has lived since their 13th birthday", "Not resident"); + NAV.press_buttonByName("Continue"); + +// #cjs + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + +// #bail + GRP.click_radioButtonWithLabel("Yes"); + NAV.set_valueTo("Provide details about the person's bail and criminal offence", "Bailed"); + NAV.press_buttonByName("Continue"); + +// #convictions + GRP.click_radioButtonWithLabel("Yes"); + NAV.setTextAreaWith_toText("id", "convictedDetails", "Convicted"); + NAV.press_buttonByName("Continue"); + +// #mh1 + GRP.click_radioButtonWithLabel("Yes"); + NAV.set_valueTo("Provide details about how they're being detained, looked after or treated under the Mental Health Act", "Am detained"); + NAV.press_buttonByName("Continue"); + +// #mh2 + GRP.click_radioButtonWithLabel("Yes"); + NAV.set_valueTo("Provide brief details about why it was decided they lack mental capacity", "Lack capacity"); + NAV.press_buttonByName("Continue"); + +// #can do service + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + +// #reasonable adjustments + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The answers I have given for the person I'm replying for are true as far as I know."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + ; + + @Given("^I have submitted a first party Welsh ineligibilty response$") + public void submitFirstWelshIneligbileResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPageWelsh("public", env); + +// NAV.click_link_by_text("Welsh (Cymraeg)"); +// NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb dros fy hun"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Rhif rheithiwr"); + NAV.set_valueTo("Rhif rheithiwr", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("A yw'r enw sydd gennym ar eich cyfer chi yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Eich cyfeiriad chi yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Prif rif ff", "02078211818"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Naddo"); + NAV.set_valueTo("Rhowch fanylion", "Not resident"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Ydych chi ar fechn"); + GRP.click_radioButtonWithLabel("Ydw"); + NAV.set_valueTo("Rhowch fanylion", "Bailed"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Ydych chi wedi'ch cael"); + GRP.click_radioButtonWithLabel("Do"); + NAV.setTextAreaWith_toText("id", "convictedDetails", "Convicted"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Ydych chi'n cael eich cadw"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.set_valueTo("Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl", "Am sectioned"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A benderfynwyd nad oes gennych y gallu meddyliol"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.set_valueTo("Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol", "Lack capacity"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Ydw, rydw i'n gallu dechrau"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gennych anabledd neu nam"); + GRP.click_radioButtonWithLabel("Oes"); + NAV.check_checkbox("Clefyd siwgr"); + NAV.set_valueTo("Rhowch wybod", "Reasonable Adjustment"); + + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + ; + + @Given("^I have submitted a third party Welsh ineligibilty response$") + public void submitThirdWelshIneligbileResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + NAV.click_link_by_text("Welsh (Cymraeg)"); + NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb ar ran rhywun arall"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Gellir dod o hyd i'r rhif rheithiwr ar y llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Beth yw eich enw?"); + NAV.set_valueTo("Enw cyntaf", "FirstName"); + NAV.set_valueTo("Cyfenw", "LastName"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich perthynas â'r unigolyn"); + NAV.set_valueTo("Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?", "Friend"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich manylion cyswllt"); + NAV.check_checkbox("Dros y ffôn (rhifau yn y DU yn unig)"); + NAV.set_valueTo("Prif rif ffôn", "02078211818"); + NAV.check_checkbox("Trwy e-bost"); + NAV.set_valueTo("Nodwch gyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch gyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Pam ydych chi'n ymateb ar ran yr unigolyn arall?"); + GRP.click_radioButtonWithLabel("Nid yw'r unigolyn yma"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r enw sydd gennym ar ei gyfer yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Ei gyfeiriad ef yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran"); + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor"); + GRP.click_radioButtonWithLabel("Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi"); + GRP.click_radioButtonWithLabel("Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn rydych chi'n ymateb ar ei ran yn gymwys i wasanaethu ar reithgor?"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Naddo"); + NAV.set_valueTo("Rhowch fanylion", "Not resident"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn yn glaf dan"); + GRP.click_radioButtonWithLabel("Ydi"); + NAV.set_valueTo("Rhowch fanylion", "Am sectioned"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn ddiffyg galluedd meddyliol"); + GRP.click_radioButtonWithLabel("Ydi"); + NAV.set_valueTo("Rhowch fanylion", "Lack capacity"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn ar fechnïaeth"); + GRP.click_radioButtonWithLabel("Ydi"); + NAV.set_valueTo("Rhowch fanylion", "Bailed"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn wedi'i gael"); + GRP.click_radioButtonWithLabel("Ydi"); + NAV.set_valueTo("Rhowch fanylion", "Convicted"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Ydi, mae'r unigolyn yn gallu dechrau"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Naddo"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn anabledd neu nam"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @Given("^I have submitted a first party English deferral response$") + public void submitFirstEnglishDeferralResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find your juror number on your jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is the name we have for you correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this your address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Main phone", "07551179225"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "1981"); + NAV.press_buttonByName("Continue"); + + + NAV.textPresentOnPage("Eligibility"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Are you being detained"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Has it been decided that you 'lack mental capacity'?"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + + NAV.textPresentOnPage("Are you currently"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Have you been"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("I need to change the date"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("You can only change the date of your jury service once", "Defer me please"); + NAV.press_buttonByName("Continue"); + + NAV.set_value_to("First date", "{12 mondays time}"); + NAV.set_value_to("Second date", "{15 mondays time}"); + NAV.set_value_to("Third date", "{18 mondays time}"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Do you have a disability"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The information I have given is true to the best of my knowle"); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I have submitted a third party English deferral response$") + public void submitThirdEnglishDeferralResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + +// NAV.press_buttonByName("Start now"); + GRP.click_radioButtonWithLabel("I am replying for someone else"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find their juror number on the jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("What is your name?"); + NAV.set_valueTo("First name", "FirstName"); + NAV.set_valueTo("Last name", "LastName"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your relationship to the person"); + NAV.set_valueTo("How do you know the person you're replying for?", "Friend"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your contact information"); + NAV.check_checkbox("By phone (UK Numbers only)"); + NAV.set_valueTo("Main phone", "07551179225"); + NAV.check_checkbox("By email"); + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Why are you replying for the other person?"); + GRP.click_radioButtonWithLabel("The person is not here"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Is the name we have for them correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this their address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Give the date of birth for the person you're replying for"); + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "1981"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("We might need to get in touch with the person to ask them more questions or give them information about their jury service"); + GRP.click_radioButtonWithLabel("Use the phone number that you have already given to contact you"); + GRP.click_radioButtonWithLabel("Use the email address that you have already given to contact you"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Confirm if the person is eligible for jury service"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No, we need to change the date"); + NAV.press_buttonByName("Continue"); + + NAV.setTextAreaWith_toText("id", "deferralReason", "Defer them please"); + NAV.press_buttonByName("Continue"); + + NAV.set_value_to("First choice", "{12 mondays time}"); + NAV.set_value_to("Second choice", "{15 mondays time}"); + NAV.set_value_to("Third choice", "{18 mondays time}"); + + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The answers I have given for the person I'm replying for are true as far as I know"); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I have submitted a first party Welsh deferral response$") + public void submitFirstWelshDeferralResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPageWelsh("public", env); + +// NAV.click_link_by_text("Welsh (Cymraeg)"); +// NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb dros fy hun"); + NAV.press_buttonByName("Parhau"); +// NAV.textPresentOnPage("Gellir dod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("A yw'r enw sydd gennym ar eich cyfer chi yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Eich cyfeiriad chi yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Prif rif ffôn", "07551179225"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Cymhwyso ar gyfer gwasanaeth rheithgor"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Do"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A ydych chi'n glaf dan orchymyn"); + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gennych ddiffyg galluedd meddyliol"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A ydych chi ar fechn"); + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A ydych wedi'ch cael"); + GRP.click_radioButtonWithLabel("Naddo"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Rwyf angen newid dyddiad"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Dim ond unwaith y gallwch newid dyddiad eich gwasanaeth rheithgor", "Defer me please"); + NAV.press_buttonByName("Parhau"); + + NAV.set_value_to("Dyddiad 1", "{12 mondays time}"); + NAV.set_value_to("Dyddiad 2", "{15 mondays time}"); + NAV.set_value_to("Dyddiad 3", "{18 mondays time}"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gennych anabledd neu nam"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @Given("^I have submitted a third party Welsh deferral response$") + public void submitThirdWelshDeferralResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + NAV.click_link_by_text("Welsh (Cymraeg)"); + NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb ar ran rhywun arall"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Gellir dod o hyd i'r rhif rheithiwr ar y llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Beth yw eich enw?"); + NAV.set_valueTo("Enw cyntaf", "FirstName"); + NAV.set_valueTo("Cyfenw", "LastName"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich perthynas â'r unigolyn"); + NAV.set_valueTo("Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?", "Friend"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich manylion cyswllt"); + NAV.check_checkbox("Dros y ffôn (rhifau yn y DU yn unig)"); + NAV.set_valueTo("Prif rif ffôn", "02078211818"); + NAV.check_checkbox("Trwy e-bost"); + NAV.set_valueTo("Nodwch gyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch gyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Pam ydych chi'n ymateb ar ran yr unigolyn arall?"); + GRP.click_radioButtonWithLabel("Nid yw'r unigolyn yma"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r enw sydd gennym ar ei gyfer yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Ei gyfeiriad ef yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran"); + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor"); + GRP.click_radioButtonWithLabel("Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi"); + GRP.click_radioButtonWithLabel("Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn rydych chi'n ymateb ar ei ran yn gymwys i wasanaethu ar reithgor?"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Do"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn yn glaf dan"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn ddiffyg galluedd meddyliol"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn ar fechnïaeth"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn wedi'i gael"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Rydw i angen newid dyddiad"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Dim ond unwaith y gallwch newid dyddiad y gwasanaeth rheithgor", "Defer them please"); + NAV.press_buttonByName("Parhau"); + + NAV.set_value_to("Dyddiad 1", "{12 mondays time}"); + NAV.set_value_to("Dyddiad 2", "{15 mondays time}"); + NAV.set_value_to("Dyddiad 3", "{18 mondays time}"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Naddo"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn anabledd neu nam"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @Given("^I have submitted a first party English excusal response$") + public void submitFirstEnglishExcusalResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find your juror number on your jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is the name we have for you correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this your address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Main phone", "07590309447"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "1981"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("eligible for jury service"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Have you worked"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Are you currently"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Have you been"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Are you being detained"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Has it been decided that you 'lack mental capacity'?"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("I cannot do jury service and need to be excused"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Why do you need to be", "Excuse me please"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The information I have given is true to the best of my knowle"); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I have submitted a third party English excusal response$") + public void submitThirdEnglishExcusalResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for someone else"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find their juror number on the jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("What is your name?"); + NAV.set_valueTo("First name", "FirstName"); + NAV.set_valueTo("Last name", "LastName"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your relationship to the person"); + NAV.set_valueTo("How do you know the person you're replying for?", "Friend"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your contact information"); + NAV.check_checkbox("By phone (UK Numbers only)"); + NAV.set_valueTo("Main phone", "02078211818"); + NAV.check_checkbox("By email"); + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Why are you replying for the other person?"); + GRP.click_radioButtonWithLabel("The person is not here"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Is the name we have for them correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this their address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Give the date of birth for the person you're replying for"); + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "1981"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("We might need to get in touch with the person to ask them more questions or give them information about their jury service"); + GRP.click_radioButtonWithLabel("Use the phone number that you have already given to contact you"); + GRP.click_radioButtonWithLabel("Use the email address that you have already given to contact you"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Confirm if the person is eligible for jury service"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Has the person you're replying for worked in the criminal justice system in the last 5 years?"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Is the person currently on bail for a criminal offence?"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Has the person been found guilty"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Is the person you're replying for being detained"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Has it been decided that the person you're replying for 'lacks mental capacity'?"); + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No, they cannot do jury service and need to be excused"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Why do they need", "Excuse them please"); + NAV.press_buttonByName("Continue"); + + GRP.click_radioButtonWithLabel("No"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The answers I have given for the person I'm replying for are true as far as I know."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I have submitted a first party Welsh excusal response$") + public void submitFirstWelshExcusalResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPageWelsh("public", env); + +// NAV.click_link_by_text("Welsh (Cymraeg)"); +// NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb dros fy hun"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Gellir dod o hyd i'r rhif rheithiwr ar frig y llythyr gwŷs"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("A yw'r enw sydd gennym ar eich cyfer chi yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Eich cyfeiriad chi yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Prif rif ffôn", "07551179225"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Cymhwyso ar gyfer gwasanaeth rheithgor"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Do"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A ydych chi'n glaf dan orchymyn"); + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gennych ddiffyg galluedd meddyliol"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A ydych chi ar fechn"); + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A ydych wedi'ch cael"); + GRP.click_radioButtonWithLabel("Naddo"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Rhowch reswm byr pam na allwch chi wneud gwasanaeth rheithgor yn y 12 mis nesaf. Os oes arnom angen gwybodaeth neu dystiolaeth bellach, byddwn yn cysylltu ȃ chi. Nid oes angen i chi anfon gwybodaeth ychwanegol ar hyn o bryd.", "Excuse me please"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Nac ydw"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gennych anabledd neu nam"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @Given("^I have submitted a third party Welsh excusal response$") + public void submitThirdWelshExcusalResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + NAV.click_link_by_text("Welsh (Cymraeg)"); + NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb ar ran rhywun arall"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Gellir dod o hyd i'r rhif rheithiwr ar y llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Beth yw eich enw?"); + NAV.set_valueTo("Enw cyntaf", "FirstName"); + NAV.set_valueTo("Cyfenw", "LastName"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich perthynas â'r unigolyn"); + NAV.set_valueTo("Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?", "Friend"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich manylion cyswllt"); + NAV.check_checkbox("Dros y ffôn (rhifau yn y DU yn unig)"); + NAV.set_valueTo("Prif rif ffôn", "02078211818"); + NAV.check_checkbox("Trwy e-bost"); + NAV.set_valueTo("Nodwch gyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch gyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Pam ydych chi'n ymateb ar ran yr unigolyn arall?"); + GRP.click_radioButtonWithLabel("Nid yw'r unigolyn yma"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r enw sydd gennym ar ei gyfer yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Ei gyfeiriad ef yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran"); + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1981"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor"); + GRP.click_radioButtonWithLabel("Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi"); + GRP.click_radioButtonWithLabel("Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn rydych chi'n ymateb ar ei ran yn gymwys i wasanaethu ar reithgor?"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Do"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn yn glaf dan"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn ddiffyg galluedd meddyliol"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn ar fechnïaeth"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r unigolyn wedi'i gael"); + GRP.click_radioButtonWithLabel("Nac ydi"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Nid yw'r unigolyn rwy'n ymateb ar ei ran yn gallu gwasanaethu ar reithgor a hoffai gael ei esgusodi"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Rhowch reswm byr pam na all yr unigolyn yr ydych yn ymateb ar ei ran wneud gwasanaeth rheithgor yn y 12 mis nesaf. Os oes arnom angen gwybodaeth neu dystiolaeth bellach, byddwn yn cysylltu ȃ chi. Nid oes angen i chi anfon gwybodaeth ychwanegol ar hyn o bryd.", "Excuse them please"); + NAV.press_buttonByName("Parhau"); + + GRP.click_radioButtonWithLabel("Naddo"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A oes gan yr unigolyn anabledd neu nam"); + GRP.click_radioButtonWithLabel("Nac oes"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @Given("^I have submitted a third party English deceased response$") + public void submitThirdEnglishDeceasedResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for someone else"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find their juror number on the jury summons letter"); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("What is your name?"); + NAV.set_valueTo("First name", "FirstName"); + NAV.set_valueTo("Last name", "LastName"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your relationship to the person"); + NAV.set_valueTo("How do you know the person you're replying for?", "Friend"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your contact information"); + NAV.check_checkbox("By phone (UK Numbers only)"); + NAV.set_valueTo("Main phone", "02078211818"); + NAV.check_checkbox("By email"); + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Why are you replying for the other person?"); + GRP.click_radioButtonWithLabel("The person has died"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Check your answers now"); + NAV.check_checkbox("The answers I have given for the person I'm replying for are true as far as I know."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + NAV.textPresentOnPage("sorry for any distress"); + + } + } + + @Given("^I have submitted a third party Welsh deceased response$") + public void submitThirdWelshDeceasedResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + +// NAV.accessLoginPage("public", env); + +// NAV.click_link_by_text("Welsh (Cymraeg)"); +// NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb ar ran rhywun arall"); + NAV.press_buttonByName("Parhau"); +// NAV.textPresentOnPage("Gellir dod o hyd i'r rhif rheithiwr ar y llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Beth yw eich enw?"); + NAV.set_valueTo("Enw cyntaf", "FirstName"); + NAV.set_valueTo("Cyfenw", "LastName"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich perthynas â'r unigolyn"); + NAV.set_valueTo("Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?", "Friend"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich manylion cyswllt"); + NAV.check_checkbox("Dros y ffôn (rhifau yn y DU yn unig)"); + NAV.set_valueTo("Prif rif ffôn", "02078211818"); + NAV.check_checkbox("Trwy e-bost"); + NAV.set_valueTo("Nodwch gyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch gyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Pam ydych chi'n ymateb ar ran yr unigolyn arall?"); + GRP.click_radioButtonWithLabel("Mae'r unigolyn wedi marw"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + NAV.textPresentOnPage("Ymddiheurwn am achosi unrhyw ofid"); + + } + } + + @Given("^I have submitted a first party English underage response$") + public void submitFirstEnglishUnderageResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for myself"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("You can find your juror number on your jury summons letter."); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is the name we have for you correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this your address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Main phone", "02078211818"); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "2005"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Confirm your date of birth"); + NAV.press_buttonByName("Continue"); + + NAV.check_checkbox("The information I have given is true to the best of my knowle"); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I have submitted a third party English overage response$") + public void submitThirdEnglishOverageResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + GRP.click_radioButtonWithLabel("I am replying for someone else"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("The juror number can be found on the jury s"); + NAV.set_valueTo("9-digit juror number", part_no); + NAV.set_valueTo("Juror last name", last_name); + NAV.set_valueTo("Juror postcode", postcode); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("What is your name?"); + NAV.set_valueTo("First name", "FirstName"); + NAV.set_valueTo("Last name", "LastName"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your relationship to the person"); + NAV.set_valueTo("How do you know the person you're replying for?", "Friend"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Your contact information"); + NAV.check_checkbox("By phone (UK Numbers only)"); + NAV.set_valueTo("Main phone", "02078211818"); + NAV.check_checkbox("By email"); + NAV.set_valueTo("Enter your email address", email); + NAV.set_valueTo("Enter your email address again", email); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Why are you replying for the other person?"); + GRP.click_radioButtonWithLabel("The person is not here"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Is the name we have for them correct?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + NAV.textPresentOnPage("Is this their address?"); + GRP.click_radioButtonWithLabel("Yes"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Please give the date of birth for the person you're replying for"); + NAV.set_valueTo("Day", "27"); + NAV.set_valueTo("Month", "09"); + NAV.set_valueTo("Year", "1927"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Confirm the date of birth for the person you're answering for"); + NAV.press_buttonByName("Continue"); + + NAV.textPresentOnPage("Check your answers now"); + NAV.check_checkbox("The answers I have given for the person I'm replying for are true as far as I know."); + NAV.press_buttonByName("Submit"); + + NAV.textPresentOnPage("You have completed your reply"); + + } + } + + @Given("^I have submitted a first party Welsh underage response$") + public void submitFirstWelshUnderageResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPageWelsh("public", env); + +// NAV.click_link_by_text("Welsh (Cymraeg)"); +// NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb dros fy hun"); + NAV.press_buttonByName("Parhau"); +// NAV.textPresentOnPage("Gellir dod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("A yw'r enw sydd gennym ar eich cyfer chi yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Eich cyfeiriad chi yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Prif rif ffôn", "02078211818"); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch eich cyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "2005"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Cadarnhewch y dyddiad geni"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @Given("^I have submitted a third party Welsh overage response$") + public void submitThirdWelshOverageResponse(DataTable arg1) throws Throwable { + List> list = arg1.asMaps(String.class, String.class); + for (int i = 0; i < list.size(); i++) { + String part_no = list.get(i).get("part_no"); + String pool_number = list.get(i).get("pool_number"); + String last_name = list.get(i).get("last_name"); + String postcode = list.get(i).get("postcode"); + String email = list.get(i).get("email"); + String env = "demo"; + if (System.getProperty("env.database") != null) + env = System.getProperty("env.database"); + + NAV.accessLoginPage("public", env); + + NAV.click_link_by_text("Welsh (Cymraeg)"); + NAV.press_buttonByName("Dechrau nawr"); + GRP.click_radioButtonWithLabel("Rwy'n ymateb ar ran rhywun arall"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Gellir dod o hyd i'r rhif rheithiwr ar y llythyr gwŷs rheithgor"); + NAV.set_valueTo("Rhif rheithiwr – 9 digid", part_no); + NAV.set_valueTo("Cyfenw'r Rheithiwr", last_name); + NAV.set_valueTo("Cod post Rheithiwr", postcode); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Beth yw eich enw?"); + NAV.set_valueTo("Enw cyntaf", "FirstName"); + NAV.set_valueTo("Cyfenw", "LastName"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich perthynas â'r unigolyn"); + NAV.set_valueTo("Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?", "Friend"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Eich manylion cyswllt"); + NAV.check_checkbox("Dros y ffôn (rhifau yn y DU yn unig)"); + NAV.set_valueTo("Prif rif ffôn", "02078211818"); + NAV.check_checkbox("Trwy e-bost"); + NAV.set_valueTo("Nodwch gyfeiriad e-bost", email); + NAV.set_valueTo("Nodwch gyfeiriad e-bost eto", email); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Pam ydych chi'n ymateb ar ran yr unigolyn arall?"); + GRP.click_radioButtonWithLabel("Nid yw'r unigolyn yma"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("A yw'r enw sydd gennym ar ei gyfer yn gywir?"); + GRP.click_radioButtonWithLabel("Ydy"); + NAV.press_buttonByName("Parhau"); + NAV.textPresentOnPage("Ei gyfeiriad ef yw hwn?"); + GRP.click_radioButtonWithLabel("Ie"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran"); + NAV.set_valueTo("Diwrnod", "27"); + NAV.set_valueTo("Mis", "09"); + NAV.set_valueTo("Blwyddyn", "1927"); + NAV.press_buttonByName("Parhau"); + + NAV.textPresentOnPage("Cadarnhewch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran"); + NAV.press_buttonByName("Parhau"); + + NAV.check_checkbox("Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir."); + NAV.press_buttonByName("Cyflwyno"); + + NAV.textPresentOnPage("Rydych wedi cwblhau'r broses ymateb"); + + } + } + + @When("^I check the processed success banner is not visible$") + public void processedSuccessBannerInvisible() { + assertTrue("Processed Success Banner is visible", SUMMONS_REPLY.processedSuccessBannerInvisible()); + } + + @When("^the Enter summons reply button is not visible$") + public void enterSummonsReplyButtonInvisible() { + assertTrue("enter summons reply button is not visible", SUMMONS_REPLY.enterSummonsReplyButtonInvisible()); + } + +} \ No newline at end of file diff --git a/src/test/java/cucumber/steps/StepDef_search.java b/src/test/java/cucumber/steps/StepDef_search.java new file mode 100644 index 00000000..432ded9c --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_search.java @@ -0,0 +1,53 @@ +package cucumber.steps; + +import org.openqa.selenium.OutputType; +import org.openqa.selenium.TakesScreenshot; +import org.openqa.selenium.WebDriver; +import cucumber.pageObjects.Login; +import cucumber.pageObjects.NavigationShared; +import cucumber.pageObjects.ScreenShotTaker; +import cucumber.pageObjects.SharedDriver; +import cucumber.pageObjects.Search; +import cucumber.pageObjects.aSamplePO; +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; + +import org.openqa.selenium.support.PageFactory; + +public class StepDef_search { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + private ScreenShotTaker SST; + private Search SEARCH; + + public StepDef_search(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + SEARCH = PageFactory.initElements(webDriver, Search.class); + } + + @When("^I search for person/organisation with a value of \"([^\"]*)\"$") + public void search_personOrganisationTopSearch(String arg1){ + try{ + SEARCH.search_personOrganisationTopSearch(arg1); + } catch (Exception e) { + NAV.waitForPageLoad(); + SEARCH.search_personOrganisationTopSearch(arg1); + } + }; + + + + +} + diff --git a/src/test/java/cucumber/steps/StepDef_summoncitizens.java b/src/test/java/cucumber/steps/StepDef_summoncitizens.java new file mode 100644 index 00000000..2bf6717b --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_summoncitizens.java @@ -0,0 +1,112 @@ +package cucumber.steps; + +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; +import cucumber.pageObjects.*; +import cucumber.testdata.DatabaseTester; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +import java.text.ParseException; +import java.util.Map; + +import static cucumber.steps.StepDef_jurorpool.poolNumber; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + + +public class StepDef_summoncitizens { + + private final CoronersPool CORONERS_POOL_PAGE; + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + + private static WebDriver driver; + private ScreenShotTaker SST; + private final PoolRequests POOL_REQUESTS_PAGE; + private final CheckPoolRequest CHECK_POOL_REQUEST_PAGE; + private final PoolOverview POOL_OVERVIEW_PAGE; + private final ActivePools ACTIVE_POOLS_PAGE; + private final SummonsReply SUMMONS_REPLY; + private final ViewSummonsReply VIEW_SUMMONS_REPLY; + private final PoolSearch POOL_SEARCH; + + private final Header HEADER_PAGE; + private final DatabaseTester DBT; + private final JurorRecordSearch JUROR_RECORD_SEARCH; + private final SummonCitizens SUMMON_CITIZENS; + +// public static String poolNumber; + + public static String summonedNumber; + + public StepDef_summoncitizens(CoronersPool coroners_pool_page, SharedDriver webDriver, DatabaseTester dbt) { + CORONERS_POOL_PAGE = coroners_pool_page; + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + POOL_REQUESTS_PAGE = PageFactory.initElements(webDriver, PoolRequests.class); + ACTIVE_POOLS_PAGE = PageFactory.initElements(webDriver, ActivePools.class); + CHECK_POOL_REQUEST_PAGE = PageFactory.initElements(webDriver, CheckPoolRequest.class); + POOL_OVERVIEW_PAGE = PageFactory.initElements(webDriver, PoolOverview.class); + JUROR_RECORD_SEARCH = PageFactory.initElements(webDriver, JurorRecordSearch.class); + SUMMONS_REPLY = PageFactory.initElements(webDriver, SummonsReply.class); + POOL_SEARCH = PageFactory.initElements(webDriver, PoolSearch.class); + VIEW_SUMMONS_REPLY = PageFactory.initElements(webDriver, ViewSummonsReply.class); + DBT = dbt; + HEADER_PAGE = PageFactory.initElements(webDriver, Header.class); + SUMMON_CITIZENS = PageFactory.initElements(webDriver, SummonCitizens.class);; + } + + @Then("^I should see the editable and non-editable information on the summon citizens for pool screen$") + public void iShouldSeeTheEditableAndNonEditableInformationOnTheSummonCitizensForPoolScreen(DataTable table) throws ParseException{ + Map data = table.asMap(String.class, String.class); + assertEquals("Summon citizens", POOL_REQUESTS_PAGE.getPageHeading()); + assertEquals(poolNumber.get(), POOL_REQUESTS_PAGE.getSummonCitizensPoolNumber()); + assertTrue(SUMMON_CITIZENS.summonedCitizensChangeDeferralsIsPresent()); + assertTrue(SUMMON_CITIZENS.summonedCitizensChangeCatchmentIsPresent()); + assertTrue(SUMMON_CITIZENS.summonedCitizensSubmitButtonIsPresent()); + + assertEquals(data.get("jurorsRequested"), SUMMON_CITIZENS.getSummonCitizensNumberOfJurorsRequested()); + assertTrue( + Integer.parseInt(SUMMON_CITIZENS.getSummonCitizensNumberOfJurorsRequired()) > 0 + ); + assertEquals(data.get("courtCatchmentArea"), SUMMON_CITIZENS.getSummonCitizensCourtCatchmentArea()); + assertTrue(Integer.parseInt(SUMMON_CITIZENS.getSummonCitizensDeferrals()) > 0); + } + + @When("^I click on the summon citizens for pool button$") + public void iClickOnTheSummonCitizensForPoolButton() { + // Need web element of the button + } + + @When("^I see the number of citizens I summoned is \"([^\"]*)\"$") + public void iSeeNumberCitizensIsCorrect(String numberOfCitizens) { + assertEquals(numberOfCitizens, CORONERS_POOL_PAGE.getCoronersRowsOfCitizens().toString()); + } + @When("^I set the number of users I want to summon to \"([^\"]*)\"$") + public void iSetTheNumberOfUsersIWantToSummonTo(String summonNumber) throws Throwable { + NAV.set_value_to("Citizens to summon",summonNumber); + summonedNumber = summonNumber; + NAV.press_buttonByName("Create pool and summon citizens"); + } + + @Then("^I should see an error stating the amount of citizens summoned is more than allowed$") + public void iShouldSeeAnErrorStatingTheAmountOfCitizensSummonedIsMoreThanAllowed() { + assertEquals("Number of citizens to summon is too high", SUMMON_CITIZENS.getNumberOfCitizensSummonedError()); + } + + @When("^the Summon citizens button is not visible$") + public void summonCitizensButtonInvisible() { + assertTrue("summon citizens button is invisible", SUMMON_CITIZENS.summonCitizensButtonInvisible()); + } + +} diff --git a/src/test/java/cucumber/steps/StepDef_summoningprogress.java b/src/test/java/cucumber/steps/StepDef_summoningprogress.java new file mode 100644 index 00000000..6d2a4f0f --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_summoningprogress.java @@ -0,0 +1,142 @@ +package cucumber.steps; + +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; +import cucumber.pageObjects.*; +import cucumber.testdata.DatabaseTester; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import static org.junit.Assert.*; + +public class StepDef_summoningprogress { + private final WebDriver webDriver; + private final PoolSummoningProgress POOL_SUMMONING_PROGRESS; + private final DatabaseTester DBT; + private final aSamplePO SPO; + private final Login LGN; + private final NavigationShared NAV; + private final ScreenShotTaker SST; + private final PoolRequests POOL_REQUESTS_PAGE; + private final ActivePools ACTIVE_POOLS_PAGE; + private final CheckPoolRequest CHECK_POOL_REQUEST_PAGE; + private final PoolOverview POOL_OVERVIEW_PAGE; + private final JurorRecordSearch JUROR_RECORD_SEARCH; + private final SummonsReply SUMMONS_REPLY; + private final PoolSearch POOL_SEARCH; + private final ViewSummonsReply VIEW_SUMMONS_REPLY; + private final Header HEADER_PAGE; + + public StepDef_summoningprogress(PoolSummoningProgress poolSummoningProgress, SharedDriver webDriver, DatabaseTester dbt){ + POOL_SUMMONING_PROGRESS = poolSummoningProgress; + this.webDriver = webDriver; + DBT = dbt; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + POOL_REQUESTS_PAGE = PageFactory.initElements(webDriver, PoolRequests.class); + ACTIVE_POOLS_PAGE = PageFactory.initElements(webDriver, ActivePools.class); + CHECK_POOL_REQUEST_PAGE = PageFactory.initElements(webDriver, CheckPoolRequest.class); + POOL_OVERVIEW_PAGE = PageFactory.initElements(webDriver, PoolOverview.class); + JUROR_RECORD_SEARCH = PageFactory.initElements(webDriver, JurorRecordSearch.class); + SUMMONS_REPLY = PageFactory.initElements(webDriver, SummonsReply.class); + POOL_SEARCH = PageFactory.initElements(webDriver, PoolSearch.class); + VIEW_SUMMONS_REPLY = PageFactory.initElements(webDriver, ViewSummonsReply.class); + HEADER_PAGE = PageFactory.initElements(webDriver, Header.class); + } + @Then("^I navigate to the pool summoning progress screen$") + public void iNavigateToSummoningProgress(){ + POOL_REQUESTS_PAGE.openPoolManagement(); + POOL_SUMMONING_PROGRESS.clickSummoningProgressTab(); + } + + @And("^I see the summoning progress page banner$") + public void iSeeTheSummoningProgressBanner() { + assertTrue(POOL_SUMMONING_PROGRESS.summoningProgressBannerIsDisplayed()); + } + + @And("^I enter \"([^\"]*)\" as the court$") + public void iEnterAsTheCourt(String courtCode){ + POOL_SUMMONING_PROGRESS.enterCourtCodeForSearch(courtCode); + } + + @And("^I select the \"([^\"]*)\" court type$") + public void iSelectTheCourtType(String courtType) { + String lowerCaseCourtType = courtType.toLowerCase(); + switch (lowerCaseCourtType){ + case "crown": + POOL_SUMMONING_PROGRESS.clickCrownRadioButton(); + break; + case "civil": + POOL_SUMMONING_PROGRESS.clickCivilRadioButton(); + break; + case "high": + POOL_SUMMONING_PROGRESS.clickHighRadioButton(); + break; + default: + System.out.println("Input: "+lowerCaseCourtType+" Does not match crown, civil, high"); + break; + } + + } + + @And("^I click search$") + public void iClickSearch() { + POOL_SUMMONING_PROGRESS.clickSearch(); + } + + @Then("^I clear down the data for all the pools I created for this test$") + public void iClearDownThePoolsICreated() throws SQLException { + List poolList = StepDef_jurorpool.poolNumbers.get().stream().map(e -> "'" + e + "'").toList(); + String poolsCreated = poolList.toString().replace("[","(").replace("]",")"); + DBT.cleanNewActivePools(poolsCreated); + ArrayList pools = StepDef_jurorpool.poolNumbers.get(); + pools.clear(); + } + + @And("^I see all the pool numbers that were created are present on the screen$") + public void iSeeAllThePoolNumbersThatWereCreatedOnTheScreen() throws Throwable { + ArrayList pools = StepDef_jurorpool.poolNumbers.get(); + int poolsCreatedSize = pools.size(); + int index = 0; + do { + NAV.textPresentOnPage(pools.get(index)); + System.out.println("Value in position "+index+" is " +pools.get(index)); + index++; + } while (index < poolsCreatedSize); + } + @Then("^I see the pool I created in a row on the search results with the values$") + public void iSeeThePoolCreatedInTheSearchResultsTable(DataTable dataTable) throws Throwable { + Map expectedData = dataTable.asMap(String.class, String.class); + + ArrayList pools = StepDef_jurorpool.poolNumbers.get(); + + String poolCreated = pools.get(0); + NAV.textPresentOnPage(poolCreated); + String[] actualData = POOL_SUMMONING_PROGRESS.getRowOfTableContainingPoolNumber(poolCreated); + System.out.println(Arrays.toString(actualData)); + assertEquals(expectedData.get("requested"),actualData[2]); + assertEquals(expectedData.get("summoned"),actualData[3]); + assertEquals(expectedData.get("confirmed"),actualData[4]); + assertEquals(expectedData.get("balance"),actualData[5]); + + } + + @Given("^the poolNumbers lists is empty$") + public void thePoolNumbersListsIsEmpty() { + ArrayList pools = StepDef_jurorpool.poolNumbers.get(); + pools.clear(); + } +} diff --git a/src/test/java/cucumber/steps/StepDef_suspendDelete.java b/src/test/java/cucumber/steps/StepDef_suspendDelete.java new file mode 100644 index 00000000..f95c59e9 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_suspendDelete.java @@ -0,0 +1,61 @@ +package cucumber.steps; + +import org.openqa.selenium.OutputType; +import org.openqa.selenium.TakesScreenshot; +import org.openqa.selenium.WebDriver; +import cucumber.pageObjects.Login; +import cucumber.pageObjects.NavigationShared; +import cucumber.pageObjects.ScreenShotTaker; +import cucumber.pageObjects.SharedDriver; +import cucumber.pageObjects.SuspendDelete; +import cucumber.pageObjects.aSamplePO; +import io.cucumber.java.en.*; +import io.cucumber.java.PendingException; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.Before; +import io.cucumber.java.After; +import io.cucumber.java.Scenario; + +import org.openqa.selenium.support.PageFactory; + +public class StepDef_suspendDelete { + + private aSamplePO SPO; + private Login LGN; + private SuspendDelete SD; + private NavigationShared NAV; + private final WebDriver webDriver; + private ScreenShotTaker SST; + + public StepDef_suspendDelete(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + SD = PageFactory.initElements(webDriver, SuspendDelete.class); + } + + @Then("^under the \"([^\"]*)\" heading I see \"([^\"]*)\"$") + public void seeText_underHeading(String heading, String text){ + try{ + SD.seeText_underHeading(text, heading); + } catch (Exception e) { + NAV.waitForPageLoad(); + SD.seeText_underHeading(text, heading); + } + }; + + @Then("^under the \"([^\"]*)\" heading I do not see \"([^\"]*)\"$") + public void doNotSeeText_underHeading(String heading, String text){ + try{ + SD.seeText_underHeading(text, heading); + throw new Error("Saw text under heading when not expected"); + } catch (Exception e) { + //pass + } + + }; + +} + diff --git a/src/test/java/cucumber/steps/StepDef_trialsAndAttendance.java b/src/test/java/cucumber/steps/StepDef_trialsAndAttendance.java new file mode 100644 index 00000000..6de7c4a0 --- /dev/null +++ b/src/test/java/cucumber/steps/StepDef_trialsAndAttendance.java @@ -0,0 +1,251 @@ +package cucumber.steps; + +import cucumber.pageObjects.*; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.And; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +public class StepDef_trialsAndAttendance { + + private aSamplePO SPO; + private Login LGN; + private NavigationShared NAV; + private final WebDriver webDriver; + private ScreenShotTaker SST; + + private final TrialsAndAttendance TRL; + + public StepDef_trialsAndAttendance(SharedDriver webDriver) { + this.webDriver = webDriver; + SPO = PageFactory.initElements(webDriver, aSamplePO.class); + LGN = PageFactory.initElements(webDriver, Login.class); + NAV = PageFactory.initElements(webDriver, NavigationShared.class); + SST = PageFactory.initElements(webDriver, ScreenShotTaker.class); + TRL = PageFactory.initElements(webDriver, TrialsAndAttendance.class); + + } + + @When("^I check the pool number checkbox on the select specific pool page on create panel$") + public void checkPoolNumberCheckbox() { + TRL.checkPoolNumberCheckbox(); + } + + @When("^I set number of jurors to empanel to \"([^\"]*)\"$") + public void setNumberOfJurorsForEmpanel(String noOfJurors) { + TRL.jurorsForPanel(noOfJurors); + } + + @And("^I select the radio button with name \"([^\"]*)\" and value \"([^\"]*)\"$") + public void selectRadioButton(String jurorNumber, String status) { + String formId = "juryEmpanelSelectForm"; + NAV.waitForPageLoad(2); + TRL.selectStatusForEmpanelledJuror(formId, jurorNumber, status); + } + + @When("^I set juror check in minute to \"([^\"]*)\" on confirm attendance$") + public void setJurorCheckInMinute(String checkInTime) { + NAV.waitForPageLoad(1); + TRL.jurorCheckInMinute(checkInTime); + + } + + @When("^I set juror check in hour to \"([^\"]*)\" on confirm attendance$") + public void setJurorCheckInHour(String checkInTime) { + NAV.waitForPageLoad(1); + TRL.jurorCheckInHour(checkInTime); + + } + + @When("^I click on the am radio button for juror check in on confirm attendance$") + public void clickAmRadioButtonOnCheckIn() { + NAV.waitForPageLoad(1); + TRL.jurorCheckInRadioButtonAm(); + } + + @When("^I click on the pm radio button for juror check in on confirm attendance$") + public void clickPmRadioButtonOnCheckIn() { + NAV.waitForPageLoad(1); + TRL.jurorCheckInRadioButtonPm(); + } + + @When("^I set juror check out minute to \"([^\"]*)\" on confirm attendance$") + public void setJurorCheckOutMinute(String checkOutTime) { + NAV.waitForPageLoad(1); + TRL.jurorCheckOutMinute(checkOutTime); + } + + @When("^I set juror check out hour to \"([^\"]*)\" on confirm attendance$") + public void setJurorCheckOutHour(String checkOutTime) { + NAV.waitForPageLoad(1); + TRL.jurorCheckOutHour(checkOutTime); + } + + @When("^I click on the am radio button for juror check out on confirm attendance$") + public void clickAmRadioButtonOnCheckOut() { + NAV.waitForPageLoad(1); + TRL.jurorCheckOutRadioButtonAm(); + } + + @When("^I click on the pm radio button for juror check out on confirm attendance$") + public void clickPmRadioButtonOnCheckOut() { + NAV.waitForPageLoad(1); + TRL.jurorCheckOutRadioButtonPm(); + } + + @Then("^I see the following juror information on the Trial details screen$") + public void iSeeTheFollowingInformationOnaTrial(DataTable dataTable) { + + NAV.waitForPageLoad(3); + Map expectedData = dataTable.asMap(String.class, String.class); + Map actualData = TRL.getTrialDetails(); + + assertEquals(expectedData.get("Defendants"), actualData.get("defendantName")); + assertEquals(expectedData.get("Trial type"), actualData.get("trialType")); + assertEquals(expectedData.get("Judge"), actualData.get("judgeSelected")); + assertEquals(expectedData.get("Courtroom"), actualData.get("courtRoom")); + assertEquals(expectedData.get("Protected?"), actualData.get("trialProtection")); + } + + @Then("^I see the following information on the Juror Attendance table$") + public void iSeeTheFollowingInformationOnaJurorAttendanceTable(DataTable dataTable) { + + NAV.waitForPageLoad(3); + Map expectedData = dataTable.asMap(String.class, String.class); + Map actualData = TRL.getAttendanceDetails(); + + assertEquals(expectedData.get("Attendances"), actualData.get("jurorAttendances")); + assertEquals(expectedData.get("Absences"), actualData.get("jurorAbsences")); + } + + @Then("^I am able to see and interact with the Record attendance tabs and fields$") + public void iAmAbleToSeeAndInteractWithTheRecordAttendenceTabsAndFields() { + TRL.tabPresent("Juror number"); + TRL.tabPresent("First name"); + TRL.tabPresent("Last name"); + TRL.tabPresent("Status"); + TRL.tabPresent("Checked in"); + TRL.tabPresent("Checked out"); + TRL.tabPresent("Jurors in waiting"); + TRL.tabPresent("UNCONFIRMED"); + TRL.tabPresent("Record attendence"); + + } + + @Then("^I am able to see and interact with the Record attendance confirmation screen$") + public void iAmAbleToSeeAndInteractWithTheRecordAttendenceConfirmationText() { + TRL.tabPresent("Juror number"); + TRL.tabPresent("First name"); + TRL.tabPresent("Last name"); + TRL.tabPresent("Status"); + TRL.tabPresent("Checked in"); + TRL.tabPresent("Checked out"); + TRL.tabPresent("Jurors in waiting"); + TRL.tabPresent("CONFIRMED"); + } + + @Then("^I am able to see and interact with the change time and fields for \"([^\"]*)\"$") + public void iAmAbleToSeeAndInteractWithTheChangeTimeTabsAndFields(String name) { + TRL.tabPresent("Attendance"); + TRL.tabPresent(name); + TRL.tabPresent("Enter check in time"); + TRL.tabPresent("Enter check out time"); + } + + + @Then("^I am able to see and interact with the trial management tabs and fields$") + public void iAmAbleToSeeAndInteractWithTheTrialManagemntTabsAndFields() { + TRL.tabPresent("Juror number"); + TRL.tabPresent("First name"); + TRL.tabPresent("Last name"); + TRL.tabPresent("Status"); + TRL.tabPresent("Defendants"); + TRL.tabPresent("Trial type"); + TRL.tabPresent("Trial start date"); + TRL.tabPresent("Judge"); + TRL.tabPresent("Courtroom"); + TRL.tabPresent("Protected?"); + TRL.tabPresent("Return panel members"); + TRL.tabPresent("Print panel list"); + TRL.tabPresent("Print ballot cards"); + TRL.tabPresent("Empanel jury"); + TRL.tabPresent("End trial"); + } + + @Then("^I am able to see and interact with the trial management status and fields$") + public void iAmAbleToSeeAndInteractWithTheTrialManagemntStatusAndFields() { + TRL.tabPresent("Defendants"); + TRL.tabPresent("Trial type"); + TRL.tabPresent("Trial start date"); + TRL.tabPresent("Judge"); + TRL.tabPresent("Courtroom"); + TRL.tabPresent("Protected?"); + TRL.tabPresent("Active"); + TRL.tabPresent("Trial Number"); + } + + @Then("^I should see the attendance Pool time present is \"([^\"]*)\"$") + public void iShouldSeeTheAttendancePoolTimePresent(String attendTime) { + final String actualAttendanceTime = TRL.getNewAttendanceTime(); + assertEquals(attendTime, actualAttendanceTime); + } + + @When("^I enter a date \"([^\"]*)\" mondays in the future for the next due at court$") + public void enterNextDueCourtDateMondaysInFuture(Integer mondays) { + TRL.enterNextDueAtCourt(StepDef_jurorpool.mondayWeeksInFuture(mondays)); + } + + @When("^I check the failed to attend checkbox$") + public void checkFailedToAttendCheckBox() { + TRL.checkFailedToAttendBox(); + } + + @When("^I do not see failed to attend radio button in the update juror record section$") + public void doNotseeFailedToAttendOption() { + TRL.failedToAttendRadioButtonNotOnScreen(); + } + + @When("^I input juror \"([^\"]*)\" to be checked in$") + public void checkInJuror(String checkIn) { + TRL.jurorCheckIn(checkIn); + } + + @When("^I input juror \"([^\"]*)\" to be checked out$") + public void checkOutJuror(String checkIn) { + TRL.jurorCheckOut(checkIn); + } + + @When("^I set \"([^\"]*)\" \"([^\"]*)\" to \"([^\"]*)\"$") + public void set_Checkoutvalue_to(String arg1 ,String arg2, String arg3) throws Throwable { + + TRL.setRecordAttendnceChangeTimeTextbox(arg2,arg3); + + } + + @When("^I select the checkout radio button to \"([^\"]*)\"$") + public void selectCheckOutRadioButton(String arg) throws Throwable { + try{ + TRL.click_CheckoutRadioButton(arg); + } catch (Throwable e) { + NAV.waitForPageLoad(); + TRL.click_CheckoutRadioButton(arg); + } + }; + + @When("^I click on the \"(.*)\" from the search results") + public void click_TrialNumber(String arg1) throws Throwable { + + try{ + TRL.clickActiveTrialNumber(arg1); + return; + } catch (Exception e) {} + TRL.clickActiveTrialNumber(arg1); + + } + } diff --git a/src/test/java/cucumber/testRunner/Database/TestRunner_INT_Database.java b/src/test/java/cucumber/testRunner/Database/TestRunner_INT_Database.java new file mode 100644 index 00000000..acb7c4e1 --- /dev/null +++ b/src/test/java/cucumber/testRunner/Database/TestRunner_INT_Database.java @@ -0,0 +1,27 @@ +package cucumber.testRunner.Database; + +import io.cucumber.junit.Cucumber; +import org.junit.runner.RunWith; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; + +@RunWith(Cucumber.class) +@CucumberOptions( + plugin = { + "pretty", + "html:target/CaseStatusTests/html/", + "json:target/CaseStatusTests/Regression.json" + }, + features = {"src/test/resources/cucumber/features"}, + tags = { + "@DB_GATEWAY_Basic" + }, + glue = { + "cucumber.steps" + } +) + +public class TestRunner_INT_Database { + +} + diff --git a/src/test/java/cucumber/testRunner/TestRunner_ALL_DryRun.java b/src/test/java/cucumber/testRunner/TestRunner_ALL_DryRun.java new file mode 100644 index 00000000..9ea3297e --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_ALL_DryRun.java @@ -0,0 +1,26 @@ +package cucumber.testRunner; + +import io.cucumber.junit.Cucumber; +import org.junit.runner.RunWith; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; + +@RunWith(Cucumber.class) +@CucumberOptions( + dryRun = true, + features = "src/test/resources/cucumber/features", + tags = { + "~@ATOL" + }, + plugin = { + "pretty", + "json:target/TestRunner_ALL_DryRun/cucumber.json", + "html:target/TestRunner_ALL_DryRun/cucumber.html" + }, + glue = { + "cucumber.steps" + } +) +public class TestRunner_ALL_DryRun { + +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_Expenses.java b/src/test/java/cucumber/testRunner/TestRunner_Expenses.java new file mode 100644 index 00000000..065465fb --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_Expenses.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 5, + runLevel = CourgetteRunLevel.SCENARIO, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@expenses" + }, + plugin = { + "pretty", + "json:target/TestRunner_Expenses/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_Expenses { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_Features.java b/src/test/java/cucumber/testRunner/TestRunner_Features.java new file mode 100644 index 00000000..02ec14ef --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_Features.java @@ -0,0 +1,32 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 1, + runLevel = CourgetteRunLevel.FEATURE, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@Features" + }, + plugin = { + "pretty", + "json:target/TestRunner_Features/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_Features { +} + \ No newline at end of file diff --git a/src/test/java/cucumber/testRunner/TestRunner_JurorTransformation.java b/src/test/java/cucumber/testRunner/TestRunner_JurorTransformation.java new file mode 100644 index 00000000..65d24adc --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_JurorTransformation.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 1, + runLevel = CourgetteRunLevel.FEATURE, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@JurorTransformation" + }, + plugin = { + "pretty", + "json:target/TestRunner_JurorTransformation/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_JurorTransformation { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_JurorTransformationMulti.java b/src/test/java/cucumber/testRunner/TestRunner_JurorTransformationMulti.java new file mode 100644 index 00000000..3bd1e921 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_JurorTransformationMulti.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 6, + runLevel = CourgetteRunLevel.SCENARIO, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@JurorTransformationMulti" + }, + plugin = { + "pretty", + "json:target/TestRunner_JurorTransformationMulti/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_JurorTransformationMulti { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_JurorTransformationWIP.java b/src/test/java/cucumber/testRunner/TestRunner_JurorTransformationWIP.java new file mode 100644 index 00000000..cf531d36 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_JurorTransformationWIP.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 1, + runLevel = CourgetteRunLevel.FEATURE, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@JurorTransformationWIP" + }, + plugin = { + "pretty", + "json:target/TestRunner_JurorTransformationWIP/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_JurorTransformationWIP { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_NewSchemaConverted.java b/src/test/java/cucumber/testRunner/TestRunner_NewSchemaConverted.java new file mode 100644 index 00000000..ecaf5106 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_NewSchemaConverted.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import courgette.api.junit.Courgette; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 6, + runLevel = CourgetteRunLevel.SCENARIO, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@NewSchemaConverted" + }, + plugin = { + "pretty", + "json:target/TestRunner_NewSchemaConverted/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_NewSchemaConverted { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_Regression.java b/src/test/java/cucumber/testRunner/TestRunner_Regression.java new file mode 100644 index 00000000..9e3c7d21 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_Regression.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 6, + runLevel = CourgetteRunLevel.FEATURE, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@Regression" + }, + plugin = { + "pretty", + "json:target/TestRunner_Regression/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_Regression { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_RegressionSingle.java b/src/test/java/cucumber/testRunner/TestRunner_RegressionSingle.java new file mode 100644 index 00000000..1bed73f7 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_RegressionSingle.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 1, + runLevel = CourgetteRunLevel.FEATURE, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@RegressionSingle" + }, + plugin = { + "pretty", + "json:target/TestRunner_RegressionSingle/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_RegressionSingle { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_RegressionWelsh.java b/src/test/java/cucumber/testRunner/TestRunner_RegressionWelsh.java new file mode 100644 index 00000000..23ee4c11 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_RegressionWelsh.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 6, + runLevel = CourgetteRunLevel.FEATURE, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@RegressionWelsh" + }, + plugin = { + "pretty", + "json:target/TestRunner_RegressionWelsh/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_RegressionWelsh { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_Shakedown.java b/src/test/java/cucumber/testRunner/TestRunner_Shakedown.java new file mode 100644 index 00000000..3b1d101a --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_Shakedown.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 1, + runLevel = CourgetteRunLevel.FEATURE, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@Shakedown" + }, + plugin = { + "pretty", + "json:target/TestRunner_Shakedown/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_Shakedown { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_SmokeTest.java b/src/test/java/cucumber/testRunner/TestRunner_SmokeTest.java new file mode 100644 index 00000000..33eeab89 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_SmokeTest.java @@ -0,0 +1,31 @@ +package cucumber.testRunner; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 5, + runLevel = CourgetteRunLevel.SCENARIO, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@SmokeTest" + }, + plugin = { + "pretty", + "json:target/TestRunner_SmokeTest/cucumber.json" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_SmokeTest { +} diff --git a/src/test/java/cucumber/testRunner/TestRunner_StepGenerator.java b/src/test/java/cucumber/testRunner/TestRunner_StepGenerator.java new file mode 100644 index 00000000..6c80cab6 --- /dev/null +++ b/src/test/java/cucumber/testRunner/TestRunner_StepGenerator.java @@ -0,0 +1,27 @@ +package cucumber.testRunner; + +import io.cucumber.junit.Cucumber; +import org.junit.runner.RunWith; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; + +@RunWith(Cucumber.class) +@CucumberOptions( + plugin = { + "pretty", + "html:target/CaseStatusTests/html/", + "json:target/CaseStatusTests/Regression.json" + }, + features = {"src/test/resources/cucumber/features"}, + tags = { + "@stepGenerator" + }, + glue = { + "cucumber.steps" + } +) + +public class TestRunner_StepGenerator { + +} + diff --git a/src/test/java/cucumber/testRunner/aSampleTestRunner.java b/src/test/java/cucumber/testRunner/aSampleTestRunner.java new file mode 100644 index 00000000..a65637f9 --- /dev/null +++ b/src/test/java/cucumber/testRunner/aSampleTestRunner.java @@ -0,0 +1,27 @@ +package cucumber.testRunner; + +import io.cucumber.junit.Cucumber; +import org.junit.runner.RunWith; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; + +@RunWith(Cucumber.class) +@CucumberOptions( + plugin = { + "pretty", + "html:target/CaseStatusTests/html/", + "json:target/CaseStatusTests/Regression.json" + }, + features = {"src/test/resources/cucumber/features"}, + tags = { + "@ostest" + }, + glue = { + "cucumber.steps" + } +) + +public class aSampleTestRunner { + +} + diff --git a/src/test/java/cucumber/testRunner/admin/TestRunner_INT_Features_ADMIN.java b/src/test/java/cucumber/testRunner/admin/TestRunner_INT_Features_ADMIN.java new file mode 100644 index 00000000..88e37b0c --- /dev/null +++ b/src/test/java/cucumber/testRunner/admin/TestRunner_INT_Features_ADMIN.java @@ -0,0 +1,31 @@ +package cucumber.testRunner.admin; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; + +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 8, + runLevel = CourgetteRunLevel.SCENARIO, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = "@ADMIN_Features", + plugin = { + "pretty", + "json:target/TestRunner_INT_Features_ADMIN/cucumber.json", + "html:target/TestRunner_INT_Features_ADMIN/cucumber.html" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_INT_Features_ADMIN { +} diff --git a/src/test/java/cucumber/testRunner/admin/TestRunner_INT_Regression_ADMIN.java b/src/test/java/cucumber/testRunner/admin/TestRunner_INT_Regression_ADMIN.java new file mode 100644 index 00000000..648cbb10 --- /dev/null +++ b/src/test/java/cucumber/testRunner/admin/TestRunner_INT_Regression_ADMIN.java @@ -0,0 +1,32 @@ +package cucumber.testRunner.admin; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 6, + runLevel = CourgetteRunLevel.SCENARIO, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@ADMIN_Regression" + }, + plugin = { + "pretty", + "json:target/TestRunner_INT_Regression_ADMIN/cucumber.json", + "html:target/TestRunner_INT_Regression_ADMIN/cucumber.html" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_INT_Regression_ADMIN { +} diff --git a/src/test/java/cucumber/testRunner/admin/TestRunner_INT_SmokeTest_ADMIN.java b/src/test/java/cucumber/testRunner/admin/TestRunner_INT_SmokeTest_ADMIN.java new file mode 100644 index 00000000..6e155166 --- /dev/null +++ b/src/test/java/cucumber/testRunner/admin/TestRunner_INT_SmokeTest_ADMIN.java @@ -0,0 +1,32 @@ +package cucumber.testRunner.admin; + + +import courgette.api.CourgetteOptions; +import courgette.api.CourgetteRunLevel; +import courgette.api.junit.Courgette; +import courgette.api.CourgetteTestOutput; +import courgette.api.CucumberOptions; +import org.junit.runner.RunWith; + +@RunWith(Courgette.class) +@CourgetteOptions( + threads = 5, + runLevel = CourgetteRunLevel.SCENARIO, + rerunFailedScenarios = true, + testOutput = CourgetteTestOutput.CONSOLE, + cucumberOptions = @CucumberOptions( + features = "src/test/resources/cucumber/features", + tags = { + "@SmokeTest_INT_Admin" + }, + plugin = { + "pretty", + "json:target/TestRunner_INT_SmokeTest_Admin/cucumber.json", + "html:target/TestRunner_INT_SmokeTest_Admin/cucumber.html" + }, + glue = { + "cucumber.steps" + } + )) +public class TestRunner_INT_SmokeTest_ADMIN { +} diff --git a/src/test/resources/cucumber/features/9_Week_Comms_StraightThrough.feature b/src/test/resources/cucumber/features/9_Week_Comms_StraightThrough.feature new file mode 100644 index 00000000..c6a6e63d --- /dev/null +++ b/src/test/resources/cucumber/features/9_Week_Comms_StraightThrough.feature @@ -0,0 +1,3039 @@ +Feature: 9_Week_Comms_StraightThrough + +@comms +Scenario Outline: 1st Party English ST, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500438 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Responded" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated +# Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT |CH1 2AN |osman.salah@cgi.com | + +@comms +Scenario Outline: 1st Party English ST, 3 weeks in advance, PNC fail + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500543 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "F" + And "" has "PHOENIX_CHECKED" as "C" + + #record is auto disqualified + And "" has "DATE_DISQ" as "01-JUL-19" + And "" has "DISQ_CODE" as "E" + And "" has "STATUS" as "6" + And "" has "NEXT_DATE" as "" + + #conf letter generated + Given a disqualified letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500543 |415181001 |LNAMEFIVEFOURTHREE |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party English ST, 4 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500586 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party Welsh straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Responded" on the page +# Then I see "Summoned" on the page +# +# #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated +# Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |osman.salah@cgi.com | + +@comms +Scenario Outline: 1st Party English ST, 3 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500654 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500654 |415181001 |LNAMESIXFIVEFOUR |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party English ST, 2 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500057 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500057 |415181001 |LNAMEFIVESEVEN |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party English ST, 2 weeks in advance, PNC fail + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500065 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC FAIL) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500065 |415181001 |LNAMESIXFIVE |CH1 2AN |e@mail.com| + +@comms +Scenario Outline: 1st Party English ST, 1 week in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + And I see "Send to court" on the page + + #Check email and SMS as well as Notifications + + #Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + #Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + #Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500833 |415181001 |LNAMEEIGHTTHREETHREE |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party English ST, 1 day in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500514 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 days time" + And "" has "NEXT_DATE" as "1 days time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC N/A) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500514 |415181001 |LNAMEFIVEONEFOUR |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh ST, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party Welsh straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Responded" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated +# Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |osman.salah@cgi.com | + +@comms +Scenario Outline: 1st Party Welsh ST, 4 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700112 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" +# And I have submitted a first party Welsh straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh ST, 3 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700142 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party Welsh straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700142 |457170401 |LNAMEONEFOURTWO |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh ST, 2 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party Welsh straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700174 |457170401 |LNAMEONESEVENFOUR |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh ST, 1 week in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700937 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party Welsh straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC PASS) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700937 |457170401 |LNAMENINETHREESEVEN |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh ST, 1 day in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501931 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 days time" + And "" has "NEXT_DATE" as "1 days time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party Welsh straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC N/A) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501931 |415181001 |LNAME1931 |CH1 2AN |e@mail.com | + + @comms +Scenario Outline: 1st Party Deferral accepted, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500528 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated + Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500528 |415181001 |LNAMEFIVETWOEIGHT |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500533 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #def denied and conformation letter generated +# Given a confirmation letter is generated for juror "" +# Given a deferral denied letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500533 |415181001 |LNAMEFIVETHREETHREE |CH1 2AN |osman.salah@cgi.com | + +@comms +Scenario Outline: 1st Party Deferral accepted, 4 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500558 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated + Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500558 |415181001 |LNAMEFIVEFIVEEIGHT |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral refused, 4 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500580 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500580 |415181001 |LNAMEFIVEEIGHTZERO |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral accepted, 3 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500614 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated + Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500614 |415181001 |LNAMESIXONEFOUR |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral refused, 3 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500627 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500627 |415181001 |LNAMESIXTWOSEVEN |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral accepted, 2 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500657 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated + Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500657 |415181001 |LNAMESIXFIVESEVEN |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral refused, 2 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500674 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500674 |415181001 |LNAMESIXSEVENFOUR |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral accepted, 1 week in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500779 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500779 |415181001 |LNAMESEVENSEVENNINE |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Deferral refused, 1 week in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500790 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500790 |415181001 |LNAMESEVENNINEZERO |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal accepted, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500795 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated + Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500795 |415181001 |LNAMESEVENNINEFIVE |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500827 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500827 |415181001 |LNAMEEIGHTTWOSEVEN |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal accepted, 4 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500520 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated + Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500520 |415181001 |LNAMEFIVETWOZERO |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal refused, 4 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC PASS) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500701 |415181001 |LNAMESEVENZEROONE |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal accepted, 3 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |741500473 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated + Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500473 |415181001 |LNAMEFOURSEVENTHREE |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal refused, 3 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841500029 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841500029 |415181001 |LNAME29 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal accepted, 2 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841500034 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated + Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841500034 |415181001 |LNAME34 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal refused, 2 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841500038 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841500038 |415181001 |LNAME38 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal accepted, 1 week in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501637 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC PASS) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501637 |415181001 |LNAME1637 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Excusal refused, 1 week in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501641 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC PASS) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501641 |415181001 |LNAME1641 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Disqualify, 5 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501651 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Then I see "You have completed your reply" on the page + Then I see "If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you." on the page + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + Then I see "Download a copy of your summons reply" on the page + Then I see "What happens next" on the page + Then I see "We'll now check your answers. Your answers might mean that you are not able to do jury service." on the page + Then I see "We'll write to you in the next 7 days to let you know if you are able to do jury service." on the page + Then I see "If you can do jury service, at least 2 weeks before it starts we’ll send you:" on the page + Then I see "a letter confirming the date of your jury service" on the page + Then I see "an information pack about being a juror and the court you're going to" on the page + Then I see "Get ready for your jury service" on the page + Then I see "The information below is also in the email that we have sent you." on the page + Then I see "You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch." on the page + Then I see "Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses." on the page + Then I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + Then I see "What did you think of this service? (Takes 30 seconds)" on the page + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Disqualified" from Process reply + When I set the radio button to "M - Suffering From a Mental Disorder" + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #disqualify letter generated + Given a disqualified letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501651 |415181001 |LNAME1651 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Ineligible, 2 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501672 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC N/A) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501672 |415181001 |LNAME1672 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Ineligible, 1 week in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501673 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC N/A) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501673 |415181001 |LNAME1673 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 3rd Party Deceased, 5 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645100496 |451170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party English deceased response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then "Record status" is "Excused" + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645100496 |451170401 |DOE |SW1H 9AJ |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh Deceased, 5 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700230 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party Welsh deceased response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a third party English deceased response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then "Record status" is "Excused" + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700230 |457170401 |LNAMETWOTHREEZERO |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 3rd Party Deceased, 2 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501691 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + And I see "Urgent" on the page + + #DB checks (Do PNC N/A) + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501691 |415181001 |LNAME1691 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Ineligible, 1 week in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a third party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + And I see "Send to court" on the page + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501692 |415181001 |LNAME1692 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party English Age Disqualified, 5 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501936 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English underage response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then "Record status" is "Disqualified" + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501936 |415181001 |LNAME1936 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 3rd Party English Age Disqualified, 5 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501948 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party English overage response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #DB checks (Do PNC N/A) +# +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501948 |415181001 |LNAME1948 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh Age Disqualified, 5 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501955 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party Welsh underage response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English underage response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then "Record status" is "Disqualified" + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501955 |415181001 |LNAME1955 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh Age Disqualified, 5 weeks in advance, PNC n/a + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841501948 |415181001 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party Welsh overage response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a third party English overage response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|841501963 |415181001 |LNAME1963 |CH1 2AN |e@mail.com | + +@comms +Scenario Outline: 1st Party Postponement, 5 weeks in advance, PNC pass, creation_date=(SYSDATE-1) + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |641500490 |415170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated + Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|641500490 |415170401 |DOE |SW1H 9AJ |e@mail.com | + +@comms +Scenario Outline: 1st Party Postponement, 5 weeks in advance, PNC pass, creation_date=(SYSDATE-3) + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |644200857 |442170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated + Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|644200857 |442170401 |LNAMEEIGHTFIVESEVEN |NN1 3HQ |e@mail.com | + +@comms +Scenario Outline: 1st Party Postponement, 5 weeks in advance, PNC pass, creation_date=(SYSDATE-4) + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |644200858 |442170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated + Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|644200858 |442170401 |L'NAMEEIGHTFIV-EIGHT |NN1 3HQ |e@mail.com | + + +@comm +Scenario Outline: 1st Party paper response with no email, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |644200896 |442170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "RESPONDED" as "Y" + And "" has "STATUS" as "2" + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|644200896 |442170401 |DOE |NN1 3HQ |e@mail.com | + +@comm +Scenario Outline: 1st Party paper response with email, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |644200960 |442170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "RESPONDED" as "Y" + And "" has "STATUS" as "2" + And "" has "H_EMAIL" as "e@mail.com" + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|644200960 |442170401 |DOE |NN1 3HQ |e@mail.com | + +@comms +Scenario Outline: 1st Party English ST, 5 weeks in advance, PNC pass, invalid email + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |644200977 |442170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Responded" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|644200977 |442170401 |LNAMENINESEVENSEVEN |NN1 3HQ |blahdiblah@cgi.com | + +@comms +Scenario Outline: English 3rd Party Straight Through, 2 weeks in advance, PNC pass, juror's email selected as contact + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I see "Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday." on the page + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "somebody@cgi.com" + And I set "Enter your email address again" to "somebody@cgi.com" + And I press the "Continue" button + + Then I see "Why are you replying for the other person?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1977" + And I press the "Continue" button + + #Contacting the juror + + When I see "Juror Details" on the page + And I see "Please give phone numbers that we can use to call you or the juror between 9am and 5pm, Monday to Friday." on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Give a different email address for the juror" + And I set "Enter email address" to "e@mail.com" + And I set "Enter the email address again" to "e@mail.com" + + And I press the "Continue" button + Then I see "Your answers in this section might mean the person cannot do jury service. But even if you think they cannot, we still need you to fill in the rest of the online form. We need the rest of the information you give us so we can be sure whether the person can do jury service or not." on the page + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #The person can attend + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #process in bureau digital + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +Examples: + | part_no |last_name |postcode | email |pool_no | + |644200953 |LNAMENINEFIVETHREE |NN1 3HQ |email@outlook.com|442170401| + +@comms @DBTESTA +Scenario Outline: 3rd Party English ST, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + + And I have submitted a third party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|641500778 |415170401 |DOE |SW1H 9AJ |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh ST, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" +# And "" has "READ_ONLY" as "Y" +# And I have submitted a third party Welsh straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a third party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700478 |457170401 |LNAMEFOURSEVENEIGHT |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh Excusal accepted, 5 weeks in advance, PNC pass + Given I am on the welsh version of "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700291 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party Welsh excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English excusal response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated +# Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700291 |457170401 |LNAMETWONINEONE |SA1 4PF |osman.salah@cgi.com | + +@comms +Scenario Outline: 3rd Party English Excusal accepted, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |644200976 |442170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|644200976 |442170401 |LNAMENINESEVENSIX |NN1 3HQ |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh Excusal accepted, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700183 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party Welsh excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a third party English excusal response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700183 |457170401 |LNAMEONEEIGHTTHREE |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh Deferral accepted, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" +# And I have submitted a first party Welsh deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated +# Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700195 |457170401 |LNAMEONENINEFIVE |SA1 4PF |osman.salah@cgi.com | + +@comms +Scenario Outline: 3rd Party English Deferral accepted, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |641500631 |415170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated + Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|641500631 |415170401 |DOE |SW1H 9AJ |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh Deferral accepted, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700247 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party Welsh deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated + Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700247 |457170401 |LNAMETWOFOURSEVEN |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh Excusal refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700261 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" +# And I have submitted a first party Welsh excusal response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + #process in Bureau as Refuse Excuse + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700261 |457170401 |LNAMETWOSIXONE |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 3rd Party Excusal refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a third party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Refuse Excuse + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|641500786 |415170401 |DOE |SW1H 9AJ |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh Excusal refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700185 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" +# And I have submitted a third party Welsh excusal response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a third party English excusal response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + #process in Bureau as Refuse Excuse + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700185 |457170401 |LNAMEONEEIGHTFIVE |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh Deferral refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700237 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" +# And I have submitted a first party Welsh deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #def denied and conformation letter generated + Given a confirmation letter is generated for juror "" + Given a deferral denied letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700237 |457170401 |LNAMETWOTHREESEVEN |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 3rd Party Deferral refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" + And I have submitted a third party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #def denied and conformation letter generated + Given a confirmation letter is generated for juror "" + Given a deferral denied letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645200891 |452170401 |LNAMEEIGHTNINEONE |SY2 6LU |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh Deferral refused, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700246 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "3 mondays time" + And "" has "NEXT_DATE" as "3 mondays time" +# And I have submitted a third party Welsh deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a third party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #def denied and conformation letter generated + Given a confirmation letter is generated for juror "" + Given a deferral denied letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700246 |457170401 |LNAMETWOFOURSIX |SY2 6LU |e@mail.com | + +@comms +Scenario Outline: 3rd Party Welsh Postponement, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700260 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a third party Welsh ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a third party English ineligibilty response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated + Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700260 |457170401 |LNAMETWOSIXZERO |SA1 4PF |e@mail.com | + +@comms +Scenario Outline: 1st Party Welsh Postponement, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |645700786 |457170401 |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party Welsh ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English ineligibilty response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated + Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700786 |457170401 |LNAMESEVENEIGHTSIX |SA1 4PF |e@mail.com | + + +@comms +Scenario Outline: 3rd Party Postponement, 5 weeks in advance, PNC pass + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And "" has "READ_ONLY" as "Y" + And I have submitted a third party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# Given I am on "Bureau" "juror-test01" +# And I log in as "SYSTEM" +# +# When I click on the "Search" link +# And I set "Juror number" to "" +# And I press the "Search" button +# And I click on "" in the same row as "" +# Then I see "Summoned" on the page +# +# When I select "Deferral" from Process reply +# And I set the radio button to "Accept deferral" +# Then I see "Defer until" on the page +# +# When I set "Defer until" to "{7 mondays time}" +# And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown +# And I press the "Mark as completed" button +# Then I see "Completed" on the page +# +# #DB checks (Do PNC PASS) +# And "" has "POLICE_CHECK" as "P" +# And "" has "PHOENIX_CHECKED" as "C" +# +# #postponse letter generated +# Given a postponement letter is generated for juror "" +# +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645100592 |451170401 |DOE |SW1H 9AJ |e@mail.com | diff --git a/src/test/resources/cucumber/features/Bureau_Edit_MHQs_Over2k.feature b/src/test/resources/cucumber/features/Bureau_Edit_MHQs_Over2k.feature new file mode 100644 index 00000000..fe794874 --- /dev/null +++ b/src/test/resources/cucumber/features/Bureau_Edit_MHQs_Over2k.feature @@ -0,0 +1,156 @@ +Feature: Bureau_Edit_MHQs_Over2k + +# Test commented out as Bureau edit buttons are disabled +#@Regression @JDB-3567 +Scenario Outline: Bureau User Edits a Response Where MHQ1 and MHQ2 Are 2000 chars + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "Address4" as "LONDON" + And "" has "ZIP" as "" + + #start now + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + #log on + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "" + When I set "Enter your email address again" to "" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #bail + Then I see "Are you currently on bail" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #criminal offence + + Then I see "Have you been found guilty of a criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + + #MHQ1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. O" + And I press the "Continue" button + + #MHQ2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + And I press the "Continue" button + + #confirm date of service + + Then I see "Check your start date" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + #confirmation + + Then I see "You have completed your reply" on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. O" on the page + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + + And I click on the "Change" link + + And I click on the "save" link + + Then I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. O" on the page + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + And I do not see "Please ensure that your reason is not too long" on the page + +Examples: + |part_no |pool_no |last_name |postcode | email | + |644200939 |442170401 |LNAMENINETHREENINE |NN1 3HQ |e@eeee.com| diff --git a/src/test/resources/cucumber/features/Bureau_Note_2000Char_Error.feature b/src/test/resources/cucumber/features/Bureau_Note_2000Char_Error.feature new file mode 100644 index 00000000..0ae01a8f --- /dev/null +++ b/src/test/resources/cucumber/features/Bureau_Note_2000Char_Error.feature @@ -0,0 +1,40 @@ +Feature: Bureau_Note_2000Char_Error + +#this script is failing because it is basically moving too quickly for the app. Jorge is going to help resolve this + +@Regression @JDB-3684 +Scenario Outline: Exceed 2000 characters in Bureau notes and check new error message has been implemented + + Given I am on "Bureau" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And auto straight through processing has been enabled + + Given I have submitted a first party English straight through response + | part_no |pool_number | last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + When I click on "" in the same row as "" + Then I see "Responded" on the page + + When I click on the "Logs" link + And I click on the "Notes" link + And I click on the "Add or Edit" link + And I set text area with "id" of "notes" to "112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567891123456789112345678911234567890" + And I press the "Save" button + And I see "Notes" on the page + Then I see "Notes must be 2000 characters or fewer" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email |date | + |641500913 |415170601 |LNAMENINEONETHREE |CH1 2AN |email@outlook.com |4 mondays time | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Bureau_Search_Invalid_Input.feature b/src/test/resources/cucumber/features/Bureau_Search_Invalid_Input.feature new file mode 100644 index 00000000..195c7d57 --- /dev/null +++ b/src/test/resources/cucumber/features/Bureau_Search_Invalid_Input.feature @@ -0,0 +1,37 @@ +Feature: Bureau_Search_Invalid_Input + +@Regression @JDB-3458 +Scenario Outline: Bureau Search with Invalid Input + + #log in and navigate to search + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + + #try to enter ... in juror number + + And I set "Juror number" to "..." + Then "Juror number" is "" + + #try to enter !!! in juror number + + And I set "Juror number" to "!!!" + Then "Juror number" is "" + + #try to enter aaa in juror number + + And I set "Juror number" to "aaa" + Then "Juror number" is "" + + #enter 111 in juror number + + And I set "Juror number" to "111" + Then "Juror number" is "111" + + And I press the "Search" button + Then I see "0 results for “111”" on the page + + Examples: + |part_no |pool_no |last_name |postcode | email | + |644200435 |442170401 |LNAMEFOURTHREEFIVE |NN1 3HQ |e@eeee.com| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Confirm_DoB_ErrorValidation.feature b/src/test/resources/cucumber/features/Confirm_DoB_ErrorValidation.feature new file mode 100644 index 00000000..bf5b3a0c --- /dev/null +++ b/src/test/resources/cucumber/features/Confirm_DoB_ErrorValidation.feature @@ -0,0 +1,72 @@ +Feature: Mod_252 + +@Modernisation +Scenario Outline: Confirm_DoB_ErrorValidation + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + | | |400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + #Moving past Name Section + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #On DoB Screen + + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "2005" + + #Moving past DoB Section + + And I press the "Continue" button + Then I see "Is your date of birth correct?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "" + And I press the "Continue" button + Then I see "There is a problem" on the page + Then I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500106 |DOE |SW1H 9AJ |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/English_1st_1000_CharGuidance.feature b/src/test/resources/cucumber/features/English_1st_1000_CharGuidance.feature new file mode 100644 index 00000000..63510f9b --- /dev/null +++ b/src/test/resources/cucumber/features/English_1st_1000_CharGuidance.feature @@ -0,0 +1,194 @@ +Feature: English_1st_1000_CharGuidance + +@Regression @JDB-3618 @JDB-3620 @JDB-3621 @JDB-3622 @JDB-3623 @JDB-3624 @JDB-3625 @JDB-3626 @JDB-3627 @JDB-3628 @JDB-3653 +Scenario Outline: English 1st Party - Character count warning should be on all applicable pages + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And the page title is "Are you replying for yourself or for someone else? - Reply to a jury summons - GOV.UK" + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + #Check name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + + #Check address + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email details + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency JDB-3620 + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "No" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "Not a resident" + And I press the "Continue" button + + #CJS no JDB-3625 + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "Yes" + And I check the "Other" checkbox + And I see "You have 1,000 characters remaining" on the page + And I set "Which other part of the Criminal Justice System?" to "Other CJS part" + And I press the "Continue" button + + #Bail JDB-3623 + + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "I am bailed" + And I press the "Continue" button + + #Convictions JDB-3624 + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "I am convicted" + And I press the "Continue" button + + #Mental health part 1 JDB-3621 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "I am sectioned" + And I press the "Continue" button + + #Mental health part 2 JDB-3622 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide brief details about why it was decided you lack mental capacity" to "I lack capacity" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no JDB-3627 and JDB-3628 + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Tell us about any special arrangements or help you need while you're doing jury service." to "Wheelchair user" + When I check the "Other" checkbox + And I set "Provide details" to "Other RA stuff" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + + And I see "No, I need to change the date" on the page + And I set the radio button to "No, I need to change the date" + And I press the "Continue" button + Then I see "Tell us why you need another date for your jury service" on the page + + #Deferral Reason JDB-3626 + + When I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "Defer me please" + And I press the "Continue" button + Then I see "Choose 3 Mondays when you can start jury service" on the page + + #Deferral Dates + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #confirm + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + Then I see "Why do you need to be excused from jury service?" on the page + + #Excusal Reason JDB-3618 + + When I see "You have 1,000 characters remaining" on the page + And I see "Explain why you cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before your summons deadline." on the page + And I see "We'll contact you later if we need this." on the page + And I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + | part_no |last_name |postcode |email |pool_no | + |641500022 |DOE |SW1H 9AJ |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/English_1st_ConfirmDateBackLink.feature b/src/test/resources/cucumber/features/English_1st_ConfirmDateBackLink.feature new file mode 100644 index 00000000..1f7f0d46 --- /dev/null +++ b/src/test/resources/cucumber/features/English_1st_ConfirmDateBackLink.feature @@ -0,0 +1,309 @@ +Feature: 1st English Confirm Date of Service Back Link + +@Regression @JDB-3442 +Scenario Outline: Checking there is a back link on the Confirm date of jury service screen + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Check Name + + Then I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + Then I see "Enter your first name" on the page + Then I see "Enter your last name" on the page + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I click on the "Back" link + Then I see "FirstNamea" on the page + And I see "LastNameb" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Check Address + + Then I set "Address line 1" to "" + And I set "Town or city" to "" + And I set "County (optional)" to "" + And I set "Postcode" to "" + And I press the "Continue" button + + Then I see "Provide the town or city you live in" on the page + + Then I see "Enter your postcode" on the page + When I set "Address line 1" to "123 Street" + And I set "Address line 2 (optional)" to "Line 2" + And I set "Address line 3 (optional)" to "Line 3" + And I set "Town or city" to "London" + And I set "County (optional)" to "County" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + When I click on the "Back" link + Then I see "123 Street" on the page + And I see "London" on the page + And I see "CH1 2AN" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I press the "Continue" button + Then I see "Enter your main phone number" on the page + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + When I click on the "Back" link + Then I see "What is your phone number?" on the page + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I press the "Continue" button + Then I see "Enter your email address" on the page + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + When I click on the "Back" link + Then I see "What is your email address?" on the page + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + Then I see "Enter the day you were born" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + When I click on the "Back" link + Then I see "What is your date of birth?" on the page + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I press the "Continue" button + Then I see "Select yes if your main address has been in the UK, Channel Islands or Isle of Man for any period of at least 5 years, since you turned 13" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Provide details about where you have lived since your 13th birthday" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I click on the "Back" link + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I click on the "Back" link + And I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And the radio button "Yes" is "Selected" + And I press the "Continue" button + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I press the "Continue" button + Then I see "Select yes if you are currently on bail for a criminal offence" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide details about your bail and criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Have you been found guilty of a criminal offence?" on the page + When I click on the "Back" link + Then I see "Are you currently on bail for a criminal offence?" on the page + When I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I press the "Continue" button + Then I see "Select yes if you have been found guilty of a criminal offence" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + And I see "Provide details about your criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I click on the "Back" link + Then I see "Have you been found guilty of a criminal offence?" on the page + When I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + Then I see "Select yes if you're being detained, looked after or treated under the Mental Health Act" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide details about how you're being detained, looked after or treated under the Mental Health Act" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I click on the "Back" link + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + + #Mental Health part 2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I press the "Continue" button + Then I see "Select yes if it's been decided that you 'lack mental capacity'" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide brief details about why it was decided you lack mental capacity" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your start date" on the page + When I click on the "Back" link + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I press the "Continue" button + + Then I see "Check your start date" on the page + +Examples: + | part_no |last_name |postcode | email |pool_no | + |841500021 |LNAME21 |CH1 2AN |email@outlook.com|415181001 | + + +@Regression @JDB-3731 +Scenario Outline: No Error TypeError: Cannot read property details of undefined when clicking Back + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #change Name + + Then I set "Title (optional)" to "Prof" + Then I set "First name" to "John" + And I set "Last name" to "James" + And I press the "Continue" button + + #change address + + Then I see "Is this your address?" on the page + And I set the radio button to "No" + And I press the "Continue" button + Then I set "Address line 1" to "1" + And I set "Town or city" to "2" + And I set "Postcode" to "SW1H 9AG" + And I press the "Continue" button + + #Phone Details + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #back + + When I click on the "Back" link + Then I see "Confirm you're eligible for jury service" on the page + When I click on the "Back" link + Then I see "What is your date of birth?" on the page + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1900" + And I press the "Continue" button + Then I see "Is your date of birth correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Check your answers now" on the page + And I do not see "TypeError: Cannot read property 'details' of undefined" on the page + + Examples: + | part_no |last_name |postcode | email |pool_no | + |641500568 |DOE |SW1H 9AJ |email@outlook.com|415170401| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/English_1st_MobileNumberFocus.feature b/src/test/resources/cucumber/features/English_1st_MobileNumberFocus.feature new file mode 100644 index 00000000..ad619425 --- /dev/null +++ b/src/test/resources/cucumber/features/English_1st_MobileNumberFocus.feature @@ -0,0 +1,173 @@ +Feature: 1st_Straight Spaces in Phone number + +@JDB-2988 @JDB-3373 @RegressionSingle +Scenario Outline: +# Given I am on "Public" "juror-test02" + Given I am on "Public" "bau-test" + + Given auto straight through processing has been disabled + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + + #Moving past Name Section + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + + + #JDB-2988 + + When I set "Main phone" to "0207 8211 818" + When I set "Another phone (optional)" to "0207 1111 111" + And I press the "Continue" button + When I set "Enter your email address" to "" + When I set "Enter your email address again" to "" + And I press the "Continue" button + + #On DoB Screen + + Then I see "date of birth" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1990" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #JDB-3373 + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency JDB-3378 + + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3371 + + Then I see "Are you currently on bail for a criminal offence?" on the page + + #Bail JDB-3377 + + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #JDB-3370 + + Then I see "Have you been found guilty of a criminal offence?" on the page + + #Convictions JDB-3376 + + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned JDB-3363 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity JDB-3364 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + Then I see "0207 8211 818" on the page + And I see "0207 1111 111" on the page + + When I click on the "Change" link in the same row as "Main phone" + Then "Main phone" is "0207 8211 818" + And "Another phone (optional)" is "0207 1111 111" + + When I set "Another phone (optional)" to "0207 1111 112" + And I press the "Continue" button + When I click on the "Change" link in the same row as "Another phone (optional)" + Then "Another phone (optional)" is "0207 1111 112" + + When I press the "Continue" button + + And I check the "The information" checkbox + And I press the "Submit" button + Then I see "You have completed your reply" on the page + + Given auto straight through processing has been enabled + +# When I have completed the response for +# | part_no | +# | | +# Then I see "COMPLETED" on the page + + Given I am on "Bureau" "bau-test" + When I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + Then I see "" on the page + And I click on "" in the same row as "" + + And I press the "Process reply" button + And I click on the "Excusal" link + Then I select "D - DECEASED" from the "Reason for the excusal request" dropdown + And I set the radio button to "Accept excusal request" + And I press the "Confirm" button + And I see "Excused" on the page + And I see "COMPLETED" on the page + + Then on "JUROR" . "POOL" I see "H_PHONE" is "0207 8211 818" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "W_PHONE" is "0207 1111 112" where "PART_NO" is "" + +Examples: + |part_no |last_name |postcode | email | pool_no | + |645700360 |LNAMETHREESIXZERO |SA1 4PF |a@eeee.com | 457170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/English_1st_QualifyingPageText.feature b/src/test/resources/cucumber/features/English_1st_QualifyingPageText.feature new file mode 100644 index 00000000..4bf444a5 --- /dev/null +++ b/src/test/resources/cucumber/features/English_1st_QualifyingPageText.feature @@ -0,0 +1,138 @@ +Feature: 1st English Qualify Page Text + +@JDB-3420 @Regression +Scenario Outline: Checking page text for Eligibility page + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check Name + #JDB-4218 + #JDB-4125 + + And I set the radio button to "No" + And I press the "Continue" button + Then I see "What is your name?" on the page + + Then I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + Then I see "Enter your first name" on the page + Then I see "Enter your last name" on the page + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I click on the "Back" link + Then I see "FirstNamea" on the page + And I see "LastNameb" on the page + + #should this happen? + + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + + #Check Address + + And I set the radio button to "No" + And I press the "Continue" button + + Then I set "Address line 1" to "" + And I set "Town or city" to "" + And I set "County (optional)" to "" + And I set "Postcode" to "" + And I press the "Continue" button + + Then I see "Provide the town or city you live in" on the page + Then I see "Enter your postcode" on the page + When I set "Address line 1" to "123 Street" + And I set "Town or city" to "London" + And I set "County (optional)" to "County" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + When I click on the "Back" link + Then I see "123 Street" on the page + And I see "London" on the page + And I see "CH1 2AN" on the page + + #should this happen? + + And I set the radio button to "Yes" + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I press the "Continue" button + Then I see "Enter your main phone number" on the page + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + When I click on the "Back" link + Then I see "What is your phone number?" on the page + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I press the "Continue" button + Then I see "Enter your email address" on the page + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + When I click on the "Back" link + Then I see "What is your email address?" on the page + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + Then I see "Enter the day you were born" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + When I click on the "Back" link + Then I see "What is your date of birth?" on the page + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + And I see "Your answers in this next section will help us check if you can do jury service or not." on the page + And I see "You must answer these questions even if you:" on the page + And I see "think you’re not eligible" on the page + And I see "want to be excused" on the page + And I see "You can ask for an excusal after this section, if needed." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500610 |DOE |SW1H 9AJ |email@outlook.com |415170401 | + diff --git a/src/test/resources/cucumber/features/English_3rd_1000_CharGuidance.feature b/src/test/resources/cucumber/features/English_3rd_1000_CharGuidance.feature new file mode 100644 index 00000000..1ee69f22 --- /dev/null +++ b/src/test/resources/cucumber/features/English_3rd_1000_CharGuidance.feature @@ -0,0 +1,220 @@ +Feature: English_3rd_1000_CharGuidance + +@Regression @JDB-3634 @JDB-3618 @JDB-3620 @JDB-3621 @JDB-3622 @JDB-3623 @JDB-3624 @JDB-3625 @JDB-3626 @JDB-3627 @JDB-3628 +Scenario Outline: English 3rd Party - Character count warning should be on all applicable pages + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #JDB-3455 Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? JDB-3634 + + When I set the radio button to "Other" + And I see "You have 100 characters remaining" on the page + And I set the radio button to "The person is not here" + And I press the "Continue" button + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency JDB-3620 + + When I set the radio button to "No" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "They're not a resident" + And I press the "Continue" button + + #CJS no JDB-3625 + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "Yes" + And I check the "Other" checkbox + And I see "You have 1,000 characters remaining" on the page + And I set "Which other part of the Criminal Justice System?" to "Other CJS part" + And I press the "Continue" button + + #Bail JDB-3623 + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "They are bailed" + And I press the "Continue" button + + #Convictions JDB-3624 + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "They are convicted" + And I press the "Continue" button + + #Mental health part 1 JDB-3621 + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "They are sectioned" + And I press the "Continue" button + + #Mental health part 2 JDB-3622 + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Provide brief details about why it was decided they lack mental capacity" to "They lack capacity" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no JDB-3627 and JDB-3628 + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "Yes" + And I see "You have 1,000 characters remaining" on the page + And I set "Tell us about any special arrangements or help the person you're answering for needs while they're doing jury service." to "Wheelchair user" + When I check the "Other" checkbox + And I set "Provide details" to "Other RA stuff" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Confirm the date of their jury service" + Then I see "Check your start date" on the page + + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + Then I see "Tell us why they need another date for their jury service" on the page + + #Deferral Reason JDB-3626 + + When I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "Defer them please" + And I press the "Continue" button + Then I see "Choose 3 Mondays when they can start jury service" on the page + + #Deferral Dates + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #confirm + + Then I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Confirm the date of their jury service" + Then I see "Check your start date" on the page + + When I set the radio button to "No, they cannot do" + And I press the "Continue" button + Then I see "Why do they need to be excused from jury service?" on the page + + #Excusal Reason JDB-3618 + + When I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "Excuse them please" + + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + Then I see "We have sent an email to say you have replied to this jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500025 |DOE |SW1H 9AJ |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/English_3rd_BackLink.feature b/src/test/resources/cucumber/features/English_3rd_BackLink.feature new file mode 100644 index 00000000..ba0c2b4c --- /dev/null +++ b/src/test/resources/cucumber/features/English_3rd_BackLink.feature @@ -0,0 +1,237 @@ +Feature: English 3rd BackLink + +@Regression @JDB-1820 @JDB-3347 @JDB-3370 @JDB-4105 +Scenario Outline: Back and forward navigation all screens for 3rd Party + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + Then the radio button "I am replying for someone else" is "selected" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "What is your name?" on the page + When I click on the "Back" link + Then I see "Their juror details" on the page + When I set "9-digit juror number" to "" + And I set "Juror last name" to "" + And I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + When I click on the "Back" link + Then I see "What is your name?" on the page + Then "First name" is "FirstNameA" + Then "Last name" is "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #3rd Party Relationship + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + When I click on the "Back" link + Then I see "Your relationship to the person" on the page + Then "How do you know the person you're replying for?" is "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "0207 821 1818" + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + When I click on the "Back" link + Then I see "Your contact information" on the page + And "Main phone" is "0207 821 1818" + And "Enter your email address" is "email@outlook.com" + When I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why are you replying + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + When I click on the "Back" link + Then I see "Why are you replying for the other person?" on the page + And I see "They might be travelling, in hospital or away for more than a few days for some other reason" on the page + When I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "FNAME132" on the page + And I see "LNAME132" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + When I click on the "Back" link + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "CH1 2AN" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + When I click on the "back" link + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #Juror DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + When I click on the "back" link + Then I see "Give the date of birth for the person you're replying for" on the page + And I see "Help with date of birth" on the page + When I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Tell us how we can get in touch with the person you're replying for. Or we can use your contact information, if you're going to carry on acting for them." on the page + And I see "Give phone numbers that we can use to call you or the juror between 9am and 5pm, Monday to Friday." on the page + When I set the radio button to "Use the phone number that you have already given to contact you" + When I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + When I click on the "Back" link + Then I see "Tell us how we can get in touch with the person you're replying for. Or we can use your contact information, if you're going to carry on acting for them." on the page + When I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + + #Qualifying for service + + When I press the "Continue" button + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I click on the "Back" link + Then I see "Confirm if the person is eligible for jury service" on the page + When I press the "Continue" button + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I click on the "Back" link + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I press the "Continue" button + + #CJS + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I click on the "Back" link + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I click on the "Back" link + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I click on the "Back" link + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I press the "Continue" button + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + + #Mental Health part 1 + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I click on the "Back" link + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + + #Mental Health part 2 + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your start date" on the page + When I click on the "Back" link + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I press the "Continue" button + + #Confirm date of service + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I click on the "Back" link + Then I see "Check your start date" on the page + When I press the "Continue" button + + #RA + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + And I press the "Submit" button + + And I see "You have completed your reply" on the page + And I see "We have sent an email to say you have replied to this jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |841500132 |LNAME132 |CH1 2AN |email@outlook.com |415181001 | + diff --git a/src/test/resources/cucumber/features/English_3rd_MoreJurorDetails.feature b/src/test/resources/cucumber/features/English_3rd_MoreJurorDetails.feature new file mode 100644 index 00000000..ccb66c01 --- /dev/null +++ b/src/test/resources/cucumber/features/English_3rd_MoreJurorDetails.feature @@ -0,0 +1,112 @@ +@Regression +Feature: English_3rd_MoreJurorDetails + +@Regression @JDB-3424 @JDB-3423 @JDB-3422 +Scenario Outline: + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name JDB-3380 and JDB-3365 + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror JDB-3368 and JDB-3366 + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact JDB-3379 and JDB-3367 + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why are you replying for the person? Fails below due to ' + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + When I click on the "What happens if they have changed their name?" link + Then I see "If their name has changed we will contact them to check this. We might ask for a marriage, civil partnership or deed poll certificate." on the page + + #Check juror name JDB-3369 and JDB-3422 + + When I see "Juror Details" on the page + And I press the "Continue" button + Then I see "Is this their address?" on the page + Then I see "Will their address change soon?" on the page + Then I click on the "Will their address change soon?" link + Then I see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + Then I see "After they've moved, contact the jury central summoning bureau by calling 0300 456 1024, and give them their new address." on the page + Then I see "If they are moving away from the area where they currently live, we may change the location of their jury service." on the page + + #Check juror address JDB-3369 and JDB-3424 + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB JDB-3369 and JDB-3423 + + When I see "Juror Details" on the page + And I click on the "Help with date of birth" link + Then on the page I see + | text| + |You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury.| + |If the person does not know their exact date of birth, use the one they put on official documents like their passport or driving licence.| + |If you cannot provide a date of birth for the person, you’ll have to send us copies of identity documents through the post. You need to reply to the summons using the form we sent by post instead of online. Ring us on 0300 456 1024 if you need advice about this.| + + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror JDB-3369 + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200528 |LNAMEFIVETWOEIGHT |CH1 2AN |email@outlook.com |452170401 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/English_3rd_RelationshipToJuror.feature b/src/test/resources/cucumber/features/English_3rd_RelationshipToJuror.feature new file mode 100644 index 00000000..71c96670 --- /dev/null +++ b/src/test/resources/cucumber/features/English_3rd_RelationshipToJuror.feature @@ -0,0 +1,54 @@ +Feature: 3rd English Relationship Validation Error + +@JDB-3440 @Regression +Scenario Outline: + Given I am on "Public" "juror-test01" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I press the "Continue" button + Then I see "Enter your first name" on the page + And I see "Enter your last name" on the page + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I press the "Continue" button + Then I see "Enter your relationship to the person summoned" on the page + And I see "Enter your relationship to the person summoned" on the page + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + +Examples: + | part_no |last_name |postcode | email |pool_no | + |741500420 |LNAMEFOURTWOZERO |CH1 2AN |email@outlook.com|415181001| + diff --git a/src/test/resources/cucumber/features/JDB-1820_ChangeLinks.feature b/src/test/resources/cucumber/features/JDB-1820_ChangeLinks.feature new file mode 100644 index 00000000..7bf48908 --- /dev/null +++ b/src/test/resources/cucumber/features/JDB-1820_ChangeLinks.feature @@ -0,0 +1,225 @@ +Feature: JDB-1820 Change links + +@Regression @JDB-1820 +Scenario Outline: Testing all change links on Check your answers screen + Given I am on "Public" "bau-test" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + #Check name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + + #Check address + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email details + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency Yes + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail no + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 1 no + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 no + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + When I click on the "Change" link in the same row as "Name" + And I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see text "FirstNameA LastNameB" in the same row as "Name" + + When I click on the "Change" link in the same row as "Address" + Then I see "What is your address?" on the page + And I set "Address line 1" to "123 STREET NAME" + And I set "Town or city" to "ChangedTown" + And I press the "Continue" button + Then I see text "123 STREET NAME, ANYTOWN, ChangedTown, CH1 2AN" in the same row as "Address" + + When I click on the "Change" link in the same row as "Main phone" + Then I see "What is your phone number?" on the page + When I set "Main phone" to "0207 821 2727" + And I set "Another phone (optional)" to "0207 821 4545" + And I press the "Continue" button + Then I see text "0207 821 2727" in the same row as "Main phone" + And I see text "0207 821 4545" in the same row as "Another phone (optional)" + + When I click on the "Change" link in the same row as "Email" + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "emailchanged@outlook.com" + And I set "Enter your email address again" to "emailchanged@outlook.com" + And I press the "Continue" button + Then I see text "emailchanged@outlook.com" in the same row as "Email" + + When I click on the "Change" link in the same row as "Date of birth" + Then I see "What is your date of birth?" on the page + When I set "Day" to "18" + And I set "Month" to "09" + And I set "Year" to "1972" + And I press the "Continue" button + Then I see text "18 September 1972" in the same row as "Date of birth" + + When I click on the "Change" link in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "No" + And I set "Provide details" to "Residency information" + And I press the "Continue" button + Then I see text "No - Residency information" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + + When I click on the "Change" link in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "I am sectioned and detained" + And I press the "Continue" button + Then I see text "Yes - I am sectioned and detained" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + + When I click on the "Change" link in the same row as "Has it been decided that you 'lack mental capacity'?" + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "I lack capacity" + And I press the "Continue" button + Then I see text "Yes - I lack capacity" in the same row as "Has it been decided that you 'lack mental capacity'?" + + When I click on the "Change" link in the same row as "Are you currently on bail for a criminal offence?" + Then I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "I am on bail for crimes" + And I press the "Continue" button + Then I see text "Yes - I am on bail for crimes" in the same row as "Are you currently on bail for a criminal offence?" + + When I click on the "Change" link in the same row as "Have you been convicted of a criminal offence and been given a sentence?" + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "I am a convicted criminal" + And I press the "Continue" button + Then I see text "Yes - I am a convicted criminal" in the same row as "Have you been convicted of a criminal offence and been given a sentence?" + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + Then I see "Why do you need to be excused from jury service?" on the page + When I set text area with "id" of "excusalReason" to "Excuse me from jury service" + And I press the "Continue" button + Then I see text "Excuse me from jury service" in the same row as "Say why you need to be excused from jury service" + + When I click on the "Change" link in the same row as "Have you worked in the criminal justice system in the last 5 years?" + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police" + And I press the "Continue" button + Then I see text "London Met Police" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + When I click on the "Change" link in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your Jury Service?" + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + And I check the "Limited mobility" checkbox + And I set "Tell us about any special arrangements or help you need while you're doing jury service." to "Wheelchair user" + And I press the "Continue" button + Then I see text "Limited mobility" in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your Jury Service?" + Then I see text "Wheelchair user" in the same row as "Tell us about any special arrangements or help you need while you're doing jury service" + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + +#When I press the "Submit" button + + Then I see "We may get in touch to talk about the help you need so you can do jury service." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |741500124 |LNAMEONETWOFOUR |CH1 2AN |email@outlook.com |415180803| + diff --git a/src/test/resources/cucumber/features/JDB-1820_HappyPath.feature b/src/test/resources/cucumber/features/JDB-1820_HappyPath.feature new file mode 100644 index 00000000..c7a42c56 --- /dev/null +++ b/src/test/resources/cucumber/features/JDB-1820_HappyPath.feature @@ -0,0 +1,137 @@ +Feature: JDB-1820 - Happy Path + +@Regression @JDB-1820 +Scenario Outline: + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + Then I see "Will your address change soon?" on the page + + #JDB-4125 + + And I click on the "Will your address change soon?" link + Then I see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + Then I see "After you've moved, contact the jury central summoning bureau by calling 0300 456 1024, and give them your new address." on the page + Then I see "If you are moving away from the area where you currently live, we may change the location of your jury service." on the page + When I set the radio button to "Yes" + + #Check address + + When I press the "Continue" button + + Then I see "What is your phone number?" on the page + + #Phone details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email details + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + #DoB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency Yes + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail no + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 1 no + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 no + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + | part_no |last_name |postcode | email |pool_no | + |641500175 |LNAMETWOSIXZERO |CH1 2AN |email@outlook.com|415170401 | + diff --git a/src/test/resources/cucumber/features/JDB-1820_JurorDetails.feature b/src/test/resources/cucumber/features/JDB-1820_JurorDetails.feature new file mode 100644 index 00000000..7c0ad070 --- /dev/null +++ b/src/test/resources/cucumber/features/JDB-1820_JurorDetails.feature @@ -0,0 +1,275 @@ +Feature: JDB-1820 Juror Details + +@Regression @JDB-1820 @JDB-3347 @JDB-3442 @JDB-3443 @JDB-3638 +Scenario Outline: Back and forward navigation all screens for 1st Party + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Name + + Then I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + Then I see "Enter your first name" on the page + Then I see "Enter your last name" on the page + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I click on the "Back" link + Then I see "FirstNamea" on the page + And I see "LastNameb" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Is this your address?" on the page + + #Check Address + + When I set the radio button to "No" + When I press the "Continue" button + Then I set "Address line 1" to "" + And I set "Town or city" to "" + And I set "County (optional)" to "" + And I set "Postcode" to "" + And I press the "Continue" button + + Then I see "Provide the town or city you live in" on the page + + Then I see "Enter your postcode" on the page + When I set "Address line 1" to "123 Street" + And I set "Town or city" to "London" + And I set "County (optional)" to "County" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + Then I see "What is your phone number?" on the page + When I click on the "Back" link + Then I see "123 Street" on the page + And I see "London" on the page + And I see "CH1 2AN" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "What is your phone number?" on the page + When I click on the "Back" link + Then I see "123 Street" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I press the "Continue" button + Then I see "Enter your main phone number" on the page + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + When I click on the "Back" link + Then I see "What is your phone number?" on the page + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I press the "Continue" button + Then I see "Enter your email address" on the page + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + When I press the "Continue" button + Then I see "There is a problem" on the page + Then I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + When I click on the "Back" link + Then I see "What is your date of birth?" on the page + And I press the "Continue" button + + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I press the "Continue" button + Then I see "Select yes if your main address has been in the UK, Channel Islands or Isle of Man for any period of at least 5 years, since you turned 13" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Provide details about where you have lived since your 13th birthday" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I click on the "Back" link + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I press the "Continue" button + Then I see "Select whether you've worked in the criminal justice system in the last 5 years" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Tick any organisations you worked for directly (not as a third party or subcontractor)" on the page + When I check the "Police service" checkbox + And I check the "HM Prison Service" checkbox + And I check the "Other" checkbox + And I press the "Continue" button + Then I see "Give details of where and when you have worked for the police service" on the page + And I see "Give details of where and when you have worked for HM Prison Service" on the page + And I see "Give details of where and when you have worked for another Criminal Justice System employer" on the page + When I check the "Police service" checkbox + And I check the "HM Prison Service" checkbox + And I check the "Other" checkbox + And I set the radio button to "No" + And I press the "Continue" button + Then I see "Are you currently on bail for a criminal offence?" on the page + When I click on the "Back" link + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I press the "Continue" button + Then I see "Select yes if you are currently on bail for a criminal offence" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide details about your bail and criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Have you been found guilty of a criminal offence?" on the page + When I click on the "Back" link + Then I see "Are you currently on bail for a criminal offence?" on the page + When I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I press the "Continue" button + Then I see "Select yes if you have been found guilty of a criminal offence" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide details about your criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + Then I see "Select yes if you're being detained, looked after or treated under the Mental Health Act" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide details about how you're being detained, looked after or treated under the Mental Health Act" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I click on the "Back" link + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + + #Mental Health part 2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I press the "Continue" button + Then I see "Select yes if it's been decided that you 'lack mental capacity'" on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide brief details about why it was decided you lack mental capacity" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your start date" on the page + When I click on the "Back" link + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I press the "Continue" button + + #JDB-3442 Back link on confirm date page + + Then I see "Check your start date" on the page + When I click on the "Back" link + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I press the "Continue" button + + #Confirm date of service + + Then I see "Check your start date" on the page + When I press the "Continue" button + And I see "Select whether you can start jury service on this date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + Then I see "Will you need help when you're at the court?" on the page + When I click on the "Back" link + Then I see "Check your start date" on the page + When I press the "Continue" button + + #RA JDB-3443 + + Then I see "Will you need help when you're at the court?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select yes if you will need help when you're at court" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #JDB-3638 + + When I check the "Other" checkbox + And I press the "Continue" button + Then I see "Give details of your disability or impairment" on the page + + When I check the "Other" checkbox + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + + And I press the "Submit" button + + And I see "You have completed your reply" on the page + And I see "We have sent you an email to say you have replied to your jury summons." on the page + + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500222 |DOE |SW1H 9AJ |email@outlook.com|415170401 | + diff --git a/src/test/resources/cucumber/features/JDB-3635.feature b/src/test/resources/cucumber/features/JDB-3635.feature new file mode 100644 index 00000000..ba1bba8c --- /dev/null +++ b/src/test/resources/cucumber/features/JDB-3635.feature @@ -0,0 +1,225 @@ +Feature: JDB-3635 + +@Regression @JDB-3635 +Scenario Outline: Checking that TP is visible in all 3rd Party browser URLs after 3rd party specific screens + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | | | 400 | + + And "" has "LNAME" as "" + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "ZIP" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I see "/tp" in the URL + When I set "9-digit juror number" to "" + When I set "Juror last name" to "" + When I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I see "/tp" in the URL + And I press the "Continue" button + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I see "Eligibility" on the page + And I see "/tp" in the URL + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I see "/tp" in the URL + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I see "/tp" in the URL + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I see "/tp" in the URL + When I set the radio button to "No" + And I press the "Continue" button + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I see "/tp" in the URL + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I see "/tp" in the URL + And I set the radio button to "No" + And I press the "Continue" button + + #The person can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I see "/tp" in the URL + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I see "/tp" in the URL + And I press the "Continue" button + + #Check your answers and JDB-3375 + + Then I see "Check your answers now" on the page + When I see "/tp" in the URL + And I click on the "Change" link in the same row as "Confirm the date of their jury service" + Then I see "Check your start date" on the page + And I see "/tp" in the URL + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + Then I see "Tell us why they need another date for their jury service" on the page + + #Deferral Reason + + When I see "/tp" in the URL + And I set text area with "id" of "deferralReason" to "Defer me please" + And I press the "Continue" button + Then I see "Choose 3 Mondays when they can start jury service" on the page + + #Deferral Dates + + When I see "/tp" in the URL + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + And I see "/tp" in the URL + + #confirm + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check your answers now + + And I click on the "Change" link in the same row as "Confirm the date of their jury service" + Then I see "Check your start date" on the page + And I see "/tp" in the URL + When I set the radio button to "No, they cannot do" + And I press the "Continue" button + Then I see "Why do they need to be excused from jury service?" on the page + + #Excusal Reason + + When I see "/tp" in the URL + And I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers now + + And I click on the "Change" link in the same row as "Confirm the date of their jury service" + Then I see "Check your start date" on the page + And I see "/tp" in the URL + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent an email to say you have replied to this jury summons." on the page + And I see "/tp" in the URL + +Examples: + | part_no |last_name |postcode | email |pool_no | + |641500578 |DOE |SW1H 9AJ |email@outlook.com|415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/JDB-4172 Comms Welsh Flag.feature b/src/test/resources/cucumber/features/JDB-4172 Comms Welsh Flag.feature new file mode 100644 index 00000000..d9d82111 --- /dev/null +++ b/src/test/resources/cucumber/features/JDB-4172 Comms Welsh Flag.feature @@ -0,0 +1,1380 @@ +Feature: JDB-4172 + +#//check data +#select * from juror.print_files where part_no in ('741500438','741500586','645700112','645700090') +#select * from pool where part_no in ('741500438','741500586','645700112','645700090') +#select * from unique_pool where pool_no='415181001' +#select * from form_attr where form_type like '5224%' +#select * from juror_digital.juror_response where juror_number in ('741500438','741500586','645700112','645700090') + +#//delete data +#delete from juror.print_files where extracted_flag is null and part_no in ('741500438','741500586','645700112','645700090'); +#delete from juror.print_files where extracted_flag ='Y' and part_no in ('741500438','741500586','645700112','645700090') +#delete from juror.pool where pool_no ='415181001' and owner <>'400' +#delete from juror.pool where pool_no ='457170401' and owner <>'400' +#update unique_pool set read_only='N' where pool_no='415181001' and owner='400' +#update unique_pool set read_only='Y' where pool_no='415181001' and owner='415' +#update unique_pool set read_only='N' where pool_no='457170401' and owner='400' +#update unique_pool set read_only='Y' where pool_no='457170401' and owner='457' + +#//create letters +#INSERT into print_files (printfile_name, creation_date, form_type, detail_rec,extracted_flag,part_no,digital_comms) +#select to_char(sysdate,'YYYYMMDDHH24MMSS')||decode(upper(p.welsh),'Y','C',NULL,'E','E'), +#sysdate, +#decode(upper(p.welsh),'Y','5224AC',NULL,'5224A','5224A'), -- using flag on record in pool table +#rpad(to_char((sysdate+2),'DD FMMONTH YYYY'),18,' ') +# || cc.loc_code +# || decode(DECODE(upper(p.welsh),'Y','W',NULL,'E','E'), +# 'W', RPAD(upper(cc.loc_name),40), +# 'E', decode(cc.loc_code,'626',RPAD(upper(cc.loc_name),59), RPAD('The Crown Court at '||upper(cc.loc_name),59))) +# || upper('Jury Central Summoning Bureau The Court Service Freepost Lon 19669 Pocock Street London SE1 0YG 0845 3555567 ') +# || RPAD(Rtrim(to_char(p.next_date,'DAY')) || ' ' +# || to_char(p.next_date,'DD') || ' ' +# || Rtrim(to_char(p.next_date,'MONTH')) ||', ' +# || to_char(p.next_date,'YYYY'),32,' ') +# || Rpad(decode(u.attend_time, +# null, +# nvl(decode(sign(instr(cc.loc_attend_time,'AM')),0,cc.loc_attend_time||'AM',cc.loc_attend_time),'9.00 AM'), +# to_char(u.attend_time,'hh:miAM')), +# 8,' ') +# || RPAD(NVL(p.title,' '),10,' ') || RPAD(NVL(p.fname,' '),20,' ') || RPAD(NVL(p.lname,' '),20,' ') +# || RPAD(RPAD(NVL(p.address,' '),35) || RPAD(p.address2,35) || RPAD(p.address3,35) || RPAD(p.address4,35) || RPAD(p.address5,35) || RPAD(p.address6,35) +# || RPAD(p.zip,10),220) +# || RPAD(NVL(p.part_no,' '),9,' ') +# || upper('Jury Manager '), +#null,p.part_no,'N' +#FROM pool p, unique_pool u, court_location cc +#WHERE p.pool_no = u.pool_no +# AND p.owner = '400' +# AND u.owner = '400' +# AND cc.loc_code = u.loc_code +#and p.part_no in ('741500438','741500586','645700112','645700090'); + +#run cron job + +#transfer pool + +#run cron job + + + +@comms @conf_lett +Scenario Outline: 1st Party English ST, answers in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And I have submitted a first party English straight through response + |part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + + #process in Bureau as Responded + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated + Given a confirmation letter is generated for juror "" + + Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" + Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" + Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT |CH1 2AN |e@mail.com | + +@comms @conf_lett +Scenario Outline: 1st Party English ST, answers in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And I have submitted a first party Welsh straight through response + |part_no |pool_number|last_name |postcode |email | + | | | | || + +# And I have submitted a first party English straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + +## #process in Bureau as Responded +# When I select "Responded" from Process reply +# And I check the "Mark juror as 'responded'" checkbox +# And I press the "Confirm" button +# Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated +# Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |e@mail.com | + +@comms @conf_lettx +Scenario Outline: 1st Party Welsh ST, answers in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" + And I have submitted a first party Welsh straight through response + |part_no |pool_number|last_name |postcode |email | + | | || || + +# And I have submitted a first party English straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + +# #process in Bureau as Responded +# When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button +# Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated +# Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |e@mail.com | + +@comms @conf_lett +Scenario Outline: 1st Party Welsh ST, answers in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "1 mondays time" + And "" has "NEXT_DATE" as "1 mondays time" +# And I have submitted a first party Welsh straight through response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + | | || || + + #Currently an issue with 4 weeks and urgents JDB-4010 (ONLY ON FRIDAY) + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page +# And I see "Urgent" on the page +# +# #process in Bureau as Responded +# When I select "Responded" from Process reply +# And I check the "Mark juror as 'responded'" checkbox +# And I press the "Confirm" button +# Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #conf letter generated +# Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com | + +@comms @withdraw_lett +Scenario Outline: 1st Party English ST, responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "F" + And "" has "PHOENIX_CHECKED" as "C" + + #record is auto disqualified + And "" has "DATE_DISQ" as "01-JUL-19" + And "" has "DISQ_CODE" as "E" + And "" has "STATUS" as "6" + And "" has "NEXT_DATE" as "" + + #conf letter generated +# Given a disqualified letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT |CH1 2AN |e@mail.com | + +@comms @withdraw_lett +Scenario Outline: 1st Party Welsh Age Disqualified, responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh underage response + |part_no |pool_number|last_name |postcode |email | + | | || || + +# And I have submitted a first party English underage response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then "Record status" is "Disqualified" + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |e@mail.com | + +@comms @withdraw_lett +Scenario Outline: 1st Party English ST, responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "2 mondays time" + And "" has "NEXT_DATE" as "2 mondays time" + And I have submitted a first party Welsh straight through response + |part_no |pool_number|last_name |postcode | email | + | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Responded + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "F" + And "" has "PHOENIX_CHECKED" as "C" + + #record is auto disqualified + And "" has "DATE_DISQ" as "01-JUL-19" + And "" has "DISQ_CODE" as "E" + And "" has "STATUS" as "6" + And "" has "NEXT_DATE" as "" + + #conf letter generated +# Given a disqualified letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |e@mail.com | + +@comms @withdraw_lett +Scenario Outline: 1st Party Welsh Age Disqualified, responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" +# And I have submitted a first party Welsh underage response +# |part_no |pool_number|last_name |postcode |email | +# | | || || + + And I have submitted a first party English underage response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then "Record status" is "Disqualified" + + #DB checks (Do PNC N/A) + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com| + +@comms @refuse_excuse_lett +Scenario Outline: 1st Party Welsh Excusal refused, juror replies in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" +# And I have submitted a first party Welsh excusal response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English excusal response + |part_no |pool_number|last_name |postcode | email | + | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + #process in Bureau as Refuse Excuse + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com | + +@comms @refuse_excuse_lett +Scenario Outline: 1st Party Welsh Excusal refused, juror replies in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh excusal response + |part_no |pool_number|last_name |postcode | email | + | | || || + +# And I have submitted a first party English excusal response +# |part_no |pool_number|last_name |postcode | email | +# | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + #process in Bureau as Refuse Excuse + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |e@mail.com | + +@comms @refuse_excuse_lett +Scenario Outline: 1st Party English Excusal refused, juror replies in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh excusal response + |part_no |pool_number|last_name |postcode | email | + | | || || + +# And I have submitted a first party English excusal response +# |part_no |pool_number|last_name |postcode | email | +# | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + #process in Bureau as Refuse Excuse + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |e@mail.com | + +@comms @refuse_excuse_lett +Scenario Outline: 1st Party English Excusal refused, juror replies in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" +# And I have submitted a first party Welsh excusal response +# |part_no |pool_number|last_name |postcode | email | +# | | || || + + And I have submitted a first party English excusal response + |part_no |pool_number|last_name |postcode | email | + | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" +# Then I see "Summoned" on the page + + #process in Bureau as Refuse Excuse + When I select "Excusal" from Process reply + And I set the radio button to "Refuse excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #refuse excusal letter generated + Given an excusal denied letter is generated for juror "" + Given a confirmation letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT |CH1 2AN |e@mail.com | + +@comms @excusal_lett +Scenario Outline: 1st Party English Excusal accepted, juror responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English excusal response + |part_no |pool_number|last_name |postcode |email | + | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated +# Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT|CH1 2AN |e@mail.com | + +@comms @excusal_lett +Scenario Outline: 1st Party English Excusal accepted, juror responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh excusal response + |part_no |pool_number|last_name |postcode |email | + | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated +# Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |e@mail.com | + +@comms @excusal_lett +Scenario Outline: 1st Party English Welsh accepted, juror responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh excusal response + |part_no |pool_number|last_name |postcode |email | + | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated +# Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |e@mail.com | + +@comms @excusal_lett +Scenario Outline: 1st Party English Welsh accepted, juror responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English excusal response + |part_no |pool_number|last_name |postcode |email | + | | || || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Excused + When I select "Excusal" from Process reply + And I set the radio button to "Accept excusal" + And I select "OTHER" from the "Reason for excusal request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #excusal letter generated +# Given an excusal letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com | + +@comms @deferral_refused_lett +Scenario Outline: 1st Party English Deferral refused, answers in welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Refuse Def + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |e@mail.com | + +@comms @deferral_refused_lett +Scenario Outline: 1st Party English Deferral refused, answers in english + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Refuse Def + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT|CH1 2AN |e@mail.com | + +@comms @deferral_refused_lett +Scenario Outline: 1st Party Welsh Deferral refused, answers in english + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Refuse Def + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com | + +@comms @deferral_refused_lett +Scenario Outline: 1st Party Welsh Deferral refused, answers in welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + #process in Bureau as Refuse Def + When I select "Deferral" from Process reply + And I set the radio button to "Refuse deferral" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |e@mail.com | + +@comms @postpone_lett +Scenario Outline: 1st Party Welsh Postponement, responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" +# And I have submitted a first party Welsh ineligibilty response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated +# Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com | + +@comms @postpone_lett +Scenario Outline: 1st Party Welsh Postponement, responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English ineligibilty response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated +# Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |e@mail.com | + +@comms @postpone_lett +Scenario Outline: 1st Party English Postponement, responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" +# And I have submitted a first party Welsh ineligibilty response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated +# Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT|CH1 2AN |e@mail.com | + +@comms @postpone_lett +Scenario Outline: 1st Party English Postponement, responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "4 mondays time" + And "" has "NEXT_DATE" as "4 mondays time" + And I have submitted a first party Welsh ineligibilty response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English ineligibilty response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "P - POSTPONEMENT OF SERVICE" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #postponse letter generated +# Given a postponement letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |e@mail.com | + +@comms @defer_lett +Scenario Outline: 1st Party Welsh Deferral accepted, responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party Welsh deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated +# Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700090 |457170401 |LNAMENINEZERO |SA1 4PF |e@mail.com | + +@comms @defer_lett +Scenario Outline: 1st Party Welsh Deferral accepted, responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" +# And I have submitted a first party Welsh deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated +# Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|645700112 |457170401 |LNAMEONEONETWO |SA1 4PF |e@mail.com | + +@comms @defer_lett +Scenario Outline: 1st Party English Deferral accepted, responds in English + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" +# And I have submitted a first party Welsh deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + And I have submitted a first party English deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated +# Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500438 |415181001 |LNAMEFOURTHREEEIGHT|CH1 2AN |e@mail.com | + +@comms @defer_lett +Scenario Outline: 1st Party English Deferral accepted, responds in Welsh + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + | | |400 | + Given auto straight through processing has been enabled + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And I have submitted a first party Welsh deferral response + | part_no |pool_number| last_name |postcode | email | + | | | | || + +# And I have submitted a first party English deferral response +# | part_no |pool_number| last_name |postcode | email | +# | | | | || + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + Then I see "Summoned" on the page + + When I select "Deferral" from Process reply + And I set the radio button to "Accept deferral" + Then I see "Defer until" on the page + + When I set "Defer until" to "{7 mondays time}" + And I select "O - OTHER" from the "Reason for deferral request" dropdown + And I press the "Mark as completed" button + Then I see "Completed" on the page + + #DB checks (Do PNC PASS) + And "" has "POLICE_CHECK" as "P" + And "" has "PHOENIX_CHECKED" as "C" + + #deferral letter generated +# Given a deferral letter is generated for juror "" + +# Then on "JUROR" . "PRINT_FILES" I see "FORM_TYPE" is "5224A" where "PART_NO" is "" +# Then on "JUROR" . "PRINT_FILES" I see "DIGITAL_COMMS" is "Y" where "PART_NO" is "" +# Then on "JUROR" . "POOL" I see "NOTIFICATIONS" is null where "PART_NO" is "" + +Examples: +|part_no |pool_no |last_name |postcode |email | +|741500586 |415181001 |LNAMEFIVEEIGHTSIX |CH1 2AN |e@mail.com | diff --git a/src/test/resources/cucumber/features/LogOnCheck.feature b/src/test/resources/cucumber/features/LogOnCheck.feature new file mode 100644 index 00000000..885cdc03 --- /dev/null +++ b/src/test/resources/cucumber/features/LogOnCheck.feature @@ -0,0 +1,315 @@ +Feature: Juror Details Checker + + @LogOnCheck + Scenario Outline: Quick check to see if Jurors work + Given I am on "Public" "Test1" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "" + And I set "Juror last name" to "" + And I set "Juror postcode" to "" + And I press the "Continue" button + Then I see "Your details" on the page + And I see "Check that your name and address are correct" on the page + Examples: + | part_no | last_name | postcode | + | 645700998 | LNAMENINENINEEIGHT | SA1 4PF | + | 645700362 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700683 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700699 | LNAMESIXNINENINE | SA1 4PF | + | 645700708 | LNAMESEVENZEROEIGHT | SA1 4PF | + | 645700720 | LNAMESEVENTWOZERO | SA1 4PF | + | 645700721 | LNAMESEVENTWOONE | SA1 4PF | + | 645700722 | LNAMESEVENTWOTWO | SA1 4PF | + | 645700730 | LNAMESEVENTHREEZERO | SA1 4PF | + | 645700732 | LNAMESEVENTHREETWO | SA1 4PF | + | 645700733 | LNAMESEVENTHREETHREE | SA1 4PF | + | 645700279 | LNAMETWOSEVENNINE | SA1 4PF | + | 645700794 | LNAMESEVENNINEFOUR | SA1 4PF | + | 645700883 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700988 | LNAMENINEEIGHTEIGHT | SA1 4PF | + | 645700423 | LNAMEFOURTWOTHREE | SA1 4PF | + | 645700442 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700443 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700456 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700459 | LNAMEFOURFIVENINE | SA1 4PF | + | 645700460 | LNAMEFOURSIXZERO | SA1 4PF | + | 645700472 | LNAMEFOURSEVENTWO | SA1 4PF | + | 645700480 | LNAMEFOUREIGHTZERO | SA1 4PF | + | 645700493 | LNAMEFOURNINETHREE | SA1 4PF | + | 645700525 | LNAMEFIVETWOFIVE | SA1 4PF | + | 645700526 | LNAMEFIVETWOSIX | SA1 4PF | + | 645700530 | LNAMEFIVETHREEZERO | SA1 4PF | + | 645700538 | LNAMEFIVETHREEEIGHT | SA1 4PF | + | 645700539 | LNAMEFIVETHREENINE | SA1 4PF | + | 645700551 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700554 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700561 | LNAMEFIVESIXONE | SA1 4PF | + | 645700574 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700576 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700577 | LNAMEFIVESEVENSEVEN | SA1 4PF | + | 645700584 | LNAMEFIVEEIGHTFOUR | SA1 4PF | + | 645700585 | LNAMEFIVEEIGHTFIVE | SA1 4PF | + | 645700598 | LNAMEFIVENINEEIGHT | SA1 4PF | + | 645700607 | LNAMESIXZEROSEVEN | SA1 4PF | + | 645700611 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700613 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700614 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700618 | LNAMESIXONEEIGHT | SA1 4PF | + | 645700625 | LNAMESIXTWOFIVE | SA1 4PF | + | 645700630 | LNAMESIXTHREEZERO | SA1 4PF | + | 645700633 | LNAMESIXTHREETHREE | SA1 4PF | + | 645700640 | LNAMESIXFOURZERO | SA1 4PF | + | 645700642 | LNAMESIXFOURTWO | SA1 4PF | + | 645700653 | LNAMESIXFIVETHREE | SA1 4PF | + | 645700663 | LNAMESIXSIXTHREE | SA1 4PF | + | 645700671 | LNAMESIXSEVENONE | SA1 4PF | + | 645700058 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700062 | LNAMESIXTWO | SA1 4PF | + | 645700068 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700071 | LNAMESEVENONE | SA1 4PF | + | 645700074 | LNAMESEVENFOUR | SA1 4PF | + | 645700838 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700841 | LNAMEEIGHTFOURONE | SA1 4PF | + | 645700843 | LNAMEEIGHTFOURTHREE | SA1 4PF | + | 645700845 | LNAMEEIGHTFOURFIVE | SA1 4PF | + | 645700757 | LNAMESEVENFIVESEVEN | SA1 4PF | + | 645700779 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700781 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700790 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700797 | LNAMESEVENNINESEVEN | SA1 4PF | + | 645700798 | LNAMESEVENNINEEIGHT | SA1 4PF | + | 645700807 | LNAMEEIGHTZEROSEVEN | SA1 4PF | + | 645700810 | LNAMEEIGHTONEZERO | SA1 4PF | + | 645700817 | LNAMEEIGHTONESEVEN | SA1 4PF | + | 645700818 | LNAMEEIGHTONEEIGHT | SA1 4PF | + | 645700952 | LNAMENINEFIVETWO | SA1 4PF | + | 645700980 | LNAMENINEEIGHTZERO | SA1 4PF | + | 645700592 | LNAMEFIVENINETWO | SA1 4PF | + | 645700200 | LNAMETWOZEROZERO | SA1 4PF | + | 645700770 | LNAMESEVENSEVENZERO | SA1 4PF | + | 645700443 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700456 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700459 | LNAMEFOURFIVENINE | SA1 4PF | + | 645700460 | LNAMEFOURSIXZERO | SA1 4PF | + | 645700472 | LNAMEFOURSEVENTWO | SA1 4PF | + | 645700480 | LNAMEFOUREIGHTZERO | SA1 4PF | + | 645700493 | LNAMEFOURNINETHREE | SA1 4PF | + | 645700525 | LNAMEFIVETWOFIVE | SA1 4PF | + | 645700526 | LNAMEFIVETWOSIX | SA1 4PF | + | 645700530 | LNAMEFIVETHREEZERO | SA1 4PF | + | 645700538 | LNAMEFIVETHREEEIGHT | SA1 4PF | + | 645700539 | LNAMEFIVETHREENINE | SA1 4PF | + | 645700542 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700551 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700554 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700561 | LNAMEFIVESIXONE | SA1 4PF | + | 645700564 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700574 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700576 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700577 | LNAMEFIVESEVENSEVEN | SA1 4PF | + | 645700584 | LNAMEFIVEEIGHTFOUR | SA1 4PF | + | 645700585 | LNAMEFIVEEIGHTFIVE | SA1 4PF | + | 645700598 | LNAMEFIVENINEEIGHT | SA1 4PF | + | 645700607 | LNAMESIXZEROSEVEN | SA1 4PF | + | 645700611 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700613 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700614 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700618 | LNAMESIXONEEIGHT | SA1 4PF | + | 645700625 | LNAMESIXTWOFIVE | SA1 4PF | + | 645700630 | LNAMESIXTHREEZERO | SA1 4PF | + | 645700633 | LNAMESIXTHREETHREE | SA1 4PF | + | 645700640 | LNAMESIXFOURZERO | SA1 4PF | + | 645700642 | LNAMESIXFOURTWO | SA1 4PF | + | 645700653 | LNAMESIXFIVETHREE | SA1 4PF | + | 645700663 | LNAMESIXSIXTHREE | SA1 4PF | + | 645700671 | LNAMESIXSEVENONE | SA1 4PF | + | 645700058 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700062 | LNAMESIXTWO | SA1 4PF | + | 645700068 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700071 | LNAMESEVENONE | SA1 4PF | + | 645700074 | LNAMESEVENFOUR | SA1 4PF | + | 645700838 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700841 | LNAMEEIGHTFOURONE | SA1 4PF | + | 645700843 | LNAMEEIGHTFOURTHREE | SA1 4PF | + | 645700845 | LNAMEEIGHTFOURFIVE | SA1 4PF | + | 645700757 | LNAMESEVENFIVESEVEN | SA1 4PF | + | 645700779 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700781 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700790 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700797 | LNAMESEVENNINESEVEN | SA1 4PF | + | 645700798 | LNAMESEVENNINEEIGHT | SA1 4PF | + | 645700807 | LNAMEEIGHTZEROSEVEN | SA1 4PF | + | 645700810 | LNAMEEIGHTONEZERO | SA1 4PF | + | 645700817 | LNAMEEIGHTONESEVEN | SA1 4PF | + | 645700818 | LNAMEEIGHTONEEIGHT | SA1 4PF | + | 645700952 | LNAMENINEFIVETWO | SA1 4PF | + | 645700980 | LNAMENINEEIGHTZERO | SA1 4PF | + | 645700592 | LNAMEFIVENINETWO | SA1 4PF | + | 645700770 | LNAMESEVENSEVENZERO | SA1 4PF | + | 645700242 | LNAMETWOFOURTWO | SA1 4PF | + | 645700243 | LNAMETWOFOURTHREE | SA1 4PF | + | 645700252 | LNAMETWOFIVETWO | SA1 4PF | + | 645700270 | LNAMETWOSEVENZERO | SA1 4PF | + | 645700278 | LNAMETWOSEVENEIGHT | SA1 4PF | + | 645700281 | LNAMETWOEIGHTONE | SA1 4PF | + | 645700284 | LNAMETWOEIGHTFOUR | SA1 4PF | + | 645700285 | LNAMETWOEIGHTFIVE | SA1 4PF | + | 645700287 | LNAMETWOEIGHTSEVEN | SA1 4PF | + | 645700289 | LNAMETWOEIGHTNINE | SA1 4PF | + | 645700293 | LNAMETWONINETHREE | SA1 4PF | + | 645700312 | LNAMETHREEONETWO | SA1 4PF | + | 645700314 | LNAMETHREEONEFOUR | SA1 4PF | + | 645700326 | LNAMETHREETWOSIX | SA1 4PF | + | 645700338 | LNAMETHREETHREEEIGHT | SA1 4PF | + | 645700341 | LNAMETHREEFOURONE | SA1 4PF | + | 645700342 | LNAMETHREEFOURTWO | SA1 4PF | + | 645700349 | LNAMETHREEFOURNINE | SA1 4PF | + | 645700350 | LNAMETHREEFIVEZERO | SA1 4PF | + | 645700354 | LNAMETHREEFIVEFOUR | SA1 4PF | + | 645700375 | LNAMETHREESEVENFIVE | SA1 4PF | + | 645700376 | LNAMETHREESEVENSIX | SA1 4PF | + | 645700409 | LNAMEFOURZERONINE | SA1 4PF | + | 645700412 | LNAMEFOURONETWO | SA1 4PF | + | 645700413 | LNAMEFOURONETHREE | SA1 4PF | + | 645700006 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700008 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700009 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700242 | LNAMETWOFOURTWO | SA1 4PF | + | 645700243 | LNAMETWOFOURTHREE | SA1 4PF | + | 645700252 | LNAMETWOFIVETWO | SA1 4PF | + | 645700270 | LNAMETWOSEVENZERO | SA1 4PF | + | 645700278 | LNAMETWOSEVENEIGHT | SA1 4PF | + | 645700281 | LNAMETWOEIGHTONE | SA1 4PF | + | 645700010 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700012 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700020 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700022 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700023 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700026 | LNAMETWOSIX | SA1 4PF | + | 645700032 | LNAMETHREETWO | SA1 4PF | + | 645700036 | LNAMETHREESIX | SA1 4PF | + | 645700091 | LNAMENINEONE | SA1 4PF | + | 645700099 | LNAMENINENINE | SA1 4PF | + | 645700114 | LNAMEONEONEFOUR | SA1 4PF | + | 645700120 | LNAMEONETWOZERO | SA1 4PF | + | 645700121 | LNAMEONETWOONE | SA1 4PF | + | 645700124 | LNAMEONETWOFOUR | SA1 4PF | + | 645700128 | LNAMEONETWOEIGHT | SA1 4PF | + | 645700132 | LNAMEONETHREETWO | SA1 4PF | + | 645700133 | LNAMEONETHREETHREE | SA1 4PF | + | 645700155 | LNAMEONEFIVEFIVE | SA1 4PF | + | 645700165 | LNAMEONESIXFIVE | SA1 4PF | + | 645700167 | LNAMEONESIXSEVEN | SA1 4PF | + | 645700168 | LNAMEONESIXEIGHT | SA1 4PF | + | 645700176 | LNAMEONESEVENSIX | SA1 4PF | + | 645700179 | LNAMEONESEVENNINE | SA1 4PF | + | 645700184 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700190 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700193 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700205 | LNAMETWOZEROFIVE | SA1 4PF | + | 645700225 | LNAMETWOTWOFIVE | SA1 4PF | + | 645700877 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700878 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700884 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700889 | LNAMEEIGHTEIGHTNINE | SA1 4PF | + | 645700897 | LNAMEEIGHTNINESEVEN | SA1 4PF | + | 645700919 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700924 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700284 | LNAMETWOEIGHTFOUR | SA1 4PF | + | 645700285 | LNAMETWOEIGHTFIVE | SA1 4PF | + | 645700287 | LNAMETWOEIGHTSEVEN | SA1 4PF | + | 645700289 | LNAMETWOEIGHTNINE | SA1 4PF | + | 645700293 | LNAMETWONINETHREE | SA1 4PF | + | 645700312 | LNAMETHREEONETWO | SA1 4PF | + | 645700314 | LNAMETHREEONEFOUR | SA1 4PF | + | 645700326 | LNAMETHREETWOSIX | SA1 4PF | + | 645700338 | LNAMETHREETHREEEIGHT | SA1 4PF | + | 645700341 | LNAMETHREEFOURONE | SA1 4PF | + | 645700342 | LNAMETHREEFOURTWO | SA1 4PF | + | 645700349 | LNAMETHREEFOURNINE | SA1 4PF | + | 645700350 | LNAMETHREEFIVEZERO | SA1 4PF | + | 645700354 | LNAMETHREEFIVEFOUR | SA1 4PF | + | 645700375 | LNAMETHREESEVENFIVE | SA1 4PF | + | 645700376 | LNAMETHREESEVENSIX | SA1 4PF | + | 645700409 | LNAMEFOURZERONINE | SA1 4PF | + | 645700412 | LNAMEFOURONETWO | SA1 4PF | + | 645700413 | LNAMEFOURONETHREE | SA1 4PF | + | 645700006 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700008 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700009 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700010 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700012 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700020 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700022 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700023 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700026 | LNAMETWOSIX | SA1 4PF | + | 645700032 | LNAMETHREETWO | SA1 4PF | + | 645700036 | LNAMETHREESIX | SA1 4PF | + | 645700091 | LNAMENINEONE | SA1 4PF | + | 645700099 | LNAMENINENINE | SA1 4PF | + | 645700114 | LNAMEONEONEFOUR | SA1 4PF | + | 645700120 | LNAMEONETWOZERO | SA1 4PF | + | 645700121 | LNAMEONETWOONE | SA1 4PF | + | 645700927 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700941 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700949 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700950 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700955 | LNAMENINEFIVEFIVE | SA1 4PF | + | 645700957 | LNAMENINEFIVESEVEN | SA1 4PF | + | 645700959 | LNAMENINEFIVENINE | SA1 4PF | + | 645700965 | LNAMENINESIXFIVE | SA1 4PF | + | 645700124 | LNAMEONETWOFOUR | SA1 4PF | + | 645700128 | LNAMEONETWOEIGHT | SA1 4PF | + | 645700132 | LNAMEONETHREETWO | SA1 4PF | + | 645700133 | LNAMEONETHREETHREE | SA1 4PF | + | 645700155 | LNAMEONEFIVEFIVE | SA1 4PF | + | 645700165 | LNAMEONESIXFIVE | SA1 4PF | + | 645700167 | LNAMEONESIXSEVEN | SA1 4PF | + | 645700168 | LNAMEONESIXEIGHT | SA1 4PF | + | 645700176 | LNAMEONESEVENSIX | SA1 4PF | + | 645700179 | LNAMEONESEVENNINE | SA1 4PF | + | 645700184 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700190 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700193 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700205 | LNAMETWOZEROFIVE | SA1 4PF | + | 645700225 | LNAMETWOTWOFIVE | SA1 4PF | + | 645700877 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700878 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700884 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700889 | LNAMEEIGHTEIGHTNINE | SA1 4PF | + | 645700897 | LNAMEEIGHTNINESEVEN | SA1 4PF | + | 645700919 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700924 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700927 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700930 | LNAMEEIGHTFOUR | CH1 2AN | + | 645700941 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700949 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700950 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700955 | LNAMENINEFIVEFIVE | SA1 4PF | + | 645700957 | LNAMENINEFIVESEVEN | SA1 4PF | + | 645700959 | LNAMENINEFIVENINE | SA1 4PF | + | 645700965 | LNAMENINESIXFIVE | SA1 4PF | + | 645700998 | LNAMENINENINEEIGHT | SA1 4PF | + | 645700362 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700683 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700684 | LNAMEEIGHTFOUR | CH1 2AN | + | 645700699 | LNAMESIXNINENINE | SA1 4PF | + | 645700708 | LNAMESEVENZEROEIGHT | SA1 4PF | + | 645700720 | LNAMESEVENTWOZERO | SA1 4PF | + | 645700721 | LNAMESEVENTWOONE | SA1 4PF | + | 645700722 | LNAMESEVENTWOTWO | SA1 4PF | + | 645700730 | LNAMESEVENTHREEZERO | SA1 4PF | + | 645700732 | LNAMESEVENTHREETWO | SA1 4PF | + | 645700733 | LNAMESEVENTHREETHREE | SA1 4PF | + | 645700279 | LNAMETWOSEVENNINE | SA1 4PF | + | 645700597 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700794 | LNAMESEVENNINEFOUR | SA1 4PF | + | 645700883 | LNAMEONEFIVEFOUR | CH1 2AN | + | 645700988 | LNAMENINEEIGHTEIGHT | SA1 4PF | + | 645700423 | LNAMEFOURTWOTHREE | SA1 4PF | + | 645700442 | LNAMEONEFIVEFOUR | CH1 2AN | + + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2251-3038-view-summons-reply.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2251-3038-view-summons-reply.feature new file mode 100644 index 00000000..fe07d932 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2251-3038-view-summons-reply.feature @@ -0,0 +1,140 @@ +Feature: JM-2251 JM-3038 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to view paper summons reply + Given I am on "Bureau" "test" + + #reset data to summoned state + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future| owner | + | 452 | | | 5 | 400 | + + And juror "" has "FIRST_NAME" as "FNAMENINENINESIX" new schema + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + #log on as bureau user + And I log in as "" + + #search for and review paper summons + When the user searches for juror record "" from the global search bar + + #record paper summons + And I record a happy path paper summons response + + Then I see "Do you want to process this summons reply as responded now?" on the page + When I click on the "No, skip and process later" link + + When the user searches for juror record "" from the global search bar + Then the view summons reply page is displayed + + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see "SUMMONS REPLY" on the page + + Then I see the following summons reply details under the juror details tab + | jurorName | FNAMENINENINESIX | + | jurorAddress | address\nAddress Line Four\n | + | jurorDob | 18 Jul 1976 (Juror will be 47 years old) | + | jurorMainPhone | 0777777777 | + | jurorAltPhone | 0777777771 | + | jurorEmail | test@test.com | + + #eligibility + When I click the juror details eligibility tab + Then I see the following summons reply details under the eligibility tab + | jurorResidency | Pass | + | jurorMha | Pass | + | jurorMca | Pass | + | jurorBail | Pass | + | jurorConvictions | Pass | + + #deferral + When I click the juror details deferral tab + Then I see the deferral status is "None requested" + + #cjs + When I click the juror details CJS tab + Then I see the CJS status is "N/A" + + #reasonable adjustments + When I click the juror details adjustments tab + Then I see the adjustments status is "N/A" + + #signature + When I click the juror details signature tab + Then I see the signature status is "Yes" + + Examples: + |juror_number |pool_number |last_name |postcode |user | + |045200028 |452300027 |LNAMENINENINESIX |CH1 2AN |MODTESTBUREAU | + + + @JurorTransformationWIP @JM-4932 @JM-5471 @NewSchemaConverted + Scenario Outline: Test to view paper summons reply with name change + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future| owner | + | 452 | | | 5 | 400 | + + And juror "" has "LAST_NAME" as "Lastname" new schema + And juror "" has "FIRST_NAME" as "Firstname" new schema + And juror "" has "ADDRESS_LINE_1" as "570 STREET NAME" new schema + And juror "" has "POSTCODE" as "" new schema + + #log on as bureau user + And I log in as "" + + #search for and review paper summons + When the user searches for juror record "" from the global search bar + + #record paper summons + And I record an unhappy path paper summons response + + #fails due to defect JM-4932 + Then I see the following summons reply details under the juror details tab + | jurorName | New\nChanged fname Changed lname | + | jurorAddress | Changed address line 1\nAddress Line Four\n | + | jurorDob | 18 Jul 1976 (Juror will be 47 years old) | + | jurorMainPhone | 0777777777 | + | jurorAltPhone | 0777777771 | + | jurorEmail | test@test.com | + And I see a previous name of "Previous\\nFirstname Lastname" + + Examples: + |juror_number |pool_number|postcode |user | + |045200029 |452300028 |CH1 2AN |MODTESTBUREAU | + + @JurorTransformationWIP @NewSchemaConverted @JM-5471 + Scenario Outline: Test to view paper summons reply with CJS and reasonable adjustments + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future| owner | + | 452 | | | 5 | 400 | + + #log on as bureau user + And I log in as "" + + #search for and review paper summons + When the user searches for juror record "" from the global search bar + + #fails due to JM-5471 + #record paper summons + And I record an unhappy path paper summons response + + When I click the juror details deferral tab + Then I see the deferral status is "Attention\\nDeferral request" + When I click the juror details CJS tab + Then I see the CJS status is "Attention\\nPolice Force\\nWest Midlands Police" + When I click the juror details adjustments tab + Then I see the adjustments status is "Attention\\nC - Childcare problems\\nReasonable adjustments reasons" + When I click the juror details signature tab + Then I see the signature status is "Required" + + Examples: + |juror_number |pool_number|user | + |045200030 |452300029 |MODTESTBUREAU | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2486-assign-replies.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2486-assign-replies.feature new file mode 100644 index 00000000..3c4f3cff --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2486-assign-replies.feature @@ -0,0 +1,178 @@ +Feature: JM-2486 + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Work Allocation - modernisation - happy path + + #this test needs to stay in single threaded as it checks assignment counts which will be more dynamic in the multi threaded execution + + Given I am on "Bureau" "test" + And pool no "" is reset to pending allocation new schema + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future| owner | + | 457 || | 5 | 400 | + | 457 || | 5 | 400 | + | 457 || | 5 | 400 | + +# set up some responses +# non-urgent + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + #urgent + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + #super urgent + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema +# And "" is not active new schema + + Given I am on "Public" "test" + And auto straight through processing has been disabled new schema + And I have submitted a first party English straight through response + | part_no |pool_number | last_name |postcode | email | + | || | || + | || | || + | || | || + + #log on as Team Lead + Given I am on "Bureau" "test" + And I log in as "" + + #assign replies check page content + Then I click on the "Assign Replies" link + And I see "Assign replies" on the page + And I see "Number of replies in the backlog" on the page + And I see "How many replies do you want to assign to each officer you select?" on the page + And I see "Select the officers you want to assign these replies to" on the page + + #check team leads not in results grid + And I do not see "SYSTEM" in the staff results grid + And I do not see "MODTESTBUREAU" in the staff results grid + + #check responses counts are displayed + Then I see "2" in the same row as "total" in Backlog box + Then I see "1" in the same row as "standard" in Backlog box + + #check cpass doesnt have any assigned as yet + And "ARAMIS1-standard" assigned replies count is "0" + And "ARAMIS1-send" assigned replies count is "0" + And "ARAMIS1-total" assigned replies count is "0" + + #assign the responses + Then I set how many "Urgent" replies I want to assign to "1" + Then I set how many "Standard" replies I want to assign to "1" + And I check the "ARAMIS1" checkbox + When I press the "Assign replies" button + + #check results of assignment + And "ARAMIS1-standard" assigned replies count is "1" + And "ARAMIS1-send" assigned replies count is "1" + And "ARAMIS1-total" assigned replies count is "2" + + #check totals + And "total-standard" assigned replies count is "1" + And "total-urgent" assigned replies count is "1" + And "total-all" assigned replies count is "2" + + #check select all/deselect all function + Then I press the "Select all" button + And "ARAMIS1" is checked + Then I press the "Unselect all" button + And "ARAMIS1" is unchecked + + And auto straight through processing has been enabled new schema + + Examples: + |juror_number4|juror_number5|juror_number6|pool_number|last_name |postcode |email |user | + |045200001 |045200002 |045200003 |452300001 |LNAME |NN1 3HQ |email@outlook.com |MODTESTBUREAU | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Work Allocation - modernisation - errors and warnings + + #this test needs to stay in single threaded as it checks assignment counts which will be more dynamic in the multi threaded execution + + Given I am on "Bureau" "test" + And pool no "" is reset to pending allocation new schema + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future| owner | + | 457 || | 5 | 400 | + | 457 || | 5 | 400 | + | 457 || | 5 | 400 | + +# set up some responses +# non-urgent + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + #urgent + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + #super urgent + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + Given I am on "Public" "postgres" + And auto straight through processing has been disabled new schema + And I have submitted a first party English straight through response + | part_no | pool_number | last_name | postcode | email | + | | | | | | + | | | | | | + | | | | | | + + #log on as Team Lead + Given I am on "Bureau" "test" + And I log in as "" + + #assign replies check page content + Then I click on the "Assign Replies" link + And I see "Assign replies" on the page + And I see "Number of replies in the backlog" on the page + And I see "How many replies do you want to assign to each officer you select?" on the page + And I see "Select the officers you want to assign these replies to" on the page + + #check team leads not in results grid + And I do not see "SYSTEM" in the staff results grid + And I do not see "MODTESTBUREAU" in the staff results grid + + #check responses counts are displayed + Then I see "2" in the same row as "total" in Backlog box + Then I see "1" in the same row as "standard" in Backlog box + + + #invalid input - assign with no selections made + When I press the "Assign replies" button + Then I see error "Enter how many replies you want to assign to each selected officer - you must enter a number in at least one box" + And I see error "Select at least 1 officer to assign replies to" + + #invalid input - assign with only team member selected + And I check the "ARAMIS1" checkbox + When I press the "Assign replies" button + And I see error "Enter how many replies you want to assign to each selected officer - you must enter a number in at least one box" + + #invalid input - assign without team member selected + And I uncheck the "ARAMIS1" checkbox + Then I set how many "Urgent" replies I want to assign to "1" + Then I set how many "Standard" replies I want to assign to "1" + When I press the "Assign replies" button + And I see error "Select at least 1 officer to assign replies to" + + #invalid input - assign more than is available + Then I set how many "Urgent" replies I want to assign to "100" + Then I set how many "Standard" replies I want to assign to "100" + And I check the "ARAMIS1" checkbox + When I press the "Assign replies" button + + #check results of assignment + And "ARAMIS1-standard" assigned replies count is "1" + And "ARAMIS1-send" assigned replies count is "1" + And "ARAMIS1-total" assigned replies count is "2" + + And auto straight through processing has been enabled new schema + + Examples: + |juror_number4|juror_number5 |juror_number6 |pool_number|last_name |postcode |email |user | + |045200004 |045200005 |045200006 |452300002 |LNAME |NN1 3HQ |email@outlook.com |MODTESTBUREAU | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2894-3367-4258-paper-summons.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2894-3367-4258-paper-summons.feature new file mode 100644 index 00000000..4b10aa80 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2894-3367-4258-paper-summons.feature @@ -0,0 +1,122 @@ +Feature: JM-2894 JM 3367 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter summons reply as bureau - happy path + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 || | 5 | 400 | + + And I log in as "" + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + Then the view summons reply page is displayed + + Examples: + |juror_number |pool_number |user | + |045200031 |452300030 |MODTESTBUREAU| + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter summons reply as bureau - juror details validation + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 || | 5 | 400 | + + And I log in as "" + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I enter a juror details phone number of "Test" + And I enter a juror details email of "Test@Test" + And I click continue on the juror summons reply page + Then an error is displayed on the juror summons reply page saying "Enter a valid main phone number" + And an error is displayed on the juror summons reply page saying "Enter a valid email address" + + Examples: + | juror_number | pool_number | user | + | 045200032 | 452300031 | MODTESTBUREAU| + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter summons reply as bureau - change name and address + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 || | 5 | 400 | + + And juror "" has "POSTCODE" as "CH1 2AA" new schema + + And I log in as "" + And I search for juror "" + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click the change name link on the juror details reply page + And I enter a first name of "Test" on the juror summons reply change name page + And I click save on the juror details change page + When I click the change address link on the juror details reply page + + And I enter an address line 1 of "1 Test Street" on the juror summons reply change address page + And I click save on the juror details change page + Then I see a name of "Test" on the juror details reply page + And I see an address of "1 Test Street" on the juror details reply page + + Examples: + | juror_number | pool_number | user | + | 045200033 | 452300032 | MODTESTBUREAU| + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter summons reply as bureau - too many characters + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 || | 5 | 400 | + + And I log in as "" + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has worked for the police force + And I enter over 2000 characters in the Which police force? text box + And I click continue on the juror summons reply page + Then an error is displayed on the juror summons reply page saying "Police force details must be 2000 characters or less" + + Examples: + |juror_number |pool_number |user | + |045200034 |452300033 |MODTESTBUREAU| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2895-super-urgent-summons-paper-reply.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2895-super-urgent-summons-paper-reply.feature new file mode 100644 index 00000000..582c0afd --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-2895-super-urgent-summons-paper-reply.feature @@ -0,0 +1,130 @@ +Feature: JM-2895 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter super urgent paper summons reply as a jury officer - happy path + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | | | 1 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + And I log in as "" + + #navigate to juror record + When the user searches for juror record "" from the global search bar + + #record happy path paper summons + And I record a happy path paper summons response + #skip straight through processing + Then I see "Do you want to process this summons reply as responded now?" on the page + When I click on the "No, skip and process later" link + + #validate results + Then the view summons reply page is displayed + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "NEEDS REVIEW" + And I see the super urgent flag + And I see Reply Method is "Paper" + And I see the process reply button + + Examples: + |juror_number |pool_number|user | + |041500010 |415300108 |MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter super urgent paper summons reply as jury officer - juror details validation + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | | | 1 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + And I log in as "" + And a new pool is inserted for court "415" new schema + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I enter a juror details phone number of "Test" + And I enter a juror details email of "Test@Test" + And I click continue on the juror summons reply page + Then an error is displayed on the juror summons reply page saying "Enter a valid main phone number" + And an error is displayed on the juror summons reply page saying "Enter a valid email address" + + Examples: + |juror_number |pool_number|user | + |041500011 |415300109 |MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter super urgent summons reply as jury officer - change name and address + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | | | 1 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + And I log in as "" + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click the change name link on the juror details reply page + And I enter a first name of "Test" on the juror summons reply change name page + And I click save on the juror details change page + + When I click the change address link on the juror details reply page + And I enter an address line 1 of "1 Test Street" on the juror summons reply change address page + And I click save on the juror details change page + Then I see a name of "Test" on the juror details reply page + And I see an address of "1 Test Street" on the juror details reply page + + Examples: + |juror_number |pool_number |user | + |041500012 |415300110 |MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to manually enter super urgent summons reply as jury officer - too many characters + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | | | 1 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + And I log in as "" + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has worked for the police force + And I enter over 2000 characters in the Which police force? text box + And I click continue on the juror summons reply page + Then an error is displayed on the juror summons reply page saying "Police force details must be 2000 characters or less" + + Examples: + |juror_number |pool_number |user | + |041500013 |415300111 |MODTESTCOURT | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3000_assign_to_colleague.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3000_assign_to_colleague.feature new file mode 100644 index 00000000..9ac1f5a2 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3000_assign_to_colleague.feature @@ -0,0 +1,199 @@ +Feature: JM-3000 Assign to a colleague + +@JurorTransformation +Scenario Outline: JM-3000 Assign Reply Happy Path + + #this test needs to stay in single threaded as it checks backlog counts which will be more dynamic in the multi threaded execution + + Given I am on "Bureau" "test" + + And pool no "" is reset to pending allocation + And I have cleared down the juror digital database + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + Given auto straight through processing has been enabled + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + Given I have submitted a first party English ineligibilty response + | part_no |pool_number | last_name |postcode | email |details | + | | | | | |
| + + Given I am on "Bureau" "test" + And I log in as "" + And I click on the "Assign Replies" link + + #check responses counts are displayed + Then I see "1" in the same row as "total" in Backlog box + Then I see "1" in the same row as "standard" in Backlog box + + + #Assign the new replies to CPASS + Then I set how many "Standard" replies I want to assign to "1" + When I check the "ARAMIS" checkbox + When I press the "Assign replies" button + + #view the assigned record + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + + #Check it's assigned to CPASS + When I click on "" in the same row as "" + And I am on the modernisation version of View Summons Reply + And I see assigned to is "ARAMIS" + + #now reassign to SYSTEM + Then I press the "More actions" button + And I click on the "Send to a colleague" link + + #check page content + Then I see "Send this reply to a colleague" on the page + And I see Reply from " " + Then I click on the Select an officer to send to input field + Then I see "ARAMIS" on the page + + #assign to SYSTEM + And I set input field with "id" of "sendToOfficer" to "SYSTEM" + And I press the "Send" button + And I press the "Send" button + + #view the assigned record + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + + #Check it's assigned to SYSTEM + When I click on "" in the same row as "" + And I am on the modernisation version of View Summons Reply + And I see assigned to is "SYSTEM" + + And I click on the "Sign out" link + +Examples: + |part_no |user |pool_no |first_name |last_name |postcode |email |details | + |641500613 |MODTESTBUREAU |415170401 |JOHN |LNAMEEIGHTFOUR |CH1 2AN |email@bureauA.com |12345abcde | + + @JurorTransformation + Scenario Outline: JM-3000 Assign Reply Errors Warnings Validations + + #this test needs to stay in single threaded as it checks backlog counts which will be more dynamic in the multi threaded execution + + Given I am on "Bureau" "test" + + And pool no "" is reset to pending allocation + And I have cleared down the juror digital database + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + | | | 400 | + + Given auto straight through processing has been enabled + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "POSTCODE" as "" new schema + + And "" has "RET_DATE" as "5 mondays time" + And "" has "NEXT_DATE" as "5 mondays time" + And "" has "LNAME" as "" + And "" has "ZIP" as "" + + Given I have submitted a first party English ineligibilty response + | part_no |pool_number | last_name |postcode | email |details | + | | | | | |
| + + Given I have submitted a first party English straight through response + | part_no |pool_number | last_name |postcode | email |details | + | | | | | |
| + + Given I am on "Bureau" "test" + And I log in as "" + And I click on the "Assign Replies" link + + #check responses counts are displayed + Then I see "1" in the same row as "total" in Backlog box + Then I see "1" in the same row as "standard" in Backlog box + + + #Assign the new replies to CPASS + Then I set how many "Standard" replies I want to assign to "1" + When I check the "ARAMIS1" checkbox + When I press the "Assign replies" button + + #view the assigned record + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + + #Check it's assigned to CPASS + When I click on "" in the same row as "" + And I am on the modernisation version of View Summons Reply + And I see assigned to is "ARAMIS1" + + #now reassign + Then I press the "More actions" button + And I click on the "Send to a colleague" link + + #check page content + Then I see "Send this reply to a colleague" on the page + And I see Reply from " " + + #send with no assignee + And I press the "Send" button + Then I see error "Select an officer to send this reply to" + + #send with invalid assignee - bob + And I set input field with "id" of "sendToOfficer" to "bob" + And I see "No results found" on the page + And I press the "Send" button + And I press the "Send" button + Then I see error "Select an officer to send this reply to" + + #send with invalid assignee - 1234 + And I set input field with "id" of "sendToOfficer" to "bob" + And I see "No results found" on the page + And I press the "Send" button + And I press the "Send" button + Then I see error "Select an officer to send this reply to" + + Then I click on the Select an officer to send to input field + Then I see "ARAMIS" on the page + Then I see "SYSTEM" on the page + Then I see "MODTESTBUREAU" on the page + Then I see "ARAMIS1" on the page + Then I see "Return to unassigned replies" on the page + #should not see this court user - raised ticket 3955 +# And I do not see "MODTESTCOURT" on the page + + #click cancel to return to response + Then I click on the "Cancel" link + Then I click on the "Cancel" link + And I am on the modernisation version of View Summons Reply + And I see assigned to is "ARAMIS1" + + #check I cannot reassign a closed response + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + + #Check it's assigned to CPASS + When I click on "" in the same row as "" + And I am on the modernisation version of View Summons Reply + Then I press the "More actions" button + And I do not see link with text "Send to a colleague" + And I see assigned to is "AUTO" + + And I click on the "Sign out" link + + Examples: + |user |pool_no |part_no |part_no_two |first_name |last_name |last_name_two |postcode |email |details | + |MODTESTBUREAU |415170401 |641500613 |641500616 |JOHN |LNAMEONE |LNAMETWO |CH1 2AN |email@bureauA.com |12345abcde | + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3179-summons-reply-mark-as-awaiting-information.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3179-summons-reply-mark-as-awaiting-information.feature new file mode 100644 index 00000000..1430d075 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3179-summons-reply-mark-as-awaiting-information.feature @@ -0,0 +1,113 @@ +Feature: JM-3179 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to mark paper summons reply as awaiting information + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 | | | 5 | 400 | + + And I log in as "MODTESTBUREAU" + + When the user searches for juror record "" from the global search bar + And I record a happy path paper summons response + When the user searches for juror record "" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + And I mark this reply as awaiting information from "" + Then I press the "Confirm" button + And I do not see "Select whether you’re waiting for information from either the juror, court or translation unit" on the page + And I do not see "The summons reply has been updated by another user" on the page + And I see the reply status has updated to "" + + Examples: + | waitingOnReplyFrom | updatedReplyStatus | juror_number | pool_number | + | Juror | AWAITING JUROR INFO | 045200009 | 452300005 | + | Court | AWAITING COURT REPLY | 045200009 | 452300005 | + | Translation unit | AWAITING TRANSLATION | 045200009 | 452300005 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to mark paper summons reply as awaiting information - validation + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 | | | 5 | 400 | + + And I log in as "" + When the user searches for juror record "" from the global search bar + And I record a happy path paper summons response + When the user searches for juror record "" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + Then I press the "Confirm" button + And I see "Select whether you’re waiting for information from either the juror, court or translation unit" on the page + + Examples: + | user | juror_number | pool_number | + | MODTESTBUREAU | 045200010 | 452300006 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to mark summons reply as awaiting information + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 | | | 5 | 400 | + + And I log in as "MODTESTBUREAU" + + When the user searches for juror record "" from the global search bar + And I record a happy path paper summons response + When the user searches for juror record "" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + And I mark this reply as awaiting information from "" + Then I press the "Confirm" button + And I do not see "Select whether you’re waiting for information from either the juror, court or translation unit" on the page + And I do not see "The summons reply has been updated by another user" on the page + And I see the reply status has updated to "" + + Examples: + | waitingOnReplyFrom | updatedReplyStatus | juror_number | pool_number | + | Juror | AWAITING JUROR INFO | 045200011 | 452300007 | + | Court | AWAITING COURT REPLY | 045200011 | 452300007 | + | Translation unit | AWAITING TRANSLATION | 045200011 | 452300007 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to mark summons reply as awaiting information - validation + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + + And I log in as "" + When the user searches for juror record "" from the global search bar + And I record a happy path paper summons response + When the user searches for juror record "" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + Then I press the "Confirm" button + And I see "Select whether you’re waiting for information from either the juror, court or translation unit" on the page + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500821 | 415171103 | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3180-mark-digital-summons-reply-as-responded.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3180-mark-digital-summons-reply-as-responded.feature new file mode 100644 index 00000000..a422e144 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3180-mark-digital-summons-reply-as-responded.feature @@ -0,0 +1,144 @@ +Feature: JM-3180 + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Mark Digital Summons Reply As Responded + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "TITLE" as "Mr" new schema + And juror "" has "FIRST_NAME" as "FNAME" new schema + And juror "" has "LAST_NAME" as "LNAME" new schema + + And I submit a digital response with reasonable adjustment + |part_no |pool_number |last_name |postcode |email |adjustmentNeededCap |details | + | | |LNAME |CH1 2AN |||Reasonable adjustment detail | + + Given I am on "Bureau" "test" + And I log in as "" + + When the user searches for juror record "" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + Then the view summons reply page is displayed + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I click the checkbox to mark the reply as responded + And I confirm I want to mark the reply as responded + And I see the juror record updated banner containing "Responded" + Then I click the link for the juror record + And I see the juror status on the juror record screen has updated to "Responded" + + Examples: + | user | part_no | pool_no | email | adjustmentNeeded | adjustmentFullCaps | adjustmentFull | adjustmentNeededCap| + | MODTESTBUREAU | 641500477 | 415170501 | e@mail.com| limited mobility | L - LIMITED MOBILITY | L - Limited mobility | Limited mobility | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Cancel Marking Digital Summons Reply As Responded + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "TITLE" as "Mr" new schema + And juror "" has "FIRST_NAME" as "FNAME" new schema + And juror "" has "LAST_NAME" as "LNAME" new schema + + And I submit a digital response with reasonable adjustment + |part_no |pool_number |last_name |postcode |email |adjustmentNeededCap |details | + | | |LNAME |CH1 2AN |||Reasonable adjustment detail | + + Given I am on "Bureau" "test" + And I log in as "" + + When the user searches for juror record "" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + Then the view summons reply page is displayed + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + Then I click the cancel link + And I see the juror status on the juror record screen is "Summoned" + + Examples: + | user | part_no | pool_no | email | adjustmentNeeded | adjustmentFullCaps | adjustmentFull | adjustmentNeededCap| + | MODTESTBUREAU | 641500158 | 415170501 | e@mail.com| limited mobility | L - LIMITED MOBILITY | L - Limited mobility | Limited mobility | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Mark Digital Summons Reply As Responded - Mark As Responded Validation + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "TITLE" as "Mr" new schema + And juror "" has "FIRST_NAME" as "FNAME" new schema + And juror "" has "LAST_NAME" as "LNAME" new schema + + And I submit a digital response with reasonable adjustment + |part_no |pool_number |last_name |postcode |email |adjustmentNeededCap |details | + | | |LNAME |CH1 2AN |||Reasonable adjustment detail | + + Given I am on "Bureau" "test" + And I log in as "" + + When the user searches for juror record "" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + Then the view summons reply page is displayed + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I confirm I want to mark the reply as responded + And there is an error message with the text "Confirm that the reply can be marked as 'responded'" + + Examples: + | user | part_no | pool_no | email | adjustmentNeeded | adjustmentFullCaps | adjustmentFull | adjustmentNeededCap| + | MODTESTBUREAU | 641500384 | 415170501 | e@mail.com| limited mobility | L - LIMITED MOBILITY | L - Limited mobility | Limited mobility | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Mark Digital Summons Reply As Responded - Confirm Mark As Responded validation + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "TITLE" as "Mr" new schema + And juror "" has "FNAME" as "FNAME" new schema + And juror "" has "LNAME" as "LNAME" new schema + + And I submit a digital response with reasonable adjustment + |part_no |pool_number |last_name |postcode |email |adjustmentNeededCap |details | + | | |LNAME |CH1 2AN |||Reasonable adjustment detail | + + Given I am on "Bureau" "test" + And I log in as "" + + When the user searches for juror record "" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + Then the view summons reply page is displayed + And I click the process reply button + And I click continue on the juror summons reply page + And there is an error message with the text "Please select a response process type" + + Examples: + | user | part_no | pool_no | email | adjustmentNeeded | adjustmentFullCaps | adjustmentFull | adjustmentNeededCap| + | MODTESTBUREAU | 641500146 | 415170501 | e@mail.com| limited mobility | L - LIMITED MOBILITY | L - Limited mobility | Limited mobility | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3368-super urgent paper reponse.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3368-super urgent paper reponse.feature new file mode 100644 index 00000000..d204fd45 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3368-super urgent paper reponse.feature @@ -0,0 +1,34 @@ +Feature: JM-3368 Super Urgent Paper Response Court + + @JurorTransformationWIP @NewSchemaConverted @5471 + Scenario Outline: JM-3368 As Court User, record super urgent UNHAPPY PATH Paper Response + + Given I am on "bureau" "test" + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + + And "" has "NEXT_DATE" as "1 mondays time" new schema + + And I log in as "" + + When the user searches for juror record "" from the global search bar + + #record unhappy path paper summons + And I record an unhappy path paper summons response + + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "INELIGIBLE" + And I see the super urgent flag + And I see "Summons reply is missing essential information - reply cannot be processed until this information is entered." in the response banner + + And I click on the "Sign out" link + + Examples: + |user |part_no |pool_no | + |MODTESTCOURT |641500412 |415170402 | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3454-3455-paper-request-reasonable-adjustment.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3454-3455-paper-request-reasonable-adjustment.feature new file mode 100644 index 00000000..234b3980 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3454-3455-paper-request-reasonable-adjustment.feature @@ -0,0 +1,97 @@ +Feature: JM-3457 and JM-3456 - Paper Response + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Happy path test to check juror reasonable adjustment - paper + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 | | | 5 | 400 | + + And I log in as "" + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does need adjustments + And I set "What help does the juror need at court?" to "Childcare" + + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + When the user searches for juror record "" from the global search bar + And I click the summons reply tab + When I click on the view summons reply link + And I click the juror details adjustments tab + + Then I see the adjustments status is "Attention\\n\\n" + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + And on the page I see + | text| + |How to ask the court if they can accommodate reasonable adjustments for this juror| + |Create a ticket in Optic | + |Copy and paste the juror information below into the Optic ticket | + |Submit the Optic ticket | + |Enter the Optic reference number here and save | + + And I see the following juror information on the check can accommodate screen + | jurorName | fname lname | + | jurorNumber | | + | jurorMainPhone | 0777777777 | + | jurorEmail | test@test.com | + | jurorAdjustmentReason | | + | jurorAdjustment | | + + And on the page I see + | text| + |Optic ticket number | + |Enter Optic reference | + |This will be an 8 digit number - for example, 37540739| + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now +# When I press the "Copy juror information" button + +# Currently a bug, nothing is copied to clipboard following button press JM-4173 +# Then I can paste the following information "Juror information\\n\\nName: Rev Eleanor Milne\\nJuror number: 111111006\\nMain phone: 44135101-1110\\nEmail: Milne0@email.com\\n\\nDisabilities or impairments\\nType: \\nDetail: " + + When I enter the optic reference number "12345678" + And I press the "Save" button + + When I click the juror details adjustments tab + Then I see the adjustments status is "Attention\\n\\n" + And The newly created optic reference "12345678" is displayed + + And I see the reply status has updated to "AWAITING COURT REPLY" + + Examples: + | user | juror_number | pool_number | jurorAdjustmentNeeded | jurorAdjustmentFull | + | MODTESTBUREAU | 045200008 | 452300004 | Childcare | C - Childcare problems | + diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3457-3456-digital-request-reasonable-adjustment.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3457-3456-digital-request-reasonable-adjustment.feature new file mode 100644 index 00000000..e1cd4bce --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3457-3456-digital-request-reasonable-adjustment.feature @@ -0,0 +1,137 @@ +Feature: JM-3457 and JM-3456 - Digital Response + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Happy path test to check juror reasonable adjustment + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "TITLE" as "Mr" new schema + And juror "" has "FNAME" as "FNAME" new schema + And juror "" has "LNAME" as "LNAME" new schema + + And I submit a digital response with reasonable adjustment + |part_no |pool_number |last_name |postcode |email |adjustmentNeededCap |details | + | | |LNAME |CH1 2AN ||| | + + Given I am on "Bureau" "test" + + And I log in as "MODTESTBUREAU" + + When the user searches for juror record "" from the global search bar + And I click the summons reply tab + When I click on the view summons reply link + And I click the juror details adjustments tab + + Then I see the adjustments status is "Attention\\n\\n" + + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + And on the page I see + | text| + |How to ask the court if they can accommodate reasonable adjustments for this juror| + |Create a ticket in Optic | + |Copy and paste the juror information below into the Optic ticket | + |Submit the Optic ticket | + |Enter the Optic reference number here and save | + + And I see the following juror information on the check can accommodate screen + | jurorName | Mr FNAME LNAME | + | jurorNumber | | + | jurorMainPhone | 01234561234 | + | jurorEmail | | + | jurorAdjustmentReason | | + | jurorAdjustment | | + + And on the page I see + | text| + |Optic ticket number | + |Enter Optic reference | + |This will be an 8 digit number - for example, 37540739| + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now +# When I press the "Copy juror information" button + +# Currently a bug, nothing is copied to clipboard following button press +# Then I can paste the following information "Juror information\\n\\nName: Rev Eleanor Milne\\nJuror number: 111111003\\nMain phone: 44135101-1110\\nEmail: Milne0@email.com\\n\\nDisabilities or impairments\\nType: \\nDetail: " + + When I enter the optic reference number "12345678" + And I press the "Save" button + + When I click the juror details adjustments tab + + Then I see the adjustments status is "Attention\\n\\n" + And The newly created optic reference "12345678" is displayed + + And I see the reply status has updated to "AWAITING COURT REPLY" + + Examples: + | part_no | pool_no | email | adjustmentNeeded | adjustmentFullCaps | adjustmentFull | adjustmentNeededCap | + | 641500514| 415170402| e@mail.com| limited mobility | L - LIMITED MOBILITY | L - Limited mobility | Limited mobility | + | 641500698| 415170402| e@mail.com| vision impairment | V - VISUAL IMPAIRMENT | V - Visual impairment | Severe sight impairment| + | 641500701| 415170402| e@mail.com| hearing impairment | H - HEARING IMPAIRMENT| H - Hearing impairment | Hearing impairment | + + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Errors and warnings on check court can accommodate + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I submit a digital response with reasonable adjustment + |part_no |pool_number |last_name |postcode |email |adjustmentNeededCap |details | + | | |LNAME |CH1 2AN || | | + + Given I am on "Bureau" "test" + And I log in as "" + + When the user searches for juror record "" from the global search bar + And I click the summons reply tab + When I click on the view summons reply link + And I click the juror details adjustments tab + Then I see the adjustments status is "Attention\\n\\n" + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + When I press the "Save" button + +# Check Missing Optic reference Number error + Then I see "Please add an optic reference" on the page + And I see "Optic reference is missing" on the page + +# Check Optic reference number less than 8 characters error + When I enter the optic reference number "123456" + And I press the "Save" button + Then I see "Enter the Optic reference as an 8 digit number - you cannot enter letters or special characters" on the page + +# Check Optic reference number more than 8 characters error + When I enter the optic reference number "123456789" + And I press the "Save" button + Then I see "Enter the Optic reference as an 8 digit number - you cannot enter letters or special characters" on the page + +# Check Optic reference number with special characters or letters error + When I enter the optic reference number "123abc!" + And I press the "Save" button + Then I see "Enter the Optic reference as an 8 digit number - you cannot enter letters or special characters" on the page + + When I click on the "Cancel" link + + And I click the juror details adjustments tab + Then I see the adjustments status is "Attention\\n\\n" + And I see the reply status has updated to "TO DO" + + Examples: + | user | part_no | pool_no | email | adjustmentNeededCap | adjustmentFullCaps | adjustmentNeeded | + | MODTESTBUREAU | 641500286 | 415170501 | e@mail.com | Limited mobility | L - LIMITED MOBILITY | Reasonable adjustment detail | + diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3460-3183- mark-summons-reply-as-responded.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3460-3183- mark-summons-reply-as-responded.feature new file mode 100644 index 00000000..3de13427 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3460-3183- mark-summons-reply-as-responded.feature @@ -0,0 +1,182 @@ +Feature: JM-3460 JM-3183 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Mark Paper Summons Reply As Responded + Given I am on "Bureau" "test" + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + And pool "" has attendance date as "7 mondays time" new schema + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I click no, to process the summons reply later + Then the view summons reply page is displayed + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I click the checkbox to mark the reply as responded + And I confirm I want to mark the reply as responded + And I see the juror record updated banner containing "Responded" + Then I click the link for the juror record + And I see the juror status on the juror record screen has updated to "Responded" + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500972 | 415170501 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Cancel Marking Paper Summons Reply As Responded + Given I am on "Bureau" "test" + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + And pool "" has attendance date as "7 mondays time" new schema + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I click no, to process the summons reply later + Then the view summons reply page is displayed + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + Then I click the cancel link + And I see the juror status on the juror record screen is "Summoned" + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500981 | 415170501 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Mark Paper Summons Reply As Responded - Mark As Responded Validation + Given I am on "Bureau" "test" + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + And pool "" has attendance date as "7 mondays time" new schema + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I click no, to process the summons reply later + Then the view summons reply page is displayed + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I confirm I want to mark the reply as responded + And there is an error message with the text "Confirm that the reply can be marked as 'responded'" + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500985 | 415170501 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Mark Paper Summons Reply As Responded - Confirm Mark As Responded validation + Given I am on "Bureau" "test" + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + And pool "" has attendance date as "7 mondays time" new schema + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I click no, to process the summons reply later + Then the view summons reply page is displayed + And I click the process reply button + And I click continue on the juror summons reply page + And there is an error message with the text "Please select a response process type" + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500987 | 415170501 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3546-3466-3717-bureau-digital-reply-awaiting-info-translation.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3546-3466-3717-bureau-digital-reply-awaiting-info-translation.feature new file mode 100644 index 00000000..b19fe14d --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3546-3466-3717-bureau-digital-reply-awaiting-info-translation.feature @@ -0,0 +1,163 @@ +Feature: JM-3546 and JM-3466 Bureau User Marks Digital Response as Awaiting Info + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Bureau User Marks Digital Response as Awaiting Info - happy path + + Given I am on "Public" "test" + Given the juror numbers have not been processed new schema + |part_no |pool_no |owner | + || |400 | + + Given "" has "NEXT_DATE" as "5 mondays time" new schema + + # Submit response in pool + + Given I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + | | | | |a@a.com| + + #log on + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #search for response + And I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + When I click on "" in the same row as "" + + #check options + Then I press the "More actions" button + + Then I click on the "Mark as awaiting information" link + + When I set the radio button to "Court" + Then the radio button "Juror" is "unselected" + Then the radio button "Court" is "selected" + Then the radio button "Translation unit" is "unselected" + + When I set the radio button to "Translation unit" + Then the radio button "Juror" is "unselected" + Then the radio button "Court" is "unselected" + Then the radio button "Translation unit" is "selected" + + When I set the radio button to "Juror" + Then the radio button "Juror" is "selected" + Then the radio button "Court" is "unselected" + Then the radio button "Translation unit" is "unselected" + + Then I press the "Confirm" button + + #check response is updated correctly + And I am on the modernisation version of View Summons Reply + Then I see the reply "status" on the response is "AWAITING JUROR INFO" + Then I see the reply "type" on the response is "NEEDS REVIEW" + Then I see Reply Method is "Digital" + + Examples: + |part_no |pool_no |last_name |postcode | + |645200186 |452170401 |LNAMEONEEIGHTSIX |SY2 6LU | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Bureau User Marks Digital Response as Awaiting Info - navigation + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no |pool_no |owner | + || |400 | + + Given "" has "NEXT_DATE" as "5 mondays time" new schema + + # Submit response in pool + Given I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + | | | | |a@a.com| + + #log on + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #search for response + And I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + When I click on "" in the same row as "" + + #go to awaiting inforamation + Then I press the "More actions" button + Then I click on the "Mark as awaiting information" link + + When I set the radio button to "Juror" + Then the radio button "Juror" is "selected" + + #cancel + When I click on the "Cancel" link + And I am on the modernisation version of View Summons Reply + Then I see the reply "status" on the response is "TO DO" + + #go to awaiting inforamation + Then I press the "More actions" button + Then I click on the "Mark as awaiting information" link + + When I set the radio button to "Juror" + Then the radio button "Juror" is "selected" + Then I press the "Confirm" button + + #check response is updated correctly + And I am on the modernisation version of View Summons Reply + Then I see the reply "status" on the response is "AWAITING JUROR INFO" + Then I see the reply "type" on the response is "NEEDS REVIEW" + Then I see Reply Method is "Digital" + + Examples: + |part_no |pool_no |last_name |postcode | + |645200289 |452170401 |LNAMETWOEIGHTNINE |SY2 6LU | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Bureau User Marks Digital Response as Awaiting Info - errors and warnings + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no |pool_no |owner | + || |400 | + + Given "" has "NEXT_DATE" as "5 mondays time" new schema + + # Submit response in pool + Given I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + | | | | |a@a.com| + + #log on + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #search for response + And I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + When I click on "" in the same row as "" + + #go to awaiting inforamation + Then I press the "More actions" button + Then I click on the "Mark as awaiting information" link + + #errors when no option selected + When I press the "Confirm" button + Then I see "Select whether you’re waiting for information from either the juror, court or translation unit" on the page + + When I set the radio button to "Juror" + Then the radio button "Juror" is "selected" + Then I press the "Confirm" button + + #check response is updated correctly + And I am on the modernisation version of View Summons Reply + Then I see the reply "status" on the response is "AWAITING JUROR INFO" + Then I see the reply "type" on the response is "NEEDS REVIEW" + Then I see Reply Method is "Digital" + + Examples: + |part_no |pool_no |last_name |postcode | + |645200289 |452170401 |LNAMETWOEIGHTNINE |SY2 6LU | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3686.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3686.feature new file mode 100644 index 00000000..ef828227 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3686.feature @@ -0,0 +1,171 @@ +Feature: JM-3686 + + @JurorTransformationWIP @NewSchemaConverted @JM-5469 + Scenario Outline: JM-3686 - End to End test for updating paper response information from juror + + Given I am on "Bureau" "test" + + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "1 mondays time" new schema + + Given the request letter for part_no "" is deleted + + When the user searches for juror record "" from the global search bar + + #record paper summons response + And I record a happy path paper summons response + + #skip straight through processing + Then I see "Do you want to process this summons reply as responded now?" on the page + Then I see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + When I click on the "No, skip and process later" link + + When the user searches for juror record "" from the global search bar + Then the view summons reply page is displayed + + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see "SUMMONS REPLY" on the page + And I click on the "Add or change" link + And I see "Juror details" on the page + + #juror details + And I click on the "Fix error in current name" link + And I set "First name" to "Steven" + And I set "Last name" to "Test" + And I press the "Save" button + And I press the "Continue" button + + #eligibility + Then I select the Eligibility tab from the summons reply page + And I click on the "Add or change" link + Then I set residency in the UK radio button to No + And I press the "Continue" button + Then I select the Eligibility tab from the summons reply page + And I see "Attention" in the same row as "Residency" + + #Deferral or excusal + Then I select the Deferral or Excusal tab from the summons reply page + And I click on the "Add or change" link + And I set the radio button to "Excusal request" + And I press the "Continue" button + Then I select the Deferral or Excusal tab from the summons reply page + And I see "Attention" on the page + And I see "Excusal request" on the page + + #CJS Employment + Then I select the CJS Employment tab from the summons reply page + And I see "CJS employment" on the page + And I click on the "Add or change" link + And I set the radio button to "Yes" + And I check the "Police force" checkbox + And I set "Which police force?" to "Metropolitan police" + And I press the "Continue" button + Then I select the CJS Employment tab from the summons reply page + And I see "Attention" on the page + And I see "Police Force" on the page + + #Reasonable Adjustments + + Then I select the reasonable adjustments tab from the summons reply page + And I see "Reasonable adjustments" on the page + And I click on the "Add or change" link + And I see "Will the juror need extra support or facilities at court?" on the page + And I set the radio button to "Yes" + And I see "Select reason" on the page + When I select "D - Diet" from the "Select reason" dropdown + And I set "What help does the juror need at court" to "Nutritional Guidance" + And I press the "Continue" button + + Then I select the Signature tab from the summons reply page + And I click on the "Add or change" link + And I see "Has the summons reply been signed?" on the page + Then I set the radio button to "No" + And I press the "Done" button + And I see "Summons reply is missing essential information - reply cannot be processed until this information is entered." on the page + Then I select the Signature tab from the summons reply page + And I see "Required" on the page + And I click on the "Add or change" link + Then I set the radio button to "Yes" + And I press the "Done" button + And I do not see "Summons reply is missing essential information - reply cannot be processed until this information is entered." on the page + + And I click the More Actions button + And I press the "Request juror info by post" button + + And I press the "Continue" button + And I see error "Select what information you need from the juror" + + #additonal info/checking checkboxes work + And I check the "Date of birth" checkbox + And "Date of birth" is checked + + And I check the "Telephone number" checkbox + And "Telephone number" is checked + + And I check the "Residency" checkbox + And "Residency" is checked + + And I check the "Mental Health Act" checkbox + And "Mental Health Act" is checked + + And I check the "Mental Capacity Act" checkbox + And "Mental Capacity Act" is checked + + And I check the "Bail" checkbox + And "Bail" is checked + + And I check the "Convictions" checkbox + And "Convictions" is checked + + And I check the "Can the juror serve on the date shown in summons?" checkbox + And "Can the juror serve on the date shown in summons?" is checked + + And I check the "Has the juror worked in the criminal justice system in the last 5 years?" checkbox + And "Has the juror worked in the criminal justice system in the last 5 years?" is checked + + + And I check the "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" checkbox + And "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" is checked + + And I check the "The juror needs to sign their summons reply" checkbox + And "The juror needs to sign their summons reply" is checked + + And I press the "Continue" button + + #prompted to created manual letter + And I see "You need to manually create a letter to send to the juror" on the page + And I see "A letter will not be sent automatically." on the page + And I see "Create a letter requesting a signature on the summons reply, using the letter generator on the shared drive." on the page + And I see "If you’re missing other information apart from the signature, you need to manually ask for this in the letter you create." on the page + And I see "Post the letter to the juror along with the original summons reply for them to sign." on the page + + #back + And I click on the "Back" link + And I uncheck the "Has the juror worked in the criminal justice system in the last 5 years?" checkbox + And I uncheck the "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" checkbox + And I uncheck the "The juror needs to sign their summons reply" checkbox + + #automatic letter + And I press the "Continue" button + And I see "A letter will be automatically sent to the juror requesting the missing information" on the page + And I see "This will be sent tomorrow." on the page + And I see "If you hear back from the juror before 6pm today, you should process the reply." on the page + + And I press the "Done" button + + And I see "Summons replies" on the page + And I see link with text "View juror's record" + + #check request letter row + Then I check that a "request information" letter has been generated + + Examples: + |part_no |pool_no | user | + |641500680|415170402 | MODTESTBUREAU | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3721-awaiting-translation.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3721-awaiting-translation.feature new file mode 100644 index 00000000..3fa7b4b8 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3721-awaiting-translation.feature @@ -0,0 +1,266 @@ +Feature: JM-3721 Awaiting Translation + +@JurorTransformationMulti @NewSchemaConverted +Scenario Outline: JM-3721 As Court User, set Paper Response status as Awaiting Translation + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + And I log in as "" + + #view the record + Then I set "Search for a juror record" to "" + When I press the "Search" button + And I am on the court Juror Record for juror "" + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + welsh + When I fill in all of the juror details for the summons reply + Then I select that the juror wants communications in Welsh + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I click on the "No, skip and process later" link + Then the view summons reply page is displayed + + And I see the reply status has updated to "TO DO" + + #check DB +# Then on "JUROR_DIGITAL" . "PAPER_RESPONSE" I see "WELSH" is "Y" where "JUROR_NUMBER" is "" + + #now mark as awaiting translation + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + And I mark this reply as awaiting information from "Translation unit" + Then I press the "Confirm" button + And I see the reply status has updated to "AWAITING TRANSLATION" + + And I click on the "Sign out" link + + Examples: + | user | part_no | pool_no | + | MODTESTCOURT | 641500685 | 415170501 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: JM-3721 As Court User, set Paper Response status as Awaiting Translation - errors and warnings + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + And I log in as "" + + #view the record + Then I set "Search for a juror record" to "" + When I press the "Search" button + And I am on the court Juror Record for juror "" + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + welsh + When I fill in all of the juror details for the summons reply + Then I select that the juror wants communications in Welsh + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I click on the "No, skip and process later" link + Then the view summons reply page is displayed + + And I see the reply status has updated to "TO DO" + + #check DB +# Then on "JUROR_DIGITAL" . "PAPER_RESPONSE" I see "WELSH" is "Y" where "JUROR_NUMBER" is "" + + #now mark as awaiting translation + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + + #errors and warnings + Then I press the "Confirm" button + And I see "re waiting for information from either the juror, court or translation unit" on the page + + And I mark this reply as awaiting information from "Translation unit" + Then I press the "Confirm" button + And I see the reply status has updated to "AWAITING TRANSLATION" + + And I click on the "Sign out" link + + Examples: + | user | part_no | pool_no | + | MODTESTCOURT | 641500687 | 415170402 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: JM-3721 As Court User, set Paper Response status as Awaiting Translation - navigation + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + | | | 415 | + + And I log in as "" + + #view the record + Then I set "Search for a juror record" to "" + When I press the "Search" button + And I am on the court Juror Record for juror "" + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + welsh + When I fill in all of the juror details for the summons reply + Then I select that the juror wants communications in Welsh + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I select that the juror can serve on the summons date + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I click on the "No, skip and process later" link + Then the view summons reply page is displayed + + And I see the reply status has updated to "TO DO" + + #check DB +# Then on "JUROR_DIGITAL" . "PAPER_RESPONSE" I see "WELSH" is "Y" where "JUROR_NUMBER" is "" + + #now mark as awaiting translation + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + + #navigation - cancel + Then I click on the "Cancel" link + Then the view summons reply page is displayed + + #now mark as awaiting translation + And I click the More Actions button + And I click Awaiting Information + Then I see "Who are you waiting for information from?" on the page + + #navigation - select different buttons + And I mark this reply as awaiting information from "Translation unit" + Then the radio button "Translation unit" is "selected" + And the radio button "Court" is "unselected" + And the radio button "Juror" is "unselected" + + And I mark this reply as awaiting information from "Court" + Then the radio button "Translation unit" is "unselected" + And the radio button "Court" is "selected" + And the radio button "Juror" is "unselected" + + And I mark this reply as awaiting information from "Juror" + Then the radio button "Translation unit" is "unselected" + And the radio button "Court" is "unselected" + And the radio button "Juror" is "selected" + + And I mark this reply as awaiting information from "Translation unit" + Then I press the "Confirm" button + And I see the reply status has updated to "AWAITING TRANSLATION" + + And I click on the "Sign out" link + + Examples: + | user | part_no | pool_no | + | MODTESTCOURT | 641500695 | 415170402 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3724-3723-disqualify-juror-on-age.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3724-3723-disqualify-juror-on-age.feature new file mode 100644 index 00000000..bcd076f8 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3724-3723-disqualify-juror-on-age.feature @@ -0,0 +1,87 @@ +Feature: JM-3724 JM-3723 + + @JurorTransformation @NewSchemaConverted + Scenario Outline: test to disqualify juror - too old + Given I am on "Bureau" "test" + + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + And I enter a date of birth in the summons reply that will make the juror too old + And I click continue on the juror summons reply page + And I see "Check the date of birth" on the page + And I am asked if the date of birth is correct + Then I click yes to disqualify the juror + And I see "successfully processed: Disqualified (age)" on the page + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500820 | 415170501 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: test to disqualify juror - too young + Given I am on "Bureau" "test" + + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + And I enter a date of birth in the summons reply that will make the juror too young + And I click continue on the juror summons reply page + And I see "Check the date of birth" on the page + And I am asked if the date of birth is correct + And I click yes to disqualify the juror + And I see "successfully processed: Disqualified (age)" on the page + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500826 | 415170501 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: test to disqualify juror - incorrect date provided - change date + Given I am on "Bureau" "test" + + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "7 mondays time" new schema + + When the user searches for juror record "" from the global search bar + And I click the Enter summons reply button + Then the juror details form is displayed + And I enter a date of birth in the summons reply that will make the juror too old + And I click continue on the juror summons reply page + And I see "Check the date of birth" on the page + And I am asked if the date of birth is correct + Then I click no to change the date of birth to the correct date + Then the juror details form is displayed + And I enter a date of birth that will make the juror between 18 and 75 + And I click continue on the juror summons reply page + And I do not see "Check the date of birth" on the page + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500828 | 415170501 | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3725-3726-disqaulify-juror-on-age-digital.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3725-3726-disqaulify-juror-on-age-digital.feature new file mode 100644 index 00000000..ffd36feb --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3725-3726-disqaulify-juror-on-age-digital.feature @@ -0,0 +1,106 @@ +Feature: JM-3725 JM-3726 + + @JurorTransformationWIP @JurorDigitalNotConverted + Scenario Outline: test to disqualify juror - too old - digital + + #this test will fail until juror digital app is converted over to new schema + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I record a digital response for a juror that is too old + |jurorNumber | | + |jurorLname | | + |jurorPostcode | | + + Given I am on "Bureau" "test" + + Given I log in as "MODTESTBUREAU" + + When the user searches for juror record "" from the global search bar + Then I see the juror status on the juror record screen is "Disqualified" + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "AUTO PROCESSED" + And I see the juror status has updated to "Disqualified" + And I see the reply "status" on the response is "COMPLETED" + + Examples: + |part_no |l_name |zip |pool_no | + |641500840|L'NAMEEIGHTFOUR-ZERO |CH1 2AN |415170402 | + + @JurorTransformationWIP @JurorDigitalNotConverted + Scenario Outline: test to disqualify juror - too young - digital + + #this test will fail until juror digital app is converted over to new schema + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I record a digital response for a juror that is too young + |jurorNumber | | + |jurorLname | | + |jurorPostcode | | + + Given I am on "Bureau" "test" + + Given I log in as "MODTESTBUREAU" + + When the user searches for juror record "" from the global search bar + Then I see the juror status on the juror record screen is "Disqualified" + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "AUTO PROCESSED" + And I see the juror status has updated to "Disqualified" + And I see the reply "status" on the response is "COMPLETED" + + Examples: + |part_no |l_name |zip |pool_no | + |641500834|LNAMEEIGHTTHREEFOUR |CH1 2AN |415170402| + + @JurorTransformationWIP @JurorDigitalNotConverted + Scenario Outline: test to disqualify juror - incorrect date provided - change date - digital + + #this test will fail until juror digital app is converted over to new schema + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I record a digital response for a juror that provides an incorrect DoB and corrects it + |jurorNumber | | + |jurorLname | | + |jurorPostcode | | + + Given I am on "Bureau" "test" + + Given I log in as "MODTESTBUREAU" + + When the user searches for juror record "" from the global search bar + Then I see the juror status on the juror record screen is "Responded" + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "AUTO PROCESSED" + And I see the juror status has updated to "Responded" + And I see the reply "status" on the response is "COMPLETED" + + Examples: + |part_no |l_name |zip |pool_no | + |641500064|LNAMESIXFOUR |CH1 2AN |415170402 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3725.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3725.feature new file mode 100644 index 00000000..34feadbd --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3725.feature @@ -0,0 +1,56 @@ +Feature: JM-3725 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Automatically disqualify a juror if they are over 75 + + Given I am on "Bureau" "test" + + And I log in as "" + + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Crown" court pool request for court "415" and summon jurors + Then I select the pool that I have just created to move to the pool summary page + And I select one of the jurors I have just summoned + And I see "Juror status" on the page + + #record paper summons response + And I click the Enter summons reply button + And I enter a date of birth in the summons reply that will make the juror too old + And I press the "Continue" button + And I see "Check the date of birth" on the page + And I see "Is their date of birth correct?" on the page + And I press the "Yes - disqualify juror" button + And I see the juror record updated banner containing "Disqualified (age)" + + Examples: + | user | + | MODTESTBUREAU | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Automatically disqualify a juror if they are under 18 + + Given I am on "Bureau" "test" + + And I log in as "" + + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Crown" court pool request for court "415" and summon jurors + Then I select the pool that I have just created to move to the pool summary page + And I select one of the jurors I have just summoned + And I see "Juror status" on the page + + #record paper summons response + And I click the Enter summons reply button + And I enter a date of birth in the summons reply that will make the juror too young + And I press the "Continue" button + And I see "Check the date of birth" on the page + And I see "Is their date of birth correct?" on the page + And I press the "Yes - disqualify juror" button + And I see the juror record updated banner containing "Disqualified (age)" + + Examples: + | user | + | MODTESTBUREAU | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3770.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3770.feature new file mode 100644 index 00000000..ac1c363b --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3770.feature @@ -0,0 +1,111 @@ +Feature: JM-3770 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Disqualify Juror because of Residency reasons - Paper + + Given I am on "Bureau" "test" + + And I log in as "" + + Given the juror numbers have not been processed new schema + |part_no |pool_no |owner | + || |400 | + + Given "" has "NEXT_DATE" as "5 mondays time" new schema + + When the user searches for juror record "" from the global search bar + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + + #When I answer the juror summons reply eligibility questions + When I answer the juror summons reply eligibility questions with juror Residency set to No + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + And I see "Summons replies" on the page + + And I press the "Process reply" button + And I set the radio button to "Disqualify" + And I press the "Continue" button + + And I set the radio button to "R - Residency" + And I press the "Continue" button + And I see "Summons reply for 641500575 FNAMEFIVESEVENFIVE LNAMEFIVESEVENFIVE successfully processed: Disqualified (Residency)" on the page + + Examples: + |part_no | pool_no | user | + |641500575| 415170402 |MODTESTBUREAU | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Disqualify Juror because of Residency reasons - Digital + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no |pool_no |owner | + || |400 | + + Given "" has "NEXT_DATE" as "5 mondays time" new schema + + # Submit response in pool + Given I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + | | | | |e@mail.com| + + #log on + Given I am on "Bureau" "test" + And I log in as "" + + #search for response + And I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + When I click on "" in the same row as "" + + #check options/Disqualify juror + And I press the "Process reply" button + And I set the radio button to "Disqualify" + And I click on the "Cancel" link + And I press the "Process reply" button + And I press the "Continue" button + And I see error "Please select a response process type" + And I set the radio button to "Disqualify" + And I press the "Continue" button + And I press the "Continue" button + And I see error "Select the reason why you're disqualifying this juror" + + And I set the radio button to "R - Residency" + And I press the "Continue" button + And I see "Summons reply for 641500960 FNAMENINESIXZERO LNAMENINESIXZERO successfully processed: Disqualified (Residency)" on the page + And I see "Your work" on the page + + Examples: + |part_no | user | pool_no |last_name | postcode| + |641500960| MODTESTBUREAU | 415170402| LNAMENINESIXZERO | CH1 2AN | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3803-grant_excusal_digital.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3803-grant_excusal_digital.feature new file mode 100644 index 00000000..b3b42589 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3803-grant_excusal_digital.feature @@ -0,0 +1,76 @@ +Feature: Grant excusal digital + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Test to grant excusal on digital response + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I have submitted a first party English excusal response + |part_no |pool_number|last_name |postcode | email | + || | | || + + Given I am on "Bureau" "test" + + And I log in as "" + + When I search for juror "" + Then I click the summons reply tab + And I click on the view summons reply link + Then the view summons reply page is displayed + And I select Process reply + And I select the Excusal radio button + And I click continue on the process reply page + And I select "" from the dropdown + And I select the Grant Excusal radio button + And I click continue on the process reply page + Then I see the excusal success message for "" + + Examples: + | dropDown | excusalReason | user | part_no | pool_no | last_name | postcode | email | + | C - CHILD CARE | child care | MODTESTBUREAU | 641500588 | 415170402 | LNAMEFIVEEIGHTEIGHT | CH1 2AN | e@mail.com | + | D - DECEASED | deceased | MODTESTBUREAU | 641500602 | 415170402 | LNAMESIXZEROTWO | CH1 2AN | e@mail.com | + + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Test to grant excusal on digital response from search + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I have submitted a first party English excusal response + |part_no |pool_number|last_name |postcode | email | + || | | || + + Given I am on "Bureau" "test" + + And I log in as "" + When I click on the "Search" link + And I set "Juror number" to "" + And I press the "Search" button + And I click on "" in the same row as "" + And I select Process reply + And I select the Excusal radio button + And I click continue on the process reply page + And I select "" from the dropdown + And I select the Grant Excusal radio button + And I click continue on the process reply page + Then I see the excusal success message for "" + + Examples: + | dropDown | excusalReason | user | part_no | pool_no | last_name | postcode | email | + | C - CHILD CARE | child care | MODTESTBUREAU | 641500604 | 415170402 | LNAMESIXZEROFOUR | CH1 2AN | e@mail.com | + | D - DECEASED | deceased | MODTESTBUREAU | 641500606 | 415170402 | LNAMESIXZEROSIX | CH1 2AN | e@mail.com | + diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3807-decline-excusal-digital.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3807-decline-excusal-digital.feature new file mode 100644 index 00000000..1b2560ef --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3807-decline-excusal-digital.feature @@ -0,0 +1,38 @@ +Feature: Decline excusal digital + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Test to decline excusal on digital response + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I have submitted a first party English excusal response + |part_no |pool_number|last_name |postcode | email | + | | | | || + + Given I am on "Bureau" "test" + + And I log in as "" + + When I search for juror "" + Then I click the summons reply tab + And I click on the view summons reply link + Then the view summons reply page is displayed + And I select Process reply + And I select the Excusal radio button + And I click continue on the process reply page + And I select "" from the dropdown + And I select the Refuse Excusal radio button + And I click continue on the process reply page + Then I see the refuse excusal success message for "" + + Examples: + | dropDown | excusalReason | user | part_no | pool_no | last_name | postcode | email | + | C - CHILD CARE | child care | MODTESTBUREAU | 641500576 | 415170402 | LNAMEFIVESEVENSIX | CH1 2AN | e@mail.com | + | D - DECEASED | deceased | MODTESTBUREAU | 641500577 | 415170402 | LNAMEFIVESEVENSEVEN | CH1 2AN | e@mail.com | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3811-mark_as_deceased_digital.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3811-mark_as_deceased_digital.feature new file mode 100644 index 00000000..a2aa9528 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3811-mark_as_deceased_digital.feature @@ -0,0 +1,40 @@ +Feature: JM-3811 Mark as deceased digital + + @JurorTransformationWIP @JM-3814 + Scenario Outline: Test to grant deceased excusal on digital response + # To be implemented as part of story 3814 + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "1 mondays time" new schema + + And I have submitted a third party English deceased response + |part_no |pool_number|last_name |postcode |email | + || | | || + + Given I am on "Bureau" "test" + Given I log in as "" + + And the user searches for juror record "" from the global search bar + When I click the summons reply tab + #fails due to defect JM-4742 + When I click on the view summons reply link + And I select Process reply + And I select the Excusal radio button + And I click continue on the process reply page + And I select "D - DECEASED" from the dropdown + And I select the Grant Excusal radio button + And I click continue on the process reply page + #fails due to defect JM-4722 + Then I see the excusal success message for "deceased" + When I navigate to the summons reply + And I see the reply status has updated to "COMPLETED" + And I see the juror status has updated to "Deceased" + + Examples: + |part_no |pool_no |last_name |postcode |email |user | + |641500647 |415170402 |LNAMESIXFOURSEVEN|CH1 2AN |e@mail.com |MODTESTBUREAU| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3812-3893-paper-mark-juror-as-deceased.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3812-3893-paper-mark-juror-as-deceased.feature new file mode 100644 index 00000000..3415ce49 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3812-3893-paper-mark-juror-as-deceased.feature @@ -0,0 +1,90 @@ +Feature: JM-3812 JM-3893 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to mark juror as deceased for a paper record + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I log in as "" + And I search for juror "" + And I click the update juror record button + And I select the mark as deceased radio button + + And I add a comment of "Test Comment" to be recorded in the jurors history + Then I click continue on the update juror record screen + And I see the juror record updated banner containing "Deceased" + And I see the juror status on the juror record screen has updated to "Deceased" + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500236 |415170402| + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to mark juror as deceased for a paper record - Validation + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + + And I log in as "" + + And I search for juror "" + And I click the update juror record button + And I select the mark as deceased radio button + Then I click continue on the update juror record screen + And I see "Enter comments to record in the juror’s history" in the error banner + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500432 |415170402| + + @JurorTransformationWIP @JM-5469 @NewSchemaConverted + Scenario Outline: Test to mark juror as deceased for a paper record - Summons reply updated + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | | | 400 | + + + And "" has "NEXT_DATE" as "5 mondays time" new schema + And juror "" has "FIRST_NAME" as "" new schema + And juror "" has "LAST_NAME" as "" new schema + And juror "" has "TITLE" as "" new schema + + And I log in as "<user>" + + And I search for juror "<part_no>" + Then I record a happy path paper summons response + Then I see "Do you want to process this summons reply as responded now?" on the page + When I click on the "No, skip and process later" link + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I click the checkbox to mark the reply as responded + And I confirm I want to mark the reply as responded + And I see "Summons reply for <part_no> <title> <fname> <lname> successfully processed: Responded" in the response banner + Then I click the link for the juror record + And I click the update juror record button + And I select the mark as deceased radio button + #fails due to JM-4919 + And I add a comment of "Test Comment" to be recorded in the jurors history + Then I click continue on the update juror record screen + And I see the juror record updated banner containing "Deceased" + And I see the juror status on the juror record screen has updated to "Deceased" + When I navigate to the paper summons reply + Then I see the juror status has updated to "Deceased" + + Examples: + |user |part_no |pool_no |title|fname |lname| + |MODTESTBUREAU|641500451 |415170402|Mr |FNAMEFOURFIVEONE |LNAMEFOURFIVEONE| diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3813-decline-excusal-paper-juror-record.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3813-decline-excusal-paper-juror-record.feature new file mode 100644 index 00000000..0adc3d2d --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3813-decline-excusal-paper-juror-record.feature @@ -0,0 +1,66 @@ +Feature: JM-3813 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Decline Excusal Request for Paper Response as Bureau user - Juror Record View + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And juror "<part_no>" has "FIRST_NAME" as "<fname>" new schema + And juror "<part_no>" has "LAST_NAME" as "<lname>" new schema + + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + + #record paper summons response + And I record an excusal request paper summons response + + Then the view summons reply page is displayed + + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "EXCUSAL" + + #process response : cancel and return + Then I see the name of the juror on the page header + And I see the reply status on the page + And I press the "Process reply" button + Then I click on the "Cancel" link + And I see "View juror's record" on the page + + #error message when no option selected + And I press the "Process reply" button + And I press the "Continue" button + And I see error "Please select a response process type" + + #select refuse excusal + And I set the radio button to "Excusal - grant or refuse" + Then I press the "Continue" button + And I select "O - OTHER" from the "Reason for excusal request" dropdown + And I set the radio button to "Refuse excusal" + And I press the "Continue" button + And I see "Excusal refused (other)" on the page + And I see "Summons reply for <part_no> <fname> <lname> successfully processed: Excusal refused (other)" in the response banner + + #return to juror record + When the user searches for juror record "<part_no>" from the global search bar + Then I am on the Juror Record for juror "<part_no>" + Then I see the juror's status on the juror record screen is "Responded" + And the warning icon is displayed next to the juror status + + #check updated summons reply tab + When I click on the Summons Reply tab + Then I see the reply status of the summons reply on juror record is "COMPLETED" + And I see the processing outcome of the summons reply on juror record is "Excusal refused (other)" + And the warning icon is displayed next to the processing outcome + And I see the reply date of the summons reply on juror record is "today" + And I see the reply method of the summons reply on juror record is "Paper" + + Examples: + | user | part_no | pool_no |fname |lname | + | MODTESTBUREAU | 641500898 | 415170402 |FNAMETWOZEROTWO |LNAMETWOZEROTWO| diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3826.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3826.feature new file mode 100644 index 00000000..edb3ced4 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3826.feature @@ -0,0 +1,192 @@ +Feature: JM-3826 Request Additional Information + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Request Additional Information JM-3826 + + Given I am on "Bureau" "test" + And I log in as "<user>" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + When the user searches for juror record "<part_no>" from the global search bar + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + #skip straight through processing + Then I see "Do you want to process this summons reply as responded now?" on the page + Then I see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + When I click on the "No, skip and process later" link + + Then the view summons reply page is displayed + And I see the reply status has updated to "TO DO" + + #cancel and return + And I see the reply status on the page + And I click the More Actions button + And I press the "Request juror info by post" button + And I see "What information do you need from the juror?" on the page + And I see "Juror details" on the page + Then I click on the "Cancel" link + And I see "View juror's record" on the page + + #awaiting information + And I click the More Actions button + And I press the "Mark as awaiting information" button + And I set the radio button to "Juror" + And I press the "Confirm" button + + #error message + And I see the reply status has updated to "AWAITING JUROR INFO" + And I click the More Actions button + And I press the "Request juror info by post" button + + And I press the "Continue" button + And I see error "Select what information you need from the juror" + + #additonal info/checking checkboxes work + And I check the "Date of birth" checkbox + And "Date of birth" is checked + And I uncheck the "Date of birth" checkbox + And "Date of birth" is unchecked + And I check the "Date of birth" checkbox + + And I check the "Telephone number" checkbox + And "Telephone number" is checked + And I uncheck the "Telephone number" checkbox + And "Telephone number" is unchecked + And I check the "Telephone number" checkbox + + And I check the "Residency" checkbox + And "Residency" is checked + And I uncheck the "Residency" checkbox + And "Residency" is unchecked + And I check the "Residency" checkbox + + And I check the "Mental Health Act" checkbox + And "Mental Health Act" is checked + And I uncheck the "Mental Health Act" checkbox + And "Mental Health Act" is unchecked + And I check the "Mental Health Act" checkbox + + And I check the "Mental Capacity Act" checkbox + And "Mental Capacity Act" is checked + And I uncheck the "Mental Capacity Act" checkbox + And "Mental Capacity Act" is unchecked + And I check the "Mental Capacity Act" checkbox + + And I check the "Bail" checkbox + And "Bail" is checked + And I uncheck the "Bail" checkbox + And "Bail" is unchecked + And I check the "Bail" checkbox + + And I check the "Convictions" checkbox + And "Convictions" is checked + And I uncheck the "Convictions" checkbox + And "Convictions" is unchecked + And I check the "Convictions" checkbox + + And I check the "Can the juror serve on the date shown in summons?" checkbox + And "Can the juror serve on the date shown in summons?" is checked + And I uncheck the "Can the juror serve on the date shown in summons?" checkbox + And "Can the juror serve on the date shown in summons?" is unchecked + And I check the "Can the juror serve on the date shown in summons?" checkbox + + And I check the "Has the juror worked in the criminal justice system in the last 5 years?" checkbox + And "Has the juror worked in the criminal justice system in the last 5 years?" is checked + And I uncheck the "Has the juror worked in the criminal justice system in the last 5 years?" checkbox + And "Has the juror worked in the criminal justice system in the last 5 years?" is unchecked + And I check the "Has the juror worked in the criminal justice system in the last 5 years?" checkbox + + And I check the "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" checkbox + And "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" is checked + And I uncheck the "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" checkbox + And "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" is unchecked + And I check the "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" checkbox + + And I check the "The juror needs to sign their summons reply" checkbox + And "The juror needs to sign their summons reply" is checked + And I uncheck the "The juror needs to sign their summons reply" checkbox + And "The juror needs to sign their summons reply" is unchecked + And I check the "The juror needs to sign their summons reply" checkbox + + And I press the "Continue" button + + #prompted to created manual letter + And I see "You need to manually create a letter to send to the juror" on the page + And I see "A letter will not be sent automatically." on the page + And I see "Create a letter requesting a signature on the summons reply, using the letter generator on the shared drive." on the page + And I see "If you’re missing other information apart from the signature, you need to manually ask for this in the letter you create." on the page + And I see "Post the letter to the juror along with the original summons reply for them to sign." on the page + + #back + And I click on the "Back" link + And I uncheck the "Has the juror worked in the criminal justice system in the last 5 years?" checkbox + And I uncheck the "Does the juror have a disability or impairment that means they’ll need extra support or facilities at court?" checkbox + And I uncheck the "The juror needs to sign their summons reply" checkbox + + #automatic letter + And I press the "Continue" button + And I see "A letter will be automatically sent to the juror requesting the missing information" on the page + And I see "This will be sent tomorrow." on the page + And I see "If you hear back from the juror before 6pm today, you should process the reply." on the page + + And I press the "Done" button + + And I see "Summons replies" on the page + And I see link with text "View juror's record" + + #check request letter row + Then I check that a "request information" letter has been generated + + #set to responded/completed + And I press the "Process reply" button + And I see "How do you want to process this reply?" on the page + And I set the radio button to "Mark as responded" + And I press the "Continue" button + And I see "Mark as responded" on the page + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + And I see "Summons reply for 641500413 FNAMEFOURONETHREE LNAMEFOURONETHREE successfully processed: Responded" in the response banner + + And the request letter for court "415" is deleted + + Examples: + | part_no | pool_no | user | + | 641500413 | 415170501 | MODTESTBUREAU | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3831_End_to_End.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3831_End_to_End.feature new file mode 100644 index 00000000..e865ebd5 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3831_End_to_End.feature @@ -0,0 +1,79 @@ +Feature: JM-3831 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Decline Excusal Request as Bureau user - happy path + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "7 mondays time" new schema + + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Excusal request" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + Then the view summons reply page is displayed + + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "EXCUSAL" + + #process response : cancel and return + Then I see the name of the juror on the page header + And I see the reply status on the page + And I press the "Process reply" button + Then I click on the "Cancel" link + And I see "View juror's record" on the page + + #error message when no option selected + And I press the "Process reply" button + And I press the "Continue" button + And I see error "Please select a response process type" + + #select refuse excusal + And I set the radio button to "Excusal - grant or refuse" + Then I press the "Continue" button + And I select "O - OTHER" from the "Reason for excusal request" dropdown + And I set the radio button to "Refuse excusal" + And I press the "Continue" button + And I see "Excusal refused (other)" on the page + And I see "Summons reply for <part_no> FNAMETWOFOUREIGHT LNAMETWOFOUREIGHT successfully processed: Excusal refused (other)" in the response banner + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500248 | 415170501 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3895-BUREAU-mark-juror-as-deferred-digital.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3895-BUREAU-mark-juror-as-deferred-digital.feature new file mode 100644 index 00000000..bde55444 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3895-BUREAU-mark-juror-as-deferred-digital.feature @@ -0,0 +1,103 @@ +Feature: JM-3895 mark juror as deferred digital + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Mark juror as deferred - Send to deferral maintenance Happy path digital + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + And I record a digital response for a juror with a deferral + | jurorNumber | <part_no> | + | jurorLname | LNAMESIXTHREEZERO | + | jurorPostcode | CH1 2AN | + + Given I am on "Bureau" "test" + Given I log in as "MODTESTBUREAU" + When the user searches for juror record "<part_no>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "51" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + Then the user searches for juror record "<part_no>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + And I see the reply "status" on the response is "COMPLETED" + + Examples: + | part_no | pool_no | + | 641500630 | 415170402 | + + @JurorTransformationWIP @NewSchemaConverted @JurorDigitalNotConverted + Scenario Outline: Mark juror as deferred - Add to pool Happy path digital + # This test may pass but only because of temporary soft deletion of data until JM-4750 is closed + Given I am on "Public" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <court> |<juror_number> | <pool_number> | 5 | 400 | + + And I record a digital response for a juror with a deferral + | jurorNumber | <juror_number | + | jurorLname | LNAMEFOURTWOZERO | + | jurorPostcode | CH1 2AN | + + Given I am on "Bureau" "test" + Given I log in as "MODTESTBUREAU" + + Given I navigate to the pool request screen + Given I create an active "civil" court pool request for court "415", "14" Mondays in the future + + When the user searches for juror record "<juror_number>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "14" Mondays in the future + And I press the "Continue" button + + Then I see "Select a pool for this date" on the page + And I select the pool I created for the deferral + And I press the "Continue" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + Then the user searches for juror record "<juror_number>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + And I see the reply "status" on the response is "COMPLETED" + + Then I clear down the data for all the pools I created for this test + Then the poolNumbers lists is empty + + Examples: + | juror_number | pool_number | + | 045200007 | 452300003 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3897-BUREAU-mark-juror-as-deferred paper.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3897-BUREAU-mark-juror-as-deferred paper.feature new file mode 100644 index 00000000..49e0a7dd --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3897-BUREAU-mark-juror-as-deferred paper.feature @@ -0,0 +1,160 @@ +Feature: JM-3897 mark juror as deferred paper + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Mark juror as deferred - Send to deferral maintenance Happy path paper + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Given I log in as "<user>" + Given I navigate to the pool request screen + Given I create an active "civil" court pool request for court "415", "14" Mondays in the future + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I set the "first" choice to "11" Mondays in the future + Then I set the "second" choice to "12" Mondays in the future + Then I set the "third" choice to "13" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I set the radio button to "Choose a different date" + Then I set the "alternate" choice to "51" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + Then the user searches for juror record "<part_no>" from the global search bar + And I click the summons reply tab + + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + And I see the reply "status" on the response is "COMPLETED" + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500203|415170402| + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Mark juror as deferred - Add to pool Happy path paper + # This test may pass but only because of temporary soft deletion of data until JM-4750 is closed + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Given I log in as "<user>" + Given I navigate to the pool request screen + Given I create an active "civil" court pool request for court "415", "14" Mondays in the future + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I set the "first" choice to "11" Mondays in the future + Then I set the "second" choice to "12" Mondays in the future + Then I set the "third" choice to "13" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I set the radio button to "Choose a different date" + Then I set the "alternate" choice to "14" Mondays in the future + And I press the "Continue" button + + Then I see "Select a pool for this date" on the page + And I select the pool I created for the deferral + And I press the "Continue" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + When the user searches for juror record "<part_no>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + And I see the reply "status" on the response is "COMPLETED" + + Then I clear down the data for all the pools I created for this test + Then the poolNumbers lists is empty + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500026|415170402| + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Mark juror as deferred - No dates entered validation paper + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Given I log in as "<user>" + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + And I click continue on the process reply page + + Then I see "Enter at least one preferred start date for this juror" on the page + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500026|415170402| + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Mark juror as deferred - Incorrect date format validation paper + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Given I log in as "<user>" + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + And I set "First choice" to "12-12-2023" + And I click continue on the process reply page + + Then I see "Dates must only include numbers and forward slashes" on the page + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500169|415170402| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3899-decline-deferral-paper-juror-record.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3899-decline-deferral-paper-juror-record.feature new file mode 100644 index 00000000..2dffaa42 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3899-decline-deferral-paper-juror-record.feature @@ -0,0 +1,35 @@ +Feature: JM-3899 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Decline Deferral Request for Paper Response as Bureau user - Juror Record View + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + + #record paper summons response requesting deferral + And I record a happy path deferral paper summons response + + Then the view summons reply page is displayed + + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "DEFERRAL" + + Then I click on the "View juror's record" link + And I click the update juror record button + And I set the radio button to "Deferral - grant or refuse" + Then I click continue on the update juror record screen + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Refuse deferral" + And I press the "Continue" button + And I see "Deferral refused (other)" on the page + + Examples: + |part_no |pool_no |user | + |641500455|415170402 |MODTESTBUREAU | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3900-decline-deferral-digital-juror-record.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3900-decline-deferral-digital-juror-record.feature new file mode 100644 index 00000000..35883768 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3900-decline-deferral-digital-juror-record.feature @@ -0,0 +1,55 @@ +Feature: JM-3900 + + @JurorTransformationWIP @JurorDigitalNotConverted @NewSchemaConverted + Scenario Outline: Decline Deferral Request for Digital Response as Bureau user - Juror Record View + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + And juror "<part_no>" has "LAST_NAME" as "<last_name>" new schema + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And juror "<part_no>" has "POSTCODE" as "<postcode>" new schema + + And I record a digital response for a juror with a deferral + | jurorNumber | <part_no> | + | jurorLname | <last_name>| + | jurorPostcode | <postcode> | + + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + When the user searches for juror record "<part_no>" from the global search bar + Then I am on the Juror Record for juror "<part_no>" + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I click the process reply button + Then I select deferral request + And I click continue on the juror summons reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "41" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + Then I click the link for the juror record + And I see the juror status on the juror record screen has updated to "Deferred" + + And I click the update juror record button + And I set the radio button to "Deferral - grant or refuse" + Then I click continue on the update juror record screen + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Refuse deferral" + And I press the "Continue" button + And I see "Deferral refused (other)" on the page + And I see the number of deferrals is "1" + And the warning icon is displayed next to the juror status + + Examples: + | part_no | pool_no | last_name | postcode | + | 641500365 | 415170402 | LNAMETHREESIXFIVE | CH1 2AN | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3997-mark-as-undeliverable.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3997-mark-as-undeliverable.feature new file mode 100644 index 00000000..ea2030d0 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-3997-mark-as-undeliverable.feature @@ -0,0 +1,27 @@ +Feature: JM-3997 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to mark as undeliverable + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "7 mondays time" new schema + + When the user searches for juror record "<part_no>" from the global search bar + And I click the update juror record button + And I select the mark as undeliverable radio button + Then I click continue on the update juror record screen + And I see the juror record updated banner containing "Summons undeliverable" + And I see the juror status on the juror record screen has updated to "Undeliverable" + And I click the summons reply tab + And I see the summons reply status is "SUMMONS NOT RECEIVED" + + Examples: + | user | part_no | pool_no | + | MODTESTBUREAU | 641500134 | 415170402 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4082.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4082.feature new file mode 100644 index 00000000..dd511ecb --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4082.feature @@ -0,0 +1,107 @@ +Feature: JM-4082 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: End to End test to check juror reasonable adjustment - Paper Response + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 |<juror_number> | <pool_number> | 5 | 400 | + + When the user searches for juror record "<juror_number>" from the global search bar + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does need adjustments + And I set "What help does the juror need at court?" to "Childcare" + + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + And I click the juror details adjustments tab + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + And on the page I see + | text| + |How to ask the court if they can accommodate reasonable adjustments for this juror| + |Create a ticket in Optic | + |Copy and paste the juror information below into the Optic ticket | + |Submit the Optic ticket | + |Enter the Optic reference number here and save | + + And I see the following juror information on the check can accommodate screen + | jurorName | fname lname | + | jurorNumber | <juror_number> | + | jurorMainPhone | 0777777777 | + | jurorEmail | test@test.com | + | jurorAdjustmentReason | <jurorAdjustmentFull> | + | jurorAdjustment | <jurorAdjustmentNeeded>| + + And on the page I see + | text| + |Optic ticket number | + |Enter Optic reference | + |This will be an 8 digit number - for example, 37540739| + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now +# When I press the "Copy juror information" button + # When I enter the optic reference number "12345678" + And I press the "Save" button + + # Check Missing Optic reference Number error + Then I see "Please add an optic reference" on the page + And I see "Optic reference is missing" on the page + +# Check Optic reference number less than 8 characters error + When I enter the optic reference number "123456" + And I press the "Save" button + Then I see "Enter the Optic reference as an 8 digit number - you cannot enter letters or special characters" on the page + +# Check Optic reference number more than 8 characters error + When I enter the optic reference number "123456789" + And I press the "Save" button + Then I see "Enter the Optic reference as an 8 digit number - you cannot enter letters or special characters" on the page + +# Check Optic reference number with special characters or letters error + When I enter the optic reference number "123abc!" + And I press the "Save" button + Then I see "Enter the Optic reference as an 8 digit number - you cannot enter letters or special characters" on the page + + When I enter the optic reference number "12345678" + And I press the "Save" button + And I click the juror details adjustments tab + And I see "12345678" in the same row as "Optic reference" + Examples: + | user | juror_number | pool_number | jurorAdjustmentNeeded | jurorAdjustmentFull | + | MODTESTBUREAU | 045200012 | 452300008 | Childcare |C - Childcare problems | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4104.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4104.feature new file mode 100644 index 00000000..a8ff9d94 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4104.feature @@ -0,0 +1,204 @@ +Feature: JM-4104 - As a Bureau officer I need to be able to see the pool history + + @JurorTransformationWIP @JM-4467 + Scenario: Test to check Bureau officer can see Pool history - new pool - deferrals added + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + Given records for juror "041500046" are deleted + Given the juror "041500046" is inserted into pool "415300136" with a deferral date "9" Mondays in the future for court "415" + And I create a "Civil" court pool request for court "415" with "1" deferral + Then I select the pool that I have just created to move to the pool summary page + And I click on the "History" link + #JM-4467 raised Number of Deferrals should be showing - AC split between 4104 and 3987 + And I see the title "Number of Deferrals" in position "1" of the history + And I click on the "Jurors" link + And I press the "Summon jurors" button + And I set "Citizens to summon" to "30" + And I press the "Create pool and summon citizens" button + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + And I click on the "History" link + And I see the title "Number of Deferrals" in position "2" of the history + + Then I clear down the data for the pool + Then records for juror "041500046" are deleted + + @JurorTransformation + Scenario: Test to check Bureau officer can see Pool history - new pool - summons issued + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Civil" court pool request for court "415" + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Citizens to summon" to "30" + And I press the "Create pool and summon citizens" button + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + And I click on the "History" link + And I see the title "Number of Summons Issued" in position "1" of the history + + Then I clear down the data for the pool + + @JurorTransformation + Scenario: Test to check Bureau officer can see Pool history - edit pool - summons issued + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Civil" court pool request for court "415" + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Citizens to summon" to "30" + And I press the "Create pool and summon citizens" button + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + And I click on the "History" link + And I see the title "Number of Summons Issued" in position "1" of the history + And I see the description "30 (New Pool Request)" in position "1" of the history + And I click on the "Jurors" link + And I press the "Summon jurors" button + And I set "Extra citizens to summon" to "1" + And I press the "Summon more citizens" button + And I click on the "History" link + And I see the title "Number of Summons Issued" in position "1" of the history + And I see the description "1 (Add Pool Members)" in position "1" of the history + + Then I clear down the data for the pool + + @JurorTransformation + Scenario: Test to check Bureau officer can see Pool history - edit pool - change pool request details + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Civil" court pool request for court "415" + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Citizens to summon" to "30" + And I press the "Create pool and summon citizens" button + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + And I press the "Edit pool" button + And I set "Number of jurors requested" to "135" + And I set "Reason for change" to "Too many jurors" + And I press the "Save changes" button + And I click on the "History" link + And I see the title "Change Pool Request Details" in position "1" of the history + And I see the description "No Requested was 150" in position "1" of the history + + Then I clear down the data for the pool + + @JurorTransformation + Scenario: Test to check Bureau officer can see Pool history - order of history is correct + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Civil" court pool request for court "415" + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Citizens to summon" to "30" + And I press the "Create pool and summon citizens" button + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Extra citizens to summon" to "1" + And I press the "Summon more citizens" button + And I press the "Edit pool" button + And I set "Number of jurors requested" to "135" + And I set "Reason for change" to "Too many jurors" + And I press the "Save changes" button + And I click on the "History" link + And I see the title "Change Pool Request Details" in position "1" of the history + And I see the description "No Requested was 150" in position "1" of the history + + And I see the title "Number of Summons Issued" in position "2" of the history + And I see the description "1 (Add Pool Members)" in position "2" of the history + + And I see the title "Number of Summons Issued" in position "3" of the history + And I see the description "30 (New Pool Request)" in position "3" of the history + + Then I clear down the data for the pool + + @JurorTransformation @NewSchemaConverted + Scenario: Test to check Bureau officer can see Pool history - times/dates are correct + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Civil" court pool request for court "415" + And I make a note of the time + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Citizens to summon" to "30" + And I press the "Create pool and summon citizens" button + And I make a note of the time + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Extra citizens to summon" to "1" + And I press the "Summon more citizens" button + And I make a note of the time + And I press the "Edit pool" button + And I set "Number of jurors requested" to "35" + And I set "Reason for change" to "Too many jurors" + And I press the "Save changes" button + And I make a note of the time + And I click on the "History" link + And I see the title "Change Pool Request Details" in position "1" of the history + And I see the description "No Requested was 150" in position "1" of the history + And I see the correct date and time in position "1" of the history + + And I see the title "Number of Summons Issued" in position "2" of the history + And I see the description "1 (Add Pool Members)" in position "2" of the history + And I see the correct date and time in position "2" of the history + + And I see the title "Number of Summons Issued" in position "3" of the history + And I see the description "30 (New Pool Request)" in position "3" of the history + And I see the correct date and time in position "3" of the history + + And I see the title "Change Pool Request Details" in position "4" of the history + And I see the description "Pool Requested for 150 Jurors" in position "4" of the history + And I see the correct date and time in position "4" of the history + + Then I clear down the data for the pool + + @JurorTransformationWIP @No_defect_ticket_raised_as_still_under_discussion + Scenario: Test to check Bureau officer can see Pool history - history from deleted pool does not persist + # may not be required, requirements for this are still under discussion + # juror heritage kept the history for auditing but it was never shown to the user + # discussion is whether to keep it in the ui or remove it from the ui but still keep it for auditing + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + And I create a "Civil" court pool request for court "415" + Then I select the pool that I have just created to move to the pool summary page + And I press the "Delete pool request" button + And I press the "Delete pool request" button + And I create a "Civil" court pool request for court "415" using the same pool number + Then I select the pool that I have just created to move to the pool summary page + And I click on the "History" link + And I do not see the title "Pool Deleted" in position "2" of the history + + Then I clear down the data for the pool + + diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4180-the-police-check-value-is-reflected-in-the-ui.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4180-the-police-check-value-is-reflected-in-the-ui.feature new file mode 100644 index 00000000..4237b50c --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4180-the-police-check-value-is-reflected-in-the-ui.feature @@ -0,0 +1,107 @@ +Feature: JM-4180 DB values reflected on UI + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to check UI is correct when Police Check passes + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And juror "<part_no>" has "LAST_NAME" as "<last_name>" new schema + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And juror "<part_no>" has "POSTCODE" as "<postcode>" new schema + + And I log in as "MODTESTBUREAU" + When I set Police Check to "ELIGIBLE" for "<part_no>" new schema + And the user searches for the juror record from the global search bar + Then I see "<part_no>" on the page + And I see police check has updated to "Passed" + Examples: + | part_no | pool_no | last_name | postcode | + |641500899|415170402| LNAME |ML10 6AD | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to check UI is correct when Police Check passes but Phoenix check fails + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And juror "<part_no>" has "LAST_NAME" as "<last_name>" new schema + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And juror "<part_no>" has "POSTCODE" as "<postcode>" new schema + + And I log in as "MODTESTBUREAU" + When I set Police Check to "INSUFFICIENT_INFORMATION" for "<part_no>" new schema + And the user searches for the juror record from the global search bar + Then I see "<part_no>" on the page + And I see police check has updated to "Not checked" + + Examples: + | part_no | pool_no | last_name | postcode | + |641500902|415170402| Lname |ML10 6AD | + + @JurorTransformationWIP @JM-5790 + Scenario Outline: Test to check UI is correct when Police Check fails + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + And juror "<part_no>" has "LAST_NAME" as "<last_name>" new schema + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And juror "<part_no>" has "POSTCODE" as "<postcode>" new schema + + And I log in as "MODTESTBUREAU" +# When I set Police Check to "F" and Phoenix Checked to "C" for "<part_no>" + When I set Police Check to "F" for "<part_no>" new schema + And the user searches for the juror record from the global search bar + Then I see "<part_no>" on the page + And I see police check has updated to "Failed" + Examples: + | part_no | pool_no | last_name | postcode | + | 641500905 | 415170402 | Lname | ML10 6AD | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to check UI is correct when Police Check is in progress + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number> | <pool_number>| 5 | 400 | + + And I log in as "MODTESTBUREAU" +# When I set Police Check to "E" and Phoenix Checked to "" for "<part_no>" + When I set Police Check to "IN_PROGRESS" for "<juror_number>" new schema + And the user searches for the juror record from the global search bar + Then I see "<juror_number>" on the page + And I see police check has updated to "In progress" + Examples: + | juror_number | pool_number | + | 041500043 | 415300133 | + + @JurorTransformationMulti + Scenario Outline: Test to check UI is correct when Police Check hasn't been done + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + And juror "<part_no>" has "LAST_NAME" as "<last_name>" new schema + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And juror "<part_no>" has "POSTCODE" as "<postcode>" new schema + + And I log in as "MODTESTBUREAU" +# When I set Police Check to "" and Phoenix Checked to "" for "<part_no>" + When I set Police Check to "" for "<part_no>" new schema + And the user searches for the juror record from the global search bar + Then I see "<part_no>" on the page + And I see police check has updated to "Not checked" + Examples: + | part_no | pool_no | last_name | postcode | + | 641500168 | 415170402 | Lname | ML10 6AD | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4184.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4184.feature new file mode 100644 index 00000000..de6adcf3 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4184.feature @@ -0,0 +1,145 @@ +Feature: JM-4184 - The system shall allow the jury officer to process a summons reply that has been returned late + + @JurorTransformationMulti + Scenario Outline: Process summons reply that has been returned late (Disqualify) + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + #log on and search for juror + And I log in as "<user>" + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response + And I click on the "No, skip and process later" link + + When the user searches for juror record "<part_no>" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + And I see "Juror’s service start date has passed" on the page + And I press the "Process reply" button + And I set the radio button to "Disqualify" + And I press the "Continue" button + And I set the radio button to "R - Residency" + And I press the "Continue" button + When the user searches for juror record "<part_no>" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + And I see the reply status has updated to "COMPLETED" + + Examples: + |user |part_no |pool_no | + |MODTESTCOURT |141500908|415230902| + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Process summons reply that has been returned late (Deferral) + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + #log on and search for juror + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + + When the user searches for juror record "<part_no>" from the global search bar + + Then I click the summons reply tab + And I click on the view summons reply link + And I see "Juror’s service start date has passed" on the page + + And I press the "Process reply" button + And I set the radio button to "Defer juror" + And I press the "Continue" button + + + Then I set the "first" choice to "11" Mondays in the future + Then I set the "second" choice to "12" Mondays in the future + Then I set the "third" choice to "13" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I set the radio button to "Choose a different date" + Then I set the "alternate" choice to "-12" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + #view summons response + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see the reply status has updated to "COMPLETED" + + Examples: + |user |part_no |pool_no | + |MODTESTCOURT |141500455|415230902| + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Process summons reply that has been returned late (Excusal) + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + #log on and search for juror + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + And I record an excusal request paper summons response + + When the user searches for juror record "<part_no>" from the global search bar + + Then I click the summons reply tab + And I click on the view summons reply link + And I see "Juror’s service start date has passed" on the page + + And I press the "Process reply" button + And I press the "Continue" button + And I see error "Please select a response process type" + + #select refuse excusal + And I set the radio button to "Excusal - grant or refuse" + Then I press the "Continue" button + And I select "O - OTHER" from the "Reason for excusal request" dropdown + And I set the radio button to "Grant excusal" + And I press the "Continue" button + + #view summons response + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see the reply status has updated to "COMPLETED" + + Examples: + |user |part_no |pool_no | + |MODTESTCOURT |141500533|415230902| + + #postpone and reassign scenarios are mentioned in the ticket as 'yet to be affirmed', if those scenarios are implemented in a new ticket i will update this script \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4186-Straight-Through-Summons-Reply-Paper.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4186-Straight-Through-Summons-Reply-Paper.feature new file mode 100644 index 00000000..1ee91be8 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4186-Straight-Through-Summons-Reply-Paper.feature @@ -0,0 +1,93 @@ +Feature: JM-4186 + + @JurorTransformationMulti + Scenario Outline: Straight through paper summons reply - Happy Path + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "<user>" + + And the user searches for juror record "<part_no>" from the global search bar + Then I am on the Juror Record for juror "<part_no>" + And I click the Enter summons reply button + Then the juror details form is displayed + And I enter a date of birth that will make the juror between 18 and 75 + When I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + #Process straight through + Then I see "Do you want to process this summons reply as responded now?" on the page + Then I see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + When I press the "Yes, process now" button + Then I see "Your work" on the page + And I see "Summons reply for <part_no> FNAMESEVENONEFIVE LNAMESEVENONEFIVE successfully processed: Responded" on the page + + And I click on the "<part_no>" link + Then I see the Juror Record tag + And the Enter summons reply button is not visible + + Examples: + |part_no |pool_no |user | + |641500715|415170402 |MODTESTBUREAU| + + @JurorTransformationMulti + Scenario Outline: Straight through paper summons reply - null criteria + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "7 mondays time" + + And I log in as "<user>" + + And the user searches for juror record "<part_no>" from the global search bar + Then I am on the Juror Record for juror "<part_no>" + And I click the Enter summons reply button + Then the juror details form is displayed + And I enter a date of birth that will make the juror between 18 and 75 + When I click continue on the juror summons reply page + Then the juror summons reply eligibility page is displayed + + #leave eligibility questions unanswered + And I click continue on the juror summons reply page + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + +# Ordinarily process straight through appears here + Then I do not see "Do you want to process this summons reply as responded now?" on the page + Then I do not see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + + Examples: + |part_no |pool_no |user | + |641500281|415170501 |MODTESTBUREAU| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4188-postpone-a-juror.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4188-postpone-a-juror.feature new file mode 100644 index 00000000..95846224 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4188-postpone-a-juror.feature @@ -0,0 +1,47 @@ + Feature: 4188 - postpone juror + + @JurorTransformationWIP @NewSchemaConverted @JM-5891 + Scenario: Test to mark juror as postponed and add to deferral maintenance + Given I am on "Bureau" "test" + Given records for juror "100000002" are deleted new schema + And I clear down the data for the paper juror record "100000002" new schema + And I log in as "MODTESTBUREAU" + Given a juror record of "100000002" has been entered which is valid for paper summons reply new schema + And I search for juror "100000002" + And I click the update juror record button + And I set the radio button to "Postpone service start date" + And I click continue on the update juror record screen + And I set the "Postpone service start date" single date field to a Monday "17" weeks in the future + When I click continue on the postponement page + Then I see "There are no active pools for this date" on the page + When I press the "Put in deferral maintenance" button + Then I see "Juror record updated: Postponed" on the page + + @JurorTransformationWIP @NewSchemaConverted @JM-5891 + Scenario Outline: Test to mark juror as postponed and add to future pool + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And pool "<pool_no>" has attendance date as "5 mondays time" new schema + + And I log in as "MODTESTBUREAU" + And I navigate to the pool request screen + And I create an active "civil" court pool request for court "415", "30" Mondays in the future + + And I search for juror "<part_no>" + And I click the update juror record button + And I set the radio button to "Postpone service start date" + And I click continue on the update juror record screen + And I enter a date "30" mondays in the future for the new service start date + When I click continue on the postponement page + And I select a postponement date + And I click continue on the postponement page + Then I see "Juror record updated: Postponed" on the page + + Examples: + |part_no |pool_no | + |141500153|415240806| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4222.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4222.feature new file mode 100644 index 00000000..536afbc3 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4222.feature @@ -0,0 +1,560 @@ +Feature: JM-4222 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Bureau when I reassign a juror the optic reference should be copied over to the new record + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 |<juror_number>| <pool_number>| 5 | 400 | + + When the user searches for juror record "<juror_number>" from the global search bar + + And I record a paper summons response with reasonable adjustments + + And I click the juror details adjustments tab + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + And I click the juror details adjustments tab + And I see "12345678" in the same row as "Optic reference" + + #process response + When the user searches for juror record "<juror_number>" from the global search bar + + Then I click on the Summons Reply tab + Then I click on the view summons reply link + Then I click the process reply button + Then I mark the reply as responded + And I press the "Continue" button + Then I click the checkbox to mark the reply as responded + And I press the "Confirm" button + + #reassign juror + When the user searches for juror record "<juror_number>" from the global search bar + When I click the update juror record button + And I click the reassign to another pool radio button + And I press the "Continue" button + Then I see "Active pools at Shrewsbury (452)" on the page + And I see "Choose a pool to reassign to" on the page + And I see the reassign active pools table + And I select one of the active pools available + And I press the "Continue" button + And I check optic reference in the database for juror "<juror_number>" is "12345678" new schema + + #check optic reference has been copied + #JM-4742 currently causing this to fail + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I select the reasonable adjustments tab from the summons reply page + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + And I see "Reasonable adjustments reasons" on the page + + Examples: + | user | juror_number | pool_number | + | MODTESTBUREAU | 045200023 | 452300019 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Bureau I should be able to see the optic reference on a juror record and summons reply as a standard juror + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 |<juror_number>| <pool_number>| 5 | 400 | + + When the user searches for juror record "<juror_number>" from the global search bar + And I record a paper summons response with reasonable adjustments + + And I select the reasonable adjustments tab from the summons reply page + And I do not see "Optic reference" on the page + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + And I click the juror details adjustments tab + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + And I see "Reasonable adjustments reasons" on the page + + Examples: + | juror_number | pool_number | user | + | 045200021 | 452300020 | MODTESTBUREAU | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Bureau when I postpone a juror the optic reference should be copied over to the new record + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 |<juror_number>| <pool_number>| 5 | 400 | + + When the user searches for juror record "<juror_number>" from the global search bar + + And I record a paper summons response with reasonable adjustments + And I select the reasonable adjustments tab from the summons reply page + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + + When the user searches for juror record "<juror_number>" from the global search bar + And I click the update juror record button + And I set the radio button to "Postpone service start date" + And I click continue on the update juror record screen + And I enter a date "45" mondays in the future for the new service start date + When I click continue on the postponement page + Then I see "There are no active pools for this date" on the page + When I press the "Put in deferral maintenance" button + Then I see "Juror record updated: Postponed" on the page + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on the Summons Reply tab + And I click on the "View summons reply" link + And I select the reasonable adjustments tab from the summons reply page + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + And I see "Reasonable adjustments reasons" on the page + + Examples: + | juror_number | pool_number | user | + | 045200022 | 452300021 | MODTESTBUREAU | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Bureau when I defer a juror the optic reference should be copied over to the new record + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 | <juror_number>| <pool_number> | 5 | 400 | + + When the user searches for juror record "<juror_number>" from the global search bar + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Deferral request" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does need adjustments + And I set "What help does the juror need at court?" to "Childcare" + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "DEFERRAL" + And I select the reasonable adjustments tab from the summons reply page + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + + When the user searches for juror record "<juror_number>" from the global search bar + And I click the update juror record button + And I set the radio button to "Deferral - grant or refuse" + Then I click continue on the update juror record screen + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Grant deferral" + And I press the "Continue" button + And I see "Deferral granted (other)" on the page + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on the Summons Reply tab + And I click on the "View summons reply" link + And I select the reasonable adjustments tab from the summons reply page + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + + Examples: + | juror_number | pool_number | user | + | 045200023 | 452300022 | MODTESTBUREAU | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Jury officer when I reassign a juror the optic reference should be copied over to the new record + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number>| <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + When the user searches for juror record "<juror_number>" from the global search bar + + And I record a paper summons response with reasonable adjustments + And I click the juror details adjustments tab + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + And I click the juror details adjustments tab + And I see "12345678" in the same row as "Optic reference" + + #process response + When the user searches for juror record "<juror_number>" from the global search bar + + Then I click on the Summons Reply tab + Then I click on the view summons reply link + Then I click the process reply button + Then I mark the reply as responded + And I press the "Continue" button + Then I click the checkbox to mark the reply as responded + And I press the "Confirm" button + + #reassign juror + When the user searches for juror record "<juror_number>" from the global search bar + When I click the update juror record button + And I click the reassign to another pool radio button + And I press the "Continue" button + Then I see "Active pools at Chester (415)" on the page + And I see "Choose a pool to reassign to" on the page + And I see the reassign active pools table + And I select one of the active pools available + And I press the "Continue" button + And I check optic reference in the database for juror "<juror_number>" is "12345678" new schema + + #check optic reference has been copied + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I click on the "Reasonable adjustments" link + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + And I see "Reasonable adjustments reasons" on the page + + Examples: + | user | juror_number | pool_number | + | MODTESTCOURT | 041500049 | 415300139 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a jury officer officer when I transfer a juror the optic reference should be copied over to the new record + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number>| <pool_number>| 5 | 400 | + + #respond juror as bureau user + And I log in as "MODTESTBUREAU" + When the user searches for juror record "<juror_number>" from the global search bar + And I record a paper summons response with reasonable adjustments + And I select Process reply + And I mark the reply as responded + And I press the "Continue" button + And I click the checkbox to mark the reply as responded + And I press the "Confirm" button + Then I see "Summons reply for <juror_number> fname lname successfully processed: Responded" on the page + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #transfer to court + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on the Summons Reply tab + And I click on the "View summons reply" link + And I click on the "Reasonable adjustments" link + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12233445" + And I press the "Save" button + + When the user searches for juror record "<juror_number>" from the global search bar + And I press the "Update juror record" button + And I set the radio button to "Transfer to another court" + And I press the "Continue" button + And I set "Enter a court name or location code" to "457" + Then I click on the "Swansea (457)" link + And I set the "Service start date for transfer" single date field to a Monday "10" weeks in the future + And I press the "Continue" button + And I see "Transfer to Swansea (457)" on the page + And I press the "Continue" button + + When the user searches for juror record "<juror_number>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I click on the "Reasonable adjustments" link + And I see "12233445" in the same row as "Optic reference" + + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on "<juror_number>" in the same row as "Swansea" + And I see the juror status has updated to "Responded" + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see the juror status has updated to "Responded" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I click on "<juror_number>" in the same row as "Swansea" + And I see "Additional requirements" on the page + And I see "12233445" in the same row as "Optic reference" + And I see "Reasonable adjustments reasons" on the page + + Examples: + | user | juror_number | pool_number | + | MODTESTCOURT | 041500050 | 415300140 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Jury Officer I should be able to see the optic reference on a juror record and summons reply as a standard juror + + Given I am on "Bureau" "test" + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number>| <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + When the user searches for juror record "<juror_number>" from the global search bar + + And I record a paper summons response with reasonable adjustments + And I click on the "Reasonable adjustments" link + And I do not see "Optic reference" on the page + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + And I click the juror details adjustments tab + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + And I see "Reasonable adjustments reasons" on the page + + Examples: + | juror_number | pool_number| user | + | 041500051 | 415300141 | MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Jury officer when I postpone a juror the optic reference should be copied over to the new record + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number>| <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + | part_no | pool_no | owner | + | <juror_number> | <pool_number>| 415 | + + When the user searches for juror record "<juror_number>" from the global search bar + And I record a paper summons response with reasonable adjustments + And I click on the "Reasonable adjustments" link + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + + When the user searches for juror record "<juror_number>" from the global search bar + And I click the update juror record button + And I set the radio button to "Postpone service start date" + And I click continue on the update juror record screen + And I enter a date "45" mondays in the future for the new service start date + When I click continue on the postponement page + Then I see "There are no active pools for this date" on the page + When I press the "Put in deferral maintenance" button + Then I see "Juror record updated: Postponed" on the page + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on the Summons Reply tab + And I click on the "View summons reply" link + And I click on the "Reasonable adjustments" link + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + And I see "Reasonable adjustments reasons" on the page + + Examples: + | juror_number | pool_number | user | + | 041500048 | 415300138 | MODTESTCOURT | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: As a Jury officer when I defer a juror the optic reference should be copied over to the new record + + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number>| <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + When the user searches for juror record "<juror_number>" from the global search bar + + #record paper summons response + And I click the Enter summons reply button + Then the juror details form is displayed + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Deferral request" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does need adjustments + And I set "What help does the juror need at court?" to "Childcare" + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "DEFERRAL" + And I click on the "Reasonable adjustments" link + When I press the "Check court can accommodate" button + Then I am on the check can accommodate screen + + #for this to work in Jenkins, we need a later version of Selenium which includes the setPermissions method and would allow this to work. Commenting out for now + #When I press the "Copy juror information" button + When I enter the optic reference number "12345678" + And I press the "Save" button + + When the user searches for juror record "<juror_number>" from the global search bar + And I click the update juror record button + And I set the radio button to "Deferral - grant or refuse" + Then I click continue on the update juror record screen + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Grant deferral" + And I press the "Continue" button + And I see "Deferral granted (other)" on the page + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on the Summons Reply tab + And I click on the "View summons reply" link + And I click on the "Reasonable adjustments" link + And I see "12345678" in the same row as "Optic reference" + + #check juror record for optic reference + When the user searches for juror record "<juror_number>" from the global search bar + And I see "Additional requirements" on the page + And I see "12345678" in the same row as "Optic reference" + + Examples: + | juror_number | pool_number | user | + | 041500052 | 415300142 | MODTESTCOURT | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4229-Bureau-change-jurors-deferral-date.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4229-Bureau-change-jurors-deferral-date.feature new file mode 100644 index 00000000..8262ff0b --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4229-Bureau-change-jurors-deferral-date.feature @@ -0,0 +1,57 @@ +Feature: Bureau change jurors deferral date + + @JurorTransformationMulti + Scenario Outline: Change jurors deferral date + + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + And I record a digital response for a juror with a deferral new schema + |jurorNumber | <part_no> | + |jurorLname | <last_name>| + |jurorPostcode | <postcode> | + + Given I am on "Bureau" "test" + Given I log in as "MODTESTBUREAU" + Then I search for juror "<part_no>" + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "new" choice to "51" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + Then I search for juror "<part_no>" + And I see the juror status on the juror record screen is "Deferred" + And I see the number of deferrals is "1" + And I see under pool details the pool number is "In deferral maintenance" + And I click the change link for the juror deferral + And I set the "only" choice to "41" Mondays in the future + And I press the "Save changes" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + And I see "Juror record updated: Responded" on the page + And I see Deferred to is "41" Mondays in the future + + Examples: + |part_no |pool_no |last_name |postcode | + |641500048 |415170402|LNAMEFOUREIGHT |CH1 2AN | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4247.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4247.feature new file mode 100644 index 00000000..1e37e010 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4247.feature @@ -0,0 +1,74 @@ +Feature: JM-4247 Edit Juror Record as Court User + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: The system shall allow the Jury officer to edit a juror record for a juror in their control + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + + And "<part_no>" has "NEXT_DATE" as "10 mondays time" new schema + And juror "<part_no>" has "FIRST_NAME" as "Joe" new schema + And juror "<part_no>" has "LAST_NAME" as "Blogs" new schema + + And I log in as "<user>" + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response and process now + When the user searches for juror record "<part_no>" from the global search bar + + And I click on the "Juror details" link + And I click on the "Add or change" link + + #change name + And I click on the "Fix error in current name" link + And I see "Fix error in current name" on the page + And I see "You should only fix minor errors here. For example, if you need to remove a special character that's preventing a police check from being carried out." on the page + + And I set "First name" to "Testing" + And I set "Last name" to "Test" + And I press the "Save" button + And I see the juror name has updated to "Testing Test" + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + And I click on the "Cancel" link + + And I click on the "Change" link + # change this section + And I click on the "Change" link + And I set "Address line 1" to "530 Test Name" + And I set "Town or city" to "LONDON" + And I click on the "Cancel" link + And I click on the "Change" link + And I set "Address line 1" to "530 Test Name" + And I set "Town or city" to "LONDON" + And I press the "Save" button + + And I enter a date of birth that will make the juror between 18 and 75 + And I set "Email (optional)" to "test@mail.com" + When I select the yes radio button from the Third Party Juror details + And I see "Name" on the page + And I see "Relationship to juror" on the page + And I set "Name" to "Steven" + And I set "Relationship to juror" to "Friend" + + And I see "Additional requirements" on the page + And I see "Will the juror need extra support or facilities at court" on the page + When I select the yes radio button from the Additional Requirements Juror details + And I see "Select a reason" on the page + When I select "D - Diet" from the "Select a reason" dropdown + And I set "What help does this juror need at court" to "Nutritional Guidance" + And I press the "Save" button + And I see "Testing Test" on the page + + Examples: + |part_no |pool_no |user | + |641500529 |415170402 | MODTESTCOURT| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4249.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4249.feature new file mode 100644 index 00000000..243b192f --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4249.feature @@ -0,0 +1,68 @@ +Feature: JM-4249 Edit Juror Record as Bureau User + + @JurorTransformationMulti + Scenario Outline: The system shall allow the Bureau officer to edit a juror record for a juror in their control + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + And I log in as "<user>" + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response and process now + When the user searches for juror record "<part_no>" from the global search bar + + And I click on the "Juror details" link + And I click on the "Add or change" link + #change name + And I click on the "Fix error in current name" link + And I see "Fix error in current name" on the page + And I see "You should only fix minor errors here. For example, if you need to remove a special character that's preventing a police check from being carried out." on the page + + And I set "First name" to "Testing" + And I set "Last name" to "Test" + And I press the "Save" button + And I see the juror name has updated to "Testing Test" + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + And I click on the "Cancel" link + + And I click on the "Change" link + # change this section + And I click on the "Change" link + And I set "Address line 1" to "530 Test Name" + And I set "Town or city" to "LONDON" + And I click on the "Cancel" link + And I click on the "Change" link + And I set "Address line 1" to "530 Test Name" + And I set "Town or city" to "LONDON" + And I press the "Save" button + + And I enter a date of birth that will make the juror between 18 and 75 + And I set "Email (optional)" to "test@mail.com" + When I select the yes radio button from the Third Party Juror details + And I see "Name" on the page + And I see "Relationship to juror" on the page + And I set "Name" to "Steven" + And I set "Relationship to juror" to "Friend" + + And I see "Additional requirements" on the page + And I see "Will the juror need extra support or facilities at court" on the page + When I select the yes radio button from the Additional Requirements Juror details + And I see "Select a reason" on the page + When I select "D - Diet" from the "Select a reason" dropdown + And I set "What help does this juror need at court" to "Nutritional Guidance" + And I press the "Save" button + And I see "Testing Test" on the page + + Examples: + |part_no |pool_no |user | + |641500478|415170402 | MODTESTBUREAU| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4252.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4252.feature new file mode 100644 index 00000000..3e626af1 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4252.feature @@ -0,0 +1,29 @@ +Feature: JM-4252 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: JM-4252 - The system shall stop Bureau officer from editing a juror when it has transferred to the court + + Given I am on "Bureau" "postgres" + + And I log in as "<user>" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "1 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + When the user searches for juror record "<part_no>" from the global search bar + + And I click on the "Juror details" link + And I do not see "Add or change" on the page + + + Examples: + |part_no |pool_no | user | + |541500827|415240404 | MODTESTBUREAU | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4254.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4254.feature new file mode 100644 index 00000000..df98cfad --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4254.feature @@ -0,0 +1,199 @@ +Feature: JM-4254 Record proof of name change + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: The system shall allow a bureau officer to record a proof of change of name no summons + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + And I log in as "<user>" + + When the user searches for juror record "<juror_number>" from the global search bar + + And I click on the "Juror details" link + And I click on the "Add or change" link + + And I click on the "Fix error in current name" link + + #name longer than 20 characters + And I set "First name" to "FnameTestertttttttttttttt" + And I set "Last name" to "LnameTestinggggggggggggggg" + And I press the "Save" button + And I see error "Please check the first name" + And I see error "Please check the last name" + + #special characters + And I set "First name" to "FnameTester&#@!?%" + And I set "Last name" to "FnameTester&#@!?%" + And I press the "Save" button + And I click on the "Cancel" link + And I click on the "Add or change" link + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + And I press the "Save" button + + And I see error "Please provide the first name" + And I see error "Please provide the last name" + + And I set "First name" to "FnameTester" + And I set "Last name" to "LnameTesting" + And I press the "Save" button + + And I see "Pending approval" on the page + And I enter a date of birth that will make the juror between 18 and 75 + And I see the juror's new name "Fnametester Lnametesting" is pending approval + And I press the "Save" button + + And I see "Pending approval" on the page + And I see "Fnametester Lnametesting" on the page + + Examples: + | juror_number | pool_number | user | + | 041500007 | 415300105 | MODTESTBUREAU| + + @JurorTransformationMulti + Scenario Outline: The system shall allow a bureau officer to record a proof of change of name + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + And I log in as "<user>" + + When the user searches for juror record "<juror_number>" from the global search bar + And I record a happy path paper summons response and process now + When the user searches for juror record "<juror_number>" from the global search bar + + And I click on the "Juror details" link + And I click on the "Add or change" link + + And I click on the "Fix error in current name" link + + #name longer than 20 characters + And I set "First name" to "FnameTestertttttttttttttt" + And I set "Last name" to "LnameTestinggggggggggggggg" + And I press the "Save" button + And I see error "Please check the first name" + And I see error "Please check the last name" + + #special characters + And I set "First name" to "FnameTester&#@!?%" + And I set "Last name" to "FnameTester&#@!?%" + And I press the "Save" button + And I click on the "Cancel" link + And I click on the "Add or change" link + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + And I press the "Save" button + + And I see error "Please provide the first name" + And I see error "Please provide the last name" + + And I set "First name" to "FnameTester" + And I set "Last name" to "LnameTesting" + And I press the "Save" button + + And I see "Pending approval" on the page + And I enter a date of birth that will make the juror between 18 and 75 + And I see the juror's new name "Fnametester Lnametesting" is pending approval + And I press the "Save" button + + And I see "Pending approval" on the page + And I see "Fnametester Lnametesting" on the page + + Examples: + | juror_number | pool_number | user | + | 041500008 | 415300106 | MODTESTBUREAU| + + @JurorTransformationMulti + Scenario Outline: The system shall not allow a bureau officer to edit juror details when response is TODO + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + And I log in as "<user>" + + When the user searches for juror record "<juror_number>" from the global search bar + And I record a happy path paper summons response + And I click no, to process the summons reply later + + When the user searches for juror record "<juror_number>" from the global search bar + + And I click on the "Juror details" link + And I do not see link with text "Add or change" + + Examples: + | juror_number | pool_number | user | + | 041500009 | 415300107 | MODTESTBUREAU| + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: The system shall allow a bureau officer to record a proof of change of name. Change name while recording paper summons + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + And I log in as "<user>" + + When the user searches for juror record "<juror_number>" from the global search bar + + And I click the Enter summons reply button + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + And I set "First name" to "FnameTester" + And I set "Last name" to "LnameTesting" + And I press the "Save" button + And I see "Pending approval" on the page + And I see the juror's new name "Fnametester Lnametesting" is pending approval + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + And I see "Pending" on the page + And I see "FnameTester LnameTesting" on the page + + Examples: + |juror_number |pool_number |user | + |011000001 |010000001 | MODTESTBUREAU | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4256.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4256.feature new file mode 100644 index 00000000..fbadd7dc --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4256.feature @@ -0,0 +1,237 @@ +Feature: JM-4256 Record proof of name change for a jury officer + + @JurorTransformationWIP @NewSchemaConverted @JM-5469 + Scenario Outline: The system shall allow a jury officer to record a proof of change of name and accept name change + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "10 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + + And "<part_no>" has "NEXT_DATE" as "10 mondays time" new schema + + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + + And I click on the "Juror details" link + And I click on the "Add or change" link + + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + + And I set "First name" to "FnameTester" + And I set "Last name" to "LnameTesting" + And I press the "Save" button + And I see "Pending approval" on the page + And I see the juror's new name "Fnametester Lnametesting" is pending approval + And I enter a date of birth that will make the juror between 18 and 75 + And I press the "Save" button + + And I click on the Approve or reject link + And I see "Approve or reject name change" on the page + And I see "The juror has notified us of a change to their name. You should only approve this if you’ve seen proof of the name change." on the page + And I set the radio button to "Approve" + And I see "What evidence did the juror provide for their change of name?" on the page + And I set the radio button to "Reject" + And I see "Why did you reject the juror’s name change?" on the page + Then I set the radio button to "Approve" + And I set "What evidence did the juror provide for their change of name?" to "Passport" + And I press the "Continue" button + + And I see "Run a police check on this juror" on the page + And I press the "Run police check" button + And I see "Fnametester Lnametesting" on the page + + Examples: + |part_no |pool_no |user | + |641500900 |415170402 | MODTESTCOURT| + + + @JurorTransformationWIP @NewSchemaConverted @JM-5469 + Scenario Outline: The system shall allow a jury officer to record a proof of change of name and reject name change + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "10 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + + And "<part_no>" has "NEXT_DATE" as "10 mondays time" new schema + + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + + And I click on the "Juror details" link + And I click on the "Add or change" link + + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + + And I set "First name" to "FnameTester" + And I set "Last name" to "LnameTesting" + And I press the "Save" button + And I see "Pending approval" on the page + And I see the juror's new name "Fnametester Lnametesting" is pending approval + And I enter a date of birth that will make the juror between 18 and 75 + And I press the "Save" button + + And I click on the Approve or reject link + And I see "Approve or reject name change" on the page + And I see "The juror has notified us of a change to their name. You should only approve this if you’ve seen proof of the name change." on the page + And I set the radio button to "Reject" + And I see "Why did you reject the juror’s name change?" on the page + And I set "Why did you reject the juror’s name change?" to "Juror is not allowed" + And I press the "Continue" button + And I see "Confirm you want to reject this name change" on the page + And I see "Their name change request will be removed from their juror record. Their original name will continue to be used." on the page + And I press the "Reject name change" button + And I see "Mr Edward Palmer" on the page + + Examples: + |part_no |pool_no |user | + |641500133 |415170402 | MODTESTCOURT| + + + @JurorTransformationWIP @NewSchemaConverted @JM-5469 + Scenario Outline: The system shall allow a jury officer to record a proof of change of name + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "10 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + + And I click on the "Juror details" link + And I click on the "Add or change" link + + And I click on the "Fix error in current name" link + + #name longer than 20 characters + And I set "First name" to "FnameTestertttttttttttttt" + And I set "Last name" to "LnameTestinggggggggggggggg" + And I press the "Save" button + And I see error "Please check the first name" + And I see error "Please check the last name" + + #special characters + And I set "First name" to "FnameTester&#@!?%" + And I set "Last name" to "FnameTester&#@!?%" + And I press the "Save" button + + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + + And I set "First name" to "FnameTester" + And I set "Last name" to "LnameTesting" + And I press the "Save" button + + And I see "Pending approval" on the page + And I see the juror's new name "Fnametester Lnametesting" is pending approval + And I enter a date of birth that will make the juror between 18 and 75 + And I press the "Save" button + + And I see "Pending approval" on the page + And I see "Fnametester Lnametesting" on the page + + Examples: + |part_no |pool_no |user | + |641500911 |415170402 | MODTESTCOURT| + + @JurorTransformationWIP @NewSchemaConverted @JM-5469 + Scenario Outline: The system shall allow a jury officer to record a proof of change of name. Change name while recording paper summons + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "10 mondays time" new schema + + And I log in as "<user>" + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + When the user searches for juror record "<part_no>" from the global search bar + + And I click the Enter summons reply button + And I click on the "Enter a new name" link + And I see "Enter a new name" on the page + And I see "This new name will only become their legal name on their juror record after:" on the page + And I see "When you enter a new name here, it will overwrite any previous pending name." on the page + And I set "First name" to "FnameTester" + And I set "Last name" to "LnameTesting" + And I press the "Save" button + And I see "Pending approval" on the page + And I see the juror's new name "Mr Fnametester Lnametesting" is pending approval + + #juror details + When I fill in all of the juror details for the summons reply + And I click continue on the juror summons reply page + + #eligibility + Then the juror summons reply eligibility page is displayed + When I answer the juror summons reply eligibility questions + And I click continue on the juror summons reply page + + #can attend on date + Then the juror summons reply types page is displayed + When I set the radio button to "Can serve on date shown in summons" + And I click continue on the juror summons reply page + + #cjs + Then the juror summons reply CJS employment page is displayed + When I select that the juror has not worked in the criminal justice system + And I click continue on the juror summons reply page + + #reasonable adjustments + Then the juror summons reply reasonable adjustments page is displayed + When I select that the juror does not need adjustments + And I click continue on the juror summons reply page + + #confirm/sign + Then the juror summons reply Signature page is displayed + When I select that the summons reply has been signed + And I click done on the juror summons reply page + + And I see "Pending" on the page + And I see "Mr FnameTester LnameTesting" on the page + + Examples: + |part_no |pool_no |user | + |641500752 |415170402 | MODTESTCOURT| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4326.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4326.feature new file mode 100644 index 00000000..b1c8e5a0 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4326.feature @@ -0,0 +1,243 @@ +Feature: JM-4326 - Defer a juror and then complete their service at a later date + + @JurorTransformationWIP @JM-5795 + Scenario Outline: Mark juror as deferred - Add to pool Happy path paper - Bureau Officer + Given I am on "Bureau" "test" + + Given I log in as "<user>" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And pool "<pool_no>" has attendance date as "5 mondays time" new schema + + #create a pool to defer to + Given I navigate to the pool request screen + Given I create an active "Crown" court pool request for court "415", "14" Mondays in the future + + #search for juror and record paper response + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + #process response as deferral + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I set the "first" choice to "11" Mondays in the future + Then I set the "second" choice to "12" Mondays in the future + Then I set the "third" choice to "13" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I set the radio button to "Choose a different date" + Then I set the "alternate" choice to "14" Mondays in the future + And I press the "Continue" button + + Then I see "Select a pool for this date" on the page + And I select the pool I created for the deferral + And I press the "Continue" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + #check summons response + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Summons reply" link + #will fail here as a result of JM-5795 + And I see the processing outcome of the summons reply on juror record is "Deferral - granted (other)" + And I click on the "View summons reply" link + And I see the reply status has updated to "COMPLETED" + And I see the reply type has been updated to "DEFERRAL" + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500173|415170501| + + @JurorTransformationWIP @JM-5795 + Scenario Outline: Mark juror as deferred - Add to pool Happy path paper - Jury Officer + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And pool "<pool_no>" has attendance date as "5 mondays time" + + #log on and search for juror + And I log in as "<user>" + When the user searches for juror record "<part_no>" from the global search bar + + #record paper summons type - deferral + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + #process as deferral + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I set the "first" choice to "18" Mondays in the future + Then I set the "second" choice to "19" Mondays in the future + Then I set the "third" choice to "20" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I set the radio button to "Choose a different date" + Then I set the "alternate" choice to "14" Mondays in the future + And I press the "Continue" button + + #assign to pool + Then I see "Select a pool for this date" on the page + And I select one of the active pools available + And I press the "Continue" button + + + #check summons response + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Summons reply" link + #will fail here as a result of JM-5795 + And I see the processing outcome of the summons reply on juror record is "Deferral - granted (other)" + And I click on the "View summons reply" link + And I see the reply status has updated to "COMPLETED" + And I see the reply type has been updated to "DEFERRAL" + + + Examples: + |user |part_no |pool_no | + |MODTESTCOURT |141500764|415240404| + + + @JurorTransformationWIP @JM-5795 + Scenario Outline: Mark juror as deferred - Add to pool - Digital Response Bureau Officer + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And pool "<pool_no>" has attendance date as "5 mondays time" + + #record digital response + And I record a digital response for a juror with a deferral + | jurorNumber | <part_no> | + | jurorLname | LNAMESIXTWOFOUR | + | jurorPostcode | CH1 2AN | + + #log on and create a pool to defer to + Given I am on "Bureau" "test" + Given I log in as "<user>" + + Given I navigate to the pool request screen + Given I create an active "civil" court pool request for court "415", "14" Mondays in the future + + #search for juror and process reply + When the user searches for juror record "<part_no>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "14" Mondays in the future + And I press the "Continue" button + + Then I see "Select a pool for this date" on the page + And I select the pool I created for the deferral + And I press the "Continue" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + #search for juror and view reponse + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see the reply status has updated to "COMPLETED" + + + Examples: + |user |part_no |pool_no | + |MODTESTBUREAU|641500624|415170501| + + @JurorTransformationWIP @JM-4750 @JM-5795 + Scenario Outline: Mark juror as deferred - Add to pool - Digital Response Jury Officer + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And pool "<pool_no>" has attendance date as "5 mondays time" + + #record digital response + And I record a digital response for a juror with a deferral + | jurorNumber | <part_no> | + | jurorLname | LNAMEONEFIVENINE | + | jurorPostcode | CH1 2AN | + + #transfer pool to court + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #search for juror and view response + When the user searches for juror record "<part_no>" from the global search bar + And I click the summons reply tab + + #failing due to JM-4750 + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + + #process as deferral + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "14" Mondays in the future + And I press the "Continue" button + + #assign to pool + Then I see "Select a pool for this date" on the page + And I select one of the active pools available + And I press the "Continue" button + + + #check summons response + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Summons reply" link + #will fail here as a result of JM-5795 + And I see the processing outcome of the summons reply on juror record is "Deferral - granted (other)" + And I click on the "View summons reply" link + And I see the reply status has updated to "COMPLETED" + And I see the reply type has been updated to "DEFERRAL" + + Examples: + |user |part_no |pool_no | + |MODTESTCOURT |641500159|415240404| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4360.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4360.feature new file mode 100644 index 00000000..ca74669d --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4360.feature @@ -0,0 +1,52 @@ +Feature: JM-4360 - As a jury officer I need to be able to check jurors in for their attendance on the day - HAPPY PATH + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Check in jurors for attendance on their day + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + |<part_no_2> | <pool_no> | 415 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + |<part_no_2> | <pool_no> | 415 | + + And I log in as "<user>" + + #enter responses in order to be in a state to be checked in + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response and process now + + When the user searches for juror record "<part_no_2>" from the global search bar + And I record a happy path paper summons response and process now + + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I click on the "Jurors in waiting" link + And I set the radio button to "Check in" + + #check in + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<part_no>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "2" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<part_no_2>" to be checked in + And I press the "Check in juror" button + + #check jurors have been checked in at their right times + And I see "jurors listed as attending" on the page + And I see "<part_no>" in the same row as "9:00am" + And I see "<part_no_2>" in the same row as "2:30pm" + + + Examples: + |user |part_no |part_no_2 |pool_no | + |MODTESTCOURT |641500877|641500797 |415180101 | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4368-Jury-Officer-can-manually-run-police-check.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4368-Jury-Officer-can-manually-run-police-check.feature new file mode 100644 index 00000000..d08d66fc --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4368-Jury-Officer-can-manually-run-police-check.feature @@ -0,0 +1,148 @@ +Feature: JM-4368 Jury Officer Can Manually Run a Police Check + + @JurorTransformationMulti + Scenario Outline: Manually run police check - presence of link - not checked + + Given I am on "Bureau" "test" + + Given I log in as "MODTESTCOURT" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And I search for juror "<part_no>" + And I see the police check value is "Not checked" + And I see the link to run a police check + When I click the link to run a police check + And I see "Run a police check on this juror" on the page + And I see the button to run a police check + + Examples: + | part_no | pool_no | + |641500364 |415170402 | + + @JurorTransformationMulti + Scenario Outline: Manually run police check - presence of link - there was a problem + + Given I am on "Bureau" "test" + + Given I log in as "MODTESTCOURT" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + +# Given I set Police Check to "P" and Phoenix Checked to "U" for "<part_no>" + Given I set Police Check to "<police_check_value>" for "<part_no>" new schema + And I search for juror "<part_no>" + And I see the police check value is "<police_check_status>" + And I do not see the link to run a police check + + Examples: + | part_no | pool_no | police_check_value | police_check_status | + | 641500381 | 415170402 | UNCHECKED_MAX_RETRIES_EXCEEDED | Not checked - there was a problem. | + | 641500381 | 415170402 | ERROR_RETRY_OTHER_ERROR_CODE | In progress | + | 641500381 | 415170402 | ERROR_RETRY_UNEXPECTED_EXCEPTION | In progress | + + @JurorTransformationWIP @JM-5790 + Scenario Outline: Manually run police check - presence of link - failed + Given I am on "Bureau" "test" + Given I log in as "MODTESTCOURT" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + +# Given I set Police Check to "F" and Phoenix Checked to "C" for "<part_no>" + And I search for juror "<part_no>" + Given I set Police Check to "INELIGIBLE" for "<part_no>" new schema + And I see the police check value is "Failed" + And I do not see the link to run a police check + + Examples: + | part_no | pool_no | + |641500390 |415170402 | + + @JurorTransformationMulti + Scenario Outline: Manually run police check - presence of link - passed + + Given I am on "Bureau" "test" + + Given I log in as "MODTESTCOURT" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + +# Given I set Police Check to "P" and Phoenix Checked to "C" for "<part_no>" + Given I set Police Check to "ELIGIBLE" for "<part_no>" new schema + And I search for juror "<part_no>" + And I see the police check value is "Passed" + And I do not see the link to run a police check + + Examples: + | part_no | pool_no | + |641500402 |415170402 | + + @JurorTransformationWIP @Not_Implemented_In_Backend + Scenario Outline: Manually run police check - police check runs NOT IMPLEMENTED IN BACKEND + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + | part_no | pool_no | owner | + | <part_no> | <pool_no> | 415 | + + Given I log in as "MODTESTCOURT" + + Given I set Police Check to "NOT_CHECKED" for "<part_no>" new schema + And I search for juror "<part_no>" + And I record a happy path paper summons response and process now + And I search for juror "<part_no>" + And I see the police check value is "Not checked" + And I see the link to run a police check + When I click the link to run a police check + And I see "Run a police check on this juror" on the page +# NOT IMPLEMENTED IN BACKEND + And I see the button to run a police check + And I click the button to run a police check + And I see the police check value is not "Not checked" + + Examples: + | part_no | pool_no | + |641500405 |415170402 | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4494-Bureau-delete-juror-deferral.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4494-Bureau-delete-juror-deferral.feature new file mode 100644 index 00000000..70ee1b8b --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4494-Bureau-delete-juror-deferral.feature @@ -0,0 +1,152 @@ +Feature: JM-4494 Bureau Delete Juror Deferral + + @JurorTransformationMulti + Scenario Outline: Delete Juror deferral - digital + Given I am on "Public" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + And I record a digital response for a juror with a deferral new schema + |jurorNumber | <part_no>> | + |jurorLname | <last_name> | + |jurorPostcode | <postcode> | + + Given I am on "Bureau" "test" + Given I log in as "MODTESTBUREAU" + When the user searches for juror record "<part_no>" from the global search bar + And I click the summons reply tab + And I click on the "View summons reply" link + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "51" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + Then the user searches for juror record "<part_no>" from the global search bar + And I see the juror status on the juror record screen is "Deferred" + And I see the number of deferrals is "1" + And I see under pool details the pool number is "In deferral maintenance" + And I click the change link for the juror deferral + Then I press the "Delete deferral" button + And I see "Juror record updated: Responded" on the page + And I see the juror status on the juror record screen is "Responded" + + Examples: + |part_no |last_name |postcode |pool_no | + |641500020|LNAMETWOZERO |CH1 2AN |415170402 | + + @JurorTransformationMulti + Scenario Outline: Delete Juror deferral - paper + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And pool "<pool_no>" has attendance date as "5 mondays time" + + Given I log in as "MODTESTBUREAU" + + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I set the "first" choice to "11" Mondays in the future + Then I set the "second" choice to "12" Mondays in the future + Then I set the "third" choice to "13" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "50" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + Then the user searches for juror record "<part_no>" from the global search bar + And I see the juror status on the juror record screen is "Deferred" + And I see the number of deferrals is "1" + And I see under pool details the pool number is "In deferral maintenance" + And I click the change link for the juror deferral + Then I press the "Delete deferral" button + And I see "Juror record updated: Responded" on the page + And I see the juror status on the juror record screen is "Responded" + + Examples: + |part_no |pool_no | + |641500817|415170501 | + + @JurorTransformationMulti + Scenario Outline: Deferral sent to pool not valid for Delete Juror deferral + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "7 mondays time" + + Given I log in as "MODTESTBUREAU" + + Given I navigate to the pool request screen + Given I create an active "civil" court pool request for court "415", "14" Mondays in the future + + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + + And I see the reply "type" on the response is "DEFERRAL" + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I set the "first" choice to "11" Mondays in the future + Then I set the "second" choice to "12" Mondays in the future + Then I set the "third" choice to "13" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + Then I select to Choose a different date + Then I set the "alternate" choice to "14" Mondays in the future + And I press the "Continue" button + + Then I see "Select a pool for this date" on the page + And I select the pool I created for the deferral + And I press the "Continue" button + + And I do not see "Sorry, there is a technical problem" on the page + And I see "Deferral granted (other)" on the page + + Then the user searches for juror record "<part_no>" from the global search bar + And I see the juror status on the juror record screen is "Responded" + And I see the number of deferrals is "1" + And I do not see "In deferral maintenance" on the page + + Examples: + |part_no |pool_no | + |641500197|415170402 | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4494-Jury-officer-delete-juror-deferral.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4494-Jury-officer-delete-juror-deferral.feature new file mode 100644 index 00000000..f46c2072 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4494-Jury-officer-delete-juror-deferral.feature @@ -0,0 +1,53 @@ +Feature: JM-4494 Jury officer Delete Juror Deferral + + @JurorTransformationMulti + Scenario Outline: Jury Officer Delete Juror deferral - paper + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + Given I log in as "MODTESTCOURT" + When the user searches for juror record "<part_no>" from the global search bar + Then I record a happy path deferral paper summons response + And I see the reply "type" on the response is "DEFERRAL" + + Then I click the process reply button + Then I set the radio button to "Deferral request" + And I click continue on the process reply page + + Then I set the "first" choice to "11" Mondays in the future + Then I set the "second" choice to "12" Mondays in the future + Then I set the "third" choice to "13" Mondays in the future + And I click continue on the process reply page + + Then I select "O - OTHER" from the "Reason for the deferral request" dropdown + When I select to Choose a different date + Then I set the "alternate" choice to "45" Mondays in the future + And I press the "Continue" button + + Then I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I do not see "Sorry, there is a technical problem" on the page + + When the user searches for juror record "<part_no>" from the global search bar + And I see the juror status on the juror record screen is "Deferred" + And I see the number of deferrals is "1" + And I see under pool details the pool number is "In deferral maintenance" + And I click the change link for the juror deferral + Then I press the "Delete deferral" button + And I see "Juror record updated: Responded" on the page + And I see the juror status on the juror record screen is "Responded" + + Examples: + | part_no | pool_no | + |641500371 |415170402 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4677.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4677.feature new file mode 100644 index 00000000..0f37eb17 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4677.feature @@ -0,0 +1,175 @@ +Feature: JM-4677 - As a jury officer I need to create a trial + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create a Trial + + Given I am on "Bureau" "test" + + Given I have deleted court rooms for "416" + Given I have inserted court rooms for "416" + + #log on and search for juror + And I log in as "<user>" + + And I press the "Apps" button + And I click on the "Trial management" link + And I press the "Create a trial" button + And I see "Create a trial" on the page + #error check + And I press the "Create trial" button + And I see error "Enter a trial number" + And I see error "Select whether this is a criminal or civil trial" + And I see error "Enter a start date for this trial" + And I see error "Enter the judge’s name" + And I see error "Select a court where this trial will take place" + And I set the radio button to "Criminal" + And I press the "Create trial" button + And I see error "Enter defendants" + + #Create trial + And I set "Case number" to "T202141674" + And I set the radio button to "Criminal" + And I see "Defendants" on the page + Then I set the radio button to "Civil" + And I see "Respondents" on the page + And I set the radio button to "Criminal" + And I set "Defendants" to "Defendant" + And I set the "Start date for Trial" date to a Monday "10" weeks in the future + + And I set "Judge" to "PATRICIA H AITKEN" + And I set the radio button to "Chester" + And I see error "Select courtroom from provided list" + And I set "Courtroom" to "JURY ASSEMBLY ROOM" + And I press the "Create trial" button + + And I see the following juror information on the Trial details screen + | Defendants | Defendant | + | Trial type | Criminal | + | Judge | PATRICIA H AITKEN | + | Courtroom | Jury Assembly Room | + | Protected? | No | + + Examples: + |user | + |MODTESTCOURT | + + + @JurorTransformationWIP + Scenario Outline: Create a Trial and Edit Trial + + Given I am on "Bureau" "test" + + #log on and search for juror + And I log in as "<user>" + + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Manage trials" link + And I press the "Create a trial" button + And I see "Create a trial" on the page + And I set "Case Number" to "T202341649" + Then I set the radio button to "Civil" + And I see "Respondents" on the page + And I set "Respondents" to "Respondent" + And I set the "Start date for Trial" date to a Monday "10" weeks in the future + + And I set "Judge" to "PATRICIA H AITKEN" + And I set "Courtroom" to "JURY ASSEMBLY ROOM" + And I check the "Protected" checkbox + And I press the "Create Trial" button + And I see "Do you want this trial to be protected" on the page + And I see "All juror names will be anonymous so that their identity can be protected" on the page + And I press the "Yes-continue" button + + And I see the following juror information on the Trial details screen + | Respondents | Respondent | + | Trial type | Civil | + | Judge | PATRICIA H AITKEN | + | Courtroom | Jury Assembly Room | + | Protected? | Yes | + + #the edit trial functionality hasn't yet been built. WILL remove WIP tag when complete + + And I press the "Edit trial" button + And I set "Judge" to "EDWARD MATTHEWS" + And I press the "Save changes" button + +#edited trial + And I see the following juror information on the Trial details screen + | Respondents | Respondent | + | Trial type | Civil | + | Judge | EDWARD MATTHEWS | + | Courtroom | Jury Assembly Room | + | Protected? | Yes | + + + #check all trials for my trial + And I press the "Apps" button + And I click on the "Trial management" link + + And I set the radio button to "Active trials" + And I see "T202341649" on the page + + Examples: + |user | + |MODTESTCOURT | + + @JurorTransformationWIP @NewSchemaConverted @JM-5793 + Scenario Outline: Create a trial for user with access to multiple courts + + Given I am on "Bureau" "test" + + #log on and search for juror + And I log in as "<user>" + + And I press the "Apps" button + And I click on the "Trial management" link + And I press the "Create a trial" button + And I see "Create a trial" on the page + + #Create trial + And I set "Case number" to "T202311519" + And I set the radio button to "Criminal" + And I set "Defendants" to "TESTING" + And I set the "Start date for Trial" date to a Monday "10" weeks in the future + + And I set "Judge" to "PATRICIA H AITKEN" + And I set the radio button to "Chester" + And I set "Courtroom" to "JURY ASSEMBLY ROOM" + And I press the "Create trial" button + + And I see the following juror information on the Trial details screen + | Defendants | TESTING | + | Trial type | Criminal | + | Judge | PATRICIA H AITKEN | + | Courtroom | Jury Assembly Room | + | Protected? | No | + + + And I press the "Apps" button + And I click on the "Trial management" link + And I press the "Create a trial" button + And I see "Create a trial" on the page + + #Create trial + And I set "Case number" to "T202341272" + And I set the radio button to "Criminal" + And I set "Defendants" to "TESTER" + And I set the "Start date for Trial" date to a Monday "10" weeks in the future + And I set "Judge" to "EDWARD MATTHEWS" + #fails due to 5793 + And I set the radio button to "Lewes sitting at chichester" + And I set "Courtroom" to "COURT ROOM 2" + And I press the "Create trial" button + + And I see the following juror information on the Trial details screen + | Defendants | TESTER | + | Trial type | Criminal | + | Judge | EDWARD MATTHEWS | + | Courtroom | Court Room 2 | + | Protected? | No | + + + Examples: + |user | + |MODTESTCOURT | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4949.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4949.feature new file mode 100644 index 00000000..7114b168 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4949.feature @@ -0,0 +1,540 @@ +Feature: JM-4949 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Return all jurors on a panel + + Given I am on "Bureau" "test" + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + + #check in juror + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + And I see "<juror_number>" in the same row as "9:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "1" + And I press the "Continue" button + + #empanel juror + And I check the juror "<juror_number>" checkbox + + #Empanel jury + And I press the "Empanel jury" button + And I see "How many jurors do you want to empanel?" on the page + And I set number of jurors to empanel to "1" + And I press the "Continue" button + And I see "Empanel jury" on the page + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + + And I select the radio button with name "<juror_number>" and value "juror" + And I press the "Confirm and empanel jury" button + And I see "Juror" in the same row as "<juror_number>" + + + #retrurn jury process + And I check the juror "<juror_number>" checkbox + And I press the "Return jury" button + And I see "How do you want to return the juror you selected?" on the page + And I press the "Continue" button + And I see error "Select how you want to return the juror" + And I set the radio button to "Return and confirm attendance" + And I press the "Continue" button + And I see "Confirm attendance" on the page + And I press the "Continue" button + + And I see error "Enter a check in time" + And I see error "Enter a check out time" + + #check in on confirm attendance + And I set juror check in hour to "9" on confirm attendance + And I set juror check in minute to "20" on confirm attendance + And I click on the am radio button for juror check in on confirm attendance + + #check out on confirm attendance + And I set juror check out hour to "2" on confirm attendance + And I set juror check out minute to "30" on confirm attendance + And I click on the pm radio button for juror check out on confirm attendance + + And I press the "Continue" button + And I see "Return jurors and confirm attendance" on the page + And I see "You're returning 1 juror and confirming their attendance for today." on the page + And I see "A check in time of 9:20am will be applied to any juror without a check in time." on the page + And I see "A check out time of 2:30pm will be applied to all juror." on the page + And I see "They'll be returned to the list of jurors in waiting, to continue their service." on the page + + #return juror + And I press the "Return" button + And I see "1 juror returned" on the page + + #check panel is no more as the only juror on there has been returned + And I press the "Generate panel" button + And I see "Which jurors do you want to generate a panel from?" on the page + + #check juror has been returned to jurors in waiting + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I see "<juror_number>" in the same row as "Responded" + + + Examples: + |user |juror_number | pool_number | trial_number | + |MODTESTCOURT |041520012 | 415300201 | TEST2022222 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Return select jurors on a panel to keep panel active + + Given I am on "Bureau" "test" + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + And I update juror "<juror_number_3>" to have a status of responded in order to record attendance + + #check in juror + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + And I see "<juror_number>" in the same row as "9:00am" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + And I see "<juror_number_2>" in the same row as "9:00am" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_3>" to be checked in + And I press the "Check in juror" button + And I see "<juror_number_3>" in the same row as "9:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "3" + And I press the "Continue" button + + #empanel juror + And I check the juror "<juror_number>" checkbox + And I check the juror "<juror_number_2>" checkbox + And I check the juror "<juror_number_3>" checkbox + + #Empanel jury + And I press the "Empanel jury" button + And I see "How many jurors do you want to empanel?" on the page + And I set number of jurors to empanel to "3" + And I press the "Continue" button + And I see "Empanel jury" on the page + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + + And I select the radio button with name "<juror_number>" and value "juror" + And I select the radio button with name "<juror_number_2>" and value "juror" + And I select the radio button with name "<juror_number_3>" and value "juror" + And I press the "Confirm and empanel jury" button + And I see "Juror" in the same row as "<juror_number>" + And I see "Juror" in the same row as "<juror_number_2>" + And I see "Juror" in the same row as "<juror_number_3>" + + + #retrurn jury process + And I check the juror "<juror_number>" checkbox + And I check the juror "<juror_number_2>" checkbox + And I press the "Return jury" button + And I see "How do you want to return the jurors you selected?" on the page + And I press the "Continue" button + And I see error "Select how you want to return the jurors" + And I set the radio button to "Return and confirm attendance" + And I press the "Continue" button + And I see "Confirm attendance" on the page + And I press the "Continue" button + + And I see error "Enter a check in time" + And I see error "Enter a check out time" + + #check in on confirm attendance + And I set juror check in hour to "9" on confirm attendance + And I set juror check in minute to "20" on confirm attendance + And I click on the am radio button for juror check in on confirm attendance + + #check out on confirm attendance + And I set juror check out hour to "2" on confirm attendance + And I set juror check out minute to "30" on confirm attendance + And I click on the pm radio button for juror check out on confirm attendance + + And I press the "Continue" button + And I see "Return jurors and confirm attendance" on the page + And I see "You're returning 2 jurors and confirming their attendance for today." on the page + And I see "A check in time of 9:20am will be applied to any jurors without a check in time." on the page + And I see "A check out time of 2:30pm will be applied to all jurors." on the page + And I see "They'll be returned to the list of jurors in waiting, to continue their service." on the page + + #return juror + And I press the "Return" button + And I see "2 jurors returned" on the page + + #check juror is still in trial as they weren't returned + And I see "Juror" in the same row as "<juror_number_3>" + + Examples: + |user |juror_number |juror_number_2 |juror_number_3 | pool_number | trial_number | + |MODTESTCOURT |041520013 | 041520014 | 041520015 | 415300201 | TEST2022223 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Return juror but do not confirm attendance + + Given I am on "Bureau" "test" + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + + #check in juror + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + And I see "<juror_number>" in the same row as "9:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "1" + And I press the "Continue" button + + #empanel juror + And I check the juror "<juror_number>" checkbox + + #Empanel jury + And I press the "Empanel jury" button + And I see "How many jurors do you want to empanel?" on the page + And I set number of jurors to empanel to "1" + And I press the "Continue" button + And I see "Empanel jury" on the page + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + + And I select the radio button with name "<juror_number>" and value "juror" + And I press the "Confirm and empanel jury" button + And I see "Juror" in the same row as "<juror_number>" + + + #retrurn jury process + And I check the juror "<juror_number>" checkbox + And I press the "Return jury" button + And I see "How do you want to return the juror you selected?" on the page + And I set the radio button to "Return but do not confirm attendance" + And I press the "Continue" button + + And I see "Return jurors without confirming attendance" on the page + And I see "You're returning 1 juror." on the page + And I see "You have not confirmed their attendance yet. You'll need to do this separately." on the page + + And I press the "Return" button + And I see "1 juror returned" on the page + + #check juror has been returned to jurors in waiting + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I see "<juror_number>" in the same row as "Responded" + + + Examples: + |user |juror_number | pool_number | trial_number | + |MODTESTCOURT |041520016 | 415300201 | TEST2022224 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Return juror and complete their service + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + + #check in juror + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + And I see "<juror_number>" in the same row as "9:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "1" + And I press the "Continue" button + + #Empanel jury + And I check the juror "<juror_number>" checkbox + And I press the "Empanel jury" button + And I see "How many jurors do you want to empanel?" on the page + And I set number of jurors to empanel to "1" + And I press the "Continue" button + And I see "Empanel jury" on the page + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + + And I select the radio button with name "<juror_number>" and value "juror" + And I press the "Confirm and empanel jury" button + And I see "Juror" in the same row as "<juror_number>" + + #retrurn jury process + And I check the juror "<juror_number>" checkbox + And I press the "Return jury" button + And I see "How do you want to return the juror you selected?" on the page + And I set the radio button to "Return, confirm attendance and complete their service" + And I press the "Continue" button + + And I see "Confirm attendance" on the page + And I press the "Continue" button + + And I see error "Enter a check in time" + And I see error "Enter a check out time" + + #check in on confirm attendance + And I set juror check in hour to "9" on confirm attendance + And I set juror check in minute to "20" on confirm attendance + And I click on the am radio button for juror check in on confirm attendance + + #check out on confirm attendance + And I set juror check out hour to "2" on confirm attendance + And I set juror check out minute to "30" on confirm attendance + And I click on the pm radio button for juror check out on confirm attendance + + And I press the "Continue" button + And I see "Return jurors and complete their service" on the page + And I see "You're returning 1 juror and confirming their attendance for today." on the page + And I see "Their service will be completed." on the page + And I press the "Return" button + And I see "1 juror returned" on the page + + #check jurors service has been completed + When the user searches for juror record "<juror_number>" from the global search bar + And I see the juror status has updated to "Completed" + + Examples: + |user |juror_number | pool_number | trial_number | + |MODTESTCOURT |041520017 | 415300201 | TEST2022225 | + + + @JurorTransformationWIP + Scenario Outline: Attempt to end trial for panel which is still active + + Given I am on "Bureau" "test" + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + + #check in juror + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + + And I see "<juror_number>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "9:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "2" + And I press the "Continue" button + + #empanel juror + And I check the juror "<juror_number>" checkbox + And I check the juror "<juror_number_2>" checkbox + + #Empanel jury + And I press the "Empanel jury" button + And I see "How many jurors do you want to empanel?" on the page + And I set number of jurors to empanel to "2" + And I press the "Continue" button + And I see "Empanel jury" on the page + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + + And I select the radio button with name "<juror_number>" and value "juror" + And I select the radio button with name "<juror_number_2>" and value "juror" + And I press the "Confirm and empanel jury" button + And I see "Juror" in the same row as "<juror_number>" + And I see "Juror" in the same row as "<juror_number_2>" + + + #retrurn jury process for just one of the jurors + And I check the juror "<juror_number>" checkbox + And I press the "Return jury" button + And I see "How do you want to return the juror you selected?" on the page + And I press the "Continue" button + And I see error "Select how you want to return the juror" + And I set the radio button to "Return and confirm attendance" + And I press the "Continue" button + And I see "Confirm attendance" on the page + And I press the "Continue" button + + And I see error "Enter a check in time" + And I see error "Enter a check out time" + + #check in on confirm attendance + And I set juror check in hour to "9" on confirm attendance + And I set juror check in minute to "20" on confirm attendance + And I click on the am radio button for juror check in on confirm attendance + + #check out on confirm attendance + And I set juror check out hour to "2" on confirm attendance + And I set juror check out minute to "30" on confirm attendance + And I click on the pm radio button for juror check out on confirm attendance + + And I press the "Continue" button + And I see "Return jurors and confirm attendance" on the page + And I see "You're returning 1 juror and confirming their attendance for today." on the page + And I see "A check in time of 9:20am will be applied to any juror without a check in time." on the page + And I see "A check out time of 2:30pm will be applied to all juror." on the page + And I see "They'll be returned to the list of jurors in waiting, to continue their service." on the page + + #return juror + And I press the "Return" button + And I see "1 juror returned" on the page + + #check juror number 2 is still present in panel + And I see "Juror" in the same row as "<juror_number_2>" + + #attempt to end trial - this option hasn't yet been implemented but will go in soon, so will set this script to WIP + And I press the "End trial" button + And I see "You must return all jurors before you can end this trial" on the page + + + + + + Examples: + |user |juror_number | juror_number_2 | pool_number | trial_number | + |MODTESTCOURT |041520018 | 041520019 | 415300201 | TEST2022226 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4956-4679.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4956-4679.feature new file mode 100644 index 00000000..e8e26c22 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4956-4679.feature @@ -0,0 +1,400 @@ +Feature: JM-4956 - 4679 + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Create a Trial and Generate Panel + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "11" + And I set "Minute" to "30" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + + And I see "<juror_number>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "11:30am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I press the "Continue" button + And I see error "Select which group of jurors you want to generate a panel from" + And I see error "Enter how many jurors are needed on this panel" + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "2" + And I press the "Continue" button + + #see my jurors are panelled + And I see "<juror_number>" in the same row as "Panel" + And I see "<juror_number_2>" in the same row as "Panel" + + And I check the juror "<juror_number>" checkbox + And I check the juror "<juror_number>_2" checkbox + + #check my jurors are panelled in attendance list + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I see "<juror_number>" in the same row as "Panel" + And I see "<juror_number_2>" in the same row as "Panel" + + Examples: + |user |juror_number | juror_number_2 | pool_number | trial_number | + |MODTESTCOURT |041520001 | 041520002 |415300207 | T202495831 | + + + @JurorTransformationWIP @JM-5972 + Scenario Outline: Generate a Panel for a Protected Trial + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + And a new protected trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + + And I see "<juror_number>" in the same row as "9:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "1" + And I press the "Continue" button + + #see my jurors are anonymous + #this will fail here as a result of JM-5972 + + Examples: + |user |juror_number | pool_number | trial_number | + |MODTESTCOURT |041520003 | 415300209 | T202495831 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create a Trial and Generate Panel from a specific pool + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I press the "Continue" button + And I see error "Select which group of jurors you want to generate a panel from" + And I see error "Enter how many jurors are needed on this panel" + And I set the radio button to "Jurors from one or more specific pools" + And I set "Number of jurors needed on this panel" to "2" + And I press the "Continue" button + + And I see "Select jurors from one or more pools" on the page + And I check the pool number checkbox on the select specific pool page on create panel + And I press the "Continue" button + + And I see "<juror_number>" in the same row as "Panel" + And I see "<juror_number_2>" in the same row as "Panel" + + Examples: + |user |juror_number | juror_number_2 | pool_number | trial_number | + |MODTESTCOURT |041520004 | 041520005 |415300213 | T2024111111 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: JM-4679 - Generate a panel and then empanel - Happy Path + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner| + |<juror_number> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + And I update juror "<juror_number_3>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + + And I set "Hour" to "10" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + + And I set "Hour" to "11" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_3>" to be checked in + And I press the "Check in juror" button + + And I see "<juror_number>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "10:00am" + And I see "<juror_number_3>" in the same row as "11:00am" + + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "3" + And I press the "Continue" button + + #empanel juror + And I check the juror "<juror_number>" checkbox + And I check the juror "<juror_number_2>" checkbox + And I check the juror "<juror_number_3>" checkbox + + #Empanel jury + And I press the "Empanel jury" button + And I see "How many jurors do you want to empanel?" on the page + And I set number of jurors to empanel to "10" + And I press the "Continue" button + And I see error "You must select a number between 1 and 3" + And I set number of jurors to empanel to "1" + And I press the "Continue" button + And I see "Empanel jury" on the page + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + + And I select the radio button with name "<juror_number_3>" and value "juror" + And I select the radio button with name "<juror_number>" and value "unused" + And I select the radio button with name "<juror_number_2>" and value "challenged" + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + And I see "1 selected of 1 jurors needed" on the page + + #jurors set to JUROR will still show in panel with status of Juror + And I press the "Confirm and empanel jury" button + And I see "Juror" in the same row as "<juror_number_3>" + + #jurors set to Not used or Challenged will be removed from panel and placed in jurors in waiting under status Responded + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I see "Responded" in the same row as "<juror_number>" + And I see "Responded" in the same row as "<juror_number_2>" + + Examples: + |user |juror_number | juror_number_2 |juror_number_3 | pool_number | trial_number | + |MODTESTCOURT |041520006 | 041520007 |041520008 | 415300211 | T202495831 | + + + @JurorTransformation @NewSchemaConverted + Scenario Outline: JM-4679 - Generate a panel and then empanel - Unhappy Path + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner| + |<juror_number> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + And I update juror "<juror_number>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + And I update juror "<juror_number_3>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + + And I set "Hour" to "10" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + + And I set "Hour" to "11" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_3>" to be checked in + And I press the "Check in juror" button + + And I see "<juror_number>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "10:00am" + And I see "<juror_number_3>" in the same row as "11:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "3" + And I press the "Continue" button + + #empanel juror + And I check the juror "<juror_number>" checkbox + And I check the juror "<juror_number_2>" checkbox + And I check the juror "<juror_number_3>" checkbox + + #Empanel jury + And I press the "Empanel jury" button + And I see "How many jurors do you want to empanel?" on the page + And I set number of jurors to empanel to "10" + And I press the "Continue" button + And I see error "You must select a number between 1 and 3" + And I set number of jurors to empanel to "1" + And I press the "Continue" button + And I see "Empanel jury" on the page + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + + #select more jurors than i need + And I select the radio button with name "<juror_number>" and value "juror" + And I select the radio button with name "<juror_number_2>" and value "juror" + And I select the radio button with name "<juror_number_3>" and value "juror" + And I see "When you confirm, anyone not used or challenged will be returned to the ‘jurors in waiting’ list." on the page + And I see "3 selected of 1 jurors needed" on the page + + #jurors set to JUROR will still show in panel with status of Juror + And I press the "Confirm and empanel jury" button + And I see error "You must select 1 jurors to serve on the jury" + And I select the radio button with name "<juror_number_2>" and value "challenged" + And I select the radio button with name "<juror_number_3>" and value "unused" + And I press the "Confirm and empanel jury" button + And I see "Juror" in the same row as "<juror_number>" + + #jurors set to Not used or Challenged will be removed from panel and placed in jurors in waiting under status Responded + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I see "Responded" in the same row as "<juror_number_2>" + And I see "Responded" in the same row as "<juror_number_3>" + + Examples: + |user |juror_number | juror_number_2 |juror_number_3 | pool_number | trial_number | + |MODTESTCOURT |041520009 | 041520010 |041520011 | 415300214 | T202425891 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4958-4954.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4958-4954.feature new file mode 100644 index 00000000..3a145ddd --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-4958-4954.feature @@ -0,0 +1,191 @@ +Feature: JM-4958, JM-4954 As a jury officer i need to be able to complete a jurors service + + @JurorTransformationWIP @NewSchemaConverted @JM-6043 + Scenario Outline: Complete Service as a jury officer - Bulk flow + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number1> | <pool_number> | 5 | 400 | + | 415 |<juror_number2> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number1>| <pool_number> | 415 | + |<juror_number2>| <pool_number> | 415 | + + #log on and search for juror + And I log in as "<user>" + When the user searches for juror record "<juror_number1>" from the global search bar + + #record paper summons for juror and set to responded + Then I record a happy path paper summons response + And I click on the "No, skip and process later" link + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I click the checkbox to mark the reply as responded + And I confirm I want to mark the reply as responded + + When the user searches for juror record "<juror_number2>" from the global search bar + Then I record a happy path paper summons response + And I click on the "No, skip and process later" link + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I click the checkbox to mark the reply as responded + And I confirm I want to mark the reply as responded + + #view pool record, select juror and complete + When the user searches for juror record "<juror_number1>" from the global search bar + And I click on the pool number link on Juror Record + And I check the select all checkbox on pool overview + And I press the "Complete service" button + And I set the "Completion date" single date field to a Monday "17" weeks in the future + And I press the "Complete service" button + And I see "Service completed for 2 jurors" on the page + + #view summons response + When the user searches for juror record "<juror_number1>" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see the reply status has updated to "COMPLETED" + + When the user searches for juror record "<juror_number2>" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see the juror status on the juror record screen is "Completed" + + Examples: + |user |juror_number1|juror_number2|pool_number| + |MODTESTCOURT |041500036 |041500037 |415300127 | + + + @JurorTransformationWIP @NewSchemaConverted @JM-6043 + Scenario Outline: Complete Service as a jury officer - Bulk flow - Unhappy Path + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number1> | <pool_number> | 5 | 400 | + | 415 |<juror_number2> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number1>| <pool_number> | 415 | + |<juror_number2>| <pool_number> | 415 | + + #log on and search for juror + And I log in as "<user>" + When the user searches for juror record "<juror_number1>" from the global search bar + + #record paper summons for both jurors and set to responded + Then I record a happy path paper summons response + And I click on the "No, skip and process later" link + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I click the checkbox to mark the reply as responded + And I confirm I want to mark the reply as responded + + #view pool record, select juror and complete + When the user searches for juror record "<juror_number1>" from the global search bar + And I click on the pool number link on Juror Record + And I check the select all checkbox on pool overview + And I press the "Complete service" button + + #attempt complete service of ineligible juror/complete service for eligible juror + And I see "You cannot complete service for one or more jurors" on the page + And I see "You can only complete service for jurors with a status of 'responded'." on the page + And I see "Summoned" in the same row as "<juror_number2>" + And I press the "Continue with responded jurors only" button + And I set the "Completion date" single date field to a Monday "17" weeks in the future + And I press the "Complete service" button + And I see "Service completed for 1 juror" on the page + + #view summons response + When the user searches for juror record "<juror_number1>" from the global search bar + And I click on the "Summons reply" link + And I click on the "View summons reply" link + And I see the juror status on the juror record screen is "Completed" + + Examples: + |user |juror_number1|juror_number2|pool_number | + |MODTESTCOURT |041500038 |041500039 |415300128 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Complete Service as a jury officer - Individual flow + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + #log on and search for juror + And I log in as "<user>" + When the user searches for juror record "<juror_number>" from the global search bar + + #record paper summons for juror and set to responded + Then I record a happy path paper summons response + And I click on the "No, skip and process later" link + And I click the process reply button + Then I mark the reply as responded + And I click continue on the juror summons reply page + And I click the checkbox to mark the reply as responded + And I confirm I want to mark the reply as responded + + #view juror and complete + When the user searches for juror record "<juror_number>" from the global search bar + And I click the update juror record button + And I set the radio button to "Complete service" + And I click continue on the update juror record screen + And I set the "Completion date" single date field to a Monday "17" weeks in the future + And I press the "Complete service" button + Then I see "Juror's service completed" on the page + And I see the juror status on the juror record screen is "Completed" + + Examples: + |user |juror_number |pool_number | + |MODTESTCOURT |041500044 |415300134 | + + + @JurorTransformationMulti + Scenario Outline: Complete Service as a jury officer - Individual flow - Unhappy Path (juror not marked responded) + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + | part_no | pool_no | owner | + | <juror_number> | <pool_number> | 415 | + + #log on and search for juror + And I log in as "<user>" + When the user searches for juror record "<juror_number>" from the global search bar + + #record paper summons for juror and do not set to responded + Then I record a happy path paper summons response + And I click on the "No, skip and process later" link + + + #view juror and complete + When the user searches for juror record "<juror_number>" from the global search bar + And I click the update juror record button + And I set the radio button to "Complete service" + And I click continue on the update juror record screen + And I set the "Completion date" single date field to a Monday "17" weeks in the future + And I press the "Complete service" button + # Assuming error is same as for bulk process as it doesn't appear in design files + Then I see "Juror number <juror_number> is not in a valid state to complete service" on the page + + Examples: + |user |juror_number |pool_number | + |MODTESTCOURT |415300135 |041500045 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5060-5062.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5060-5062.feature new file mode 100644 index 00000000..fa3a950c --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5060-5062.feature @@ -0,0 +1,258 @@ +Feature: JM-5060 - 5062 + + @JurorTransformationWIP @JM-5889 + Scenario Outline: JM-5060 - Mark Juror as Failed to Attend + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + #log on and search for juror + And I log in as "<user>" + + #put juror in state to have their attendance status set + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response + And I click on the "No, skip and process later" link + When the user searches for juror record "<part_no>" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + And I press the "Process reply" button + And I see "How do you want to process this reply?" on the page + And I set the radio button to "Mark as responded" + And I press the "Continue" button + And I see "Mark as responded" on the page + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #mark as failed to attend/error checks + When the user searches for juror record "<part_no>" from the global search bar + And I press the "Update juror record" button + And I press the "Continue" button + And I see error "Select how you want to update the juror record" + And I set the radio button to "Change juror status to ‘Failed to attend’" + And I press the "Continue" button + And I see "This will complete their service and they will not be expected at court again" on the page + And I press the "Change status to ‘Failed to attend’" button + And I see "You must tick the box if you want to change this juror’s status to ‘Failed to attend’" in the error banner + And I check the failed to attend checkbox + And I press the "Change status to ‘Failed to attend’" button + And I see the juror record updated banner containing "Failed to attend" + And I see the juror status has updated to "Failed to attend" + + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Attendance" link + + #this will fail here as a result of JM-5889 + And I see the following information on the Juror Attendance table + | Attendances | 0 | + | Absences | 1 | + + + Examples: + |user |part_no | pool_no | + |MODTESTCOURT |741500509| 415240833 | + + + @JurorTransformationWIP @JM-5889 + Scenario Outline: JM-5060 - Mark Juror as Failed to Attend for a juror with an Attendance - Unhappy Path + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + #log on and search for juror + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response + And I click on the "No, skip and process later" link + + When the user searches for juror record "<part_no>" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + And I press the "Process reply" button + And I see "How do you want to process this reply?" on the page + And I set the radio button to "Mark as responded" + And I press the "Continue" button + And I see "Mark as responded" on the page + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #check in juror in order to list as attended + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I click on the "Jurors in waiting" link + And I set the radio button to "Check in" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<part_no>" to be checked in + And I press the "Check in juror" button + And I see "<part_no>" in the same row as "9:00am" + + #attempt to mark as failed to attend + When the user searches for juror record "<part_no>" from the global search bar + And I press the "Update juror record" button + And I set the radio button to "Change juror status to ‘Failed to attend’" + And I press the "Continue" button + And I check the failed to attend checkbox + And I press the "Change status to ‘Failed to attend’" button + And I see "Unable to change this juror’s status to ‘Failed to attend’" in the error banner + + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Attendance" link + + #this will fail here as a result of JM-5889 + And I see the following information on the Juror Attendance table + | Attendances | 1 | + | Absences | 0 | + + + Examples: + |user |part_no | pool_no | + |MODTESTCOURT |741500287| 415240833 | + + + @JurorTransformationWIP @JM-5889 + Scenario Outline: JM-5060 - Mark Juror as Failed to Attend for a juror who has given a reasonable reason - Unhappy Path + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + #log on and search for juror + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response + And I click on the "No, skip and process later" link + + When the user searches for juror record "<part_no>" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + And I press the "Process reply" button + And I see "How do you want to process this reply?" on the page + And I set the radio button to "Mark as responded" + And I press the "Continue" button + And I see "Mark as responded" on the page + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + When the user searches for juror record "<part_no>" from the global search bar + And I press the "Update juror record" button + And I set the radio button to "Change juror status to ‘Failed to attend’" + And I press the "Continue" button + And I check the failed to attend checkbox + And I press the "Change status to ‘Failed to attend’" button + And I see the juror record updated banner containing "Failed to attend" + And I see the juror status has updated to "Failed to attend" + + #attempt to mark as failed to attend again now that juror has given reasonable reason + When the user searches for juror record "<part_no>" from the global search bar + And I press the "Update juror record" button + And I do not see failed to attend radio button in the update juror record section + + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Attendance" link + + #this will fail here as a result of JM-5889 + And I see the following information on the Juror Attendance table + | Attendances | 0 | + | Absences | 1 | + + Examples: + |user |part_no | pool_no | + |MODTESTCOURT |741500401| 415240833 | + + + @JurorTransformationWIP @JM-5889 + Scenario Outline: JM-5062 - Undo Failed to Attend + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + #log on and search for juror + And I log in as "<user>" + + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response + And I click on the "No, skip and process later" link + + When the user searches for juror record "<part_no>" from the global search bar + Then I click the summons reply tab + And I click on the view summons reply link + And I press the "Process reply" button + And I see "How do you want to process this reply?" on the page + And I set the radio button to "Mark as responded" + And I press the "Continue" button + And I see "Mark as responded" on the page + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + When the user searches for juror record "<part_no>" from the global search bar + And I press the "Update juror record" button + And I set the radio button to "Change juror status to ‘Failed to attend’" + And I press the "Continue" button + And I check the failed to attend checkbox + And I press the "Change status to ‘Failed to attend’" button + And I see the juror record updated banner containing "Failed to attend" + And I see the juror status has updated to "Failed to attend" + + #this will fail here as a result of JM-5889 + And I see the following information on the Juror Attendance table + | Attendances | 0 | + | Absences | 1 | + + #Undo failed to attend + Given I am on "Bureau" "test" + And I log in as "SJOUSER" + + When the user searches for juror record "<part_no>" from the global search bar + And I press the "Update juror record" button + And I set the radio button to "Undo ‘Failed to attend' juror status" + And I press the "Continue" button + And I check the "Tick to confirm the juror's status should revert to ‘Responded’" checkbox + And I press the "Revert to ‘Responded’" button + + And I see the juror record updated banner containing "Responded" + And I see the juror status has updated to "Responded" + + #this will fail here as a result of JM-5889 + And I see the following information on the Juror Attendance table + | Attendances | 0 | + | Absences | 0 | + + Examples: + |user |part_no | pool_no | + |MODTESTCOURT |741500319| 415240833 | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5066.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5066.feature new file mode 100644 index 00000000..0ff79160 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5066.feature @@ -0,0 +1,207 @@ +Feature: JM-5066 - As a SJO I need to approve a manually created juror + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Approve Manually created juror as a senior jury officer + + Given I am on "Bureau" "test" + And I log in as "<user>" + And I click on the "Juror management" link + And I press the "Create juror record" button + And I set the radio button to "Create a pool to add the juror to" + And I press the "Continue" button + + #create pool + And I see "Create a pool for court use only" on the page + And I set the "Service start date for new pool" date to a Monday "10" weeks in the future + And I set the radio button to "Crown court" + And I press the "Continue" button + And I see "Check pool details" on the page + And I press the "Create active pool" button + + #jurors name + And I see "What's the juror's name?" on the page + And I set "Title (optional)" to "Mr" + And I set "First name" to "John" + And I set "Last name" to "Doe" + And I press the "Continue" button + + #dob + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "08/05/1982" + And I press the "Continue" button + + #address + And I see "What's the juror's address?" on the page + And I set "Address line 1" to "5 Testing Street" + And I set "Town or city" to "London" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #contact details + And I see "Enter their contact details" on the page + And I set "Main phone - UK only (optional)" to "07739967653" + And I press the "Continue" button + + #notes + And I see "Notes (optional)" on the page + And I enter "Note testing" in the Notes text box + And I press the "Continue" button + And I see "Check your answers" on the page + + #create juror record + And I press the "Create juror record" button + And I see "Draft juror record created for John Doe - senior jury officer will need to approve this" on the page + Given I am on "Bureau" "test" + And I log in as "SJOUSER" + And I see senior jury officer notification banner + And I click on the jurors to approve link from the sjo notification + And I see "Approve jurors" on the page + And I click on "Pending approval" in the same row as "Doe" + And I see "Approve or reject pending juror" on the page + And I set the radio button to "Approve" + And I press the "Confirm" button + And I see "Pending juror approved" on the page + + Examples: + |user | + |MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Reject Manually created juror as a senior jury officer + Given I am on "Bureau" "test" + And I log in as "<user>" + + And I click on the "Juror management" link + And I press the "Create juror record" button + And I set the radio button to "Create a pool to add the juror to" + And I press the "Continue" button + + #create pool + And I see "Create a pool for court use only" on the page + And I set the "Service start date for new pool" date to a Monday "10" weeks in the future + And I set the radio button to "Crown court" + And I press the "Continue" button + And I see "Check pool details" on the page + And I press the "Create active pool" button + + #jurors name + And I see "What's the juror's name?" on the page + And I set "Title (optional)" to "Mrs" + And I set "First name" to "Jane" + And I set "Last name" to "Smith" + And I press the "Continue" button + + #dob + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "08/05/1982" + And I press the "Continue" button + + #address + And I see "What's the juror's address?" on the page + And I set "Address line 1" to "5 Testing Street" + And I set "Town or city" to "London" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #contact details + And I see "Enter their contact details" on the page + And I set "Main phone - UK only (optional)" to "07739967653" + And I press the "Continue" button + + #notes + And I see "Notes (optional)" on the page + And I enter "Note testing" in the Notes text box + And I press the "Continue" button + And I see "Check your answers" on the page + And I press the "Create juror record" button + And I see "Draft juror record created for Jane Smith - senior jury officer will need to approve this" on the page + + #login as SJOUSER + Given I am on "Bureau" "test" + And I log in as "SJOUSER" + And I see senior jury officer notification banner + And I click on the jurors to approve link from the sjo notification + And I see "Approve jurors" on the page + And I click on "Pending approval" in the same row as "Smith" + And I see "Approve or reject pending juror" on the page + And I press the "Confirm" button + And I see error "Select whether you want to approve or reject this pending juror" + + #reject juror + And I set the radio button to "Reject" + And I press the "Confirm" button + And I see "You must enter a comment about why you rejected this pending juror" in the error banner + And I comment "Juror wasn't ready" as reason for my rejection of juror + And I press the "Confirm" button + And I see "Pending juror rejected" on the page + + Examples: + |user | + |MODTESTCOURT | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create juror at a different court to senior jury officer + + Given I am on "Bureau" "test" + And I log in as "<user>" + And I click on the "Juror management" link + And I press the "Create juror record" button + And I set the radio button to "Create a pool to add the juror to" + And I press the "Continue" button + + #create pool for court 415 + And I see "Create a pool for court use only" on the page + And I set the "Service start date for new pool" date to a Monday "10" weeks in the future + And I set the radio button to "Crown court" + And I press the "Continue" button + And I see "Check pool details" on the page + And I press the "Create active pool" button + + #jurors name + And I see "What's the juror's name?" on the page + And I set "Title (optional)" to "Mr" + And I set "First name" to "John" + And I set "Last name" to "Doe" + And I press the "Continue" button + + #dob + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "08/05/1982" + And I press the "Continue" button + + #address + And I see "What's the juror's address?" on the page + And I set "Address line 1" to "5 Testing Street" + And I set "Town or city" to "London" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #contact details + And I see "Enter their contact details" on the page + And I set "Main phone - UK only (optional)" to "07739967653" + And I press the "Continue" button + + #notes + And I see "Notes (optional)" on the page + And I enter "Note testing" in the Notes text box + And I press the "Continue" button + And I see "Check your answers" on the page + + #create juror record for juror at court 415 + And I press the "Create juror record" button + And I see "Draft juror record created for John Doe - senior jury officer will need to approve this" on the page + + #login with SJO user who is assigned to 416 court + Given I am on "Bureau" "test" + And I log in as "SJOUSER1" + And I do not see the senior jury officer notification banner + + And I click on the "Apps" link + And I click on the "Juror management" link + And I see "Approve jurors" on the page + And I see "There are no pending jurors to approve" on the page + + Examples: + |user | + |MODTESTCOURT | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5086-5087-5088-Create-Juror-Record.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5086-5087-5088-Create-Juror-Record.feature new file mode 100644 index 00000000..88026f37 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5086-5087-5088-Create-Juror-Record.feature @@ -0,0 +1,343 @@ +Feature: Create Juror Record scenarios + + @JurorTransformationWIP @JM-5220 + Scenario Outline: Create Juror Record via existing pool - Happy Path + + Given I am on "Bureau" "test" + And I log in as "<user>" + + And I click on the "Juror management" link + And I press the "Create juror record" button + + And I select one of the active pools available from the create juror record screen + And I press the "Continue" button + + #jurors name + And I see "What's the juror's name?" on the page + And I set "Title (optional)" to "Mr" + And I set "First name" to "John" + And I set "Last name" to "Doe" + And I press the "Continue" button + + #dob + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "08/05/1982" + And I press the "Continue" button + + #address + And I see "What's the juror's address?" on the page + And I set "Address line 1" to "5 Testing Street" + And I set "Town or city" to "London" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #contact details + And I see "Enter their contact details" on the page + And I set "Main phone - UK only (optional)" to "07739967653" + And I press the "Continue" button + + #notes + And I see "Notes (optional)" on the page + And I enter "Note testing" in the Notes text box + And I press the "Continue" button + And I see "Check your answers" on the page + + #create juror record + And I press the "Create juror record" button + #will fail here as a result of @JM-5220 - issue around active pools at court + And I see "Draft juror record created for Mrs Jane Doe - senior jury officer will need to approve this" on the page + + + Examples: + |user | + |MODTESTCOURT | + + @JurorTransformationWIP @JM-5220 @JM-5808 + Scenario Outline: Create Juror Record via existing pool - Unhappy Path + + Given I am on "Bureau" "test" + And I log in as "<user>" + + And I click on the "Juror management" link + And I press the "Create juror record" button + + And I select one of the active pools available from the create juror record screen + And I press the "Continue" button + + #jurors name/error check + And I see "What's the juror's name?" on the page + And I press the "Continue" button + And I see error "Enter a first name" + And I see error "Enter a last name" + And I set "First name" to "TonyTestingTesterTwentyCharacters" + And I set "Last name" to "JaneTestingTesterTwentyCharacters" + And I press the "Continue" button + And I see error "First name cannot contain more than 20 characters" + And I see error "Last name cannot contain more than 20 characters" + And I set "Title (optional)" to "Mr" + And I set "First name" to "John" + And I set "Last name" to "Stark" + And I press the "Continue" button + + #dob/error check + And I see "What's their date of birth?" on the page + And I press the "Continue" button + And I see error "Enter their date of birth" + + And I set "Date of birth" to "08/05/2050" + And I press the "Continue" button + And I see error "Date of birth must be in the past" + + And I set "Date of birth" to "08/13/1985" + And I press the "Continue" button + And I see error "Enter a real date of birth" + + And I set "Date of birth" to "1980/01/29" + And I press the "Continue" button + And I see error "Enter a date of birth in the correct format, for example, 31/01/1980" + + And I set "Date of birth" to "08/05/1992" + And I press the "Continue" button + + #address/error check + And I see "What's the juror's address?" on the page + And I press the "Continue" button + And I see error "Enter address line 1" + And I see error "Enter a town or city" + And I see error "Enter a postcode" + And I set "Address line 1" to "5 Testing Street" + And I set "Town or city" to "London" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #contact details + And I see "Enter their contact details" on the page + And I set "Main phone - UK only (optional)" to "07739967653" + And I press the "Continue" button + + #notes + And I see "Notes (optional)" on the page + And I enter "Note testing" in the Notes text box + And I press the "Continue" button + And I see "Check your answers" on the page + + #change name + And I click on the "Change" link in the same row as "Name" on Check your answers + And I see "What's the juror's name?" on the page + And I set "First name" to "Tony" + And I press the "Continue" button + #Will fail here onwards because of @JM-5808 + And I click on the "Change" link in the same row as "Main phone" on Check your answers + And I click on the "Cancel" link + + + #create juror record + And I press the "Create juror record" button + #will fail here as a result of @JM-5220 - issue around active pools at court + And I see "Draft juror record created for Tony Stark - senior jury officer will need to approve this" on the page + + + Examples: + |user | + |MODTESTCOURT | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create Juror Record via existing pool for juror too old + + Given I am on "Bureau" "test" + And I log in as "<user>" + + And I click on the "Juror management" link + And I press the "Create juror record" button + + And I select one of the active pools available from the create juror record screen + And I press the "Continue" button + + #jurors name/error check + And I see "What's the juror's name?" on the page + And I press the "Continue" button + And I see error "Enter a first name" + And I see error "Enter a last name" + And I set "Title (optional)" to "Mr" + And I set "First name" to "John" + And I set "Last name" to "Doe" + And I press the "Continue" button + + #dob/error check + + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "01/01/1912" + And I press the "Continue" button + And I see "Check the date of birth" on the page + And I see "You entered the juror's date of birth as 01 January 1912." on the page + And I set the radio button to "Yes - you will not be able to continue creating a record for this juror" + And I press the "Continue" button + And I see "Manage jurors" on the page + + + Examples: + |user | + |MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create Juror Record via existing pool for juror too young + + Given I am on "Bureau" "test" + And I log in as "<user>" + + And I click on the "Juror management" link + And I press the "Create juror record" button + + And I select one of the active pools available from the create juror record screen + And I press the "Continue" button + + #jurors name/error check + And I see "What's the juror's name?" on the page + And I press the "Continue" button + And I see error "Enter a first name" + And I see error "Enter a last name" + And I set "Title (optional)" to "Mr" + And I set "First name" to "John" + And I set "Last name" to "Doe" + And I press the "Continue" button + + #dob/error check + + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "01/01/2019" + And I press the "Continue" button + And I see "Check the date of birth" on the page + And I see "You entered the juror's date of birth as 01 January 2019." on the page + And I set the radio button to "Yes - you will not be able to continue creating a record for this juror" + And I press the "Continue" button + And I see "Manage jurors" on the page + + + Examples: + |user | + |MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create Juror Record via Create new pool + + Given I am on "Bureau" "test" + And I log in as "<user>" + + And I click on the "Juror management" link + And I press the "Create juror record" button + And I press the "Continue" button + And I see error "Select an option - create a new pool or add juror to an existing pool" + And I set the radio button to "Create a pool to add the juror to" + And I press the "Continue" button + + #create pool/error checks + And I see "Create a pool for court use only" on the page + And I press the "Continue" button + And I see error "Enter a service start date" + And I see error "Select the type of pool" + And I set the "Service start date for new pool" date to a Monday "10" weeks in the future + And I set the radio button to "Crown court" + And I press the "Continue" button + And I see "Check pool details" on the page + And I press the "Create active pool" button + + #jurors name + And I see "What's the juror's name?" on the page + And I set "Title (optional)" to "Mr" + And I set "First name" to "John" + And I set "Last name" to "Doe" + And I press the "Continue" button + + #dob + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "08/05/1982" + And I press the "Continue" button + + #address + And I see "What's the juror's address?" on the page + And I set "Address line 1" to "5 Testing Street" + And I set "Town or city" to "London" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #contact details + And I see "Enter their contact details" on the page + And I set "Main phone - UK only (optional)" to "07739967653" + And I press the "Continue" button + + #notes + And I see "Notes (optional)" on the page + And I enter "Note testing" in the Notes text box + And I press the "Continue" button + And I see "Check your answers" on the page + + #create juror record + And I press the "Create juror record" button + And I see "Draft juror record created for John Doe - senior jury officer will need to approve this" on the page + + + Examples: + |user | + |MODTESTCOURT | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create Juror Record for juror outside of any court catchment area + + Given I am on "Bureau" "test" + And I log in as "<user>" + + And I click on the "Juror management" link + And I press the "Create juror record" button + And I set the radio button to "Create a pool to add the juror to" + And I press the "Continue" button + + #create pool + And I see "Create a pool for court use only" on the page + And I set the "Service start date for new pool" date to a Monday "10" weeks in the future + And I set the radio button to "Crown court" + And I press the "Continue" button + And I see "Check pool details" on the page + And I press the "Create active pool" button + + #jurors name + And I see "What's the juror's name?" on the page + And I set "First name" to "Edward" + And I set "Last name" to "Stevens" + And I press the "Continue" button + + #dob + And I see "What's their date of birth?" on the page + And I set "Date of birth" to "08/05/1982" + And I press the "Continue" button + + #address + And I see "What's the juror's address?" on the page + And I set "Address line 1" to "5 Testing Street" + And I set "Town or city" to "London" + And I set "Postcode" to "RG10 9AG" + And I press the "Continue" button + + #catchment area check + And I see "Juror's postcode is not in any court catchment area" on the page + And I press the "Create juror record anyway" button + + #contact details + And I see "Enter their contact details" on the page + And I set "Main phone - UK only (optional)" to "07739967653" + And I press the "Continue" button + + #notes + And I see "Notes (optional)" on the page + And I enter "Note testing" in the Notes text box + And I press the "Continue" button + And I see "Check your answers" on the page + + #create juror record + And I press the "Create juror record" button + And I see "Draft juror record created for Edward Stevens - senior jury officer will need to approve this" on the page + + + Examples: + |user | + |MODTESTCOURT | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5178.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5178.feature new file mode 100644 index 00000000..2723690c --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5178.feature @@ -0,0 +1,45 @@ +Feature: JM-5178 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Place a juror on call as a jury officer - Attendance screen + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And I log in as "<user>" + When the user searches for juror record "<part_no>" from the global search bar + And I record a happy path paper summons response and process now + + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I click on the "Jurors in waiting" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<part_no>" to be checked in + And I press the "Check in juror" button + And I see "9:00am" in the same row as "<part_no>" + + When the user searches for juror record "<part_no>" from the global search bar + And I click on the "Attendance" link + And I click on the "Change" link + And I see "When are they next due at court?" on the page + And I press the "Save" button + And I see error "Enter when the juror is next due at court or put the juror on call" + And I check the "Put juror on call" checkbox + And I press the "Save" button + And I see "On call" in the same row as "Next due at court" + + Examples: + |user |part_no | pool_no | + |MODTESTCOURT |141500444| 415180101 | + diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5318 NEW DB SCHEMA TEST.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5318 NEW DB SCHEMA TEST.feature new file mode 100644 index 00000000..d067c941 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5318 NEW DB SCHEMA TEST.feature @@ -0,0 +1,47 @@ +Feature: JM-3179 + + @JurorTransformationMulti + Scenario Outline: Test connection to new db and schema design + + Given I am on "Bureau" "postgres" + +# Given the juror numbers have not been processed new schema +# |part_no | pool_no | owner | +# |641500859 | 415171103 | 400 | + +# And "641500859" has "RET_DATE" as "7 mondays time" new schema +# And "641500859" has "NEXT_DATE" as "7 mondays time" new schema + +# And records for juror "141500001" are deleted new schema +# Given the juror "141500001" is inserted into pool "415230001" with a deferral date "9" Mondays in the future for court "415" new schema + +# Given I have cleared down deferrals for "9" weeks in the future for court "415" new schema + +# And the new pool for court "415" is deleted new schema +# And a new pool is inserted for court "415" new schema + +# Then a new pool is inserted for where record has transferred to the court new schema +# |part_no | pool_no | owner | +# |641500657 | 415170402 | 415 | + + And a digital summons reply has been entered for the summoned juror "941599999" new schema + +# And I log in as "MODTESTBUREAU" +## +# When the user searches for juror record "641500859" from the global search bar +# And I record a happy path paper summons response +# When the user searches for juror record "641500859" from the global search bar +# And I click on the "Summons reply" link +# And I click on the "View summons reply" link +# And I click the More Actions button +# And I click Awaiting Information +# Then I see "Who are you waiting for information from?" on the page +# And I mark this reply as awaiting information from "<waitingOnReplyFrom>" +# Then I press the "Confirm" button +# And I do not see "Select whether you’re waiting for information from either the juror, court or translation unit" on the page +# And I do not see "The summons reply has been updated by another user" on the page +# And I see the reply status has updated to "<updatedReplyStatus>" + + Examples: + | waitingOnReplyFrom | updatedReplyStatus | + | Juror | AWAITING JUROR INFO | diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5670.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5670.feature new file mode 100644 index 00000000..54753422 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/JM-5670.feature @@ -0,0 +1,154 @@ +Feature:JM-5670 + +@JurorTransformationMulti +Scenario Outline: Postpone a juror to another court as a Bureau officer - Bulk flow happy path + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + | 415 |<juror_number_4> | <pool_number> | 5 | 400 | + + + And I log as "<user>" + + And I press the "Apps" button + And I click on the "Pool management" link + And I click on the "Search" link + And I set "Pool number" to "<pool_number>" + And I press the "Continue" button + And I check the select all checkbox on pool overview as bureau user + + And I press the "Postpone" button + And I set the "Postpone service start date" date to a Monday "38" weeks in the future + And I press the "Continue" button + And I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + And I see "4 jurors postponed to deferral maintenance" on the page + + Examples: + |user |juror_number | juror_number_2 | juror_number_3 |juror_number_4 |pool_number | + |MODTESTBUREAU |041520019 | 041520120 |041520121 |041520122 |415300801 | + + + @JurorTransformationMulti + Scenario Outline: Postpone a juror to another court as a Bureau officer - Bulk flow Unhappy path + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + | 415 |<juror_number_4> | <pool_number> | 5 | 400 | + + + And I update juror "<juror_number_2>" to have a have a date of birth which is ineligible for postponement + + And I log in as "<user>" + And I press the "Apps" button + And I click on the "Pool management" link + And I click on the "Search" link + And I set "Pool number" to "<pool_number>" + And I press the "Continue" button + And I press the "Postpone" button + And I see error "Select at least one juror" + And I check the select all checkbox on pool overview as bureau user + + And I press the "Postpone" button + And I set the "Postpone service start date" date to a Monday "38" weeks in the future + And I press the "Continue" button + And I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I see "You cannot move some of these jurors" on the page + And I press the "Continue and move remaining jurors" button + And I see "3 jurors postponed to deferral maintenance" on the page + + Examples: + |user |juror_number | juror_number_2 |juror_number_3 |juror_number_4 | pool_number | + |MODTESTBUREAU |041520789 | 041520769 |041520779 |041520719 |415300901 | + + + + @JurorTransformationMulti + Scenario Outline: Postpone a juror to another court as a Jury officer - Bulk flow UNHAPPY PATH + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + + And I Confirm all the data in the record attendance table is cleared + And a new trial is inserted with the trial number "<trial_number>" + And I update juror "<juror_number>" to have a have a date of birth which is ineligible for postponement + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + + And I log in as "<user>" + + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + And I see "<juror_number_2>" in the same row as "9:00am" + + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" link + + And I press the "Generate panel" button + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "1" + And I press the "Continue" button + And I see "<juror_number_2>" in the same row as "Panel" + + + #attempt to postpone jurors who cannot be postponed + And I press the "Apps" button + And I click on the "Pool management" link + And I click on the "Search" link + And I set "Pool number" to "<pool_number>" + And I press the "Continue" button + And I check the juror "<juror_number>" checkbox + And I check the juror "<juror_number_2>" checkbox + And I check the juror "<juror_number_3>" checkbox + + And I press the "Postpone" button + And I set the "Postpone service start date" date to a Monday "38" weeks in the future + And I press the "Continue" button + And I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + + And I see "You cannot move some of these jurors" on the page + And I see "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." on the page + And I see juror "<juror_number>" in the jurors cannot be moved table + And I see juror "<juror_number_2>" in the jurors cannot be moved table + And I click on the "Cancel and go back" link + + And I check the juror "<juror_number_3>" checkbox + And I press the "Postpone" button + And I set the "Postpone service start date" date to a Monday "38" weeks in the future + And I press the "Continue" button + And I see "There are no active pools for this date" on the page + And I press the "Put in deferral maintenance" button + And I see "1 juror postponed to deferral maintenance" on the page + + Examples: + |user |juror_number | juror_number_2 |juror_number_3 | pool_number | trial_number | + |MODTESTCOURT |041520222 | 041520223 |041520224 |415300701 | TESTINGTRIAL2024| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation.jurorResponses/Testing paper summons access.feature b/src/test/resources/cucumber/features/Modernisation.jurorResponses/Testing paper summons access.feature new file mode 100644 index 00000000..40656b59 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation.jurorResponses/Testing paper summons access.feature @@ -0,0 +1,68 @@ +Feature: JM-4079 Testing paper summons access + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Test to manually enter paper summons as COURT user when record belongs to COURT + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "-2 mondays time" new schema + And pool "<pool_no>" has attendance date as "-2 mondays time" new schema + + Given a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And I log in as "MODTESTCOURT" + + #navigate to juror record + When the user searches for juror record "<part_no>" from the global search bar + + #record happy path paper summons + And I record a happy path paper summons response + + #skip straight through processing + Then I see "Do you want to process this summons reply as responded now?" on the page + Then I see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + When I click on the "No, skip and process later" link + + #validate results + And I see the reply "status" on the response is "TO DO" + And I see the reply "type" on the response is "NEEDS REVIEW" + And I see "Juror’s service start date has passed - process as a priority." in the response banner + And I see Reply Method is "Paper" + And I see the process reply button + + Examples: + |part_no |pool_no | + |641500919|415170402 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test that you cant enter paper summons as BUREAU user when record belongs to COURT + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "2 mondays time" new schema + + Given a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And I log in as "MODTESTBUREAU" + + #navigate to juror record + When the user searches for juror record "<part_no>" from the global search bar + + #record summons button not available + Then the Enter summons reply button is not visible + + Examples: + |part_no |pool_no | + |641500946|415170402 | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-1583-summon-additional-jurors.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-1583-summon-additional-jurors.feature new file mode 100644 index 00000000..83ed0587 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-1583-summon-additional-jurors.feature @@ -0,0 +1,130 @@ +Feature: JM-1583 Summon Additional Jurors + + @JurorTransformationMulti @NewSchemaConverted + Scenario: Happy path to summon an additional juror for an active pool + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + + And I click on active pools + Then I see the following active pools headers + | Pool number | + | Jurors requested | + | Jurors confirmed | + | Court name | + | Pool type | + | Service start date | + + And I click on the "Pool requests" link + And I create a "Civil" court pool request for court "415", "10" weeks in the future + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Citizens to summon" to "10" + And I press the "Create pool and summon citizens" button + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + + Then the system will display non-editable information on the pool summary screen + |jurorsRequested|150| + |jurorsConfirmed|0| + |jurorsSummoned|10| + |currentPoolSize|0 /150| + |courtName|Chester| + |courtLocationCode|415| + |courtStartDate|| + |additionalRequirements|| + + And I click on the "Jurors" link + And I press the "Summon jurors" button + And I set "Extra citizens to summon" to "1" + And I press the "Summon more citizens" button + Then the system will display non-editable information on the pool summary screen + |jurorsRequested|150| + |jurorsConfirmed|0| + |jurorsSummoned|11| + |currentPoolSize|0 /150| + |courtName|Chester| + |courtLocationCode|415| + |courtStartDate|| + |additionalRequirements|| + Then I press the "Juror number" button + Then The "11" new jurors have been sent a summons letter new schema + + @JurorTransformationMulti @NewSchemaConverted + Scenario: Negative testing for summoning more citizens errors + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #create pool request + And I press the "Apps" button + And I click on the "Pool management" link + + And I click on active pools + Then I see the following active pools headers + | Pool number | + | Jurors requested | + | Jurors confirmed | + | Court name | + | Pool type | + | Service start date | + + And I click on the "Pool requests" link + And I create a "Civil" court pool request for court "415", "10" weeks in the future + Then I select the pool that I have just created to move to the pool summary page + And I press the "Summon jurors" button + And I set "Citizens to summon" to "10" + And I press the "Create pool and summon citizens" button + And I see "Active pools" on the page + Then I select the pool that I have just created to move to the pool summary page + + Then the system will display non-editable information on the pool summary screen + |jurorsRequested|150| + |jurorsConfirmed|0| + |jurorsSummoned|10| + |currentPoolSize|0 /150| + |courtName|Chester| + |courtLocationCode|415| + |courtStartDate|| + |additionalRequirements|| + + And I click on the "Jurors" link + And I press the "Summon jurors" button + Then The system shall display the following non editable details on the additional summons screen + |poolNumber | | + |jurorsRequested |150 | + |jurorsConfirmed |0 | + |jurorsRequired |150 | + |citizensSummoned|10 | + |catchmentArea |415 | + + #Empty field + When I press the "Summon more citizens" button + Then there is an error message with the text "Number of citizens to summon is missing" on the additional summons page + #Invalid number + When I set extra citizens to summon to "-5" + And I press the "Summon more citizens" button + Then there is an error message with the text "Number of citizens to summon is wrong" on the additional summons page + #Number too high + When I set extra citizens to summon to "10000" + And I press the "Summon more citizens" button + Then there is an error message with the text "Number of citizens to summon is too high" on the additional summons page + #No postcodes selected + When I set extra citizens to summon to "1" + And I click all postcode checkboxes + And I press the "Summon more citizens" button + Then there is an error message with the text "Postcodes to summon from is missing" on the additional summons page + #Changing catchment area + When I click the change catchment area link + And I set input field with "ID" of "courtNameOrLocation" to "417" + And I click on the "Coventry (417)" link + Then I press the "Continue" button + Then The system shall display the following non editable details on the additional summons screen + |poolNumber | | + |jurorsRequested |150 | + |jurorsConfirmed |0 | + |jurorsRequired |150 | + |citizensSummoned|10 | + |catchmentArea |417 | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2249-delete-nil-pool.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2249-delete-nil-pool.feature new file mode 100644 index 00000000..50515a6e --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2249-delete-nil-pool.feature @@ -0,0 +1,169 @@ + Feature: JM-2249 + + @JurorTransformationWIP @NewSchemaConverted @JM-5347 + Scenario: Happy Path to delete a nil pool of jurors + + Given I am on "Bureau" "test" + + And I log in as "MODTESTBUREAU" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Nil pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "CHESTER" + Then I click on the "Chester (415)" link + Then I press the "Continue" button + + #check page content + + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |Chester | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + + #complete new pool fields + Then I click the change link for the court deferrals + And I change the number of court deferrals to "0" + + Then I set the radio button to "Crown" + And I set "Number of jurors required in total" to "0" + Then I press the "Continue" button + + #check pool request + + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | Chester (415) | + | poolType | Crown court | + | totalJurorsRequired | 0 | + | numberOfDeferrals | 0 | + | additionalJurors | 0 | + + # Can submit the new pool request + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Chester | + | jurorsRequired | | + + # Opening pool request overview + + When I click on the pool number + Then the system will display non-editable information on the nil pool summary screen + | court | Chester | + | courtCode | 415 | + And I see "This is a nil pool created by the court. No jurors have been requested." on the page + And I do not see the nil pool status + And I do not see "Additional requirements" on the page + + # Deleting pool request + + When I click the delete pool request button + Then I am asked if I'm sure I want to delete + When I click the confirm deletion button + Then a message is displayed on the pool requests page informing me that the pool has been deleted + And the pool is no longer visible + + @JurorTransformationWIP @NewSchemaConverted @JM-5347 + Scenario: Cancel deletion of nil pool + + Given I am on "Bureau" "test" + + And I log in as "MODTESTBUREAU" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Nil pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "CHESTER" + Then I click on the "Chester (415)" link + Then I press the "Continue" button + + #check page content + + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |Chester | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + + #complete new pool fields + Then I click the change link for the court deferrals + And I change the number of court deferrals to "0" + + Then I set the radio button to "Crown" + And I set "Number of jurors required in total" to "0" + Then I press the "Continue" button + + #check pool request + + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | Chester (415) | + | poolType | Crown court | + | totalJurorsRequired | 0 | + | numberOfDeferrals | 0 | + | additionalJurors | 0 | + + # Can submit the new pool request + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Chester | + | jurorsRequired | | + + # Opening pool request overview + + When I click on the pool number + Then the system will display non-editable information on the nil pool summary screen + | court | Chester | + | courtCode | 415 | + And I see "This is a nil pool created by the court. No jurors have been requested." on the page + And I do not see the nil pool status + And I do not see "Additional requirements" on the page + + # Deleting pool request + + When I click the delete pool request button + Then I am asked if I'm sure I want to delete + When I click the cancel deletion link + Then the system will display non-editable information on the nil pool summary screen + | court | Chester | + | courtCode | 415 | + diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2483-add_notes.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2483-add_notes.feature new file mode 100644 index 00000000..455daf53 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2483-add_notes.feature @@ -0,0 +1,56 @@ +Feature: JM-2485 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to add notes over character limit + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 |<juror_number>| <pool_number>| 5 | 400 | + + Given I am on "Bureau" "test" + Given I log in as "MODTESTBUREAU" + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on the "Notes" link + And I click to add or edit notes + And I enter over 2000 characters in the Notes text box + And I click the save notes button + Then I see "The notes provided are too long" in the error banner + + Examples: + |juror_number |pool_number| + |045200021 |452300017 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to add and edit notes + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 452 |<juror_number>| <pool_number>| 5 | 400 | + + Given I am on "Bureau" "test" + Given I log in as "MODTESTBUREAU" + + When the user searches for juror record "<juror_number>" from the global search bar + And I click on the "Notes" link + + #add note + And I click to add or edit notes + And I enter "test notes 123" in the Notes text box + And I click the save notes button + Then I do not see "The notes provided are too long" on the page + And I see "test notes 123" on the page + + # edit note + And I click to add or edit notes + And I enter "test2 notes2 1234" in the Notes text box + And I click the save notes button + Then I do not see "The notes provided are too long" on the page + And I see "test2 notes2 1234" on the page + + Examples: + |juror_number |pool_number| + |045200022 |452300018 | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2485.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2485.feature new file mode 100644 index 00000000..251a0170 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2485.feature @@ -0,0 +1,38 @@ +Feature: JM-2485 + + @JurorTransformationMulti @NewSchemaConverted + Scenario: Test to browse active pools as bureau + Given I am on "Bureau" "test" + + And I log in as "MODTESTBUREAU" + + When I navigate to the pool request screen + And I click on active pools + Then I see the following active pools headers + | Pool number | + | Jurors requested | + | Jurors confirmed | + | Court name | + | Pool type | + | Service start date | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario: Test to browse active pools as court + Given I am on "Bureau" "test" + + And I log in as "MODTESTCOURT" + + When I navigate to the pool request screen + And I click on active pools + Then I see the following active pools headers + | Pool number | + | Jurors requested | + | Jurors confirmed | + | Court name | + | Pool type | + | Service start date | + And the court name displayed is one of the following + | Lewes Sitting At Chichester | + | Chester | + | Welshpool | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-4681-COURT.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-4681-COURT.feature new file mode 100644 index 00000000..0ecb55b1 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-4681-COURT.feature @@ -0,0 +1,271 @@ +Feature: JM-252 JM-4302 Court user create new pools + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Happy Path Test to create a new pool of jurors as court user with 1 court + Given I am on "Bureau" "test" + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #check page content + And on the page I see + |text | + |Request a new pool | + |Court name or location code | + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total | + |Number of court deferrals to include in this pool | + + And I see the attendance date of the pool + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "<noJurors>" + Then I press the "Continue" button + + #check pool request + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | <noJurors> | + | numberOfDeferrals | 0 | + | additionalJurors | <noJurors> | + + # Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | <noJurors> | + + Examples: + | user | courtType | courtTypeFull | displayCourt | noJurors | courtCode | + | MODTESTCOURT | Crown | Crown court | Chester | 100 | 415 | + | MODTESTCOURT | Civil | Civil court | Chester | 100 | 415 | + | MODTESTCOURT | High | High court | Chester | 100 | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: JM-4681 Happy Path Test to create a new 'court only' pool as court officer + Given I am on "Bureau" "test" + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Create pool for court use only" + And I press the "Continue" button + + #check page content + And on the page I see + | text | + | Create a pool for court use only | + | Court name | + | <displayCourt> | + | Service start date | + | Pool type | + | Crown court | + | High court | + | Civil court | + + #complete new pool fields + Then I set "Service start date" to "5 mondays time" + And I set the radio button to "<courtTypeFull>" + Then I press the "Continue" button + + #check pool request + Then I see "Check pool details" on the page + And I see "<displayCourt> (<courtCode>)" on the page + And I see "<courtTypeFull>" on the page + + # Can submit the new pool request + When I press the "Create active pool" button + Then I see "New pool" on the page + And I see "Active pools" on the page + When I click the link for the successfully created court only pool + Then I see "Pool record" on the page + And I see "ACTIVE" on the page + And I see "This pool has no members." on the page + + Examples: + | user | courtTypeFull | displayCourt | courtCode | + | MODTESTCOURT | Crown court | Chester | 415 | + | MODTESTCOURT | Civil court | Chester | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Happy Path Test to create a new pool of jurors as court user with >1 court + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #check page content + And on the page I see + |text | + |Request a new pool | + |Court name or location code | + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total | + |Number of court deferrals to include in this pool | + + And I see the attendance date of the pool + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "<noJurors>" + Then I press the "Continue" button + + #check pool request + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | <noJurors> | + | numberOfDeferrals | 0 | + | additionalJurors | <noJurors> | + + # Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | <noJurors> | + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #check page content + And on the page I see + |text | + |Request a new pool | + |Court name or location code | + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total | + |Number of court deferrals to include in this pool | + + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + Then I click on the "Change" link + Then I click the change link for the chosen court + # check that user cannot see courts outside of jurisdiction + Then I set input field with "ID" of "courtNameOrLocation" to "420" + And I do not see "Doncaster (420)" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "416" + Then I click on the "Chichester (416)" link + Then I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + + When I save the changes to the pool request + Then I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Lewes Sitting At Chichester | + | jurorsRequired | 150 | + + Examples: + | user | courtType | displayCourt | noJurors | courtCode | courtTypeFull | + | MODCOURT | Crown | Chester | 150 | 415 | Crown court | + | MODCOURT | Civil | Chester | 150 | 415 | Civil court | + | MODCOURT | High | Chester | 150 | 415 | High court | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Happy Path Test to create a new pool with 0 jurors + Given I am on "Bureau" "test" + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #check page content + And on the page I see + |text | + |Request a new pool | + |Court name or location code | + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total | + |Number of court deferrals to include in this pool | + + And I see the attendance date of the pool + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "<noJurors>" + Then I press the "Continue" button + + #check pool request + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | <noJurors> | + | numberOfDeferrals | 0 | + | additionalJurors | <noJurors> | + + # Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | | + + Examples: + | user | courtType | courtTypeFull | courtCode | displayCourt | noJurors | + | MODTESTCOURT | Crown | Crown court | 415 | Chester | 0 | + | MODTESTCOURT | Civil | Civil court | 415 | Chester | 0 | + | MODTESTCOURT | High | High court | 415 | Chester | 0 | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU.feature new file mode 100644 index 00000000..7fc29e39 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU.feature @@ -0,0 +1,225 @@ +Feature: JM-252 Bureau user create new pools + + @JurorTransformationMulti @newSchemaConverted + Scenario Outline: Happy Path Test to create a new pool of jurors to be summoned for jury duty + Given I am on "Bureau" "test" + And I log in as "<user>" + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #check page content + + And on the page I see + | text | + | Request a new pool | + | Court name or location code | + | <displayCourt> | + | Attendance date | + | Pool type | + | Crown court | + | High court | + | Civil court | + | Number of jurors required in total | + | Number of court deferrals to include in this pool | + + And I see the attendance date of the pool + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "<noJurors>" + Then I press the "Continue" button + + #check pool request + + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | <noJurors> | + | numberOfDeferrals | 0 | + | additionalJurors | <noJurors> | + + # Can submit the new pool request + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | <noJurors> | + + When I navigate to summons management + + Then I am taken to summons management + + Examples: + | user | selectedCourt | courtType | courtTypeFull | courtCode | displayCourt | noJurors | + | MODTESTBUREAU | CHESTER | Crown | Crown court | 415 | Chester | 150 | + | MODTESTBUREAU | CHESTER | Civil | Civil court | 415 | Chester | 150 | + | MODTESTBUREAU | CHESTER | High | High court | 415 | Chester | 150 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Happy Path Test to create a new pool with 0 jurors + Given I am on "Bureau" "test" + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #check page content + + And on the page I see + | text | + | Request a new pool | + | Court name or location code | + | <displayCourt> | + | Attendance date | + | Pool type | + | Crown court | + | High court | + | Civil court | + | Number of jurors required in total | + | Number of court deferrals to include in this pool | + + And I see the attendance date of the pool + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "<noJurors>" + Then I press the "Continue" button + + #check pool request + + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | <noJurors> | + | numberOfDeferrals | 0 | + | additionalJurors | <noJurors> | + + # Can submit the new pool request + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | | + + Examples: + | user | | selectedCourt | courtType | courtTypeFull | courtCode | displayCourt | noJurors | + | MODTESTBUREAU | | CHESTER | Crown | Crown court | 415 | Chester | 0 | + | MODTESTBUREAU | | CHESTER | Civil | Civil court | 415 | Chester | 0 | + | MODTESTBUREAU | | CHESTER | High | High court | 415 | Chester | 0 | + + @JurorTransformationWIP @JM-4459 @NewSchemaConverted + Scenario Outline: Happy Path Test to create a new pool and change pool_no + Given I am on "Bureau" "test" + Given new pool requests are deleted + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #check page content + + And on the page I see + | text | + | Request a new pool | + | Court name or location code | + | <displayCourt> | + | Attendance date | + | Pool type | + | Crown court | + | High court | + | Civil court | + | Number of jurors required in total | + | Number of court deferrals to include in this pool | + + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "<noJurors>" + Then I press the "Continue" button + + #check pool request + + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | <noJurors> | + | numberOfDeferrals | 0 | + | additionalJurors | <noJurors> | + + #Change pool no + + Then I click the change link for the pool number + And I see "Change pool number" on the page + And I enter a pool number that is the current pool number plus 1 + +# Can submit the new pool request + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | | + + And I click on the pool number + When I click the delete pool request button + When I click the confirm deletion button + Then a message is displayed on the pool requests page informing me that the pool has been deleted + And the pool is no longer visible + + Examples: + | user | selectedCourt | courtType | courtTypeFull | courtCode | displayCourt | noJurors | + | MODTESTBUREAU | CHESTER | Crown | Crown court | 415 | Chester | 0 | + | MODTESTBUREAU | CHESTER | Civil | Civil court | 415 | Chester | 0 | + | MODTESTBUREAU | CHESTER | High | High court | 415 | Chester | 0 | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU_Navigation.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU_Navigation.feature new file mode 100644 index 00000000..df47fcab --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU_Navigation.feature @@ -0,0 +1,268 @@ +Feature: JM-252_Navigation + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Navigating back and forth and changing inputs + + Given I am on "Bureau" "test" + + #INSERT NEW POOL WITH DEFERRALS + Given the new pool for court "457" is deleted new schema + Given the new pool for court "415" is deleted new schema + Given a new pool is inserted for court "415" with a deferral date "15" Mondays in the future new schema + + #log in + And I log in as "<user>" + + #request a pool + When I navigate to the pool request screen + Then I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court and change + Then I set input field with "ID" of "courtNameOrLocation" to "BURY" + And I see "Bury St Edmunds (754)" on the page + Then I click on the "Bury St Edmunds" link + Then I clear field with id "courtNameOrLocation" + Then I set input field with "ID" of "courtNameOrLocation" to "457" + And I see "Swansea (457)" on the page + Then I click on the "Swansea" link + + # cancel + Then I click on the "Cancel" link + Then I see "Pool requests" on the page + And I see "Filter by court name or location code" on the page + + # reselect create new pool + Then I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I set input field with "ID" of "courtNameOrLocation" to "457" + Then I click on the "Swansea" link + Then I press the "Continue" button + + #check page content + And on the page I see + | text | + | Request a new pool | + | Court name or location code | + | Swansea | + | Attendance date | + | Pool type | + | Crown court | + | High court | + | Civil court | + | Number of jurors required in total | + | Number of court deferrals to include in this pool | + + #CHANGE COURT + Then I click the change link for the chosen court + And I see "Select a court for this pool" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "<displayCourt>" + And I click on the "<displayCourt> (<courtCode>)" link + And I press the "Continue" button + + #CHANGE ATTENDANCE DATE + Then I click the change link for the attendance date + And I see "Change the service start date for this pool" on the page + And I set the "Change the service start date for this pool" date to a Monday "15" weeks in the future + And I press the "Change" button + + #complete new pool fields + Then I set the radio button to "High court" + And I set "Number of jurors required in total" to "150" + + #SELECT TO CHANGE NUMBER OF DEFERRALS + Then I click the change link for the court deferrals + And I see "Number of court deferrals to include in this pool" on the page + Then I change the number of court deferrals to "1" + + #REMOVE THIS WHEN FIXED - shouldnt have to re-enter pool type and number of jurors + #complete new pool fields + Then I set the radio button to "High court" + And I set "Number of jurors required in total" to "150" + + Then I press the "Continue" button + + And I should see the details of the pool with a bank holiday date + | courtName | <displayCourt> (<courtCode>) | + | poolType | High court | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 1 | + | additionalJurors | 149 | + + #change + Then I click the change button for the check pool request page + + #Change pool type + When I change the pool type to "Crown" + + #Change # jurors required + When I set the number of jurors to "50" + When I click the request pool button + Then I should be taken to the check pool request page + + And I should see the details of the pool with a bank holiday date + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | 50 | + | numberOfDeferrals | 1 | + | additionalJurors | 49 | + + #Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | 49 | + + Given the new pool for court "415" is deleted + Given the new pool for court "457" is deleted + + Examples: + | user | courtCode | displayCourt | courtTypeFull | + | MODTESTBUREAU | 415 | Chester | Crown court | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Create pools for different courts and apply filters + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "415" + Then I click on the "Chester (415)" link + Then I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + + #SELECT TO CHANGE NUMBER OF DEFERRALS + Then I click the change link for the court deferrals + And I see "Number of court deferrals to include in this pool" on the page + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + + Then I press the "Continue" button + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Chester | + | jurorsRequired | 150 | + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "457" + Then I click on the "Swansea (457)" link + Then I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Swansea | + | jurorsRequired | 150 | + + Then I set input field with "ID" of "courtNameOrLocation" to "415" + Then I click on the "Chester (415)" link + Then I press the "Filter" button + Then only records from "Chester" are displayed + + Then I click on the "Clear filter" link + + Then I see "Chester" on the page + And I see "Swansea" on the page + + Then I set input field with "ID" of "courtNameOrLocation" to "457" + Then I click on the "Swansea (457)" link + Then I press the "Filter" button + Then only records from "Swansea" are displayed + + Then I click on the "Clear filter" link + + Then I set input field with "ID" of "courtNameOrLocation" to "Chester" + Then I click on the "Chester (415)" link + Then I press the "Filter" button + Then only records from "Chester" are displayed + + Then I click on the "Clear filter" link + + Then I see "Chester" on the page + And I see "Swansea" on the page + + Then I set input field with "ID" of "courtNameOrLocation" to "Swansea" + Then I click on the "Swansea (457)" link + Then I press the "Filter" button + Then only records from "Swansea" are displayed + + Examples: + | user | courtType | + | MODTESTBUREAU | Crown | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Create pool and change pool number + Given I am on "Bureau" "test" + Given new pool requests are deleted + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "415" + Then I click on the "Chester (415)" link + Then I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + + #SELECT TO CHANGE NUMBER OF DEFERRALS + Then I click the change link for the court deferrals + And I see "Number of court deferrals to include in this pool" on the page + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + + Then I press the "Continue" button + + Then I click the change link for the pool number + Then I click on the "Cancel" link + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Chester | + | jurorsRequired | 150 | + + Examples: + | user | courtType | + | MODTESTBUREAU | Crown | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU_Validation_and_Errors.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU_Validation_and_Errors.feature new file mode 100644 index 00000000..92c4ed78 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-BUREAU_Validation_and_Errors.feature @@ -0,0 +1,1202 @@ +Feature: JM-252_Validation_and_Errors + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Create New Pool - Continue With No Input + Given I am on "Bureau" "test" + + And I log in as "<user>" + + #enter a pool request + + When I navigate to the pool request screen + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + And I see the attendance date of the pool + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 0 | + | additionalJurors | 150 | + + When I save the new pool request + + #Can see the pool request courts table tabs and fields + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #check error on continue with no input + + When I press the "Continue" button + Then I see "Enter the name or location code for a court" on the page + And I see "Court name or location is missing" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | + | MODTESTBUREAU | CHESTER | Chester | Crown | Crown court | 415 | + | MODTESTBUREAU | CHESTER | Chester | Civil | Civil court | 415 | + | MODTESTBUREAU | CHESTER | Chester | High | High court | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Create New Pool - Continue With Invalid loc_code + Given I am on "Bureau" "test" + + And I log in as "<user>" + + #enter a pool request + + When I navigate to the pool request screen + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + And I see the attendance date of the pool + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 0 | + | additionalJurors | 150 | + + When I save the new pool request + + #Can see the pool request courts table tabs and fields + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #check error on continue with invalid loc_code + + Then I set input field with "ID" of "courtNameOrLocation" to "1234" + When I press the "Continue" button + Then I see "Please check the court name or location" on the page + And I see "This court does not exist. Please enter a name or code of an existing court" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | + | MODTESTBUREAU | CHESTER | Chester | Crown | Crown court | 415 | + | MODTESTBUREAU | CHESTER | Chester | Civil | Civil court | 415 | + | MODTESTBUREAU | CHESTER | Chester | High | High court | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Create New Pool - Continue With Invalid Court Name + Given I am on "Bureau" "test" + + And I log in as "<user>" + + #enter a pool request + + When I navigate to the pool request screen + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + And I see the attendance date of the pool + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 0 | + | additionalJurors | 150 | + + When I save the new pool request + + #Can see the pool request courts table tabs and fields + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #check error on continue with invalid court name + + Then I set input field with "ID" of "courtNameOrLocation" to "the moon" + When I press the "Continue" button + Then I see "Please check the court name or location" on the page + And I see "This court does not exist. Please enter a name or code of an existing court" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | + | MODTESTBUREAU | CHESTER | Chester | Crown | Crown court | 415 | + | MODTESTBUREAU | CHESTER | Chester | Civil | Civil court | 415 | + | MODTESTBUREAU | CHESTER | Chester | High | High court | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Number Of Deferrals - Continue With No Input + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I set the radio button to "<courtType>" + + #check page content + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + + #change number of deferrals + When I click the change link for the court deferrals + + #error on continue with no input + Then I set "Number of deferred jurors to include in this pool" to "" + When I press the "Continue" button + Then I see "Number of deferrals is missing" on the page + + + Examples: + | user | selectedCourt | displayCourt | courtType | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | 457 | 045700001 | 457300001 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | 457 | 045700001 | 457300001 | + | MODTESTBUREAU | SWANSEA | Swansea | High | 457 | 045700001 | 457300001 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Number Of Deferrals - Continue An Invalid Input + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I set the radio button to "<courtType>" + + #check page content + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + + #change number of deferrals + When I click the change link for the court deferrals + + #error on continue with invalid input + When I set "Number of deferred jurors to include in this pool" to "-1" + When I press the "Continue" button + Then I see "Number of deferrals cannot be negative" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | 457 | 045700002 | 457300002 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | 457 | 045700002 | 457300002 | + | MODTESTBUREAU | SWANSEA | Swansea | High | 457 | 045700002 | 457300002 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Number Of Deferrals - Number > Number of Defs Available + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I set the radio button to "<courtType>" + + #check page content + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + + #change number of deferrals + When I click the change link for the court deferrals + + #error when number > number of defs available + When I set "Number of deferred jurors to include in this pool" to "10000" + When I press the "Continue" button + Then I see "Number of deferrals is too high" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtCode | juror_number| pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | 457 | 045700003 | 457300003 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | 457 | 045700003 | 457300003 | + | MODTESTBUREAU | SWANSEA | Swansea | High | 457 | 045700003 | 457300003 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Number Of Deferrals - Zero Deferrals + Given I am on "Bureau" "test" + + And I log in as "<user>" + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I set the radio button to "<courtType>" + + #check page content + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + + #change number of deferrals + When I click the change link for the court deferrals + + #insert new pool + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number>| <juror_number> | 9 | + + #select 0 deferrals + When I set "Number of deferred jurors to include in this pool" to "0" + When I press the "Continue" button + + Then I do not see "Number of deferrals is missing" on the page + Then I do not see "Number of deferrals cannot be negative" on the page + Then I do not see "Number of deferrals is too high" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | 457 | 045700004 | 457300004 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | 457 | 045700004 | 457300004 | + | MODTESTBUREAU | SWANSEA | Swansea | High | 457 | 045700004 | 457300004 | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Number Of Deferrals - One Deferral + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + Then I set the radio button to "<courtType>" + + #check page content + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |<displayCourt> | + |Attendance date | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + + #go back and select 1 deferral + When I click the change link for the court deferrals + When I set "Number of deferred jurors to include in this pool" to "1" + When I press the "Continue" button + Then I do not see "Number of deferrals is missing" on the page + Then I do not see "Number of deferrals cannot be negative" on the page + Then I do not see "Number of deferrals is too high" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | 457 | 045700005 | 457300005 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | 457 | 045700005 | 457300005 | + | MODTESTBUREAU | SWANSEA | Swansea | High | 457 | 045700005 | 457300005 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Continue - No Selections + Given I am on "Bureau" "test" + + And I log in as "<user>" + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #error on Continue with no selections made + When I press the "Continue" button + Then I see "Pool type is missing" on the page + And I see "Select a pool type" on the page + And I see "Number of jurors required is missing" on the page + And I see "Enter the number of jurors required" on the page + + Examples: + | user | selectedCourt | displayCourt | courtCode | + | MODTESTBUREAU | CHESTER | Chester | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Continue - Only Number of Jurors + Given I am on "Bureau" "test" + + And I log in as "<user>" + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #error on Continue with only number of jurors entered + Then I set "Number of jurors required in total" to "150" + When I press the "Continue" button + Then I see "Pool type is missing" on the page + And I see "Select a pool type" on the page + And I do not see "Number of jurors required is missing" on the page + And I do not see "Enter the number of jurors required" on the page + Examples: + | user | selectedCourt | displayCourt | courtCode | + | MODTESTBUREAU | CHESTER | Chester | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Continue - Only Pool Type Set + Given I am on "Bureau" "test" + + And I log in as "<user>" + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #error on Continue with only pool type set + Then I set "Number of jurors required in total" to "" + And I set the radio button to "<courtType>" + When I press the "Continue" button + Then I do not see "Pool type is missing" on the page + And I do not see "Select a pool type" on the page + And I see "Number of jurors required is missing" on the page + And I see "Enter the number of jurors required" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtCode | + | MODTESTBUREAU | CHESTER | Chester | Crown | 415 | + | MODTESTBUREAU | CHESTER | Chester | Civil | 415 | + | MODTESTBUREAU | CHESTER | Chester | High | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Continue - Complete New Pool Fields + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #change number of deferrals + When I click the change link for the court deferrals + When I set "Number of deferred jurors to include in this pool" to "1" + When I press the "Continue" button + Then I do not see "Number of deferrals is missing" on the page + Then I do not see "Number of deferrals cannot be negative" on the page + Then I do not see "Number of deferrals is too high" on the page + + Then I set "Number of jurors required in total" to "150" + And I set the radio button to "<courtType>" + + Then I press the "Continue" button + And I do not see "Pool type is missing" on the page + And I do not see "Select a pool type" on the page + And I do not see "Number of jurors required is missing" on the page + And I do not see "Enter the number of jurors required" on the page + + #check pool request + Then I see "Check your pool request" on the page + And I see the attendance date of the pool + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 1 | + | additionalJurors | 149 | + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 045700006 | 457300006 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 045700006 | 457300006 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 045700006 | 457300006 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Pool Number - No Pool Number + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "1" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + #check pool request + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 1 | + | additionalJurors | 149 | + + #Change pool no + Then I click the change link for the pool number + And I see "Change pool number" on the page + Then I press the "Change" button + + Then I see "Pool number is wrong" on the page + And I see "Please enter a pool number" on the page + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 045700007 | 457300007 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 045700007 | 457300007 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 045700007 | 457300007 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Pool Number - Pool Number Does Not Contain Court Location Code + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "1" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + #check pool request + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 1 | + | additionalJurors | 149 | + + #Change pool no + Then I click the change link for the pool number + And I see "Change pool number" on the page + Then I set "Pool number" to "999999999" + Then I press the "Change" button + + Then I see "Pool number is wrong" on the page + And I see error "Pool number must use court location code" + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 045700008 | 457300008 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 045700008 | 457300008 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 045700008 | 457300008 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Pool Number - Pool Number Does Not Contain Months Of Attendance Date + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "1" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + #check pool request + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 1 | + | additionalJurors | 149 | + + #Change pool no + Then I click the change link for the pool number + And I see "Change pool number" on the page + Then I set "Pool number" to "457240000" + Then I press the "Change" button + + Then I see "Pool number is wrong" on the page + And I see error "Pool number must use month of attendance date" + + Then I set "Pool number" to "457500000" + Then I press the "Change" button + + Then I see "Pool number is wrong" on the page + And I see error "Pool number must use year of attendance date" + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 045700009 | 457300009 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 045700009 | 457300009 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 045700009 | 457300009 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Pool Number - Pool Number Too Long + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "1" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "50" + Then I press the "Continue" button + + #check pool request + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 50 | + | numberOfDeferrals | 1 | + | additionalJurors | 49 | + + #Change pool no + Then I click the change link for the pool number + And I see "Change pool number" on the page + Then I set "Pool number" to "45723060100" + Then I press the "Change" button + + Then I see "Pool number is wrong" on the page + And I see error "Pool number must have a maximum of 9 characters" + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 045700010 | 457300010 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 045700010 | 457300010 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 045700010 | 457300010 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Pool Number - Pool Number Too Short + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number>| <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "1" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "50" + Then I press the "Continue" button + + #check pool request + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 50 | + | numberOfDeferrals | 1 | + | additionalJurors | 49 | + + #Change pool no + Then I click the change link for the pool number + And I see "Change pool number" on the page + Then I set "Pool number" to "45723060" + Then I press the "Change" button + + Then I see "Pool number is wrong" on the page + And I see error "Pool number must have a minimum of 9 characters" + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 045700011 | 457300011 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 045700011 | 457300011 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 045700011 | 457300011 | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Pool Number - Pool Number Already in Use + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <courtCode> |<juror_number> | <pool_number> | 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| + |<courtCode> | <pool_number> | <juror_number> | 9 | + + #create a pool so there is always one there for this court/year/month + When I navigate to the pool request screen + And I create a "<courtType>" court pool request for court "<courtCode>", "9" weeks in the future + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "1" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "50" + Then I press the "Continue" button + + #check pool request + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 50 | + | numberOfDeferrals | 1 | + | additionalJurors | 49 | + + #Change pool no + Then I click the change link for the pool number + And I see "Change pool number" on the page + Then I input a pool number that is already being used + Then I press the "Change" button + + Then I see "Pool number is wrong" on the page + And I see error "Pool number is already being used" + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 045700012 | 457300012 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 045700012 | 457300012 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 045700012 | 457300012 | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Errors and Warnings on Change Pool Number - Valid Pool Number + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 457 |<juror_number>| <pool_number>| 5 | 400 | + + #insert new pool + Given a deferral is inserted for an existing juror new schema + | owner| pool_no | part_no | no_weeks| + | 457 | <pool_number> | <juror_number> | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + #create a pool here so that there is always at least 1 for this court/year/month - required for later step + And I create a "Crown" court pool request for court "457", "9" weeks in the future + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "1" + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "50" + Then I press the "Continue" button + + #Change pool no + Then I click the change link for the pool number + And I see "Change pool number" on the page + + Then I insert a valid pool number for court "457" + Then I press the "Change" button + + #check pool request + And I see the attendance date of the pool + And I do not see "Attendance time" on the page + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 50 | + | numberOfDeferrals | 1 | + | additionalJurors | 49 | + + #Request Pool + And I submit the pool request + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | 49 | + + And the pool created in this test is deleted new schema + + Examples: + | user | selectedCourt | displayCourt | courtType | courtTypeFull | courtCode | juror_number | pool_number | + | MODTESTBUREAU | SWANSEA | Swansea | Crown | Crown court | 457 | 041500047 | 415300130 | + | MODTESTBUREAU | SWANSEA | Swansea | Civil | Civil court | 457 | 041500047 | 415300130 | + | MODTESTBUREAU | SWANSEA | Swansea | High | High court | 457 | 041500047 | 415300130 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to assure that a warning appears if the attendance date is set to a weekend date + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + When I click the link to the new pool screen + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + When I click the change link for the attendance date + And I set the attendance date to a weekend + Then I should see a warning stating I have selected a weekend + When I click the link to continue from the warning page + + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + When I change the pool type to "Civil" + + And I set the number of jurors to "10" + And I press the "Continue" button + Then I should see a warning stating I have selected a weekend + When I click the link to continue from the warning page + Then I should be taken to the check pool request page + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | 10 | + | numberOfDeferrals | 0 | + | additionalJurors | 10 | + + Examples: + | user | selectedCourt | displayCourt | courtTypeFull | courtCode | + | MODTESTBUREAU | CHESTER | Chester | Civil court | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to assure that a warning appears if the attendance date is set to a bank holiday date + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + When I click the change link for the attendance date + + And I create a bank holiday "6" weeks in the future for court/bureau "<courtCode>" new schema + + When I set the "Change the attendance date for this pool" date to a Monday "6" weeks in the future + + And I press the "Change" button + + Then I should see a warning stating I have selected a bank holiday + + When I click the link to continue from the warning page + + Then I see "Request a new pool" on the page + + #complete new pool fields + Then I click the change link for the court deferrals + Then I change the number of court deferrals to "0" + + Then I set the radio button to "<courtTypeFull>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + Then I should see a warning stating I have selected a bank holiday + + When I click the link to continue from the warning page + + #check pool request + Then I see "Check your pool request" on the page + + And I should see the details of the pool with a bank holiday date + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 0 | + | additionalJurors | 150 | + + # Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | 150 | + + Then I delete bank holiday new schema + + Examples: + | user | selectedCourt | courtCode | displayCourt | courtTypeFull | + | MODTESTBUREAU | COVENTRY | 417 | Coventry | Crown court | + diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-COURT_Navigation.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-COURT_Navigation.feature new file mode 100644 index 00000000..147069e8 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-COURT_Navigation.feature @@ -0,0 +1,279 @@ +Feature: JM-252_Navigation_COURT + + @JurorTransformationWIP @NewSchemaConverted @JM-6143 + Scenario Outline: Navigating back and forth and changing inputs + Given I am on "Bureau" "test" + And I log in as "<user>" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number>| <pool_number>| 5 | 400 | + + And juror "<juror_number>" has "LAST_NAME" as "<last_name>" new schema + And juror "<juror_number>" has "POSTCODE" as "<postcode>" new schema + + Given a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |415 | <pool_number> | <juror_number> | 9 | + + #request a pool + When I navigate to the pool request screen + Then I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #cancel + Then I click on the "Cancel" link + Then I see "Pool requests" on the page + And I see "Filter by court name or location code" on the page + + #reselect create new pool + Then I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #check page content + And on the page I see + | text | + | Request a new pool | + | Court name or location code | + | Chester | + | Attendance date | + | Pool type | + | Crown court | + | High court | + | Civil court | + | Number of jurors required in total | + | Number of court deferrals to include in this pool | + + #CHANGE COURT + Then I click the change link for the chosen court + And I see "Select a court for this pool" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "<displayCourt>" + And I click on the "<displayCourt> (<courtCode>)" link + And I press the "Continue" button + + #CHANGE ATTENDANCE DATE + Then I click the change link for the attendance date + And I see "Change the service start date for this pool" on the page + And I set the "Change the attendance date for this pool" date to a Monday "9" weeks in the future + And I press the "Change" button + + #CHANGE ATTENDANCE TIME + Then I click the change link for the attendance time + And I see "Change the attendance time for this pool" on the page + And I see "Attendance time" on the page + And I see "Use the 24 hour clock. For example, 9:00 or 14:00" on the page + Then I set input field with "ID" of "attendanceTimeHour" to "09" + Then I set input field with "ID" of "attendanceTimeMinute" to "29" + And I press the "Change" button + + #complete new pool fields + Then I set the radio button to "High court" + And I set "Number of jurors required in total" to "150" + + #SELECT TO CHANGE NUMBER OF DEFERRALS + Then I click the change link for the court deferrals + And I see "Number of court deferrals to include in this pool" on the page + Then I change the number of court deferrals to "1" + + + #complete new pool fields + Then I set the radio button to "High court" + And I set "Number of jurors required in total" to "150" + + # fails due to JM-6143 + Then I press the "Continue" button + And I should see the attendance Pool time present is "9:29am" + + And I should see the details of the pool with a bank holiday date + | courtName | <displayCourt> (<courtCode>) | + | poolType | High court | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 1 | + | additionalJurors | 149 | + + #change + Then I click the change button for the check pool request page + + #Change pool type + When I change the pool type to "Crown" + + #Change # jurors required + When I set the number of jurors to "50" + When I click the request pool button + Then I should be taken to the check pool request page + + And I should see the details of the pool with a bank holiday date + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | 50 | + | numberOfDeferrals | 1 | + | additionalJurors | 49 | + + #Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | 49 | + + Given the new pool for court "415" is deleted + + Examples: + | user | courtCode | displayCourt | courtTypeFull | juror_number | pool_number | + | MODTESTCOURT | 415 | Chester | Crown court | 041500053 | 415300143 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create pools for different courts and apply filters for court user + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + And I click the change link for the court deferrals + And I set "Number of deferred jurors to include in this pool" to "0" + And I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I should see the attendance time present is "09:15" + Then I press the "Continue" button + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Chester | + | jurorsRequired | 150 | + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #CHANGE COURT + Then I click the change link for the chosen court + And I see "Select a court for this pool" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "416" + And I click on the "Chichester (416)" link + And I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I should see the attendance time present is "09:30" + Then I press the "Continue" button + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Lewes Sitting At Chichester | + | jurorsRequired | 150 | + + Then I set input field with "ID" of "courtNameOrLocation" to "415" + Then I click on the "Chester (415)" link + Then I press the "Filter" button + Then only records from "Chester" are displayed + + Then I click on the "Clear filter" link + + Then I see "Chester" on the page + And I see "Chichester" on the page + + Then I set input field with "ID" of "courtNameOrLocation" to "416" + Then I click on the "Chichester (416)" link + Then I press the "Filter" button + Then only records from "Lewes Sitting At Chichester" are displayed + + Then I click on the "Clear filter" link + + Then I set input field with "ID" of "courtNameOrLocation" to "Chester" + Then I click on the "Chester (415)" link + Then I press the "Filter" button + Then only records from "Chester" are displayed + + Then I click on the "Clear filter" link + + Then I see "Chester" on the page + And I see "Chichester" on the page + + Then I set input field with "ID" of "courtNameOrLocation" to "Chichester" + Then I click on the "Chichester (416)" link + Then I press the "Filter" button + Then only records from "Lewes Sitting At Chichester" are displayed + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #CHANGE COURT + Then I click the change link for the chosen court + And I see "Select a court for this pool" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + And I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I should see the attendance time present is "09:30" + Then I press the "Continue" button + + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | Welshpool | + | jurorsRequired | 150 | + + Then I set input field with "ID" of "courtNameOrLocation" to "774" + Then I click on the "Welshpool (774)" link + Then I press the "Filter" button + Then only records from "Welshpool" are displayed + + Then I click on the "Clear filter" link + + Then I see "Chester" on the page + And I see "Chichester" on the page + And I see "Welshpool" on the page + + Examples: + | user | courtType | + | MODCOURT | Crown | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create pool and check cannot change pool number + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + Then I do not see Change link in the same row as Pool number + + Examples: + | user | courtType | + | MODTESTCOURT | Crown | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario: Nil pool contains no deferral options + Given I am on "Bureau" "test" + And I log in as "MODTESTCOURT" + And I navigate to the pool request screen + And I select to create a nil pool + And I do not see "Number of court deferrals to include in this pool" on the page + diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-COURT_Validation_and_Errors.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-COURT_Validation_and_Errors.feature new file mode 100644 index 00000000..e1d67837 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-252-COURT_Validation_and_Errors.feature @@ -0,0 +1,316 @@ +Feature: JM-252_Validation_and_Errors_COURT + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Errors and Warnings on Create New Pool for Court user + Given I am on "Bureau" "test" + + And I log in as "<user>" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |641500136 | 415170402 | 400 | + + And "641500136" has "NEXT_DATE" as "5 mondays time" new schema + And "641500136" is not active new schema + And "641500136" has "TRANSFER_DATE" as "-2 mondays time" new schema + + #insert new pool + Given a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |415 | 415170402 | 641500136 | 9 | + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #check page content + + And on the page I see + | text| + |Request a new pool| + |Court name or location code| + |<displayCourt> | + |Attendance date | + |Attendance time | + |Pool type | + |Crown court | + |High court | + |Civil court | + |Number of jurors required in total| + |Number of court deferrals to include in this pool| + + And I see the attendance date of the pool + Then I should see the attendance time present is "09:15" + + #change number of deferrals + When I click the change link for the court deferrals + + #error on continue with no input + When I press the "Continue" button + Then I see "Number of deferrals is missing" on the page + + #error on continue with invalid input + When I set "Number of deferred jurors to include in this pool" to "-1" + When I press the "Continue" button + Then I see "Number of deferrals cannot be negative" on the page + + #error when number > number of defs available + And I click on the "Cancel" link + Then I set Number of deferred jurors to include to "1" more than is available + Then I see "Number of deferrals is too high" on the page + + When I set "Number of deferred jurors to include in this pool" to "10000" + When I press the "Continue" button + Then I see "Number of deferrals is too high" on the page + + #select 0 deferrals + When I set "Number of deferred jurors to include in this pool" to "0" + When I press the "Continue" button + + #go back and select 1 deferral + When I click the change link for the court deferrals + When I set "Number of deferred jurors to include in this pool" to "1" + When I press the "Continue" button + + #error on Continue with no selections made + When I press the "Continue" button + Then I see "Pool type is missing" on the page + And I see "Select a pool type" on the page + And I see "Number of jurors required is missing" on the page + And I see "Enter the number of jurors required" on the page + + #error on Continue with only number of jurors entered + Then I set "Number of jurors required in total" to "150" + When I press the "Continue" button + Then I see "Pool type is missing" on the page + And I see "Select a pool type" on the page + And I do not see "Number of jurors required is missing" on the page + And I do not see "Enter the number of jurors required" on the page + + #error on Continue with only pool type set + Then I set "Number of jurors required in total" to "" + And I set the radio button to "<courtType>" + When I press the "Continue" button + Then I do not see "Pool type is missing" on the page + And I do not see "Select a pool type" on the page + And I see "Number of jurors required is missing" on the page + And I see "Enter the number of jurors required" on the page + + #change att time + Then I click the change link for the attendance time + And I see "Change the attendance time for this pool" on the page + Then I set input field with "ID" of "attendanceTimeHour" to "" + Then I set input field with "ID" of "attendanceTimeMinute" to "" + And I press the "Change" button + + And I see "Please enter an attendance hour" on the page + And I see "Please enter an attendance minute" on the page + + Then I set input field with "ID" of "attendanceTimeHour" to "ab" + Then I set input field with "ID" of "attendanceTimeMinute" to "cd" + And I press the "Change" button + + And I see "Please enter the hour as a number. For example, 6 for 6am or 18 for 6pm" on the page + And I see "Please enter the minute as a number. For example, 15" on the page + + Then I set input field with "ID" of "attendanceTimeHour" to "!" + Then I set input field with "ID" of "attendanceTimeMinute" to "!" + And I press the "Change" button + + And I see "Please check your attendance hour" on the page + And I see "Please check your attendance minute" on the page + And I see "Please enter the hour as a number. For example, 6 for 6am or 18 for 6pm" on the page + And I see "Please enter the minute as a number. For example, 15" on the page + + Then I set input field with "ID" of "attendanceTimeHour" to "9" + Then I set input field with "ID" of "attendanceTimeMinute" to "1" + And I press the "Change" button + + And I should see the attendance time present is "09:01" + + #complete new pool fields + Then I set the radio button to "<courtType>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + #check pool request + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | additionalRequirements | None | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 1 | + | additionalJurors | 149 | + + # Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | 149 | + + Examples: + | user | displayCourt | courtType | courtTypeFull | courtCode | + | MODTESTCOURT | Chester | Crown | Crown court | 415 | + | MODTESTCOURT | Chester | Civil | Civil court | 415 | + | MODTESTCOURT | Chester | High | High court | 415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to assure that a warning appears if the attendance date is set to a weekend date for Court user + Given I am on "Bureau" "test" + + And I log in as "<user>" + When I navigate to the pool request screen + When I click the link to the new pool screen + And I set the radio button to "Request new pool from Bureau" + And I press the "Continue" button + + When I click the change link for the attendance date + And I set the attendance date to a weekend + Then I should see a warning stating I have selected a weekend + When I click the link to continue from the warning page + When I change the pool type to "Civil" + + And I set the number of jurors to "10" + And I click the request pool button + Then I should see a warning stating I have selected a weekend + When I click the link to continue from the warning page + Then I should be taken to the check pool request page + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | 10 | + | numberOfDeferrals | 0 | + | additionalJurors | 10 | + + Examples: + | user | displayCourt | courtTypeFull | courtCode | + | MODTESTCOURT | Chester | Civil court | 415 | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Test to assure that a warning appears if the attendance date is set to a bank holiday date for court user + + #leaving in single thread as it deletes and sets up BHs which may break other tests + + Given I am on "Bureau" "postgres" + + Given I have deleted all holidays new schema + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + When I click the change link for the attendance date + + And I create a bank holiday "6" weeks in the future for court/bureau "<courtCode>" new schema + + When I set the "Change the attendance date for this pool" date to a Monday "6" weeks in the future + + And I press the "Change" button + + Then I should see a warning stating I have selected a bank holiday + + When I click the link to continue from the warning page + + Then I see "Request a new pool" on the page + + #complete new pool fields + When I click the change link for the court deferrals + When I set "Number of deferred jurors to include in this pool" to "0" + When I press the "Continue" button + + Then I set the radio button to "<courtTypeFull>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + Then I should see a warning stating I have selected a bank holiday + + When I click the link to continue from the warning page + + #check pool request + Then I see "Check your pool request" on the page + + And I should see the details of the pool with a bank holiday date + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 0 | + | additionalJurors | 150 | + + #Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | 150 | + + Then I delete bank holiday new schema + + Examples: + | user | courtCode | displayCourt | courtTypeFull | + | MODTESTCOURT | 415 | Chester | Crown court | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to assure court user cannot see courts they dont have access to + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + + #TRY COURT YOU DONT HAVE ACCESS TO + Then I click the change link for the chosen court + And I see "Select a court for this pool" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "452" + And I do not see link with text "Shrewsbury (452)" + Then I see "No results found" on the page + + #CHANGE COURT TO ONE YOU DO HAVE ACCESS TO + Then I clear field with id "courtNameOrLocation" + Then I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + And I press the "Continue" button + + #complete new pool fields + Then I set the radio button to "<courtTypeFull>" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + And I see the attendance date of the pool + + #check pool request + Then I see "Check your pool request" on the page + + And I should see the details of the pool + | courtName | <displayCourt> (<courtCode>) | + | poolType | <courtTypeFull> | + | totalJurorsRequired | 150 | + | numberOfDeferrals | 0 | + | additionalJurors | 150 | + + # Can submit the new pool request + When I save the new pool request + Then I should be taken to the pool summary page + + And I should see the newly created pool request + | court | <displayCourt> | + | jurorsRequired | 150 | + + Examples: + | user | courtCode | displayCourt | courtTypeFull | + | MODTESTCOURT | 774 | Welshpool | Crown court | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2731.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2731.feature new file mode 100644 index 00000000..aa2efd06 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2731.feature @@ -0,0 +1,71 @@ +Feature: JM-2731 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search pool records as bureau + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + And I log in as "<user>" + + When the user searches for juror record "<juror_number>" from the global search bar + Then the juror record is displayed with the following fields new schema + | Juror number | <juror_number> | + | Juror status | Summoned | + | Pool number | <pool_number> | + | Court start date | | + | Court name | The Crown Court At Chester | + + Examples: + | user | juror_number | pool_number | + | MODTESTBUREAU | 011000002 | 010000002 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search pool records as court + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + And I log in as "<user>" + + When the user searches for juror record "<juror_number>" from the global search bar + Then the juror record is displayed with the following fields new schema + | Juror number | <juror_number> | + | Juror status | Summoned | + | Pool number | <pool_number> | + | Court start date | | + | Court name | The Crown Court At Chester | + + Examples: + | user | juror_number | pool_number | + | MODTESTBUREAU | 011000003 | 010000003 | + + + @JurorTransformation @NewSchemaConverted + Scenario: Test to search non-existent pool record as bureau + + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + When the user enters an incorrect juror record number + Then an error message is displayed explaining that there are no matching results + + @JurorTransformation @NewSchemaConverted + Scenario: Test to search non-existent pool record as court + + Given I am on "Bureau" "test" + And I log in as "MODTESTCOURT" + When the user enters an incorrect juror record number + Then an error message is displayed explaining that there are no matching results \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2841 notes and logs transferred jurors.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2841 notes and logs transferred jurors.feature new file mode 100644 index 00000000..d8919dd0 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-2841 notes and logs transferred jurors.feature @@ -0,0 +1,147 @@ +Feature: JM-2841 Notes and Logs for Transferred Jurors + + @JurorTransformationWIP @JM-5161 + Scenario Outline: Court Transferred Juror retains Notes and Call logs + Given I am on "Bureau" "test" + + #reset data to summoned state + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number> | <pool_number> | 5 | 400 | + + And I log in as "MODTESTBUREAU" + When the user searches for juror record "<juror_number>" from the global search bar + And I record a happy path paper summons response and process now + + #insert a court owned record and update bureau owned record to show it has transferred to the court + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number> | <pool_number> | 415 | + + #log in as Court user and search for juror + Given I am on "Bureau" "test" + And I log in as "<user>" + When the user searches for juror record "<juror_number>" from the global search bar + + #record Notes on 415 record + And I record notes "Notes for juror" + Then I see "Notes for juror" on the page + + #JM-5994 + #record call log on 415 record + And I record call log "Phone inquiry from juror" + Then I see "Phone inquiry from juror" on the page + + #transfer juror to 407 + And I click the update juror record button + And I click the transfer to another pool radio button + And I press the "Continue" button + + #select court and attendance date + When I set input field with "ID" of "courtNameOrLocation" to "407" + And I click on the "Dorchester (407)" link + And I set attendance date to "5" Mondays in the future + And I press the "Continue" button + + Then I see "Transfer to Dorchester (407)" on the page + When I press the "Continue" button + + When the user searches for juror record "<juror_number>" from the global search bar + Then I see "Chester" on the page + + #log on as Bureau user + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + When the user searches for juror record "<juror_number>" from the global search bar + + Then I see "<juror_number>" in the same row as "Dorchester" + And I see "<juror_number>" in the same row as "Chester" + + #search for juror at new pool 407 + When I click on "<juror_number>" in the same row as "Dorchester" + + And I see "407" on the page + And I see "Dorchester" on the page + + Then I click on the "Notes" link + Then I see "Notes for juror" on the page + + Then I click on the "Contact log" link + Then I see "Phone inquiry from juror" on the page + + #@JM-5992 + #add a new note to Dorchester juror record + And I record notes "Notes for Dorchester owned juror record" + Then I see "Notes for Dorchester owned juror record" on the page + + #record call log to Dorchester juror record + And I record call log "Phone inquiry from Dorchester owned record" + Then I see "Phone inquiry from Dorchester owned record" on the page + Then I do not see "Phone inquiry from juror" on the page + + #log on as 415 court user + Given I am on "Bureau" "test" + And I log in as "<user>" + + #search for juror at original pool 415 + And I search for juror "<juror_number>" + Then I see "Chester" on the page + + Then I click on the "Notes" link + Then I see "Notes for Dorchester owned juror record" on the page + + Then I click on the "Contact log" link + Then I see "Phone inquiry from juror" on the page + Then I do not see "Phone inquiry from Dorchester owned record" on the page + + #transfer juror + And I click the update juror record button + And I click the transfer to another pool radio button + And I press the "Continue" button + + #select court and attendance date + When I set input field with "ID" of "courtNameOrLocation" to "457" + And I click on the "Swansea (457)" link + And I set attendance date to "5" Mondays in the future + And I press the "Continue" button + + Then I see "Transfer to Swansea (457)" on the page + When I press the "Continue" button + + #search for juror at new pool + And I search for juror "<juror_number>" + When I click on "<juror_number>" in the same row as "Swansea" + + Then I click on the "Notes" link + #fails due to JM-5161 + And I see "457" on the page + Then I see "Notes for juror" on the page + + Then I click on the "Contact log" link + Then I see "Phone inquiry from juror" on the page + + #add a new note to Swansea juror record + And I record notes "Notes for Swansea owned juror record" + Then I see "Notes for Swansea owned juror record" on the page + + #record call log to Swansea juror record + And I record call log "Phone inquiry from Swansea owned record" + Then I see "Phone inquiry from Swansea owned record" on the page + Then I do not see "Phone inquiry from juror" on the page + Then I do not see "Phone inquiry from Dorchester owned record" on the page + + #search for juror at original pool + And I search for juror "<juror_number>" + When I click on "<juror_number>" in the same row as "Chester" + + Then I click on the "Notes" link + Then I see "Notes for Swansea owned juror record" on the page + + Then I click on the "Contact log" link + Then I see "Phone inquiry from juror" on the page + Then I do not see "Phone inquiry from Dorchester owned record" on the page + Then I do not see "Phone inquiry from Swansea owned record" on the page + + Examples: + | user | juror_number | pool_number | + | MODTESTCOURT | 041500040 | 415300129 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3351.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3351.feature new file mode 100644 index 00000000..60de84bf --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3351.feature @@ -0,0 +1,47 @@ +Feature: JM-3351 + + @JurorTransformationMulti + Scenario: Test to filter pool requests + Given I am on "Bureau" "postgres" + + And I log in as "MODTESTBUREAU" + + And I navigate to the pool request screen + And I create a "Civil" court pool request for court "415" + + When I navigate to the pool request screen + When the user filters by "Chester (415)" + Then only records from "Chester" are displayed + + + @JurorTransformationMulti + Scenario: Test to filter pool requests with no pools available + Given I am on "Bureau" "postgres" + + And I log in as "MODTESTBUREAU" + + When I navigate to the pool request screen + When the user filters by "Reading" + Then no records are displayed + + @JurorTransformationMulti + Scenario: Test to filter active pools + Given I am on "Bureau" "postgres" + And I log in as "MODTESTBUREAU" + When I navigate to the pool request screen + And I click on active pools + When the user filters by "Chester (415)" + Then only active records from "Chester" are displayed + + + @JurorTransformationMulti + Scenario: Test to filter active pools with no pools available + Given I am on "Bureau" "postgres" + + And I log in as "MODTESTBUREAU" + + When I navigate to the pool request screen + And I click on active pools + When the user filters by "Reading" + Then no active records are displayed + diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671-Validation_and_Errors.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671-Validation_and_Errors.feature new file mode 100644 index 00000000..78192ce6 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671-Validation_and_Errors.feature @@ -0,0 +1,407 @@ +Feature: JM-3671 Validation and Errors + + @JurorTransformation + Scenario Outline: Coroners court warning - no court or jurors requested entered + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #click continue with no input + + Then I press the "Continue" button + + #check warning + + And I see error "Court name or location is missing" + And I see "The number of jurors you can request must be a number between 30 and 250" on the page + + Examples: + | user | + | MODTESTBUREAU | + + @JurorTransformation + Scenario Outline: Coroners court warning - invalid court + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court only and continue + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + Then I press the "Continue" button + + Then I press the "Continue" button + + #check warning + + And I see error "The number of jurors you can request must be a number between 30 and 250" + + #select number of jurors only and continue + + Then I set input field with "ID" of "courtNameOrLocation" to "" + And I set input field with "ID" of "jurorsRequested" to "100" + Then I press the "Continue" button + + #check warning + + And I see error "Court name or location is missing" + + #invalid court + + Then I set input field with "ID" of "courtNameOrLocation" to "the moon" + When I press the "Continue" button + And I see error "This court does not exist. Please enter a name or code of an existing court" + + Then I set input field with "ID" of "courtNameOrLocation" to "" + + Then I set input field with "ID" of "courtNameOrLocation" to "41" + When I press the "Continue" button + And I see error "This court does not exist. Please enter a name or code of an existing court" + + Examples: + | user | selectedCourt | courtCode | displayCourt | + | MODTESTBUREAU | CHESTER | 415 | Chester | + + @JurorTransformation + Scenario Outline: Coroners court warning - invalid number of jurors + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + + #enter invalid number of jurors - negative + + And I set input field with "ID" of "jurorsRequested" to "-1" + Then I press the "Continue" button + Then I see "The number of jurors you can request must be a number between 30 and 250" on the page + + #enter invalid number of jurors - <30 + + And I set input field with "ID" of "jurorsRequested" to "29" + Then I press the "Continue" button + Then I see "The number of jurors you can request must be a number between 30 and 250" on the page + + #enter invalid number of jurors - >250 + + And I set input field with "ID" of "jurorsRequested" to "251" + Then I press the "Continue" button + Then I see "The number of jurors you can request must be a number between 30 and 250" on the page + + #enter invalid number of jurors - >250 + + And I set input field with "ID" of "jurorsRequested" to "9999" + Then I press the "Continue" button + Then I see "The number of jurors you can request must be a number between 30 and 250" on the page + + + Examples: + | user | selectedCourt | courtCode | displayCourt | + | MODTESTBUREAU | CHESTER | 415 | Chester | + + @JurorTransformation + Scenario Outline: Coroners court warning - invalid requested by details + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + And I set input field with "ID" of "jurorsRequested" to "150" + Then I press the "Continue" button + + #check page content + + And on the page I see + | text| + |Who requested this pool? | + |Email | + |Phone (optional) | + |Date requested | + + And I see date requested on coroner pool request is today + + #continue with no input + + Then I set "Date requested" to "" + Then I press the "Continue" button + + And I see error "Enter the name of the person who requested the pool" + And I see "Enter the email address for the person who requested the pool" on the page + And I see "Enter the date the pool was requested" on the page + + #continue with invalid inputs + + And I set "Name" to "aabbccnnmmmmaahhsskkeerroorrppeemmggssyywwii" + And I set "Email" to "blah" + And I set "Phone (optional)" to "numbers only" + Then I set "Date requested" to "00/00/00" + + Then I press the "Continue" button + + And I see error "The name cannot be longer than 35 characters" + And I see "Enter a valid email address for the person who requested the pool" on the page + And I see "Enter a valid phone number for the person who requested the pool" on the page + And I see "Enter a valid requested date for this pool - DD/MM/YYYY" on the page + + Examples: + | user | selectedCourt | courtCode | displayCourt | + | MODTESTBUREAU | CHESTER | 415 | Chester | + + @JurorTransformation + Scenario Outline: Coroners court warning - requested on date cannot be date in the past + Given I am on "Bureau" "test" + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + And I set input field with "ID" of "jurorsRequested" to "<noJurors>" + Then I press the "Continue" button + + #check page content + And on the page I see + | text| + |Who requested this pool? | + |Email | + |Phone (optional) | + |Date requested | + + And I see date requested on coroner pool request is today + + #input valid contact details + And I set "Name" to "<name>" + And I set "Email" to "<email>" + And I set "Phone (optional)" to "<phone>" + + #continue with past date + And I set the Coroners pool requested on date to a Monday "-10" weeks in the future + Then I press the "Continue" button + And I see error "Requested date must be in the future" + + Examples: + | user | selectedCourt | courtCode | displayCourt | noJurors | name | phone | email | + | MODTESTBUREAU | CHESTER | 415 | Chester | 150 | A Name | 07888888888 | e@mail.com | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Coroners court warning - invalid input on add jurors + Given I am on "Bureau" "test" + Given coroners pools older than today have been cleared down new schema + Given voters for court "415" have been updated to postcode "CH2 2AN" new schema + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + And I set input field with "ID" of "jurorsRequested" to "150" + Then I press the "Continue" button + + #check page content + + And on the page I see + | text| + |Who requested this pool? | + |Email | + |Phone (optional) | + |Date requested | + + And I see date requested on coroner pool request is today + + #valid inputs + + And I set "Name" to "<name>" + And I set "Email" to "<email>" + And I set "Phone (optional)" to "<phone>" + + Then I press the "Continue" button + And I should see the details of the coroner's court pool summary + | courtName | <displayCourt> | + | totalJurorsRequired | <noJurors> | + | requestedByName | <name> | + | requestedByEmail | <email> | + | requestedByPhone | <phone> | + + # Can submit the new coroners pool request + + When I press the "Create pool" button + + Then I should see the coroner's court pool + | court | <displayCourt> | + | courtCode | <courtCode> | + | poolType | Coroner’s court| + | jurorsAdded | 0 | + | jurorsRequired | <noJurors> | + | rowsOfCitizens | 0 | + + #add jurors to the pool + + Then I press the "Add jurors" button + And I see "Add a court catchment area" on the page + And I see "<displayCourt>" on the page + + Then I press the "Continue" button + And I see "Enter the number of citizens to include from each postcode area" on the page + And I see "The number of citizens available in each postcode area is shown in brackets." on the page + And I see "CH1 (" on the page + And I see "CH2 (" on the page + + #add with no citizens added + + And I press the "Add citizens" button + + And I see "Please enter the amount of citizens you need from each postcode below" on the page + + #add more than 250 + + Then I set "CH1 (" to "51" + And I set "CH2 (" to "200" + + And I press the "Add citizens" button + + And I see "You cannot enter more than 250 citizens in total across all postcodes" on the page + + #add more than is available in the postcode + + Then I set first postcode field to more than is available + + And I press the "Add citizens" button + + And I see error "The number of citizens you can enter for postcode CH1 must be " + + #add more than has been requested which is valid + + Then I set "CH1 (" to "141" + And I set "CH2 (" to "10" + + And I press the "Add citizens" button + + Then I should see the coroner's court pool + | court | <displayCourt> | + | courtCode | <courtCode> | + | poolType | Coroner’s court| + | jurorsAdded | 151 | + | jurorsRequired | <noJurors> | + | rowsOfCitizens | 151 | + + Examples: + | user | selectedCourt | courtCode | displayCourt | noJurors | name | email | phone | + | MODTESTBUREAU | CHESTER | 415 | Chester | 150 | A Name | e@mail.com | 07889999999 | + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Coroners court warning - no voters available + Given I am on "Bureau" "test" + Given coroners pools older than today have been cleared down new schema + + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<courtCode>" + Then I click on the "<displayCourt> (<courtCode>)" link + And I set input field with "ID" of "jurorsRequested" to "<noJurors>" + Then I press the "Continue" button + + #check page content + + And on the page I see + | text| + |Who requested this pool? | + |Email | + |Phone (optional) | + |Date requested | + + And I see date requested on coroner pool request is today + + #valid inputs + + And I set "Name" to "<name>" + And I set "Email" to "<email>" + And I set "Phone (optional)" to "<phone>" + + Then I press the "Continue" button + And I should see the details of the coroner's court pool summary + | courtName | <displayCourt> | + | totalJurorsRequired | <noJurors> | + | requestedByName | <name> | + | requestedByEmail | <email> | + | requestedByPhone | <phone> | + + # Can submit the new coroners pool request + + When I press the "Create pool" button + + Then I should see the coroner's court pool + | court | <displayCourt> | + | courtCode | <courtCode> | + | poolType | Coroner’s court| + | jurorsAdded | 0 | + | jurorsRequired | <noJurors> | + | rowsOfCitizens | 0 | + + # add jurors to the pool + + Then I press the "Add jurors" button + And I see "Add a court catchment area" on the page + And I see "<displayCourt>" on the page + + Then I press the "Continue" button + + And I see "Enter the number of citizens to include from each postcode area" on the page + And I see "No jurors on this catchment area." on the page + + Then I click on the "Cancel" link + + Then I should see the coroner's court pool + | court | <displayCourt> | + | courtCode | <courtCode> | + | poolType | Coroner’s court| + | jurorsAdded | 0 | + | jurorsRequired | <noJurors> | + | rowsOfCitizens | 0 | + + Examples: + | user | courtCode | displayCourt | noJurors | name | phone | email | + | MODTESTBUREAU | 423 | Exeter | 150 | A Name | 07888888888 | e@mail.com | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671.feature new file mode 100644 index 00000000..bdb10f41 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671.feature @@ -0,0 +1,170 @@ +Feature: JM-3671 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Happy Path Test to create a coroner's pool + Given I am on "Bureau" "test" + Given coroners pools older than today have been cleared down new schema + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + And I set input field with "ID" of "jurorsRequested" to "<noJurors>" + Then I press the "Continue" button + + #check page content + And on the page I see + | text| + |Who requested this pool? | + |Email | + |Phone (optional) | + |Date requested | + + And I see date requested on coroner pool request is today + + And I set "Name" to "<name>" + And I set "Email" to "<email>" + And I set "Phone (optional)" to "<phone>" + + Then I press the "Continue" button + + And I should see the details of the coroner's court pool summary + | courtName | <displayCourt> | + | totalJurorsRequired | <noJurors> | + | requestedByName | <name> | + | requestedByEmail | <email> | + | requestedByPhone | <phone> | + + # Can submit the new coroners pool request + When I press the "Create pool" button + + #export pool button not visible until jurors added + And the Export pool button is not visible + + Examples: + | user | selectedCourt | courtCode | displayCourt | noJurors | name | phone | email | + | MODTESTBUREAU | CHESTER | 415 | Chester | 150 | A Name | 07888888888 | e@mail.com | + + @JurorTransformationMulti + Scenario Outline: Happy Path Test to add jurors to a coroner's pool from another catchment area + Given I am on "Bureau" "test" + + And I log in as "<user>" + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + And I set input field with "ID" of "jurorsRequested" to "<noJurors>" + Then I press the "Continue" button + + #check page content + And on the page I see + | text| + |Who requested this pool? | + |Email | + |Phone (optional) | + |Date requested | + + And I see date requested on coroner pool request is today + + And I set "Name" to "<name>" + And I set "Email" to "<email>" + And I set "Phone (optional)" to "<phone>" + + Then I press the "Continue" button + + And I should see the details of the coroner's court pool summary + | courtName | <displayCourt> | + | totalJurorsRequired | <noJurors> | + | requestedByName | <name> | + | requestedByEmail | <email> | + | requestedByPhone | <phone> | + + # Can submit the new coroners pool request + When I press the "Create pool" button + + Then I should see the coroner's court pool + | court | <displayCourt> | + | courtCode | <courtCode> | + | poolType | Coroner’s court| + | jurorsAdded | 0 | + | jurorsRequired | <noJurors> | + | rowsOfCitizens | 0 | + + #add jurors to the pool + Then I press the "Add jurors" button + And I see "Add a court catchment area" on the page + And I see "<displayCourt>" on the page + + Then I press the "Continue" button + And I see "Enter the number of citizens to include from each postcode area" on the page + And I see "The number of citizens available in each postcode area is shown in brackets." on the page + And I see "CH1 (" on the page + And I see "CH2 (" on the page + Then I set "CH1 (" to "100" + And I set "CH2 (" to "50" + + And I press the "Add citizens" button + + Then I should see the coroner's court pool + | court | <displayCourt> | + | courtCode | <courtCode> | + | poolType | Coroner’s court| + | jurorsAdded | 150 | + | jurorsRequired | <noJurors> | + | rowsOfCitizens | 150 | + Then I click on the "s court contact details" link + + And coroners court contact details are + | name | <name> | + | email | <email> | + | phone | <phone> | + + #add more jurors + Then I press the "Add jurors" button + And I see "Add a court catchment area" on the page + And I see "<displayCourt>" on the page + + Then I click on the "Change" link + Then I see "Change the court catchment area" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "457" + Then I click on the "Swansea (457)" link + Then I press the "Continue" button + + Then I see "Add a court catchment area" on the page + Then I press the "Continue" button + Then I see "Enter the number of citizens to include from each postcode area" on the page + And I see "SA1 (" on the page + + Then I set "SA1 (" to "30" + + And I press the "Add citizens" button + + #will fail due to outstanding bug JM-5375 + + Then I should see the coroner's court pool + | court | <displayCourt> | + | courtCode | <courtCode> | + | poolType | Coroner’s court| + | jurorsAdded | 180 | + | jurorsRequired | <noJurors> | + | rowsOfCitizens | 180 | + + Then I am able to see the coroners pool juror headers + And I see pool status is "Active" + + #export + Then I press the "Export pool" button + + Examples: + | user | selectedCourt | courtCode | displayCourt | noJurors | name | phone | email | + | MODTESTBUREAU | CHESTER | 415 | Chester | 180 | A Name | 07888888888 | e@mail.com | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671_Navigation.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671_Navigation.feature new file mode 100644 index 00000000..4e8a4ade --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3671_Navigation.feature @@ -0,0 +1,86 @@ +Feature: JM-3671 Navigation + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Coroners pool change pool details + Given I am on "Bureau" "test" + And I log in as "<user>" + + When I navigate to the pool request screen + + When I select to create a coroner's pool + Then I see "Create a coroner court pool" on the page + + #select court + + Then I set input field with "ID" of "courtNameOrLocation" to "<selectedCourt>" + Then I click on the "<displayCourt> (<courtCode>)" link + And I set input field with "ID" of "jurorsRequested" to "<noJurors>" + Then I press the "Continue" button + + #check page content + + And on the page I see + | text | + |Who requested this pool? | + |Email | + |Phone (optional) | + |Date requested | + + And I see date requested on coroner pool request is today + + And I set "Name" to "<name>" + And I set "Email" to "<email>" + And I set "Phone (optional)" to "<phone>" + + Then I press the "Continue" button + + And I should see the details of the coroner's court pool summary + | courtName | <displayCourt> | + | totalJurorsRequired | <noJurors> | + | requestedByName | <name> | + | requestedByEmail | <email> | + | requestedByPhone | <phone> | + + #Change request details + Then I click on the change coroners pool request details link + And I see "Create a coroner court pool" on the page + Then I set input field with "ID" of "courtNameOrLocation" to "452" + Then I click on the "Shrewsbury (452)" link + And I set input field with "ID" of "jurorsRequested" to "200" + Then I press the "Continue" button + + And I see "Who requested this pool?" on the page + Then I press the "Continue" button + + #Change requested by + Then I click on the change coroners pool requested By link + And I see date requested on coroner pool request is today + And I set "Name" to "New Name" + And I set "Email" to "new@email.com" + And I set "Phone (optional)" to "07111111111" + And I set the Coroners pool requested on date to a Monday "10" weeks in the future + + Then I press the "Continue" button + + And I should see the details of the coroner's court pool summary + | courtName | Shrewsbury | + | totalJurorsRequired | 200 | + | requestedByName | New Name | + | requestedByEmail | new@email.com | + | requestedByPhone | 07111111111 | + + # Can submit the new coroners pool request + + When I press the "Create pool" button + + Then I should see the coroner's court pool + | court | Shrewsbury | + | courtCode | 452 | + | poolType | Coroner’s court| + | jurorsAdded | 0 | + | jurorsRequired | 200 | + | rowsOfCitizens | 0 | + + Examples: + | user | selectedCourt | courtCode | displayCourt | noJurors | name | phone | email | + | MODTESTBUREAU | CHESTER | 415 | Chester | 150 | A Name | 07888888888 | e@mail.com | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3987-Bureau-monitor-pool-progress.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3987-Bureau-monitor-pool-progress.feature new file mode 100644 index 00000000..a67eae39 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3987-Bureau-monitor-pool-progress.feature @@ -0,0 +1,127 @@ +Feature: JM-3987 Monitor Pools Progress + + @JurorTransformation + Scenario: Test to show nil pools on the summoning progress screen + Given I am on "Bureau" "test" + + And I have cleared down deferrals for "1" weeks in the future for court "415" + And I log in as "MODTESTCOURT" + And I navigate to the pool request screen + And I select to create a nil pool + And I click the change link for the attendance date + And I select a new date "1" week in the future + + And I change the pool type to "Civil" + And I click the request pool button + And I make a note of the pool number + And I click the create nil pool confirmation button + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + And I navigate to the pool request screen + And I navigate to the pool summoning progress screen + And I enter "415" as the court + And I select the "Civil" court type + And I click search + And I do not see "There are no matching results" on the page + And I can see the newly created pool + And I see "Nil pool" on the page + And I clear down the data for all the pools I created for this test + + @JurorTransformation + Scenario: Test to show the no pools requested message is displayed in weeks with no pools + Given I am on "Bureau" "test" + Given new pool requests are deleted + Given the poolNumbers lists is empty + Given I have cleared down the modernisation staff data + Given I have created the modernisation staff data + And I log in as "MODTESTBUREAU" + And I navigate to the pool request screen + And I create "1" new "High" pool requests each a week apart in court "415" with "10" jurors to summon + And I navigate to the pool summoning progress screen + And I see the summoning progress page banner + And I enter "415" as the court + And I select the "High" court type + And I click search + And I do not see "There are no matching results" on the page + And I see all the pool numbers that were created are present on the screen + And I see "No pools requested" on the page + Then I clear down the data for all the pools I created for this test + + @JurorTransformation + Scenario: Test for correct error message is returned when no pools are returned in the search + Given I am on "Bureau" "test" + Given new pool requests are deleted + Given the poolNumbers lists is empty + Given I have cleared down the modernisation staff data + Given I have created the modernisation staff data + And I log in as "MODTESTBUREAU" + And I navigate to the pool request screen + And I navigate to the pool summoning progress screen + And I see the summoning progress page banner + And I enter "123" as the court + And I select the "Civil" court type + And I click search + And I do not see "Week 1" on the page + And I see "There are no matching results" on the page + And I see "selecting a court from the list" on the page + And I see "checking the court type" on the page + + @JurorTransformation + Scenario: Test for correct error message is returned when no search criteria are entered + Given I am on "Bureau" "test" + Given new pool requests are deleted + Given the poolNumbers lists is empty + Given I have cleared down the modernisation staff data + Given I have created the modernisation staff data + And I log in as "MODTESTBUREAU" + And I navigate to the pool request screen + And I navigate to the pool summoning progress screen + And I see the summoning progress page banner + And I click search + And I do not see "Week 1" on the page + And I see "There is a problem" on the page + And I see "Pool type is missing" on the page + And I see "Enter the name or location code for a court" on the page + + @JurorTransformation + Scenario: Test for correct values on table + Given I am on "Bureau" "test" +# Given new pool requests are deleted +# Given the poolNumbers lists is empty +# Given I have cleared down the modernisation staff data +# Given I have created the modernisation staff data + And I log in as "MODTESTBUREAU" + And I navigate to the pool request screen + And I create "1" new "Civil" pool requests each a week apart in court "415" with "160" jurors to summon + And I navigate to the pool summoning progress screen + And I see the summoning progress page banner + And I enter "415" as the court + And I select the "Civil" court type + And I click search + And I see the pool I created in a row on the search results with the values + | requested | 150 | + | summoned | 160 | + | confirmed | 0 | + | balance | -150 | +# And I clear down the data for all the pools I created for this test + + @JurorTransformation + Scenario: Test to show all 8 weeks are populated when an active pool exist for that week + Given I am on "Bureau" "test" + Given new pool requests are deleted + Given the poolNumbers lists is empty + Given I have cleared down the modernisation staff data + Given I have created the modernisation staff data + And I log in as "MODTESTBUREAU" + And I navigate to the pool request screen + #And I create a "Civil" court pool request for court "415", "2" weeks in the future + And I create "8" new "Civil" pool requests each a week apart in court "415" + And I navigate to the pool summoning progress screen + And I see the summoning progress page banner + And I enter "415" as the court + And I select the "Civil" court type + And I click search + And I do not see "There are no matching results" on the page + And I see all the pool numbers that were created are present on the screen + Then I clear down the data for all the pools I created for this test + diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3989-3993-BUREAU-reassign-juror-from-juror-record.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3989-3993-BUREAU-reassign-juror-from-juror-record.feature new file mode 100644 index 00000000..2934d012 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3989-3993-BUREAU-reassign-juror-from-juror-record.feature @@ -0,0 +1,123 @@ +Feature: JM-3989 JM-3993 + + @JurorTransformation @NewSchemaConverted + Scenario: Reassign a juror to a pool for a different court - Bureau User + + Given I am on "Bureau" "test" + And new pool requests are deleted new schema + And the new pool for court "415" is deleted new schema + And the new pool for court "774" is deleted new schema + And the voter record for "941599999" is deleted new schema + And the voter record for "941599998" is deleted new schema + And a new active pool is inserted for court "415" new schema + And jurors are inserted into active pool "415" new schema + And a new active pool is inserted for court "774" new schema + And a digital summons reply has been entered for the summoned juror "941599999" new schema + And I log in as "MODTESTBUREAU" + When I navigate to the pool request screen + And I click on active pools + + And I navigate to the pool search screen + When I enter the pool number "415222222" on the pool search screen + And I search for the pool + Then the pool is displayed + And I click on the "941599999" link + +# Reassign from juror record + When I click the update juror record button + And I click the reassign to another pool radio button + And I press the "Continue" button + Then I see "Active pools at Chester (415)" on the page +# Change court + When I click on the "Change court" link + Then I see "Select a court to reassign to" on the page + When I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + And I press the "Continue" button + + Then I see "Choose a pool to reassign to" on the page + And I see "Active pools at Welshpool (774)" on the page + And I see the reassign active pools table + When I select pool "774222222" from the active pools table + And I press the "Continue" button + Then I see "Reassigned to pool 774222222" on the page + And the juror record pool number has updated to "774222222" + And the juror record court name has updated to "The Crown Court At Welshpool" + + @JurorTransformation @NewSchemaConverted + Scenario: Reassign a juror to a pool at the same court - Bureau User + + Given I am on "Bureau" "test" + And the new pool for court "415" is deleted new schema + And the voter record for "941599999" is deleted new schema + And the voter record for "941599998" is deleted new schema + And two new active pool's are inserted for court "415" new schema + And jurors are inserted into active pool "415" new schema + And a digital summons reply has been entered for the summoned juror "941599999" new schema + And I log in as "MODTESTBUREAU" + + When I navigate to the pool request screen + And I click on active pools + When I navigate to the active pool "415222222" overview + And I click on the "941599999" link + + #Reassign from juror record + When I click the update juror record button + And I click the reassign to another pool radio button + And I press the "Continue" button + Then I see "Active pools at Chester (415)" on the page + And I see "Choose a pool to reassign to" on the page + And I see the reassign active pools table + When I select pool "415333333" from the active pools table + And I press the "Continue" button + Then I see "Reassigned to pool 415333333" on the page + And the juror record pool number has updated to "415333333" + + @JurorTransformation @NewSchemaConverted + Scenario: Reassign a juror to a pool - Bureau User - Errors + + Given I am on "Bureau" "test" + + Given the new pool for court "415" is deleted new schema + Given the new pool for court "774" is deleted new schema + Given the voter record for "941599999" is deleted new schema + Given the voter record for "941599998" is deleted new schema + Given a new active pool is inserted for court "415" new schema + Given jurors are inserted into active pool "415" new schema + Given a new active pool is inserted for court "774" new schema + Given a digital summons reply has been entered for the summoned juror "941599999" new schema + + And I log in as "MODTESTBUREAU" + When I navigate to the pool request screen + And I click on active pools + When I navigate to the active pool "415222222" overview + And I click on the "941599999" link + + #Reassign from juror record + When I click the update juror record button + + #Do not select reassign juror + And I press the "Continue" button + Then I see "Select how you want to update the juror record" on the page + + When I click the reassign to another pool radio button + And I press the "Continue" button + Then I see "Active pools at Chester (415)" on the page + When I click on the "Change court" link + Then I see "Select a court to reassign to" on the page + + #Do not select a court + When I press the "Continue" button + Then I see "Enter a court name or location code" on the page + + When I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + And I press the "Continue" button + + Then I see "Choose a pool to reassign to" on the page + And I see "Active pools at Welshpool (774)" on the page + And I see the reassign active pools table + + #Do not select an active pool + And I press the "Continue" button + Then I see "Choose an active pool to add selected jurors to" on the page \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3991-jury-officer-reassign-to-another-pool.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3991-jury-officer-reassign-to-another-pool.feature new file mode 100644 index 00000000..5a2dfed9 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3991-jury-officer-reassign-to-another-pool.feature @@ -0,0 +1,64 @@ +Feature: JM-3991 Reassign Juror as Court User + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Reassign a juror to a pool court - Jury User + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number1> | <pool_number1>| 5 | 400 | + + Given a bureau owned pool is created with jurors + | court | juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 | <juror_number2> | <pool_number2>| 5 | 400 | + + #respond juror as bureau user + And I log in as "MODTESTBUREAU" + + When the user searches for juror record "<juror_number1>" from the global search bar + And I record a paper summons response with reasonable adjustments + And I select Process reply + And I mark the reply as responded + And I press the "Continue" button + And I click the checkbox to mark the reply as responded + And I press the "Confirm" button + Then I see "Summons reply for 041500041 fname lname successfully processed: Responded" on the page + + When the user searches for juror record "<juror_number2>" from the global search bar + And I record a paper summons response with reasonable adjustments + And I select Process reply + And I mark the reply as responded + And I press the "Continue" button + And I click the checkbox to mark the reply as responded + And I press the "Confirm" button + Then I see "Summons reply for 041500042 fname lname successfully processed: Responded" on the page + + Given a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number1> | <pool_number1> | 415 | + |<juror_number2> | <pool_number2> | 415 | + + #log on as court + Given I am on "Bureau" "test" + And I log in as "<user>" + + When I navigate to the pool request screen + And I click on active pools + And I click on the "At court" link + When I navigate to the active pool "<pool_number1>" overview + And I click on the "<juror_number1>" link + + #Reassign from juror record + When I click the update juror record button + And I click the reassign to another pool radio button + And I press the "Continue" button + And I see the reassign active pools table + When I select pool "<pool_number2>" from the active pools table + And I press the "Continue" button + Then I see "Reassigned to pool <pool_number2>" on the page + And the juror record pool number has updated to "<pool_number2>" + + Examples: + |juror_number1|pool_number1 |juror_number2|pool_number2 |user | + |041500041 |415300131 |041500042 |415300132 |MODTESTCOURT | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3995-COURT-transfer-juror-to-another-court.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3995-COURT-transfer-juror-to-another-court.feature new file mode 100644 index 00000000..70b62fc0 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-3995-COURT-transfer-juror-to-another-court.feature @@ -0,0 +1,235 @@ +Feature: JM-3995 JM-4302 + + @JurorTransformationWIP @NewSchemaConverted @JM-5902 + Scenario Outline: Transfer a juror to another court - Juror Record - Happy Path + + Given I am on "Bureau" "test" + + Given juror_pool records are cleared down for "<part_no>" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "7 mondays time" new schema + + And I log in as "<user>" + + Given a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + When the user searches for juror record "<part_no>" from the global search bar + + #record happy path paper summons + And I record a happy path paper summons response + + #skip straight through processing + Then I see "Do you want to process this summons reply as responded now?" on the page + Then I see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + When I press the "Yes, process now" button + + When the user searches for juror record "<part_no>" from the global search bar + And I click the update juror record button + And I click the transfer to another pool radio button + And I press the "Continue" button + + Then I am on the select a court to transfer to page + + #select court and attendance date + #ensure multiple courts are visible for transfer + When I set input field with "ID" of "courtNameOrLocation" to "420" + And I click on the "Doncaster (420)" link + When I set input field with "ID" of "courtNameOrLocation" to "465" + And I click on the "Winchester (465)" link + When I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + And I set attendance date to "4" Mondays in the future + And I press the "Continue" button + + Then I see "Transfer to Welshpool (774)" on the page + When I press the "Continue" button + + Then I am on the Juror Record for juror "<part_no>" + And I see the juror status on the juror record screen has updated to "Transferred" + And I see "Juror record updated: juror transferred to Welshpool (774)" on the page + + #Welshpool (774) is a SATELLITE court, so court user can see both juror records + When I search for juror "<part_no>" + Then a second juror record is shown in the search results for "<part_no>" + When I click the juror record search link for court name "Welshpool" + + Then I am on the Juror Record for juror "<part_no>" + And I see the juror's status on the juror record screen is "Responded" + And I see the court name on the juror record screen is "The Crown Court At Welshpool" + + Examples: + | user | part_no | pool_no | + | MODTESTCOURT | 641500139 | 415171103 | + + @JurorTransformationWIP @NewSchemaConverted @JM-5902 + Scenario Outline: Transfer a juror to another court - Juror Record - Validation and Errors + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "7 mondays time" new schema + And pool "<pool_no>" has attendance date as "7 mondays time" new schema + + And I log in as "<user>" + + Given a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + When the user searches for juror record "<part_no>" from the global search bar + + #record happy path paper summons + And I record a happy path paper summons response + + #skip straight through processing + Then I see "Do you want to process this summons reply as responded now?" on the page + And I see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + When I press the "Yes, process now" button + + When the user searches for juror record "<part_no>" from the global search bar + + And I click the update juror record button + + #do not select transfer juror + And I press the "Continue" button + Then I see "Select how you want to update the juror record" on the page + + And I click the transfer to another pool radio button + And I press the "Continue" button + + Then I am on the select a court to transfer to page + + #do not select court or attendance date + When I press the "Continue" button + Then I see "Enter a court name or location" on the page + And I see "Enter a service start date" on the page + + #select court + When I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + + #input an invalid date + And I set attendance date to a date that doesn't exist + And I press the "Continue" button + Then I see "Enter a real start date" on the page + + #input a date prior to original service start date + When I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + And I set attendance date to "-5" Mondays in the future + And I press the "Continue" button + Then I see "You cannot enter a date that’s earlier than the original service start date" on the page + + #select court and valid attendance date + When I set input field with "ID" of "courtNameOrLocation" to "774" + And I click on the "Welshpool (774)" link + And I set attendance date to "4" Mondays in the future + And I press the "Continue" button + + Then I see "Transfer to Welshpool (774)" on the page + When I click on the "Cancel" link + Then I am on the Juror Record for juror "<part_no>" + + Examples: + | user | part_no | pool_no | + | MODTESTCOURT | 641500215 | 415171103 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: JM-4302 - Transfer a juror to another court - Non-Satellite courts + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "7 mondays time" new schema + + And I log in as "<user>" + + Given a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + When the user searches for juror record "<part_no>" from the global search bar + + #record happy path paper summons + And I record a happy path paper summons response + + #skip straight through processing + Then I see "Do you want to process this summons reply as responded now?" on the page + Then I see "The juror’s answers mean this is a straight-through reply. So you can process it as responded now, or return later." on the page + When I click on the "No, skip and process later" link + + #cannot transfer when status is summoned + When I click on the "View juror's record" link + And I click the update juror record button + And I do not see "Transfer to another court" on the page + And I click on the "Cancel" link + + #process response + Then I click on the "Summons reply" link + And I click on the "View summons reply" link + And I click the process reply button + And I mark the reply as responded + And I press the "Continue" button + And I click the checkbox to mark the reply as responded + And I press the "Confirm" button + + #now transfer + When the user searches for juror record "<part_no>" from the global search bar + + And I click the update juror record button + + And I click the transfer to another pool radio button + And I press the "Continue" button + + Then I am on the select a court to transfer to page + + #check satellite court selections + When I set the court or location to "415" + And I see "Chester (415)" in the dropdown box + When I set the court or location to "774" + And I see "Welshpool (774)" in the dropdown box + + #check NON-SATELLITE court selections + When I set the court or location to "420" + And I see "Doncaster (420)" in the dropdown box + + When I set the court or location to "794" + And I see "Wimbledon (794)" in the dropdown box + + When I set the court or location to "430" + And I see "Leicester (430)" in the dropdown box + + When I set the court or location to "756" + And I see "Carmarthen (756)" in the dropdown box + + When I set the court or location to "799" + And I see "Hove (799)" in the dropdown box + + When I set the court or location to "412" + And I click on the "Carlisle (412)" link + + And I set attendance date to "4" Mondays in the future + And I press the "Continue" button + + Then I see "Transfer to Carlisle (412)" on the page + When I press the "Continue" button + + Then I am on the Juror Record for juror "<part_no>" + And I see the juror status on the juror record screen has updated to "Transferred" + And I see "Juror record updated: juror transferred to Carlisle (412)" on the page + + Examples: + | user | part_no | pool_no | + | MODTESTCOURT | 641500859 | 415171103 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4001-4002-BUREAU-Allocate-From-Deferral-Maintenance.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4001-4002-BUREAU-Allocate-From-Deferral-Maintenance.feature new file mode 100644 index 00000000..f54b3e34 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4001-4002-BUREAU-Allocate-From-Deferral-Maintenance.feature @@ -0,0 +1,184 @@ +Feature: JM-4001 and JM-4002 - Bureau User + + Background: + + #needs to stay in single thread pack + + Given I am on "Bureau" "test" + Given "3" new pool's are inserted for court "415" with owner "400" and a deferral date "1" Mondays in the future new schema + + #reset data + Then juror "041500000" has "LAST_NAME" as "TESTNAME" new schema + Then juror "041500001" has "LAST_NAME" as "TESTNAME" new schema + Then juror "041500002" has "LAST_NAME" as "TESTNAME" new schema + Then juror "041500000" has "FIRST_NAME" as "0FNAME0" new schema + Then juror "041500001" has "FIRST_NAME" as "0FNAME1" new schema + Then juror "041500002" has "FIRST_NAME" as "0FNAME2" new schema + + And I log in as "MODTESTBUREAU" + When I navigate to the pool request screen + And I click on deferral maintenance + Then I see "Enter court name or location code" on the page + + #select court + When I set input field with "ID" of "courtNameOrLocationCode" to "CHESTER" + And I click on the "Chester (415)" link + And I press the "Find" button + + #navigate to the deferral maintenance screen for selected court + Then I am taken to the deferral maintenance screen for the selected court "Chester (415)" + And The deferrals table is displayed + When I set the deferral deferred to filter to "1" Mondays in the future + And I filter on name "TESTNAME" + And I press the Juror number table header + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + + @JurorTransformationWIP @JM-5873 + Scenario: Happy path to allocate one juror to a pool from deferral maintenance + + #needs to stay in single thread pack + + #select juror deferral to add to active pool + When I select juror "041500000" from the deferrals table + And I press the "Add to a pool" button + Then I see "Choose an active pool to add selected jurors to" on the page + And I select pool "415111111" from the active pools table + And I press the "Continue" button + Then I see "Selected jurors added to pool 415111111" on the page + + @JurorTransformationWIP @JM-5873 + Scenario: Happy path to allocate multiple juror to a pool from deferral maintenance + + #needs to stay in single thread pack + + #select juror's deferral to add to active pool + When I select juror "041500000" from the deferrals table + When I select juror "041500001" from the deferrals table + And I press the "Add to a pool" button + Then I see "Choose an active pool to add selected jurors to" on the page + And I select pool "415111111" from the active pools table + And I press the "Continue" button + Then I see "Selected jurors added to pool 415111111" on the page + + @JurorTransformationWIP @JM-5873 + Scenario: Test to change selected court while on deferral maintenance + + #needs to stay in single thread pack + + #select juror deferral to add to active pool + Given "1" new pool's are inserted for court "416" with owner "400" and a deferral date "1" Mondays in the future + #select court + When I set input field with "ID" of "courtNameOrLocationCode" to "CHICHESTER" + And I click on the "Chichester (416)" link + And I press the "Find" button + Then I am taken to the deferral maintenance screen for the selected court "Lewes Sitting At Chichester (416)" + And The deferrals table is displayed + When I press the "Juror number" button + And The first deferral in the table is "041600000, 0FNAME0, TESTNAME, 416000000" with a deferral date "1" Mondays in the future + + @JurorTransformationWIP @JM-5873 + Scenario: Test to check sort functionality on deferral maintenance page + + #needs to stay in single thread pack + + #sort by Juror number (descending) + When I press the "Juror number" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + #sort by First name (ascending) + When I press the "First name" button + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + #sort by First name (descending) + When I press the "First name" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + + #sort by Pool number (ascending) + When I press the "Pool number" button + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + #sort by Pool number (descending) + When I press the "Pool number" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + #sort by Deferred to (ascending) + When I press the "Deferred to" button + + Then The first deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + #sort by Deferred to (descending) + When I press the "Deferred to" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + #change data + Then juror "041500000" has "LNAME" as "TESTNAMEA" new schema + Then juror "041500001" has "LNAME" as "TESTNAMEB" new schema + Then juror "041500002" has "LNAME" as "TESTNAMEC" new schema + Then juror "041500000" has "FNAME" as "TESTFNAME" new schema + Then juror "041500001" has "FNAME" as "TESTFNAME" new schema + Then juror "041500002" has "FNAME" as "TESTFNAME" new schema + + #refresh def maintenance results set as the data has been updated + And I click on deferral maintenance + + #select court + When I set input field with "ID" of "courtNameOrLocationCode" to "CHESTER" + And I click on the "Chester (415)" link + And I press the "Find" button + + When I set the "last name" deferral filter to "TESTNAMEC" + Then The first deferral in the table is "041500002, TESTFNAME, TESTNAMEC, 415000002" with a deferral date "1" Mondays in the future + + #clear filter + And I set the "first name" deferral filter to "TESTFNAME" + + #sort by Last name (ascending) + When I press the "Last name" button + Then The first deferral in the table is "041500000, TESTFNAME, TESTNAMEA, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, TESTFNAME, TESTNAMEC, 415000002" with a deferral date "1" Mondays in the future + #sort by Last name (descending) + When I press the "Last name" button + Then Row "3" from last deferral in the table is "041500002, TESTFNAME, TESTNAMEC, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, TESTFNAME, TESTNAMEA, 415000000" with a deferral date "1" Mondays in the future + + @JurorTransformationWIP @JM-5873 + Scenario: Test to check filter functionality on deferral maintenance page + + #needs to stay in single thread pack + + #apply Juror number filter + When I set the "juror number" deferral filter to "041500001" + Then The first deferral in the table is "041500001, 0FNAME1, TESTNAME, 415000001" with a deferral date "1" Mondays in the future + #apply First name filter + When I set the "first name" deferral filter to "0FNAME1" + Then The first deferral in the table is "041500001, 0FNAME1, TESTNAME, 415000001" with a deferral date "1" Mondays in the future + + #apply Deferred to filter + When I set the deferral deferred to filter to "1" Mondays in the future + And I press the "Juror number" button + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + + #apply NON_EXISTENT Juror number filter + When I set the "juror number" deferral filter to "000000000" + Then I see "There are no results to display" on the page + + @JurorTransformationWIP @JM-5873 + Scenario: Test to check juror number hyperlink on deferral maintenance page + + #needs to stay in single thread pack + + #navigate to juror record from juror number hyperlink + When I click on the "041500000" link + Then I am on the Juror Record for juror "041500000" + + @JurorTransformationWIP @JM-5873 + Scenario: Test to check error for empty court search + + #needs to stay in single thread pack + + #dont select a court and press find button + And I press the "Find" button + Then I see "Enter a court name or location code" on the page \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4001-4002-COURT-Allocate-From-Deferral-Maintenance.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4001-4002-COURT-Allocate-From-Deferral-Maintenance.feature new file mode 100644 index 00000000..07e2c73f --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4001-4002-COURT-Allocate-From-Deferral-Maintenance.feature @@ -0,0 +1,150 @@ +Feature: JM-4001 and JM-4002 - Court User + + Background: + + #needs to stay in single thread pack + + Given I am on "Bureau" "test" + Given "3" new pool's are inserted for court "415" with owner "415" and a deferral date "1" Mondays in the future new schema + + #reset data + Then juror "041500000" has "LAST_NAME" as "TESTNAME" new schema + Then juror "041500001" has "LAST_NAME" as "TESTNAME" new schema + Then juror "041500002" has "LAST_NAME" as "TESTNAME" new schema + Then juror "041500000" has "FIRST_NAME" as "0FNAME0" new schema + Then juror "041500001" has "FIRST_NAME" as "0FNAME1" new schema + Then juror "041500002" has "FIRST_NAME" as "0FNAME2" new schema + + And I log in as "MODTESTCOURT" + When I navigate to the pool request screen + And I click on deferral maintenance + + And I record an excusal request paper summons response + + + And I set the deferral deferred to filter to "1" Mondays in the future + And I filter on name "TESTNAME" + And I press the "Juror number" button + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + + @JurorTransformation + Scenario: Happy path to allocate one juror to a pool from deferral maintenance + + #needs to stay in single thread pack + + #select juror deferral to add to active pool + When I select juror "041500000" from the deferrals table + And I press the "Add to a pool" button + Then I see "Choose an active pool to add selected jurors to" on the page + And I select pool "415111111" from the active pools table + And I press the "Continue" button + Then I see "Selected jurors added to pool 415111111" on the page + + @JurorTransformation + Scenario: Happy path to allocate multiple juror to a pool from deferral maintenance + + #needs to stay in single thread pack + + #select juror's deferral to add to active pool + When I select juror "041500000" from the deferrals table + When I select juror "041500001" from the deferrals table + And I press the "Add to a pool" button + Then I see "Choose an active pool to add selected jurors to" on the page + And I press the "Continue" button + And I see error "Choose an active pool to add selected jurors to" + And I select pool "415111111" from the active pools table + And I press the "Continue" button + Then I see "Selected jurors added to pool 415111111" on the page + + @JurorTransformation + Scenario: Test to check sort functionality on deferral maintenance page + + #needs to stay in single thread pack + + #sort by Juror number (descending) + When I press the "Juror number" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + #sort by First name (ascending) + When I press the "First name" button + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + #sort by First name (descending) + When I press the "First name" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + + #sort by Pool number (ascending) + When I press the "Pool number" button + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + #sort by Pool number (descending) + When I press the "Pool number" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + #sort by Deferred to (ascending) + When I press the "Deferred to" button + Then Row "3" from last deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + #sort by Deferred to (descending) + When I press the "Deferred to" button + Then The first deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + + #change data + Then juror "041500000" has "LAST_NAME" as "TESTNAMEA" new schema + Then juror "041500001" has "LAST_NAME" as "TESTNAMEB" new schema + Then juror "041500002" has "LAST_NAME" as "TESTNAMEC" new schema + Then juror "041500000" has "FIRST_NAME" as "TESTFNAME" new schema + Then juror "041500001" has "FIRST_NAME" as "TESTFNAME" new schema + Then juror "041500002" has "FIRST_NAME" as "TESTFNAME" new schema + + #refresh def maintenance results set as the data has been updated + And I click on deferral maintenance + + #clear filter + And I set the "first name" deferral filter to "TESTFNAME" + + #sort by Last name (ascending) + When I press the "Last name" button + Then The first deferral in the table is "041500000, TESTFNAME, TESTNAMEA, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, TESTFNAME, TESTNAMEC, 415000002" with a deferral date "1" Mondays in the future + #sort by Last name (descending) + When I press the "Last name" button + Then Row "3" from last deferral in the table is "041500002, TESTFNAME, TESTNAMEC, 415000002" with a deferral date "1" Mondays in the future + And The last deferral in the table is "041500000, TESTFNAME, TESTNAMEA, 415000000" with a deferral date "1" Mondays in the future + + @JurorTransformation + Scenario: Test to check filter functionality on deferral maintenance page + + #needs to stay in single thread pack + + #apply Juror number filter + When I set the "juror number" deferral filter to "041500001" + Then The first deferral in the table is "041500001, 0FNAME1, TESTNAME, 415000001" with a deferral date "1" Mondays in the future + #apply First name filter + When I set the "first name" deferral filter to "0FNAME1" + Then The first deferral in the table is "041500001, 0FNAME1, TESTNAME, 415000001" with a deferral date "1" Mondays in the future + #apply Last name filter + When I set the "last name" deferral filter to "TESTNAME" + Then The first deferral in the table is "041500001, 0FNAME1, TESTNAME, 415000001" with a deferral date "1" Mondays in the future + + #apply Deferred to filter + When I set the deferral deferred to filter to "1" Mondays in the future + And I press the "Juror number" button + Then The first deferral in the table is "041500000, 0FNAME0, TESTNAME, 415000000" with a deferral date "1" Mondays in the future + And Row "3" deferral in the table is "041500002, 0FNAME2, TESTNAME, 415000002" with a deferral date "1" Mondays in the future + + #apply NON_EXISTENT Juror number filter + When I set the "juror number" deferral filter to "000000000" + Then I see "There are no results to display" on the page + + @JurorTransformation + Scenario: Test to check juror number hyperlink on deferral maintenance page + + #needs to stay in single thread pack + + #navigate to juror record from juror number hyperlink + When I click on the "041500000" link + Then I am on the Juror Record for juror "041500000" diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4103.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4103.feature new file mode 100644 index 00000000..0e303498 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4103.feature @@ -0,0 +1,168 @@ +Feature: JM-4103 + + @JurorTransformationWIP @NewSchemaConverted @JM-5923 + Scenario Outline: Transfer a juror to another court as a jury officer - Pool Record - Bulk + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + | <part_no2> |<pool_no> | 400 | + | <part_no3> |<pool_no> | 400 | + | <part_no4> |<pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And "<part_no2>" has "NEXT_DATE" as "5 mondays time" new schema + And "<part_no3>" has "NEXT_DATE" as "5 mondays time" new schema + And "<part_no4>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + |<part_no2> | <pool_no> | 415 | + |<part_no3> | <pool_no> | 415 | + |<part_no4> | <pool_no> | 415 | + + And I log in as "<user>" + + When I navigate to the pool request screen + And I click on active pools + And I click on the "At court" link + When I navigate to the active pool "415171002" overview + And I select the checkbox in the same row as "<part_no>" in pool table + And I select the checkbox in the same row as "<part_no2>" in pool table + And I select the checkbox in the same row as "<part_no3>" in pool table + And I select the checkbox in the same row as "<part_no4>" in pool table + And I see "4 of selected" on the page + + #transfer + And I press the "Transfer" button + Then I see "Select a court to transfer to" on the page + And I set "Enter a court name or location code" to "416" + And I set the "Change the service start date for this pool" single date field to a Monday "5" weeks in the future + And I press the "Continue" button + And I see "Transfer to Lewes Sitting At Chichester" on the page + And I press the "Continue" button + And I see "4 jurors transferred" on the page + + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + When the user searches for juror record "<part_no>" from the global search bar + And I click on "<part_no>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + + When the user searches for juror record "<part_no2>" from the global search bar + And I click on "<part_no2>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + + When the user searches for juror record "<part_no3>" from the global search bar + And I click on "<part_no3>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + + When the user searches for juror record "<part_no4>" from the global search bar + And I click on "<part_no4>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + + Examples: + | user | pool_no | part_no | part_no2 | part_no3 | part_no4 | + | MODTESTCOURT | 415171002 | 641500205| 641500858 | 641500865 | 641500754 | + + + @JurorTransformationWIP @NewSchemaConverted @JM-5923 + Scenario Outline: Transfer a juror to another court as a jury officer - Pool Record - Single + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + + And I log in as "<user>" + + When I navigate to the pool request screen + And I click on active pools + And I click on the "At court" link + When I navigate to the active pool "415171002" overview + And I select the checkbox in the same row as "<part_no>" in pool table + And I see "1 of selected" on the page + + #transfer + And I press the "Transfer" button + Then I see "Select a court to transfer to" on the page + And I set "Enter a court name or location code" to "416" + And I set the "Change the service start date for this pool" single date field to a Monday "5" weeks in the future + And I press the "Continue" button + And I see "Transfer to Lewes Sitting At Chichester" on the page + And I press the "Continue" button + And I see "1 juror transferred" on the page + + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + When the user searches for juror record "<part_no>" from the global search bar + And I click on "<part_no>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + + + Examples: + | user | pool_no | part_no | + | MODTESTCOURT | 415171002 | 641500454| + + + @JurorTransformationWIP @JM-5923 @NewSchemaConverted + Scenario Outline: Transfer a juror to another court as a jury officer - Pool Record - Select All + + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + |<part_no_2> | <pool_no> | 400 | + |<part_no_3> | <pool_no> | 400 | + + + And "<part_no>" has "NEXT_DATE" as "5 mondays time" new schema + And "<part_no_2>" has "NEXT_DATE" as "5 mondays time" new schema + And "<part_no_3>" has "NEXT_DATE" as "5 mondays time" new schema + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 415 | + |<part_no_2> | <pool_no> | 415 | + |<part_no_3> | <pool_no> | 415 | + + And I log in as "<user>" + + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "415180901" + And I press the "Continue" button + And I check the select all checkbox + + #transfer + And I press the "Transfer" button + Then I see "Select a court to transfer to" on the page + And I set "Enter a court name or location code" to "416" + And I set the "Change the service start date for this pool" single date field to a Monday "20" weeks in the future + And I press the "Continue" button + And I press the "Continue and move remaining jurors" button + + #checking juror has been transferred + Given I am on "Bureau" "postgres" + And I log in as "MODTESTBUREAU" + When the user searches for juror record "<part_no>" from the global search bar + And I click on "<part_no>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + And I see the court name on the juror record screen is "The Crown Court At Chichester" + + Examples: + | user | pool_no | part_no | part_no_2 |part_no_3 | + | MODTESTCOURT | 415180901 | 641500279| 641500939 | 641500851 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4358-BUREAU-reassign warnings.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4358-BUREAU-reassign warnings.feature new file mode 100644 index 00000000..96d36fc4 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4358-BUREAU-reassign warnings.feature @@ -0,0 +1,192 @@ +Feature: JM-4358 + + @JurorTransformation @NewSchemaConverted + Scenario Outline: Reassign a juror Bureau User - warning cannot be reassigned when status not 1 or 2 + + Given I am on "Bureau" "test" + And the new pool for court "415" with multiple statuses is deleted new schema + And the voter record for "641591101" is deleted new schema + And the voter record for "641591102" is deleted new schema + And the voter record for "641591103" is deleted new schema + And the voter record for "641591104" is deleted new schema + And the voter record for "641591105" is deleted new schema + And the voter record for "641591106" is deleted new schema + And the voter record for "641591107" is deleted new schema + And the voter record for "641591108" is deleted new schema + And the voter record for "641591109" is deleted new schema + And a new active pool is inserted for court "415" with multi statuses new schema + And jurors are inserted into active pool "415" with multi statuses new schema + And I log in as "<user>" + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + + #Reassign Execused juror + And I check the juror "641591105" checkbox + Then I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + And I verify reassign error message with the text "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." + + #Reassign Disqualified juror + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "641591106" checkbox + And I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + Then I verify reassign error message with the text "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." + + #Reassign Deferred juror + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "641591107" checkbox + And I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + Then I verify reassign error message with the text "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." + + #Reassign Reassigned juror + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "641591108" checkbox + And I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + Then I verify reassign error message with the text "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." + + #Reassign Undeliverable juror + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "641591109" checkbox + And I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + Then I verify reassign error message with the text "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." + + #Reassign Completed juror + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "641591113" checkbox + And I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + Then I verify reassign error message with the text "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." + + #Reassign Summoned juror + #Failure the below step due to bug ticket-JM-5573 + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "641591101" checkbox + And I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + Then I see "1 jurors reassigned to pool" on the page + + #Reassign Responded juror + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "641591102" checkbox + And I press the "Reassign" button + And I select one of the active pools available + And I press the "Continue" button + Then I see "1 jurors reassigned to pool" on the page + + Examples: + |pool_no | user | + |415911911 | MODTESTBUREAU | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Reassign a juror Bureau User - warning cannot be reassigned when juror will be over 75 + Given I am on "Bureau" "test" + + #And new pool requests are deleted new schema + And the new pool for court "415" is deleted new schema + And the voter record for "941599999" is deleted new schema + And the voter record for "941599998" is deleted new schema + And a new active pool is inserted for court "415" new schema + And jurors are inserted into active pool "415" new schema + And I log in as "<user>" + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + And I set input field with "ID" of "courtNameOrLocation" to "CHESTER" + And I click on the "Chester (415)" link + And I press the "Continue" button + + #complete new pool fields + And I set the radio button to "Civil" + And I set "Number of jurors required in total" to "150" + And I press the "Continue" button + + #check pool number + And I see the pool number of the pool + + #Request Pool + And I submit the pool request + + #Search for Pool + And I navigate to the pool search screen + When I enter the pool number of the pool I have just created on the pool search screen + And I press the "Continue" button + Then I press the "Summon jurors" button + And I set "Citizens to summon" to "5" + And I press the "Create pool and summon citizens" button + When I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_number>" + And I press the "Continue" button + And I check the juror "941599999" checkbox + And I click on "941599999" in the same row as "941599999" + And I click on the "Juror details" link + And I click on the "Add or change" link + And I change a date of birth of a juror that will make more than 75 years + Then I press the "Save" button + And I press the "Yes - disqualify juror" button + And I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_number>" + And I press the "Continue" button + And I check the juror "941599999" checkbox + When I press the "Reassign" button + + #Change court + And I select the newly created pool from the reassign page + And I press the "Continue" button + Then I verify reassign error message with the text "You can only move jurors with a responded or summoned status. The following jurors have a different status and cannot be moved." + + Examples: + |pool_number | user | + |415222222 | MODTESTBUREAU | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4365.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4365.feature new file mode 100644 index 00000000..bf4d1a35 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-4365.feature @@ -0,0 +1,201 @@ +Feature: JM-4365-As a jury officer I need to be able to check jurors out for their attendance on the day (BE) + + @JurorTransformationWIP @NewSchemaConverted @JM-6021 + Scenario Outline: Happy path to Check jurors out for their attendance on the day + + #return to single thread when fixed, not multi + + Given I am on "Bureau" "test" + When a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number_1> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + | 415 |<juror_number_4> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number_1> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + |<juror_number_4> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + #set juror as responded + And I update juror "<juror_number_1>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + And I update juror "<juror_number_3>" to have a status of responded in order to record attendance + And I update juror "<juror_number_4>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_1>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "11" + And I set "Minute" to "30" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "12" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_3>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "1" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_4>" to be checked in + When I press the "Check in juror" button + Then I see "<juror_number_1>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "11:30am" + And I see "<juror_number_3>" in the same row as "12:30pm" + And I see "<juror_number_4>" in the same row as "1:30pm" + And I am able to see and interact with the Record attendance tabs and fields + + #check out 4 jurors + And I set the radio button to "Check out" + And I set "Hour" to "4" + And I set "Minute" to "00" + And I select the checkout radio button to "pm" + And I input juror "<juror_number_1>" to be checked out + And I press the "Check out juror" button + And I set "Hour" to "5" + And I set "Minute" to "30" + And I select the checkout radio button to "pm" + And I input juror "<juror_number_2>" to be checked out + And I press the "Check out juror" button + And I set "Hour" to "6" + And I set "Minute" to "30" + And I select the checkout radio button to "pm" + And I input juror "<juror_number_3>" to be checked out + And I press the "Check out juror" button + And I set "Hour" to "7" + And I set "Minute" to "30" + And I select the checkout radio button to "pm" + And I input juror "<juror_number_4>" to be checked out + When I press the "Check out juror" button + And I refresh the page + Then I see "<juror_number_1>" in the same row as "4:00pm" + And I see "<juror_number_2>" in the same row as "5:30pm" + And I see "<juror_number_3>" in the same row as "6:30pm" + And I see "<juror_number_4>" in the same row as "7:30pm" + + #change link + When I click on "Change" in the same row as "<juror_number_1>" + And I am able to see and interact with the change time and fields for "fname lname" + Then I see "Save changes" on the page + And I see "Cancel" on the page + And I see "Delete attendance and mark as absent" on the page + And I set "Hour" to "10" + And I set "Minute" to "00" + And I set the radio button to "am" + And I set "check out" "Hour" to "8" + And I set "check out" "Minute" to "00" + And I select the checkout radio button to "pm" + And I press the "Save changes" button + #Below step will fail due to defect-JM-6021 + Then I see "10:00am" in the same row as "<juror_number_1>" + Then I see "8:00pm" in the same row as "<juror_number_1>" + + #delete attendance + When I click on "Change" in the same row as "<juror_number_1>" + And I click on the "Delete attendance and mark as absent" link + Then I see "Are you sure you want to delete attendance for fname lname?" on the page + And I see "Yes - delete" on the page + And I see "Cancel" on the page + When I press the "Yes - delete" button + Then I do not see "<juror_number_1>" on the page + + Examples: + |user |juror_number_1 | juror_number_2 | juror_number_3 |juror_number_4 | pool_number | trial_number | + |MODTESTCOURT |041530007 | 041530008 |041530009 | 041530010 | 415300301 | T202495832 | + + + @JurorTransformation @NewSchemaConverted + Scenario Outline: To confirm all the jurors attendance on the day + + Given I am on "Bureau" "test" + When a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number_1> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + | 415 |<juror_number_4> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number_1> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + |<juror_number_4> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + #set juror as responded + And I update juror "<juror_number_1>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + And I update juror "<juror_number_3>" to have a status of responded in order to record attendance + And I update juror "<juror_number_4>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_1>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "11" + And I set "Minute" to "30" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "12" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_3>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "1" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_4>" to be checked in + When I press the "Check in juror" button + Then I see "<juror_number_1>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "11:30am" + And I see "<juror_number_3>" in the same row as "12:30pm" + And I see "<juror_number_4>" in the same row as "1:30pm" + + #Confirm all the attendence + When I press the "Confirm attendance" button + Then I see "Some jurors have not been checked out" on the page + And The system shall display the non editable details on the Confirm attendance screen + And I press the "Continue" button + And I see error "Enter a check out time" + And I set "Hour" to "05" + And I set "Minute" to "00" + And I set the radio button to "pm" + When I press the "Continue" button + Then I see "Confirm attendance list" on the page + And I see "jurors attended court today" on the page + And I see "jurors were due to attend today but were not checked in" on the page + And I see "Confirm attendance list is correct" on the page + And I see "Back to attendance list" on the page + When I press the "Confirm attendance list is correct" button + Then I do not see "Confirm attendence " on the page + And I do not see " Change" on the page + And I do not see "Check in" on the page + And I do not see "Check out" on the page + And I am able to see and interact with the Record attendance confirmation screen + + Examples: + |user |juror_number_1 | juror_number_2 | juror_number_3 |juror_number_4 | pool_number | trial_number | + |MODTESTCOURT |041530007 | 041530008 |041530009 | 041530010 | 415300301 | T202495832 | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5039.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5039.feature new file mode 100644 index 00000000..6399f840 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5039.feature @@ -0,0 +1,72 @@ +Feature: JM-5039 + + @JurorTransformationWIP @NewSchemaConverted @JM-5923 + Scenario Outline: Transfer a juror to another court as a jury officer - Pool Record - Unhappy Path + + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number1> | <pool_number> | 5 | 400 | + | 415 |<juror_number2> | <pool_number> | 5 | 400 | + | 415 |<juror_number3> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number1> | <pool_number> | 415 | + |<juror_number2> | <pool_number> | 415 | + |<juror_number3> | <pool_number> | 415 | + + And I log in as "<user>" + + When I navigate to the pool request screen + And I click on active pools + And I click on the "At court" link + When I navigate to the active pool "<pool_number>" overview + And I select the checkbox in the same row as "<juror_number1>" in pool table + And I select the checkbox in the same row as "<juror_number2>" in pool table + And I select the checkbox in the same row as "<juror_number3>" in pool table + And I see "3 of selected" on the page + + And I press the "Transfer" button + Then I see "Select a court to transfer to" on the page + + #error check + And I press the "Continue" button + And I see error "Enter a court name or location code to transfer to" + And I see error "Enter a transfer date in the correct format, for example, 31/01/2023" + Then I set input field with "ID" of "courtNameOrLocation" to "416" + And I click on the "Lewes Sitting At Chichester (416)" link + And I set the "Change the service start date for this pool" single date field to a Monday "60" weeks in the future + + And I press the "Continue" button + And I see error "Service start date must be within the next 12 months" + + #transfer to another court + Then I set input field with "ID" of "courtNameOrLocation" to "416" + And I click on the "Lewes Sitting At Chichester (416)" link + + And I set the "Change the service start date for this pool" single date field to a Monday "5" weeks in the future + And I press the "Continue" button + And I see "Transfer to Lewes Sitting At Chichester" on the page + And I press the "Continue" button + And I see "3 jurors transferred" on the page + + Given I am on "Bureau" "test" + And I log in as "MODTESTBUREAU" + + #search jurors have been transferred + When the user searches for juror record "<juror_number1>" from the global search bar + And I click on "<juror_number1>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + + When the user searches for juror record "<juror_number2>" from the global search bar + And I click on "<juror_number2>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + + When the user searches for juror record "<juror_number3>" from the global search bar + And I click on "<juror_number3>" in the same row as "Lewes Sitting At Chichester" + And I see the juror status has updated to "Responded" + Examples: + | user | pool_number| juror_number1 | juror_number2 | juror_number3 | + | MODTESTCOURT | 010000004 | 011000004 | 011000005 | 011000006 | diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5054- juryOfficerReturnRemovingPanelmember.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5054- juryOfficerReturnRemovingPanelmember.feature new file mode 100644 index 00000000..0128aa32 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5054- juryOfficerReturnRemovingPanelmember.feature @@ -0,0 +1,183 @@ +Feature: JM-5054-As a jury officer I need to be able to return jurors from a trial to jurors in waiting (FE) + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Happy path to create a trial and generate Panel and return all the jurors + + Given I am on "Bureau" "test" + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number_1> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + | 415 |<juror_number_4> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number_1> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + |<juror_number_4> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + #set juror as responded + And I update juror "<juror_number_1>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + And I update juror "<juror_number_3>" to have a status of responded in order to record attendance + And I update juror "<juror_number_4>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_1>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "11" + And I set "Minute" to "30" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "12" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_3>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "1" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_4>" to be checked in + When I press the "Check in juror" button + Then I see "<juror_number_1>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "11:30am" + And I see "<juror_number_3>" in the same row as "12:30pm" + And I see "<juror_number_4>" in the same row as "1:30pm" + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" from the search results + When I press the "Generate panel" button + Then I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + When I press the "Continue" button + Then I see error "Select which group of jurors you want to generate a panel from" + And I see error "Enter how many jurors are needed on this panel" + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "4" + When I press the "Continue" button + + #see my jurors are panelled and verify label text + Then I see "Print panel list" on the page + And I see "Print ballot cards" on the page + And I see "Empanel jury" on the page + And I see "End trial" on the page + And I am able to see and interact with the trial management tabs and fields + And I press the "Return panel members" button + And I see error "Select at least one panel member to return" + And I check the juror "041530001" checkbox + And I check the juror "041530002" checkbox + And I check the juror "041530003" checkbox + And I check the juror "041530004" checkbox + When I press the "Return panel members" button + Then I verify the text "You're returning 4 panel members to the list of jurors in waiting." on the page + And I see "Cancel" on the page + When I press the "Return" button + Then I verify the banner message "4 jurors returned" on the page + + + Examples: + |user |juror_number_1 | juror_number_2 | juror_number_3 |juror_number_4 | pool_number | trial_number | + |MODTESTCOURT |041530001 | 041530002 |041530003 | 041530004 | 415300301 | T202495832 | + + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Create a trial and generate Panel and return partial jurors + + Given I am on "Bureau" "test" + When a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | 415 |<juror_number_1> | <pool_number> | 5 | 400 | + | 415 |<juror_number_2> | <pool_number> | 5 | 400 | + | 415 |<juror_number_3> | <pool_number> | 5 | 400 | + | 415 |<juror_number_4> | <pool_number> | 5 | 400 | + + Then a new pool is inserted for where record has transferred to the court new schema + |part_no | pool_no | owner | + |<juror_number_1> | <pool_number> | 415 | + |<juror_number_2> | <pool_number> | 415 | + |<juror_number_3> | <pool_number> | 415 | + |<juror_number_4> | <pool_number> | 415 | + + And a new trial is inserted with the trial number "<trial_number>" + And I log in as "<user>" + + #set juror as responded + And I update juror "<juror_number_1>" to have a status of responded in order to record attendance + And I update juror "<juror_number_2>" to have a status of responded in order to record attendance + And I update juror "<juror_number_3>" to have a status of responded in order to record attendance + And I update juror "<juror_number_4>" to have a status of responded in order to record attendance + + #check in jurors + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + And I set the radio button to "Check in" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number_1>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "11" + And I set "Minute" to "30" + And I set the radio button to "am" + And I input juror "<juror_number_2>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "12" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_3>" to be checked in + And I press the "Check in juror" button + And I set "Hour" to "1" + And I set "Minute" to "30" + And I set the radio button to "pm" + And I input juror "<juror_number_4>" to be checked in + When I press the "Check in juror" button + Then I see "<juror_number_1>" in the same row as "9:00am" + And I see "<juror_number_2>" in the same row as "11:30am" + And I see "<juror_number_3>" in the same row as "12:30pm" + And I see "<juror_number_4>" in the same row as "1:30pm" + And I press the "Apps" button + And I click on the "Trial management" link + And I click on the "<trial_number>" from the search results + And I press the "Generate panel" button + And I see "Generate a panel" on the page + And I see "Which jurors do you want to generate a panel from?" on the page + And I press the "Continue" button + And I see error "Select which group of jurors you want to generate a panel from" + And I see error "Enter how many jurors are needed on this panel" + And I set the radio button to "All available jurors" + And I set "Number of jurors needed on this panel" to "4" + When I press the "Continue" button + + #see my jurors are panelled and verify label text + Then I see "Print panel list" on the page + And I see "Print ballot cards" on the page + And I see "Empanel jury" on the page + And I see "End trial" on the page + And I am able to see and interact with the trial management tabs and fields + When I press the "Return panel members" button + Then I see error "Select at least one panel member to return" + And I check the juror "<juror_number_1>" checkbox + And I check the juror "<juror_number_3>" checkbox + When I press the "Return panel members" button + Then I verify the text "You're returning 2 panel members to the list of jurors in waiting." on the page + And I see "Cancel" on the page + When I press the "Return" button + Then I verify the banner message "2 jurors returned" on the page + + Examples: + |user |juror_number_1 | juror_number_2 | juror_number_3 |juror_number_4 | pool_number | trial_number | + |MODTESTCOURT |041530011 | 041530012 |041530013 | 041530014 | 415300301 | T202495832 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5070-4362-ChangeAndConfirm-Jurors-AttendanceDate.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5070-4362-ChangeAndConfirm-Jurors-AttendanceDate.feature new file mode 100644 index 00000000..ffbdf1e2 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-5070-4362-ChangeAndConfirm-Jurors-AttendanceDate.feature @@ -0,0 +1,132 @@ +Feature: 1)JM-5070 As a jury officer I need to be able to change a jurors attendance date (FE) + 2)JM-4362 As a Jury officer I need to be able to confirm a jurors attendance (FE) + + @JurorTransformationWIP @newSchemaConverted @JM-5811 + Scenario Outline: Happy Path Test to create a new pool of jurors and change a jurors attendance date + + Given I am on "Bureau" "test" + When a new pool with "3" responded jurors is inserted for court "415" with owner "415" and attendance date of today new schema + And I log in as "<user>" + And I navigate to the pool request screen + And I click on active pools + And I click on the "Search" link + And I set "Pool number" to "<pool_no>" + And I press the "Continue" button + And I check the juror "<juror_number>" checkbox + And I press the "Change next due at court" button + And I enter a date "4" mondays in the future for the next due at court + And I press the "Continue" button + Then I verify confirmation text of jurors next due to attend "1 jurors will be next due to attend on:" on the page + And I verify button "Continue" on the page + + Examples: + |user |juror_number | pool_no | + |MODTESTCOURT |041500010 | 415333333 | + + + @JurorTransformationWIP @newSchemaConverted @JM-5791 @5874 + Scenario Outline: Happy Path Test to create a new pool of jurors and confirm jurors attendance date + + #needs to go into single threaded + + Given I am on "Bureau" "test" + And I Confirm all the data in the record attendance table is cleared + When a new pool with "3" responded jurors is inserted for court "415" with owner "415" and attendance date of today new schema + And I log in as "<user>" + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + Then I see "Record attendance" on the page + And I see "UNCONFIRMED" on the page + And I see "Check in" on the page + And I see "Check out" on the page + When I check the "Check in" checkbox + And I set the radio button to "Check in" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + Then I see "9:00am" in the same row as "<juror_number>" + + #Tap 'Record time’ from jurors search results + And I refresh the page + When I click on "Record time" in the same row as "<juror_number>" + And I set "Hour" to "08" + And I set "Minute" to "00" + And I select the checkout radio button to "pm" + And I press the "Check out juror" button + Then I see "<juror_number>" in the same row as "8:00pm" + And I am able to see and interact with the Record attendance tabs and fields + #Tap check out for single juror + + When I set the radio button to "Check out" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I select the checkout radio button to "pm" + And I input juror "<juror_number>" to be checked out + And I press the "Check out juror" button + # Then I see "<juror_number>" in the same row as "9:00pm" + + # press checkout all jurors + #Below step will fail due to defect-JM-5860 + + When I set the radio button to "Check out" + And I set "Hour" to "10" + And I set "Minute" to "00" + And I set the radio button to "pm" + And I input juror "<juror_number>" to be checked out + And I press the "Check out all juror" button + #And I see "<juror_number>" in the same row as "10:00pm" + + # change button to change the check in and check out time of a juror + When I click on "Change time" in the same row as "<juror_number>" + And I set "check in" "Hour" to "1l" + And I set "check in" "Minute" to "30" + And I set the radio button to "am" + And I set "check out" "Hour" to "7" + And I set "check out" "Minute" to "00" + And I set the radio button to "pm" + And I press the "Save changes" button + Then I see "11:30pm" in the same row as "<juror_number>" + And I see "7:00am" in the same row as "<juror_number>" + #confirm all attendences + When I press the "Confirm all attendences" button + And I press the "Confirm attendance list is correct" button + Then I see "CONFIRMED" on the page + + Examples: + |user |juror_number | pool_number | + |MODTESTCOURT |041500010 | 415333333 | + + @JurorTransformationWIP @newSchemaConverted @JM-5791 @JM-5883 @JM-5874 + Scenario Outline: create a new pool of jurors and verify attendance date for panel members + + Given I am on "Bureau" "test" + When a new pool with "3" responded jurors is inserted for court "415" with owner "415" and attendance date of today new schema + And I log in as "<user>" + And I press the "Apps" button + And I click on the "Juror management" link + And I click on the "Record attendance" link + Then I see "Record attendance" on the page + # Verify the result for panel members + When I set the radio button to "Check in" + And I set "Hour" to "09" + And I set "Minute" to "00" + And I set the radio button to "am" + And I input juror "<juror_number>" to be checked in + And I press the "Check in juror" button + Then I see "9:00am" in the same row as "<juror_number>" + When I set the radio button to "Check out" + And I set "Hour" to "10" + And I set "Minute" to "00" + And I set the radio button to "pm" + And I input juror "<juror_number>" to be checked out + #Test will fail due to defect JM-5883 JM-5874 + And I press the "Check out juror" button + Then I see "Do you want to check out panelled jurors too" on the page + + Examples: + |user |juror_number | pool_number | + |MODTESTCOURT |041500393 | 415333333 | + diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-666-pool_search.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-666-pool_search.feature new file mode 100644 index 00000000..cffd6f73 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/JM-666-pool_search.feature @@ -0,0 +1,308 @@ +Feature: JM-666 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for crown court pool by pool number + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I search for the pool + Then the pool is displayed + + Examples: + |part_no |pool_no |court|no_weeks| + |241599991|415999991 |415 |10 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for pool by pool number with matching location code + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I enter a location code of "<court>" for the pool search + And I search for the pool + Then the pool is displayed + + Examples: + |part_no |pool_no |court|no_weeks| + |241599992|415999992 |415 |10 | + + @JurorTransformation @NewSchemaConverted + Scenario: Test to search for pool by pool number with matching pool status + Given I am on "Bureau" "test" + Given the new pool for court "415" is deleted new schema + And I log in as "MODTESTCOURT" + And a new completed pool is inserted for court "415" new schema + And I navigate to the pool search screen + When I enter the pool number "415111111" on the pool search screen + And I expand the pool search advanced search criteria + And I select the Completed option in the advanced pool search section + And I search for the pool + Then the pool is displayed + + Given the new pool for court "415" is deleted new schema + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for pool by pool number with matching pool stage + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I expand the pool search advanced search criteria + And I select the At Court option in the advanced pool search section + And I search for the pool + Then the pool is displayed + + Examples: + |part_no |pool_no |court|no_weeks| + |641500600|415171109 |415 |10 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for a pool by pool number with matching pool type - Crown Court + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I expand the pool search advanced search criteria + And I select the Crown Court option in the advanced pool search section + And I search for the pool + Then the pool is displayed + + Examples: + |part_no |pool_no |court|no_weeks| + |241599994|415999994 |415 |10 | + + @JurorTransformation @NewSchemaConverted + Scenario: Creating a pool and searching for it using pool number and advanced search - Civil Court + Given I am on "Bureau" "test" + + And I log in as "MODTESTBUREAU" + + #delete pool + Given the new pool for court "415" is deleted new schema + + #Can see the pool request courts table tabs and fields + When I navigate to the pool request screen + + When I press the "Create pool" button + And I set the radio button to "Request new pool" + And I press the "Continue" button + Then I see "Select a court for this pool" on the page + + #select court + Then I set input field with "ID" of "courtNameOrLocation" to "CHESTER" + Then I click on the "Chester (415)" link + Then I press the "Continue" button + + #complete new pool fields + Then I set the radio button to "Civil" + And I set "Number of jurors required in total" to "150" + Then I press the "Continue" button + + #check pool number + And I see the pool number of the pool + + #Request Pool + And I submit the pool request + + #Search for Pool + And I navigate to the pool search screen + When I enter the pool number of the pool I have just created on the pool search screen + And I expand the pool search advanced search criteria + And I select the Civil Court option in the advanced pool search section + And I search for the pool + Then the pool is displayed + + Given the new pool for court "415" is deleted + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for pool by pool number with non matching date + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I set input field with "id" of "serviceStartDate" to "25/10/2022" + And I search for the pool + Then I see "There are no matching results" on the page + + Examples: + |part_no |pool_no |court|no_weeks| + |241599995|415999995 |415 |10 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for pool by pool number with non matching location code + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I enter a location code of "416" for the pool search + And I search for the pool + Then I see "There are no matching results" on the page + + Examples: + |part_no |pool_no |court|no_weeks| + |241599996|415999996 |415 |10 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for pool by pool number with non matching pool status + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I expand the pool search advanced search criteria + And I select the Requested option in the advanced pool search section + And I search for the pool + Then I see "There are no matching results" on the page + + Examples: + |part_no |pool_no |court|no_weeks| + |241599997|415999997 |415 |10 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for pool by pool number with non matching pool stage + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I expand the pool search advanced search criteria + And I select the With the Bureau option in the advanced pool search section + And I search for the pool + Then I see "There are no matching results" on the page + + Examples: + |part_no |pool_no |court|no_weeks| + |241599998|415999998 |415 |10 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to search for pool by pool number with non matching pool type + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + |<part_no> | <pool_no> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + |<court> | <pool_no> | <part_no> | <no_weeks> | + + And I navigate to the pool search screen + When I enter the pool number "<pool_no>" on the pool search screen + And I expand the pool search advanced search criteria + And I select the High Court option in the advanced pool search section + And I search for the pool + Then I see "There are no matching results" on the page + + Examples: + |part_no |pool_no |court|no_weeks| + |241599998|415999998 |415 |10 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to check previous advanced search criteria is retained + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed new schema + |part_no | pool_no | owner | + | <part_no> | <pool_no> | 400 | + | <part_no_2> | <pool_no_2> | 400 | + + And I log in as "MODTESTCOURT" + + And a new pool is inserted which is owned by the court and includes a deferred juror new schema + |owner | pool_no | part_no | no_weeks | + | <court> | <pool_no> | <part_no> | <no_weeks> | + | <court> | <pool_no_2> | <part_no_2> | <no_weeks> | + + And I navigate to the pool search screen + When I enter a location code of "<court>" for the pool search + And I expand the pool search advanced search criteria + And I select all the tick boxes in the advanced search section + And I search for the pool + Then the pool search results are found + And I expand the pool search advanced search criteria + And all the tick boxes in the advanced search section are still selected + + Examples: + | part_no | pool_no | part_no_2 | pool_no_2 | court | no_weeks | + | 241599909 | 415999909 | 641500407 | 415170601 | 415 | 10 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Modernisation/PoolManagement/MOD-Smoketest.feature b/src/test/resources/cucumber/features/Modernisation/PoolManagement/MOD-Smoketest.feature new file mode 100644 index 00000000..f2fe5dc1 --- /dev/null +++ b/src/test/resources/cucumber/features/Modernisation/PoolManagement/MOD-Smoketest.feature @@ -0,0 +1,40 @@ +Feature: MOD-Smoketest + + @Shakedown + Scenario Outline: Smoketest + Given I am on "bureau" "test" + Given I have cleared down the modernisation staff data new schema + Given I have created the modernisation staff data new schema + Given I delete pools created in the last 3 days new schema for court "415" + Given I delete pools created in the last 3 days new schema for court "416" + Given I delete pools created in the last 3 days new schema for court "471" + Given I delete pools created in the last 3 days new schema for court "457" + Given I delete trials data + Given I delete appearances data + Given I refresh the voters table for court "452" new schema + Given I refresh the voters table for court "457" new schema + Given I refresh the voters table for court "471" new schema + Given I refresh the voters table for court "415" new schema + And voters for court "471" have been updated to postcode "CH2 2AN" new schema + And voters for court "415" have been updated to postcode "CH2 2AN" new schema + And voters for court "457" have been updated to postcode "SA1 4PF" new schema + + And I log in as "<user>" + + # Can see the pool request courts table tabs and fields + + When I navigate to the pool request screen + + And I see "Active pools" on the page + Then I see link with text "Pool requests" + And I see link with text "Active pools" + And I see link with text "Deferral maintenance" + And I see link with text "Search" + + Then I set input field with "ID" of "courtNameOrLocation" to "457" + And I see "Swansea (457)" on the page + Then I click on the "Swansea" link + + Examples: + | user | + | MODTESTBUREAU | diff --git a/src/test/resources/cucumber/features/RA_CharCounters_AllPaths.feature b/src/test/resources/cucumber/features/RA_CharCounters_AllPaths.feature new file mode 100644 index 00000000..4b0b05e1 --- /dev/null +++ b/src/test/resources/cucumber/features/RA_CharCounters_AllPaths.feature @@ -0,0 +1,693 @@ +Feature: RA_CharCounters_AllPaths + +@Regression @JDB-3611 +Scenario Outline: English 1st RA Char Counter + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check address + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email details + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency Yes + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail no + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 1 no + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 no + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + + When I check the "Other" checkbox + And I set "Provide details" to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful te" + + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers + +# When I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful te" in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your Jury Service?" +# And I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful te" in the same row as "Please tell us about any special arrangements or help you need while you're doing jury service" + + #When I press the "Submit" button + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + | part_no |last_name |postcode |email |pool_no | + |641500410 |DOE |SW1H 9AJ |email@outlook.com |415170401 | + +@Regression @JDB-3611 +Scenario Outline: English 3rd RA Char Counter + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #JDB-3455 Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #JDB-3373 + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3371 + + Then I see "Is the person currently on bail for a criminal offence?" on the page + + #Bail + + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #JDB-3370 + + Then I see "Has the person been found guilty of a criminal offence?" on the page + + #Convictions + + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #The person can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "Yes" + And I set "Tell us about any special arrangements or help the person you're answering for needs while they're doing jury service." to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." + + When I check the "Other" checkbox + And I set "Provide details" to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." + + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers + +# When I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." in the same row as "Does the person have a disability or impairment that means they'll need extra support or facilities in the court building where they are doing jury service?" +# And I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." in the same row as "Please tell us about any special arrangements or help the person you're answering for needs while they're doing jury service" + And I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent an email to say you have replied to this jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500232 |DOE |SW1H 9AJ |email@outlook.com|415170401 | + +@RegressionWelsh @JDB-3611 +Scenario Outline: Welsh 1st RA Char Counter + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + And I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #JDB-3358 and JDB-3463 + + Then on the page I see + | text | + | Eich Manylion | + | A yw'r enw sydd gennym ar eich cyfer chi yn gywir? | + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + + #JDB-3464 + + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + + #JDB-3359, JDB-3355 and JDB-3465 + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + When I press the "Parhau" button + + #JDB-3361 + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener. | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + + #JDB-3352 and JDB-3362 + + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + #JDB-3456 + + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #JDB-3350 and JDB-3360 + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Qualify for jury service JDB-3372 and JDB-3420 + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + + When I press the "Parhau" button + + #JDB-3373 + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + + #Residency JDB-3378 JDB-3389 + + When I see "Cymhwysedd" on the page + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #JDB-3371 and JDB-3506 + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + + #Bail JDB-3377 + + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #JDB-3370 and JDB-3468 + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + + #Convictions JDB-3376 and JDB-3469 + + When I see "Cymhwysedd" on the page + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental Health Sectioned JDB-3363 + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity JDB-3364 JDB-3354 + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #JDB-3087 + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + + #Confirm attendance + + And I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #RA + + And I set the radio button to "Oes" + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig bydd arnoch angen wrth ichi wasanaethu ar reithgor." to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." + + When I check the "Arall" checkbox + And I set "Rhowch fanylion os gwelwch yn dda" to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." + + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers + + When I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." in the same row as "A oes gennych anabledd neu nam sy'n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnoch yn yr adeilad llys ble fyddwch yn cyflawni eich gwasanaeth rheithgor?" + And I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." in the same row as "Rhowch wybod inni am unrhyw drefniadau arbennig bydd arnoch angen wrth ichi wasanaethu ar reithgor." + + #When I press the "Submit" button + + When I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + Then I see "Rydym wedi anfon neges e-bost atoch i gadarnhau eich bod wedi ymateb i’ch gwŷs rheithgor." on the page + +Examples: + | part_no |last_name |postcode | email |pool_no | + |641500416 |DOE |SW1H 9AJ |email@outlook.com|415170401| + +@RegressionWelsh + Scenario Outline: Welsh 3rd RA Char Counter + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #Juror Log In + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #Why are you replying title + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + + #Why are you replying for juror + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ydy" + And I press the "Parhau" button + + #JDB-3462 + + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + + #JDB-3461 + + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB + + When I see "Manylion y Rheithiwr" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS no + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #JDB-3371 + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + + #Bail + + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #JDB-3370 + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + + #Convictions + + When I see "Cymhwysedd" on the page + And I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + Then I see "Gallant wasanaethu ar reithgor os ydynt:" on the page + + #JDB-3472 and JDB-3471 checking conviction/guidance text + + When I see "Ni allant ychwaith wasanaethu ar reithgor os ydynt, yn ystod y 10 mlynedd diwethaf, wedi cael:" on the page + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #JDB-3467 + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + + #Mental Health Capacity + + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + #The person can attend + + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #RA no + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Oes" + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddo wasanaethu ar reithgor." to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." + + When I check the "Arall" checkbox + And I set "Rhowch fanylion os gwelwch yn dda" to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." + + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers + +# When I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." in the same row as "A oes gan yr unigolyn anabledd neu nam sy'n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnynt yn yr adeilad llys lle byddant yn cyflawni'r gwasanaeth rheithgor?" +# And I see text "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here and this should cut." in the same row as "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddynt wasanaethu ar reithgor." + And I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + + #When I press the "Submit" button + + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500005 |DOE |SW1H 9AJ |a@eeee.com |415170401 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/REGRESSION_Bureau_Process_Options.feature b/src/test/resources/cucumber/features/REGRESSION_Bureau_Process_Options.feature new file mode 100644 index 00000000..baf20cc5 --- /dev/null +++ b/src/test/resources/cucumber/features/REGRESSION_Bureau_Process_Options.feature @@ -0,0 +1,278 @@ +Feature: Bureau Process Options + +@RegressionSingle +Scenario Outline: Cycle through process options + + Given I am on "Public" "test" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |a@a.com| + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + #process options as team member where record assigned to me + + And I do not see "Download as a PDF" on the page + And I do not see "Mark as 'Awaiting information'" on the page + And I do not see "Send to a colleague..." on the page + + Then I press the "More actions" button + + And I see link with text "Download as a PDF" + And I see link with text "Mark as 'Awaiting information'" + And I see link with text "Send to a colleague..." + + Then I click on the "Mark as 'Awaiting information'" link + And I see "Awaiting juror" on the page + And I see "Awaiting court reply" on the page + And I see "Awaiting translation" on the page + + Then I click on the "Cancel" link + + Then I press the "More actions" button + Then I click on the "Send to a colleague..." link + And I see "Select an officer to send to" on the page + Then I click on the "Cancel" link + + Then I do not see "PDF sent to court" on the page + Then I press the "Process reply" button + Then I see link with text "Responded" + Then I see link with text "Deferral" + Then I see link with text "Excusal" + Then I see link with text "Disqualified" + + Then I click on the "Responded" link + And I see "Mark juror as 'responded'" on the page + Then I click on the "Cancel" link + + Then I press the "Process reply" button + Then I click on the "Deferral" link + And I see "Accept deferral" on the page + Then I click on the "Cancel" link + + Then I press the "Process reply" button + Then I click on the "Excusal" link + And I see "Accept excusal request" on the page + Then I click on the "Cancel" link + + Then I press the "Process reply" button + Then I click on the "Disqualified" link + And I see "Select why the juror is disqualified" on the page + Then I click on the "Cancel" link + + #re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no |pool_no |last_name |postcode | + |645200289 |452170401 |LNAMETWOEIGHTNINE |SY2 6LU | + +@RegressionSingle +Scenario Outline: Send to court process options + + Given I am on "Public" "test" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + # Set part_no pool to be super urgent + + Given "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |a@a.com| + + Given "<part_no>" has "READ_ONLY" as "Y" + Then the "URGENT" for juror "<part_no>" is set to "N" + Then the "SUPER_URGENT" for juror "<part_no>" is set to "Y" + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I do not see "Download as a PDF" on the page + Then I press the "More actions" button + And I see link with text "Download as a PDF" + And I do not see "Send to a colleague..." on the page + And I do not see "Mark as 'Awaiting information'" on the page + Then I press the "More actions" button + + Then I do not see "PDF sent to court" on the page + Then I press the "Process reply" button + Then I click on the "PDF sent to court..." link + + When I check the "PDF sent to court" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + #re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no |pool_no |last_name |postcode | + |645200289 |452170401 |LNAMETWOEIGHTNINE |SY2 6LU | + +@RegressionSingle +Scenario Outline: Urgent process options + + Given I am on "Public" "test" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + # Set part_no pool to be urgent + + Given "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |a@a.com| + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + # cannot assign to anyone as response not allocated to me + + And I do not see "Download as a PDF" on the page + And I do not see "Mark as 'Awaiting information'" on the page + And I do not see "Send to a colleague..." on the page + Then I press the "More actions" button + And I see "Download as a PDF" on the page + And I see "Mark as 'Awaiting information'" on the page + And I do not see "Send to a colleague..." on the page + + # allocate to me + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + + # now I can allocate to someone else + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I do not see "Download as a PDF" on the page + And I do not see "Mark as 'Awaiting information'" on the page + And I do not see "Send to a colleague..." on the page + Then I press the "More actions" button + And I see "Download as a PDF" on the page + And I see "Mark as 'Awaiting information'" on the page + And I see "Send to a colleague..." on the page + + Then I press the "More actions" button + Then I press the "Process reply" button + Then I see "Responded" on the page + Then I see "Deferral" on the page + Then I see "Excusal" on the page + Then I see "Disqualified" on the page + Then I click on the "Responded" link + + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + Then I see "COMPLETED" on the page + + #re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no |pool_no |last_name |postcode | + |645200289 |452170401 |LNAMETWOEIGHTNINE |SY2 6LU | + +@RegressionSingle +Scenario Outline: Closed process options + + Given I am on "Public" "test" + Given auto straight through processing has been enabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |a@a.com| + + Given I am on "Bureau" "test" + And I log in + + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + Then I press the "More actions" button + And I see link with text "Download as a PDF" + And I do not see "Mark as 'Awaiting information" on the page + And I do not see "Send to a colleague..." on the page + + Then the "Process reply" button is disabled + Then I do not see "PDF sent to court" on the page + + Then I see "COMPLETED" on the page + +Examples: + |part_no |pool_no |last_name |postcode | + |645200289 |452170401 |LNAMETWOEIGHTNINE |SY2 6LU | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/REGRESSION_English_1st_ChangeAddress_Bureau.feature b/src/test/resources/cucumber/features/REGRESSION_English_1st_ChangeAddress_Bureau.feature new file mode 100644 index 00000000..bc6f071e --- /dev/null +++ b/src/test/resources/cucumber/features/REGRESSION_English_1st_ChangeAddress_Bureau.feature @@ -0,0 +1,1199 @@ +Feature: Regression English_1st_ChangeAddress_Bureau + +@Regression +Scenario Outline: Change postcode - old postcode in >1 loc_code SHOWS CHANGE COURT + + #2. Change postcode - old postcode in >1 loc_code + #SY2 - CH1 + #SY2=LOC_CODE 452 and 774 + #CH1=LOC_CODE 415 + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + And I set the radio button to "No" + And I press the "Continue" button + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "bau-test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "CH1 2AN" on the page + And I see "Change Court" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200831 |DOE |SY2 6LU |a@eeee.com |452170401 | + +@Features +Scenario Outline: Change Postcode but same loc_code CHANGE COURT FLAG NOT SHOWN + + #moved to Features 02-01-24 return to Regression + + #5. Change Postcode but same loc_code + #SA1 - SA2 + #SA1=LOC_CODE 457 + #SA2=LOC_CODE 457 + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I set "Postcode" to "SA2 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "SA2 2AN" on the page + And I do not see "Change Court" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645700226 |DOE |SA1 4EE |a@eeee.com |457170401 | + +@Regression +Scenario Outline: Change postcode - different loc_code SHOWS CHANGE COURT + + #6. Change postcode - different loc_code + #WV1 - WA1 + #WV1=LOC_CODE 421 + #WA1=LOC_CODE 462 + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Postcode" to "WV1 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "bau-test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "WV1 2AN" on the page + And I see "Change Court" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |643219999 |DOE |HP20 6LU |a@eeee.com |401151103 | + +@Regression +Scenario Outline: Change postcode - new postcode in >1 loc_code SHOWS CHANGE COURT + + #1. Change postcode - new postcode in >1 loc_code + #CH1 - CH2 + #CH1=LOC_CODE 415 + #CH2=LOC_CODE 415 and 715 + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Postcode" to "CH2 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "bau-test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "CH2 2AN" on the page + And I do not see "Change Court" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500721 |DOE |CH1 6LU |a@eeee.com |415170401 | + +@Regression +Scenario Outline: Change postcode - new postcode not in court_catchment_area SHOWS CHANGE COURT + + #3. Change postcode - new postcode not in court_catchment_area + #CH1 - SW1H + #CH1=LOC_CODE 415 + #SW1H not in court_catchment_area + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Postcode" to "SW1H 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "bau-test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "SW1H 2AN" on the page + And I see "Check catchment area" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500724 |DOE |CH1 6LU |a@eeee.com |415170401 | + +@Regression +Scenario Outline: Change postcode - old postcode not in court_catchment_area DOES NOT SHOW CHANGE COURT + + #4. Change postcode - old postcode not in court_catchment_area + #SW1H - CH1 + #SW1H not in court_catchment_area + #CH1=LOC_CODE 415 + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "bau-test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "CH1 2AN" on the page + And I do not see "Change Court" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500745 |DOE |SW1H 6LU |a@eeee.com |415170401 | + +@Regression +Scenario Outline: Change Postcode but same loc_code CHANGE COURT FLAG NOT SHOWN two + + #5a. Change Postcode but same loc_code + #NN1 - NN3 + #NN1=LOC_CODE 442 + #NN3=LOC_CODE 442 + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Postcode" to "NN3 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "bau-test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "NN3 2AN" on the page + And I do not see "Change Court" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200921 |DOE |NN1 4EE |a@eeee.com |442170401 | + + +Scenario Outline: Record displays Change Court, Bureau officer updates postcode and flag is removed + + #7. Change postcode - different loc_code + #WV1 - WA1 + #WV1=LOC_CODE 421 + #WA1=LOC_CODE 462 + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "LOC_CODE" as "421" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #name + + And I set the radio button to "Yes" + When I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Postcode" to "WA1 2AN" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "results for “<part_no>”" on the page + + #JDB-3629 + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "WA1 2AN" on the page + And I see "Change Court" on the page + + #update postcode + + And I click on the "Change" link + And I set "Postcode" to "WV1 4PP" + And I press the "Save" button + And I set "Please give a reason for the change to this summons reply" to "testNotesABC" + And I click link with ID "changeLogSaveButton" + Then I see "WV1 4PP" on the page + And I do not see "Change Court" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200067 |LNAMESIXSEVEN |SY2 6LU |a@eeee.com |452170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/REGRESSION_JDB-4242_3rd_Does_Not_Update_Juror.feature b/src/test/resources/cucumber/features/REGRESSION_JDB-4242_3rd_Does_Not_Update_Juror.feature new file mode 100644 index 00000000..6b74cca5 --- /dev/null +++ b/src/test/resources/cucumber/features/REGRESSION_JDB-4242_3rd_Does_Not_Update_Juror.feature @@ -0,0 +1,525 @@ +Feature: Regression JDB-4242 3rd Party Details Do Not Update Legacy Juror + +@Regression +Scenario Outline: English 3rd Party Deceased + Given I am on "Public" "test" + Given auto straight through processing has been enabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I have submitted a third party English deceased response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "EXC_CODE" is "D" where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500268 |LNAMETWOSIXEIGHT |CH1 2AN |email@outlook.com|415170401| + +@Features +Scenario Outline: English 3rd Party Excused - contact details same as 3rd party + + #moved to Features 02-01-24 return to Regression + + Given I am on "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I have submitted a third party English excusal response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Summoned" on the page + + #process in Bureau as Excused + + When I select "Excusal" from Process reply + Then I select "D - DECEASED" from the "Reason for the excusal request" dropdown + And I set the radio button to "Accept excusal request" + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200433 |LNAMEFOURTHREETHREE|NN1 3HQ |email@outlook.com|442170401| + +@Features +Scenario Outline: English 3rd Party Deferred - contact details same as 3rd party + + #moved to Features 02-01-24 return to Regression + + Given I am on "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "6 mondays time" + And "<part_no>" has "NEXT_DATE" as "6 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I have submitted a third party English deferral response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "14" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200674 |LNAMESIXSEVENFOUR |NN1 3HQ |email@outlook.com|442170401| + +@Features +Scenario Outline: English 3rd Party ST - contact details same as 3rd party + + #moved to Features 02-01-24 return to Regression + + Given I am on "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner| + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I have submitted a third party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I see "Responded" on the page + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200674 |LNAMESIXSEVENFOUR |NN1 3HQ |email@outlook.com|442170401| + +@Features +Scenario Outline: English 3rd Party Disqualified - contact details same as 3rd party + + #moved to Features 02-01-24 return to Regression + + Given I am on "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I have submitted a third party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I select "Disqualified" from Process reply + + #check error message + + And I press the "Confirm" button + And I see "Select the reason that the juror is disqualified" on the page + + When I set the radio button to "M - Suffering From a Mental Disorder" + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200449 |LNAMEFOURFOURNINE |NN1 3HQ |email@outlook.com|442170401| + +@Regression +Scenario Outline: English 3rd Party Super Urgent - contact details same as 3rd party + Given I am on "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "READ_ONLY" as "Y" + + And I have submitted a third party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + Then I press the "Process reply" button + Then I click on the "PDF sent to court..." link + When I check the "PDF sent to court" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR" . "POOL" I see "H_EMAIL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200450 |LNAMEFOURFIVEZERO |NN1 3HQ |email@outlook.com|442170401| + +@Features +Scenario Outline: English 3rd Party Welsh - contact details different for juror + + #moved to Features 02-01-24 return to RegressionWelsh + + Given I am on the welsh version of "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #Juror Log In + + When I click on the "Nid oes gennyf rif rheithiwr ar gyfer yr unigolyn" link + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I click on the "Os ydych yn byw dramor" link + And I see "Os ydych yn byw dramor ar hyn o bryd a heb rif ffôn y DU, byddwn angen cysylltu â chi drwy ddefnyddio cyfeiriad e-bost." on the page + And I press the "Parhau" button + + #Why are you replying title + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + When I set the radio button to "Nid yw'r unigolyn yma" + And I see "Efallai ei fod yn teithio, yn yr ysbyty, neu i ffwrdd am fwy nag ychydig ddyddiau am reswm arall." on the page + And I see "Nid yw'r unigolyn yn gallu ymateb dros ei hun" on the page + And I see "Nid yw'r unigolyn â'r gallu i ymateb drosto'i hun. Efallai bod hyn oherwydd bod ganddo anabledd neu nam." on the page + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + When I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Os oes arnoch angen cymorth, ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Er enghraifft, 15 03 1982" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + And I see "Nodwch rifau ffôn y gallwn eu defnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + + And I set the radio button to "Rhoi rhif ffôn gwahanol ar gyfer y rheithiwr" + And I set "Prif rif ffôn" to "07999999999" + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I set "Nodwch y cyfeiriad e-bost" to "different@email.com" + And I set "Nodwch y cyfeiriad e-bost unwaith eto" to "different@email.com" + + And I press the "Parhau" button + Then I see "Bydd eich atebion yn yr adran nesaf yn ein helpu i wirio a yw'r unigolyn yr ydych yn ateb ar ei ran yn gallu gwasanaethu ar reithgor ai peidio." on the page + + #Qualify for jury service + + And I press the "Parhau" button + + #Residency JDB-3811 and JDB-3910 + + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS no JDB-3822 + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Convictions + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity JDB-3813 + + And I set the radio button to "Na" + And I press the "Parhau" button + + #The person can attend + + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + + And I press the "Parhau" button + + #RA no JDB-3815 + + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran nam neu anabledd sydd gan yr unigolyn rydych yn ymateb ar ei ran, yna cysylltwch â ni." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check your answers + + When I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + And I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + + #Bureau process reply + + Given I am on "Bureau" "test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I see "Responded" on the page + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200675 |LNAMESIXSEVENFIVE |NN1 3HQ |email@outlook.com|442170401| + +@Features +Scenario Outline: English 3rd Party Straight Through - Juror already has contact details + + #moved to Features 02-01-24 return to Regression + + Given I am on "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "H_EMAIL" as "eeeee@mail.com" + And "<part_no>" has "H_PHONE" as "11111111111" + And "<part_no>" has "W_PHONE" as "22222222222" + And "<part_no>" has "M_PHONE" as "33333333333" + + And I have submitted a third party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + #Bureau process reply + + Given I am on "Bureau" "test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I see "Responded" on the page + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "eeeee@mail.com" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is "33333333333" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is "11111111111" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200786 |LNAMESEVENEIGHTSIX |SY2 6LU |email@outlook.com|452170401| + +@Features +Scenario Outline: English 1st Party Straight Through - regression - contact details populated to Juror + + #moved to Features 02-01-24 return to Regression + + Given I am on "Public" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And auto straight through processing has been enabled + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "email@outlook.com" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "M_PHONE" is "07551179225" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200706 |LNAMESEVENZEROSIX |NN1 3HQ |email@outlook.com|442170401| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/REGRESSION_SuperUrgentSendToCourt.feature b/src/test/resources/cucumber/features/REGRESSION_SuperUrgentSendToCourt.feature new file mode 100644 index 00000000..c4a3fed9 --- /dev/null +++ b/src/test/resources/cucumber/features/REGRESSION_SuperUrgentSendToCourt.feature @@ -0,0 +1,190 @@ +Feature: JDB-3759 SuperUrgentSendToCourt + +#A response is submitted after pool is transferred to court +#submit a response where read_only='n' and ret_date/next_date is in 1 week +#reg test urgents are still calculated as before +#A response is submitted then transferred to court before being processed in JD -not applicable see JDB-3901 (test manually) +#cover status 11 Awaiting Information (test manually) +#cover assigned/unassigned (test manually with prev test) +#read_only turns to Y before response is U or SU (test manually) + +@Regression @JDB-3759 +Scenario Outline: A response is submitted after pool is transferred to court + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + #Set part_no pool to be 1 monday from now, and transferred to the court + Given "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "READ_ONLY" as "Y" + +# # Attempt to submit response +# And I set the radio button to "I am replying for myself" +# And I press the "Continue" button +# +# When I set "9-digit juror number" to "<part_no>" +# When I set "Juror last name" to "<last_name>" +# When I set "Juror postcode" to "<postcode>" +# And I press the "Continue" button +# +# Then I see "The court date for your jury summons has passed. You cannot reply using this service." on the page + + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + #check status + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Given I am on "Bureau" "bau-test" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + #check status = summoned + + And I see "Summoned" on the page + And I see "SEND TO COURT" on the page + + When I select "PDF sent to court..." from Process reply + And I check the "PDF sent to court" checkbox + And I press the "Confirm" button + + #now check status + + And I see "Summoned" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "Y" where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |644200865 |442170401 |LNAMEEIGHTSIXFIVE |NN1 3HQ |danielle.bach@cgi.com | + +@Regression @JDB-3759 +Scenario Outline: Regression test that Urgents still calculated correctly + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_one> |<pool_no> |400 | + + #Set part_no pool to be 3 mondays from now + Given "<part_no_one>" has "RET_DATE" as "3 mondays time" + And "<part_no_one>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_one>" has "LNAME" as "<last_name>" + And "<part_no_one>" has "ZIP" as "<postcode>" + And "<part_no_one>" has "READ_ONLY" as "N" + + # Submit response in pool + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no_one> |<pool_no> |<last_name> |<postcode> |<email>| + + #check status + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "Y" where "JUROR_NUMBER" is "<part_no_one>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "N" where "JUROR_NUMBER" is "<part_no_one>" + + Given I am on "Bureau" "bau-test" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_one>" + And I press the "Search" button + And I click on "<part_no_one>" in the same row as "<part_no_one>" + + #check status = summoned + + Then I see "Summoned" on the page + And I see "URGENT" on the page + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #now check status + + And I do not see "URGENT" on the page + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "Y" where "JUROR_NUMBER" is "<part_no_one>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "N" where "JUROR_NUMBER" is "<part_no_one>" + +Examples: + |part_no_one |pool_no |last_name |postcode |email | + |644200914 |442170401 |LNAMENINEONEFOUR |SY2 6LU |a@a.com| + +@RegressionWelsh @JDB-3759 +Scenario Outline: Test that a response with ret_date in 1 week and read_only='N' is not flagged super urgent + + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + #Set part_no pool to be 1 monday from now + Given "<part_no>" has "RET_DATE" as "1 mondays time" + And "<part_no>" has "NEXT_DATE" as "1 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + +# # Attempt to submit response +# And I set the radio button to "n ymateb dros fy hun" +# And I press the "Parhau" button +# Then I see "Eich manylion rheithiwr" on the page +# +# When I set "Rhif rheithiwr" to "<part_no>" +# When I set "Cyfenw" to "<last_name>" +# When I set "Cod post Rheithiwr" to "<postcode>" +# And I press the "Parhau" button +# +# Then I see "Mae'r dyddiad ar gyfer eich gwŷs rheithgor wedi mynd heibio. Ni allwch ymateb drwy ddefnyddio'r gwasanaeth hwn." on the page + + Given I have submitted a first party Welsh straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + + #check status +# +# Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "Y" where "JUROR_NUMBER" is "<part_no>" +# Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "N" where "JUROR_NUMBER" is "<part_no>" +# +# Given I am on "Bureau" "juror-test01" +# And I log in as "CPASS" +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no>" +# And I press the "Search" button +# And I click on "<part_no>" in the same row as "<part_no>" +# +# #check status = summoned +# +# Then I see "Summoned" on the page +# And I do not see "SEND TO COURT" on the page +# +# When I select "Responded" from Process reply +# And I check the "Mark juror as 'responded'" checkbox +# And I press the "Confirm" button +# +# #now check status +# +# Then I see "Responded" on the page +# And I see "COMPLETED" on the page +# Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "Y" where "JUROR_NUMBER" is "<part_no>" +# Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "N" where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645700161 |457170401 |LNAMEONESIXONE |SA1 4PF |e@mail.com | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/REGRESSION_Survey_Link.feature b/src/test/resources/cucumber/features/REGRESSION_Survey_Link.feature new file mode 100644 index 00000000..2990a1dc --- /dev/null +++ b/src/test/resources/cucumber/features/REGRESSION_Survey_Link.feature @@ -0,0 +1,135 @@ +Feature: Regression Survey_Link + +@Regression +Scenario Outline: Survey Link 1st Party Eng + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Give feedback (opens in a new window or tab)" link + And I switch to the new window +# Then I see "Were you able to do what you needed to do today?" on the page + And I see "https://www.smartsurvey.co.uk/s/DL1RCF/" in the URL + + +Examples: + |part_no |last_name |postcode | email | pool_no | + |641500119 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |415170402 | + +@Regression +Scenario Outline: Survey Link 3rd Party Eng + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Give feedback (opens in a new window or tab)" link +# And I switch to the new window +# Then I see "Were you able to do what you needed to do today?" on the page +# And I see "https://www.smartsurvey.co.uk/s/DL1RCF/" in the URL + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645700919 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |457170501 | + +@RegressionWelsh +Scenario Outline: Survey Link 1st Party Welsh + + Given I am on the welsh version of "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Give feedback (opens in a new window or tab)" link +# And I switch to the new window +# Then I see "Were you able to do what you needed to do today?" on the page +# And I see "https://www.smartsurvey.co.uk/s/DL1RCF/" in the URL + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645700927 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |457170501 | + +@RegressionWelsh +Scenario Outline: Survey Link 3rd Party Welsh + + Given I am on the welsh version of "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Give feedback (opens in a new window or tab)" link +# And I switch to the new window +# Then I see "Were you able to do what you needed to do today?" on the page +# And I see "https://www.smartsurvey.co.uk/s/DL1RCF/" in the URL + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645700924 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |457170501 | + diff --git a/src/test/resources/cucumber/features/Regression_Work_AllocationSuperUrgent.feature b/src/test/resources/cucumber/features/Regression_Work_AllocationSuperUrgent.feature new file mode 100644 index 00000000..5ee8e3b6 --- /dev/null +++ b/src/test/resources/cucumber/features/Regression_Work_AllocationSuperUrgent.feature @@ -0,0 +1,295 @@ +Feature: Work Allocation Regression + +@Regression @JDB-3747 @JDB-3744 +Scenario Outline: Check that Urgent ST is not auto assigned + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "3 mondays time" + And "<part_no>" has "NEXT_DATE" as "3 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + # Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + Then I see "Why do you need to be excused from jury service?" on the page + When I set text area with "id" of "excusalReason" to "££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers Now + + Then I see "Check your answers now" on the page + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #Bureau + + Given I am on "Bureau" "bau-test" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no>" + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "URGENT" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + + #JDB-3744 + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "Y" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "N" where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500683 |LNAMESIXEIGHTTHREE |CH1 2AN |email@outlook.com |415170601 | + +@Regression @JDB-3747 @JDB-3744 +Scenario Outline: Check that Super Urgent ST is not auto assigned + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "READ_ONLY" as "Y" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Have you been found guilty of a criminal offence?" on the page + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + + #Mental Health part 1 + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + # Confirm Date of Jury + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + Then I see "Why do you need to be excused from jury service?" on the page + When I set text area with "id" of "excusalReason" to "££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no>" + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "SEND TO COURT" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + + #JDB-3744 + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "URGENT" is "N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "Y" where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500711 |LNAMESEVENONEONE |CH1 2AN |email@outlook.com |415170601 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Sundry/SCREENSHOTS_Public_1st_English.feature b/src/test/resources/cucumber/features/Sundry/SCREENSHOTS_Public_1st_English.feature new file mode 100644 index 00000000..6e462692 --- /dev/null +++ b/src/test/resources/cucumber/features/Sundry/SCREENSHOTS_Public_1st_English.feature @@ -0,0 +1,1683 @@ +Feature: Screenshots + + +Scenario Outline: English 1st Party Straight Through + + Given I am on "Public" "juror-test02" + + #Then I take a screenshot + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + +##1st or 3rd + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + #Then I take a screenshot + +##log on + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + +##name + + #Then I take a screenshot + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + + Then I click on the "Back" link + + #move on YES + + And I set the radio button to "Yes" + And I press the "Continue" button + +##address + + #Then I take a screenshot + + #error + + When I press the "Continue" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + + Then I click on the "Back" link + + #move on YES + + And I set the radio button to "Yes" + When I press the "Continue" button + +##phone + + #Then I take a screenshot + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + +##email + + #Then I take a screenshot + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + And I press the "Continue" button + +##DOB + + #Then I take a screenshot + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on OVERAGE + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1900" + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + And I click on the "Back" link + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Then I take a screenshot + +##qualifying + + When I press the "Continue" button + + #Then I take a screenshot + +##residency + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Then I take a screenshot + +##CJS + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Bail + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Convictions + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Mental Health Sectioned + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Yes" + + #Then I take a screenshot + + #move on No + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Mental Health Capacity + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##I can attend + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Then I take a screenshot + +##Deferal + + And I click on the "Back" link + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #Then I take a screenshot + + #reason + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #Then I take a screenshot + + #Dates + + When I set the "First" single date field to a Monday "10" weeks in the future + When I set the "Second" single date field date fieldte to a Monday "11" weeks in the future + When I set the "Third" single date field to a Monday "12" weeks in the future + + And I press the "Continue" button + + #Then I take a screenshot + +##Excusal + + And I click on the "Back" link + And I click on the "Back" link + And I click on the "Back" link + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Then I take a screenshot + + #reason + + Then I set text area with "id" of "excusalReason" to "Excuse me please" + + And I press the "Continue" button + + #Then I take a screenshot + +##RA no + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Check your answers + + #error + + And I press the "Submit" button + + #Then I take a screenshot + + #move on + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + #Then I take a screenshot + +##HTML + + And I click on the "Download a copy of your summons reply HTML" link + + #Then I take a screenshot + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + + +Scenario Outline: English 3rd Party Straight Through + + Given I am on "Public" "juror-test02" + + #Then I take a screenshot + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + +##1st or 3rd + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Then I take a screenshot + +##log on + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I take a screenshot + +##3rd party name + + #error + + And I press the "Continue" button + + And I take a screenshot + + #move on + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + And I take a screenshot + +##Relationship + + #error + + And I press the "Continue" button + + And I take a screenshot + + #move on + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + And I take a screenshot + +##contact + + #error + + And I press the "Continue" button + + And I take a screenshot + + #move on + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + And I take a screenshot + +##why replying + + #error + + And I press the "Continue" button + + And I take a screenshot + + #moving on + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + And I take a screenshot + +##name + + #Then I take a screenshot + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + + Then I click on the "Back" link + + #move on YES + + And I set the radio button to "Yes" + And I press the "Continue" button + +##address + + #Then I take a screenshot + + #error + + When I press the "Continue" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + + Then I click on the "Back" link + + #move on YES + + And I set the radio button to "Yes" + When I press the "Continue" button + +##DOB + + #Then I take a screenshot + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on OVERAGE + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1900" + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + And I click on the "Back" link + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Then I take a screenshot + +##phone + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + +##qualifying + + When I press the "Continue" button + + #Then I take a screenshot + +##residency + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Then I take a screenshot + +##CJS + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Bail + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Convictions + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Mental Health Sectioned + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Yes" + + #Then I take a screenshot + + #move on No + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Mental Health Capacity + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##I can attend + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #Then I take a screenshot + +##Deferal + + And I click on the "Back" link + + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Then I take a screenshot + + #reason + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #Then I take a screenshot + + #Dates + + When I set the "First" single date field to a Monday "10" weeks in the future + When I set the "Second" single date field to a Monday "11" weeks in the future + When I set the "Third" single date field to a Monday "12" weeks in the future + + And I press the "Continue" button + + #Then I take a screenshot + +##Excusal + + And I click on the "Back" link + And I click on the "Back" link + And I click on the "Back" link + + When I set the radio button to "No, they cannot do" + And I press the "Continue" button + + #Then I take a screenshot + + #reason + + Then I set text area with "id" of "excusalReason" to "Excuse me please" + + And I press the "Continue" button + + #Then I take a screenshot + +##RA no + + #error + + And I press the "Continue" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Yes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "No" + And I press the "Continue" button + + #Then I take a screenshot + +##Check your answers + + #error + + And I press the "Submit" button + + #Then I take a screenshot + + #move on + + And I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #Then I take a screenshot + +##HTML + + And I click on the "Download a copy of your summons reply HTML" link + + #Then I take a screenshot + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + + + +Scenario Outline: Welsh 1st Party Straight Through + + Given I am on the welsh version of "Public" "juror-test02" + + #Then I take a screenshot + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + +##1st or 3rd + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + #Then I take a screenshot + +##log on + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + +##name + + #Then I take a screenshot + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Then I take a screenshot + + Then I click on the "Cliciwch i fynd yn ôl" link + + #move on YES + + And I set the radio button to "Ydy" + And I press the "Parhau" button + +##address + + #Then I take a screenshot + + #error + + When I press the "Parhau" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Then I take a screenshot + + Then I click on the "Cliciwch i fynd yn ôl" link + + #move on YES + + And I set the radio button to "Ie" + When I press the "Parhau" button + +##phone + + #Then I take a screenshot + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + +##email + + #Then I take a screenshot + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + +##DOB + + #Then I take a screenshot + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on OVERAGE + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1900" + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + And I click on the "Cliciwch i fynd yn ôl" link + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1990" + And I press the "Parhau" button + + #Then I take a screenshot + +##qualifying + + When I press the "Parhau" button + + #Then I take a screenshot + +##residency + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Naddo" + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Do" + And I press the "Parhau" button + + #Then I take a screenshot + +##CJS + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Ydw" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Then I take a screenshot + +##Bail + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Ydw" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Then I take a screenshot + +##Convictions + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Do" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Then I take a screenshot + +##Mental Health Sectioned + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Ie" + + #Then I take a screenshot + + #move on No + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Then I take a screenshot + +##Mental Health Capacity + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Ie" + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Then I take a screenshot + +##I can attend + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #Then I take a screenshot + +##Deferal + + And I click on the "Cliciwch i fynd yn ôl" link + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + + #Then I take a screenshot + + #reason + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Parhau" button + + #Then I take a screenshot + + #Dates + + When I set the "First" single date field to a Monday "10" weeks in the future + When I set the "Second" single date field to a Monday "11" weeks in the future + When I set the "Third" single date field to a Monday "12" weeks in the future + + And I press the "Parhau" button + + #Then I take a screenshot + +##Excusal + + And I click on the "Cliciwch i fynd yn ôl" link + And I click on the "Cliciwch i fynd yn ôl" link + And I click on the "Cliciwch i fynd yn ôl" link + + When I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + + #Then I take a screenshot + + #reason + + Then I set text area with "id" of "excusalReason" to "Excuse me please" + + And I press the "Parhau" button + + #Then I take a screenshot + +##RA no + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Oes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + + #Then I take a screenshot + +##Check your answers + + #error + + And I press the "Cyflwyno" button + + #Then I take a screenshot + + #move on + + And I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + + #Then I take a screenshot + +##HTML + + And I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML (15KB)" link + + #Then I take a screenshot + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + +@Screenshots +Scenario Outline: Welsh 3rd Party Straight Through + + Given I am on the welsh version of "Public" "juror-test02" + + #Then I take a screenshot + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + +##1st or 3rd + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #Then I take a screenshot + +##log on + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + And I take a screenshot + +##3rd party name + + #error + + And I press the "Parhau" button + + And I take a screenshot + + #move on + + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + + And I take a screenshot + +##Relationship + + #error + + And I press the "Parhau" button + + And I take a screenshot + + #move on + + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + + And I take a screenshot + +##contact + + #error + + And I press the "Parhau" button + + And I take a screenshot + + #move on + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + And I take a screenshot + +##why replying + + #error + + And I press the "Parhau" button + + And I take a screenshot + + #moving on + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + + And I take a screenshot + +##name + + #Then I take a screenshot + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Then I take a screenshot + + Then I click on the "Cliciwch i fynd yn ôl" link + + #move on YES + + When I set the radio button to "Ydy" + And I press the "Parhau" button + +##address + + #Then I take a screenshot + + #error + + When I press the "Parhau" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Then I take a screenshot + + Then I click on the "Cliciwch i fynd yn ôl" link + + #move on YES + + And I set the radio button to "Ie" + When I press the "Parhau" button + +##DOB + + #Then I take a screenshot + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on OVERAGE + + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1900" + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + And I click on the "Cliciwch i fynd yn ôl" link + + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1990" + And I press the "Parhau" button + + #Then I take a screenshot + +##phone + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + +##qualifying + + When I press the "Parhau" button + + #Then I take a screenshot + +##residency + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Naddo" + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Do" + And I press the "Parhau" button + + #Then I take a screenshot + +##CJS + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Ydy" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Then I take a screenshot + +##Bail + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Ydy" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Then I take a screenshot + +##Convictions + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Ydy" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Then I take a screenshot + +##Mental Health Sectioned + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Ie" + + #Then I take a screenshot + + #move on No + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Then I take a screenshot + +##Mental Health Capacity + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + And I set the radio button to "Ie" + + #Then I take a screenshot + + #move on NO + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Then I take a screenshot + +##I can attend + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on + + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau ar" + And I press the "Parhau" button + + #Then I take a screenshot + +##Deferal + + And I click on the "Cliciwch i fynd yn ôl" link + + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + + #Then I take a screenshot + + #reason + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Parhau" button + + #Then I take a screenshot + + #Dates + + When I set the "First" single date field to a Monday "10" weeks in the future + When I set the "Second" single date field to a Monday "11" weeks in the future + When I set the "Third" single date field to a Monday "12" weeks in the future + + And I press the "Parhau" button + + #Then I take a screenshot + +##Excusal + + And I click on the "Cliciwch i fynd yn ôl" link + And I click on the "Cliciwch i fynd yn ôl" link + And I click on the "Cliciwch i fynd yn ôl" link + + And I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + + #Then I take a screenshot + + #reason + + Then I set text area with "id" of "excusalReason" to "Excuse me please" + + And I press the "Parhau" button + + #Then I take a screenshot + +##RA no + + #error + + And I press the "Parhau" button + + #Then I take a screenshot + + #move on YES + + When I set the radio button to "Oes" + + #Then I take a screenshot + + #move on NO + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + + #Then I take a screenshot + +##Check your answers + + #error + + When I press the "Cyflwyno" button + + #Then I take a screenshot + + #move on + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + + #Then I take a screenshot + +##HTML + + Then I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML (15KB)" link + + #Then I take a screenshot + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/Third_Party_Phone_Not_Juror_Phone.feature b/src/test/resources/cucumber/features/Third_Party_Phone_Not_Juror_Phone.feature new file mode 100644 index 00000000..da67974f --- /dev/null +++ b/src/test/resources/cucumber/features/Third_Party_Phone_Not_Juror_Phone.feature @@ -0,0 +1,583 @@ +Feature: Third_Party_Phone_Not_Juror_Phone + +@Regression @JDB-3614 +Scenario Outline: English 3rd Party Gives Phone and Juror Email + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Give a different email address for the juror" + And I set "Enter email address" to "JurorEmail@outlook.com" + And I set "Enter the email address again" to "JurorEmail@outlook.com" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #The person can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I see text "JurorEmail@outlook.com" in the same row as "Email" + And I see text "0207 821 1818" in the same row as "Your main phone number" + And I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent an email to say you have replied to this jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "641500189" on the page + + #Check that TP phone only appears for TP and juror email only appears for juror + + When I see "" in the same row as "Main Phone" + And I see "JurorEmail@outlook.com" in the same row as "Email" + And I see "0207 821 1818" in the same row as "Third party primary phone" + And I see "" in the same row as "Third party email" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500189 |DOE |SW1H 9AJ |email@outlook.com|415170401 | + + +@Regression_Single @JDB-3614 +Scenario Outline: English 3rd Party Gives Email and Juror Phone + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By email" checkbox + And I set "Enter your email address" to "TPEmail@outlook.com" + And I set "Enter your email address again" to "TPEmail@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Give a different phone number for the juror" + And I set "Main phone number" to "0207 821 4545" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #The person can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + When I see text "0207 821 4545" in the same row as "Main phone" + And I see text "TPEmail@outlook.com" in the same row as "Your email address" + And I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent an email to say you have replied to this jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "641500725" on the page + + #Check that TP email only appears for TP and juror phone only appears for juror + + When I see "0207 821 4545" in the same row as "Main Phone" + And I see "" in the same row as "Email" + And I see "TPEmail@outlook.com" in the same row as "Third party email" + And I see "" in the same row as "Third party primary phone" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500725 |DOE |SW1H 9AJ |email@outlook.com|415170401| + +@Regression @JDB-4241 +Scenario Outline: English 3rd Party cannot proceed with response with missing phone + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By email" checkbox + And I set "Enter your email address" to "TPEmail@outlook.com" + And I set "Enter your email address again" to "TPEmail@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select a phone number for us to use to contact you or the juror" on the page + + When I set the radio button to "Use the phone number that you have already given to contact you" + And I press the "Continue" button + Then I see "You have not provided any phone number information. Please select the other option." on the page + + When I set the radio button to "Give a different phone number for the juror" + And I set "Main phone number" to "0207 821 1818" + And I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500580 |DOE |SW1H 9AJ |email@outlook.com|415170401| + +@Regression @JDB-4241 +Scenario Outline: English 3rd Party cannot proceed with response with missing email + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "02078211818" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select an email address for us to use to contact you or the juror" on the page + + When I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + Then I see "You have not provided any email address information. Please select the other option." on the page + + When I set the radio button to "Give a different email address for the juror" + And I set "Enter email address" to "email@outlook.com" + And I set "Enter the email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500584 |DOE |SW1H 9AJ |email@outlook.com|415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/a_StepList.feature b/src/test/resources/cucumber/features/a_StepList.feature new file mode 100644 index 00000000..64f0f0d2 --- /dev/null +++ b/src/test/resources/cucumber/features/a_StepList.feature @@ -0,0 +1,10 @@ +Feature: Step Generator + +@stepGenerator +Scenario: asdf + Given a + Given I reset the password to "password" + And that "<username>" has never logged in before + + + diff --git a/src/test/resources/cucumber/features/dashboard/Dashboard.feature b/src/test/resources/cucumber/features/dashboard/Dashboard.feature new file mode 100644 index 00000000..7befcb76 --- /dev/null +++ b/src/test/resources/cucumber/features/dashboard/Dashboard.feature @@ -0,0 +1,431 @@ +Feature: Dashboard + +@dashboard +Scenario Outline: Dashboard - Summons Sent and responded and not responded + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no1> |<pool_no> |400 | + |<part_no2> |<pool_no> |400 | + |<part_no3> |<pool_no> |400 | + |<part_no4> |<pool_no> |400 | + |<part_no5> |<pool_no> |400 | + |<part_no6> |<pool_no> |400 | + |<part_no7> |<pool_no> |400 | + |<part_no8> |<pool_no> |400 | + |<part_no9> |<pool_no> |400 | + |<part_no10> |<pool_no> |400 | + |<part_no11> |<pool_no> |400 | + |<part_no12> |<pool_no> |400 | + |<part_no13> |<pool_no> |400 | + |<part_no14> |<pool_no> |400 | + |<part_no15> |<pool_no> |400 | + |<part_no16> |<pool_no> |400 | + |<part_no17> |<pool_no2>|400 | + + Given the dashboard tables have been cleared + + #Set juror name and postcode + And "<part_no1>" has "LNAME" as "<last_name>" + And "<part_no1>" has "ZIP" as "<postcode>" + And "<part_no2>" has "LNAME" as "<last_name>" + And "<part_no2>" has "ZIP" as "<postcode>" + And "<part_no3>" has "LNAME" as "<last_name>" + And "<part_no3>" has "ZIP" as "<postcode>" + And "<part_no4>" has "LNAME" as "<last_name>" + And "<part_no4>" has "ZIP" as "<postcode>" + And "<part_no5>" has "LNAME" as "<last_name>" + And "<part_no5>" has "ZIP" as "<postcode>" + And "<part_no6>" has "LNAME" as "<last_name>" + And "<part_no6>" has "ZIP" as "<postcode>" + And "<part_no7>" has "LNAME" as "<last_name>" + And "<part_no7>" has "ZIP" as "<postcode>" + And "<part_no8>" has "LNAME" as "<last_name>" + And "<part_no8>" has "ZIP" as "<postcode>" + And "<part_no9>" has "LNAME" as "<last_name>" + And "<part_no9>" has "ZIP" as "<postcode>" + And "<part_no10>" has "LNAME" as "<last_name>" + And "<part_no10>" has "ZIP" as "<postcode>" + And "<part_no11>" has "LNAME" as "<last_name>" + And "<part_no11>" has "ZIP" as "<postcode>" + And "<part_no12>" has "LNAME" as "<last_name>" + And "<part_no12>" has "ZIP" as "<postcode>" + And "<part_no13>" has "LNAME" as "<last_name>" + And "<part_no13>" has "ZIP" as "<postcode>" + And "<part_no14>" has "LNAME" as "<last_name>" + And "<part_no14>" has "ZIP" as "<postcode>" + And "<part_no15>" has "LNAME" as "<last_name>" + And "<part_no15>" has "ZIP" as "<postcode>" + And "<part_no16>" has "LNAME" as "<last_name>" + And "<part_no16>" has "ZIP" as "<postcode>" +# And "<part_no17>" has "LNAME" as "<last_name>" +# And "<part_no17>" has "ZIP" as "<postcode>" + + #Insert an RSUM row in PART_HIST + Given an RSUM row is generated for juror "<part_no1>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no2>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no3>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no4>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no5>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no6>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no7>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no8>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no9>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no10>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no11>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no12>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no13>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no14>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no15>" in pool "<pool_no>" + Given an RSUM row is generated for juror "<part_no16>" in pool "<pool_no>" +# Given an RSUM row is generated for juror "<part_no17>" in pool "<pool_no2>" + + #Set summons date + And "<part_no1>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no2>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no3>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no4>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no5>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no6>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no13>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no7>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no8>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no9>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no10>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no11>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no12>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no14>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no15>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + And "<part_no16>" has "PART_HIST" . "DATE_PART" as "-22 mondays time" where "HISTORY_CODE" is "RSUM" +# And "<part_no17>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RSUM" + + #Set ret_date in the future to allow response to work + Given "<part_no1>" has "RET_DATE" as "2 mondays time" + And "<part_no1>" has "NEXT_DATE" as "2 mondays time" + Given "<part_no3>" has "RET_DATE" as "5 mondays time" + And "<part_no3>" has "NEXT_DATE" as "5 mondays time" + Given "<part_no5>" has "RET_DATE" as "5 mondays time" + And "<part_no5>" has "NEXT_DATE" as "5 mondays time" + Given "<part_no6>" has "RET_DATE" as "5 mondays time" + And "<part_no6>" has "NEXT_DATE" as "5 mondays time" + Given "<part_no7>" has "RET_DATE" as "2 mondays time" + And "<part_no7>" has "NEXT_DATE" as "2 mondays time" + Given "<part_no9>" has "RET_DATE" as "5 mondays time" + And "<part_no9>" has "NEXT_DATE" as "5 mondays time" + Given "<part_no11>" has "RET_DATE" as "5 mondays time" + And "<part_no11>" has "NEXT_DATE" as "5 mondays time" + Given "<part_no12>" has "RET_DATE" as "5 mondays time" + And "<part_no12>" has "NEXT_DATE" as "5 mondays time" + Given "<part_no13>" has "RET_DATE" as "2 mondays time" + And "<part_no13>" has "NEXT_DATE" as "2 mondays time" + Given "<part_no14>" has "RET_DATE" as "2 mondays time" + And "<part_no14>" has "NEXT_DATE" as "2 mondays time" + Given "<part_no16>" has "RET_DATE" as "5 mondays time" + And "<part_no16>" has "NEXT_DATE" as "5 mondays time" +# Given "<part_no17>" has "RET_DATE" as "2 mondays time" +# And "<part_no17>" has "NEXT_DATE" as "2 mondays time" + + # Submit response in juror digital + Given auto straight through processing has been enabled + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no1> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no3> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no7> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no9> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no13>|<pool_no> |<last_name> |<postcode> |<email>| + |<part_no14>|<pool_no> |<last_name> |<postcode> |<email>| + |<part_no16>|<pool_no> |<last_name> |<postcode> |<email>| +# |<part_no17>|<pool_no2> |<last_name> |<postcode> |<email>| + + Given I have submitted a first party Welsh straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no5> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no11>|<pool_no> |<last_name> |<postcode> |<email>| + + Given I have submitted a third party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no6> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no12>|<pool_no> |<last_name> |<postcode> |<email>| + + #Process as responded + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no1>" + And I press the "Search" button + And I click on "<part_no1>" in the same row as "<part_no1>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + When I click on the "Search" link + And I set "Juror number" to "<part_no6>" + And I press the "Search" button + And I click on "<part_no6>" in the same row as "<part_no6>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + When I click on the "Search" link + And I set "Juror number" to "<part_no7>" + And I press the "Search" button + And I click on "<part_no7>" in the same row as "<part_no7>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + When I click on the "Search" link + And I set "Juror number" to "<part_no12>" + And I press the "Search" button + And I click on "<part_no12>" in the same row as "<part_no12>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + + #Insert a RESP row in PART_HIST + Given an RESP row is generated for juror "<part_no4>" in pool "<pool_no>" + Given an RESP row is generated for juror "<part_no10>" in pool "<pool_no>" + + #update the resp date + And "<part_no1>" has "PART_HIST" . "DATE_PART" as "-21 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no1>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no3>" has "PART_HIST" . "DATE_PART" as "-20 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no3>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no4>" has "PART_HIST" . "DATE_PART" as "-20 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no4>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no5>" has "PART_HIST" . "DATE_PART" as "-19 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no5>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no6>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no6>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no7>" has "PART_HIST" . "DATE_PART" as "-17 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no7>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no9>" has "PART_HIST" . "DATE_PART" as "-16 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no9>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no10>" has "PART_HIST" . "DATE_PART" as "-16 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no10>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no11>" has "PART_HIST" . "DATE_PART" as "-15 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no11>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no12>" has "PART_HIST" . "DATE_PART" as "-14 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no12>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no13>" has "PART_HIST" . "DATE_PART" as "-18 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no13>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no14>" has "PART_HIST" . "DATE_PART" as "-14 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no14>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + And "<part_no16>" has "PART_HIST" . "DATE_PART" as "-20 mondays time" where "HISTORY_CODE" is "RESP" + And "<part_no16>" has "PART_HIST" . "USER_ID" as "AUTO" where "HISTORY_CODE" is "RESP" +# And "<part_no17>" has "PART_HIST" . "DATE_PART" as "-14 mondays time" where "HISTORY_CODE" is "RESP" +# And "<part_no17>" has "PART_HIST" . "USER_ID" as "CPASS" where "HISTORY_CODE" is "RESP" + +# #Insert a PUND row in PART_HIST (undelivered) + Given an PUND row is generated for juror "<part_no15>" in pool "<pool_no>" + + #update the PUND date (undelivered) + And "<part_no15>" has "PART_HIST" . "DATE_PART" as "-17 mondays time" where "HISTORY_CODE" is "PUND" + + #update status to 9 (undelivered) + Given "<part_no15>" has "STATUS" as "9" + + #Set ret_date to be in the past + Given "<part_no1>" has "RET_DATE" as "-11 mondays time" + And "<part_no1>" has "NEXT_DATE" as "-11 mondays time" + Given "<part_no2>" has "RET_DATE" as "-11 mondays time" + And "<part_no2>" has "NEXT_DATE" as "-11 mondays time" + Given "<part_no3>" has "RET_DATE" as "-11 mondays time" + And "<part_no3>" has "NEXT_DATE" as "-11 mondays time" + Given "<part_no4>" has "RET_DATE" as "-11 mondays time" + And "<part_no4>" has "NEXT_DATE" as "-11 mondays time" + Given "<part_no5>" has "RET_DATE" as "-11 mondays time" + And "<part_no5>" has "NEXT_DATE" as "-11 mondays time" + Given "<part_no6>" has "RET_DATE" as "-11 mondays time" + And "<part_no6>" has "NEXT_DATE" as "-11 mondays time" + Given "<part_no7>" has "RET_DATE" as "-7 mondays time" + And "<part_no7>" has "NEXT_DATE" as "-7 mondays time" + Given "<part_no8>" has "RET_DATE" as "-7 mondays time" + And "<part_no8>" has "NEXT_DATE" as "-7 mondays time" + Given "<part_no9>" has "RET_DATE" as "-7 mondays time" + And "<part_no9>" has "NEXT_DATE" as "-7 mondays time" + Given "<part_no10>" has "RET_DATE" as "-7 mondays time" + And "<part_no10>" has "NEXT_DATE" as "-7 mondays time" + Given "<part_no11>" has "RET_DATE" as "-7 mondays time" + And "<part_no11>" has "NEXT_DATE" as "-7 mondays time" + Given "<part_no12>" has "RET_DATE" as "-7 mondays time" + And "<part_no12>" has "NEXT_DATE" as "-7 mondays time" + Given "<part_no13>" has "RET_DATE" as "-11 mondays time" + And "<part_no13>" has "NEXT_DATE" as "-11 mondays time" + Given "<part_no14>" has "RET_DATE" as "-7 mondays time" + And "<part_no14>" has "NEXT_DATE" as "-7 mondays time" + Given "<part_no16>" has "RET_DATE" as "-11 mondays time" + And "<part_no16>" has "NEXT_DATE" as "-11 mondays time" +# Given "<part_no17>" has "RET_DATE" as "-7 mondays time" + And "<part_no17>" has "NEXT_DATE" as "-7 mondays time" + And "<part_no1>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no1>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no2>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no2>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no3>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no3>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no4>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no4>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no5>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no5>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no6>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no6>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no7>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no7>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no8>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no8>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no9>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no9>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no10>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no10>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no11>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no11>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no12>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no12>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no13>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no13>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no14>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no14>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no16>" has "UNIQUE_POOL" . "RETURN_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" + And "<part_no16>" has "UNIQUE_POOL" . "NEXT_DATE" as "-7 mondays time" where "POOL_NO" is "<pool_no>" +# And "<part_no17>" has "UNIQUE_POOL" . "RETURN_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no2>" +# And "<part_no17>" has "UNIQUE_POOL" . "NEXT_DATE" as "-11 mondays time" where "POOL_NO" is "<pool_no2>" + + #set received date to be in the past + Given the "date_received" for juror "<part_no1>" is set to "-21 mondays time" + Given the "date_received" for juror "<part_no3>" is set to "-20 mondays time" + Given the "date_received" for juror "<part_no5>" is set to "-19 mondays time" + Given the "date_received" for juror "<part_no6>" is set to "-18 mondays time" + Given the "date_received" for juror "<part_no7>" is set to "-17 mondays time" + Given the "date_received" for juror "<part_no9>" is set to "-16 mondays time" + Given the "date_received" for juror "<part_no11>" is set to "-15 mondays time" + Given the "date_received" for juror "<part_no12>" is set to "-14 mondays time" + Given the "date_received" for juror "<part_no13>" is set to "-13 mondays time" + Given the "date_received" for juror "<part_no14>" is set to "-12 mondays time" + Given the "date_received" for juror "<part_no16>" is set to "-20 mondays time" +# Given the "date_received" for juror "<part_no17>" is set to "-12 mondays time" + + #set completed detail to be in the past + Given the "completed_at" for juror "<part_no1>" is set to "-21 mondays time" + Given the "staff_assignment_date" for juror "<part_no1>" is set to "-21 mondays time" + Given the "completed_at" for juror "<part_no3>" is set to "-20 mondays time" + Given the "staff_assignment_date" for juror "<part_no3>" is set to "-20 mondays time" + Given the "completed_at" for juror "<part_no5>" is set to "-19 mondays time" + Given the "staff_assignment_date" for juror "<part_no5>" is set to "-19 mondays time" + Given the "completed_at" for juror "<part_no6>" is set to "-18 mondays time" + Given the "staff_assignment_date" for juror "<part_no6>" is set to "-18 mondays time" + Given the "completed_at" for juror "<part_no7>" is set to "-17 mondays time" + Given the "staff_assignment_date" for juror "<part_no7>" is set to "-17 mondays time" + Given the "completed_at" for juror "<part_no9>" is set to "-16 mondays time" + Given the "staff_assignment_date" for juror "<part_no9>" is set to "-16 mondays time" + Given the "completed_at" for juror "<part_no11>" is set to "-15 mondays time" + Given the "staff_assignment_date" for juror "<part_no11>" is set to "-15 mondays time" + Given the "completed_at" for juror "<part_no12>" is set to "-14 mondays time" + Given the "staff_assignment_date" for juror "<part_no12>" is set to "-14 mondays time" + Given the "completed_at" for juror "<part_no16>" is set to "-20 mondays time" + Given the "staff_assignment_date" for juror "<part_no16>" is set to "-20 mondays time" +# Given the "completed_at" for juror "<part_no17>" is set to "-14 mondays time" +# Given the "staff_assignment_date" for juror "<part_no17>" is set to "-14 mondays time" + +Examples: +##feb dates +#part_no1 is digital responded +#part_no2 is not responded +#part_no3 is auto responded +#part_no4 is responded by post +#part_no5 is digital responded Welsh +#part_no6 is 3rd party +#part_no13 is unprocessed +##march dates +#part_no7 is digital responded +#part_no8 is not responded +#part_no9 is auto responded +#part_no10 is responded by post +#part_no11 is digital responded Welsh +#part_no12 is 3rd party +#part_no14 is unprocessed +#part_no15 is undelivered + |part_no1 |part_no2 |part_no3 |part_no4 |part_no5 |part_no6 |part_no7 |part_no8 |part_no9 |part_no10 |part_no11 |part_no12 |part_no13 |part_no14 |part_no15 |part_no16 |pool_no |part_no17 |pool_no2 |email |last_name |postcode | + |645700161 |645700475 |645700578 |645700305 |645700634 |645700351 |645700989 |645700437 |645700508 |645700328 |645700776 |645700531 |645700639 |645700736 |645700470 |645700813 |457170401 |641500616 |415170401 |d.bach@cgi.com |LNAME |SA1 4PF | + +@dashboard +Scenario: Dashboard - Summons Sent and responded and not responded + Given I am on "Dashboard" "juror-test01" + + #clear values + + When I select "" from the "startMonth" dropdown on the Dashboard + When I select "" from the "endMonth" dropdown on the Dashboard + When I select "" from the "startYear" dropdown on the Dashboard + When I select "" from the "endYear" dropdown on the Dashboard + + #no date values + + And I press the "Submit" button + Then I see "Enter the start month" on the page + Then I see "Enter the start year" on the page + Then I see "Enter the end month" on the page + Then I see "Enter the end year" on the page + + #only start values + + When I select "January" from the "startMonth" dropdown on the Dashboard + When I select "2020" from the "startYear" dropdown on the Dashboard + When I select "" from the "endMonth" dropdown on the Dashboard + When I select "" from the "endYear" dropdown on the Dashboard + + And I press the "Submit" button + + Then I see "Enter the end month" on the page + Then I see "Enter the end year" on the page + + #only end values + + When I select "" from the "startMonth" dropdown on the Dashboard + When I select "" from the "startYear" dropdown on the Dashboard + When I select "January" from the "endMonth" dropdown on the Dashboard + When I select "2020" from the "endYear" dropdown on the Dashboard + + And I press the "Submit" button + + Then I see "Enter the start month" on the page + Then I see "Enter the start year" on the page + + #start and end values the same + + When I select "May" from the "startMonth" dropdown on the Dashboard + When I select "May" from the "endMonth" dropdown on the Dashboard + When I select "2020" from the "startYear" dropdown on the Dashboard + When I select "2020" from the "endYear" dropdown on the Dashboard + + And I press the "Submit" button + Then I see "Showing data from May 2020 to May 2020" on the page + + #start value after end value + + When I select "April" from the "startMonth" dropdown on the Dashboard + When I select "2020" from the "startYear" dropdown on the Dashboard + When I select "January" from the "endMonth" dropdown on the Dashboard + When I select "2020" from the "endYear" dropdown on the Dashboard + + And I press the "Submit" button + + Then I see "Check the end date is later than the start date" on the page + + #end value before start value + + When I select "January" from the "endMonth" dropdown on the Dashboard + When I select "2020" from the "endYear" dropdown on the Dashboard + When I select "April" from the "startMonth" dropdown on the Dashboard + When I select "2020" from the "startYear" dropdown on the Dashboard + + And I press the "Submit" button + + Then I see "Check the end date is later than the start date" on the page diff --git a/src/test/resources/cucumber/features/dashboard/Dashboard_Content.feature b/src/test/resources/cucumber/features/dashboard/Dashboard_Content.feature new file mode 100644 index 00000000..79eadaa1 --- /dev/null +++ b/src/test/resources/cucumber/features/dashboard/Dashboard_Content.feature @@ -0,0 +1,58 @@ +Feature: Dashboard + +@dashboard @ostest +Scenario: Dashboard - Content + Given I am on "Dashboard" "juror-test01" + + And I see "Reply to a jury summons" on the page + And I see "This dashboard shows information about how the Reply to a jury summons service is currently performing." on the page + And I see "These figures are valid from July 2018 when the service launched." on the page + + Then I see "Total summonses sent" on the page + Then I see "Number of online replies" on the page + Then I see "Digital take-up" on the page + + And I see link with text "contact the product manager" + Then I see "These figures are since August 2019 when more detailed reporting was implemented. If you require data before August 2019 please contact the product manager, Janet Healey." on the page + Then I see "Select a monthly date range" on the page + + When I select "January" from the "startMonth" dropdown on the Dashboard + When I select "2020" from the "startYear" dropdown on the Dashboard + + When I select "December" from the "endMonth" dropdown on the Dashboard + When I select "2020" from the "endYear" dropdown on the Dashboard + + And I press the "Submit" button + + Then I see "Number of summonses sent" on the page + And I see "Replied" on the page + And I see "Not replied" on the page + + And I see "How did the citizen respond?" on the page + Then I see "Online (Total)" on the page + Then I see "Online (Welsh)" on the page + And I see "By post" on the page + #Then I see "*This is the number of summons replies that have been returned by citizens but are either waiting to be processed by jury summonsing officers or have been received late and processed by the court." on the page + + Then I see "Who replied to the summons online?" on the page + And I see "Juror" on the page + And I see "Third party" on the page + Then I see "How many online replies were automatically processed?" on the page + And I see "Automatically processed" on the page + Then I see "When were replies received?" on the page + + + Then I see "Levels of citizen satisfaction" on the page + And I see "Percentage of citizens completing a feedback form" on the page + And I see "Percentage of citizens 'Very satisfied or satisfied'" on the page + + And I see "Very satisfied" on the page + And I see "Satisfied" on the page + And I see "Neither satisfied or dissatisfied" on the page + And I see "Dissatisfied" on the page + And I see "Very dissatisfied" on the page + + + + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/dashboard/DefExcusDashboard_Content.feature b/src/test/resources/cucumber/features/dashboard/DefExcusDashboard_Content.feature new file mode 100644 index 00000000..fecde866 --- /dev/null +++ b/src/test/resources/cucumber/features/dashboard/DefExcusDashboard_Content.feature @@ -0,0 +1,145 @@ +Feature: Deferral and Excusal Dashboard + +@dashboard +Scenario: Dashboard - Content + Given I am on "defexcusdash" "juror-test02" + + And I see "Juror Deferrals & Excusals" on the page + And I see "This dashboard displays information on juror deferrals and excusals." on the page + And I see "Configure Report" on the page + + Then I see "Deferrals/Excusals" on the page + Then I see "Bureau/Court" on the page + Then I see "Calendar Year" on the page + Then I see "Financial Year" on the page + Then I see "From" on the page + Then I see "To" on the page + Then I see "Reasons:" on the page + + When I select "All" from the "deferralExcusal" dropdown on the Dashboard + When I select "All" from the "bureauCourt" dropdown on the Dashboard + + When I select "2020" from the "calYear" dropdown on the Dashboard + When I select "2020/21" from the "finYear" dropdown on the Dashboard + + And I press the "Select all" button + And I press the "Select none" button + + And I press the "Submit" button + + And I see "Deferrals/Excusals by Bureau/Court: 01-04-2020 to 31-03-2021" on the page + +@dashboard +Scenario: Dashboard - Vary parameters + Given I am on "defexcusdash" "juror-test02" + + And I see "Juror Deferrals & Excusals" on the page + + #Deferrals/Excusals + + When I select "Deferrals" from the "deferralExcusal" dropdown on the Dashboard + When I select "Excusals" from the "deferralExcusal" dropdown on the Dashboard + When I select "All" from the "deferralExcusal" dropdown on the Dashboard + + #Bureau/Court + + When I select "Bureau" from the "bureauCourt" dropdown on the Dashboard + When I select "Court" from the "bureauCourt" dropdown on the Dashboard + When I select "All" from the "bureauCourt" dropdown on the Dashboard + + #Calendar Year + + When I select "2015" from the "calYear" dropdown on the Dashboard + When I select "2016" from the "calYear" dropdown on the Dashboard + When I select "2017" from the "calYear" dropdown on the Dashboard + When I select "2018" from the "calYear" dropdown on the Dashboard + When I select "2019" from the "calYear" dropdown on the Dashboard + When I select "2020" from the "calYear" dropdown on the Dashboard + When I select "2021" from the "calYear" dropdown on the Dashboard + + #Financial Year + + When I select "2015/16" from the "finYear" dropdown on the Dashboard + When I select "2016/17" from the "finYear" dropdown on the Dashboard + When I select "2017/18" from the "finYear" dropdown on the Dashboard + When I select "2018/19" from the "finYear" dropdown on the Dashboard + When I select "2019/20" from the "finYear" dropdown on the Dashboard + When I select "2020/21" from the "finYear" dropdown on the Dashboard + When I select "2021/22" from the "finYear" dropdown on the Dashboard + + #manually set date fields + + When I set input field with "id" of "startDate" to "99/01/2019" + And I set input field with "id" of "endDate" to "99/12/2019" + + And I press the "Submit" button + + When I set input field with "id" of "startDate" to "01/01/2019" + And I set input field with "id" of "endDate" to "31/12/2019" + + #Reasons + + And I press the "Select all" button + Then "Deceased" is checked + Then "Recently Served" is checked + Then "The Forces" is checked + Then "Postponement Of Service" is checked + Then "Religious Reasons" is checked + Then "Child Care" is checked + Then "Work Related" is checked + Then "Medical" is checked + Then "Travelling Difficulties" is checked + Then "Moved From Area" is checked + Then "Other" is checked + Then "Student" is checked + Then "Language Difficulties" is checked + Then "Holiday" is checked + Then "Carer" is checked + Then "Works In Administration Of Justice" is checked + Then "Mental Health" is checked + Then "Excuse By Bureau, Too Many Jurors" is checked + + And I press the "Select none" button + Then "Deceased" is unchecked + Then "Recently Served" is unchecked + Then "The Forces" is unchecked + Then "Postponement Of Service" is unchecked + Then "Religious Reasons" is unchecked + Then "Child Care" is unchecked + Then "Work Related" is unchecked + Then "Medical" is unchecked + Then "Travelling Difficulties" is unchecked + Then "Moved From Area" is unchecked + Then "Other" is unchecked + Then "Student" is unchecked + Then "Language Difficulties" is unchecked + Then "Holiday" is unchecked + Then "Carer" is unchecked + Then "Works In Administration Of Justice" is unchecked + Then "Mental Health" is unchecked + Then "Excuse By Bureau, Too Many Jurors" is unchecked + + #Check count for Excusals/Deferrals with reason Deceased cal year 2020 +# +# When I select "2020" from the "calYear" dropdown on the Dashboard +# When I select "All" from the "deferralExcusal" dropdown on the Dashboard +# When I select "All" from the "bureauCourt" dropdown on the Dashboard +# And I check the "Deceased" checkbox +# And I press the "Submit" button +# +# And I see "Deferrals/Excusals by Bureau/Court: 01-01-2020 to 31-12-2020" on the page +# And I see "Deceased (1986)" on the page +# +# #Check count for Excusals with reason Deceased cal year 2020 +# +# When I select "Excusals" from the "deferralExcusal" dropdown on the Dashboard +# And I press the "Submit" button +# And I see "Excusals by Bureau/Court: 01-01-2020 to 31-12-2020" on the page +# And I see "Deceased (1985)" on the page +# +# #Check count for Deferrals with reason Deceased cal year 2020 +# +# When I select "Deferrals" from the "deferralExcusal" dropdown on the Dashboard +# And I press the "Submit" button +# And I see "Deferrals by Bureau/Court: 01-01-2020 to 31-12-2020" on the page +# And I see "Deceased (1)" on the page \ No newline at end of file diff --git a/src/test/resources/cucumber/features/database/CP2-567.feature b/src/test/resources/cucumber/features/database/CP2-567.feature new file mode 100644 index 00000000..61d5d081 --- /dev/null +++ b/src/test/resources/cucumber/features/database/CP2-567.feature @@ -0,0 +1,9 @@ +@ADMIN_Regression @CP2-567 +Feature: Basic column check for SUBSCRIPTION_USERS.NOTIFICATION_STATUS + +Scenario: Column Checks + Given "notification_status" exists in "crime_portal_db" "subscription_users" for the "front" end + Then I see 1 row for "front" "crime_portal_db" "information_schema.columns" where "table_name" is "subscription_users" and "column_name" is "notification_status" and "data_type" is "character varying" + #Then I see 1 row for "front" "crime_portal_db" "information_schema.columns" where "table_name" is "subscription_users" and "column_name" is "notification_status" and "character_maximum_length" is 3 + Then I see 1 row for "front" "crime_portal_db" "information_schema.columns" where "table_name" is "subscription_users" and "column_name" is "notification_status" and "column_default" is "'ON'::character varying" + Then I see 1 row for "front" "crime_portal_db" "information_schema.columns" where "table_name" is "subscription_users" and "column_name" is "notification_status" and "udt_name" is "varchar" diff --git a/src/test/resources/cucumber/features/database/GW.feature b/src/test/resources/cucumber/features/database/GW.feature new file mode 100644 index 00000000..e28c96f3 --- /dev/null +++ b/src/test/resources/cucumber/features/database/GW.feature @@ -0,0 +1,21 @@ +@ADMIN_Features @DB_GATEWAY_Basic +Feature: Basic database testing against Oracle + +Scenario: Table Exists Check + Given "message_audit" table exists within the "cp_soap_gateway_owner" schema + #select * from SYS.all_tables where owner='CP_SOAP_GATEWAY_OWNER' + +Scenario: Column Checks + #select * from SYS.ALL_TAB_COLS where owner='CP_SOAP_GATEWAY_OWNER' and table_name='MESSAGE_AUDIT' + Then "CP_SOAP_GATEWAY_OWNER"."MESSAGE_AUDIT" has column "VERSION_NUMBER" with "DATA_TYPE" "NUMBER" + + Then "CP_SOAP_GATEWAY_OWNER"."MESSAGE_AUDIT" has column "VERSION_NUMBER" with "NULLABLE" "Y" + Then "CP_SOAP_GATEWAY_OWNER"."MESSAGE_AUDIT" has column "VERSION_NUMBER" with "HIDDEN_COLUMN" "NO" + + + Then "CP_SOAP_GATEWAY_OWNER"."MESSAGE_AUDIT" has column "UPDATED_DATE" with "DATA_TYPE" "TIMESTAMP(6)" + Then "CP_SOAP_GATEWAY_OWNER"."MESSAGE_AUDIT" has column "ACTION_TYPE" with "CHAR_LENGTH" "200" + + #SELECT cols.column_name FROM all_constraints cons NATURAL JOIN all_cons_columns cols WHERE cons.constraint_type = 'P' AND table_name = UPPER('MESSAGE_AUDIT'); + Then "CP_SOAP_GATEWAY_OWNER"."MESSAGE_AUDIT" has constraint type "P" for column "MESSAGE_AUDIT_ID" + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/database/RDS.feature b/src/test/resources/cucumber/features/database/RDS.feature new file mode 100644 index 00000000..c0bfa187 --- /dev/null +++ b/src/test/resources/cucumber/features/database/RDS.feature @@ -0,0 +1,14 @@ +@ADMIN_Features @CP2-371 +Feature: Basic RDS Schema exists + +Scenario: Basic RDS Tables Exist + Given "acknowledgement_message" table exists within the "RDS" schema + Given "compression_list" table exists within the "RDS" schema + Given "data_audit" table exists within the "RDS" schema + Given "databasechangelog" table exists within the "RDS" schema + Given "databasechangeloglock" table exists within the "RDS" schema + Given "internal_error_message" table exists within the "RDS" schema + Given "log_message" table exists within the "RDS" schema + Given "message_audit" table exists within the "RDS" schema + Given "message_status" table exists within the "RDS" schema + #select * from SYS.all_tables where owner='CP_SOAP_GATEWAY_OWNER' diff --git a/src/test/resources/cucumber/features/expenses/expenses_E2E.feature b/src/test/resources/cucumber/features/expenses/expenses_E2E.feature new file mode 100644 index 00000000..2836380c --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_E2E.feature @@ -0,0 +1,533 @@ +Feature: ExpensesE2E + +#expensesFullClaimE2E +#expensesNoExpensesE2E +#expensesEarnLess64E2E +#expensesPartialClaimE2E +#expensesChangeAnswersE2E +#expensesStraightThrough +#expensesNavigationTravelTypes + +@expenses +Scenario: expensesFullClaimE2E + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + #loseincome + Then I see "Will you lose any income while doing jury service?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + #earnings + Then I see "Do you earn more than £64.95 each day on the days you work?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + #earningsamount + Then I set "£ each day" to "25" + When I press the "Continue" button + + #extracosts + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + #extracostsamount + Then I see "What will the total be for these extra costs each day?" on the page + And I set "£" to "30" + When I press the "Continue" button + + #traveltypes + Then I see "How will you travel to the court?" on the page + And I check the "Bicycle" checkbox + And I check the "Car" checkbox + And I check the "Motorcycle" checkbox + And I check the "Public transport" checkbox + And I check the "Walking" checkbox + When I press the "Continue" button + + #setbikemiles + And I set "Miles each day" to "2" + When I press the "Continue" button + + #setcarmiles + And I set "Miles each day" to "2" + When I press the "Continue" button + + #setmotorbikemiles + And I set "Miles each day" to "2" + When I press the "Continue" button + + #parking + Then I see "Will you need to pay for parking?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + #cantclaimforparking + Then I see "Claiming for parking" on the page + When I press the "Continue" button + + #publictransportcost + Then I set "Cost of all your tickets in £ each day" to "20.99" + When I press the "Continue" button + + #checkyouranswers + Then I see "Check your answers" on the page + And I see text "£30.00" in the same row as "Total value of extra costs" + When I press the "Continue" button + + #totals + Then I see "You should be able to claim" on the page + And I see "Start again" on the page + +@expenses +Scenario: expensesNoExpensesE2E + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I see "Will you lose any income while doing jury service?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + Then I see "How will you travel to the court?" on the page + And I check the "Walking" checkbox + When I press the "Continue" button + + Then I see "Check your answers" on the page + When I press the "Continue" button + + Then I see "You should be able to claim" on the page + Then I see "£5.71 per day" on the page + And I see "Start again" on the page + +@expenses +Scenario: expensesEarnLess64E2E + + Given I am on expenses on "expenses" "juror-test01" + Then I see "Check what you can claim for jury service" on the page + + #see if it runs now + + And I press the "Start now" button + + Then I see "Will you lose any income while doing jury service?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Do you earn more than £64.95 each day on the days you work?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + Then I see "How much do you earn each day?" on the page + Then I set "£ each day" to "25" + When I press the "Continue" button + + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + Then I see "How will you travel to the court?" on the page + And I check the "Public transport" checkbox + When I press the "Continue" button + + Then I see "Total cost of public transport each day" on the page + Then I set "Cost of all your tickets in £ each day" to "20.99" + When I press the "Continue" button + + Then I see "Check your answers" on the page + When I press the "Continue" button + + Then I see "You should be able to claim" on the page + And I see "£51.70" on the page + And I see "Start again" on the page + +@expenses +Scenario: expensesPartialClaimE2E + + Given I am on expenses on "expenses" "juror-test01" + Then I see "Check what you can claim for jury service" on the page + + And I press the "Start now" button + + Then I see "Will you lose any income while doing jury service?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "What will the total be for these extra costs each day?" on the page + And I set "£" to "30" + When I press the "Continue" button + + Then I see "How will you travel to the court?" on the page + And I check the "Car" checkbox + When I press the "Continue" button + + Then I see "Total miles you'll travel each day by car" on the page + And I set "Miles" to "2" + When I press the "Continue" button + + Then I see "Will you need to pay for parking?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Claiming for parking" on the page + When I press the "Continue" button + + Then I see "Check your answers" on the page + When I press the "Continue" button + + Then I see "You should be able to claim" on the page + And I see "Start again" on the page + +@expenses +Scenario: expensesChangeAnswersE2E + + Given I am on expenses on "expenses" "juror-test01" + Then I see "Check what you can claim for jury service" on the page + + And I press the "Start now" button + + Then I see "Will you lose any income while doing jury service?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Do you earn more than £64.95 each day on the days you work?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "What will the total be for these extra costs each day?" on the page + And I set "£" to "30" + When I press the "Continue" button + + Then I see "How will you travel to the court?" on the page + And I check the "Bicycle" checkbox + And I check the "Car" checkbox + And I check the "Motorcycle" checkbox + And I check the "Public transport" checkbox + And I check the "Walking" checkbox + When I press the "Continue" button + + Then I see "Total miles you'll cycle each day" on the page + And I set "Miles" to "2" + When I press the "Continue" button + Then I see "Total miles you'll travel each day by car" on the page + And I set "Miles" to "2" + When I press the "Continue" button + Then I see "Total miles you'll travel each day by motorcycle" on the page + And I set "Miles" to "2" + When I press the "Continue" button + Then I see "Will you need to pay for parking?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Claiming for parking" on the page + When I press the "Continue" button + + Then I see "Total cost of public transport each day" on the page + And I set input field with "id" of "publicTransportAmount" to "20" + When I press the "Continue" button + + Then I see "Check your answers" on the page + And I see text "Yes" in the same row as "Will you lose income?" + And I click on the "Change" link in the same row as "Will you lose income?" + + And I set the radio button to "No" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "No" in the same row as "Will you lose income?" + + And I see text "Yes" in the same row as "Extra costs you wouldn't normally have?" + And I click on the "Change" link in the same row as "Extra costs you wouldn't normally have?" + + And I set the radio button to "No" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "No" in the same row as "Extra costs you wouldn't normally have?" + + And I see text "Bicycle,Car,Motorcycle,Public transport,Walking" in the same row as "How will you travel to court?" + And I click on the "Change" link in the same row as "How will you travel to court?" + + And I uncheck the "Walking" checkbox + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "Bicycle,Car,Motorcycle,Public transport" in the same row as "How will you travel to court?" + + And I see text "2 miles" in the same row as "Miles by bicycle each day" + And I click on the "Change" link in the same row as "Miles by bicycle each day" + + And I set "Miles each day" to "5" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "5 miles" in the same row as "Miles by bicycle each day" + + And I see text "2 miles" in the same row as "Miles by car each day" + And I click on the "Change" link in the same row as "Miles by car each day" + + And I set "Miles each day" to "5" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "5 miles" in the same row as "Miles by car each day" + + And I see text "2 miles" in the same row as "Miles by motorcycle each day" + And I click on the "Change" link in the same row as "Miles by motorcycle each day" + + And I set "Miles each day" to "5" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "5 miles" in the same row as "Miles by motorcycle each day" + + And I see text "2" in the same row as "Cost of public transport each day" + And I click on the "Change" link in the same row as "Cost of public transport each day" + + And I set "£ each day" to "5" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "5.00" in the same row as "Cost of public transport each day" + When I press the "Continue" button + + Then I see "You should be able to claim" on the page + And I see "Start again" on the page + +@expenses +Scenario: expensesStraightThrough + + Given I am on expenses on "expenses" "juror-test01" + + Then I see "Check what you can claim for jury service" on the page + + And I press the "Start now" button + + Then I see "Will you lose any income while doing jury service?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Do you earn more than £64.95 each day on the days you work?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "What will the total be for these extra costs each day?" on the page + And I set "£" to "30" + When I press the "Continue" button + + Then I see "How will you travel to the court?" on the page + And I check the "Bicycle" checkbox + And I check the "Car" checkbox + And I check the "Motorcycle" checkbox + And I check the "Public transport" checkbox + And I check the "Walking" checkbox + When I press the "Continue" button + + Then I see "Total miles you'll cycle each day" on the page + And I set "Miles" to "2" + When I press the "Continue" button + Then I see "Total miles you'll travel each day by car" on the page + And I set "Miles" to "2" + When I press the "Continue" button + Then I see "Total miles you'll travel each day by motorcycle" on the page + And I set "Miles" to "2" + When I press the "Continue" button + Then I see "Will you need to pay for parking?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Claiming for parking" on the page + When I press the "Continue" button + + Then I see "Total cost of public transport each day" on the page + And I set input field with "id" of "publicTransportAmount" to "20" + When I press the "Continue" button + + Then I see "Check your answers" on the page + And I see text "Yes" in the same row as "Will you lose income?" + And I see text "Yes" in the same row as "Do you earn more than " + And I see text "Yes" in the same row as "Extra costs you wouldn't normally have?" + And I see text "£30.00" in the same row as "Total value of extra costs" + And I see text "Bicycle,Car,Motorcycle,Public transport,Walking" in the same row as "How will you travel to court?" + And I see text "2 miles" in the same row as "Miles by bicycle each day" + And I see text "2 miles" in the same row as "Miles by car each day" + And I see text "2 miles" in the same row as "Miles by motorcycle each day" + And I see text "£20.00" in the same row as "Cost of public transport each day" + + When I press the "Continue" button + + Then I see "You should be able to claim" on the page + And I see "Start again" on the page + +@expenses +Scenario: expensesNavigationTravelTypes + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + And I set "£" to "30" + When I press the "Continue" button + + And I check the "Bicycle" checkbox + And I check the "Car" checkbox + And I check the "Motorcycle" checkbox + And I check the "Public transport" checkbox + And I check the "Walking" checkbox + When I press the "Continue" button + + And I set "Miles" to "2" + When I press the "Continue" button + And I set "Miles" to "2" + When I press the "Continue" button + And I set "Miles" to "2" + When I press the "Continue" button + And I set the radio button to "No" + When I press the "Continue" button + + And I see "Total cost of public transport each day" on the page + + #Back link + + And I click on the "Back" link + + #change travel types + + And I see "How will you travel to the court?" on the page + And I uncheck the "Bicycle" checkbox + And I press the "Continue" button + + And I see "Total cost of public transport each day" on the page + + #Back link + + And I click on the "Back" link + + #change travel types + + And I see "How will you travel to the court?" on the page + And I uncheck the "Car" checkbox + And I press the "Continue" button + + And I see "Total cost of public transport each day" on the page + + #Back link + + And I click on the "Back" link + + #change travel types + + And I see "How will you travel to the court?" on the page + And I uncheck the "Motorcycle" checkbox + And I press the "Continue" button + + And I see "Total cost of public transport each day" on the page + + #Back link + + And I click on the "Back" link + + #change travel types + + And I see "How will you travel to the court?" on the page + And I uncheck the "Walking" checkbox + And I press the "Continue" button + + And I see "Total cost of public transport each day" on the page + + #Back link + + And I click on the "Back" link + + #change travel types + + And I see "How will you travel to the court?" on the page + And I check the "Walking" checkbox + And I uncheck the "Public transport" checkbox + And I press the "Continue" button + + Then I see "Check your answers" on the page + + When I press the "Continue" button + + Then I see "You should be able to claim" on the page + And I see "Start again" on the page + +@expenses +Scenario: expensesParkingPage + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + And I set the radio button to "No" + When I press the "Continue" button + + And I check the "Car" checkbox + And I check the "Motorcycle" checkbox + When I press the "Continue" button + + And I set "Miles" to "2" + When I press the "Continue" button + And I set "Miles" to "2" + When I press the "Continue" button + And I see "Will you need to pay for parking?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + And I see "Claiming for parking" on the page + + #parking + + And I see "Not all courts will pay for parking. There may be a maximum amount that a court will pay per day. Check with the court for permission before you claim for parking." on the page + + And I click on the "Back" link + + And I see "Will you need to pay for parking?" on the page + + When I press the "Continue" button + And I see "Claiming for parking" on the page + +@expenses +Scenario: expenses survey link + + Given I am on expenses on "expenses" "bau-test" + + And I press the "Start now" button + + #loseincome + Then I see "Will you lose any income while doing jury service?" on the page + + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Give feedback (opens in a new window or tab)" link + And I switch to the new window + Then I see "Were you able to do what you needed to do today?" on the page + And I see "https://www.smartsurvey.co.uk/s/FO8HDU/" in the URL diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4327.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4327.feature new file mode 100644 index 00000000..a941cc5e --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4327.feature @@ -0,0 +1,26 @@ +Feature: Expenses_JDB-4327 + +@JDB-4327 @expenses +Scenario: expensesJDB-4327 Start Page + + Given I am on expenses on "expenses" "juror-test01" + + Then I see "Check what you can claim for jury service" on the page + And I see "Use this calculator to work out what you can claim for doing 10 days of jury service." on the page + And I see "This calculator:" on the page + And I see "will give you an estimate of what you can claim" on the page + And I see "is for your information only" on the page + And I see "does not send a claim or your details to the courts" on the page + And I see "You'll need to make your actual expenses claim by filling in a paper form at the end of your jury service." on the page + And I see "Before you start" on the page + And I see "You will need details about:" on the page + And I see "your income" on the page + And I see "you expect to spend travelling to court" on the page + And I see "other expenses such as childcare or carer costs" on the page +# And I see "is also available in Welsh (Cymraeg)" on the page + +# When I click on the "Welsh (Cymraeg)" link +# Then I see "Welsh title" on the page + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + Then I press the "Start now" button + Then I see "Will you lose any income while doing jury service?" on the page diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4336.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4336.feature new file mode 100644 index 00000000..caa57dfe --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4336.feature @@ -0,0 +1,46 @@ +Feature: Expenses_JDB-4336 + +@expenses @JDB-4336 +Scenario: expensesJDB-4336 Additional Expenses + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + + Then I see "Check what you can claim for jury service" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + + #page text + + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I see "Include costs for childcare or care for an elderly or vulnerable adult. You can only claim for extra costs incurred by doing jury service and not costs that you’d normally pay for." on the page + + And I see "Do not include travel costs. We'll ask you for those later" on the page + And I see "Claiming Expenses for childcare or care of elderly or vulnerable adults" on the page + + When I press the "Continue" button + Then I see "Please select yes or no" on the page + + #Select Yes + + Then I set the radio button to "Yes" + Then the radio button "Yes" is "selected" + Then the radio button "No" is "unselected" + + #Select No + + Then I set the radio button to "No" + Then the radio button "No" is "selected" + Then the radio button "Yes" is "unselected" + + #continue + + When I press the "Continue" button + Then I see "How will you travel to the court?" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4337.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4337.feature new file mode 100644 index 00000000..53597ff3 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4337.feature @@ -0,0 +1,171 @@ +Feature: Expenses_JDB-4337 + +@expenses @JDB-4337 +Scenario: expensesJDB-4337 Value of Additional Expenses + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And the radio button "Yes" is "selected" + When I press the "Continue" button + + #page text + + Then I see "Check what you can claim for jury service" on the page + And I see "What will the total be for these extra costs each day?" on the page + And I see "You'll need to provide evidence of these costs when making a claim. These might include invoices or a copy of your child's birth certificate. A full list of evidence needed is on the claim form." on the page + And I see "£ each day" on the page + + #errors if Continue pressed with no input + + When I press the "Continue" button + Then I see "Enter the total value of these extra costs each day" on the page + + #input values + + When I set "£" to "Not Much" + And I press the "Continue" button + And under the "There is a problem" heading I see "Enter the total value of these extra costs each day" + Then I see "Enter the total value of these extra costs each day" under the label "£ each day" + + Then I set "£" to "1000..00" + And I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the total value of these extra costs each day" + Then I see "Enter the total value of these extra costs each day" under the label "£ each day" + + Then I set "£ each day" to "1000," + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "1000.00" + + Then I set "£" to ",000" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "0.00" + + Then I set "£" to ".000" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "0.00" + + Then I set "£" to "<1000" + And I press the "Continue" button + And under the "There is a problem" heading I see "Enter the total value of these extra costs each day" + Then I see "Enter the total value of these extra costs each day" under the label "£ each day" + + Then I set "£" to "100/200" + And I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the total value of these extra costs each day" + Then I see "Enter the total value of these extra costs each day" under the label "£ each day" + + Then I set "£" to "£1000" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "1000.00" + + Then I set "£" to "$1000" + And I press the "Continue" button + And under the "There is a problem" heading I see "Enter the total value of these extra costs each day" + Then I see "Enter the total value of these extra costs each day" under the label "£ each day" + + Then I set "£" to "1,500.00" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "1500.00" + + Then I set "£" to "1000000.00" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "1000000.00" + + Then I set "£" to " 1000" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "1000.00" + + Then I set "£" to "1000 00" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "1000.00" + + Then I set "£" to "1000 " + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "1000.00" + + #it allows this + + Then I set "£" to "100-00" + And I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the total value of these extra costs each day" + Then I see "Enter the total value of these extra costs each day" under the label "£ each day" + + Then I set "£" to "1000,00" + And I press the "Continue" button + + #Back link + + And I click on the "Back" link + When I press the "Continue" button + Then "£ each day" is "100000.00" + + #continue + + When I press the "Continue" button + Then I see "How will you travel to the court?" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4338.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4338.feature new file mode 100644 index 00000000..9daeed7e --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4338.feature @@ -0,0 +1,79 @@ +Feature: Expenses_JDB-4338 + +@expenses @JDB-4338 +Scenario: expensesJDB-4338 Travel to Court + + Given I am on expenses on "expenses" "juror-test02" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set "£" to "1000,00" + When I press the "Continue" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + When I press the "Continue" button + When I press the "Continue" button + + #page text + + Then I see "Check what you can claim for jury service" on the page + Then I see "How will you travel to the court?" on the page + And I see "Select all that apply. For example, you may need to drive to a station before taking public transport" on the page + Then I click on the "Taxis" link + And I see "You cannot usually claim for taxis. If you have no alternative apart from taking a taxi to court, contact the court to discuss this." on the page + + #errors if Continue pressed with no input + + When I press the "Continue" button + + And under the "There is a problem" heading I see "Please select at least one method of getting to the court" + Then I see "Please select at least one method of getting to the court" on the page + + #check all boxes + + When I check the "Bicycle" checkbox + When I check the "Car" checkbox + When I check the "Motorcycle" checkbox + When I check the "Public transport" checkbox + When I check the "Walking" checkbox + Then "Bicycle" is checked + Then "Car" is checked + Then "Motorcycle" is checked + Then "Public transport" is checked + Then "Walking" is checked + + #uncheck all boxes + + When I uncheck the "Bicycle" checkbox + When I uncheck the "Car" checkbox + When I uncheck the "Motorcycle" checkbox + When I uncheck the "Public transport" checkbox + When I uncheck the "Walking" checkbox + Then "Bicycle" is unchecked + Then "Car" is unchecked + Then "Motorcycle" is unchecked + Then "Public transport" is unchecked + Then "Walking" is unchecked + + #check 2 boxes + When I check the "Walking" checkbox + When I check the "Public transport" checkbox + + #continue + + When I press the "Continue" button + Then I see "Total cost of public transport each day" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4339.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4339.feature new file mode 100644 index 00000000..79ac262a --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4339.feature @@ -0,0 +1,133 @@ +Feature: Expenses_JDB-4339 + +@expenses @JDB-4339 +Scenario: expensesJDB-4339 How many miles - bicycle + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set "£" to "1000.00" + When I press the "Continue" button + When I check the "Bicycle" checkbox + When I press the "Continue" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "How will you travel to the court?" on the page + When I press the "Continue" button + + #page text + + And I see "Check what you can claim for jury service" on the page + Then I see "Total miles you'll cycle each day" on the page + And I see "Miles each day" on the page + + #errors if Continue pressed with no input + + When I press the "Continue" button + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + #input values + + When I set "Miles each day" to "Not many" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10..00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to ",00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "£10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "<10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10," + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to ".00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + #allowed + + Then I set "Miles each day" to "10/12" + When I press the "Continue" button + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "0" + When I press the "Continue" button + When I click on the "Change" link in the same row as "Miles by bicycle each day" + + Then I set "Miles each day" to "1000000.00" + When I press the "Continue" button + When I click on the "Change" link in the same row as "Miles by bicycle each day" + + Then I set "Miles each day" to "10,00" + When I press the "Continue" button + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10-00" + When I press the "Continue" button + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10 00" + When I press the "Continue" button + And under the "There is a problem" heading I see "Enter how many miles you'll cycle each day" + Then I see "Enter how many miles you'll cycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10 " + When I press the "Continue" button + When I click on the "Change" link in the same row as "Miles by bicycle each day" + + Then I set "Miles each day" to " 10" + When I press the "Continue" button + When I click on the "Change" link in the same row as "Miles by bicycle each day" + + Then I set "Miles each day" to "10.2" + When I press the "Continue" button + + #continue + + When I press the "Continue" button + Then I see "You should be able to claim" on the page + + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4340.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4340.feature new file mode 100644 index 00000000..390f3d12 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4340.feature @@ -0,0 +1,144 @@ +Feature: Expenses_JDB-4340 + +@expenses @JDB-4340 +Scenario: expensesJDB-4340 How many miles - car + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set "£" to "1000.00" + When I press the "Continue" button + When I check the "Car" checkbox + When I press the "Continue" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "?" on the page + When I press the "Continue" button + + #page text + + And I see "Check what you can claim for jury service" on the page + Then I see "Total miles you'll travel each day by car" on the page + And I see "Miles each day" on the page + + #errors if Continue pressed with no input + + When I press the "Continue" button + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + #input values + + When I set "Miles each day" to "Not many" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "10..00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to ",00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "£10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "<10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "10," + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to ".00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + #allowed + + Then I set "Miles each day" to "10/12" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "0" + When I press the "Continue" button + + #payforparking? + Then I set the radio button to "No" + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by car each day" + + Then I set "Miles each day" to "1000000.00" + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by car each day" + + Then I set "Miles each day" to "10,00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "10-00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "10 00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by car each day" + Then I see "Enter how many miles you'll travel by car each day" under the label "Miles each day" + + Then I set "Miles each day" to "10 " + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by car each day" + + Then I set "Miles each day" to " 10" + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by car each day" + + Then I set "Miles each day" to "10.2" + When I press the "Continue" button + + #continue + + When I press the "Continue" button + Then I see "You should be able to claim" on the page + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4341.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4341.feature new file mode 100644 index 00000000..6269608d --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4341.feature @@ -0,0 +1,66 @@ +Feature: Expenses_JDB-4341 + +@expenses @JDB-4341 +Scenario: expensesJDB-4341 Parking - how much + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set "£" to "1000.00" + When I press the "Continue" button + When I check the "Car" checkbox + When I press the "Continue" button + Then I set "Miles each day" to "10.2" + When I press the "Continue" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "How will you travel to the court" on the page + When I press the "Continue" button + + #page text + + And I see "Check what you can claim for jury service" on the page + Then I see "Will you need to pay for parking?" on the page + + #none selected by default + + And the radio button "Yes" is "unselected" + And the radio button "No" is "unselected" + + #errors if Continue pressed with none selected + + When I press the "Continue" button + + And under the "There is a problem" heading I see "Please select yes or no" + Then I see "Please select yes or no" on the page + + #Select Yes + + Then I set the radio button to "Yes" + Then the radio button "Yes" is "selected" + Then the radio button "No" is "unselected" + + #Select No + + Then I set the radio button to "No" + Then the radio button "No" is "selected" + Then the radio button "Yes" is "unselected" + + #continue + + When I press the "Continue" button + Then I see "Check your answers" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4342.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4342.feature new file mode 100644 index 00000000..d20047e8 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4342.feature @@ -0,0 +1,47 @@ +Feature: Expenses_JDB-4342 + +@expenses @JDB-4342 +Scenario: expensesJDB-4342 will parking costs be paid + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set "£" to "1000,00" + When I press the "Continue" button + When I check the "Car" checkbox + When I press the "Continue" button + Then I set "Miles each day" to "10.2" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Check what you can claim for jury service" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "Will you need to pay for parking?" on the page + When I press the "Continue" button + + #page text + + And I see "Check what you can claim for jury service" on the page + Then I see "Claiming for parking" on the page + And I see "Not all courts will pay for parking. There may be a maximum amount that a court will pay per day. Check with the court for permission before you claim for parking." on the page + + #continue + + When I press the "Continue" button + Then I see "Check your answers" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4343.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4343.feature new file mode 100644 index 00000000..17ade4b9 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4343.feature @@ -0,0 +1,175 @@ +Feature: Expenses_JDB-4343 + +@expenses @JDB-4343 +Scenario: expensesJDB-4343 How much pay for travel + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I set the radio button to "No" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set "£" to "1000,00" + When I press the "Continue" button + When I check the "Public transport" checkbox + When I press the "Continue" button + + Then I see "Check what you can claim for jury service" on the page + And I see "Total cost of public transport each day" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "How will you travel to the court?" on the page + When I press the "Continue" button + + #page text + + And I see "Check what you can claim for jury service" on the page + Then I see "Total cost of public transport each day" on the page + Then I click on the "I have a season ticket that I can use" link + And I see "If you've got an existing season ticket for travel, you cannot claim any part of this back because it is not an extra cost you'll need to pay." on the page + And I see "If you do not have any extra public transport costs to claim, enter £0." on the page + And I see "Cost of all your tickets in £ each day" on the page + + #errors if Continue pressed with no input + + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + #input values + + When I set "Cost of all your tickets in £ each day" to "Not many" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + When I set "Cost of all your tickets in £ each day" to "10..00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + When I set "Cost of all your tickets in £ each day" to "10.00" + When I press the "Continue" button + + And I click on the "Change" link in the same row as "Cost of public transport each day" + And "Cost of all your tickets in £ each day" is "10.00" + + When I set "Cost of all your tickets in £ each day" to "10," + Then I press the "Continue" button + + When I click on the "Change" link in the same row as "Cost of public transport each day" + Then I set "Cost of all your tickets in £ each day" to ",00" + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Cost of public transport each day" + Then I set "Cost of all your tickets in £ each day" to ".00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + Then I set "Cost of all your tickets in £ each day" to "<10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + Then I set "Cost of all your tickets in £ each day" to "10.2" + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "10.2" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + Then I set "Cost of all your tickets in £ each day" to " 10" + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "10" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + Then I set "Cost of all your tickets in £ each day" to "10 " + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "10" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + Then I set "Cost of all your tickets in £ each day" to "10 00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + When I press the "Continue" button + + And I see "Check your answers" on the page + And I see text "10.00" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + Then I set "Cost of all your tickets in £ each day" to "10/12" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "10.00" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + When I set "Cost of all your tickets in £ each day" to "10-00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter the cost of all your tickets each day" + Then I see "Enter the cost of all your tickets each day" under the label "Cost of all your tickets in £ each day" + + When I set "Cost of all your tickets in £ each day" to "10.00" + When I press the "Continue" button + + And I see "Check your answers" on the page + And I see text "£10.00" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + When I set "Cost of all your tickets in £ each day" to "1000000.00" + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "1000000.00" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + Then I set "Cost of all your tickets in £ each day" to "£10" + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "10" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + Then I set "Cost of all your tickets in £ each day" to "10,00" + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "1000.00" in the same row as "Cost of public transport each day" + + When I click on the "Change" link in the same row as "Cost of public transport each day" + + Then I set "Cost of all your tickets in £ each day" to "0" + When I press the "Continue" button + And I see "Check your answers" on the page + And I see text "0" in the same row as "Cost of public transport each day" + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4344.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4344.feature new file mode 100644 index 00000000..6c5900c1 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4344.feature @@ -0,0 +1,147 @@ +Feature: Expenses_JDB-4344 + +@expenses @JDB-4344 +Scenario: expenses-JDB-4344 + + Given I am on expenses on "expenses" "juror-test01" + + Then I see "Check what you can claim for jury service" on the page + + And I press the "Start now" button + + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set the radio button to "No" + When I press the "Continue" button + Then I set "£ each day" to "25" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + Then I set "£ each day" to "10" + When I press the "Continue" button + When I check the "Bicycle" checkbox + When I check the "Car" checkbox + When I check the "Motorcycle" checkbox + When I check the "Public transport" checkbox + When I check the "Walking" checkbox + When I press the "Continue" button + Then I set "Miles each day" to "2" + When I press the "Continue" button + Then I set "Miles each day" to "2" + When I press the "Continue" button + Then I set "Miles each day" to "2" + When I press the "Continue" button + Then I set the radio button to "Yes" + When I press the "Continue" button + When I press the "Continue" button + Then I set "Cost of all your tickets in £ each day" to "20" + When I press the "Continue" button + + #page text + + Then I see "Check your answers" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #change lose income + + And I see "Loss of earnings" on the page + And I see text "Yes" in the same row as "Will you lose income?" + And I click on the "Change" link in the same row as "Will you lose income?" + + And I set the radio button to "No" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "No" in the same row as "Will you lose income?" + + And I click on the "Change" link in the same row as "Will you lose income?" + + And I set the radio button to "Yes" + When I press the "Continue" button + And I set the radio button to "No" + When I press the "Continue" button + Then I set "£ each day" to "25" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "Yes" in the same row as "Will you lose income?" + + #change how much do you earn + + And I see text "No" in the same row as "Do you earn more than " + And I see text "25.00" in the same row as "How much do you earn each day?" + And I click on the "Change" link in the same row as "How much do you earn each day?" + + And I set "£ each day" to "30" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "30.00" in the same row as "How much do you earn each day?" + + #change extra costs + + And I see "Other expenses" on the page + And I see text "Yes" in the same row as "Extra costs you wouldn't normally have?" + And I click on the "Change" link in the same row as "Extra costs you wouldn't normally have?" + + And I set the radio button to "No" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "No" in the same row as "Extra costs you wouldn't normally have?" + + #change travel types + + And I see "Travel" on the page + And I see text "Bicycle,Car,Motorcycle,Public transport,Walking" in the same row as "How will you travel to court?" + And I click on the "Change" link in the same row as "How will you travel to court?" + + And I uncheck the "Walking" checkbox + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "Bicycle,Car,Motorcycle,Public transport" in the same row as "How will you travel to court?" + + #change bicycle miles + + And I see text "2 miles" in the same row as "Miles by bicycle each day" + And I click on the "Change" link in the same row as "Miles by bicycle each day" + + And I set "Miles each day" to "5" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "5 miles" in the same row as "Miles by bicycle each day" + + #change car miles + + And I see text "2 miles" in the same row as "Miles by car each day" + And I click on the "Change" link in the same row as "Miles by car each day" + + And I set "Miles each day" to "5" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "5 miles" in the same row as "Miles by car each day" + + #change motorcycle miles + + And I see text "2 miles" in the same row as "Miles by motorcycle each day" + And I click on the "Change" link in the same row as "Miles by motorcycle each day" + + And I set "Miles each day" to "5" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "5 miles" in the same row as "Miles by motorcycle each day" + + #change public transport miles + + And I see text "20.00" in the same row as "Cost of public transport each day" + And I click on the "Change" link in the same row as "Cost of public transport each day" + + And I set "Cost of all your tickets in £ each day" to "25" + When I press the "Continue" button + Then I see "Check your answers" on the page + And I see text "25.00" in the same row as "Cost of public transport each day" + + When I press the "Continue" button + Then I see "You should be able to claim" on the page + And I see "Start again" on the page diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4345_JDB-4348.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4345_JDB-4348.feature new file mode 100644 index 00000000..3e900121 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4345_JDB-4348.feature @@ -0,0 +1,426 @@ +Feature: Expenses_JDB-4345_JDB-4348 + +@expenses @JDB-4345 @JDB-4348 +Scenario Outline: expensesJDB-4345_RoundUp + + Given I am on expenses on "expenses" "bau-test2" + + And I press the "Start now" button + + #loseincome + Then I set the radio button to "Yes" + When I press the "Continue" button + + #earnmorethan + Then I set the radio button to "No" + When I press the "Continue" button + + #dailyearnings + Then I set "£ each day" to "<earnings>" + When I press the "Continue" button + + #otherexpenses + Then I set the radio button to "Yes" + When I press the "Continue" button + + #dailyexpenses + Then I set "£ each day" to "<expenses>" + When I press the "Continue" button + + #traveltypes + When I check the "Bicycle" checkbox + When I check the "Car" checkbox + When I check the "Motorcycle" checkbox + When I check the "Public transport" checkbox + When I check the "Walking" checkbox + When I press the "Continue" button + + #setbikemiles + Then I set "Miles each day" to "<bikeMiles>" + When I press the "Continue" button + + #setcarmiles + Then I set "Miles each day" to "<carMiles>" + When I press the "Continue" button + + #setmotorbikemiles + Then I set "Miles each day" to "<motorbikeMiles>" + When I press the "Continue" button + + #payforparking? + Then I set the radio button to "Yes" + When I press the "Continue" button + + #cantclaimforparking + When I press the "Continue" button + + #publictransportcosts + Then I set "Cost of all your tickets in £ each day" to "<publicTransport>" + When I press the "Continue" button + + #checkyouranswers + When I press the "Continue" button + + #pagetext + + Then I see "Check what you can claim for jury service" on the page + Then I see "You should be able to claim" on the page + + And I see "£<totalClaim> per day" on the page + + Then I see "This is assuming:" on the page + Then I see "the details you have entered are correct" on the page + Then I see "your jury service lasts up to 10 days" on the page + Then I see "each day you will be at court for at least 4 hours" on the page + + Then I see "How we calculated this" on the page + + And under the "How we calculated this" heading I see "Loss of earnings and other expenses" + + Then I see "You can claim £<canClaim> for each day you'll lose income or have extra costs from doing jury service" on the page + + Then I click on the "How have my loss of earnings and expenses been calculated?" link + + And on Expenses I see "<earnings> each day" under "Loss of earnings" + + And on Expenses I see "<expenses> each day" under "Other expenses" + + And on Expenses I see "<earningsAndExpenses> each day" under "Total" + + And on Expenses I see "£<canClaim> is the maximum amount that you can claim per day within the first 10 days of jury service. For days shorter than 4 hours this is reduced to £32.47" under "Total" + + And under the "How we calculated this" heading I see "Travel" + + Then I see "You can claim £<totalTravel> for each day you travel to court" on the page + + Then I click on the "How have my travel expenses been calculated?" link + + And on Expenses I see "<carMiles> miles at 31.4p per mile = <carExpenses>" under "Car mileage" + + And on Expenses I see "<motorbikeMiles> miles at 31.4p per mile = <motorbikeExpenses>" under "Motorcycle mileage" + + And on Expenses I see "<bikeMiles> miles at 31.4p per mile = <bikeExpenses>" under "Bicycle mileage" + + And on Expenses I see "<publicTransport> each day" under "Travel tickets" + + Then on Expenses I see "<totalTravel> each day" under "Total" + + And I see "This does not include parking costs because you'll need to check with the court first if they will pay for your parking." on the page + And I see "Once your jury service has started, if you offer to bring other jurors to court in your car, you can claim an additional 4.2p per mile for the first passenger, and another 3.2p per mile for every other passenger." on the page + + Then I see "Food and drink" on the page + + And I see "You can claim £5.71 each day, even if you bring in your own food and drink" on the page + + And I see "For more information about how expenses are calculated and how changes in your jury service can affect the amount you can claim, read what you can claim" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #back link + + Then I click on the "Back" link + And I see "Check your answers" on the page + When I press the "Continue" button + + Then I click on the "what you can claim" link + And I see "www.gov.uk/jury-service" in the URL + + Then I press the "back" button on my browser + + Then I click on the "court and tribunal finder" link +# And I see "www.find-court-tribunal.service.gov.uk/search-option" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Start again" link + And I see "Will you lose any income while doing jury service?" on the page + +Examples: + |earnings |expenses |canClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | +#noroundup + |43.83 |54.22 |64.95 |98.05 |20.15 |2.5 |0.79 |2.5 |0.79 |2.5 |0.24 |21.97 |92.63 | +#backendroundupwithdecplaces + |29.87 |57.00 |64.95 |86.87 |20.99 |2.8 |0.88 |2.8 |0.88 |2.9 |0.28 |23.03 |93.69 | +#backendroundupwholenumbers + |29 |57 |64.95 |86 |21 |1 |0.31 |1 |0.31 |2 |0.19 |21.81 |92.47 | +#earningsandinputexpensestotallessthan64.95 + |20 |14.50 |34.50 |34.50 |21 |1 |0.31 |1 |0.31 |2 |0.19 |21.81 |62.02 | +#displaysearningsandexpenses30 + |20 |10 |30.00 |30 |21 |1 |0.31 |1 |0.31 |2 |0.19 |21.81 |57.52 | +#displaystravel21.80 + |20 |14.50 |34.50 |34.50 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |62.01 | + +@expenses @JDB-4345 @JDB-4348 +Scenario Outline: expensesJDB-4345_earnings>64.95andexpenses=0 + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + #loseincome + Then I set the radio button to "Yes" + When I press the "Continue" button + + #earnmorethan + Then I set the radio button to "No" + When I press the "Continue" button + + #dailyearnings + Then I set "£ each day" to "<earnings>" + When I press the "Continue" button + + #otherexpenses + Then I set the radio button to "Yes" + When I press the "Continue" button + + #dailyexpenses + Then I set "£ each day" to "<expenses>" + When I press the "Continue" button + + #traveltypes + When I check the "Bicycle" checkbox + When I check the "Car" checkbox + When I check the "Motorcycle" checkbox + When I check the "Public transport" checkbox + When I check the "Walking" checkbox + When I press the "Continue" button + + #setbikemiles + Then I set "Miles each day" to "<bikeMiles>" + When I press the "Continue" button + + #setcarmiles + Then I set "Miles each day" to "<carMiles>" + When I press the "Continue" button + + #setmotorbikemiles + Then I set "Miles each day" to "<motorbikeMiles>" + When I press the "Continue" button + + #payforparking? + Then I set the radio button to "Yes" + When I press the "Continue" button + + #cantclaimforparking + When I press the "Continue" button + + #publictransportcosts + Then I set "Cost of all your tickets in £ each day" to "<publicTransport>" + When I press the "Continue" button + + #checkyouranswers + When I press the "Continue" button + + #pagetext + + Then I see "You should be able to claim" on the page + + And I see "£<totalClaim> per day" on the page + + Then I see "This is assuming:" on the page + Then I see "the details you have entered are correct" on the page + Then I see "your jury service lasts up to 10 days" on the page + Then I see "each day you will be at court for at least 4 hours" on the page + + Then I see "How we calculated this" on the page + + And under the "How we calculated this" heading I see "Loss of earnings and other expenses" + + Then I see "You can claim £<canClaim> for each day you'll lose income or have extra costs from doing jury service" on the page + + Then I click on the "How have my loss of earnings and expenses been calculated?" link + + And on Expenses I see "<earnings> each day" under "Loss of earnings" + + And under the "How we calculated this" heading I do not see "Other expenses" + + And on Expenses I see "<earningsAndExpenses> each day" under "Total" + + And I see "£64.95 is the maximum amount that you can claim per day within the first 10 days of jury service. For days shorter than 4 hours this is reduced to £32.47" on the page + + Then I do not see "Travel" on the page + + Then I do not see link with text "How have my travel expenses been calculated?" + + And I do not see "Car mileage" on the page + + And I do not see "Motorcycle mileage" on the page + + And I do not see "Bicycle mileage" on the page + + And I do not see "Travel tickets" on the page + + Then I do not see "£<totalTravel> each day" on the page + + And I do not see "This does not include parking costs because you'll need to check with the court first if they will pay for your parking." on the page + And I do not see "Once your jury service has started, if you offer to bring other jurors to court in your car, you can claim an additional 4.2p per mile for the first passenger, and another 3.2p per mile for every other passenger." on the page + + Then I see "Food and drink" on the page + + And I see "You can claim £5.71 each day, even if you bring in your own food and drink" on the page + + And I see "For more information about how expenses are calculated and how changes in your jury service can affect the amount you can claim, read what you can claim" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + Then I click on the "what you can claim" link + And I see "www.gov.uk/jury-service" in the URL + + Then I press the "back" button on my browser + + Then I click on the "court and tribunal finder" link +# And I see "www.find-court-tribunal.service.gov.uk/search-option" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Start again" link + And I see "Will you lose any income while doing jury service?" on the page + +Examples: + |earnings |expenses |canClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | +#earnings>64.95andexpenses=0 + |70.00 |0.00 |64.95 |70.00 |0 |0 |0 |0 |0 |0 |0 |0 |70.66 | + + +@expenses @JDB-4345 @JDB-4348 +Scenario Outline: expensesJDB-4345_0earningsandexpenses>or<64.95 + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + #loseincome + Then I set the radio button to "Yes" + When I press the "Continue" button + + #earnmorethan + Then I set the radio button to "No" + When I press the "Continue" button + + #dailyearnings + Then I set "£ each day" to "<earnings>" + When I press the "Continue" button + + #otherexpenses + Then I set the radio button to "Yes" + When I press the "Continue" button + + #dailyexpenses + Then I set "£ each day" to "<expenses>" + When I press the "Continue" button + + #traveltypes + When I check the "Bicycle" checkbox + When I check the "Car" checkbox + When I check the "Motorcycle" checkbox + When I check the "Public transport" checkbox + When I check the "Walking" checkbox + When I press the "Continue" button + + #setbikemiles + Then I set "Miles each day" to "<bikeMiles>" + When I press the "Continue" button + + #setcarmiles + Then I set "Miles each day" to "<carMiles>" + When I press the "Continue" button + + #setmotorbikemiles + Then I set "Miles each day" to "<motorbikeMiles>" + When I press the "Continue" button + + #payforparking? + Then I set the radio button to "Yes" + When I press the "Continue" button + + #cantclaimforparking + When I press the "Continue" button + + #publictransportcosts + Then I set "Cost of all your tickets in £ each day" to "<publicTransport>" + When I press the "Continue" button + + #checkyouranswers + When I press the "Continue" button + + #pagetext + + Then I see "You should be able to claim" on the page + + And I see "£<totalClaim> per day" on the page + + Then I see "This is assuming:" on the page + Then I see "the details you have entered are correct" on the page + Then I see "your jury service lasts up to 10 days" on the page + Then I see "each day you will be at court for at least 4 hours" on the page + + And under the "How we calculated this" heading I see "Loss of earnings and other expenses" + + Then I see "You can claim £<canClaim> for each day you'll lose income or have extra costs from doing jury service" on the page + + Then I click on the "How have my loss of earnings and expenses been calculated?" link + + And under the "How we calculated this" heading I do not see "<earnings> each day" + + And on Expenses I see "<expenses> each day" under "Other expenses" + + And on Expenses I see "<earningsAndExpenses> each day" under "Total" + + And I see "£<upperClaim> is the maximum amount that you can claim per day within the first 10 days of jury service. For days shorter than 4 hours this is reduced to £32.47" on the page + + Then I see "You can claim £<totalTravel> for each day you travel to court" on the page + + Then I click on the "How have my travel expenses been calculated?" link + + And on Expenses I see "<carMiles> miles at 31.4p per mile = <carExpenses>" under "Car mileage" + + And on Expenses I see "<motorbikeMiles> miles at 31.4p per mile = <motorbikeExpenses>" under "Motorcycle mileage" + + And on Expenses I see "<bikeMiles> miles at 31.4p per mile = <bikeExpenses>" under "Bicycle mileage" + + And on Expenses I see "<publicTransport> each day" under "Travel tickets" + + Then on Expenses I see "<totalTravel> each day" under "Total" + + And I see "This does not include parking costs because you'll need to check with the court first if they will pay for your parking." on the page + And I see "Once your jury service has started, if you offer to bring other jurors to court in your car, you can claim an additional 4.2p per mile for the first passenger, and another 3.2p per mile for every other passenger." on the page + + Then I see "Food and drink" on the page + + And I see "You can claim £5.71 each day, even if you bring in your own food and drink" on the page + + And I see "For more information about how expenses are calculated and how changes in your jury service can affect the amount you can claim, read what you can claim" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + Then I click on the "what you can claim" link + And I see "www.gov.uk/jury-service" in the URL + + Then I press the "back" button on my browser + + Then I click on the "court and tribunal finder" link +# And I see "www.find-court-tribunal.service.gov.uk/search-option" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Start again" link + And I see "Will you lose any income while doing jury service?" on the page + +Examples: + |earnings |expenses |canClaim |upperClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | +#earnings0expenses<64.95 + |0.00 |14.55 |14.55 |64.95 |14.55 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |42.06 | +#earnings0andexpenses>64.94 + |0.00 |70.55 |64.95 |64.95 |70.55 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |92.46 | diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4372.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4372.feature new file mode 100644 index 00000000..c1265457 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4372.feature @@ -0,0 +1,160 @@ +Feature: Expenses_JDB-4372 + +@expenses @JDB-4372 +Scenario Outline: expensesJDB-4372 + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + #loseincome + Then I set the radio button to "Yes" + When I press the "Continue" button + + #earnmorethan + Then I set the radio button to "Yes" + When I press the "Continue" button + + #otherexpenses + Then I set the radio button to "Yes" + When I press the "Continue" button + + #dailyexpenses + Then I set "£ each day" to "<expenses>" + When I press the "Continue" button + + #traveltypes + When I check the "Motorcycle" checkbox + When I press the "Continue" button + + #page content + + Then I see "Check what you can claim for jury service" on the page + And I see "Total miles you'll travel each day by motorcycle" on the page + And I see "Miles each day" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I click on the "Back" link + Then I see "How will you travel to the court?" on the page + When I press the "Continue" button + + #errors if Continue pressed with no input + + When I press the "Continue" button + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + #input values + + When I set "Miles each day" to "Not many" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10..00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to ",00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "£10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "<10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10," + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to ".00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + #allowed + + Then I set "Miles each day" to "10/12" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "0" + When I press the "Continue" button + + #payforparking? + Then I set the radio button to "No" + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by motorcycle each day" + + Then I set "Miles each day" to "1000000.00" + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by motorcycle each day" + + Then I set "Miles each day" to "10,00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10-00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10 00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how many miles you'll travel by motorcycle each day" + Then I see "Enter how many miles you'll travel by motorcycle each day" under the label "Miles each day" + + Then I set "Miles each day" to "10 " + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by motorcycle each day" + + Then I set "Miles each day" to " 10" + When I press the "Continue" button + + When I click on the "Change" link in the same row as "Miles by motorcycle each day" + + Then I set "Miles each day" to "10.2" + When I press the "Continue" button + + #continue + + When I press the "Continue" button + Then I see "You should be able to claim" on the page + +Examples: + |earnings |expenses |canClaim |upperClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | + |20.00 |14.55 |14.55 |64.95 |14.55 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |42.06 | + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4373.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4373.feature new file mode 100644 index 00000000..751bcb36 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4373.feature @@ -0,0 +1,48 @@ +Feature: Expenses_JDB-4373 + +@expenses @JDB-4373 +Scenario: expensesJDB-4373 + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + #page content + + Then I see "Check what you can claim for jury service" on the page + Then I see "Will you lose any income while doing jury service?" on the page + And I see "This means income from an employer or self-employment. Benefits like Jobseeker's Allowance will not be affected unless you do more than 8 weeks of jury service" on the page + Then I click on the "My employer has told me they will pay me and then claim the money back from the court" link + Then I see "Expenses and loss of earnings can only be reimbursed to the juror if they've suffered financial loss as a direct result of doing jury service. The court will not pay compensation to third parties like employers. If your employer will pay you, then you cannot make a claim for loss of earnings." on the page + + #none selected by default + + And the radio button "Yes" is "unselected" + And the radio button "No" is "unselected" + + #errors if Continue pressed with none selected + + When I press the "Continue" button + Then I see "Please select yes or no" on the page + + #Select Yes + + Then I set the radio button to "Yes" + Then the radio button "Yes" is "selected" + Then the radio button "No" is "unselected" + + #Select No + + Then I set the radio button to "No" + Then the radio button "No" is "selected" + Then the radio button "Yes" is "unselected" + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + And I do not see link with text "Back" \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4374.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4374.feature new file mode 100644 index 00000000..6a68a497 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4374.feature @@ -0,0 +1,55 @@ +Feature: ExpensesJDB-4374 + +@expenses @JDB-4374 +Scenario: expensesJDB-4374 + + Given I am on expenses on "expenses" "juror-test01" + + #navigate to expenses page + + And I press the "Start now" button + + #loseincome + Then I set the radio button to "Yes" + When I press the "Continue" button + + #earnmorethan + Then I see "Check what you can claim for jury service" on the page + And I see "Do you earn more than £64.95 each day on the days you work?" on the page + And I see "If you earn a different amount on different days, use the largest amount to find out the maximum that you can claim." on the page + + #none selected by default + + And the radio button "Yes" is "unselected" + And the radio button "No" is "unselected" + + #errors if Continue pressed with none selected + + When I press the "Continue" button + Then I see "Please select yes or no" on the page + + #Select Yes + + Then I set the radio button to "Yes" + Then the radio button "Yes" is "selected" + Then the radio button "No" is "unselected" + + #Select No + + Then I set the radio button to "No" + Then the radio button "No" is "selected" + Then the radio button "Yes" is "unselected" + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #Back link + + Then I click on the "Back" link + And I see "Will you lose any income while doing jury service?" on the page + + Then I see "Continue" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4375.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4375.feature new file mode 100644 index 00000000..39e3396d --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4375.feature @@ -0,0 +1,154 @@ +Feature: Expenses_JDB-4375 + +@expenses @JDB-4375 +Scenario: expensesJDB-4375 + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + #loseincome + Then I set the radio button to "Yes" + When I press the "Continue" button + + #earnmorethan + Then I set the radio button to "No" + When I press the "Continue" button + + #Back link + + And I click on the "Back" link + Then I see "Do you earn more than £64.95 each day on the days you work?" on the page + When I press the "Continue" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #page content + + Then I see "Check what you can claim for jury service" on the page + + Then I see "How much do you earn each day?" on the page + And I see "Enter the amount you receive from all employment, self employment or as a company director, each day" on the page + + Then I see "£ each day" on the page + + Then I see "Continue" on the page + And I click on the "Where can I find this information?" link + And I see "You can find this on your payslip, P60 or tax return. It will be shown as 'Net Pay'." on the page + + #errors if Continue pressed with no input + + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + #input values + + When I set "£ each day" to "Not much" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + When I set "£ each day" to "10..00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + When I set "£ each day" to "10," + Then I press the "Continue" button + + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + Then I set "£ each day" to ",00" + When I press the "Continue" button + + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + Then I set "£ each day" to ".00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + Then I set "£ each day" to "<10" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + Then I set "£ each day" to "10.2" + When I press the "Continue" button + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + Then I set "£ each day" to " 10" + When I press the "Continue" button + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + And "£ each day" is "10.00" + Then I set "£ each day" to "10 " + When I press the "Continue" button + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + And "£ each day" is "10.00" + Then I set "£ each day" to "10 00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + Then I set "£ each day" to "10/12" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + When I set "£ each day" to "10-00" + When I press the "Continue" button + + And under the "There is a problem" heading I see "Enter how much you earn each day" + Then I see "Enter how much you earn each day" under the label "£ each day" + + When I set "£ each day" to "1000000.00" + When I press the "Continue" button + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + And "£ each day" is "1000000.00" + Then I set "£ each day" to "£10" + When I press the "Continue" button + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + Then I set "£ each day" to "10,00" + When I press the "Continue" button + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + + Then I set "£ each day" to "0" + When I press the "Continue" button + And I click on the "Back" link + When I press the "Continue" button + When I press the "Continue" button + And "£ each day" is "0.00" + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_JDB-4376.feature b/src/test/resources/cucumber/features/expenses/expenses_JDB-4376.feature new file mode 100644 index 00000000..f8baecfa --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_JDB-4376.feature @@ -0,0 +1,45 @@ +Feature: Expenses_JDB-4376 + +@expenses @JDB-4376 +Scenario: expensesJDB-4376 + + Given I am on expenses on "expenses" "juror-test01" + + And I press the "Start now" button + + Then I see "Will you lose any income while doing jury service?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + Then I see "Check what you can claim for jury service" on the page + + Then I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + + And I click on the "Claiming Expenses for childcare or care of elderly or vulnerable adults" link + And I see "You can claim for extra costs you incur for childcare or the care of an elderly or vulnerable adult during your jury service" on the page + + Then I see "You cannot claim back costs that you'd normally pay for" on the page + + And I see "you work and usually use a childminder, you cannot claim this childcare cost for the days you'd normally work" on the page + + Then I see "If someone takes annual leave to look after your child" on the page + And I see "You cannot claim their salary back because their employer will normally pay them during their annual leave" on the page + + Then I see "If friends or family provide care and charge you for this" on the page + Then I see "You can claim up to £2.50 per hour, per child or adult towards this cost." on the page + Then I see "You can claim this for up to 8 hours for each day at court" on the page + And I see "This person must provide a letter to the court with their full details, days and times they've cared for your child or any adult before the expenses will be paid." on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cookies" on the page + And I do not see "Privacy policy" on the page + + #back link + + Then I click on the "Back" link + And I see "Will doing jury service mean you have extra costs that you wouldn't normally have?" on the page + And I set the radio button to "No" + When I press the "Continue" button + And I see "How will you travel to the court?" on the page \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4327.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4327.feature new file mode 100644 index 00000000..e804fbc1 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4327.feature @@ -0,0 +1,23 @@ +Feature: Expenses_Welsh_JDB-4327 + +@JDB-4327 @expenses +Scenario: expensesJDB-4327 Welsh Start Page + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + And I see "Defnyddiwch yr adnodd hwn i gyfrifo beth allwch chi ei hawlio am wasanaethu ar reithgor am 10 diwrnod." on the page + And I see "Mae'r adnodd hwn:" on the page + And I see "yn rhoi amcangyfrif ichi o'r hyn y gallwch ei hawlio" on the page + And I see "er gwybodaeth ichi yn unig" on the page + And I see "ni fydd yn anfon hawliad / eich manylion i'r llys" on the page + And I see "Bydd rhaid ichi wneud hawliad trwy lenwi ffurflen bapur ar ddiwrnod olaf eich gwasanaeth rheithgor." on the page + And I see "Cyn ichi ddechrau" on the page + And I see "Byddwch angen manylion am:" on the page + And I see "eich incwm" on the page + And I see "y swm rydych yn rhagweld y byddwch yn ei wario i deithio i'r llys" on the page + And I see "treuliau eraill fel costau gofal plant neu gostau gofalu am rywun arall" on the page + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + Then I press the "Cychwyn arni" button + Then I see "A fyddwch yn colli unrhyw incwm wrth ichi wasanaethu ar reithgor?" on the page diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4336.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4336.feature new file mode 100644 index 00000000..edb41279 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4336.feature @@ -0,0 +1,46 @@ +Feature: Expenses_Welsh_JDB-4336 + +@expenses @JDB-4336 +Scenario: expensesJDB-4336 Additional Expenses Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + + #page text + + Then I see "A fydd gwasanaethu ar reithgor yn golygu y bydd gennych gostau ychwanegol na fyddai'n codi fel arfer?" on the page + And I see "Cofiwch gynnwys costau gofal plant neu gostau gofal ar gyfer oedolyn hŷn neu oedolyn bregus. Gallwch ond hawlio am y costau ychwanegol sy'n codi wrth ichi wasanaethu ar reithgor ac nid y costau y byddech yn talu amdanynt fel arfer." on the page + + And I see "Peidiwch â chynnwys costau teithio. Byddwn yn gofyn ichi am y costau hynny yn hwyrach ymlaen." on the page + And I see "Hawlio Treuliau ar gyfer gofal plant neu gofal ar gyfer oedolion hŷn / bregus" on the page + + When I press the "Parhau" button + Then I see "Dewiswch bydd neu na fydd" on the page + + #Select Yes + + Then I set the radio button to "Bydd" + Then the radio button "Bydd" is "selected" + Then the radio button "Na fydd" is "unselected" + + #Select No + + Then I set the radio button to "Na fydd" + Then the radio button "Na fydd" is "selected" + Then the radio button "Bydd" is "unselected" + + #continue + + When I press the "Parhau" button + Then I see "Sut byddwch yn teithio i'r llys?" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4337.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4337.feature new file mode 100644 index 00000000..8a6806ea --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4337.feature @@ -0,0 +1,171 @@ +Feature: Expenses_Welsh_JDB-4337 + +@expenses @JDB-4337 +Scenario: expensesJDB-4337 Value of Additional Expenses Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "A fydd gwasanaethu ar reithgor yn golygu y bydd gennych gostau ychwanegol na fyddai'n codi fel arfer?" on the page + And the radio button "Bydd" is "selected" + When I press the "Parhau" button + + #page text + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + And I see "Beth fyddai cyfanswm y costau ychwanegol hyn fesul dydd?" on the page + And I see "Bydd arnoch angen darparu tystiolaeth o'r costau hyn wrth wneud hawliad. Gallai'r rhain gynnwys anfonebau neu gopi o dystysgrif geni eich plentyn. Ceir rhestr lawn o'r dystiolaeth sydd ei hangen ar y ffurflen hawlio." on the page + And I see "£ y dydd" on the page + + #errors if Continue pressed with no input + + When I press the "Parhau" button + Then I see "Nodwch gyfanswm y costau ychwanegol hyn fesul dydd" on the page + + #input values + + When I set "£" to "Not Much" + And I press the "Parhau" button + And under the "Mae problem" heading I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" + Then I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" under the label "£ y dydd" + + Then I set "£" to "1000..00" + And I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" + Then I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" under the label "£ y dydd" + + Then I set "£ y dydd" to "1000," + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "1000.00" + + Then I set "£" to ",000" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "0.00" + + Then I set "£" to ".000" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "0.00" + + Then I set "£" to "<1000" + And I press the "Parhau" button + And under the "Mae problem" heading I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" + Then I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" under the label "£ y dydd" + + Then I set "£" to "100/200" + And I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" + Then I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" under the label "£ y dydd" + + Then I set "£" to "£1000" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "1000.00" + + Then I set "£" to "$1000" + And I press the "Parhau" button + And under the "Mae problem" heading I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" + Then I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" under the label "£ y dydd" + + Then I set "£" to "1,500.00" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "1500.00" + + Then I set "£" to "1000000.00" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "1000000.00" + + Then I set "£" to " 1000" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "1000.00" + + Then I set "£" to "1000 00" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "1000.00" + + Then I set "£" to "1000 " + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "1000.00" + + #it allows this + + Then I set "£" to "100-00" + And I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" + Then I see "Gwiriwch gyfanswm y costau ychwanegol hyn fesul dydd" under the label "£ y dydd" + + Then I set "£" to "1000,00" + And I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + Then "£ y dydd" is "100000.00" + + #continue + + When I press the "Parhau" button + Then I see "Sut byddwch yn teithio i'r llys?" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4338.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4338.feature new file mode 100644 index 00000000..7f23453b --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4338.feature @@ -0,0 +1,79 @@ +Feature: Expenses_WelshJDB-4338 + +@expenses @JDB-4338 +Scenario: expensesJDB-4338 Travel to Court Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + Then I set "£" to "1000,00" + When I press the "Parhau" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "A fydd gwasanaethu ar reithgor yn golygu y bydd gennych gostau ychwanegol na fyddai'n codi fel arfer?" on the page + When I press the "Parhau" button + When I press the "Parhau" button + + #page text + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + Then I see "Sut byddwch yn teithio i'r llys?" on the page + And I see "Dewiswch bob un sy'n berthnasol. Er enghraifft, efallai y byddwch angen gyrru i orsaf cyn defnyddio trafnidiaeth gyhoeddus." on the page + Then I click on the "Tacsis" link + And I see "Fel arfer, ni allwch hawlio costau tacsi. Os nad oes gennych unrhyw ddewis arall oni bai am gael tacsi i ddod i'r llys, cysylltwch â'r llys i drafod hyn." on the page + + #errors if Continue pressed with no input + + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Dewiswch o leiaf un dull ar gyfer teithio i'r llys" + Then I see "Dewiswch o leiaf un dull ar gyfer teithio i'r llys" on the page + + #check all boxes + + When I check the "Beic" checkbox + When I check the "Car" checkbox + When I check the "Beic modur" checkbox + When I check the "Trafnidiaeth gyhoeddus" checkbox + When I check the "Cerdded" checkbox + Then "Beic" is checked + Then "Car" is checked + Then "Beic modur" is checked + Then "Trafnidiaeth gyhoeddus" is checked + Then "Cerdded" is checked + + #uncheck all boxes + + When I uncheck the "Beic" checkbox + When I uncheck the "Car" checkbox + When I uncheck the "Beic modur" checkbox + When I uncheck the "Trafnidiaeth gyhoeddus" checkbox + When I uncheck the "Cerdded" checkbox + Then "Beic" is unchecked + Then "Car" is unchecked + Then "Beic modur" is unchecked + Then "Trafnidiaeth gyhoeddus" is unchecked + Then "Cerdded" is unchecked + + #check 2 boxes + When I check the "Cerdded" checkbox + When I check the "Trafnidiaeth gyhoeddus" checkbox + + #continue + + When I press the "Parhau" button + Then I see "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4339.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4339.feature new file mode 100644 index 00000000..c1f2ca1a --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4339.feature @@ -0,0 +1,133 @@ +Feature: Expenses_Welsh_JDB-4339 + +@expenses @JDB-4339 +Scenario: expensesJDB-4339 How many miles - bicycle Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + Then I set "£" to "1000.00" + When I press the "Parhau" button + When I check the "Beic" checkbox + When I press the "Parhau" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "Sut byddwch yn teithio i'r llys?" on the page + When I press the "Parhau" button + + #page text + + And I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + Then I see "Cyfanswm y milltiroedd rydych yn teithio ar feic fesul dydd" on the page + And I see "Milltiroedd y dydd" on the page + + #errors if Continue pressed with no input + + When I press the "Parhau" button + And under the "Mae problem" heading I see "Nodwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Nodwch faint o filltiroedd rydych yn teithio ar feic fesul dydd " under the label "Milltiroedd y dydd" + + #input values + + When I set "Milltiroedd y dydd" to "Not many" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10..00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to ",00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "£10" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "<10" + When I press the "Parhau" button + + And under the "Ma problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10," + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to ".00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + #allowed + + Then I set "Milltiroedd y dydd" to "10/12" + When I press the "Parhau" button + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "0" + When I press the "Parhau" button + When I click on the "Newid" link in the same row as "Milltiroedd ar feic fesul dydd" + + Then I set "Milltiroedd y dydd" to "1000000.00" + When I press the "Parhau" button + When I click on the "Newid" link in the same row as "Milltiroedd ar feic fesul dydd" + + Then I set "Milltiroedd y dydd" to "10,00" + When I press the "Parhau" button + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10-00" + When I press the "Parhau" button + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10 00" + When I press the "Parhau" button + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10 " + When I press the "Parhau" button + When I click on the "Newid" link in the same row as "Milltiroedd ar feic fesul dydd" + + Then I set "Milltiroedd y dydd" to " 10" + When I press the "Parhau" button + When I click on the "Newid" link in the same row as "Milltiroedd ar feic fesul dydd" + + Then I set "Milltiroedd y dydd" to "10.2" + When I press the "Parhau" button + + #continue + + When I press the "Parhau" button + Then I see "Dylech fod yn gallu hawlio" on the page + + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4340.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4340.feature new file mode 100644 index 00000000..c909cd31 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4340.feature @@ -0,0 +1,143 @@ +Feature: Expenses_Welsh_JDB-4340 + +@expenses @JDB-4340 +Scenario: expensesJDB-4340 How many miles - car Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + Then I set "£" to "1000,00" + When I press the "Parhau" button + When I check the "Car" checkbox + When I press the "Parhau" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "?" on the page + When I press the "Parhau" button + + #page text + + And I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + Then I see "Cyfanswm y milltiroedd rydych yn teithio mewn car fesul dydd" on the page + And I see "Milltiroedd y dydd" on the page + + #errors if Continue pressed with no input + + When I press the "Parhau" button + And under the "There is a problem" heading I see "Nodwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Nodwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + #input values + + When I set "Milltiroedd y dydd" to "Not many" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10..00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to ",00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "£10" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "<10" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10," + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to ".00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + #allowed + + Then I set "Milltiroedd y dydd" to "10/12" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "0" + When I press the "Parhau" button + + #payforparking? + Then I set the radio button to "Na fydd" + When I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Milltiroedd mewn car fesul dydd" + + Then I set "Milltiroedd y dydd" to "1000000.00" + When I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Milltiroedd mewn car fesul dydd" + + Then I set "Milltiroedd y dydd" to "10,00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10-00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10 00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio mewn car fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10 " + When I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Milltiroedd mewn car fesul dydd" + + Then I set "Milltiroedd y dydd" to " 10" + When I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Milltiroedd mewn car fesul dydd" + + Then I set "Milltiroedd y dydd" to "10.2" + When I press the "Parhau" button + + #continue + + When I press the "Parhau" button + Then I see "Dylech fod yn gallu hawlio" on the page diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4341.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4341.feature new file mode 100644 index 00000000..ccc8cad1 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4341.feature @@ -0,0 +1,66 @@ +Feature: Expenses_Welsh_JDB-4341 + +@expenses @JDB-4341 +Scenario: expensesJDB-4341 Parking - how much Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + Then I set "£" to "1000,00" + When I press the "Parhau" button + When I check the "Car" checkbox + When I press the "Parhau" button + Then I set "Milltiroedd y dydd" to "10.2" + When I press the "Parhau" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "Sut byddwch yn teithio i'r llys?" on the page + When I press the "Parhau" button + + #page text + + And I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + Then I see "A fydd rhaid i chi dalu costau parcio?" on the page + + #none selected by default + + And the radio button "Bydd" is "unselected" + And the radio button "Na fydd" is "unselected" + + #errors if Continue pressed with none selected + + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Dewiswch bydd neu na fydd" + Then I see "Dewiswch bydd neu na fydd" on the page + + #Select Yes + + Then I set the radio button to "Bydd" + Then the radio button "Bydd" is "selected" + Then the radio button "Na fydd" is "unselected" + + #Select No + + Then I set the radio button to "Na fydd" + Then the radio button "Na fydd" is "selected" + Then the radio button "Bydd" is "unselected" + + #continue + + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4342.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4342.feature new file mode 100644 index 00000000..12507af0 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4342.feature @@ -0,0 +1,39 @@ +Feature: Expenses_Welsh_JDB-4342 + +@expenses @JDB-4342 +Scenario: expensesJDB-4342 will parking costs be paid Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + Then I set "£" to "1000,00" + When I press the "Parhau" button + When I check the "Car" checkbox + When I press the "Parhau" button + Then I set "Milltiroedd y dydd" to "10.2" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + And I see "Hawlio costau parcio" on the page + And I see "Ni fydd pob llys yn talu am gostau parcio. Gall fod uchafswm y bydd y llys yn talu fesul dydd. Cysylltwch â'r llys i gael caniatâd cyn gwneud hawliad am gostau parcio." on the page + When I press the "Parhau" button + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #continue + + When I press the "Parhau" button + Then I see "Cychwyn eto" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4343.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4343.feature new file mode 100644 index 00000000..36f195f7 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4343.feature @@ -0,0 +1,175 @@ +Feature: Expenses_Welsh_JDB-4343 + +@expenses @JDB-4343 +Scenario: expensesJDB-4343 How much pay for travel Welsh + + Given I am on the Welsh version of expenses on "expenses" "juror-test01" + + Then I press the "Cychwyn arni" button + + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + Then I set "£" to "1000,00" + When I press the "Parhau" button + When I check the "Trafnidiaeth gyhoeddus" checkbox + When I press the "Parhau" button + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + And I see "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "Sut byddwch yn teithio i'r llys?" on the page + When I press the "Parhau" button + + #page text + + And I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + Then I see "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" on the page + Then I click on the "Mae gen i docyn tymor y gallaf ei ddefnyddio" link + And I see "Os oes gennych docyn tymor ar gyfer teithio yn barod, ni allwch hawlio ar gyfer unrhyw ran o'r gost hwn oherwydd nid yw'n gost ychwanegol y mae'n rhaid ichi ei dalu." on the page + And I see "Os nad oes gennych unrhyw gostau trafnidiaeth gyhoeddus ychwanegol i'w hawlio, nodwch £0." on the page + And I see "Cost eich holl docynnau mewn £ fesul dydd" on the page + + #errors if Continue pressed with no input + + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Nodwch gost eich holl docynnau fesul dydd" + Then I see "Nodwch gost eich holl docynnau fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + #input values + + When I set "Cost eich holl docynnau mewn £ fesul dydd" to "Not many" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gost eich holl docynnau fesul dydd" + Then I see "Nodwch gost eich holl docynnau fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + When I set "Cost eich holl docynnau mewn £ fesul dydd" to "10..00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gost eich holl docynnau fesul dyd" + Then I see "Nodwch gost eich holl docynnau fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + When I set "Cost eich holl docynnau mewn £ fesul dydd" to "10.00" + When I press the "Parhau" button + + And I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + And "Cost eich holl docynnau mewn £ fesul dydd" is "10.00" + + When I set "Cost eich holl docynnau mewn £ fesul dydd" to "10," + Then I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to ",00" + When I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to ".00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gost eich holl docynnau fesul dyd" + Then I see "Nodwch gost eich holl docynnau fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "<10" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gost eich holl docynnau fesul dyd" + Then I see "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "10.2" + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "10.2" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to " 10" + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "10" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "10 " + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "10" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "10 00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gost eich holl docynnau fesul dyd" + Then I see "Nodwch gost eich holl docynnau fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + When I press the "Parhau" button + + And I see "Gwiriwch eich atebion" on the page + And I see text "10.00" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "10/12" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gost eich holl docynnau fesul dyd" + Then I see "Nodwch gost eich holl docynnau fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "10.00" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I set "Cost eich holl docynnau mewn £ fesul dydd" to "10-00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch gost eich holl docynnau fesul dyd" + Then I see "Nodwch gost eich holl docynnau fesul dydd" under the label "Cost eich holl docynnau mewn £ fesul dydd" + + When I set "Cost eich holl docynnau mewn £ fesul dydd" to "10.00" + When I press the "Parhau" button + + And I see "Gwiriwch eich atebion" on the page + And I see text "£10.00" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I set "Cost eich holl docynnau mewn £ fesul dydd" to "1000000.00" + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "1000000.00" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "£10" + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "10" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "10,00" + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "1000.00" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + When I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "0" + When I press the "Parhau" button + And I see "Gwiriwch eich atebion" on the page + And I see text "0" in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4344.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4344.feature new file mode 100644 index 00000000..04c43635 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4344.feature @@ -0,0 +1,151 @@ +Feature: Expenses_Welsh_JDB-4344 + +@expenses @JDB-4344 +Scenario: expenses-Welsh-JDB-4344 + + Given I am on the welsh version of "expenses" "juror-test01" + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + + And I press the "Cychwyn arni" button + + Then I set the radio button to "Byddaf" + When I press the "Parhau" button + Then I set the radio button to "Nac ydw" + When I press the "Parhau" button + Then I set "£ y dydd" to "25" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + Then I set "£ y dydd" to "10" + When I press the "Parhau" button + When I check the "Beic" checkbox + When I check the "Car" checkbox + When I check the "Beic modur" checkbox + When I check the "Trafnidiaeth gyhoeddus" checkbox + When I check the "Cerdded" checkbox + When I press the "Parhau" button + Then I set "Milltiroedd y dydd" to "2" + When I press the "Parhau" button + Then I set "Milltiroedd y dydd" to "2" + When I press the "Parhau" button + Then I set "Milltiroedd y dydd" to "2" + When I press the "Parhau" button + Then I set the radio button to "Bydd" + When I press the "Parhau" button + When I press the "Parhau" button + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "20" + When I press the "Parhau" button + + #page text + + Then I see "Gwiriwch eich atebion" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #change lose income + + + And I see "Gwiriwch eich atebion" on the page + And I see "Colli enillion" on the page + + + + And I click on the "Newid" link in the same row as "A fyddwch yn colli incwm?" + + And I set the radio button to "Na fyddaf" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "Na fyddaf" in the same row as "A fyddwch yn colli incwm?" + + And I click on the "Newid" link in the same row as "A fyddwch yn colli incwm?" + + And I set the radio button to "Byddaf" + When I press the "Parhau" button + And I set the radio button to "Nac ydw" + When I press the "Parhau" button + Then I set "£ y dydd" to "25" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebio" on the page +# And I see text "Ydw" in the same row as "A fyddwch yn colli incwm?" + + #change how much do you earn + +# And I see text "Nac ydw" in the same row as "A ydych yn ennill mwy na £64.95 y dydd?" +# And I see text "25.00" in the same row as "Faint ydych chi'n ennill fesul dydd?" + And I click on the "Newid" link in the same row as "Faint ydych chi'n ennill fesul dydd?" + + And I set "£ y dydd" to "30" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "30.00" in the same row as "Faint ydych chi'n ennill fesul dydd?" + + #change extra costs + + And I see "Treuliau eraill" on the page +# And I see text "Ydw" in the same row as "A oes gennych gostau ychwanegol na fyddai'n codi fel arfer?" + And I click on the "Newid" link in the same row as "A oes gennych gostau ychwanegol na fyddai'n codi fel arfer?" + + And I set the radio button to "Na fydd" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "No" in the same row as "A oes gennych gostau ychwanegol na fyddai'n codi fel arfer?" + + #change travel types + + And I see "Teithio" on the page +# And I see text "Beic ,Car,Beic modur ,Trafnidiaeth gyhoeddus ,Cerdded " in the same row as "Sut byddwch yn teithio i'r llys?" + And I click on the "Newid" link in the same row as "Sut byddwch yn teithio i'r llys?" + + And I uncheck the "Cerdded" checkbox + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "Beic ,Car,Beic modur ,Trafnidiaeth gyhoeddus" in the same row as "Sut byddwch yn teithio i'r llys?" + + #change bicycle miles + +# And I see text "2 Milltiroedd " in the same row as "Milltiroedd ar feic fesul dydd" + And I click on the "Newid" link in the same row as "Milltiroedd ar feic fesul dydd" + + And I set "Milltiroedd y dydd" to "5" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "5 Milltiroedd" in the same row as "Milltiroedd ar feic fesul dydd" + + #change car miles + +# And I see text "2 Milltiroedd" in the same row as "Milltiroedd mewn car fesul dydd" + And I click on the "Newid" link in the same row as "Milltiroedd mewn car fesul dydd" + + And I set "Milltiroedd y dydd" to "5" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "5 Milltiroedd" in the same row as "Milltiroedd mewn car fesul dydd" + + #change motorcycle miles + +# And I see text "2 Milltiroedd" in the same row as "Milltiroedd ar feic modur fesul dydd" + And I click on the "Newid" link in the same row as "Milltiroedd ar feic modur fesul dydd" + + And I set "Milltiroedd y dydd" to "5" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "5 Milltiroedd" in the same row as "Milltiroedd ar feic modur fesul dydd" + + #change public transport miles + +# And I see text "20.00" in the same row as "Costau trafnidiaeth gyhoeddus fesul dydd" + And I click on the "Newid" link in the same row as "Cyfanswm cost trafnidiaeth gyhoeddus fesul dydd" + + And I set "Cost eich holl docynnau mewn £ fesul dydd" to "25" + When I press the "Parhau" button + Then I see "Gwiriwch eich atebion" on the page +# And I see text "25.00" in the same row as "Costau trafnidiaeth gyhoeddus fesul dydd" + + When I press the "Parhau" button + Then I see "Dylech fod yn gallu hawlio" on the page + And I see "Cychwyn eto" on the page diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4345_Welsh_JDB-4348.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4345_Welsh_JDB-4348.feature new file mode 100644 index 00000000..13018ce5 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4345_Welsh_JDB-4348.feature @@ -0,0 +1,453 @@ +Feature: Expenses_Welsh_JDB-4345_JDB-4348 + +@expenses @JDB-4345 @JDB-4348 +Scenario Outline: expenses_Welsh_JDB-4345_RoundUp + + Given I am on the welsh version of "expenses" "bau-test2" + + And I press the "Cychwyn arni" button + + #loseincome + Then I set the radio button to "Byddaf" + When I press the "Parhau" button + + #earnmorethan + Then I set the radio button to "Nac ydw" + When I press the "Parhau" button + + #dailyearnings + + Then I set "£ y dydd" to "<earnings>" + When I press the "Parhau" button + + #otherexpenses + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #dailyexpenses + Then I set "£ y dydd" to "<expenses>" + When I press the "Parhau" button + + #traveltypes + When I check the "Beic" checkbox + When I check the "Car" checkbox + When I check the "Beic modur" checkbox + When I check the "Trafnidiaeth gyhoeddus" checkbox + When I check the "Cerdded" checkbox + When I press the "Parhau" button + + #setbikemiles + Then I set "Milltiroedd y dydd" to "<bikeMiles>" + When I press the "Parhau" button + + #setcarmiles + Then I set "Milltiroedd y dydd" to "<carMiles>" + When I press the "Parhau" button + + #setmotorbikemiles + Then I set "Milltiroedd y dydd" to "<motorbikeMiles>" + When I press the "Parhau" button + + #payforparking? + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #cantclaimforparking + When I press the "Parhau" button + + #publictransportcosts + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "<publicTransport>" + When I press the "Parhau" button + + #checkyouranswers + When I press the "Parhau" button + + #pagetext + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + Then I see "Dylech fod yn gallu hawlio" on the page + + And I see "<totalClaim> y dydd" on the page + + Then I see "Mae cyfrifiad hwn yn seiliiedig ar y canlynol:" on the page + Then I see "bod y manylion rydych wedi'u rhoi yn gywir" on the page + Then I see "bod eich gwasanaeth rheithgor yn para hyd at 10 diwrnod" on the page + Then I see "byddwch yn y llys am o leiaf 4 awr pob dydd" on the page + + Then I see "Sut wnaethom ni gyfrifo hwn" on the page + + And under the "Sut wnaethom ni gyfrifo hwn" heading I see "Colli enillion ac unrhyw gostau eraill" + + Then I see "Gallwch hawlio £<canClaim> ar gyfer pob dydd y byddwch yn colli incwm neu bob dydd lle mae gennych gostau ychwanegol oherwydd eich bod yn gwasanaethu ar reithgor" on the page + + Then I click on the "Sut mae fy nhreuliau a faint o fy enillion yr wyf wedi eu colli wedi cael eu cyfrifo?" link + + And on Expenses I see "<earnings> fesul dydd " under "Colli enillion" + + And on Expenses I see "<expenses> fesul dydd " under "Treuliau eraill" + + And on Expenses I see "<earningsAndExpenses> fesul dydd " under "Cyfanswm" + + And on Expenses I see "£<canClaim> yw'r uchafswm y gallwch ei hawlio fesul dydd o fewn y 10 diwrnod o wasanaethu ar reithgor. Ar gyfer dyddiau sy'n fyrrach na 4 awr, mae'r swm hwn yn llai, sef £32.47" under "Cyfanswm" + + And under the "Sut wnaethom ni gyfrifo hwn" heading I see "Teithio" + + Then I see "Gallwch hawlio £<totalTravel> ar gyfer pob dydd rydych yn teithio i'r llys." on the page + + Then I click on the "Sut mae fy nhreuliau teithio wedi cael eu cyfrifo?" link + + And on Expenses I see "<carMiles> o filltiroedd ar raddfa o 31.4p y filltir = <carExpenses>" under "Milltiroedd mewn car" + + And on Expenses I see "<motorbikeMiles> o filltiroedd ar raddfa o 31.4p y filltir = <motorbikeExpenses>" under "Milltiroedd ar feic modur" + + And on Expenses I see "<bikeMiles> o filltiroedd ar raddfa o 31.4p y filltir = <bikeExpenses>" under "Milltiroedd ar feic" + + And on Expenses I see "<publicTransport> y dydd" under "Tocynnau teithio" + + Then on Expenses I see "<totalTravel> y dydd" under "Cyfanswm" + + And I see "Nid yw hyn yn cynnwys costau parcio oherwydd byddwch angen cysylltu â'r llys yn gyntaf i ofyn a fyddant yn talu am eich costau parcio." on the page + And I see "Pan fyddwch wedi cychwyn gwasanaethu ar reithgor, os byddwch yn cynnig dod â rheithwyr eraill i'r llys yn eich car, gallwch hawlio 4.2c ychwanegol fesul milltir ar gyfer y teithiwr cyntaf, a 3.2c ychwanegol eto ar gyfer pob teithiwr ychwanegol ar ôl hynny." on the page + + Then I see "Bwyd a diod" on the page + + And I see "Gallwch hawlio £5.71 pob dydd, hyd yn oed os ydych yn dod â bwyd a diod eich hun gyda chi." on the page + + And I see "I gael rhagor o wybodaeth am sut mae treuliau yn cael eu cyfrifo a sut gall newidiadau i'ch gwasanaeth rheithgor effeithio ar y swm y gallwch ei hawlio, darllenwch y ddogfen beth allwch chi ei hawlio " on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #back link + + Then I click on the "Cliciwch i fynd yn ôl" link + And I see "Gwiriwch eich atebion" on the page + When I press the "Parhau" button + + Then I click on the "beth allwch chi ei hawlio" link + And I see "https://www.gov.uk/jury-service" in the URL + + + Then I press the "back" button on my browser + + Then I click on the "Court and Tribunal Finder" link +# And I see "www.find-court-tribunal.service.gov.uk/search-option" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Cychwyn eto" link + And I see "A fyddwch yn colli unrhyw incwm wrth ichi wasanaethu ar reithgor?" on the page + +Examples: + |earnings |expenses |canClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | +#noroundup + |43.83 |54.22 |64.95 |98.05 |20.15 |2.5 |0.79 |2.5 |0.79 |2.5 |0.24 |21.97 |92.63 | +#backendroundupwithdecplaces + |29.87 |57.00 |64.95 |86.87 |20.99 |2.8 |0.88 |2.8 |0.88 |2.9 |0.28 |23.03 |93.69 | +#backendroundupwholenumbers + |29 |57 |64.95 |86 |21 |1 |0.31 |1 |0.31 |2 |0.19 |21.81 |92.47 | +#earningsandinputexpensestotallessthan64.95 + |20 |14.50 |34.50 |34.50 |21 |1 |0.31 |1 |0.31 |2 |0.19 |21.81 |62.02 | +#displaysearningsandexpenses30 + |20 |10 |30.00 |30 |21 |1 |0.31 |1 |0.31 |2 |0.19 |21.81 |57.52 | +#displaystravel21.80 + |20 |14.50 |34.50 |34.50 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |62.01 | + +@expenses @JDB-4345 @JDB-4348 +Scenario Outline: expensesJDB-4345_earnings>64.95andexpenses=0 + + Given I am on the welsh version of "expenses" "bau-test2" + + And I press the "Cychwyn arni" button + + #loseincome + + Then I set the radio button to "Byddaf" + When I press the "Parhau" button + + #earnmorethan + + Then I set the radio button to "Nac ydw" + When I press the "Parhau" button + + #dailyearnings + + Then I set "£ y dydd" to "<earnings>" + When I press the "Parhau" button + + #otherexpenses + + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #dailyexpenses + + Then I set "£ y dydd" to "<expenses>" + When I press the "Parhau" button + + #traveltypes + + When I check the "Beic" checkbox + When I check the "Car" checkbox + When I check the "Beic modur" checkbox + When I check the "Trafnidiaeth gyhoeddu" checkbox + When I check the "Cerdded" checkbox + When I press the "Parhau" button + + #setbikemiles + + Then I set "Milltiroedd y dydd" to "<bikeMiles>" + When I press the "Parhau" button + + #setcarmiles + + Then I set "Milltiroedd y dydd" to "<carMiles>" + When I press the "Parhau" button + + #setmotorbikemiles + + Then I set "Milltiroedd y dydd" to "<motorbikeMiles>" + When I press the "Parhau" button + + #payforparking? + + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #cantclaimforparking + + When I press the "Parhau" button + + #publictransportcosts + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "<publicTransport>" + When I press the "Parhau" button + + #checkyouranswers + + When I press the "Parhau" button + + #pagetext + + Then I see "Dylech fod yn gallu hawlio" on the page + + And I see "£<totalClaim> y dydd" on the page + + Then I see "Mae cyfrifiad hwn yn seiliiedig ar y canlynol:" on the page + Then I see "bod y manylion rydych wedi'u rhoi yn gywir" on the page + Then I see "bod eich gwasanaeth rheithgor yn para hyd at 10 diwrnod" on the page + Then I see "byddwch yn y llys am o leiaf 4 awr pob dydd" on the page + + Then I see "Sut wnaethom ni gyfrifo hwn" on the page + + And under the "Sut wnaethom ni gyfrifo hwn" heading I see "Colli enillion ac unrhyw gostau eraill" + + Then I see "Gallwch hawlio £<canClaim> ar gyfer pob dydd y byddwch yn colli incwm neu bob dydd lle mae gennych gostau ychwanegol oherwydd eich bod yn gwasanaethu ar reithgor" on the page + + Then I click on the "Sut mae fy nhreuliau a faint o fy enillion yr wyf wedi eu colli wedi cael eu cyfrifo?" link + + And on Expenses I see "<earnings> fesul dydd" under "Colli enillion" + + And under the "Sut wnaethom ni gyfrifo hwn" heading I do not see "Treuliau eraill" + + And on Expenses I see "<earningsAndExpenses> fesul dydd" under "Cyfanswm" + + And I see "£64.95 yw'r uchafswm y gallwch ei hawlio fesul dydd o fewn y 10 diwrnod o wasanaethu ar reithgor. Ar gyfer dyddiau sy'n fyrrach na 4 awr, mae'r swm hwn yn llai, sef £32.47" on the page + + Then I do not see "Teithio" on the page + + Then I do not see link with text "Sut mae fy nhreuliau teithio wedi cael eu cyfrifo?" + + And I do not see "Milltiroedd mewn car" on the page + + And I do not see "Milltiroedd ar feic modur" on the page + + And I do not see "Milltiroedd ar feic" on the page + + And I do not see "Tocynnau teithio" on the page + + Then I do not see "£<totalTravel> fesul dydd" on the page + + And I do not see "Nid yw hyn yn cynnwys costau parcio oherwydd byddwch angen cysylltu â'r llys yn gyntaf i ofyn a fyddant yn talu am eich costau parcio." on the page + And I do not see "Pan fyddwch wedi cychwyn gwasanaethu ar reithgor, os byddwch yn cynnig dod â rheithwyr eraill i'r llys yn eich car, gallwch hawlio 4.2c ychwanegol fesul milltir ar gyfer y teithiwr cyntaf, a 3.2c ychwanegol eto ar gyfer pob teithiwr ychwanegol ar ôl hynny." on the page + + Then I see "Bwyd a diod" on the page + + And I see "Gallwch hawlio £5.71 pob dydd, hyd yn oed os ydych yn dod â bwyd a diod eich hun gyda chi." on the page + And I see "I gael rhagor o wybodaeth am sut mae treuliau yn cael eu cyfrifo a sut gall newidiadau i'ch gwasanaeth rheithgor effeithio ar y swm y gallwch ei hawlio, darllenwch y ddogfen beth allwch chi ei hawlio " on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + Then I click on the "beth allwch chi ei hawlio" link + And I see "https://www.gov.uk/jury-service" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Court and Tribunal Finder" link +# And I see "www.find-court-tribunal.service.gov.uk/search-option" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Cychwyn eto" link + And I see "A fyddwch yn colli unrhyw incwm wrth ichi wasanaethu ar reithgor?" on the page + +Examples: + |earnings |expenses |canClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | +#earnings>64.95andexpenses=0 + |70.00 |0.00 |64.95 |70.00 |0 |0 |0 |0 |0 |0 |0 |0 |70.66 | + + +@expenses @JDB-4345 @JDB-4348 +Scenario Outline: expensesJDB-4345_0earningsandexpenses>or<64.95 + + Given I am on the welsh version of "expenses" "juror-test01" + + And I press the "Cychwyn arni" button + + #loseincome + + Then I set the radio button to "Byddaf" + When I press the "Parhau" button + + #earnmorethan + + Then I set the radio button to "Nac ydw" + When I press the "Parhau" button + + #dailyearnings + + Then I set "£ y dydd" to "<earnings>" + When I press the "Parhau" button + + #otherexpenses + + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #dailyexpenses + + Then I set "£ y dydd" to "<expenses>" + When I press the "Parhau" button + + #traveltypes + + When I check the "Beic" checkbox + When I check the "Car" checkbox + When I check the "Beic modur" checkbox + When I check the "Trafnidiaeth gyhoeddus" checkbox + When I check the "Cerdded" checkbox + When I press the "Parhau" button + + #setbikemiles + + Then I set "Milltiroedd y dydd" to "<bikeMiles>" + When I press the "Parhau" button + + #setcarmiles + + Then I set "Milltiroedd y dydd" to "<carMiles>" + When I press the "Parhau" button + + #setmotorbikemiles + + Then I set "Milltiroedd y dydd" to "<motorbikeMiles>" + When I press the "Parhau" button + + #payforparking? + + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #cantclaimforparking + + When I press the "Parhau" button + + #publictransportcosts + + Then I set "Cost eich holl docynnau mewn £ fesul dydd" to "<publicTransport>" + When I press the "Parhau" button + + #checkyouranswers + + When I press the "Parhau" button + + #pagetext + + Then I see "Dylech fod yn gallu hawlio" on the page + + And I see "£<totalClaim> y dydd" on the page + + Then I see "Mae cyfrifiad hwn yn seiliiedig ar y canlynol:" on the page + Then I see "bod y manylion rydych wedi'u rhoi yn gywir" on the page + Then I see "bod eich gwasanaeth rheithgor yn para hyd at 10 diwrnod" on the page + Then I see "byddwch yn y llys am o leiaf 4 awr pob dydd" on the page + + And under the "Sut wnaethom ni gyfrifo hwn" heading I see "Colli enillion ac unrhyw gostau eraill" + + Then I see "Gallwch hawlio £<canClaim> ar gyfer pob dydd y byddwch yn colli incwm neu bob dydd lle mae gennych gostau ychwanegol oherwydd eich bod yn gwasanaethu ar reithgor" on the page + + Then I click on the "Sut mae fy nhreuliau a faint o fy enillion yr wyf wedi eu colli wedi cael eu cyfrifo?" link + + And under the "Sut wnaethom ni gyfrifo hwn" heading I do not see "<earnings> fesul dydd" + + And on Expenses I see "<expenses> fesul dydd" under "Treuliau eraill" + + And on Expenses I see "<earningsAndExpenses> fesul dydd" under "Cyfanswm" + + And I see "£<upperClaim> yw'r uchafswm y gallwch ei hawlio fesul dydd o fewn y 10 diwrnod o wasanaethu ar reithgor. Ar gyfer dyddiau sy'n fyrrach na 4 awr, mae'r swm hwn yn llai, sef £32.47" on the page + + Then I see "Gallwch hawlio £<totalTravel> ar gyfer pob dydd rydych yn teithio i'r llys." on the page + + Then I click on the "Sut mae fy nhreuliau teithio wedi cael eu cyfrifo?" link + + And on Expenses I see "<carMiles> o filltiroedd ar gyfradd o 31.4p fesul milltir = <carExpenses>" under "Milltiroedd mewn car" + + And on Expenses I see "<motorbikeMiles> o filltiroedd ar gyfradd o 31.4p fesul milltir = <motorbikeExpenses>" under "Milltiroedd ar feic modur" + + And on Expenses I see "<bikeMiles> o filltiroedd ar gyfradd o 31.4p fesul milltir = <bikeExpenses>" under "Milltiroedd ar feic" + + And on Expenses I see "<publicTransport> fesul dydd" under "Tocynnau teithio" + + Then on Expenses I see "<totalTravel> fesul dydd" under "Cyfanswm" + + And I see "Nid yw hyn yn cynnwys costau parcio oherwydd byddwch angen cysylltu â'r llys yn gyntaf i ofyn a fyddant yn talu am eich costau parcio." on the page + And I see "Pan fyddwch wedi cychwyn gwasanaethu ar reithgor, os byddwch yn cynnig dod â rheithwyr eraill i'r llys yn eich car, gallwch hawlio 4.2c ychwanegol fesul milltir ar gyfer y teithiwr cyntaf, a 3.2c ychwanegol eto ar gyfer pob teithiwr ychwanegol ar ôl hynny." on the page + + Then I see "Bwyd a diod" on the page + + And I see "Gallwch hawlio £5.71 pob dydd, hyd yn oed os ydych yn dod â bwyd a diod eich hun gyda chi." on the page + + And I see "I gael rhagor o wybodaeth am sut mae treuliau yn cael eu cyfrifo a sut gall newidiadau i'ch gwasanaeth rheithgor effeithio ar y swm y gallwch ei hawlio, darllenwch y ddogfen beth allwch chi ei hawlio" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Privacy policy" on the page + + Then I click on the "beth allwch chi ei hawlio" link + And I see "www.gov.uk/jury-service" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Court and Tribunal Finder" link +# And I see "www.find-court-tribunal.service.gov.uk/search-option" in the URL + + Then I press the "back" button on my browser + + Then I click on the "Cychwyn eto" link + And I see "A fyddwch yn colli unrhyw incwm wrth ichi wasanaethu ar reithgor?" on the page + +Examples: + |earnings |expenses |canClaim |upperClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | +#earnings0expenses<64.95 + |0.00 |14.55 |14.55 |64.95 |14.55 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |42.06 | +#earnings0andexpenses>64.94 + |0.00 |70.55 |64.95 |64.95 |70.55 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |92.46 | diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4372.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4372.feature new file mode 100644 index 00000000..f5b08945 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4372.feature @@ -0,0 +1,162 @@ +Feature: Expenses_Welsh_JDB-4372 + +@expenses @JDB-4372 +Scenario Outline: expenses_Welsh_JDB-4372 + + Given I am on the welsh version of "expenses" "juror-test01" + + And I press the "Cychwyn arni" button + + #loseincome + Then I set the radio button to "Byddaf" + When I press the "Parhau" button + + #earnmorethan + Then I set the radio button to "Ydw" + When I press the "Parhau" button + + #otherexpenses + Then I set the radio button to "Bydd" + When I press the "Parhau" button + + #dailyexpenses + Then I set "£ y dydd" to "<expenses>" + When I press the "Parhau" button + + #traveltypes + When I check the "Beic modur" checkbox + When I press the "Parhau" button + + #page content + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + And I see "Cyfanswm y milltiroedd rydych yn teithio ar feic modur fesul dydd" on the page + And I see "Milltiroedd y dydd" on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "Sut byddwch yn teithio i'r llys?" on the page + When I press the "Parhau" button + + #errors if Continue pressed with no input + + When I press the "Parhau" button + And under the "There is a problem" heading I see "Nodwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Nodwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + #input values + + When I set "Milltiroedd y dydd" to "Not many" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10..00" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to ",00" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "£10" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "<10" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10," + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to ".00" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + #allowed + + Then I set "Milltiroedd y dydd" to "10/12" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "0" + When I press the "Parhau" button + + #payforparking? + Then I set the radio button to "Na fydd" + When I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Milltiroedd ar feic modur fesul dydd" + + + Then I set "Milltiroedd y dydd" to "1000000.00" + When I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Milltiroedd ar feic modur fesul dydd" + + Then I set "Milltiroedd y dydd" to "10,00" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10-00" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10 00" + When I press the "Parhau" button + + And under the "There is a problem" heading I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" + Then I see "Gwiriwch faint o filltiroedd rydych yn teithio ar feic modur fesul dydd" under the label "Milltiroedd y dydd" + + Then I set "Milltiroedd y dydd" to "10 " + When I press the "Parhau" button + + When I click on the "Newid " link in the same row as "Milltiroedd ar feic modur fesul dydd" + + Then I set "Milltiroedd y dydd" to " 10" + When I press the "Parhau" button + + When I click on the "Newid " link in the same row as "Milltiroedd ar feic modur fesul dydd" + + Then I set "Milltiroedd y dydd" to "10.2" + When I press the "Parhau" button + + #continue + + When I press the "Parhau" button + Then I see "Dylech fod yn gallu hawlio" on the page + + +Examples: + |earnings |expenses |canClaim |upperClaim |earningsAndExpenses|publicTransport|carMiles |carExpenses|motorbikeMiles |motorbikeExpenses |bikeMiles|bikeExpenses |totalTravel|totalClaim | + |20.00 |14.55 |14.55 |64.95 |14.55 |20.99 |1 |0.31 |1 |0.31 |2 |0.19 |21.80 |42.06 | + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4373.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4373.feature new file mode 100644 index 00000000..597535fb --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4373.feature @@ -0,0 +1,49 @@ +Feature: Expenses_Welsh_JDB-4373 + +@expenses @JDB-4373 +Scenario: expenses_Welsh_JDB-4373 + + Given I am on the welsh version of "expenses" "juror-test01" + + And I press the "Cychwyn arni" button + + #page content + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + Then I see "A fyddwch yn colli unrhyw incwm wrth ichi wasanaethu ar reithgor?" on the page + And I see "Mae hyn yn golygu incwm gan gyflogwr neu eich incwm os ydych yn hunangyflogedig. Ni fydd budd-daliadau fel y Lwfans Ceisio Gwaith yn cael ei effeithio oni bai eich bod yn gwasanaethu ar reithgor am fwy na 8 wythnos." on the page + Then I click on the "Mae fy nghyflogwr wedi dweud y byddant yn fy nhalu ac yn hawlio'r arian yn ôl gan y llys" link + Then I see "Gellir ad-dalu costau treuliau ac unrhyw enillion a gollwyd i'r rheithiwr dim ond os yw'r rheithiwr wedi profi colled ariannol o ganlyniad uniongyrchol i wasanaethu ar reithgor. Ni fydd y llys yn talu iawndal i drydydd partïon fel cyflogwyr. Os bydd eich cyflogwr yn eich talu, ni allwch wneud hawliad am golli enillion." on the page + + #none selected by default + + And the radio button "Byddaf" is "unselected" + And the radio button "Na fyddaf" is "unselected" + + #errors if Continue pressed with none selected + + When I press the "Parhau" button + Then I see "Dewiswch byddaf neu na fyddaf" on the page + + #Select Yes + + + Then I set the radio button to "Byddaf" + Then the radio button "Byddaf" is "selected" + Then the radio button "Na fyddaf" is "unselected" + + #Select No + + Then I set the radio button to "Na fyddaf" + Then the radio button "Na fyddaf" is "selected" + Then the radio button "Byddaf" is "unselected" + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + And I do not see link with text "Cliciwch i fynd yn ôl" \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4374.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4374.feature new file mode 100644 index 00000000..3387707e --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4374.feature @@ -0,0 +1,57 @@ +Feature: Expenses_Welsh_JDB-4374 + +@expenses @JDB-4374 +Scenario: expenses_Welsh_JDB-4374 + + Given I am on the welsh version of "expenses" "juror-test01" + + #navigate to expenses page + + And I press the "Cychwyn arni" button + + #loseincome + + Then I set the radio button to "Byddaf" + When I press the "Parhau" button + + #earnmorethan + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + And I see "A ydych yn ennill mwy na £64.95 y dydd ar y dyddiau pan fyddwch yn gweithio?" on the page + And I see "Os ydych yn ennill symiau gwahanol o arian ar ddyddiau gwahanol, defnyddiwch y swm mwyaf i ganfod beth yw'r uchafswm y gallwch ei hawlio." on the page + + #none selected by default + + And the radio button "Ydw" is "unselected" + And the radio button "Nac ydw" is "unselected" + + #errors if Continue pressed with none selected + + When I press the "Parhau" button + Then I see "Dewiswch ydw neu nac ydw" on the page + + #Select Yes + + Then I set the radio button to "Ydw" + Then the radio button "Ydw" is "selected" + Then the radio button "Nac ydw" is "unselected" + + #Select No + + Then I set the radio button to "Nac ydw" + Then the radio button "Nac ydw" is "selected" + Then the radio button "Ydw" is "unselected" + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #Back link + + Then I click on the "Cliciwch i fynd yn ôl" link + And I see "A fyddwch yn colli unrhyw incwm wrth ichi wasanaethu ar reithgor?" on the page + + Then I see "Parhau" on the page + diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4375.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4375.feature new file mode 100644 index 00000000..1941777f --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4375.feature @@ -0,0 +1,154 @@ +Feature: Expenses_Welsh_JDB-4375 + +@expenses @JDB-4375 +Scenario: expenses_Welsh_JDB-4375 + + Given I am on the welsh version of "expenses" "juror-test01" + + And I press the "Cychwyn arni" button + + #loseincome + Then I set the radio button to "Byddaf" + When I press the "Parhau" button + + #earnmorethan + Then I set the radio button to "Nac ydw" + When I press the "Parhau" button + + #Back link + + And I click on the "Cliciwch i fynd yn ôl" link + Then I see "A ydych yn ennill mwy na £64.95 y dydd ar y dyddiau pan fyddwch yn gweithio?" on the page + When I press the "Parhau" button + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #page content + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + + Then I see "Faint o arian ydych chi'n ennill bob dydd?" on the page + And I see "Nodwch gyfanswm yr arian yr ydych yn ei ennill ar gyfer unrhyw gyflogaeth, hunangyflogaeth neu fel cyfarwyddwr cwmni pob dydd. Dylai hyn fod y swm rydych yn ei gael ar ôl talu treth, a elwir hefyd yn Gyflog Net." on the page + + Then I see "£ y dydd" on the page + + Then I see "Parhau" on the page + And I click on the "Lle galla i ddod o hyd i'r wybodaeth hon?" link + And I see "Gallwch ddod o hyd iddi ar eich taflen gyflog, P60 neu'ch ffurflen dreth. Bydd yn ymddangos fel 'Net Pay." on the page + + #errors if Continue pressed with no input + + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Nodwch faint rydych yn ei ennill bob dydd" + Then I see "Nodwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + #input values + + When I set "£ y dydd" to "Not much" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint rydych yn ei ennill bob dydd" + Then I see "Gwiriwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + When I set "£ y dydd" to "10..00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint rydych yn ei ennill bob dydd" + Then I see "Gwiriwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + When I set "£ y dydd" to "10," + Then I press the "Parhau" button + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + Then I set "£ y dydd" to ",00" + When I press the "Parhau" button + + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + Then I set "£ y dydd" to ".00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint rydych yn ei ennill bob dydd" + Then I see "Gwiriwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + Then I set "£ y dydd" to "<10" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint rydych yn ei ennill bob dydd" + Then I see "Gwiriwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + Then I set "£ y dydd" to "10.2" + When I press the "Parhau" button + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + Then I set "£ y dydd" to " 10" + When I press the "Parhau" button + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + And "£ y dydd" is "10.00" + Then I set "£ y dydd" to "10 " + When I press the "Parhau" button + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + And "£ y dydd" is "10.00" + Then I set "£ y dydd" to "10 00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint rydych yn ei ennill bob dydd" + Then I see "Gwiriwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + Then I set "£ y dydd" to "10/12" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint rydych yn ei ennill bob dydd" + Then I see "Gwiriwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + When I set "£ y dydd" to "10-00" + When I press the "Parhau" button + + And under the "Mae problem" heading I see "Gwiriwch faint rydych yn ei ennill bob dydd" + Then I see "Gwiriwch faint rydych yn ei ennill bob dydd" under the label "£ y dydd" + + When I set "£ y dydd" to "1000000.00" + When I press the "Parhau" button + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + And "£ y dydd" is "1000000.00" + Then I set "£ y dydd" to "£10" + When I press the "Parhau" button + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + Then I set "£ y dydd" to "10,00" + When I press the "Parhau" button + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + + Then I set "£ y dydd" to "0" + When I press the "Parhau" button + And I click on the "Cliciwch i fynd yn ôl" link + When I press the "Parhau" button + When I press the "Parhau" button + And "£ y dydd" is "0.00" + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4376.feature b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4376.feature new file mode 100644 index 00000000..094c1b95 --- /dev/null +++ b/src/test/resources/cucumber/features/expenses/expenses_Welsh_JDB-4376.feature @@ -0,0 +1,47 @@ +Feature: Expenses_Welsh_JDB-4376 + +@expenses @JDB-4376 +Scenario: expenses_Welsh_JDB-4376 + + Given I am on the welsh version of "expenses" "juror-test01" + + And I press the "Cychwyn arni" button + + Then I see "A fyddwch yn colli unrhyw incwm wrth ichi wasanaethu ar reithgor?" on the page + Then I set the radio button to "Na fyddaf" + When I press the "Parhau" button + + + Then I see "Gwiriwch beth allwch chi ei hawlio ar gyfer gwasanaethu ar reithgor" on the page + + Then I see "A fydd gwasanaethu ar reithgor yn golygu y bydd gennych gostau ychwanegol na fyddai'n codi fel arfer?" on the page + + And I click on the "Hawlio Treuliau ar gyfer gofal plant neu gofal ar gyfer oedolion hŷn / bregus" link + And I see "Gallwch hawlio am gostau ychwanegol sy'n codi ar gyfer gofal plant neu gostau gofal ar gyfer oedolyn hŷn / bregus yn ystod y cyfnod pan fyddwch yn gwasanaethu ar reithgor." on the page + + Then I see "Ni allwch wneud hawliad am gostau y byddwch yn eu talu fel arfer" on the page + + + And I see "os ydych yn gweithio ac yn talu am ofalwr plant fel arfer, ni allwch wneud hawliad am y dyddiau y byddwch yn gweithio fel arfer." on the page + + Then I see "Os bydd rhywun yn cymryd gwyliau blynyddol i ofalu am eich plentyn" on the page + And I see "Ni allwch hawlio eu cyflog yn ôl oherwydd byddai eu cyflogwr fel arfer yn eu talu ar gyfer eu gwyliau blynyddol." on the page + + Then I see "Os bydd eich ffrindiau neu'ch teulu yn darparu gofal ac yn codi tâl arnoch am wneud hynny" on the page + Then I see "Gallwch hawlio hyd at £2.50 yr awr, fesul plentyn neu oedolyn tuag at y gost hon." on the page + Then I see "Gallwch hawlio hyd at 8 awr ar gyfer pob diwrnod rydych chi yn y llys." on the page + And I see "Rhaid i'r unigolyn hwn ddarparu llythyr i'r llys sy'n nodi eu manylion llawn a'r dyddiadau a'r amseroedd mae'n nhw wedi gofalu am eich plentyn neu unrhyw oedolyn cyn y bydd y treuliau yn cael eu talu." on the page + + #footer + + And I see "All content is available under the Open Government Licence v3.0, except where otherwise stated" on the page + And I see "Cwcis" on the page + And I do not see "Polisi preifatrwydd" on the page + + #back link + + Then I click on the "Cliciwch i fynd yn ôl" link + And I see "A fydd gwasanaethu ar reithgor yn golygu y bydd gennych gostau ychwanegol na fyddai'n codi fel arfer?" on the page + And I set the radio button to "Na fydd" + When I press the "Parhau" button + And I see "Sut byddwch yn teithio i'r llys?" on the page \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/3rdPartyContactingJuror.feature b/src/test/resources/cucumber/features/regression/3rdPartyContactingJuror.feature new file mode 100644 index 00000000..e91edc1a --- /dev/null +++ b/src/test/resources/cucumber/features/regression/3rdPartyContactingJuror.feature @@ -0,0 +1,120 @@ +Feature: 3rd_Party_ContactingJuror + +@Regression @JDB-3504 @JDB-3640 +Scenario Outline: English check that result cannot be processed without phone number for juror + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + When I click on the "What happens if they have changed their name?" link + Then I see "If their name has changed we will contact them to check this. We might ask for a marriage, civil partnership or deed poll certificate." on the page + + #Check juror name + + When I see "Juror Details" on the page + And I press the "Continue" button + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + + #Check juror address + + When I see "Juror Details" on the page + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I click on the "Help with date of birth" link + Then on the page I see + | text| + |You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury.| + |If the person does not know their exact date of birth, use the one they put on official documents like their passport or driving licence.| + |If you cannot provide a date of birth for the person, you’ll have to send us copies of identity documents through the post. You need to reply to the summons using the form we sent by post instead of online. Ring us on 0300 456 1024 if you need advice about this.| + + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror JDB-3504 + + When I see "Juror Details" on the page + And I set the radio button to "Give a different phone number for the juror" + And I set the radio button to "Give a different email address for the juror" + And I press the "Continue" button + Then I see "Enter their main phone number" on the page + And I see "Enter their email address" on the page + + When I set "Enter email address" to "JurorEmail@outlook.com" + And I set "Enter the email address again" to "JurorEmail@outlook.com" + Then "Enter email address" is "JurorEmail@outlook.com" + Then "Enter the email address again" is "JurorEmail@outlook.com" + And I press the "Continue" button + Then I see "Enter their main phone number" on the page + Then "Enter email address" is "JurorEmail@outlook.com" + Then "Enter the email address again" is "JurorEmail@outlook.com" + + When I set "Main phone number" to "02078214545" + And I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500014 |DOE |SW1H 9AJ |email@outlook.com |415170401 | + diff --git a/src/test/resources/cucumber/features/regression/CommsGeneration.feature b/src/test/resources/cucumber/features/regression/CommsGeneration.feature new file mode 100644 index 00000000..0f718659 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/CommsGeneration.feature @@ -0,0 +1,339 @@ +Feature: Comms Generation + +@COMMSGENERATION +Scenario Outline: Create data for comms generation + + Given I am on "Public" "juror-test02" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | +# |<part_no1> |<pool_no> |400 | +# |<part_no2> |<pool_no> |400 | + |<part_no3> |<pool_no> |400 | + Given auto straight through processing has been enabled +# And "<part_no1>" has "RET_DATE" as "5 mondays time" +# And "<part_no1>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no1>" has "LNAME" as "<last_name>" +# And "<part_no1>" has "ZIP" as "<postcode>" +# And "<part_no2>" has "RET_DATE" as "5 mondays time" +# And "<part_no2>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no2>" has "LNAME" as "<last_name>" +# And "<part_no2>" has "ZIP" as "<postcode>" + And "<part_no3>" has "RET_DATE" as "1 mondays time" + And "<part_no3>" has "NEXT_DATE" as "1 mondays time" + And "<part_no3>" has "LNAME" as "<last_name>" + And "<part_no3>" has "ZIP" as "<postcode>" + And I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode | email | +# |<part_no1> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no3> |<pool_no> |<last_name> |<postcode> |<email>| +# And I have submitted a first party English excusal response +# |part_no |pool_number|last_name |postcode | email | +# |<part_no2> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + +# When I click on the "Search" link +# And I set "Juror number" to "<part_no1>" +# And I press the "Search" button +# And I click on "<part_no1>" in the same row as "<part_no1>" +# Then I see "Responded" on the page +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no2>" +# And I press the "Search" button +# And I click on "<part_no2>" in the same row as "<part_no2>" +# When I select "Excusal" from Process reply +# And I check the "Accept excusal" checkbox +# And I select "OTHER" from the "Reason for excusal request" dropdown +# And I press the "Mark as completed" button + + #DB checks (Do PNC PASS) + And "<part_no1>" has "POLICE_CHECK" as "P" + And "<part_no1>" has "PHOENIX_CHECKED" as "C" + And "<part_no2>" has "POLICE_CHECK" as "P" + And "<part_no2>" has "PHOENIX_CHECKED" as "C" + +# And "<part_no1>" has "READ_ONLY" as "Y" +# And "<part_no2>" has "READ_ONLY" as "Y" + And "<part_no3>" has "READ_ONLY" as "Y" +# And the "super_urgent" for juror "<part_no3>" is set to "Y" +# And the "urgent" for juror "<part_no3>" is set to "N" + +# When I click on the "Search" link +# And I set "Juror number" to "<part_no3>" +# And I press the "Search" button +# And I click on "<part_no3>" in the same row as "<part_no3>" +# When I select "PDF sent to court..." from Process reply +# And I check the "PDF sent to court" checkbox +# And I press the "Confirm" button + +Examples: +|part_no1 |part_no2 |part_no3 |pool_no |last_name |postcode |email | +|741500438 |741500613 |841500351 |415181001 |LNAMEFOURTHREEEIGHT |CH1 2AN |danielle.bach@cgi.com | + +@COMMSGENERATION +Scenario Outline: Create data for JDB-4706 + + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | +# |<part_no1> |<pool_no> |400 | +# |<part_no2> |<pool_no> |400 | +# |<part_no3> |<pool_no> |400 | +# |<part_no4> |<pool_no> |400 | + |<part_no5> |<pool_no2> |400 | + + Given auto straight through processing has been enabled + +# And "<part_no1>" has "RET_DATE" as "5 mondays time" +# And "<part_no1>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no1>" has "LNAME" as "<last_name>" +# And "<part_no1>" has "ZIP" as "<postcode>" +# And "<part_no2>" has "RET_DATE" as "5 mondays time" +# And "<part_no2>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no2>" has "LNAME" as "<last_name>" +# And "<part_no2>" has "ZIP" as "<postcode>" +# And "<part_no3>" has "RET_DATE" as "5 mondays time" +# And "<part_no3>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no3>" has "LNAME" as "<last_name>" +# And "<part_no3>" has "ZIP" as "<postcode>" +# And "<part_no4>" has "RET_DATE" as "5 mondays time" +# And "<part_no4>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no4>" has "LNAME" as "<last_name>" +# And "<part_no4>" has "ZIP" as "<postcode>" + And "<part_no5>" has "RET_DATE" as "5 mondays time" + And "<part_no5>" has "NEXT_DATE" as "5 mondays time" + And "<part_no5>" has "LNAME" as "<last_name>" + And "<part_no5>" has "ZIP" as "<postcode>" + +# And I have submitted a first party English straight through response +# |part_no |pool_number|last_name |postcode |email | +# |<part_no1> |<pool_no> |<last_name> |<postcode> |<email>| +# |<part_no2> |<pool_no> |<last_name> |<postcode> |<email>| +# |<part_no3> |<pool_no> |<last_name> |<postcode> |<email>| +# |<part_no4> |<pool_no> |<last_name> |<postcode> |<email>| +# + And I have submitted a first party Welsh straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no5> |<pool_no2> |<last_name> |<postcode> |<email>| +# +# Given I am on "Bureau" "juror-test01" +# And I log in as "SYSTEM" +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no1>" +# And I press the "Search" button +# And I click on "<part_no1>" in the same row as "<part_no1>" +# Then I see "Responded" on the page +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no2>" +# And I press the "Search" button +# And I click on "<part_no2>" in the same row as "<part_no2>" +# Then I see "Responded" on the page +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no3>" +# And I press the "Search" button +# And I click on "<part_no3>" in the same row as "<part_no3>" +# Then I see "Responded" on the page +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no4>" +# And I press the "Search" button +# And I click on "<part_no4>" in the same row as "<part_no4>" +# Then I see "Responded" on the page + + #DB checks (Do PNC PASS) +# And "<part_no1>" has "POLICE_CHECK" as "P" +# And "<part_no1>" has "PHOENIX_CHECKED" as "C" +# And "<part_no2>" has "POLICE_CHECK" as "P" +# And "<part_no2>" has "PHOENIX_CHECKED" as "C" +# And "<part_no3>" has "POLICE_CHECK" as "P" +# And "<part_no3>" has "PHOENIX_CHECKED" as "C" +# And "<part_no4>" has "POLICE_CHECK" as "P" +# And "<part_no4>" has "PHOENIX_CHECKED" as "C" + And "<part_no5>" has "POLICE_CHECK" as "P" + And "<part_no5>" has "PHOENIX_CHECKED" as "C" + +# And "<part_no1>" has "READ_ONLY" as "Y" +# And "<part_no2>" has "READ_ONLY" as "Y" +# And "<part_no3>" has "READ_ONLY" as "Y" +# And "<part_no4>" has "READ_ONLY" as "Y" + And "<part_no5>" has "READ_ONLY" as "Y" + +# And the "super_urgent" for juror "<part_no1>" is set to "Y" +# And the "urgent" for juror "<part_no1>" is set to "N" +# And the "super_urgent" for juror "<part_no2>" is set to "Y" +# And the "urgent" for juror "<part_no2>" is set to "N" +# And the "super_urgent" for juror "<part_no3>" is set to "Y" +# And the "urgent" for juror "<part_no3>" is set to "N" +# And the "super_urgent" for juror "<part_no4>" is set to "Y" +# And the "urgent" for juror "<part_no4>" is set to "N" + And the "super_urgent" for juror "<part_no5>" is set to "Y" + And the "urgent" for juror "<part_no5>" is set to "N" + +# And "<part_no2>" has "M_PHONE" as "" +# And "<part_no3>" has "H_EMAIL" as "" +# And the "EMAIL" for juror "<part_no3>" is set to "" +# And "<part_no4>" has "M_PHONE" as "" +# And "<part_no4>" has "H_EMAIL" as "" + + Given I have cleared down the juror digital database + +Examples: +|part_no1 |part_no2 |part_no3 |part_no4 |part_no5 |pool_no |pool_no2 |last_name |postcode |email | +|741500438 |741500613 |841500351 |741500626 |645700790 |415181001 |457170501 |LNAMEFOURTHREEEIGHT |CH1 2AN |danielle.bach@cgi.com | + +#Now run cron job + +#SCENARIOS - SEND_EMAIL_OR_SMS=1 +#juror1 - email and mobile recorded +#juror2 - email only recorded +#juror3 - mobile only recorded +#juror4 - no email and no mobile +#juror5 - WELSH email and mobile recorded + +#RESULTS +#juror1 - email only +#juror2 - email only +#juror3 - sms only +#juror4 - no comms +#juror5 - WELSH email only + +#SCENARIOS - SEND_EMAIL_OR_SMS=NULL +#juror1 - email and mobile recorded +#juror2 - email only recorded +#juror3 - mobile only recorded +#juror4 - no email and no mobile +#juror5 - WELSH email and mobile recorded + +#RESULTS +#juror1 - email and SMS +#juror2 - email only +#juror3 - sms only +#juror4 - no comms +#juror5 - WELSH email and SMS + +@COMMSGENERATION +Scenario Outline: Create data for JDB-4709 + + Given I am on "Public" "juror-test01" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |<part_no1> |<pool_no> |400 | +# |<part_no2> |<pool_no> |400 | +# |<part_no3> |<pool_no> |400 | +# |<part_no4> |<pool_no> |400 | +# |<part_no5> |<pool_no2> |400 | + + Given auto straight through processing has been enabled + + And "<part_no1>" has "RET_DATE" as "1 mondays time" + And "<part_no1>" has "NEXT_DATE" as "1 mondays time" + And "<part_no1>" has "LNAME" as "<last_name>" + And "<part_no1>" has "ZIP" as "<postcode>" +# And "<part_no2>" has "RET_DATE" as "5 mondays time" +# And "<part_no2>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no2>" has "LNAME" as "<last_name>" +# And "<part_no2>" has "ZIP" as "<postcode>" +# And "<part_no3>" has "RET_DATE" as "5 mondays time" +# And "<part_no3>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no3>" has "LNAME" as "<last_name>" +# And "<part_no3>" has "ZIP" as "<postcode>" +# And "<part_no4>" has "RET_DATE" as "5 mondays time" +# And "<part_no4>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no4>" has "LNAME" as "<last_name>" +# And "<part_no4>" has "ZIP" as "<postcode>" +# And "<part_no5>" has "RET_DATE" as "5 mondays time" +# And "<part_no5>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no5>" has "LNAME" as "<last_name>" +# And "<part_no5>" has "ZIP" as "<postcode>" + + And I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no1> |<pool_no> |<last_name> |<postcode> |<email>| +# |<part_no2> |<pool_no> |<last_name> |<postcode> |<email>| +# |<part_no3> |<pool_no> |<last_name> |<postcode> |<email>| +# |<part_no4> |<pool_no> |<last_name> |<postcode> |<email>| +# +# And I have submitted a first party Welsh straight through response +# |part_no |pool_number|last_name |postcode |email | +# |<part_no5> |<pool_no2> |<last_name> |<postcode> |<email>| +# +# Given I am on "Bureau" "juror-test01" +# And I log in as "SYSTEM" +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no1>" +# And I press the "Search" button +# And I click on "<part_no1>" in the same row as "<part_no1>" +# Then I see "Responded" on the page +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no2>" +# And I press the "Search" button +# And I click on "<part_no2>" in the same row as "<part_no2>" +# Then I see "Responded" on the page +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no3>" +# And I press the "Search" button +# And I click on "<part_no3>" in the same row as "<part_no3>" +# Then I see "Responded" on the page +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no4>" +# And I press the "Search" button +# And I click on "<part_no4>" in the same row as "<part_no4>" +# Then I see "Responded" on the page + + #DB checks (Do PNC PASS) +# And "<part_no1>" has "POLICE_CHECK" as "P" +# And "<part_no1>" has "PHOENIX_CHECKED" as "C" +# And "<part_no2>" has "POLICE_CHECK" as "P" +# And "<part_no2>" has "PHOENIX_CHECKED" as "C" +# And "<part_no3>" has "POLICE_CHECK" as "P" +# And "<part_no3>" has "PHOENIX_CHECKED" as "C" +# And "<part_no4>" has "POLICE_CHECK" as "P" +# And "<part_no4>" has "PHOENIX_CHECKED" as "C" +# And "<part_no5>" has "POLICE_CHECK" as "P" +# And "<part_no5>" has "PHOENIX_CHECKED" as "C" + + And "<part_no1>" has "READ_ONLY" as "Y" +# And "<part_no2>" has "READ_ONLY" as "Y" +# And "<part_no3>" has "READ_ONLY" as "Y" +# And "<part_no4>" has "READ_ONLY" as "Y" +# And "<part_no5>" has "READ_ONLY" as "Y" + + And "<part_no1>" has "COMPLETION_FLAG" as "Y" + And "<part_no1>" has "COMPLETION_DATE" as "17-02-2021 10:00" + +# And the "super_urgent" for juror "<part_no1>" is set to "Y" +# And the "urgent" for juror "<part_no1>" is set to "N" +# And the "super_urgent" for juror "<part_no2>" is set to "Y" +# And the "urgent" for juror "<part_no2>" is set to "N" +# And the "super_urgent" for juror "<part_no3>" is set to "Y" +# And the "urgent" for juror "<part_no3>" is set to "N" +# And the "super_urgent" for juror "<part_no4>" is set to "Y" +# And the "urgent" for juror "<part_no4>" is set to "N" +# And the "super_urgent" for juror "<part_no5>" is set to "Y" +# And the "urgent" for juror "<part_no5>" is set to "N" + +# And "<part_no2>" has "M_PHONE" as "" +# And "<part_no3>" has "H_EMAIL" as "" +# And the "EMAIL" for juror "<part_no3>" is set to "" +# And "<part_no4>" has "M_PHONE" as "" +# And "<part_no4>" has "H_EMAIL" as "" + +# Given I have cleared down the juror digital database + +Examples: +|part_no1 |part_no2 |part_no3 |part_no4 |part_no5 |pool_no |pool_no2 |last_name |postcode |email | +|641500353 |741500613 |841500351 |741500626 |645700790 |415170402 |457170501 |LNAMEFOURTHREEEIGHT |CH1 2AN |danielle.bach@cgi.com | + +#Now run cron job \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/NLE_English_1st_StraightThrough.feature b/src/test/resources/cucumber/features/regression/NLE_English_1st_StraightThrough.feature new file mode 100644 index 00000000..68af17a1 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/NLE_English_1st_StraightThrough.feature @@ -0,0 +1,351 @@ +Feature: Regression English_1st_StraightThrough + + +Scenario Outline: English 1st Party Straight Through + + Given I am on "Public" "juror-nle" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "Yes" + + And I press the "Continue" button + Then on the page I see + | text | + | Is this your address? | + + And I set the radio button to "Yes" + + When I press the "Continue" button + + Then on the page I see + |text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + And I see "steps/qualify" in the URL + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions" on the page + + +Examples: + |part_no |last_name |postcode |email |pool_no | + |041510967 |LNAMEIFG |CH7 1NN |danielle.bach@cgi.com |415220702 | + + +Scenario Outline: English 1st Party Excusal + + Given I am on "Public" "juror-nle" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #Check Name + + When I set the radio button to "Yes" + When I press the "Continue" button + + #Check Address + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |041510923 |LNAMEIBC |CH3 1NN |danielle.bach@cgi.com |415170401 | + |041510918 |LNAMEIAH |CH6 1NN |danielle.bach@cgi.com |415170401 | + |041510899 |LNAMEHII |CH3 1NN |danielle.bach@cgi.com |415170401 | + |041510894 |LNAMEHID |CH6 1NN |danielle.bach@cgi.com |415170401 | + |041510886 |LNAMEHHF |CH6 1NN |danielle.bach@cgi.com |415170401 | + |041510879 |LNAMEHGI |CH7 1NN |danielle.bach@cgi.com |415170401 | + |041510876 |LNAMEHGF |CH4 1NN |danielle.bach@cgi.com |415170401 | + |041510859 |LNAMEHEI |CH3 1NN |danielle.bach@cgi.com |415170401 | + |041510808 |LNAMEHJH |CH8 1NN |danielle.bach@cgi.com |415170401 | + |041510796 |LNAMEGIF |CH4 1NN |danielle.bach@cgi.com |415170401 | + +@NLE +Scenario Outline: English 1st Party Deferral + + Given I am on "Public" "juror-nle" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set input field with "id" of "date1Day" to "26" + When I set input field with "id" of "date1Month" to "09" + When I set input field with "id" of "date1Year" to "2022" + When I set input field with "id" of "date2Day" to "03" + When I set input field with "id" of "date2Month" to "10" + When I set input field with "id" of "date2Year" to "2022" + When I set input field with "id" of "date3Day" to "10" + When I set input field with "id" of "date3Month" to "10" + When I set input field with "id" of "date3Year" to "2022" + + And I press the "Continue" button + + #check dates screen + + And I see "Check your dates" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | +# |041510776 |415220702 |LNAMEGGF |CH8 1NN |danielle.bach@cgi.com | +# |041510700 |415220702 |LNAMEGJJ |CH4 1NN |danielle.bach@cgi.com | +# |041510696 |415220702 |LNAMEFIF |CH8 1NN |danielle.bach@cgi.com | +# |041510693 |415220702 |LNAMEFIC |CH5 1NN |danielle.bach@cgi.com | +# |041510643 |415220702 |LNAMEFDC |CH3 1NN |danielle.bach@cgi.com | +# |041510639 |415220702 |LNAMEFCI |CH7 1NN |danielle.bach@cgi.com | +# |041510638 |415220702 |LNAMEFCH |CH6 1NN |danielle.bach@cgi.com | + |041510572 |415220702 |LNAMEEGB |CH4 1NN |danielle.bach@cgi.com | +# |041510559 |415220702 |LNAMEEEI |CH7 1NN |danielle.bach@cgi.com | +# |041510542 |415220702 |LNAMEEDB |CH6 1NN |danielle.bach@cgi.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_4539.feature b/src/test/resources/cucumber/features/regression/REGRESSION_4539.feature new file mode 100644 index 00000000..ffbe1d86 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_4539.feature @@ -0,0 +1,1241 @@ +Feature: Regression JDB-4539 + +@Regression @JDB-4539 +Scenario Outline: English 1st Party ST JDB-4539 + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I do not see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I see "You can ask a family member, friend or carer to help you." on the page + And I see "They can reply for you or help you to do it yourself." on the page + And I see "You may be able to get help with using a computer at your local library." on the page + And I see "If you need more help, call 0300 456 1024." on the page + Then I click on the "What if I need help replying?" link + And I do not see "You can ask a family member, friend or carer to help you." on the page + + And I set the radio button to "I am replying for myself" + And I see "You can still ask a family member or a person you trust to help you understand or reply." on the page + And I press the "Continue" button + And I see "Your juror details" on the page + And I see "You can find your juror number on your jury summons letter." on the page + + And I do not see "If you do not have a juror number, please contact:" on the page + And I click on the "I do not have a juror number" link + Then I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number, please contact:" on the page + Then I click on the "I do not have a juror number" link + And I do not see "If you do not have a juror number, please contact:" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "Yes" + + And I press the "Continue" button + Then on the page I see + | text | + | Is this your address? | + + And I do not see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + And I click on the "Will your address change soon?" link + And I see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + Then I click on the "Will your address change soon?" link + And I do not see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + + And I set the radio button to "Yes" + + When I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + And I do not see "We'll use your email address to send you information and reminders about your jury service." on the page + And I click on the "Why do we need your email address?" link + And I see "We'll use your email address to send you information and reminders about your jury service." on the page + Then I click on the "Why do we need your email address?" link + And I do not see "We'll use your email address to send you information and reminders about your jury service." on the page + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + And I do not see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + And I click on the "Help with date of birth" link + And I see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I do not see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I do not see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + And I click on the "Why do we ask this?" link + And I see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + And I do not see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + + And I do not see "If you tell us you have an impairment or disability, we'll do all we can to help you and meet your needs in the court building when you do jury service." on the page + And I click on the "Why do we ask this?" link + And I see "If you tell us you have an impairment or disability, we'll do all we can to help you and meet your needs in the court building when you do jury service." on the page + Then I click on the "Why do we ask this?" link + And I do not see "If you tell us you have an impairment or disability, we'll do all we can to help you and meet your needs in the court building when you do jury service." on the page + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100062 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + +@Regression @JDB-4539 +Scenario Outline: English 3rd Party St JDB-4539 + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I do not see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I do not see "You can ask a family member, friend or carer to help you." on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + And I see "You can find their juror number on the jury summons letter." on the page + + And I do not see "If you do not have a juror number for the person you are replying for, please contact:" on the page + And I click on the "do not have a juror number for the person" link + Then I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number for the person you are replying for, please contact:" on the page + Then I click on the "do not have a juror number for the person" link + And I do not see "If you do not have a juror number for the person you are replying for, please contact:" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I see "Provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday." on the page + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + + And I do not see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + Then I click on the "Why do we need your contact details?" link + And I see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + Then I click on the "Why do we need your contact details?" link + And I do not see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + + And I do not see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + Then I click on the "If you are living abroad" link + And I see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + Then I click on the "If you are living abroad" link + And I do not see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + + And I press the "Continue" button + + #Why Replying + + Then I see "Why are you replying for the other person?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + Then I see "Is this their address?" on the page + + And I do not see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + Then I click on the "Will their address change soon?" link + And I see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + Then I click on the "Will their address change soon?" link + And I do not see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + And I do not see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I do not see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + + And I do not see "We'll use the email address to send information and reminders about this jury service." on the page + Then I click on the "Why do we need an email address?" link + And I see "We'll use the email address to send information and reminders about this jury service." on the page + Then I click on the "Why do we need an email address?" link + And I do not see "We'll use the email address to send information and reminders about this jury service." on the page + + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + + And I do not see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + And I see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + + And I do not see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #The person can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + + And I do not see "If you tell us the person you're replying for has an impairment or disability," on the page + Then I click on the "Why do we ask this?" link + And I see "If you tell us the person you're replying for has an impairment or disability," on the page + Then I click on the "Why do we ask this?" link + And I do not see "If you tell us the person you're replying for has an impairment or disability," on the page + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + #When I press the "Submit" button + + And I press the "Submit" button + + Then I see "We have sent an email to say you have replied to this jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100231 |DOE |SW1H 9AJ |email@outlook.com |451170401 | + + +@Regression @JDB-4539 +Scenario Outline: English 1st Party Deferral JDB-4539 + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + |part_no |pool_no | owner | + |<part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I do not see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I do not see "You can ask a family member, friend or carer to help you." on the page + + And I set the radio button to "I am replying for myself" + And I see "You can still ask a family member or a person you trust to help you understand or reply." on the page + And I press the "Continue" button + And I see "Your juror details" on the page + And I see "You can find your juror number on your jury summons letter." on the page + + And I do not see "If you do not have a juror number, please contact:" on the page + And I click on the "I do not have a juror number" link + Then I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number, please contact:" on the page + Then I click on the "I do not have a juror number" link + And I do not see "If you do not have a juror number, please contact:" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "Yes" + + And I press the "Continue" button + Then on the page I see + | text | + | Is this your address? | + + And I do not see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + And I click on the "Will your address change soon?" link + And I see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + Then I click on the "Will your address change soon?" link + And I do not see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + + And I set the radio button to "Yes" + + When I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + And I do not see "We'll use your email address to send you information and reminders about your jury service." on the page + And I click on the "Why do we need your email address?" link + And I see "We'll use your email address to send you information and reminders about your jury service." on the page + Then I click on the "Why do we need your email address?" link + And I do not see "We'll use your email address to send you information and reminders about your jury service." on the page + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + And I do not see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + And I click on the "Help with date of birth" link + And I see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I do not see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + And I do not see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + And I click on the "Why do we ask this?" link + And I see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + And I do not see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + And I see "No, I need to change the date" on the page + And I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "Tell us why you need another date for your jury service" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + Then I see "Choose 3 Mondays when you can start jury service" on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates + + When I set the radio button to "Yes" + And I press the "Continue" button + + #help in court + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200276 |452170501 |LNAMESEVENONETHREE |SY2 6LU |e@eeee.com | + + +@Regression @JDB-4539 +Scenario Outline: English 3rd Party Deferral JDB-4539 + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I do not see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I do not see "You can ask a family member, friend or carer to help you." on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + And I see "You can find their juror number on the jury summons letter." on the page + + And I do not see "If you do not have a juror number for the person you are replying for, please contact:" on the page + And I click on the "do not have a juror number for the person" link + Then I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number for the person you are replying for, please contact:" on the page + Then I click on the "do not have a juror number for the person" link + And I do not see "If you do not have a juror number for the person you are replying for, please contact:" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I see "Provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday." on the page + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + + And I do not see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + Then I click on the "Why do we need your contact details?" link + And I see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + Then I click on the "Why do we need your contact details?" link + And I do not see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + + And I do not see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + Then I click on the "If you are living abroad" link + And I see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + Then I click on the "If you are living abroad" link + And I do not see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + + And I press the "Continue" button + + #Why Replying + + Then I see "Why are you replying for the other person?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + Then I see "Is this their address?" on the page + + And I do not see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + Then I click on the "Will their address change soon?" link + And I see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + Then I click on the "Will their address change soon?" link + And I do not see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + And I do not see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I do not see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + + And I do not see "We'll use the email address to send information and reminders about this jury service." on the page + Then I click on the "Why do we need an email address?" link + And I see "We'll use the email address to send information and reminders about this jury service." on the page + Then I click on the "Why do we need an email address?" link + And I do not see "We'll use the email address to send information and reminders about this jury service." on the page + + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + # Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + + And I do not see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + And I see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + And I do not see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + Then I see "Tell us why they need another date for their jury service" on the page + + #Deferral Reason + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + Then I see "Choose 3 Mondays when they can start jury service" on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + And I press the "Continue" button + + Then I set the radio button to "Yes" + And I press the "Continue" button + + When I click on the "Back" link + And I press the "Continue" button + + Then I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200285 |LNAMESIXSEVENSIX |CH1 2AN |email@outlook.com |452170501 | + +@Regression @JDB-4539 +Scenario Outline: English 1st Party Excusal JDB-4539 + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I do not see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I do not see "You can ask a family member, friend or carer to help you." on the page + + And I set the radio button to "I am replying for myself" + And I see "You can still ask a family member or a person you trust to help you understand or reply." on the page + And I press the "Continue" button + And I see "Your juror details" on the page + And I see "You can find your juror number on your jury summons letter." on the page + + And I do not see "If you do not have a juror number, please contact:" on the page + And I click on the "I do not have a juror number" link + Then I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number, please contact:" on the page + Then I click on the "I do not have a juror number" link + And I do not see "If you do not have a juror number, please contact:" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "Yes" + + And I press the "Continue" button + Then on the page I see + | text | + | Is this your address? | + + And I do not see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + And I click on the "Will your address change soon?" link + And I see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + Then I click on the "Will your address change soon?" link + And I do not see "If your address will change soon, give us your current address. This is so we can still contact you." on the page + + And I set the radio button to "Yes" + + When I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + And I do not see "We'll use your email address to send you information and reminders about your jury service." on the page + And I click on the "Why do we need your email address?" link + And I see "We'll use your email address to send you information and reminders about your jury service." on the page + Then I click on the "Why do we need your email address?" link + And I do not see "We'll use your email address to send you information and reminders about your jury service." on the page + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + And I do not see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + And I click on the "Help with date of birth" link + And I see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I do not see "You need to tell us your date of birth so we can check you are a suitable age to be on a jury." on the page + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + + And I do not see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + And I click on the "Why do we ask this?" link + And I see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + And I do not see "Your job in the Criminal Justice System does not stop you doing jury service. But we may get in touch to find out more." on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + Then I see "Why do you need to be excused from jury service?" on the page + When I set text area with "id" of "excusalReason" to "Excuse me please" + + And I do not see "You may need to prove your reason for why you cannot do jury service in the next 12 months. For example, if you are too ill, we might ask to see a letter from your doctor." on the page + And I click on the "Will I need to provide evidence soon?" link + And I see "Explain why you cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before your summons deadline." on the page + And I see "We'll contact you later if we need this." on the page + Then I click on the "Will I need to provide evidence soon?" link + And I press the "Continue" button + + #RA + + Then I see "Will you need help when you're at the court?" on the page + And I do not see "If you tell us you have an impairment or disability, we'll do all we can to help you and meet your needs in the court building when you do jury service." on the page + And I click on the "Why do we ask this?" link + And I see "If you tell us you have an impairment or disability, we'll do all we can to help you and meet your needs in the court building when you do jury service." on the page + Then I click on the "Why do we ask this?" link + And I do not see "If you tell us you have an impairment or disability, we'll do all we can to help you and meet your needs in the court building when you do jury service." on the page + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200905 |LNAMETWOTWOSIX |CH1 2AN |email@outlook.com|452170501| + +@Regression @JDB-4539 +Scenario Outline: English 3rd Party Excusal JDB-4539 + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I do not see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I see "You can ask a family member, friend or carer to help you." on the page + Then I click on the "What if I need help replying?" link + And I do not see "You can ask a family member, friend or carer to help you." on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + And I see "You can find their juror number on the jury summons letter." on the page + + And I do not see "If you do not have a juror number for the person you are replying for, please contact:" on the page + And I click on the "do not have a juror number for the person" link + Then I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number for the person you are replying for, please contact:" on the page + Then I click on the "do not have a juror number for the person" link + And I do not see "If you do not have a juror number for the person you are replying for, please contact:" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I see "Provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday." on the page + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + + And I do not see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + Then I click on the "Why do we need your contact details?" link + And I see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + Then I click on the "Why do we need your contact details?" link + And I do not see "If we need to get in touch with you to check anything about your response for the other person, we'll use the email or phone number you give us." on the page + + And I do not see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + Then I click on the "If you are living abroad" link + And I see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + Then I click on the "If you are living abroad" link + And I do not see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + + And I press the "Continue" button + + #Why Replying + + Then I see "Why are you replying for the other person?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + Then I see "Is this their address?" on the page + + And I do not see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + Then I click on the "Will their address change soon?" link + And I see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + Then I click on the "Will their address change soon?" link + And I do not see "If their address will change soon, give us their current address. This is so we can still contact them." on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + And I do not see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + Then I click on the "Help with date of birth" link + And I do not see "You need to tell us the person's date of birth so we can check they are a suitable age to be on a jury." on the page + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + + And I do not see "We'll use the email address to send information and reminders about this jury service." on the page + Then I click on the "Why do we need an email address?" link + And I see "We'll use the email address to send information and reminders about this jury service." on the page + Then I click on the "Why do we need an email address?" link + And I do not see "We'll use the email address to send information and reminders about this jury service." on the page + + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + + And I do not see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + And I see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + Then I click on the "Why do we ask this?" link + + And I do not see "Working in the Criminal Justice system does not stop a person doing jury service. But we may get in touch to find out more." on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + When I set the radio button to "No, they cannot do" + And I press the "Continue" button + + #Excusal Reason JDB-3653 + + Then I see "Why do they need to be excused from jury service?" on the page + And I set text area with "id" of "excusalReason" to "Excuse them please" + + Then I click on the "Will we need to provide evidence soon?" link + And I see "If we need evidence, we'll contact you separately to tell you." on the page + + And I press the "Continue" button + + #RA + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + + And I do not see "If you tell us the person you're replying for has an impairment or disability, we'll do all we can to help them and meet their needs in the court building when they do jury service." on the page + Then I click on the "Why do we ask this?" link + And I see "If you tell us the person you're replying for has an impairment or disability, we'll do all we can to help them and meet their needs in the court building when they do jury service." on the page + Then I click on the "Why do we ask this?" link + And I do not see "If you tell us the person you're replying for has an impairment or disability, we'll do all we can to help them and meet their needs in the court building when they do jury service." on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200230 |LNAMETWOSIXEIGHT |CH1 2AN |email@outlook.com |442170501 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_4546.feature b/src/test/resources/cucumber/features/regression/REGRESSION_4546.feature new file mode 100644 index 00000000..080571b2 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_4546.feature @@ -0,0 +1,448 @@ +Feature: Regression Accessibility Statement + +@Regression @JDB-4546 +Scenario: English Accessibility Statement + + Given I am on "Public" "bau-test" + + #Accessibility Statement + + And I click on the "Accessibility statement" link + And I switch to the new window + + And I see "Accessibility statement for Reply to a jury summons" on the page + And I see "This accessibility statement applies to the Reply to a jury summons service at" on the page + And I click on the "https://www.gov.uk/reply-jury-summons" link + And I see "reply-jury-summons" in the URL + Then I press the "back" button on my browser + + And I see "This website is run by HM Courts and Tribunals Service (HMCTS). We want as many people as possible to be able to use this website. For example, that means you should be able to:" on the page + And I see "change colours, contrast levels and fonts" on the page + And I see "zoom in up to 300% without the text spilling off the screen" on the page + And I see "navigate most of the website using just a keyboard" on the page + And I see "navigate most of the website using speech recognition software" on the page + And I see "listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and VoiceOver)" on the page + And I see "We’ve also made the website text as simple as possible to understand." on the page + And I see "has advice on making your device easier to use if you have a disability." on the page + And I click on the "AbilityNet" link + And I see "abilitynet.org.uk" in the URL + Then I press the "back" button on my browser + + Then I see "How accessible this website is" on the page + And I see "This website has been independently audited for accessibility and we are not aware of any parts of this website that are not fully accessible." on the page + And I see "Reporting accessibility problems with this website" on the page + Then I see "We’re always looking to improve the accessibility of this website. If you find any problems not listed on this page or think we’re not meeting accessibility requirements:" on the page + + Then I see "email jurysummoning@justice.gov.uk" on the page + Then I see "call 0300 456 1024" on the page + Then I see "or write to us at:" on the page + Then I see "Jury Central Summoning Bureau" on the page + Then I see "Phoenix House" on the page + Then I see "Rushton Avenue" on the page + Then I see "Bradford" on the page + Then I see "BD3 7BH" on the page + + Then I see "Enforcement procedure" on the page + Then I see "The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the ‘accessibility regulations’). If you’re not happy with how we respond to your complaint," on the page + And I click on the "contact the Equality Advisory and Support Service (EASS)" link + And I see "equalityadvisoryservice" in the URL + Then I press the "back" button on my browser + + Then I see "Contacting us by email or phone" on the page + And I see "You can contact our customer service team at the Jury Central Summoning Bureau:" on the page + And I see "email jurysummoning@justice.gov.uk" on the page + And I see "call 0300 456 1024" on the page + + Then I see "Technical information about this website’s accessibility" on the page + Then I see "HMCTS is committed to making its website accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018." on the page + + Then I see "Compliance status" on the page + Then I see "This website is fully compliant with the Web Content Accessibility Guidelines version 2.1 AA standard." on the page + And I click on the "Web Content Accessibility Guidelines version 2.1" link + And I see "WCAG21" in the URL + Then I press the "back" button on my browser + + And I see "Preparation of this accessibility statement" on the page + And I see "This statement was prepared on 27 August 2020. It was last reviewed on 14 June 2023." on the page + And I see "This website was last tested on 8 June 2023. The test was carried out by Digital Accessibility Centre Ltd." on the page + + #Then I see "You can read the full accessibility test report." on the page + #And I click on the "read the full accessibility test report" link + #And I see "accessibility-statement/report" in the URL + #Then I press the "back" button on my browser + + And I see "If you require a copy of the full accessibility test report please contact Andrew Singleton Bisby." on the page + +@Regression @JDB-4546 +Scenario Outline: English 1st Party - Accessibility Statement on each page + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + And I see link with text "Accessibility statement" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + And I see link with text "Accessibility statement" + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + Then I see "LNAMESEVENONETHREE" on the page + Then I see "FNAMESEVENONETHREE" on the page + And I see link with text "Accessibility statement" + And I set the radio button to "No" + And I press the "Continue" button + And I see link with text "Accessibility statement" + When I set "First name" to "FIRSTNAMECHANGED" + When I set "Last name" to "LASTNAMECHANGED" + + When I press the "Continue" button + Then I see "855 STREET NAME" on the page + Then I see "LONDON" on the page + Then I see "<postcode>" on the page + And I see link with text "Accessibility statement" + + And I set the radio button to "No" + And I press the "Continue" button + And I see link with text "Accessibility statement" + When I set "Address line 1" to "123 STREET NAME" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + And I see link with text "Accessibility statement" + + When I press the "Continue" button + Then I see "Enter your main phone number" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + And I see link with text "Accessibility statement" + + When I press the "Continue" button + Then I see "Enter your email address" on the page + Then I see "Enter your email address and check that it matches the one in the first field" on the page + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + Then I see "What is your date of birth" on the page + And I see link with text "Accessibility statement" + + When I press the "Continue" button + Then I see "There is a problem" on the page + Then I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + And I see link with text "Accessibility statement" + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I see link with text "Accessibility statement" + And I set the radio button to "No" + And I set "Provide details" to "Residency" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I see link with text "Accessibility statement" + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see link with text "Accessibility statement" + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + And I see link with text "Accessibility statement" + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see link with text "Accessibility statement" + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I see link with text "Accessibility statement" + When I set the radio button to "No" + And I press the "Continue" button + + And I see link with text "Accessibility statement" + And I see "No, I need to change the date" on the page + And I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "Tell us why you need another date for your jury service" on the page + And I see link with text "Accessibility statement" + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + Then I see "Choose 3 Mondays when you can start jury service" on the page + And I see link with text "Accessibility statement" + + When I set the "First" single date field to a Monday "19" weeks in the future + When I set the "Second" single date field to a Monday "20" weeks in the future + When I set the "Third" single date field to a Monday "21" weeks in the future + + And I press the "Continue" button + + #confirm dates + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + And I see link with text "Accessibility statement" + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + Then I see "Check your answers now" on the page + And I see link with text "Accessibility statement" + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + And I see link with text "Accessibility statement" + Then I see "<part_no>" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200713 |452170401 |LNAMESEVENONETHREE |SY2 6LU |e@eeee.com | + + +@Regression @JDB-4546 +Scenario Outline: English 3rd Party - Accessibility statement on each page + + Given I am on "Public" "bau-test" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + And I see link with text "Accessibility statement" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + And I see link with text "Accessibility statement" + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + And I see link with text "Accessibility statement" + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + And I see link with text "Accessibility statement" + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Fr" + And I press the "Continue" button + Then I see "Your contact information" on the page + And I see link with text "Accessibility statement" + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I see link with text "Accessibility statement" + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + And I see link with text "Accessibility statement" + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + And I see link with text "Accessibility statement" + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + And I see link with text "Accessibility statement" + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + And I see link with text "Accessibility statement" + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + And I see link with text "Accessibility statement" + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I see link with text "Accessibility statement" + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + # Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + And I see link with text "Accessibility statement" + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + And I see link with text "Accessibility statement" + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + And I see link with text "Accessibility statement" + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And I see link with text "Accessibility statement" + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And I see link with text "Accessibility statement" + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + And I see link with text "Accessibility statement" + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + Then I see "Tell us why they need another date for their jury service" on the page + And I see link with text "Accessibility statement" + + #Deferral Reason + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + Then I see "Choose 3 Mondays when they can start jury service" on the page + + When I set the "First" single date field to a Monday "19" weeks in the future + When I set the "Second" single date field to a Monday "20" weeks in the future + When I set the "Third" single date field to a Monday "21" weeks in the future + + And I press the "Continue" button + + When I click on the "Back" link + And I press the "Continue" button + + #confirm dates + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + And I see link with text "Accessibility statement" + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + + Then I see "Check your answers now" on the page + And I see link with text "Accessibility statement" + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then I see "You have completed your reply" on the page + And I see link with text "Accessibility statement" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500676 |LNAMESIXSEVENSIX |CH1 2AN |email@outlook.com |415170401 | + diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_AutoProcessing.feature b/src/test/resources/cucumber/features/regression/REGRESSION_AutoProcessing.feature new file mode 100644 index 00000000..fd340f2b --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_AutoProcessing.feature @@ -0,0 +1,1915 @@ +Feature: Regression Test AUTOPROCESSING + +@Regression @JDB-3516 @JDB-3747 +Scenario Outline: submit responses which are auto processed + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |415170401 | 400 | + | <part_no_two> |415170401 | 400 | + | <part_no_three> |415170401 | 400 | + | <part_no_four> |415170401 | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + #Auto Processed 1st ST + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "Yes" + And I press the "Continue" button + Then on the page I see + | text | + | Is this your address? | + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "Yes" + When I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + #JDB-3351 + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "test@gmail.com" + When I set "Enter your email address again" to "test@gmail.com" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3350 + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #Qualify for jury service JDB-3372 + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #JDB-3373 + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Residency JDB-3378 + + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I do not see any links on the page that open to a new page without an alt text + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3371 + + Then I see "Are you currently on bail for a criminal offence?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Bail JDB-3377 + + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #JDB-3370 + + Then I see "Have you been found guilty of a criminal offence?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Convictions JDB-3376 + + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned JDB-3363 JDB-3353 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I do not see any links on the page that open to a new page without an alt text + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity JDB-3364 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I do not see any links on the page that open to a new page without an alt text + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I do not see any links on the page that open to a new page without an alt text + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + When I check the "The information I have given is true to the best of my knowledge" checkbox + + #Enable auto processing + + Given auto straight through processing has been enabled + + And I press the "Submit" button + + #Disable auto processing + + Given auto straight through processing has been disabled + And I do not see any links on the page that open to a new page without an alt text + + #Auto Processed Deceased + + Given I am on "Public" "test" + + And "<part_no_two>" has "LNAME" as "<last_name>" + And "<part_no_two>" has "RET_DATE" as "5 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_two>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + When I set "9-digit juror number" to "<part_no_two>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I do not see any links on the page that open to a new page without an alt text + When I press the "Continue" button + + And I set "How do you know the person you're replying for?" to "Friend" + + When I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "02078211818" + And I check the "By email" checkbox + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + When I set the radio button to "The person has died" + + And I press the "Continue" button + And I see "steps/confirm-information/tp" in the URL + And I do not see any links on the page that open to a new page without an alt text + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + #Enable auto processing + + Given auto straight through processing has been enabled + + And I press the "Submit" button + And I do not see any links on the page that open to a new page without an alt text + + #Disable auto processing + + Given auto straight through processing has been disabled + + #Auto Processed Underage + + Given I am on "Public" "test" + + And "<part_no_three>" has "LNAME" as "<last_name>" + And "<part_no_three>" has "RET_DATE" as "5 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_three>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + When I set "9-digit juror number" to "<part_no_three>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #On DoB Screen, underage + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "2006" + + #Moving past DoB Section + + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I do not see any links on the page that open to a new page without an alt text + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + #Enable auto processing + + Given auto straight through processing has been enabled + + And I press the "Submit" button + + #Disable auto processing + + Given auto straight through processing has been disabled + + #Auto Processing overage + + Given I am on "Public" "test" + + And "<part_no_four>" has "LNAME" as "<last_name>" + And "<part_no_four>" has "RET_DATE" as "5 mondays time" + And "<part_no_four>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_four>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no_four>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + And I see "Is this your address?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #On DoB Screen + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1900" + + #Moving past DoB Section + + And I press the "Continue" button + + Then I set the radio button to "Yes" + + And I press the "Continue" button + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + #Enable auto processing + + Given auto straight through processing has been enabled + + And I press the "Submit" button + + #Disable auto processing + + Given auto straight through processing has been disabled + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + Then I see "COMPLETED" in the same row as "<part_no>" + And I see "AUTO" in the same row as "<part_no>" + Then I see "COMPLETED" in the same row as "<part_no_two>" + And I see "AUTO" in the same row as "<part_no_two>" + Then I see "COMPLETED" in the same row as "<part_no_three>" + And I see "AUTO" in the same row as "<part_no_three>" + Then I see "COMPLETED" in the same row as "<part_no_four>" + And I see "AUTO" in the same row as "<part_no_four>" + + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "USER_EDTQ" is "AUTO" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "part_no" is "<part_no_two>" + Then on "JUROR" . "POOL" I see "USER_EDTQ" is "AUTO" where "part_no" is "<part_no_two>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no_two>" and "owner" is "400" + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "part_no" is "<part_no_three>" + Then on "JUROR" . "POOL" I see "USER_EDTQ" is "AUTO" where "part_no" is "<part_no_three>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no_three>" and "owner" is "400" + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "part_no" is "<part_no_four>" + Then on "JUROR" . "POOL" I see "USER_EDTQ" is "AUTO" where "part_no" is "<part_no_four>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no_four>" and "owner" is "400" + + # finish test with auto processing enabled + + Given auto straight through processing has been enabled + +Examples: + |part_no |part_no_two |part_no_three |part_no_four |pool_no |last_name |postcode |email | + |641500607 |641500327 |641500339 |641500376 |415170401 |LNAME |CH1 2AN |e@mail.com | + +@Regression @JDB-3679 +Scenario Outline: Check that when name is changed, the response is NOT auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + And I set "Title" to "Mrs" + And I set "First name" to "FirstNameChanged" + And I set "Last name" to "LastNameChanged" + And I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" in the same row as "TO DO" + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode | email | pool_no | + |641500878 |DOE |SW1H 9AJ |email@outlook.com |415170401 | + +@Regression @JDB-3679 +Scenario Outline: Check that when address is changed, the response is NOT auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ADDRESS" as "1 ORIGINAL LANE" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + When I press the "Continue" button + + And I set "Address line 1" to "123 CHANGED ADDRESS" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" in the same row as "TO DO" + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500886 |DOE |SW1H 9AJ |email@outlook.com |415170401 | + +@Regression @JDB-4084 +Scenario Outline: Check that when Address2 is changed from (null), the response is not auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address2" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + And I set input field with "id" of "addressLineTwo" to "Second Address Line" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test01" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "Second Address Line" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645700095 |LNAMENINEFIVE |SA1 4PF |email@outlook.com |457170401 | + +@Regression @JDB-4084 +Scenario Outline: Check that when Address3 is changed from (null), the response is not auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address3" as "" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + And I set input field with "id" of "addressLineThree" to "Third Address Line" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "Third Address Line" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200430 |LNAMEFOURTHREEZERO |NN1 3HQ |email@outlook.com |442170401 | + +@Regression @JDB-4084 +Scenario Outline: Check that when Address4 is changed from (null), the response is not auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address4" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Town or city" to "NewTown" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "NewTown" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645700118 |LNAMEONEONEEIGHT |SA1 4PF |email@outlook.com |457170401 | + +@Regression @JDB-4084 +Scenario Outline: Check that when Address5 is changed from (null), the response is not auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address5" as "" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + + And I press the "Continue" button + And I set "County (optional)" to "NewCounty" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "NewCounty" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200902 |LNAMENINEZEROTWO |NN1 3HQ |email@outlook.com |442170401 | + +@Regression @JDB-4084 +Scenario Outline: Check that when Address2 is changed from string value, the response is not auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address2" as "Second Address Line" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + + When I press the "Continue" button + And I set input field with "id" of "addressLineTwo" to "Second Address Line CHANGED" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "Second Address Line CHANGED" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100538 |DOE |SW1H 9AJ |email@outlook.com |451170401 | + +@Regression +Scenario Outline: Check that when Address3 is changed from string value, the response is not auto processed + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address3" as "Third Address Line" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + And I set input field with "id" of "addressLineThree" to "Third Address Line CHANGED" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "test" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "Third Address Line CHANGED" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500953 |LNAMENINEFIVETHREE |CH1 2AN |email@outlook.com |415170402 | + +@Regression @JDB-4084 +Scenario Outline: Check that when Address4 is changed from string value, the response is not auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address4" as "NewTown" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + + When I press the "Continue" button + And I set "Town or city" to "NewTownCHANGED" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "NewTownCHANGED" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500429 |DOE |SY2 6LU |email@outlook.com |415170401 | + +@Regression @JDB-4084 +Scenario Outline: Check that when Address5 is changed from string value, the response is not auto processed + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "Address5" as "NewCounty" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "No" + When I press the "Continue" button + + And I set "County (optional)" to "NewCountyCHANGED" + And I press the "Continue" button + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I set "Enter your email address" to "email@outlook.com" + When I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I see "<part_no>" in the same row as "TO DO" + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Juror details" on the page + And I see "Summoned" on the page + And I see "NewCountyCHANGED" on the page + + #check DB + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is null where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_ASSIGNMENT_DATE" is null where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500766 |DOE |NN1 4EE |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_B_Search.feature b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_B_Search.feature new file mode 100644 index 00000000..d705901c --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_B_Search.feature @@ -0,0 +1,128 @@ +Feature: Bureau B Search + +@Features +Scenario Outline: Lift from QC Script for Bureau B Search + + #moved to Features 02-01-24 return to Regression + + Given I am on "Public" "test" + And pool no "<pool_no>" is reset to pending allocation + And I have cleared down the juror digital database + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + | <part_no_two> |<pool_no> | 400 | + + And auto straight through processing has been enabled + + Given juror has data set + |part_no |LNAME |ZIP |RET_DATE |NEXT_DATE | + |<part_no> |<last_name> |<postcode> |<date> |<date> | + |<part_no_two> |<last_name> |<postcode> |<date> |<date> | + + Given I have submitted a first party English ineligibilty response + |part_no |pool_number |last_name |postcode |email |details | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email> |<details> | + |<part_no_two> |<pool_no> |<last_name> |<postcode> |<email> |<details> | + + Given I am on "Bureau" "test" + When I log in as "SYSTEM" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + + And I press the "Process reply" button + And I click on the "Excusal" link + Then I select "D - DECEASED" from the "Reason for the excusal request" dropdown + And I set the radio button to "Accept excusal request" + And I press the "Confirm" button + + Then I see "Search" on the page + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I set "Juror number" to "" + + And I select "All officers" from the "Officer assigned" dropdown + And I press the "Search" button + Then on the page I see + | text | + | <part_no> | + + When I click on the "Select all" link + Then the checkbox in the same row as "<part_no>" is "checked" + + When I press the "Send to..." button + + When I click on the "Cancel" link + Then "Juror number" is "" + + When I click on the "Unselect all" link + Then the checkbox in the same row as "<part_no>" is "unchecked" + + And I press the "Send to..." button + Then I see "There is a problem" on the page + And I see "Select the replies you want to send" on the page + + When I click on "<part_no>" in the same row as "<part_no>" + Then on the page I see + | text | + |Juror details | + |Court name | + |Pool number | + + When I click on the "Back" link + Then I see "esults for" on the page + And "Juror's pool number" is "<pool_no>" + + When I click on the "Advanced search" link + And I check the "closed" checkbox + And I press the "Search" button + Then I see "and “Completed”" on the page + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + Then on the page I see + |text | + |Juror details| + |Court name| + |Pool number| + |COMPLETED| + + When I click on the "Back" link + And I click on the "Clear search" link + Then "Juror's pool number" is "" + + And I set "Juror number" to "<part_no_two>" + And I set "Juror's last name" to "<last_name>" + And I set "Juror's pool number" to "" + + And I press the "Search" button + Then I see "1 results for" on the page + And I see "COMPLETED" in the same row as "<part_no_two>" + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + Then I see "Reply status" on the page + And I see "COMPLETED" on the page + +Examples: + |part_no |part_no_two | pool_no | last_name | postcode |email |date |details | + |645700369 | 645700364 | 457170401 | LNAMEONEFIVEFOUR | CH1 2AN |ab@automation.com |4 mondays time |12345abcde | + +@Regression @JDB-3691 +Scenario Outline: Attempt to input alpha characters into Juror Number and Pool Number fields on Seach screen on Bureau + + Given I am on "Bureau" "juror-test02" + When I log in + And I click on the "Search" link + And I set "Juror number" to "abcdefghijklmnopqrstuvwxyz" + And I set "Juror's pool number" to "abcdefghijklmnopqrstuvwxyz" + And "Juror number" is "" + And "Juror's pool number" is "" + + #This needs to also be done on Firefox and IE + +Examples: + |part_no |pool_no |last_name |postcode |email |date | + |641500117 |415170401 |DOE |SW1H 9AJ |email@outlook.com |5 mondays time | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_B_Search_TeamMember.feature b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_B_Search_TeamMember.feature new file mode 100644 index 00000000..8aaf30b2 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_B_Search_TeamMember.feature @@ -0,0 +1,88 @@ +Feature: Bureau B Search for Team Member + +@RegressionSingle @JDB-3484 +Scenario Outline: Lift from QC Script for Bureau B Search + + Given I am on "Public" "test" + + Given auto straight through processing has been disabled + + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + |<part_no_two> |<pool_no> |400 | + + Given juror has data set + |part_no |LNAME |ZIP |RET_DATE |NEXT_DATE | + |<part_no> |<last_name>|<postcode> |<date> |<date> | + |<part_no_two> |<last_name>|<postcode> |<date> |<date> | + + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email>| + |<part_no_two> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + + When I log in as "CPASS" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + Then I see "<part_no_two>" on the page + And I click on "<part_no_two>" in the same row as "<part_no_two>" + + And I press the "Process reply" button + And I click on the "Excusal" link + Then I select "D - DECEASED" from the "Reason for the excusal request" dropdown + And I set the radio button to "Accept excusal request" + And I press the "Confirm" button + + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + + And I press the "Search" button + Then on the page I see + |text | + |<part_no> | + + When I click on "<part_no>" in the same row as "<part_no>" + Then on the page I see + |text | + |Juror details | + |Court name | + |Pool number | + + When I click on the "Back" link + Then I see "esults for" on the page + And "Juror's pool number" is "<pool_no>" + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + Then on the page I see + |text | + |Juror details | + |Court name | + |Pool number | + |COMPLETED | + + When I click on the "Back" link + And I click on the "Clear search" link + Then "Juror's pool number" is "" + + And I set "Juror number" to "<part_no_two>" + And I set "Juror's last name" to "<last_name>" + And I set "Juror's pool number" to "" + + And I press the "Search" button + Then I see "1 results for" on the page + And I see "COMPLETE" in the same row as "<part_no_two>" + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + Then I see "Reply status" on the page + And I see "COMPLETED" on the page + + Given auto straight through processing has been enabled + +Examples: + |part_no |part_no_two |pool_no |last_name |postcode |email |date | + |641500287 |641500288 |415170601 |LNAMEONEFIVEFOUR |CH1 2AN |ab@automation.com |4 mondays time | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_D_Backlog.feature b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_D_Backlog.feature new file mode 100644 index 00000000..0a589656 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_D_Backlog.feature @@ -0,0 +1,57 @@ +Feature: Bureau D Test + +@Regression_Single +Scenario Outline: Bureau D script + No colour checking! For Red etc + + Given I am on "Public" "juror-test01" + And pool no "<pool_no>" is reset to pending allocation + And I have cleared down the juror digital database + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And auto straight through processing has been enabled + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + #And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + #And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + Given I have submitted a first party English ineligibilty response + |part_no |pool_number |last_name |postcode |email |details | + |<part_no> |<pool_no> |<last_name> |<postcode> |<email> |<details> | + + + Given I am on "Bureau" "juror-test01" + When I log in + And I click on the "Assign Replies" link +# And I press the "Send" button +# Then I see "Please check the form" on the page +# And I see "The overall capacity must be less than or equal to the backlog total." on the page +# And I see "Please reduce the capacity allocated to the individual Bureau officers so this is true." on the page + + And I see "1" in the same row as "Non urgent" in Backlog box + And I set input field with "name" of "allocateNonUrgent" to "1" + When I check the "ARAMIS1" checkbox + And I press the "Send" button + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "1 results for" on the page + + Then I see "<part_no>" in the same row as "ARAMIS1" + And I see "<part_no>" in the same row as "To do" + And I see "To do" in the same row as "ARAMIS1" + + +Examples: + | part_no | pool_no |last_name |postcode |email |details | + |641500217 |415171111 |LNAMEEIGHTFOUR |CH1 2AN |email@bureauA.com |12345abcde | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_E_Staff.feature b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_E_Staff.feature new file mode 100644 index 00000000..ced6101e --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_Bureau_E_Staff.feature @@ -0,0 +1,55 @@ +Feature: Bureau E Test + +@Regression @Regression_Bureau_E_Staff +@JDB-2637 +Scenario: Bureau E Test + Given I am on "Bureau" "test" + And I log in + And staff with name "AutomationStaffMemberONE" does not exist + And staff with name "AutomationStaffMemberTWO" does not exist + And staff with name "AutomationStaffMembe" does not exist + + When I click on the "Manage team" link + And I press the "Add a new team member" button + And I set "Name" to "AutomationStaffMemberONE" + And I set "Username" to "AutomationStaffMembe" + And the radio button "No" is "selected" + And I press the "Save" button + + Then I see "AutomationStaffMemberONE" on the page + + And I press the "Add a new team member" button + And I press the "Save" button + Then I see "Please provide a name for the new staff member" on the page + And I see "Please enter the staff member Juror application user name" on the page + + When I click on the "Manage team" link + Then I see "Manage team" on the page + And I see "AutomationStaffMemberONE" on the page + + When I click on "AutomationStaffMemberONE" in the same row as "AutomationStaffMemberONE" + Then "Name" is "AutomationStaffMemberONE" + And I cannot set "Username" to "abc" + + When I set "Name" to "AutomationStaffMemberTWO" + And I set the radio button to "Active" + And I press the "Save" button + Then I do not see "AutomationStaffMemberONE" on the page + And I see "AutomationStaffMemberTWO" on the page + + #defect 2637 -teamID is nulled + When I click on "AutomationStaffMemberTWO" in the same row as "AutomationStaffMemberTWO" + +@JDB-2928 @JDB-2637 +Scenario: Bureau Team Picklist Name Change + Given I am on "Bureau" "test" + Given test team is deleted + And I log in + + When I click on the "Manage team" link + And I press the "Add a new team member" button + And I set "Name" to "Team Pick List User" + And I set "Username" to "TeamPickListUser" + And I press the "Save" button + + Then I see "Team Pick List User" on the page diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_DataTest.feature b/src/test/resources/cucumber/features/regression/REGRESSION_DataTest.feature new file mode 100644 index 00000000..e072b5d8 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_DataTest.feature @@ -0,0 +1,62 @@ +Feature: Bureau Only Regression + +@Regression_Invalid @Regression_DataTest +Scenario Outline: +Need to clear the data for juror number = 641500990 + Delete row from where juror_number + juror_response + juror_response_aud + juror_response_cjs_employment + juror_response_special_needs + + change_log + change_log_item + + staff_juror_response_audit + + + + set juror.pool where part_no + is_active='Y' + status = 1, + responded ='N' + READ_ONLY='Y' + null + title + dob + address3 + address4 + address5 + address6 + H_PHONE + W_PHONE + W_PH_LOCAL + TIMES_SEL + TRIAL_NO + JUROR_NO + DEF_DATE + USER_EDTQ + NOTES + PHOENIX_DATE + PHOENIX_CHECKED + M_PHONE + H_EMAIL + CONTACT_PREFERENCE + + + + + + Given the juror numbers have not been processed + | part_no | pool_no | + | 641500990 | | + + Given I have submitted a first party English straight through response + | part_no |pool_number | last_name |postcode | email | + |<part_no> |<pool_no> | <last_name> |CH1 2AN |a@a.com| +# |<part_no_two> |<pool_no> | <last_name> |CH1 2AN |a@a.com| + +Examples: + | part_no |last_name |postcode | email | + |641500990 |DOE |SW1H 9AJ |email@outlook.com| + diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_EditableSummons.feature b/src/test/resources/cucumber/features/regression/REGRESSION_EditableSummons.feature new file mode 100644 index 00000000..8fe1658d --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_EditableSummons.feature @@ -0,0 +1,681 @@ +Feature: Regression - Editable Summons + + +# Edit links/buttons disabled +@RegressionSingle @JDB-5048 +Scenario Outline: + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + #Set part_no pool to be urgent + Given "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Your Details" on the page + + When I set "First name" to "regrFirstName" + And I set "Last name" to "regrLastName" + And I press the "Continue" button + And I set "How do you know the person you're replying for?" to "friend" + And I press the "Continue" button + And I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "01111111119" + And I set "Another phone (optional)" to "0222222229" + And I set "Enter your email address" to "editableSummons@regression.com" + And I set "Enter your email address again" to "editableSummons@regression.com" + And I press the "Continue" button + And I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this their address?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + And I set the radio button to "Give a different phone number for the juror" + And I set "Main phone number" to "0333333339" + And I set "Another phone number (optional)" to "04444444449" + And I set the radio button to "Give a different email address for the juror" + And I set "Enter email address" to "editableSummons@regressionJURORContactEmail.com" + And I set "Enter the email address again" to "editableSummons@regressionJURORContactEmail.com" + And I press the "Continue" button + + Then I see "Confirm if the person is eligible for jury service" on the page + When I press the "Continue" button + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + When I set the radio button to "No" + When I press the "Continue" button + Then I see "Check your answers now" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Given I am on "Bureau" "juror-test01" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Eligibility" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Deferral or excusal" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "CJS employment" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Reasonable adjustments" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Juror details" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Logs" link + Then I click on the "Call log" link + + #add call log + + And I press the "Log a call" button + And I see "Log a call" on the page + And I see "<last_name>" on the page + And I see "/<part_no>/call-log" in the URL + And I set text area with "id" of "callNotes" to "Some notes in the call notes field 1" + And I press the "Save" button + Then I see "Call log" on the page + And I see "Some notes in the call notes field 1" on the page + + #check I can enter special characters + + And I press the "Log a call" button + And I set text area with "id" of "callNotes" to "Some-one 0% £300 & * ! @ + [] her's ?'" + And I press the "Save" button + And I see "Some-one 0% £300 & * ! @ + [] her's ?'" on the page + + #check I can enter 2000 chars + + And I press the "Log a call" button + And I set text area with "id" of "callNotes" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Save" button + And I see "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" on the page + + #check I cannot enter >2000 chars + + And I press the "Log a call" button + And I set text area with "id" of "callNotes" to "Phese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details" + And I see "You have 10 characters too many" on the page + And I press the "Save" button + And I see "There is a problem" on the page + And I see "Call notes must be 2000 characters or fewer" on the page + + #check I cannot leave notes empty + + And I set text area with "id" of "callNotes" to "" + And I press the "Save" button + And I see "There is a problem" on the page + And I see "Provide some notes from the call" on the page + + #click cancel + + Then I click on the "Cancel" link + And I see "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" on the page + And I see "Some-one 0% £300 & * ! @ + [] her's ?'" on the page + And I see "Some notes in the call notes field 1" on the page + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no>" + + #check call notes are still there + + When I click on "<part_no>" in the same row as "<part_no>" + When I click on the "Logs" link + When I click on the "Call log" link + And I see "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" on the page + And I see "Some-one 0% £300 & * ! @ + [] her's ?'" on the page + And I see "Some notes in the call notes field 1" on the page + + Then I see "Process reply" on the page + And I see "More actions" on the page + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information'" link + When I set the radio button to "Awaiting juror" + And I press the "Confirm" button + + Then I click on the "Your work" link + Then I click on the "Awaiting information" link + + And I click on "<part_no>" in the same row as "<part_no>" + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Eligibility" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Deferral or excusal" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "CJS employment" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Reasonable adjustments" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Juror details" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Logs" link + + And I see link with text "Add or Edit" + + Then I click on the "Call log" link + + And I press the "Log a call" button + Then I click on the "Cancel" link + + Then I see "Process reply" on the page + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + Then I click on the "Your work" link + Then I click on the "Completed" link + + And I click on "<part_no>" in the same row as "<part_no>" + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Eligibility" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Deferral or excusal" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "CJS employment" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Reasonable adjustments" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Juror details" link + + And I do not see link with text "edit" + And I do not see link with text "Edit" + And I do not see link with text "change" + And I do not see link with text "Change" + + Then I click on the "Logs" link + + And I see link with text "Add or Edit" + + Then I click on the "Call log" link + + And I press the "Log a call" button + Then I click on the "Cancel" link + +Examples: + |part_no |pool_no |last_name |postcode | email | + |645100999 |451170401 |LNAMETWOSIXZERO|CH1 2AN |a@a.com| + +# Edit links/buttons disabled +@JDB-3644 +Scenario Outline: jdb-3644 + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #Set part_no pool to be urgent + Given "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Your Details" on the page + + When I set "First name" to "regrFirstName" + And I set "Last name" to "regrLastName" + And I press the "Continue" button + And I set "How do you know the person you're replying for?" to "friend" + And I press the "Continue" button + And I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "01111111119" + And I set "Another phone (optional)" to "0222222229" + And I set "Enter your email address" to "editableSummons@regression.com" + And I set "Enter your email address again" to "editableSummons@regression.com" + And I press the "Continue" button + And I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this their address?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + And I set the radio button to "Give a different phone number for the juror" + And I set "Main phone number" to "0333333339" + And I set "Another phone number (optional)" to "04444444449" + And I set the radio button to "Give a different email address for the juror" + And I set "Enter email address" to "editableSummons@regressionJURORContactEmail.com" + And I set "Enter the email address again" to "editableSummons@regressionJURORContactEmail.com" + And I press the "Continue" button + + Then I see "Confirm if the person is eligible for jury service" on the page + When I press the "Continue" button + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + When I set the radio button to "No" + When I press the "Continue" button + Then I see "Check your answers now" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Given I am on "Bureau" "bau-test" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Change" link + And I set "Title (optional)" to "" + And I set "First name" to "" + And I set "Last name" to "" + And I set "Address line 1" to "" + And I set "Street Address" to "" + And I set "Town or city" to "" + And I set "County" to "" + And I set "Postcode" to "" + And I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "" + And I set "Main phone number" to "" + And I set "Another phone" to "" + And I set "Edit email address" to "" + And I set "Confirm email address" to "" + + And I set "First name" to "" for "thirdParty" + And I set "Last name" to "" for "thirdParty" + And I set input field with "id" of "relationship" to "" + And I set "Main phone" to "" for "thirdParty" + And I set "Another phone" to "" for "thirdParty" + And I set "Edit email address" to "" for "thirdParty" + And I set "Confirm email address" to "" + And I click on the "Save" link + + Then I see "Please provide the first name" on the page + And I see "Please provide the last name" on the page + And I see "Please provide the first line of the address" on the page + And I see "Please provide the Town or City" on the page + And I see "Please provide the postcode" on the page + And I see "Please enter the day the person was born" on the page + And I see "Please enter the month the person was born" on the page + And I see "Please enter the year the person was born" on the page + And I see "Please enter the main phone number" on the page + And I see "Please enter the email address" on the page + And I see "Please enter the third party first name" on the page + And I see "Please enter the third party last name" on the page + And I see "Please enter the third party relationship to person summoned" on the page + + ### QC Step 3 done + When I set "First name" to "" for "thirdParty" + When I click on the "Cancel" link + Then I see "<last_name>" in the same row as "Name" + + When I click on the "Change" link + And I set "Main phone number" to "0111111123123a" + And I click on the "Save" link + Then I see "Please check the main phone" on the page + + ## QC Step 4 Done + When I set "Main phone number" to "01111123123" + And I click on the "Save" link + And I see "Please give a reason for the change to this summons reply" on the page + And I set "Please give a reason for the change to this summons reply" to "testNotesAB_TwoOnEditableC" + And I click link with ID "changeLogCancelButton" + And I set "Main phone" to "01111123123a" + And I click on the "Save" link + Then I see "Please check the third party main phone number" on the page + + ## QC Step 5 Done + When I set "Main phone" to "01111123123" + When I set "Edit email address" to "editableSummonsregressionJURORContactEmail.comm" + And I click on the "Save" link + Then I see "Please check the email address" on the page + + ## QC Step 6 Done + When I set "Edit email address" to "editableSummons@regressionJURORContactEmail.com" + When I set "Edit email address" to "editableSummonsregression.com" for "thirdParty" + And I click on the "Save" link + Then I see "Please check the email address" on the page + When I set "Main phone" to "1111123123" for "thirdParty" + + When I click on the "Cancel" link + And I see "Change" on the page + And I click on the "Change" link + And I see "Cancel" on the page + And I see "Save" on the page + And I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "testNotesAB_TwoOnEditableC" + And I click link with ID "changeLogSaveButton" + + When I click on the "Eligibility" link + Then I see "Residency" on the page + And I see "Mental health" on the page + And I see "Bail" on the page + + When I click on the "Change" link + And on Bureau I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" under "Residency" + And I set the radio button to "No" under "Residency" + And I set the radio button to "Yes" under "Mental health" + And I set the radio button to "Yes" under "Bail" + And I set the radio button to "Yes" under "Convictions" + And I click link with ID "eligibilitySaveButton" + + Then I see "Please give details about the person's residency" on the page + And I see "Please give details about the Mental Health and Capacity acts" on the page + And I see "Please give details about the person's bail" on the page + And I see "Please give details about the person's criminal offence" on the page + + When I set the radio button to "Yes" under "Residency" + Then I do not see "Please give details about the person's residency" on the page + + And I set the radio button to "No" under "Mental health" + And I do not see "Please give details about the Mental Health and Capacity acts" on the page + + And I set the radio button to "No" under "Bail" + And I do not see "Please give details about the person's bail" on the page + + And I set the radio button to "No" under "Convictions" + And I see "Have you been found guilty of a criminal offence" on the page + And I do not see "Provide details" on the page + + And I set the radio button to "No" under "Residency" + And I see "Please give details about the person's residency" on the page + And I set text area with "id" of "residencyDetails" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaaaa" + Then "Provide details" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I click link with ID "eligibilitySaveButton" + And I see "Please give a reason for the change to this summons reply" on the page + And I set "Please give a reason for the change to this summons reply" to "testNotesABC" + And I click link with ID "changeLogSaveButton" + Then I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + + ### QC step 11 done + + When I click on the "Deferral or excusal" link + Then I see "Deferral or excusal" on the page + + When I click on the "Change" link + Then I see "Save" on the page + Then I see "Cancel" on the page + And I set the radio button to "I need to change the date of my jury service" + + Then I see "Deferral reason" on the page + And I set text area with "id" of "deferralReason" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + Then "deferralReason" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I set input field with "id" of "declineDates" to "Yes" + And I set text area with "id" of "excusalReason" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaa" + Then "excusalReason" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + When I click on the "Cancel" link + Then I see "Date of jury service confirmed" in the same row as "Deferral or excusal" + + ## QC Step 15 Done + + When I click on the "CJS employment" link + Then I see "N/A" in the same row as "CJS employment" + + When I click on the "Change" link + And I set the radio button to "Yes" under "CJS Employment" + And I see "Organisations" on the page + And I check the "Police service" checkbox + And I check the "HM Prison Service" checkbox + And I check the "the National Crime Agency" checkbox + And I check the "the Judiciary" checkbox + And I check the "HMCTS" checkbox + And I set input field with "id" of "cjsEmployer-other" to "Yes" + And I click link with ID "cjsEmploymentSaveButton" + Then I see "Details of police service employmnet" on the page + And I see "Please give details of where and when the person worked for the police" on the page + And I see "Details of HM Prison Service employment" on the page + And I see "Please give details of where and when the person worked for HM Prison Service" on the page + And I see "Details of other CJS employment" on the page + And I see "Please give details of where and when the person has worked for another Criminal Justice System employer" on the page + + And I set text area with "id" of "cjsPoliceDetails" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaaaa" + Then "cjsPoliceDetails" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I set text area with "id" of "cjsPrisonDetails" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaaaa" + Then "cjsPrisonDetails" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I set text area with "id" of "cjsEmployerDetails" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaaaa" + Then "cjsEmployerDetails" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I click link with ID "cjsEmploymentSaveButton" + And I set "Please give a reason for the change to this summons reply" to "CJSEmployeeChangeNotes" + And I click link with ID "changeLogSaveButton" + Then I see "Police service" in the same row as "CJS employment" + + When I click on the "Reasonable adjustments" link + Then I see text "N/A" in the same row as "Disability or impairment" + Then I see text "N/A" in the same row as "Special arrangements or help the juror needs" + + When I click on the "Change" link + And I check the "Limited mobility" checkbox + And I check the "Hearing impairment" checkbox + And I check the "Diabetes" checkbox + And I check the "Severe sight impairment" checkbox + And I check the "Learning disability" checkbox + And I set input field with "id" of "assistanceType-other" to "Yes" + And I click link with ID "reasonableAdjustmentsSaveButton" + Then I see "Please give details of the disability or impairment for the person you're replying for" on the page + + When I set "Details of other disability or impairment" to "Lorem ipsum d" +# When I set "Details of other disability or impairment" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaaaa" +# Then "Details of other disability or impairment" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I click link with ID "reasonableAdjustmentsSaveButton" + And I set "Please give a reason for the change to this summons reply" to "resonableAdjustmentsNote" + And I click link with ID "changeLogSaveButton" + Then I see "HEARING IMPAIRMENT" on the page + Then I see "DIABETIC" on the page + Then I see "LIMITED MOBILITY" on the page + Then I see "OTHER" on the page + Then I see "READING" on the page + Then I see "VISUAL IMPAIRMENT" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PHONE_NUMBER" is "0333333339" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is "" where "PART_NUMBER" is "<part_no>" + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PHONE_NUMBER" is "0333333339" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is "0333333339" where "PART_NUMBER" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode | email | + |645100999 |451170401 |LNAMETWOSIXZERO|CH1 2AN |a@a.com| + diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Deferral.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Deferral.feature new file mode 100644 index 00000000..37bf2173 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Deferral.feature @@ -0,0 +1,3691 @@ +Feature: Regression English_1st_Deferral + +@Regression @JDB-4249 @JDB-3704 @replytypes +Scenario Outline: English 1st Party Deferral + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + And I see "You must have a good reason for changing, for example:" on the page + And I see "a booked holiday" on the page + And I see "an operation" on the page + And I see "an exam" on the page + And I see "your employer will not give you time off work" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Choose 3 Mondays when you can start jury service" on the page + And I see "These must be between" on the page + And I see "You must be available to serve at least 2 weeks." on the page + + When I set the "First" single date field to a Monday "16" weeks in the future + When I set the "Second" single date field to a Monday "17" weeks in the future + When I set the "Third" single date field to a Monday "18" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + + And I validate the "First" deferral date is "16" weeks in the future + And I validate the "Second" deferral date is "17" weeks in the future + And I validate the "Third" deferral date is "18" weeks in the future + + And I see "You do not need to tell us all other dates you're available." on the page + And I see "We'll choose one of your 3 dates." on the page + And I see "In the unlikely event that we cannot use one of these dates, we'll contact you." on the page + And I see "Do you want to proceed with these dates?" on the page + + #check hint text + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "You may be asked to serve for longer when you arrive at court." on the page + And I see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I see "You must contact us at that time to let us know." on the page + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "You may be asked to serve for longer when you arrive at court." on the page + And I do not see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I do not see "You must contact us at that time to let us know." on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Email" + And I set "Enter your email address" to "abc@abc.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address" to "<email>" + And I press the "Continue" button + + And on the page I see + |text| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "16" weeks in the future + And I validate the "Second" deferral date is "17" weeks in the future + And I validate the "Third" deferral date is "18" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then I see "You have completed your reply" on the page + Then I see "If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you." on the page + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + Then I see "Download a copy of your summons reply" on the page + Then I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + Then I see "Then, at least 2 weeks before your jury service starts, we'll send you:" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "Get ready for your jury service" on the page + And I see "The information below is also in the email that we have sent you." on the page + And I see "You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch." on the page + And I see "Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses." on the page + And I see "Calculate what expenses and allowances you can claim." on the page + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + And I see "What did you think of this service? (Takes 30 seconds)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You have said that you need to change the date of your jury service." on the page + And I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + And I see "I need to change the date of my jury service" on the page + And I see "Tell us why you need another date for your jury service" on the page + And I see "Deferral Reason" on the page + And I see "Choose 3 Mondays when you can start jury service" on the page + And I see "First choice" on the page + And I see "Second choice" on the page + And I see "Third choice" on the page + And I validate the "First" deferral date is "16" weeks in the future + And I validate the "Second" deferral date is "17" weeks in the future + And I validate the "Third" deferral date is "18" weeks in the future + + Given I am on "Bureau" "btest" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "DEFERRAL" + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "16" weeks in the future + + And I press the "Confirm" button + + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200520 |452170401 |LNAMEFIVETWOZERO |SY2 6LU |e@eeee.com | + +@Regression +Scenario Outline: English 1st Party Deferral - do not accept dates + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + Then I see "What is your date of birth" on the page + + When I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + #select deferral + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #enter reason + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + And I see "You must have a good reason for changing, for example:" on the page + And I see "a booked holiday" on the page + And I see "an operation" on the page + And I see "an exam" on the page + And I see "your employer will not give you time off work" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #input def dates + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Choose 3 Mondays when you can start jury service" on the page + And I see "These must be between" on the page + And I see "You must be available to serve at least 2 weeks." on the page + + When I set the "First" single date field to a Monday "17" weeks in the future + When I set the "Second" single date field to a Monday "18" weeks in the future + When I set the "Third" single date field to a Monday "19" weeks in the future + + And I press the "Continue" button + + #check def dates + + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "17" weeks in the future + And I validate the "Second" deferral date is "18" weeks in the future + And I validate the "Third" deferral date is "19" weeks in the future + + + And I see "You do not need to tell us all other dates you're available." on the page + And I see "We'll choose one of your 3 dates." on the page + And I see "In the unlikely event that we cannot use one of these dates, we'll contact you." on the page + And I see "Do you want to proceed with these dates?" on the page + + #check hint text + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "You may be asked to serve for longer when you arrive at court." on the page + And I see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I see "You must contact us at that time to let us know." on the page + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "You may be asked to serve for longer when you arrive at court." on the page + And I do not see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I do not see "You must contact us at that time to let us know." on the page + + #do not accept dates + + And I set the radio button to "No" + And I press the "Continue" button + + #change dates + + And I see "steps/confirm-date/deferral-dates" in the URL + When I set the "First" single date field to a Monday "20" weeks in the future + + And I press the "Continue" button + + #accept dates + + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "20" weeks in the future + And I validate the "Second" deferral date is "18" weeks in the future + And I validate the "Third" deferral date is "19" weeks in the future + + And I set the radio button to "Yes" + And I press the "Continue" button + + #help in court + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Email" + And I set "Enter your email address" to "abc@abc.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address" to "<email>" + And I press the "Continue" button + + Then I see text "Yes" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + And I validate the "First" deferral date is "20" weeks in the future + And I validate the "Second" deferral date is "18" weeks in the future + And I validate the "Third" deferral date is "19" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then I see "You have completed your reply" on the page + Then I see "If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you." on the page + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + Then I see "Download a copy of your summons reply" on the page + Then I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + Then I see "Then, at least 2 weeks before your jury service starts, we'll send you:" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "Get ready for your jury service" on the page + And I see "The information below is also in the email that we have sent you." on the page + And I see "You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch." on the page + And I see "Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses." on the page + And I see "Calculate what expenses and allowances you can claim." on the page + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + And I see "What did you think of this service? (Takes 30 seconds)" on the page + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You have said that you need to change the date of your jury service." on the page + And I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + And I see "I need to change the date of my jury service" on the page + And I see "Tell us why you need another date for your jury service" on the page + And I see "Deferral Reason" on the page + And I see "Choose 3 Mondays when you can start jury service" on the page + And I see "First choice" on the page + And I see "Second choice" on the page + And I see "Third choice" on the page + And I validate the "First" deferral date is "20" weeks in the future + And I validate the "Second" deferral date is "18" weeks in the future + And I validate the "Third" deferral date is "19" weeks in the future + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "20" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645100441 |451170401 |LNAMESEVENONETHREE |SW1H 9AJ |e@eeee.com | + +@RegressionSingle @JDB-3335 @JDB-3445 @JDB-3448 @JDB-3503 +Scenario Outline: 1st English Deferral (Duplicate?) + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #reason + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + And I see "You must have a good reason for changing, for example:" on the page + And I see "a booked holiday" on the page + And I see "an operation" on the page + And I see "an exam" on the page + And I see "your employer will not give you time off work" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #dates + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Choose 3 Mondays when you can start jury service" on the page + And I see "These must be between" on the page + And I see "You must be available to serve at least 2 weeks." on the page + + When I set the "First" single date field to a Monday "19" weeks in the future + When I set the "Second" single date field to a Monday "20" weeks in the future + When I set the "Third" single date field to a Monday "21" weeks in the future + + And I press the "Continue" button + + #check dates + + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "19" weeks in the future + And I validate the "Second" deferral date is "20" weeks in the future + And I validate the "Third" deferral date is "21" weeks in the future + + + And I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers Now + + Then I see "Check your answers now" on the page + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "bau-test" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Deferral or excusal" link + + Then I see "Deferral Reason" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500753 |LNAMESEVENFIVETHREE|CH1 2AN |email@outlook.com |415170401 | + +@Regression @JDB-3139 +Scenario Outline: 1st English Deferral with Bureau Check + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #reason + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + And I see "You must have a good reason for changing, for example:" on the page + And I see "a booked holiday" on the page + And I see "an operation" on the page + And I see "an exam" on the page + And I see "your employer will not give you time off work" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #choose dates + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Choose 3 Mondays when you can start jury service" on the page + And I see "These must be between" on the page + And I see "You must be available to serve at least 2 weeks." on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates + + And I see "steps/confirm-date/deferral-check" in the URL + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "bau-test" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Deferral or excusal" link + + Then I see "Deferral Reason" on the page + + Then I see "First choice" on the page + Then I see "Second choice" on the page + Then I see "Third choice" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I select "Deferral" from Process reply + When I select "S - RECENTLY SERVED" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + + And I select deferral date "9" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500557 |LNAME21 |CH1 2AN |email@outlook.com |415170501 | + +@Regression @JDB-3674 +Scenario Outline: 1st English Back Button Logic with Deferral Reason Screen + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "Yes" + And I press the "Continue" button + Then on the page I see + | text | + | Is this your address?| + + And I set the radio button to "Yes" + When I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I press the "Continue" button + Then on the page I see + |text | + |There is a problem| + |Enter your main phone number| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Enter your email address | + + When I set "Enter your email address" to "test@gmail.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address again" to "test@gmail.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + When I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers (Covers Scenarios 1 and 2) + + Then I see "Check your answers now" on the page + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #deferral reason + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + And I see "You must have a good reason for changing, for example:" on the page + And I see "a booked holiday" on the page + And I see "an operation" on the page + And I see "an exam" on the page + And I see "your employer will not give you time off work" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #enter dates + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + And I press the "Continue" button + + #Confirm Date of Jury Service + + And I see "Check your dates" on the page + When I set the radio button to "Yes" + + #back link + + When I click on the "Back" link + Then I see "Choose 3 Mondays when you can start jury service" on the page + + #back link + + When I click on the "Back" link + + When I see "I need to change the date" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Tell us why you need another date for your jury service" + When I set text area with "id" of "deferralReason" to "" + And I press the "Continue" button + Then I see "Enter your reason for needing another date for jury service" on the page + When I click on the "Back" link + + #Check Your Answers (to confirm scenario 3 passes) + + Then I see "Check your answers now" on the page + And I see "Deferral Reason" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |641500092 |LNAMENINETWO |CH1 2AN |a@eeee.com |415170402 | + +@Regression +Scenario Outline: 1st English Back Button Logic with Deferral Dates Screen + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then on the page I see + | text | + | Is this your address? | + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I press the "Continue" button + Then on the page I see + | text | + | There is a problem| + |Enter your main phone number| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Enter your email address | + + When I set "Enter your email address" to "test@gmail.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address again" to "test@gmail.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + When I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + Then the radio button "No" is "selected" + And I press the "Continue" button + + #Check Your Answers (Covers Scenario 1) + + Then I see "Check your answers now" on the page + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + And I see "You must have a good reason for changing, for example:" on the page + And I see "a booked holiday" on the page + And I see "an operation" on the page + And I see "an exam" on the page + And I see "your employer will not give you time off work" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + When I press the "Continue" button + + #Deferral Dates + + When I press the "Continue" button + And I see "Enter the first Monday you'd prefer to start jury service" on the page + And I see "Enter the second Monday you'd prefer to start jury service" on the page + And I see "Enter the third Monday you'd prefer to start jury service" on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates + + And I see "steps/confirm-date/deferral-check" in the URL + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + And I see text "I need to change the date of my jury service" in the same row as "Confirm the date of your jury service" + + #Check Your Answers (Scenario 2) + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers + + And I see text "I can do jury service on the date shown" in the same row as "Confirm the date of your jury service" + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + + And I click on the "Back" link + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + When I press the "Continue" button + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers (Submit) + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500564 |DOE |SW1H 9AJ |a@eeee.com |415170401 | + +@Regression @JDB-4249 @JDB-3704 @JDB-4608 +Scenario Outline: English 1st Party Deferral - Validation and Errors + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + When I press the "Continue" button + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + + #check errors + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Select whether you can start jury service on this date" on the page + + #check hint text + + Then I click on the "Will I need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "You may be asked to serve for longer when you arrive at court." on the page + And I see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I see "You must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will I need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "You may be asked to serve for longer when you arrive at court." on the page + And I do not see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I do not see "You must contact us at that time to let us know." on the page + + #select deferral + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #deferral reason + + #check hint text + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Enter your reason for needing another date for jury service" on the page + + When I set text area with "id" of "deferralReason" to "Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here " + And I see "You have 14 characters too many" on the page + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Your reason for asking for a later date for your jury service must be fewer characters" on the page + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Choose 3 Mondays when you can start jury service" on the page + And I see "These must be between" on the page + And I see "You must be available to serve at least 2 weeks." on the page + + #check hint text + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "You may be asked to serve for longer when you arrive at court." on the page + And I see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I see "You must contact us at that time to let us know." on the page + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "You may be asked to serve for longer when you arrive at court." on the page + And I do not see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I do not see "You must contact us at that time to let us know." on the page + + #check inputting invalid values in + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Enter the first Monday you'd prefer to start jury service" on the page + And I see "Enter the second Monday you'd prefer to start jury service" on the page + And I see "Enter the third Monday you'd prefer to start jury service" on the page + + When I set input field with "id" of "deferDate1" to "aa" + When I set input field with "id" of "deferDate2" to "aa" + When I set input field with "id" of "deferDate3" to "aa" + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Enter the first Monday you'd prefer to start jury service" on the page + And I see "Enter the second Monday you'd prefer to start jury service" on the page + And I see "Enter the third Monday you'd prefer to start jury service" on the page + + When I set input field with "id" of "deferDate1" to "99" + When I set input field with "id" of "deferDate2" to "99" + When I set input field with "id" of "deferDate3" to "99" + + And I press the "Continue" button + + And I see "There is a problem" on the page + And I see "Enter the first Monday you'd prefer to start jury service" on the page + And I see "Enter the second Monday you'd prefer to start jury service" on the page + And I see "Enter the third Monday you'd prefer to start jury service" on the page + + When I set input field with "id" of "deferDate1" to "1111" + When I set input field with "id" of "deferDate2" to "1111" + When I set input field with "id" of "deferDate3" to "1111" + + And I press the "Continue" button + + And I see "There is a problem" on the page + And I see "Enter the first Monday you'd prefer to start jury service" on the page + And I see "Enter the second Monday you'd prefer to start jury service" on the page + And I see "Enter the third Monday you'd prefer to start jury service" on the page + + When I set input field with "id" of "deferDate1" to "!" + When I set input field with "id" of "deferDate2" to "!" + When I set input field with "id" of "deferDate3" to "!" + + And I press the "Continue" button + + And I see "There is a problem" on the page + And I see "Enter the first Monday you'd prefer to start jury service" on the page + And I see "Enter the second Monday you'd prefer to start jury service" on the page + And I see "Enter the third Monday you'd prefer to start jury service" on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "10" weeks in the future + And I press the "Continue" button + + And I see "There is a problem" on the page + And I see "Enter a date that's different to your other choices" on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + And I press the "Continue" button + + #confirm dates + + And I see "steps/confirm-date/deferral-check" in the URL + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + #check hint text + + And I click on the "Will I need to serve longer than 2 weeks?" link + Then on the page I see + | text | + |Most jurors only need to serve 2 weeks.| + |You may be asked to serve for longer when you arrive at court.| + |If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court.| + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I see "You must contact us at that time to let us know." on the page + + And I click on the "Will I need to serve longer than 2 weeks?" link + Then on the page I do not see + | text | + |Most jurors only need to serve 2 weeks.| + |You may be asked to serve for longer when you arrive at court.| + |If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court.| + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I do not see "You must contact us at that time to let us know." on the page + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Confirm whether you want to proceed with these dates" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #help in court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + Then I see "Check your answers now" on the page + + Then on the page I see + | text | + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then I see "You have completed your reply" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645100691 |451170401 |LNAMESEVENONETHREE |SW1H 9AJ |e@eeee.com | + +@RegressionSingle @JDB-4249 @JDB-3704 +Scenario Outline: English 1st Party Deferral - date 1 selected is a BH + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I create a bank holiday "8" Mondays in the future for court/bureau "400" new schema + + When I set the "First" single date field to a Monday "8" weeks in the future + When I set the "Second" single date field to a Monday "9" weeks in the future + When I set the "Third" single date field to a Monday "10" weeks in the future + + And I press the "Continue" button + + #confirm dates screen + + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + + And I validate the "First" deferral date is "8" weeks in the future + And I validate the "Second" deferral date is "9" weeks in the future + And I validate the "Third" deferral date is "10" weeks in the future + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then I see "At least one of the Mondays you selected is a bank holiday" on the page + And I see "You've selected at least one Monday that's a UK bank holiday." on the page + And I see "If we choose this as your start date, your jury service will start on the Tuesday at the earliest." on the page + And I see "We'll send you confirmation of your start date." on the page + And I press the "Continue" button + + #help in court + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Email" + And I set "Enter your email address" to "abc@abc.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address" to "<email>" + And I press the "Continue" button + + Then on the page I see + | text | + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "8" weeks in the future + And I validate the "Second" deferral date is "9" weeks in the future + And I validate the "Third" deferral date is "10" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on the page I see + | text | + |You have completed your reply| + |If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you.| + |We have sent you an email to say you have replied to your jury summons.| + |Download a copy of your summons reply| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |Then, at least 2 weeks before your jury service starts, we'll send you:| + |a letter confirming the date of your jury service| + |an information pack about being a juror and the court you're going to| + |Get ready for your jury service| + |The information below is also in the email that we have sent you.| + |You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch.| + |Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And on the page I see + |text| + |You have said that you need to change the date of your jury service.| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |I need to change the date of my jury service| + |Tell us why you need another date for your jury service| + |Deferral Reason| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "8" weeks in the future + And I validate the "Second" deferral date is "9" weeks in the future + And I validate the "Third" deferral date is "10" weeks in the future + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "9" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + And I delete bank holiday + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645100011 |451170401 |LNAMESEVENONETHREE |SW1H 9AJ |e@eeee.com | + +@RegressionSingle @JDB-4249 @JDB-3704 +Scenario Outline: English 1st Party Deferral - date 2 selected is a BH + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I create a bank holiday "10" Mondays in the future for court/bureau "400" new schema + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates screen + + Then on the page I see + |text| + |Check your dates| + |Dates you can start jury service| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as your start date, your jury service will start on the Tuesday at the earliest.| + |We'll send you confirmation of your start date.| + And I press the "Continue" button + + #help in court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + Then on the page I see + | text | + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on the page I see + | text | + |You have completed your reply| + |If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you.| + |We have sent you an email to say you have replied to your jury summons.| + |Download a copy of your summons reply| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |Then, at least 2 weeks before your jury service starts, we'll send you:| + |a letter confirming the date of your jury service| + |an information pack about being a juror and the court you're going to| + |Get ready for your jury service| + |The information below is also in the email that we have sent you.| + |You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch.| + |Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And on the page I see + |text| + |You have said that you need to change the date of your jury service.| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |I need to change the date of my jury service| + |Tell us why you need another date for your jury service| + |Deferral Reason| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "9" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + And I delete bank holiday + +Examples: + |part_no |pool_no |last_name |postcode |email | + |741500847 |415181001 |LNAMESEVENONETHREE |CH1 2AN |e@eeee.com | + +@RegressionSingle @JDB-4249 @JDB-3704 +Scenario Outline: English 1st Party Deferral - date 3 selected is a BH + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I create a bank holiday "11" Mondays in the future for court/bureau "400" new schema + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates screen + + Then on the page I see + |text| + |Check your dates| + |Dates you can start jury service| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as your start date, your jury service will start on the Tuesday at the earliest.| + |We'll send you confirmation of your start date.| + + And I press the "Continue" button + + #help in court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + Then on the page I see + | text | + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on the page I see + | text | + |You have completed your reply| + |If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you.| + |We have sent you an email to say you have replied to your jury summons.| + |Download a copy of your summons reply| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |Then, at least 2 weeks before your jury service starts, we'll send you:| + |a letter confirming the date of your jury service| + |an information pack about being a juror and the court you're going to| + |Get ready for your jury service| + |The information below is also in the email that we have sent you.| + |You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch.| + |Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And on the page I see + |text| + |You have said that you need to change the date of your jury service.| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |I need to change the date of my jury service| + |Tell us why you need another date for your jury service| + |Deferral Reason| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "9" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + + And I delete bank holiday + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645100755 |451170401 |LNAMESEVENONETHREE |SW1H 9AJ |e@eeee.com | + +@RegressionSingle @JDB-4249 @JDB-3704 +Scenario Outline: English 1st Party Deferral - >1 date selected is a BH + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I create a bank holiday "10" Mondays in the future for court/bureau "400" new schema +# And I create a bank holiday "11" Mondays in the future for court/bureau "400" + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates screen + + Then on the page I see + |text| + |Check your dates| + |Dates you can start jury service| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as your start date, your jury service will start on the Tuesday at the earliest.| + |We'll send you confirmation of your start date.| + And I press the "Continue" button + + #help in court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + Then on the page I see + | text | + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on the page I see + | text | + |You have completed your reply| + |If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you.| + |We have sent you an email to say you have replied to your jury summons.| + |Download a copy of your summons reply| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |Then, at least 2 weeks before your jury service starts, we'll send you:| + |a letter confirming the date of your jury service| + |an information pack about being a juror and the court you're going to| + |Get ready for your jury service| + |The information below is also in the email that we have sent you.| + |You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch.| + |Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And on the page I see + |text| + |You have said that you need to change the date of your jury service.| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |I need to change the date of my jury service| + |Tell us why you need another date for your jury service| + |Deferral Reason| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "9" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + Then I delete bank holiday + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645100792 |451170401 |LNAMESEVENONETHREE |SW1H 9AJ |e@eeee.com | + +@RegressionSingle +Scenario Outline: English 1st Party Deferral - Navigate back from BH page + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + Then I create a bank holiday "11" Mondays in the future for court/bureau "400" new schema + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates screen + + Then on the page I see + |text| + |Check your dates| + |Dates you can start jury service| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as your start date, your jury service will start on the Tuesday at the earliest.| + |We'll send you confirmation of your start date.| + + And I press the "Continue" button + + #back link + + And I click on the "Back" link + And I see "At least one of the Mondays you selected is a bank holiday" on the page + + #back link + + And I click on the "Back" link + And I see "Check your dates" on the page + + #back link + + When I click on the "Back" link + Then I see "Choose 3 Mondays when you can start jury service" on the page + + #back link + + When I click on the "Back" link + Then I see "Tell us why you need another date for your jury service" on the page + + #back link + + When I click on the "Back" link + Then I see "Check your start date" on the page + + #no i need to change date + And the radio button "No, I need to change the date" is "selected" + And I press the "Continue" button + + #reason + + Then I see "Tell us why you need another date for your jury service" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #choose dates + + Then I see "Choose 3 Mondays when you can start jury service" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates + + And I see "Check your dates" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #BH page + + And I see "At least one of the Mondays you selected is a bank holiday" on the page + And I press the "Continue" button + + #help in court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + Then on the page I see + | text | + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on the page I see + | text | + |You have completed your reply| + |If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you.| + |We have sent you an email to say you have replied to your jury summons.| + |Download a copy of your summons reply| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |Then, at least 2 weeks before your jury service starts, we'll send you:| + |a letter confirming the date of your jury service| + |an information pack about being a juror and the court you're going to| + |Get ready for your jury service| + |The information below is also in the email that we have sent you.| + |You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch.| + |Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And on the page I see + |text| + |You have said that you need to change the date of your jury service.| + |We'll write to you within the next 7 days to let you know if you can change the date of your jury service.| + |I need to change the date of my jury service| + |Tell us why you need another date for your jury service| + |Deferral Reason| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "7" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + And I delete bank holiday new schema + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200889 |452170401 |LNAMESEVENONETHREE |WV1 4EE |e@eeee.com | + +@RegressionSingle @JDB-4249 @JDB-3704 +Scenario Outline: English 1st Party Deferral - selected date makes juror >76 + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #I set DOB to make them 75 + When I set the date of birth to a Monday "-3950" weeks in the future + + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "Tell us why you need another date for your jury service" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + Then I see "Choose 3 Mondays when you can start jury service" on the page + + When I set the "First" single date field to a Monday "46" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + Then on the page I see + |text| + |There is a problem| + |Give another date, you will be older than 76 on this date and would not qualify for jury service| + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + And I see "You do not need to tell us all other dates you're available." on the page + And I see "We'll choose one of your 3 dates." on the page + And I see "In the unlikely event that we cannot use one of these dates, we'll contact you." on the page + And I see "Do you want to proceed with these dates?" on the page + + #check hint text + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "You may be asked to serve for longer when you arrive at court." on the page + And I see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I see "You must contact us at that time to let us know." on the page + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "You may be asked to serve for longer when you arrive at court." on the page + And I do not see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I do not see "You must contact us at that time to let us know." on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Email" + And I set "Enter your email address" to "abc@abc.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address" to "<email>" + And I press the "Continue" button + + And I see "Choose 3 Mondays when you can start jury service" on the page + And I see "First choice" on the page + And I see "Second choice" on the page + And I see "Third choice" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then I see "You have completed your reply" on the page + Then I see "If we get in touch with you, you may need to give your juror number. It's also on the letter we sent you." on the page + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + Then I see "Download a copy of your summons reply" on the page + Then I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + Then I see "Then, at least 2 weeks before your jury service starts, we'll send you:" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "Get ready for your jury service" on the page + And I see "The information below is also in the email that we have sent you." on the page + And I see "You can watch this video on YouTube about what happens when you're a juror, so you know what to expect. The video takes 13 minutes to watch." on the page + And I see "Learn more about your jury service. You can read the rules about discussing the trial and find out how to claim expenses." on the page + And I see "Calculate what expenses and allowances you can claim." on the page + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + And I see "What did you think of this service? (Takes 30 seconds)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You have said that you need to change the date of your jury service." on the page + And I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + And I see "I need to change the date of my jury service" on the page + And I see "Tell us why you need another date for your jury service" on the page + And I see "Deferral Reason" on the page + And I see "Choose 3 Mondays when you can start jury service" on the page + And I see "First choice" on the page + And I see "Second choice" on the page + And I see "Third choice" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I select deferral date "10" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "H_PHONE" is "02078211818" where "part_no" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_EMAIL" is "<email>" where "part_no" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" and "owner" is "400" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645100227 |451170401 |LNAMESEVENONETHREE |SW1H 9AJ |e@eeee.com | + +@Regression @replytypes +Scenario Outline: English 1st Party Deferral + Bail + Name change + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "No" + When I press the "Continue" button + And I set "First name" to "Joe" + And I set "Last name" to "Blogs" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "I am on bail for crimes" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + And I see "You are summoned to start jury service on" on the page + And I see "Can you start jury service on this date?" on the page + And I see "Yes, I can start on" on the page + And I see "and serve for at least 2 weeks" on the page + And I see "No, I need to change the date" on the page + And I see "No, I cannot do jury service and need to be excused" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "steps/confirm-date/deferral-reason" in the URL + And I see "Tell us why you need another date for your jury service" on the page + And I see "You must have a good reason for changing, for example:" on the page + And I see "a booked holiday" on the page + And I see "an operation" on the page + And I see "an exam" on the page + And I see "your employer will not give you time off work" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Choose 3 Mondays when you can start jury service" on the page + And I see "These must be between" on the page + And I see "You must be available to serve at least 2 weeks." on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "8" weeks in the future + + And I see "You do not need to tell us all other dates you're available." on the page + And I see "We'll choose one of your 3 dates." on the page + And I see "In the unlikely event that we cannot use one of these dates, we'll contact you." on the page + And I see "Do you want to proceed with these dates?" on the page + + #check hint text + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "You may be asked to serve for longer when you arrive at court." on the page + And I see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I see "You must contact us at that time to let us know." on the page + + And I click on the "Will I need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "You may be asked to serve for longer when you arrive at court." on the page + And I do not see "If you cannot serve for more than 2 weeks, you'll be able to discuss this with the jury manager at court." on the page + + And I click on the "What if there's a problem nearer the time and I cannot serve?" link + And I do not see "You must contact us at that time to let us know." on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Email" + And I set "Enter your email address" to "abc@abc.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address" to "<email>" + And I press the "Continue" button + + And on the page I see + |text| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "8" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then I see "You have completed your reply" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You have said that you need to change the date of your jury service." on the page + And I see "First choice" on the page + And I see "Second choice" on the page + And I see "Third choice" on the page + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "8" weeks in the future + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200713 |452170401 |LNAMESEVENONETHREE |SY2 6LU |e@eeee.com | + +@Regression @JDB-4249 @JDB-3704 @replytypes +Scenario Outline: English 1st Party Deferral - NEW PAGE + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "8" weeks in the future + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + And on the page I see + |text| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "8" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "DEFERRAL" + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + #continue with nothing selected + + And I press the "Confirm" button + And I see "There is a problem" on the page + And I see "Select a reason for the deferral request" on the page + And I see "Select your decision about this deferral request" on the page + + And I set the radio button to "Accept deferral" + + #continue with only decision selected + + And I press the "Confirm" button + And I see "There is a problem" on the page + And I see "Select a reason for the deferral request" on the page + And I see "Select a date or choose another date" on the page + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + + #continue with only reason and Accept selected + + And I press the "Confirm" button + And I see "There is a problem" on the page + And I see "Select a date or choose another date" on the page + + And I set the radio button to "Other" + + #continue with only reason Accept and Other selected + + And I press the "Confirm" button + And I see "There is a problem" on the page + And I see "Enter a valid deferral date" on the page + + #date validation - cant be silly value + + When I set input field with "id" of "deferralDate" to "1111/1111/1111" + + And I press the "Confirm" button + And I see "There is a problem" on the page + And I see "Enter a valid deferral date" on the page + + #date validation - cant be > 12 mos in the future + + When I set input field with "id" of "deferralDate" to "01/01/2050" + + And I press the "Confirm" button + And I see "There is a problem" on the page + And I see "Enter a valid deferral date" on the page + + #select the radio buttons + + And I select deferral date "6" weeks in the future + And I select deferral date "7" weeks in the future + And I select deferral date "8" weeks in the future + Then I set the radio button to "Other" + + #can input the same date as one of the radio buttons + + When I set the "Deferral" single date field to a Monday "10" weeks in the future + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I press the "Confirm" button + Then I see "COMPLETED" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |641500530 |415170401 |LNAMEFIVETWOZERO |SW1H 9AJ |e@eeee.com | + +@Regression @replytypes +Scenario Outline: English 1st Party Deferral - refuse deferral + + Given I am on "Public" "bau-test" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + And I have deleted all holidays new schema + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + And I set the date of birth to a Monday "-1560" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "bail" on the page + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #New deferrals + + Then I see "Check your start date" on the page + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I see "Dates you can start jury service" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + And on the page I see + |text| + |Choose 3 Mondays when you can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "6" weeks in the future + And I validate the "Second" deferral date is "7" weeks in the future + And I validate the "Third" deferral date is "8" weeks in the future + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "DEFERRAL" + + When I click on "<part_no>" in the same row as "<part_no>" + + And I see "Juror details" on the page + + When I select "Deferral" from Process reply + + #refuse deferral + + And I set the radio button to "Refuse deferral" + + #continue with only decision selected + + And I press the "Confirm" button + And I see "There is a problem" on the page + And I see "Select a reason for the deferral request" on the page + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200403 |452170401 |LNAMEFOURZEROTHREE |SY2 6LU |e@eeee.com | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Deferral_SkipMainContent.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Deferral_SkipMainContent.feature new file mode 100644 index 00000000..a6eb0b93 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Deferral_SkipMainContent.feature @@ -0,0 +1,243 @@ +Feature: English_1st_Deferral_SkipMainContent + +@Regression @JDB-3357 +Scenario Outline: English 1st Deferral Skip to Main Content Check + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Skip to main content" on the page + When I click on the "Skip to main content" link + Then I see "Reply to a jury summons" on the page + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you replying for yourself or for someone else?" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Since you turned 13," on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you currently on bail" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Have you been found guilty of a criminal offence" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your start date" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Tell us why you need another date for your jury service" on the page + + When I set text area with "id" of "deferralReason" to "ReasonWhy" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Choose 3 Mondays when you can start jury service" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Continue" button + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + And I see "Check your dates" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Will you need help when you're at the court?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "You have completed your reply" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |841500197 |415181001 |LNAME197 |CH1 2AN |e@eeee.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_EmailError.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_EmailError.feature new file mode 100644 index 00000000..9ac87c44 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_EmailError.feature @@ -0,0 +1,126 @@ +Feature: Regression English_1st_EmailError + +@JDB-3408 @Regression +Scenario Outline: Checking email error validation + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | <owner> | + + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check Name + + And I set the radio button to "No" + And I press the "Continue" button + Then I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + Then I see "Enter your first name" on the page + Then I see "Enter your last name" on the page + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I click on the "Back" link + Then I see "FirstNamea" on the page + And I see "LastNameb" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Is this your address?" on the page + + #Check Address + + And I set the radio button to "No" + When I press the "Continue" button + Then I set "Address line 1" to "" + And I set "Town or city" to "" + And I set "County (optional)" to "" + And I set "Postcode" to "" + And I press the "Continue" button + + Then I see "Provide the town or city you live in" on the page + +# Then I see "Please check your county" on the page (Optional?) + + Then I see "Enter your postcode" on the page + When I set "Address line 1" to "123 Street" + And I set "Town or city" to "London" + And I set "County (optional)" to "County" + And I set "Postcode" to "CH1 2AN" + + And I press the "Continue" button + + #Then I see "What is your date of birth?" on the page + + Then I see "What is your phone number?" on the page + When I click on the "Back" link + Then I see "123 Street" on the page + And I see "London" on the page + And I see "CH1 2AN" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + #Then I see "What is your date of birth?" on the page + + Then I see "What is your phone number?" on the page + + #When I press the "Continue" button + + When I press the "Continue" button + Then I see "Enter your main phone number" on the page + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Phone Details + + Then I see "What is your email address?" on the page + When I click on the "Back" link + Then I see "What is your phone number?" on the page + And I press the "Continue" button + Then I see "What is your email address?" on the page + #Email + + When I press the "Continue" button + Then I see "Enter your email address" on the page + + #Error happened here + + And I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + When I click on the "Back" link + Then I see "What is your email address?" on the page + And I press the "Continue" button + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + +Examples: + | part_no |last_name |postcode | email |pool_no | owner | + |841501644 |LNAMESIXSIXZERO |CH1 2AN |email@outlook.com|415181001 | 400 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_ErrorChecks.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_ErrorChecks.feature new file mode 100644 index 00000000..ddf8cea3 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_ErrorChecks.feature @@ -0,0 +1,736 @@ +Feature: Regression English_1st_ErrorChecks + +@Regression @4485 +Scenario Outline: English 1st ErrorChecks - status is Undeliverable + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "STATUS" as "9" + + Then I see "Reply to a jury summons" on the page + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + + Then I see "Your juror details" on the page + When I press the "Continue" button + Then I see "Enter your 9-digit juror number - you can find it on your jury summons letter" on the page + And I see "You must enter your last name exactly as it's printed on your jury summons letter, even if it's wrong" on the page + And I see "You must enter your postcode exactly as it's printed on your jury summons letter, even if it's wrong" on the page + Then I click on the "Problems entering your details?" link + And I see "If you've checked your details and still cannot continue, you can contact us." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I see "Our records show you've already replied to this jury summons" on the page + And I see "If you want to tell us about changes or we've asked you for more information, you need to contact us by email, telephone or letter." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + And I see "Jury Central Summoning Bureau" on the page + And I see "Phoenix House" on the page + And I see "Rushton Avenue" on the page + And I see "Bradford" on the page + And I see "BD3 7BH" on the page + + And I see "You cannot tell us extra information through this digital service." on the page + + Examples: + |part_no |last_name |postcode |pool_no | + |645100298 |DOE |SW1H 9AJ |451170401 | + +@Regression @4494 @4488 +Scenario Outline: English_1st_ErrorChecks - Court date is in the past + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "-1 mondays time" + And "<part_no>" has "NEXT_DATE" as "-1 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "The court date for your jury summons has passed. You cannot reply using this service." on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |645100079 |DOE |SW1H 9AJ |email@outlook.com |451170401 | + +@Regression @JDB-3348 @JDB-3501 @JDB-3638 @JDB-3668 @JDB-3669 @JDB-3670 @JDB-3671 @JDB-3672 @JDB-3711 @JDB-3715 @JDB-3857 @4502 +Scenario Outline: English_1st_ErrorChecks + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select if you are replying for yourself or for someone else" on the page + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In (Find out how to trigger all messages) + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check name + + When I press the "Continue" button + And I see "You need to tell us if we have the correct name for you" on the page + + When I set the radio button to "No" + When I press the "Continue" button + And I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your first name" on the page + And I see "Enter your last name" on the page + When I set "First name" to "FirstName" + And I set "Last name" to "LastName" + And I press the "Continue" button + Then I see "Is this your address?" on the page + + #Check address + + When I set the radio button to "No" + When I press the "Continue" button + And I set "Address line 1" to "" + And I set "Town or city" to "" + And I set "Postcode" to "" + And I press the "Continue" button + Then I see "There is a problem" on the page + + And I see "Provide the town or city you live in" on the page + And I see "Provide the first line of your address" on the page + And I see "Enter your postcode" on the page + + #Checking Invalids check with Jorge + + When I set "Address line 1" to "|||" + And I set "Town or city" to "|||" + And I set "County" to "|||" + And I set "Postcode" to "|||" + And I press the "Continue" button + + Then I see "There is a problem" on the page + Then I see "Check the first line of your address" on the page + And I see "Check the town or city you live in" on the page + Then I see "Check your county" on the page + And I see "Check your postcode" on the page + + When I set "Address line 1" to "123 ADDRESS LINE ONE" + And I set "Town or city" to "London" + And I set "County" to "" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone details + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your main phone number" on the page + + #main starts with non 0 + When I set "Main phone" to "1207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main includes a letter + When I set "Main phone" to "H207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has all spaces + When I set "Main phone" to " " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your main phone number" on the page + + #main starts 01 and is followed by spaces + When I set "Main phone" to "01 " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has hyphens + When I set "Main phone" to "0121-333-4444" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has commas + When I set "Main phone" to "0121,333,4444" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main begins 07 but only has 10 digits + When I set "Main phone" to "0711111111" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main begins 01 but only has 9 digits + When I set "Main phone" to "011111111" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has too many spaces + When I set "Main phone" to "01 21 123 444" + When I press the "Continue" button + Then I see "What is your email address?" on the page + And I click on the "Back" link + + #main prefixed with a space + When I set "Main phone" to " 0121123444" + When I press the "Continue" button + Then I see "What is your email address?" on the page + And I click on the "Back" link + + #other starts with non 0 + When I set "Another phone (optional)" to "1207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other includes a letter + When I set "Another phone (optional)" to "H207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other starts 01 and is followed by spaces + When I set "Another phone (optional)" to "01 " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other has hyphens + When I set "Another phone (optional)" to "0121-333-4444" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other has commas + When I set "Another phone (optional)" to "0121,333,4444" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other begins 07 but only has 10 digits + When I set "Another phone (optional)" to "0711111111" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other begins 01 but only has 9 digits + When I set "Another phone (optional)" to "011111111" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other has too many spaces + When I set "Another phone (optional)" to "01 21 123 444" + When I press the "Continue" button + Then I see "What is your email address?" on the page + And I click on the "Back" link + + #other prefixed with a space + When I set "Another phone (optional)" to " 0121123444" + When I press the "Continue" button + Then I see "What is your email address?" on the page + And I click on the "Back" link + + #both invalid + When I set "Main phone" to "011111111" + When I set "Another phone (optional)" to "011111111" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + And I see "Check your other phone number" on the page + + When I set "Main phone" to "0207 821 1818" + When I set "Another phone (optional)" to "" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email details + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your email address" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + + #JDB-4502 + + And I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + + #only day is set + + When I set "Day" to "27" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the month you were born" on the page + + #day and month are set + + And I set "Month" to "04" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the year you were born" on the page + + #only year is set + + When I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "1988" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "198a" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the year you were born as a 4 digit number. For example, 1982" on the page + + When I set the date of birth to a Monday "-1500" weeks in the future + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency Yes + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select yes if your main address has been in the UK, Channel Islands or Isle of Man for any period of at least 5 years, since you turned 13" on the page + + When I set the radio button to "No" + And I see "Provide details about where you have lived since your 13th birthday" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + Then I see error "Provide details about where you have lived since your 13th birthday" + And I see "Provide details about where you have lived since your 13th birthday" on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select whether you've worked in the criminal justice system in the last 5 years" + When I set the radio button to "Yes" + And I see "Choose any organisations you have worked for" on the page + And I press the "Continue" button + Then I see error "Tick any organisations you worked for directly (not as a third party or subcontractor)" + + When I check the "Police service" checkbox + And I see "Which police service?" on the page + And I check the "HM Prison Service" checkbox + And I see "Which part of HM Prison Service?" on the page + And I check the "Other" checkbox + And I see "Which other part of the Criminal Justice System?" on the page + And I press the "Continue" button + Then I see error "Give details of where and when you have worked for the police service" + Then I see "Give details of where and when you have worked for HM Prison Service" on the page + Then I see error "Give details of where and when you have worked for another Criminal Justice System employer" + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail no + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if you are currently on bail for a criminal offence" + + When I set the radio button to "Yes" + Then I see "Provide details about your bail and criminal offence" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide details about your bail and criminal offence" + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if you have been found guilty of a criminal offence" + + When I set the radio button to "Yes" + Then I see "Provide details about your criminal offence" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide details about your criminal offence" + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 1 no + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if you're being detained, looked after or treated under the Mental Health Act" + + When I set the radio button to "Yes" + Then I see "Provide details about how you're being detained, looked after or treated under the Mental Health Act" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide details about how you're being detained, looked after or treated under the Mental Health Act" + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 no + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I see "This means, legally, you cannot make decisions for yourself." on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if it's been decided that you 'lack mental capacity'" + + When I set the radio button to "Yes" + Then I see "Provide brief details about why it was decided you lack mental capacity" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide brief details about why it was decided you lack mental capacity" + + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select whether you can start jury service on this date" on the page + + When I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select yes if you will need help when you're at court" on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "There is a problem" on the page + + #JDB-3638 + + And I see "Select if you have limited mobility, a hearing impairment, diabetes, a severe sight impairment or other disability or impairment" on the page + + When I check the "Other" checkbox + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Give details of your disability or impairment" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + When I press the "Submit" button + Then I see "There is a problem" on the page + Then I see "Confirm that this information is correct before submitting this summons reply" on the page + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + Then I see "Tell us why you need another date for your jury service" on the page + + #Deferral Reason + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your reason for needing another date for jury service" on the page + + When I set text area with "id" of "deferralReason" to "Defer me please" + And I press the "Continue" button + Then I see "Choose 3 Mondays when you can start jury service" on the page + + #Deferral Dates + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the first Monday you'd prefer to start jury service" on the page + And I see "Enter the second Monday you'd prefer to start jury service" on the page + And I see "Enter the third Monday you'd prefer to start jury service" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "10" weeks in the future + + And I press the "Continue" button + + Then I see "There is a problem" on the page + And I see "Enter a date that's different to your other choices" on the page + + When I set the "First" single date field to a Monday "100" weeks in the future + When I set the "Second" single date field to a Monday "101" weeks in the future + When I set the "Third" single date field to a Monday "102" weeks in the future + + And I press the "Continue" button + + Then I see "There is a problem" on the page + And I see "Your first choice must be a Monday between" on the page + And I see "Your second choice must be a Monday between" on the page + And I see "Your third choice must be a Monday between" on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm dates + + And I see "steps/confirm-date/deferral-check" in the URL + And I see "Check your dates" on the page + And I see "Dates you can start jury service" on the page + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Confirm whether you want to proceed with these dates" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + Then I see "Why do you need to be excused from jury service?" on the page + + #Excusal Reason + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter reason why you cannot do jury service in the next 12 months" on the page + + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500942 |LNAMENINEFOURTWO |CH1 2AN |email@outlook.com |415170401 | + +@Regression @JDB-3772 +Scenario Outline: Checking that there is in-line error message for Responder Type screen + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I press the "Continue" button + Then I see "There is a problem" on the page + + #need a welsh version too + + And I see "Select if you are replying for yourself or for someone else" on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |641500681 |LNAMESIXEIGHTONE|CH1 2AN |a@eeee.com |415170601 | + +@Regression @JDB-4100 +Scenario Outline: English response completed in Legacy and login attempted on Digital + Given I am on "Public" "test" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "READ_ONLY" as "N" + And "<part_no>" has "RESPONDED" as "Y" + And "<part_no>" has "STATUS" as "2" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I see "Our records show you've already replied to this jury summons" on the page + And I see "If you want to tell us about changes or we've asked you for more information, you need to contact us by email, telephone or letter." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + And I see "Jury Central Summoning Bureau" on the page + And I see "Phoenix House" on the page + And I see "Rushton Avenue" on the page + And I see "Bradford" on the page + And I see "BD3 7BH" on the page + + And I see "You cannot tell us extra information through this digital service." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500276 |LNAMETWOSEVENSIX |CH1 2AN |e@mail.com |415170402 | + + @Regression @4485 + Scenario Outline: English Already Replied info page + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "STATUS" as "9" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I see "steps/login" in the URL + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I see "Our records show you've already replied to this jury summons" on the page + And I see "If you want to tell us about changes or we've asked you for more information, you need to contact us by email, telephone or letter." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + And I see "Jury Central Summoning Bureau" on the page + And I see "Phoenix House" on the page + And I see "Rushton Avenue" on the page + And I see "Bradford" on the page + And I see "BD3 7BH" on the page + + And I see "You cannot tell us extra information through this digital service." on the page + + + Examples: + |part_no |last_name |postcode |pool_no| + |645200277 |LNAMESIXSEVENSIX |SW1H 9AJ |452170501| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Excusal.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Excusal.feature new file mode 100644 index 00000000..9f0b27e4 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Excusal.feature @@ -0,0 +1,1322 @@ +Feature: Regression English_1st_Excusal + +@Regression @replytypes @JDB-3447 @JDB-3653 @JDB-3957 +Scenario Outline: English 1st Party Excusal Accepted + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + And I see "steps/confirm-date/excusal" in the URL + Then I see "Why do you need to be excused from jury service?" on the page + When I see "Explain why you cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before your summons deadline." on the page + And I see "We'll contact you later if we need this." on the page + + And I press the "Continue" button + Then I see "Enter reason why you cannot do jury service in the next 12 months" on the page + + Then I set text area with "id" of "excusalReason" to "Excuse me please" + And I click on the "Will I need to provide evidence soon?" link + And I see "If we need evidence, we'll contact you separately to tell you." on the page + And I see "For example, if you're too ill for jury service, we might ask for a letter from your doctor." on the page + And I see "You'll be given time to gather any evidence so do not worry about trying to gather this now." on the page + And I see "You should wait until we've told you what evidence we need, if any." on the page + + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + Then I see "Why do you need to be excused from jury service?" on the page + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "Why do you need to be excused from jury service?" on the page + + Given I am on "Bureau" "juror-test02" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Deferral or excusal" link + + Then I see "Excuse me please" on the page + + And I press the "Process reply" button + And I see link with text "Excusal" + + Given I am on "Bureau" "juror-test02" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "EXCUSAL" + And I click on "<part_no>" in the same row as "<part_no>" + + And I press the "Process reply" button + And I click on the "Excusal" link + Then I select "D - DECEASED" from the "Reason for the excusal request" dropdown + And I set the radio button to "Accept excusal request" + And the radio button "Accept excusal request" is "selected" + And the radio button "Refuse excusal request" is "unselected" + And I set the radio button to "Refuse excusal request" + And the radio button "Refuse excusal request" is "selected" + And the radio button "Accept excusal request" is "unselected" + And I click on the "Cancel" link + + And I press the "Process reply" button + And I click on the "Excusal" link + Then I select "D - DECEASED" from the "Reason for the excusal request" dropdown + And I set the radio button to "Accept excusal request" + And I press the "Confirm" button + And I see "Excused" on the page + And I see "COMPLETED" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500226 |LNAMETWOTWOSIX |CH1 2AN |email@outlook.com |415170401 | + +@Regression @replytypes @JDB-3447 @JDB-3653 @JDB-3957 +Scenario Outline: English 1st Party Excusal Refused + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + And I see "steps/confirm-date/excusal" in the URL + Then I see "Why do you need to be excused from jury service?" on the page + When I see "Explain why you cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before your summons deadline." on the page + And I see "We'll contact you later if we need this." on the page + And I click on the "Will I need to provide evidence soon?" link + And I see "If we need evidence, we'll contact you separately to tell you." on the page + And I see "For example, if you're too ill for jury service, we might ask for a letter from your doctor." on the page + And I see "You'll be given time to gather any evidence so do not worry about trying to gather this now." on the page + And I see "You should wait until we've told you what evidence we need, if any." on the page + Then I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "juror-test02" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Deferral or excusal" link + + Then I see "Excuse me please" on the page + + And I press the "Process reply" button + And I click on the "Excusal" link + Then I select "M - MEDICAL" from the "Reason for the excusal request" dropdown + And I set the radio button to "Refuse excusal request" + And the radio button "Refuse excusal request" is "selected" + And the radio button "Accept excusal request" is "unselected" + + And I press the "Confirm" button + And I see "Responded" on the page + And I see "COMPLETED" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200812 |LNAMEEIGHTONETWO |SY2 6LU |email@outlook.com |452170401 | + +@Regression @replytypes @JDB-3447 @JDB-3653 @JDB-3957 +Scenario Outline: English 1st Party Excusal Super Urgent + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + And I see "steps/confirm-date/excusal" in the URL + Then I see "Why do you need to be excused from jury service?" on the page + When I see "Explain why you cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before your summons deadline." on the page + And I see "We'll contact you later if we need this." on the page + And I click on the "Will I need to provide evidence soon?" link + And I see "If we need evidence, we'll contact you separately to tell you." on the page + And I see "For example, if you're too ill for jury service, we might ask for a letter from your doctor." on the page + And I see "You'll be given time to gather any evidence so do not worry about trying to gather this now." on the page + And I see "You should wait until we've told you what evidence we need, if any." on the page + Then I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given "<part_no>" has "READ_ONLY" as "Y" + Then the "URGENT" for juror "<part_no>" is set to "N" + Then the "SUPER_URGENT" for juror "<part_no>" is set to "Y" + + Given I am on "Bureau" "juror-test02" + When I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + And I click on "<part_no>" in the same row as "<part_no>" + + And I press the "Process reply" button + And I do not see link with text "Excusal" + And I see link with text "PDF sent to court..." + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200147 |LNAMEONEFOURSEVEN |SY2 6LU |email@outlook.com |452170401 | + +@Regression @replytypes @JDB-3447 @JDB-3653 @JDB-3957 +Scenario Outline: English 1st Party Excusal error messages + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + And I see "steps/confirm-date/excusal" in the URL + Then I see "Why do you need to be excused from jury service?" on the page + When I see "Explain why you cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before your summons deadline." on the page + And I see "We'll contact you later if we need this." on the page + And I click on the "Will I need to provide evidence soon?" link + And I see "If we need evidence, we'll contact you separately to tell you." on the page + And I see "For example, if you're too ill for jury service, we might ask for a letter from your doctor." on the page + And I see "You'll be given time to gather any evidence so do not worry about trying to gather this now." on the page + And I see "You should wait until we've told you what evidence we need, if any." on the page + Then I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "juror-test02" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Deferral or excusal" link + + Then I see "Excuse me please" on the page + + And I press the "Process reply" button + And I click on the "Excusal" link + + # error when dont select anything + + And I press the "Confirm" button + Then I see "There is a problem" on the page + And I see "Select a reason for the excusal request" on the page + And I see "Select your decision for this excusal request" on the page + + # error when I dont select a decision + + Then I select "M - MEDICAL" from the "Reason for the excusal request" dropdown + + And I press the "Confirm" button + Then I see "There is a problem" on the page + And I see "Select your decision for this excusal request" on the page + + # error when I dont select a reason + + And I set the radio button to "Accept excusal request" + And I select "Select a reason..." from the "Reason for the excusal request" dropdown + + And I press the "Confirm" button + Then I see "There is a problem" on the page + And I see "Select a reason for the excusal request" on the page + + # select both and process + + Then I select "M - MEDICAL" from the "Reason for the excusal request" dropdown + + And I press the "Confirm" button + And I see "Excused" on the page + And I see "COMPLETED" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200814 |LNAMEEIGHTONEFOUR |SY2 6LU |email@outlook.com |452170401 | + +@Regression @replytypes @JDB-3074 +Scenario Outline: English 1st Party Excusal Reason Special Character (£) check + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check Name + + When I set the radio button to "No" + When I press the "Continue" button + And I set "First name" to "Joe" + And I set "Last name" to "Blogs" + And I press the "Continue" button + + #Check Address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + Then I see "Why do you need to be excused from jury service?" on the page + Then I set text area with "id" of "excusalReason" to "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here££ that is 1000" + And I press the "Continue" button + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #check Bureau + + Given I am on "Bureau" "juror-test02" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "EXCUSAL" + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Deferral or excusal" link + + Then I see "Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here£ Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here Insert meaningful text here££ that is 1000" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500446 |DOE |CH1 2AN |email@outlook.com |415170401 | + +@Regression @JDB-3677 +Scenario Outline: 1st English Back Button Logic with Excusal Reason Screen + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + |text| + |Your details| + |Is the name we have for you correct?| + + And I set the radio button to "Yes" + And I press the "Continue" button + Then on the page I see + |text| + |Is this your address?| + + And I set the radio button to "Yes" + When I press the "Continue" button + + Then on the page I see + |text| + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I press the "Continue" button + Then on the page I see + |text| + |There is a problem| + |Enter your main phone number| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + |text| + |Your details| + |What is your email address?| + |Enter your email address| + |Enter your email address again| + + When I press the "Continue" button + Then on the page I see + |text| + |Your details| + |Enter your email address| + + When I set "Enter your email address" to "test@gmail.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address again" to "test@gmail.com" + And I press the "Continue" button + + Then on the page I see + |text| + |Your details| + |What is your date of birth?| + |For example, 15 03 1982| + |Help with date of birth| + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + When I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers (Covers Scenarios 1 and 2) + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + + #Confirm Date of Jury Service + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + Then I see "Why do you need to be excused from jury service?" on the page + + #Excusal Reason + + When I press the "Continue" button + Then I see "Enter reason why you cannot do jury service in the next 12 months" on the page + When I click on the "Back" link + Then I see "Check your start date" on the page + + #Confirm Date of Jury Service + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + Then I see "Check your answers now" on the page + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + Then I see "Why do you need to be excused from jury service?" on the page + + #Excusal Reason + + When I click on the "Back" link + Then I see "Check your start date" on the page + When I click on the "Back" link + Then I see "Check your answers now" on the page + + #Check Your Answers (to confirm screnario 1 and 2 pass) + + When I see text "I can do jury service on the date shown" in the same row as "Confirm the date of your jury service" + + #Check Your Answers (Covers Scenario 3) + + When I click on the "Change" link in the same row as "Confirm the date of your jury service" + Then I see "Check your start date" on the page + + #Confirm Date of Jury Service + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + Then I see "Why do you need to be excused from jury service?" on the page + + #Excusal Reason + + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Say why you need to be excused from jury service" + When I set text area with "id" of "excusalReason" to "" + And I press the "Continue" button + Then I see "Enter reason why you cannot do jury service in the next 12 months" on the page + When I click on the "Back" link + + #Check Your Answers (to confirm scenario 3 passes) + + Then I see "Check your answers now" on the page + And I see "Excuse me please" on the page + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500565 |DOE |SW1H 9AJ |a@eeee.com |415170401 | + +@Regression @JDB-3712 +Scenario Outline: Checking excusal text on Check Your Answers Now page + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + Then I see "Why do you need to be excused from jury service?" on the page + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I see "Why do you need to be excused from jury service?" on the page + And I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500947 |DOE |SW1H 9AJ |email@outlook.com |415170401 | + +@Regression @JDB-3714 +Scenario Outline: English 1st Party Excusal Reason Special Character 1000 x (£) check + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + Then I see "Why do you need to be excused from jury service?" on the page + When I set text area with "id" of "excusalReason" to "££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££" + And I press the "Continue" button + + #RA + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "Test1" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I click on the "Deferral or excusal" link + + Then I see "££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££££" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100827 |DOE |SW1H 9AJ |email@outlook.com |451170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Excusal_SkipMainContent.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Excusal_SkipMainContent.feature new file mode 100644 index 00000000..dc3e0620 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Excusal_SkipMainContent.feature @@ -0,0 +1,225 @@ +Feature: Regression English_1st_Excusal_SkipMainContent + +@Regression @JDB-3357 @JDB-3653 +Scenario Outline: English 1st Excusal Skip to Main Content Check + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Skip to main content" on the page + When I click on the "Skip to main content" link + Then I see "Reply to a jury summons" on the page + + #JDB-3357 Skip to main content check + + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you replying for yourself or for someone else?" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "eligible for jury service" on the page + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Since you turned 13, has your main address" on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you currently on bail" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Have you been found guilty of a criminal offence" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your start date" on the page + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Why do you need to be excused from jury service?" on the page + + When I set text area with "id" of "excusalReason" to "Excusal Reason" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + + Then I see "Will you need help when you're at the court?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "You have completed your reply" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |641500366 |415170401 |DOE |SW1H 9AJ |e@eeee.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_MH.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_MH.feature new file mode 100644 index 00000000..c75e72d5 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_MH.feature @@ -0,0 +1,484 @@ +Feature: Regression English_1st_MH + +@Regression @JDB-3441 @JDB-4552 +Scenario Outline: Checking the word Act in Mental Health Act is capitalised + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check Name + + When I set the radio button to "No" + And I press the "Continue" button + Then I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + Then I see "Enter your first name" on the page + Then I see "Enter your last name" on the page + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I click on the "Back" link + Then I see "FirstNamea" on the page + And I see "LastNameb" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Is this your address?" on the page + + #Check Address + + When I set the radio button to "No" + And I press the "Continue" button + Then I set "Address line 1" to "" + And I set "Town or city" to "" + And I set "County (optional)" to "" + And I set "Postcode" to "" + And I press the "Continue" button + + Then I see "Provide the town or city you live in" on the page + Then I see "Enter your postcode" on the page + When I set "Address line 1" to "123 Street" + And I set "Town or city" to "London" + And I set "County (optional)" to "County" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + When I click on the "Back" link + Then I see "123 Street" on the page + And I see "London" on the page + And I see "CH1 2AN" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I press the "Continue" button + Then I see "Enter your main phone number" on the page + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + When I click on the "Back" link + Then I see "What is your phone number?" on the page + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email + + When I press the "Continue" button + Then I see "Enter your email address" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + When I click on the "Back" link + Then I see "What is your email address?" on the page + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + When I click on the "Back" link + Then I see "What is your date of birth?" on the page + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I press the "Continue" button + Then I see "Select yes if your main address has been in the UK, Channel Islands or Isle of Man for any period of at least 5 years, since you turned 13" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Provide details about where you have lived since your 13th birthday" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + When I click on the "Back" link + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I click on the "Back" link + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I press the "Continue" button + Then I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Have you been found guilty of a criminal offence?" on the page + + #JDB-4552 + + When I click on the "Guidance on jury service if you have a conviction" link + + And on the page I see + |text| + |When you can do jury service| + |You can do jury service if you've:| + |had a speeding fine| + |had points on your driving license| + |been told to attend a speed awareness course| + |This applies as long as you did not receive any of the sentences below.| + |When you cannot do jury service| + |You cannot do jury service if you've ever had one of the criminal sentences below in the UK, Channel Islands or Isle of Man.| + |You also cannot do jury service if you've had one of these criminal sentences for a service offence under the Armed Forces Act 2006 anywhere in the world:| + |imprisonment or detention for 5 years or more| + |imprisonment for public protection or detention for public protection| + |imprisonment, custody or detention for life| + |an extended sentence under either of sections 226A, 226B, 227 or 228 of the Criminal Justice Act 2003, (including such a sentence imposed as a result of section 219A, 220, 221A or 222 of the Armed Forces Act 2006) or section 210A of the Criminal Procedure (Scotland) Act 1995| + |detention at His Majesty's pleasure or during the pleasure of the Secretary of State| + |You also cannot do jury service if you've had one of these criminal sentences in the last 10 years:| + |you served any part of a sentence of imprisonment or detention| + |you received a suspended sentence of imprisonment or a suspended order for detention| + |You also cannot do jury service if, in the last 10 years in England and Wales, you've had a community order, including any of the following:| + |community rehabilitation order| + |community punishment order| + |community punishment and rehabilitation order| + |drug treatment and testing order| + |drug abstinence order| + |You also cannot do jury service if, in the last 10 years, you've had:| + |any similar order under the law of Scotland, Northern Ireland, Isle of Man or any of the Channel Islands| + |a community or overseas community order under the Armed Forces Act 2006| + |If you serve on a jury when you know you should not because of a criminal conviction, you may be fined up to £5,000.| + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + Then I see "Select yes if you're being detained, looked after or treated under the Mental Health Act" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide details about how you're being detained, looked after or treated under the Mental Health Act" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I click on the "Back" link + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + + #Mental Health part 2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + + When I click on the "Need help answering this?" link + Then on the page I see + |text| + |If someone lacks mental capacity, they cannot:| + |make their own decisions| + |understand and retain information| + |communicate thoughts and decisions to others| + |Some people are medically certified under the Mental Capacity Act as lacking in mental capacity because of an accident or injury.| + |Someone else may then need to be appointed to make decisions on their behalf.| + |If a person lacks mental capacity, they cannot do jury service.| + + When I press the "Continue" button + Then I see "Select yes if it's been decided that you 'lack mental capacity'" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Provide brief details about why it was decided you lack mental capacity" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I see "Has it been decided that you 'lack mental capacity'?" on the page + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I see "You may be convicted and fined up to £1000 if you give false information to evade jury service. This also applies if you fail to give us the information we need to decide if you’re eligible to do jury service." on the page + + And I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + + And I see "You answered the eligibility questions" on the page + And I see "No" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see "No" in the same row as "Has it been decided that you 'lack mental capacity'?" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |741500745 |LNAMESEVENFOURFIVE |CH1 2AN |email@outlook.com |415181001 | + +@Regression @replytypes @JDB-3584 @JDB-3704 +Scenario Outline: Checking MH questions have been split in Bureau and no text MENTAL HEALTH Q2 is visible + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then on the page I see + | text | + | Is this your address? | + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I press the "Continue" button + Then on the page I see + |text | + |There is a problem| + |Enter your main phone number| + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + When I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Enter your email address | + + When I set "Enter your email address" to "test@gmail.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address again" to "test@gmail.com" + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And on the page I see + |text| + |Are you being detained, looked after or treated under the Mental Health Act?| + |Only select yes if, under the Mental Health Act 1983, you're:| + |being detained (sectioned) or liable to be detained| + |resident in a hospital due to a mental disorder| + |subject to a guardianship or community treatment order| + |Need help answering this?| + + And I click on the "Need help answering this?" link + And on the page I see + |text| + |You cannot be on a jury if any of these statements apply to you.| + |If you have mental health issues (including depression and anxiety) but you’re not being detained, looked after or treated under the Mental Health Act, you can still be on a jury.| + |(If you feel you cannot complete jury service because of significant mental health issues, you can still ask to be excused or change your dates.)| + + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set "Provide details" to "I am sectioned" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And on the page I see + |text| + |Has it been decided that you 'lack mental capacity'?| + |This means, legally, you cannot make decisions for yourself.| + + And I click on the "Need help answering this?" link + And on the page I see + |text| + |If someone lacks mental capacity, they cannot:| + |make their own decisions| + |understand and retain information| + |communicate thoughts and decisions to others| + |Some people are medically certified under the Mental Capacity Act as lacking in mental capacity because of an accident or injury.| + |Someone else may then need to be appointed to make decisions on their behalf.| + |If a person lacks mental capacity, they cannot do jury service.| + + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "I lack capacity" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + And I see text "Yes" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see text "Yes" in the same row as "Has it been decided that you 'lack mental capacity'?" + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + + And I see "You answered the eligibility questions" on the page + And I see "Yes" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see "Yes" in the same row as "Has it been decided that you 'lack mental capacity'?" + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I see "I am sectioned" on the page + And I see "I lack capacity" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |641500679 |LNAMESIXSEVENNINE|CH1 2AN |a@eeee.com |415170601 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Overage_SkipMainContent.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Overage_SkipMainContent.feature new file mode 100644 index 00000000..8a5fc2bf --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Overage_SkipMainContent.feature @@ -0,0 +1,177 @@ +Feature: Regression English_1st_Overage_SkipMainContent + +@Regression @replytypes @JDB-3357 @JDB-3985 +Scenario Outline: English 1st Overage Skip to Main Content Check + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Skip to main content" on the page + When I click on the "Skip to main content" link + Then I see "Reply to a jury summons" on the page + + #JDB-3357 Skip to main content check + + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you replying for yourself or for someone else?" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1937" + And I press the "Continue" button + + #JDB-3357 Skip to main content check and JDB-3985 + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + And I see "steps/your-details/confirm" in the URL + Then I see "Confirm your date of birth" on the page + + Then I set the radio button to "No" + And I press the "Continue" button + + And I set "Year" to "1950" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + When I click on the "Back" link + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1937" + And I press the "Continue" button + Then I see "Confirm your date of birth" on the page + + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Tell us if your date of birth is correct" on the page + + Then I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Check your answers now" on the page + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Date of birth" + And I set "Year" to "1937" + And I press the "Continue" button + And I see "Confirm your date of birth" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + And I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "You have completed your reply" on the page + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + Then I see "<part_no>" has reply type indicator "COMPLETED" + + +Examples: + |part_no |pool_no |last_name |postcode |email | + |641500417 |415170401 |DOE |SW1H 9AJ |e@eeee.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_RA.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_RA.feature new file mode 100644 index 00000000..7b454198 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_RA.feature @@ -0,0 +1,597 @@ +Feature: Regression English_1st_RA + +@Regression @JDB-3608 +Scenario Outline: English 1st Party RA + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "4 mondays time" + And "<part_no>" has "NEXT_DATE" as "4 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #bail + + Then I see "Are you currently on bail" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #crim offence + + Then I see "Have you been found guilty of a criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #confirm date + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in Court + #3608 + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Select if you have limited mobility, a hearing impairment, diabetes, a severe sight impairment or other disability or impairment" on the page + Then I check the "Diabetes" checkbox + And I press the "Continue" button + + #Check Answers + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + +Examples: + | part_no |pool_no |last_name |postcode | email | + |641500991 |415170601 |LNAMENINENINEONE |CH1 2AN |e@eeee.com| + +@RegressionSingle @JDB-3132 +Scenario Outline: Reasonable adjustments (DIABETES) to automatically update Juror db + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no | pool_no | owner | + |<part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #bail + + Then I see "Are you currently on bail" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #crim offence + + Then I see "Have you been found guilty of a criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #confirm date + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in Court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I see "Tell us about any special arrangements or help you need while you're doing jury service." on the page + Then I set "Tell us about any special arrangements or help you need while you're doing jury service." to "Special Need is DIABETES" + And I press the "Continue" button + + #Check Answers + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + #process response + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #check db + + And I see "644200859" on the page + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR" . "POOL" I see "SPEC_NEED" is "I" where "PART_NO" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |644200859 |442170401 |LNAMENINENINEONE |CH1 2AN |e@eeee.com | + +@Regression @JDB-3132 +Scenario Outline: Reasonable adjustments (OTHER) to automatically update Juror db + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no | pool_no | owner | + |<part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #bail + + Then I see "Are you currently on bail" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #crim offence + + Then I see "Have you been found guilty of a criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #confirm date + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in Court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + Then I check the "Other" checkbox + Then I set "Provide details" to "Some further details" + Then I see "Tell us about any special arrangements or help you need while you're doing jury service." on the page + Then I set "Tell us about any special arrangements or help you need while you're doing jury service." to "Special Need is OTHER" + And I press the "Continue" button + + #Check Answers + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + + Given I am on "Bureau" "juror-test-02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + #process response + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #check db + + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR" . "POOL" I see "SPEC_NEED" is "O" where "PART_NO" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645700100 |457170401 |LNAMENINENINEONE |CH1 2AN |e@eeee.com | + +@Regression @JDB-3132 +Scenario Outline: Reasonable adjustments (MULTIPLE) to automatically update Juror db + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no | pool_no | owner | + |<part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #bail + + Then I see "Are you currently on bail" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #crim offence + + Then I see "Have you been found guilty of a criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #confirm date + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in Court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + Then I check the "Other" checkbox + Then I set "Provide details" to "Some further details" + Then I check the "Limited mobility" checkbox + Then I set "Tell us about any special arrangements or help you need while you're doing jury service" to "Special Need is OTHER and LIMITED MOBILITY" + And I press the "Continue" button + + #Check Answers + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + #process response + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #check db + + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR" . "POOL" I see "SPEC_NEED" is "M" where "PART_NO" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |644200911 |442170401 |LNAMENINENINEONE |CH1 2AN |e@eeee.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_ScreenOnly.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_ScreenOnly.feature new file mode 100644 index 00000000..8eada190 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_ScreenOnly.feature @@ -0,0 +1,110 @@ + Feature: English_1st_ScreenOnly + +@Regression @JDB-3349 @JDB-3350 @JDB-3358 @JDB-3359 @JDB-3360 @JDB-3361 @JDB-3362 @JDB-3373 @JDB-3378 @JDB-3363 @JDB-3364 @JDB-3371 @JDB-3377 +@JDB-3370 @JDB-3376 @JDB-3355 @JDB-3372 @JDB-3418 +Scenario Outline: English 1st Screen Only + Given I am on "Public" "juror-test02" + Then the page title is "Reply to a jury summons - GOV.UK" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #JDB-3358 + + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + + Then on the page I see + | text | + | Enter your first name | + | Enter your last name | + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #JDB-3359 and JDB-3355 + + Then on the page I see + | text | + | Your details | + | Is this your address? | + + And I set the radio button to "Yes" + And I press the "Continue" button + + #JDB-3361 + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I click on the "Why do we need your email address?" link + Then I see "We'll use your email address to send you information and reminders about your jury service." on the page + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #JDB-3350 and JDB-3360 + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I press the "Continue" button + Then on the page I see + | text | + | There is a problem | + | Enter the day you were born | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + When I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + +Examples: + | part_no |last_name |postcode |email | pool_no | + |841501663 |LNAMEEIGHTFOUR |CH1 2AN |a@eeee.com |415181001| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_SkipMainContent.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_SkipMainContent.feature new file mode 100644 index 00000000..405f9e5a --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_SkipMainContent.feature @@ -0,0 +1,235 @@ +Feature: English_1st_SkipMainContent + +@Regression @Regression_Juror @JDB-3357 @JDB-3516 +Scenario Outline: English 1st Party Straight Through with Skip to Main Content Checks + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Skip to main content" on the page + And I do not see any links on the page that open to a new page without an alt text + When I click on the "Skip to main content" link + Then I see "Reply to a jury summons" on the page + + #JDB-3357 Skip to main content check + + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you replying for yourself or for someone else?" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Since you turned 13," on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you currently on bail" on the page + + When I set the radio button to "No" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Have you been found guilty of a criminal offence" on the page + + When I set the radio button to "No" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your start date" on the page + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Will you need help when you're at the court?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "You have completed your reply" on the page + And I do not see any links on the page that open to a new page without an alt text + +Examples: + | part_no |pool_no |last_name |postcode | email | + |841501081 |415181001 |LNAME1081 |CH1 2AN |e@eeee.com| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_StraightThrough.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_StraightThrough.feature new file mode 100644 index 00000000..a1fc4b59 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_StraightThrough.feature @@ -0,0 +1,1325 @@ +Feature: Regression English_1st_StraightThrough + +@Regression @replytypes +Scenario Outline: English 1st Party Straight Through + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + + And I set the radio button to "I am replying for myself" + And I see "You can still ask a family member or a person you trust to help you understand or reply." on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I see "Accessibility statement" on the page + And I click on the "What if I need help replying?" link + And I see "You can ask a family member, friend or carer to help you. They can reply for you or help you to do it yourself. You may be able to get help with using a computer at your local library. If you need more help, call 0300 456 1024." on the page + + And I press the "Continue" button + And I see "steps/login" in the URL + And I see "Your juror details" on the page + And I see "You can find your juror number on your jury summons letter." on the page + And I click on the "I do not have a juror number" link + Then I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number, please contact:" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Is the name we have for you correct? | + + And I see "steps/your-details/name" in the URL + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + Then on the page I see + | text | + | Is this your address? | + + And I see "steps/your-details/address" in the URL + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I set the radio button to "Yes" + + When I press the "Continue" button + + Then on the page I see + | text | + |Your details| + |What is your phone number?| + |Please provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday.| + |Main phone| + |Another phone (optional)| + + And I see "steps/your-details/phone" in the URL + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I press the "Continue" button + Then on the page I see + |text | + |There is a problem| + |Enter your main phone number| + + When I set "Main phone" to "02078211818" + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your email address? | + | Enter your email address | + | Enter your email address again | + + And I see "steps/your-details/email" in the URL + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I press the "Continue" button + Then on the page I see + | text | + | Your details | + | Enter your email address | + + When I set "Enter your email address" to "e@mail.com" + And I press the "Continue" button + Then I see "Enter your email address and check that it matches the one in the first field" on the page + When I set "Enter your email address again" to "e@mail.com" + And I click on the "Why do we need your email address?" link + And I see "We'll use your email address to send you information and reminders about your jury service." on the page + And I press the "Continue" button + + Then on the page I see + | text | + | Your details | + | What is your date of birth? | + | For example, 15 03 1982 | + | Help with date of birth | + + And I see "steps/your-details/date-of-birth" in the URL + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + And I see "steps/qualify" in the URL + Then I see "Confirm you're eligible for jury service" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Your answers in this next section will help us check if you can do jury service or not." on the page + And I see "You must answer these questions even if you:" on the page + And I see "think you’re not eligible" on the page + And I see "want to be excused" on the page + And I see "You can ask for an excusal after this section, if needed." on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + And I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I see "steps/qualify/residency" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Need help answering this?" link + And I see "You must contact us to get advice on your specific situation." on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I see "steps/qualify/cjs-employed" in the URL + And I do not see "Beta" on the page + When I see "Eligibility" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I set the radio button to "No" + And I click on the "Why do we ask this?" link + And I click on the "Back" link + And I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And the radio button "Yes" is "Selected" + And I press the "Continue" button + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I see "steps/qualify/bail" in the URL + And I see "Are you currently on bail for a criminal offence?" on the page + And I see "If you're on bail in criminal proceedings, you cannot do jury service." on the page + And I do not see "Qualifying for jury service" on the page + And I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + And I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And the radio button "No" is "Selected" + And I press the "Continue" button + Then I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + And I see "steps/qualify/convictions" in the URL + And I see "Have you been found guilty of a criminal offence?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + And I see "Are you currently on bail for a criminal offence?" on the page + And the radio button "No" is "Selected" + And I press the "Continue" button + And I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I see "steps/qualify/mental-health-sectioned" in the URL + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + And I see "Have you been found guilty of a criminal offence?" on the page + And the radio button "No" is "Selected" + And I press the "Continue" button + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I see "steps/qualify/mental-health-capacity" in the URL + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And the radio button "No" is "Selected" + And I press the "Continue" button + And I see "Has it been decided that you 'lack mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your start date" on the page + And I do not see "Eligibility" on the page + + #I can attend + + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I see "10:00am" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + Then I see "Check your start date" on the page + And the radio button "Yes, I can start on" is "Selected" + And I press the "Continue" button + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + And I see "You answered the eligibility questions" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I see text "No" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see text "No" in the same row as "Has it been decided that you 'lack mental capacity'?" + And I see "I understand that the answers I have given may be checked and that I may be prosecuted if I have given false information on purpose." on the page + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions" on the page + + Given I am on "Bureau" "bau_test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + Then I see "<part_no>" has reply type indicator "COMPLETED" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + + +@Regression +Scenario Outline: English 1st Party Straight Through Change Links + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + + And I press the "Continue" button + + And I set the radio button to "Yes" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + Then I see "Confirm you're eligible for jury service" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Your answers in this next section will help us check if you can do jury service or not." on the page + And I see "You must answer these questions even if you:" on the page + And I see "think you’re not eligible" on the page + And I see "want to be excused" on the page + And I see "You can ask for an excusal after this section, if needed." on the page + + When I press the "Continue" button + + #Residency + + And I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I see "steps/qualify/residency" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I see "steps/qualify/cjs-employed" in the URL + When I see "Eligibility" on the page + And I do not see "Qualifying for jury service" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I see "steps/qualify/bail" in the URL + And I see "Are you currently on bail for a criminal offence?" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Eligibility" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + And I see "steps/qualify/convictions" in the URL + And I see "Have you been found guilty of a criminal offence?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I see "steps/qualify/mental-health-sectioned" in the URL + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I see "steps/qualify/mental-health-capacity" in the URL + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I do not see "Eligibility" on the page + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + And I see "You answered the eligibility questions" on the page + + #change links + + When I click on the "Change" link in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I set "Provide details" to "Residency information" + And I press the "Continue" button + Then I see text "No - Residency information" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + + When I click on the "Change" link in the same row as "Have you worked in the criminal justice system in the last 5 years?" + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police" + And I press the "Continue" button + Then I see text "London Met Police" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + When I click on the "Change" link in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "I am sectioned and detained" + And I press the "Continue" button + Then I see text "Yes - I am sectioned and detained" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + + When I click on the "Change" link in the same row as "Has it been decided that you 'lack mental capacity'?" + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "I lack capacity" + And I press the "Continue" button + Then I see text "Yes - I lack capacity" in the same row as "Has it been decided that you 'lack mental capacity'?" + + When I click on the "Change" link in the same row as "Are you currently on bail for a criminal offence?" + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "I am on bail for crimes" + And I press the "Continue" button + Then I see text "Yes - I am on bail for crimes" in the same row as "Are you currently on bail for a criminal offence?" + + When I click on the "Change" link in the same row as "Have you been convicted of a criminal offence and been given a sentence?" + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "I am a convicted criminal" + And I press the "Continue" button + Then I see text "Yes - I am a convicted criminal" in the same row as "Have you been convicted of a criminal offence and been given a sentence?" + + #submit + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions" on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |641500216 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |415170601 | + +@Regression +Scenario Outline: English 1st Party Straight Through Navigate Back + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + + And I press the "Continue" button + + And I set the radio button to "Yes" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + Then I see "Confirm you're eligible for jury service" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Your answers in this next section will help us check if you can do jury service or not." on the page + And I see "You must answer these questions even if you:" on the page + And I see "think you’re not eligible" on the page + And I see "want to be excused" on the page + And I see "You can ask for an excusal after this section, if needed." on the page + + When I press the "Continue" button + + #Residency + + And I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I see "steps/qualify/residency" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I see "steps/qualify/cjs-employed" in the URL + When I see "Eligibility" on the page + And I do not see "Qualifying for jury service" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I see "steps/qualify/bail" in the URL + And I see "Are you currently on bail for a criminal offence?" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Eligibility" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + And I see "steps/qualify/convictions" in the URL + And I see "Have you been found guilty of a criminal offence?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I see "steps/qualify/mental-health-sectioned" in the URL + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I see "steps/qualify/mental-health-capacity" in the URL + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #navigate back + + And I click on the "Back" link + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Have you been found guilty of a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Are you currently on bail for a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And the radio button "Yes" is "Selected" + + #navigate forward + + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Are you currently on bail for a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And the radio button "No" is "Selected" + + + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I do not see "Eligibility" on the page + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + + When I set the radio button to "No" + + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + And I see "You answered the eligibility questions" on the page + + #submit + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions" on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |644200078 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |442170501 | + + + @Regression @PCQ + Scenario Outline: English 1st Party PCQ - decline to answer + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + And I set the radio button to "Yes" + When I press the "Continue" button + + #phone + When I set "Main phone" to "02078211818" + When I press the "Continue" button + + #email + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + When I press the "Continue" button + + #Residency + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + When I set the radio button to "No" + Given PCQs has been enabled + And I press the "Continue" button + Given PCQs has been disabled + + #PCQ + Then on the page I see + | text | + | Equality and diversity questions | + | These are optional questions about you | + | Your answers won't affect your Jury Summons Reply | + | Your answers will help us check we are treating people fairly and equally | + | Find out how we use this information in our privacy policy | + + #Decline to answer + Then I press the "I don" button + + #Check your answers + Then I see "Check your answers" on the page + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + + @Regression @PCQ + Scenario Outline: English 1st Party PCQ - answer questions + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + And I set the radio button to "Yes" + When I press the "Continue" button + + #phone + + When I set "Main phone" to "02078211818" + When I press the "Continue" button + + #email + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + When I press the "Continue" button + + #Residency + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + When I set the radio button to "No" + Given PCQs has been enabled + And I press the "Continue" button + Given PCQs has been disabled + + #PCQ + Then on the page I see + |text| + |Equality and diversity questions| + |These are optional questions about you| + |Your answers won't affect your Jury Summons Reply| + |Your answers will help us check we are treating people fairly and equally| + |Find out how we use this information in our privacy policy| + + Then I press the "Continue to the questions" button + + Then I see "What is your main language?" on the page + And I press the "Continue" button + + Then I see "What is your sex?" on the page + And I press the "Continue" button + + Then I see "Is your gender the same as the sex you were registered at birth?" on the page + And I press the "Continue" button + + Then I see "Which of the following best describes how you think of yourself?" on the page + And I press the "Continue" button + + Then I see "Are you married or in a legally registered civil partnership?" on the page + And I press the "Continue" button + + Then I see "What is your ethnic group?" on the page + And I press the "Continue" button + + Then I see "What is your religion?" on the page + And I press the "Continue" button + + Then I see "Do you have any physical or mental health conditions or illnesses lasting or expected to last 12 months or more?" on the page + And I press the "Continue" button + + Then I see "Are you pregnant or have you been pregnant in the last year?" on the page + And I press the "Continue" button + + Then I see "You have answered the equality questions" on the page + And I see "The next steps are to check your Jury Summons Reply details." on the page + And I press the "Continue to the next steps" button + + Then I see "Check your answers" on the page + + When I click on the "Change" link in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your Jury Service?" + Then I set the radio button to "No" + And I press the "Continue" button + + #do not see pcqs again + Then I see "Check your answers" on the page + + #Check your answers + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + + @Regression @PCQ + Scenario Outline: English 1st Party PCQ - cancel out of questions + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + And I set the radio button to "Yes" + When I press the "Continue" button + + #phone + + When I set "Main phone" to "02078211818" + When I press the "Continue" button + + #email + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + When I press the "Continue" button + + #Residency + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + When I set the radio button to "No" + Given PCQs has been enabled + And I press the "Continue" button + Given PCQs has been disabled + + #PCQ + Then on the page I see + |text| + |Equality and diversity questions| + |These are optional questions about you| + |Your answers won't affect your Jury Summons Reply| + |Your answers will help us check we are treating people fairly and equally| + |Find out how we use this information in our privacy policy| + + Then I press the "Continue to the questions" button + + Then I see "What is your main language?" on the page + + Then I click on the "Back" link + + Then I see "Equality and diversity questions" on the page + + Then I press the "I don" button + + #Check your answers + Then I see "Check your answers" on the page + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + + @Regression @PCQ + Scenario Outline: English 3rd Party PCQ - questions do not appear + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Given auto straight through processing has been enabled + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + And I set "First name" to "FirstNameB" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why Replying + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "2000" + And I press the "Continue" button + + #Contacting the juror + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + When I press the "Continue" button + + #Residency + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + And I set the radio button to "No" + And I press the "Continue" button + + #The person can attend + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + When I set the radio button to "No" + Given PCQs has been enabled + And I press the "Continue" button + Given PCQs has been disabled + + #Check your answers + Then I see "Check your answers now" on the page + And I see "steps/confirm-information/tp" in the URL + And I see "You answered the eligibility questions for the person you're replying for" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #When I press the "Submit" button + And I see "steps/confirmation/tp" in the URL + And I see "Give feedback (opens in a new window or tab)" on the page + Then I see "We have sent an email to say you have replied to this jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |645200349 |LNAMETHREEFOURNINE |SY2 6LU |a@eeee.com |452170401 | + + @Regression @PCQ + Scenario Outline: Welsh 1st Party PCQ - answer questions + Given I am on the welsh version of "Public" "test" + Given auto straight through processing has been enabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + #Login + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #Check Your Name + And I set the radio button to "Ydy" + And I press the "Parhau" button + + #Check Your Address + And I set the radio button to "Ie" + When I press the "Parhau" button + + #Phone + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + + #Email + And I set "Nodwch eich cyfeiriad e-bost" to "<email>" + And I set "Nodwch eich cyfeiriad e-bost eto" to "<email>" + And I press the "Parhau" button + + #DoB + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Qualify for jury service + When I press the "Parhau" button + + #Residency + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Convictions + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental Health Sectioned + And I set the radio button to "Na" + And I press the "Parhau" button + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + + #Mental Health Capacity + And I set the radio button to "Na" + And I press the "Parhau" button + + #Confirm attendance + When I set the radio button to "n gallu dechrau" + And I press the "Parhau" button + + #RA + When I set the radio button to "Nac oes" + Given PCQs has been enabled + And I press the "Parhau" button + Given PCQs has been disabled + + #PCQ + Then on the page I see + |text| + |Cwestiynau am Gydraddoldeb ac Amrywiaeth| + |Cwestiynau dewisol amdanoch chi yw’r rhain| + |Ni fydd eich atebion yn effeithio ar eich Ymateb i’r Wŷs Reithgor| + |Bydd eich atebion yn ein helpu i wneud yn siŵr ein bod yn trin pobl yn deg ac yn gyfartal| + |Gallwch ddarganfod sut rydym yn defnyddio’r wybodaeth hon yn ein polisi preifatrwydd.| + + Then I press the "Ymlaen i" button + + Then I see "Beth yw eich iaith gyntaf?" on the page + And I press the "Parhau" button + + Then I see "Beth yw eich rhyw?" on the page + And I press the "Parhau" button + + Then I see "A yw eich rhywedd yr un fath â’r rhyw pan gawsoch eich geni?" on the page + And I press the "Parhau" button + + Then I see "Pa un o'r canlynol sy'n disgrifio orau sut yr ydych yn meddwl amdanoch chi’ch hun?" on the page + And I press the "Parhau" button + + Then I see "Ydych chi wedi priodi/mewn partneriaeth sifil a gofrestrwyd yn gyfreithiol?" on the page + And I press the "Parhau" button + + Then I see "Beth yw eich grŵp ethnig?" on the page + And I press the "Parhau" button + + Then I see "Beth yw eich crefydd?" on the page + And I press the "Parhau" button + + Then I see "A oes gennych unrhyw gyflwr neu salwch corfforol neu iechyd meddwl sydd wedi para neu sy’n debygol o bara 12 mis neu fwy?" on the page + And I press the "Parhau" button + + Then I see "A ydych chi’n feichiog neu wedi rhoi genedigaeth yn y flwyddyn ddiwethaf?" on the page + And I press the "Parhau" button + + Then I see "Rydych wedi ateb y cwestiynau am gydraddoldeb" on the page + And I see "Y cam nesaf yw gwirio manylion eich Ymateb i’r Wŷs Reithgor." on the page + + And I press the "Symud ymlaen" button + + #Check your answers + And I see "Gwiriwch eich ymatebion nawr" on the page + + #submit + And I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + + Then I see "O leiaf 2 wythnos cyn ichi ddechrau gwasanaethu ar reithgor, byddwn yn anfon y canlynol atoch:" on the page + Then I do not see "Yna, o leiaf pythefnos cyn i’r gwasanaeth rheithgor ddechrau byddwn yn anfon y dogfennau canlynol atoch:" on the page + Then I see "Gallwch wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eich bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML (15KB)" on the page + Then I click on the "HTML (15KB)" link + And I see "Mi wnaethoch ateb y cwestiynau cymhwysedd" on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |841501049 |LastNameB |CH1 2AN |e@mail.com |415181001 | diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Underage.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Underage.feature new file mode 100644 index 00000000..1ba4b4cc --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_1st_Underage.feature @@ -0,0 +1,353 @@ +Feature: Regression English_1st_Underage + +@Regression @replytypes @JDB-3072 @JDB-3454 @JDB-3411 @1st_Underage @JDB-3888 @JDB-3790 @JDB-4097 @JDB-4502 +Scenario Outline: English 1st Party Underage + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Moving past Name Section + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #On DoB Screen + + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "2006" + + #Moving past DoB Section + + And I press the "Continue" button + Then I see "Is your date of birth correct?" on the page + + #And "Is your date of birth correct?" text is bold + + And I see "steps/your-details/confirm" in the URL + + #new change DOB + + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Tell us if your date of birth is correct" on the page + + Then I set the radio button to "No" + And I press the "Continue" button + + #On DoB Screen + + Then I see "What is your date of birth?" on the page + + When I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "" + When I press the "Continue" button + Then I see "There is a problem" on the page + + #JDB-4502 + + And I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + + #only day is set + + When I set "Day" to "27" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the month you were born" on the page + + #day and month are set + + And I set "Month" to "04" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the year you were born" on the page + + #only year is set + + When I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "1988" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the day you were born" on the page + And I do not see "Enter the month you were born" on the page + And I do not see "Enter the year you were born" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "198a" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the year you were born as a 4 digit number. For example, 1982" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "2006" + + And I press the "Continue" button + + #confirm DOB + + Then I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + And I see text "27 April 2006" in the same row as "Date of birth" + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + Then I see "<part_no>" has reply type indicator "COMPLETED" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |741500550 |LNAMEFIVEFIVEZERO |CH1 2AN |a@eeee.com |415181001 | + +@Regression +Scenario Outline: English 1st Party Underage with Error Check + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Moving past Name Section + + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #On DoB Screen + + Then I see "What is your date of birth?" on the page + + #set dob to make them underage + And I set the date of birth to a Monday "-884" weeks in the future + + #Moving past DoB Section and JDB-3417 + + And I press the "Continue" button + Then I see "Is your date of birth correct?" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I click on the "Change" link in the same row as "Date of birth" + + #set dob to make them underage + And I set the date of birth to a Monday "-884" weeks in the future + + And I press the "Continue" button + + Then I see "Is your date of birth correct?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "" + And I press the "Continue" button + Then on the page I see + | text | + | There is a problem| + | Enter the day you were born | + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "198a" + And I press the "Continue" button + Then I see "Enter the year you were born as a 4 digit number. For example, 1982" on the page + + #set dob to make them underage + And I set the date of birth to a Monday "-884" weeks in the future + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + And I see "Your age means you cannot do jury service" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |pool_no | + |841500403 |LNAME403 |CH1 2AN |415181001 | + +@Regression +Scenario Outline: English 1st Party Underage with Back Check + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Moving past Name Section + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #On DoB Screen + + Then I see "What is your date of birth?" on the page + + #set dob to make them underage + And I set the date of birth to a Monday "-884" weeks in the future + + #Moving past DoB Section + + And I press the "Continue" button + Then I see "Is your date of birth correct?" on the page + + And on the page I see + | text | + | Confirm your date of birth | + | You said your date of birth was | + | This makes you | + | years old. | + | Is your date of birth correct? | + + When I click on the "Back" link + And I set the date of birth to a Monday "-884" weeks in the future + And I press the "Continue" button + + Then I see "Is your date of birth correct?" on the page + + And I set the radio button to "No" + Then I press the "Continue" button + + And I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "" + And I press the "Continue" button + Then on the page I see + | text | + | There is a problem| + | Enter the day you were born | + + And I set the date of birth to a Monday "-884" weeks in the future + And I press the "Continue" button + + And I set the radio button to "Yes" + Then I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + And I see "Your age means you cannot do jury service" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |pool_no | + |641500141 |LNAMEONEFOURONE |CH1 2AN |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deceased.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deceased.feature new file mode 100644 index 00000000..061db24f --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deceased.feature @@ -0,0 +1,91 @@ +Feature: Regression English_3rd_Deceased + +#TO DO: WELSH 3rd DECEASED + +@Regression @replytypes @JDB-3666 @JDB-3983 +Scenario Outline: English 3rd Deceased + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Login + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I set "First name" to "FirstName" + And I set "Last name" to "LastName" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to Juror + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "02078211818" + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why Are You Replying + + When I set the radio button to "The person has died" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check Your Answers Now + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + Then I see "You have completed your reply" on the page + And I see "We have sent an email to say you have replied to this jury summons." on the page + And I see "Download a copy of your summons reply" on the page + And I see "You do not need to do anything else" on the page + And I see "Jurors are selected at random from the electoral roll. This is not always completely up to date. That's why we sent a jury summons to this person. We do apologise for this and hope it has not caused too much distress." on the page + + Given I am on "Bureau" "juror-test02" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + Then I see "<part_no>" has reply type indicator "COMPLETED" + +Examples: + |part_no |pool_no |last_name |postcode |email | + |641500046 |415170401 |DOE |SW1H 9AJ |e@eeee.com| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deceased_SkipMainContent.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deceased_SkipMainContent.feature new file mode 100644 index 00000000..4d423599 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deceased_SkipMainContent.feature @@ -0,0 +1,128 @@ +Feature: Regression English_3rd_Deceased_SkipMainContent + +#TO DO: WELSH 3rd DECEASED + +@Regression @JDB-3357 +Scenario Outline: English 3rd Deceased Skip to Main Content Check + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Skip to main content" on the page + When I click on the "Skip to main content" link + Then I see "Reply to a jury summons" on the page + + #JDB-3357 Skip to main content check + + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Are you replying for yourself or for someone else?" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "What is your name?" on the page + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Enter your first name" on the page + + When I set "First name" to "FirstName" + And I set "Last name" to "LastName" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Your relationship to the person" on the page + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Your contact information" on the page + + When I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "02078211818" + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Why are you replying for the other person?" on the page + + When I set the radio button to "The person has died" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "Check your answers now" on the page + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + + When I press the "Submit" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then I click on the "Skip to main content" link + Then I see "You have" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |641500401 |415170401 |DOE |SW1H 9AJ |e@eeee.com | diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deferral.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deferral.feature new file mode 100644 index 00000000..43a3a1d5 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Deferral.feature @@ -0,0 +1,1989 @@ +Feature: Regression English_3rd_Deferral + +@Regression @replytypes +Scenario Outline: English 3rd Party Deferral + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Fr" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + Then I see "Tell us why they need another date for their jury service" on the page + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + Then I see "Choose 3 Mondays when they can start jury service" on the page + + #check hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "They may be asked to serve for longer when they arrive at court." on the page + And I see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I see "You or they must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "They may be asked to serve for longer when they arrive at court." on the page + And I do not see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I do not see "You or they must contact us at that time to let us know." on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + And on the page I see + |text| + |Check dates| + |Dates they can start jury service| + |First choice| + |Second choice| + |Third choice| + |You do not need to tell us all other dates they're available.| + |We'll choose one of these 3 dates.| + |In the unlikely event that we cannot use one of these dates, we'll contact you.| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + #check hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "They may be asked to serve for longer when they arrive at court." on the page + And I see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I see "You or they must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "They may be asked to serve for longer when they arrive at court." on the page + And I do not see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I do not see "You or they must contact us at that time to let us know." on the page + + Then I set the radio button to "Yes" + And I press the "Continue" button + + #help at court + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + And on the page I see + |text| + |Check your answers now| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then on the page I see + |text| + |You have completed your reply| + |If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them.| + |We have sent an email to say you have replied to this jury summons.| + |Download a copy of your summons reply| + |If they can do jury service, at least 2 weeks before it starts we'll send them:| + |a letter confirming the date of their jury service| + |an information pack about being a juror and the court they're going to| + |Getting ready for jury service| + |The information below is also in the email that we have sent.| + |You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch.| + |Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then I click on the "Download a copy of your summons reply HTML" link + And on the page I see + |text| + |Copy of your jury summons reply| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + And I see "Sign in" on the page + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500676 |LNAMESIXSEVENSIX |CH1 2AN |email@outlook.com |415170401 | + +@Regression +Scenario Outline: English 3rd Party Deferral - validation and errors + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Fr" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + + #check errors + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Select whether the person can start jury service on this date" on the page + + #check hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "They may be asked to serve for longer when they arrive at court." on the page + And I see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I see "You or they must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "They may be asked to serve for longer when they arrive at court." on the page + And I do not see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I do not see "You or they must contact us at that time to let us know." on the page + + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + Then I see "Tell us why they need another date for their jury service" on the page + + #deferral reason + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Enter their reason for needing another date for jury service" on the page + + When I set text area with "id" of "deferralReason" to "Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here " + And I see "You have 14 characters too many" on the page + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "The reason for asking for a later date for the person's jury service must be fewer characters" on the page + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + Then I see "Choose 3 Mondays when they can start jury service" on the page + + #check hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "They may be asked to serve for longer when they arrive at court." on the page + And I see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I see "You or they must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "They may be asked to serve for longer when they arrive at court." on the page + And I do not see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I do not see "You or they must contact us at that time to let us know." on the page + + And I press the "Continue" button + + Then on the page I see + |text| + |There is a problem| + |Enter the first Monday they'd prefer to start jury service| + |Enter the second Monday they'd prefer to start jury service| + |Enter the third Monday they'd prefer to start jury service| + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + And I press the "Continue" button + + When I click on the "Back" link + And I press the "Continue" button + + And on the page I see + |text| + |Check dates| + |Dates they can start jury service| + |First choice| + |Second choice| + |Third choice| + |You do not need to tell us all other dates they're available.| + |We'll choose one of these 3 dates.| + |In the unlikely event that we cannot use one of these dates, we'll contact you.| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + #check hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "They may be asked to serve for longer when they arrive at court." on the page + And I see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I see "You or they must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "They may be asked to serve for longer when they arrive at court." on the page + And I do not see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I do not see "You or they must contact us at that time to let us know." on the page + + And I press the "Continue" button + + Then on the page I see + |text| + |There is a problem| + |Select whether you want to proceed with these dates| + + Then I set the radio button to "Yes" + And I press the "Continue" button + + #help at court + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + + #check answers + + And on the page I see + |text| + |Check your answers now| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then on the page I see + |text| + |You have completed your reply| + |If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them.| + |We have sent an email to say you have replied to this jury summons.| + |Download a copy of your summons reply| + |If they can do jury service, at least 2 weeks before it starts we'll send them:| + |a letter confirming the date of their jury service| + |an information pack about being a juror and the court they're going to| + |Getting ready for jury service| + |The information below is also in the email that we have sent.| + |You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch.| + |Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then I click on the "Download a copy of your summons reply HTML" link + + And on the page I see + |text| + |Your jury summons details| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500676 |LNAMESIXSEVENSIX |CH1 2AN |email@outlook.com |415170401 | + +@RegressionSingle +Scenario Outline: English 3rd Party Deferral - Deferral Bank Holiday + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Fr" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + Then I see "Tell us why they need another date for their jury service" on the page + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + Then I see "Choose 3 Mondays when they can start jury service" on the page + + #set bank holidays + + And I create a bank holiday "9" Mondays in the future for court/bureau "400" new schema + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + And on the page I see + |text| + |Check dates| + |Dates they can start jury service| + |First choice| + |Second choice| + |Third choice| + |You do not need to tell us all other dates they're available.| + |We'll choose one of these 3 dates.| + |In the unlikely event that we cannot use one of these dates, we'll contact you.| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as their start date, their jury service will start on the Tuesday at the earliest.| + |We'll send confirmation of the start date.| + + And I press the "Continue" button + + #help at court + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + And on the page I see + |text| + |Check your answers now| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then on the page I see + |text| + |You have completed your reply| + |If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them.| + |We have sent an email to say you have replied to this jury summons.| + |Download a copy of your summons reply| + |If they can do jury service, at least 2 weeks before it starts we'll send them:| + |a letter confirming the date of their jury service| + |an information pack about being a juror and the court they're going to| + |Getting ready for jury service| + |The information below is also in the email that we have sent.| + |You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch.| + |Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then I click on the "Download a copy of your summons reply HTML" link + And on the page I see + |text| + |Copy of your jury summons reply| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + And I delete bank holiday + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100145 |LNAMESIXSEVENSIX |SW1H 9AJ |email@outlook.com |451170401 | + +@RegressionSingle +Scenario Outline: English 3rd Party Deferral - Deferral >1 date is a Bank Holiday + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Fr" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + Then I see "Tell us why they need another date for their jury service" on the page + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + + And I create a bank holiday "9" Mondays in the future for court/bureau "400" new schema + And I create a bank holiday "10" Mondays in the future for court/bureau "400" new schema + And I create a bank holiday "11" Mondays in the future for court/bureau "400" new schema + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + Then I see "Choose 3 Mondays when they can start jury service" on the page + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + And on the page I see + |text| + |Check dates| + |Dates they can start jury service| + |First choice| + |Second choice| + |Third choice| + |You do not need to tell us all other dates they're available.| + |We'll choose one of these 3 dates.| + |In the unlikely event that we cannot use one of these dates, we'll contact you.| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + Then I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as their start date, their jury service will start on the Tuesday at the earliest.| + |We'll send confirmation of the start date.| + + And I press the "Continue" button + + #help at court + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + And on the page I see + |text| + |Check your answers now| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then on the page I see + |text| + |You have completed your reply| + |If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them.| + |We have sent an email to say you have replied to this jury summons.| + |Download a copy of your summons reply| + |If they can do jury service, at least 2 weeks before it starts we'll send them:| + |a letter confirming the date of their jury service| + |an information pack about being a juror and the court they're going to| + |Getting ready for jury service| + |The information below is also in the email that we have sent.| + |You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch.| + |Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then I click on the "Download a copy of your summons reply HTML" link + And on the page I see + |text| + |Copy of your jury summons reply| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I delete bank holiday + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100241 |LNAMESIXSEVENSIX |SW1H 9AJ |email@outlook.com |451170401 | + +@RegressionSingle +Scenario Outline: English 3rd Party Deferral - Deferral date 2 is a Bank Holiday + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Fr" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + Then I see "Tell us why they need another date for their jury service" on the page + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + Then I see "Choose 3 Mondays when they can start jury service" on the page + + And I create a bank holiday "10" Mondays in the future for court/bureau "400" new schema + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + And on the page I see + |text| + |Check dates| + |Dates they can start jury service| + |First choice| + |Second choice| + |Third choice| + |You do not need to tell us all other dates they're available.| + |We'll choose one of these 3 dates.| + |In the unlikely event that we cannot use one of these dates, we'll contact you.| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as their start date, their jury service will start on the Tuesday at the earliest.| + |We'll send confirmation of the start date.| + + And I press the "Continue" button + + #help at court + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + And on the page I see + |text| + |Check your answers now| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then on the page I see + |text| + |You have completed your reply| + |If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them.| + |We have sent an email to say you have replied to this jury summons.| + |Download a copy of your summons reply| + |If they can do jury service, at least 2 weeks before it starts we'll send them:| + |a letter confirming the date of their jury service| + |an information pack about being a juror and the court they're going to| + |Getting ready for jury service| + |The information below is also in the email that we have sent.| + |You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch.| + |Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then I click on the "Download a copy of your summons reply HTML" link + And on the page I see + |text| + |Copy of your jury summons reply| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + And I delete bank holiday +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100793 |LNAMESIXSEVENSIX |SW1H 9AJ |email@outlook.com |451170401 | + +@RegressionSingle +Scenario Outline: English 3rd Party Deferral - Deferral date 3 is a Bank Holiday + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Friend Fr" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + Then I see "Tell us why they need another date for their jury service" on the page + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + Then I see "Choose 3 Mondays when they can start jury service" on the page + + And I create a bank holiday "11" Mondays in the future for court/bureau "400" new schema + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + And I press the "Continue" button + + And on the page I see + |text| + |Check dates| + |Dates they can start jury service| + |First choice| + |Second choice| + |Third choice| + |You do not need to tell us all other dates they're available.| + |We'll choose one of these 3 dates.| + |In the unlikely event that we cannot use one of these dates, we'll contact you.| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + Then I set the radio button to "Yes" + And I press the "Continue" button + + #Bank Holiday + + Then on the page I see + |text| + |At least one of the Mondays you selected is a bank holiday| + |You've selected at least one Monday that's a UK bank holiday.| + |If we choose this as their start date, their jury service will start on the Tuesday at the earliest.| + |We'll send confirmation of the start date.| + + And I press the "Continue" button + + #help at court + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + And on the page I see + |text| + |Check your answers now| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then on the page I see + |text| + |You have completed your reply| + |If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them.| + |We have sent an email to say you have replied to this jury summons.| + |Download a copy of your summons reply| + |If they can do jury service, at least 2 weeks before it starts we'll send them:| + |a letter confirming the date of their jury service| + |an information pack about being a juror and the court they're going to| + |Getting ready for jury service| + |The information below is also in the email that we have sent.| + |You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch.| + |Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then I click on the "Download a copy of your summons reply HTML" link + And on the page I see + |text| + |Copy of your jury summons reply| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "9" weeks in the future + And I validate the "Second" deferral date is "10" weeks in the future + And I validate the "Third" deferral date is "11" weeks in the future + + And I delete bank holiday + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200467 |LNAMESIXSEVENSIX |SW1H 9AJ |email@outlook.com |442170501 | + +@Regression +Scenario Outline: English 3rd Party Deferral - selected date makes juror >76 + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "11 mondays time" + And "<part_no>" has "NEXT_DATE" as "11 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + When I set the date of birth to a Monday "-3950" weeks in the future + + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #Have you ever worked + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + Then I see "Tell us why they need another date for their jury service" on the page + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + Then I see "Choose 3 Mondays when they can start jury service" on the page + + #check hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "They may be asked to serve for longer when they arrive at court." on the page + And I see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I see "You or they must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "They may be asked to serve for longer when they arrive at court." on the page + And I do not see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I do not see "You or they must contact us at that time to let us know." on the page + + When I set the "First" single date field to a Monday "55" weeks in the future + When I set the "Second" single date field to a Monday "56" weeks in the future + When I set the "Third" single date field to a Monday "57" weeks in the future + + And I press the "Continue" button + + Then on the page I see + |text| + |There is a problem| + |Give another date, the juror will be older than 76 on this date and would not qualify for jury service| + + When I set the "First" single date field to a Monday "14" weeks in the future + When I set the "Second" single date field to a Monday "13" weeks in the future + When I set the "Third" single date field to a Monday "12" weeks in the future + + And I press the "Continue" button + + And on the page I see + |text| + |Dates they can start jury service| + |First choice| + |Second choice| + |Third choice| + |You do not need to tell us all other dates they're available.| + |We'll choose one of these 3 dates.| + |In the unlikely event that we cannot use one of these dates, we'll contact you.| + + And I validate the "First" deferral date is "12" weeks in the future + And I validate the "Second" deferral date is "13" weeks in the future + And I validate the "Third" deferral date is "14" weeks in the future + + #check hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I see "Most jurors only need to serve 2 weeks." on the page + And I see "They may be asked to serve for longer when they arrive at court." on the page + And I see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I see "You or they must contact us at that time to let us know." on the page + + #collapse hint text + + Then I click on the "Will they need to serve longer than 2 weeks?" link + And I do not see "Most jurors only need to serve 2 weeks." on the page + And I do not see "They may be asked to serve for longer when they arrive at court." on the page + And I do not see "If they cannot serve for more than 2 weeks, they'll be able to discuss this with the jury manager at court." on the page + + Then I click on the "What if there's a problem nearer the time and they cannot serve?" link + And I do not see "You or they must contact us at that time to let us know." on the page + + Then I set the radio button to "Yes" + And I press the "Continue" button + + #help at court + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #check answers + + And on the page I see + |text| + |Check your answers now| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "12" weeks in the future + And I validate the "Second" deferral date is "13" weeks in the future + And I validate the "Third" deferral date is "14" weeks in the future + + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then on the page I see + |text| + |You have completed your reply| + |If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them.| + |We have sent an email to say you have replied to this jury summons.| + |Download a copy of your summons reply| + |If they can do jury service, at least 2 weeks before it starts we'll send them:| + |a letter confirming the date of their jury service| + |an information pack about being a juror and the court they're going to| + |Getting ready for jury service| + |The information below is also in the email that we have sent.| + |You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch.| + |Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses.| + |Calculate what expenses and allowances you can claim.| + |What did you think of this service? (Takes 30 seconds)| + + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + + Then I click on the "Download a copy of your summons reply HTML" link + And on the page I see + |text| + |Copy of your jury summons reply| + |Confirm the date of their jury service| + |I need to change the date of jury service for the person I'm answering for| + |Tell us why they need another date for their jury service| + |askForAnotherDateReasonWhy| + |Choose 3 Mondays when they can start jury service| + |First choice| + |Second choice| + |Third choice| + + And I validate the "First" deferral date is "12" weeks in the future + And I validate the "Second" deferral date is "13" weeks in the future + And I validate the "Third" deferral date is "14" weeks in the future + +Examples: + |part_no |last_name |postcode |pool_no | + |645200277 |LNAMESIXSEVENSIX |SW1H 9AJ |452170501 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_ErrorChecks.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_ErrorChecks.feature new file mode 100644 index 00000000..d9455ad8 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_ErrorChecks.feature @@ -0,0 +1,758 @@ +Feature: Regression English_3rd_ErrorChecks + +@Regression @JDB-3348 @JDB-3501 @JDB-3502 @JDB-3524 @JDB-3638 @JDB-3668 @JDB-3669 @JDB-3670 @JDB-3671 @JDB-3672 @JDB-3711 @JDB-3715 +@JDB-3653 @JDB-4502 +Scenario Outline: English_3rd_ErrorChecks + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select if you are replying for yourself or for someone else" on the page + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I press the "Continue" button + Then I see "Enter their 9-digit juror number - you can find it on their jury summons letter" on the page + And I see "You must enter their last name exactly as it's printed on their jury summons letter, even if it's wrong" on the page + And I see "You must enter their postcode exactly as it's printed on their jury summons letter, even if it's wrong" on the page + + Then I click on the "Problems entering their details?" link + And I see "If you've checked their details and still cannot continue, you can contact us." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + #Juror Log In (Find out how to trigger all messages) + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #Third Party Name + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your first name" on the page + And I see "Enter your last name" on the page + When I set "First name" to "FirstName" + And I set "Last name" to "LastName" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Third Party Relationship + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your relationship to the person summoned" on the page + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Choose a way for us to contact you" on the page + + When I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your main phone number" on the page + And I see "Enter your email address" on the page + + And I see "Enter your email address and check that it matches the other one you have provided" on the page + + When I set "Main phone" to "02078211818" + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "Mismatched@outlook.com" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your email address" on the page + And I see "Enter your email address and check that it matches the other one you have provided" on the page + + #new + + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + + #main starts with non 0 + + When I set "Main phone" to "1207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main includes a letter + + When I set "Main phone" to "H207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has all spaces + + When I set "Main phone" to " " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter your main phone number" on the page + + #main starts 01 and is followed by spaces + + When I set "Main phone" to "01 " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has hyphens + + When I set "Main phone" to "0121-333-4444" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has commas + + When I set "Main phone" to "0121,333,4444" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main begins 07 but only has 10 digits + + When I set "Main phone" to "0711111111" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main begins 01 but only has 9 digits + + When I set "Main phone" to "011111111" + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + + #main has too many spaces + + When I set "Main phone" to "01 21 123 444" + When I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + And I click on the "Back" link + + #main prefixed with a space + + When I set "Main phone" to " 0121123444" + When I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + And I click on the "Back" link + + #other starts with non 0 + + When I set "Another phone (optional)" to "1207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other includes a letter + + When I set "Another phone (optional)" to "H207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other starts 01 and is followed by spaces + + When I set "Another phone (optional)" to "01 " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other has hyphens + + When I set "Another phone (optional)" to "0121-333-4444" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other has commas + + When I set "Another phone (optional)" to "0121,333,4444" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other begins 07 but only has 10 digits + + When I set "Another phone (optional)" to "0711111111" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other begins 01 but only has 9 digits + + When I set "Another phone (optional)" to "011111111" + Then I see "There is a problem" on the page + And I see "Check your other phone number" on the page + + #other has too many spaces + + When I set "Another phone (optional)" to "01 21 123 444" + When I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + And I click on the "Back" link + + #other prefixed with a space + + When I set "Another phone (optional)" to " 0121123444" + When I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + And I click on the "Back" link + + #both invalid + + When I set "Main phone" to "011111111" + When I set "Another phone (optional)" to "011111111" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check your main phone number" on the page + And I see "Check your other phone number" on the page + + When I set "Main phone" to "0207 821 1818" + When I set "Another phone (optional)" to "" + + #end new + + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why Replying + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Tell us why you're replying for the person named on the jury summons" on the page + + When I set the radio button to "Other" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Provide details about why you are replying for the other person" on the page + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + Then I see "Is the name we have for them correct?" on the page + + And I press the "Continue" button + And I see "You need to tell us if we have the correct name for them" on the page + + #Check Juror Name + #JDB-4281 + #JDB-4125 + + When I set the radio button to "No" + And I press the "Continue" button + And I set "First name" to "" + And I set "Last name" to "" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the person's first name" on the page + And I see "Enter the person's last name" on the page + When I set "First name" to "JurorFirstName" + And I set "Last name" to "JurorLastName" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check address + + When I set the radio button to "No" + And I press the "Continue" button + And I set "Address line 1" to "" + And I set "Town or city" to "" + And I set "Postcode" to "" + And I press the "Continue" button + Then I see "There is a problem" on the page + + And I see "Provide the town or city" on the page + And I see "Provide the first line of the address" on the page + And I see "Enter the postcode" on the page + + When I set "Address line 1" to "|||" + And I set "Town or city" to "|||" + And I set "County" to "|||" + And I set "Postcode" to "|||" + And I press the "Continue" button + Then I see "There is a problem" on the page + + And I see "Check the town or city" on the page + And I see "Check the first line of the address" on the page + And I see "Check the county" on the page + And I see "Check the postcode" on the page + When I set "Address line 1" to "123 ADDRESS LINE ONE" + And I set "Town or city" to "London" + And I set "County" to "" + And I set "Postcode" to "CH1 2AN" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #Juror DoB + + When I press the "Continue" button + Then I see "There is a problem" on the page + + #JDB-4502 + + And I see "Enter the day the person was born" on the page + And I do not see "Enter the month the person was born" on the page + And I do not see "Enter the year the person was born" on the page + + #only day is set + + When I set "Day" to "27" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the month the person was born" on the page + + #day and month are set + + And I set "Month" to "04" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the year the person was born" on the page + + #only year is set + + When I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "1988" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the day the person was born" on the page + And I do not see "Enter the month the person was born" on the page + And I do not see "Enter the year the person was born" on the page + + When I set the date of birth to a Monday "-1500" weeks in the future + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the Juror + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select a phone number for us to use to contact you or the juror" on the page + And I see "Select an email address for us to use to contact you or the juror" on the page + + When I set the radio button to "Give a different phone number for the juror" + And I set the radio button to "Give a different email address for the juror" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter their main phone number" on the page + And I see "Enter their email address" on the page + + #JDB-3502 and JDB-3504 - only warns about email not phone + + When I set "Main phone number" to "|||" + And I set "Another phone number" to "|||" + And I set "Enter email address" to "|||" + And I set "Enter the email address again" to "|||" + And I press the "Continue" button + Then I see "Check their main phone number" on the page + And I see "Check their other phone number" on the page + And I see "Check their email address" on the page + + When I set "Main phone number" to "02078211818" + And I set "Enter email address" to "email@outlook.com" + And I set "Enter the email address again" to "mismatch@outlook.com" + And I press the "Continue" button + Then I see "Enter their email address and check that it matches the other one you have provided" on the page + + And I set "Enter email address" to "email@outlook.com" + And I set "Enter the email address again" to "email@outlook.com" + When I set "Main phone number" to "" + And I set "Another phone number" to "" + + #main starts with non 0 + + When I set "Main phone" to "1207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + + #main includes a letter + + When I set "Main phone" to "H207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + + #main has all spaces + + When I set "Main phone" to " " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter their main phone number" on the page + + #main starts 01 and is followed by spaces + + When I set "Main phone" to "01 " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + + #main has hyphens + + When I set "Main phone" to "0121-333-4444" + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + + #main has commas + + When I set "Main phone" to "0121,333,4444" + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + + #main begins 07 but only has 10 digits + + When I set "Main phone" to "0711111111" + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + + #main begins 01 but only has 9 digits + + When I set "Main phone" to "011111111" + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + + #main has too many spaces + + When I set "Main phone" to "01 21 123 444" + When I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + And I click on the "Back" link + + #main prefixed with a space + + When I set "Main phone" to " 0121123444" + When I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + And I click on the "Back" link + + #other starts with non 0 + + When I set "Another phone number (optional)" to "1207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check their other phone number" on the page + + #other includes a letter + + When I set "Another phone number (optional)" to "H207 821 1818" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check their other phone number" on the page + + #other starts 01 and is followed by spaces + + When I set "Another phone number (optional)" to "01 " + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check their other phone number" on the page + + #other has hyphens + + When I set "Another phone number (optional)" to "0121-333-4444" + Then I see "There is a problem" on the page + And I see "Check their other phone number" on the page + + #other has commas + + When I set "Another phone number (optional)" to "0121,333,4444" + Then I see "There is a problem" on the page + And I see "Check their other phone number" on the page + + #other begins 07 but only has 10 digits + + When I set "Another phone number (optional)" to "0711111111" + Then I see "There is a problem" on the page + And I see "Check their other phone number" on the page + + #other begins 01 but only has 9 digits + + When I set "Another phone number (optional)" to "011111111" + Then I see "There is a problem" on the page + And I see "Check their other phone number" on the page + + #other has too many spaces + + When I set "Another phone number (optional)" to "01 21 123 444" + When I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + And I click on the "Back" link + + #other prefixed with a space + + When I set "Another phone number (optional)" to " 0121123444" + When I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + And I click on the "Back" link + + #both invalid + + When I set "Main phone" to "011111111" + When I set "Another phone number (optional)" to "011111111" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Check their main phone number" on the page + And I see "Check their other phone number" on the page + + When I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Eligibility + + Then I see "Confirm if the person is eligible for jury service" on the page + + When I press the "Continue" button + + #Residency Yes + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if their main address has been in the UK, Channel Islands or Isle of Man for any period of at least 5 years, since they turned 13" + When I set the radio button to "No" + And I see "Provide details about where the person you are answering for has lived since their 13th birthday" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide details about where the person you are answering for has lived since their 13th birthday" + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select whether the person you're replying for has worked in the criminal justice system in the last 5 years" + When I set the radio button to "Yes" + Then I see "Choose any organisations the person you're replying for has worked for" on the page + And I press the "Continue" button + Then I see error "Tick any organisations the person worked for directly (not as a third party or subcontractor)" + + When I check the "Police service" checkbox + Then I see "Which police service?" on the page + And I check the "HM Prison Service" checkbox + Then I see "Which part of HM Prison Service?" on the page + And I check the "Other" checkbox + And I see "Which other part of the Criminal Justice System?" on the page + And I press the "Continue" button + Then I see error "Give details of where and when the person worked for the police service" + Then I see error "Give details of where and when the person worked for HM Prison Service" + Then I see error "Give details of where and when the person has worked for another Criminal Justice System employer" + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail no + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if the person is currently on bail for a criminal offence" + + When I set the radio button to "Yes" + Then I see "Provide details about the person's bail and criminal offence" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide details about the person's bail and criminal offence" + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if the person has been found guilty of a criminal offence" + + When I set the radio button to "Yes" + Then I see "Provide details about the person's criminal offence" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide details about the person's criminal offence" + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 1 no + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if the person you're replying for is being detained, looked after or treated under the Mental Health Act" + + When I set the radio button to "Yes" + Then I see "Provide details about how they're being detained, looked after or treated under the Mental Health Act" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Provide details about how they're being detained, looked after or treated under the Mental Health Act" + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 no + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see error "Select yes if it's been decided that the person you're replying for 'lacks mental capacity'" + + When I set the radio button to "Yes" + Then I see "Provide brief details about why it was decided they lack mental capacity" on the page + And I press the "Continue" button + Then I see "There is a problem" on the page + Then I see error "Provide brief details about why it was decided they lack mental capacity" + + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + When I press the "Continue" button + And I see "There is a problem" on the page + And I see "Select whether the person can start jury service on this date" on the page + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Select yes if the person you are answering for will need help when they're at court" on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + + #JDB-3638 + + Then I see "Select if they have limited mobility, a hearing impairment, diabetes, a severe sight impairment or other disability or impairment" on the page + + When I check the "Other" checkbox + And I press the "Continue" button + Then I see "There is a problem" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + + When I press the "Submit" button + Then I see "There is a problem" on the page + Then I see "Confirm that this information is correct before submitting this summons reply" on the page + + When I click on the "Change" link in the same row as "Confirm the date of their jury service" + Then I see "Check your start date" on the page + + #fails here - danielle to check + + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + Then I see "Tell us why they need another date for their jury service" on the page + + #Deferral Reason + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter their reason for needing another date for jury service" on the page + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + Then I see "Choose 3 Mondays when they can start jury service" on the page + + #Deferral Dates JDB-3524 + + When I press the "Continue" button + + Then on the page I see + |text| + |There is a problem| + |Enter the first Monday they'd prefer to start jury service| + |Enter the second Monday they'd prefer to start jury service| + |Enter the third Monday they'd prefer to start jury service| + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "10" weeks in the future + + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter a date that's different to the other choices" on the page + + When I set the "First" single date field to a Monday "100" weeks in the future + When I set the "Second" single date field to a Monday "101" weeks in the future + When I set the "Third" single date field to a Monday "102" weeks in the future + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Their first choice must be a Monday between" on the page + And I see "Their second choice must be a Monday between" on the page + And I see "Their third choice must be a Monday between" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Continue" button + + #confirm + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers + + When I click on the "Change" link in the same row as "Confirm the date of their jury service" + Then I see "Check your start date" on the page + + When I set the radio button to "No, they cannot do" + And I press the "Continue" button + Then I see "Why do they need to be excused from jury service?" on the page + + #Excusal Reason + + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter reason why they cannot do jury service in the next 12 months" on the page + + When I set text area with "name" of "excusalReason" to "Excuse them please" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + Then I see "We have sent an email to say you have replied to this jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500982 |LNAMENINEEIGHTTWO |CH1 2AN |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Excusal.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Excusal.feature new file mode 100644 index 00000000..fc8d63a1 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Excusal.feature @@ -0,0 +1,217 @@ +Feature: Regression English_3rd_Excusal + +@Regression @replytypes @JDB-3378 @JDB-3373 @JDB-3371 @JDB-3377 @JDB-3370 @JDB-3376 @JDB-3363 @JDB-3364 @JDB-3372 @JDB-3380 @JDB-3379 @JDB-3368 @JDB-3369 +@JDB-3365 @JDB-3366 @JDB-3367 @JDB-3418 @JDB-3455 @JDB-3420 @JDB-3447 @JDB-3653 +Scenario Outline: English 3rd Party Excusal + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #JDB-3455 Why are you replying title + + Then I see "Why are you replying for the other person?" on the page + And I do not see "Why are you replying?" on the page + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check juror name + + When I see "Juror Details" on the page +# And I set the radio button to "No" +# And I press the "Continue" button +# And I set "First name" to "Joe" +# And I set "Last name" to "Blogs" + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check juror address + + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + When I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + Then I see "Check your start date" on the page + When I set the radio button to "No, they cannot do" + And I press the "Continue" button + + #Excusal Reason JDB-3653 + + And I see "steps/confirm-date/excusal/tp" in the URL + Then I see "Why do they need to be excused from jury service?" on the page + And I see "Explain why they cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before their summons deadline." on the page + And I see "We'll get in touch later if we need this." on the page + And I click on the "Will we need to provide evidence soon?" link + And I see "If we need evidence, we'll contact you separately to tell you." on the page + And I see "For example, if they're too ill for jury service, we might ask for a letter from their doctor." on the page + And I see "They'll be given time to gather any evidence so do not worry about trying to gather this now." on the page + And I see "Wait until we've told you what evidence we need, if any." on the page + + And I press the "Continue" button + Then I see "Enter reason why they cannot do jury service in the next 12 months" on the page + + And I set text area with "id" of "excusalReason" to "Excuse them please" + And I press the "Continue" button + + #RA + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "Yes" + And I set "Tell us about any special arrangements or help the person you're answering for needs while they're doing jury service." to "Wheelchair user" + When I check the "Other" checkbox + And I set "Provide details" to "Other RA stuff" + And I press the "Continue" button + +# When I set the radio button to "No" +# And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "juror-test02" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "EXCUSAL" + + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500268 |LNAMETWOSIXEIGHT |CH1 2AN |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_SkipMainContent.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_SkipMainContent.feature new file mode 100644 index 00000000..ea2635ed --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_SkipMainContent.feature @@ -0,0 +1,271 @@ +Feature: English_3rd_SkipMainContent + +@Regression @JDB-3357 @JDB-3515 +Scenario Outline: English 3rd Party Straight Through with Skip to Main Content Checks + + Given I am on "Public" "juror-test02" + Then the page language is "en" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + When I click on the "Skip to main content" link + Then I see "Reply to a jury summons" on the page + Then the page language is "en" + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Are you replying for yourself or for someone else?" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "What is your name?" on the page + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Your relationship to the person" on the page + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Your contact information" on the page + + When I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "0207 821 1818" + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Why are you replying for the other person?" on the page + + And I set the radio button to "The person is not here" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Is the name we have for them correct?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Is this their address?" on the page + And I set the radio button to "Yes" + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Give the date of birth for the person you're replying for" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "We might need to get in touch" on the page + + When I set the radio button to "Use the phone number that you have already given to contact you" + When I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I see "Confirm if the person is eligible for jury service" on the page + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Confirm if the person is eligible for jury service" on the page + + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Since they turned 13," on the page + + When I set the radio button to "Yes" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Is the person currently on bail" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Has the person been found guilty of a criminal offence?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Is the person you're replying for being detained" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Check your start date" on the page + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Will the person you're replying for need help when they're at the court?" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "Check your answers now" on the page + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + When I press the "Submit" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Skip to main content" on the page + Then the page language is "en" + Then I click on the "Skip to main content" link + Then I see "You have completed your reply" on the page + +Examples: + | part_no |pool_no |last_name |postcode |email | + |641500404 |415170401 |DOE |SW1H 9AJ |e@eeee.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_StraightThrough.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_StraightThrough.feature new file mode 100644 index 00000000..d1a38c29 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_StraightThrough.feature @@ -0,0 +1,764 @@ +Feature: Regression English_3rd_StraightThrough + +@Regression @replytypes @JDB-3378 @JDB-3373 @JDB-3371 @JDB-3377 @JDB-3370 @JDB-3376 @JDB-3363 @JDB-3364 @JDB-3372 @JDB-3380 @JDB-3379 @JDB-3368 +@JDB-3369 @JDB-3365 @JDB-3366 @JDB-3367 @JDB-3418 @JDB-3455 @JDB-3420 @JDB-3457 @JDB-3375 @JDB-3831 @JDB-3879 @JDB-3860 @JDB-3862 +@JDB-3903 @JDB-2237 @JDB-3790 @JDB-3960 @JDB-3962 @JDB-4089 @JDB-4249 @JDB-4552 @JDB-4716 +Scenario Outline: English 3rd Party Straight Through + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + And I see "steps/login/tp" in the URL + Then I see "Their juror details" on the page + And I see "You can find their juror number on the jury summons letter." on the page + And I click on the "I do not have a juror number for the person" link + And I see "jurysummoning@justice.gov.uk" on the page + And I see "If you do not have a juror number for the person you are replying for, please contact:" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #3rd Party Name + + And I see "branches/third-party-details/name" in the URL + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #Relationship to juror + + And I see "branches/third-party-details/relationship" in the URL + When I see "Your Details" on the page + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #3rd Party Contact + + And I see "branches/third-party-details/contact" in the URL + When I see "Your Details" on the page + And I check the "By phone (UK Numbers only)" checkbox + And I see "Provide a UK phone number that we can use to reach you between 9am and 5pm, Monday to Friday." on the page + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I click on the "If you are living abroad" link + And I see "If you are currently living abroad and do not have a UK telephone number, we will need to contact you using an email address." on the page + And I press the "Continue" button + + #Why Replying + + And I see "branches/third-party-reason" in the URL + Then I see "Why are you replying for the other person?" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I do not see "Why are you replying?" on the page + When I set the radio button to "The person is not here" + And I see "They might be travelling, in hospital or away for more than a few days for some other reason." on the page + And I see "The person is unable to reply by themselves" on the page + And I see "The person cannot reply for themselves. This might be because they have a disability or impairment." on the page + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #Check juror name + + And I see "branches/third-party-personal-details/name" in the URL + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #Check juror address + + And I see "branches/third-party-personal-details/address" in the URL + When I see "Juror Details" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #DoB + + And I see "branches/third-party-personal-details/date-of-birth" in the URL + When I see "Juror Details" on the page + And I see "For example, 15 03 1982" on the page + And I set "Day" to "01" + And I set "Month" to "01" + + #JDB-3418 Checking age 18 works + + And I set "Year" to "2000" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #Contacting the juror + + And I see "branches/third-party-contact-details" in the URL + When I see "Juror Details" on the page + And I see "Give phone numbers that we can use to call you or the juror between 9am and 5pm, Monday to Friday." on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #Qualify for jury service + + #JDB-4636 + + And I see "steps/qualify/tp" in the URL + Then I see "Confirm if the person is eligible for jury service" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Your answers in this next section will help us check if the person you’re replying for can do jury service or not." on the page + And I see "You must answer these questions even if you:" on the page + And I see "think they’re not eligible" on the page + And I see "want to ask for them to be excused" on the page + And I see "You can ask for an excusal after this section, if needed." on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I see "steps/qualify/residency/tp" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Need help answering this?" link + And I see "You must contact us to get advice on their specific situation." on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + And I see "steps/qualify/cjs-employed/tp" in the URL + And I do not see "Beta" on the page + When I see "Eligibility" on the page + And I do not see "Qualifying for jury service" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + When I set the radio button to "No" + And I click on the "Why do we ask this?" link + And I click on the "Back" link + And I see "Eligibility" on the page + And I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And the radio button "Yes" is "Selected" + And I press the "Continue" button + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I see "steps/qualify/bail/tp" in the URL + And I see "Is the person currently on bail for a criminal offence?" on the page + And I see "If the person you're answering for is on bail in criminal proceedings, they cannot do jury service." on the page + And I do not see "Qualifying for jury service" on the page + And I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + And the radio button "No" is "Selected" + And I press the "Continue" button + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + And I see "steps/qualify/convictions/tp" in the URL + And I see "Has the person been found guilty of a criminal offence?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #JDB-4552 + + When I click on the "Guidance on jury service if you have a conviction" link + + Then I see "When they can do jury service" on the page + + And on the page I see + |text| + |They can do jury service if they've:| + |had a speeding fine| + |had points on their driving license| + |been told to attend a speed awareness course| + |This applies as long as they did not receive any of the sentences below.| + |When they cannot do jury service| + |They cannot do jury service if they've ever had one of the criminal sentences below in the UK, Channel Islands or Isle of Man. They also cannot do jury service if they've had one of these criminal sentences for a service offence under the Armed Forces Act 2006 anywhere in the world:| + |imprisonment or detention for 5 years or more| + |imprisonment for public protection or detention for public protection| + |imprisonment, custody or detention for life| + |an extended sentence under either of sections 226A, 226B, 227 or 228 of the Criminal Justice Act 2003, (including such a sentence imposed as a result of section 219A, 220, 221A or 222 of the Armed Forces Act 2006) or section 210A of the Criminal Procedure (Scotland) Act 1995| + |detention at His Majesty's pleasure or during the pleasure of the Secretary of State| + |They also cannot do jury service if they've had one of these criminal sentences in the last 10 years:| + |they served any part of a sentence of imprisonment or detention| + |they received a suspended sentence of imprisonment or a suspended order for detention| + |They also cannot do jury service if, in the last 10 years in England and Wales, they've had a community order, including any of the following:| + |community rehabilitation order| + |community punishment order| + |community punishment and rehabilitation order| + |drug treatment and testing order| + |drug abstinence order| + |They also cannot do jury service if, in the last 10 years, they've had:| + |any similar order under the law of Scotland, Northern Ireland, Isle of Man or any of the Channel Islands| + |a community or overseas community order under the Armed Forces Act 2006| + |If someone serves on a jury when they know they should not because of a criminal conviction, they may be fined up to £5,000.| + + And I press the "Continue" button + And I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I see "steps/qualify/mental-health-sectioned/tp" in the URL + And I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + And I see "Has the person been found guilty of a criminal offence?" on the page + And the radio button "No" is "Selected" + And I press the "Continue" button + And I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I see "steps/qualify/mental-health-capacity/tp" in the URL + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + And I click on the "Back" link + And I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And the radio button "No" is "Selected" + And I press the "Continue" button + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + And I do not see "Eligibility" on the page + + #The person can attend + + And I see "steps/confirm-date/tp" in the URL + Then I set the radio button to "Yes, they can start on" + + + And I press the "Continue" button + + #RA no + + And I see "steps/assistance/tp" in the URL + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + + #Check your answers + + And I see "steps/confirm-information/tp" in the URL + And I see "You answered the eligibility questions for the person you're replying for" on the page + When I see text "No" in the same row as "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" + And I see text "No" in the same row as "Has it been decided that the person you're replying for 'lacks mental capacity'?" + And I see "I understand that the answers I have given may be checked and that I may be prosecuted if I have given false information on purpose." on the page + + #JDB-4552 + + And I see "You may be convicted and fined up to £1000 if you give false information for the person summoned to evade jury service. This also applies if you fail to give us the information we need to decide if the person summoned is eligible to do jury service." on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + And I see "steps/confirmation/tp" in the URL + And I do not see "Beta" on the page + And I see "Give feedback (opens in a new window or tab)" on the page + Then I see "We have sent an email to say you have replied to this jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions for the person you're replying for" on the page + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "NEEDS REVIEW" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500162 |LNAMETWOSIXZERO|CH1 2AN |email@outlook.com |415170401 | + +@Regression @JDB-3351 @JDB-3349 @JDB-3350 @JDB-3352 @JDB-3361 @JDB-3362 @JDB-3375 @JDB-3353 @JDB-3354 @JDB-3516 @JDB-3830 @JDB-3863 +@JDB-3903 @JDB-2237 @JDB-3790 @JDB-3960 @JDB-3961 @JDB-3962 @JDB-4089 @JDB-4249 @JDB-4325 @JDB-4570 @JDB-4716 +Scenario Outline: English 3rd Party Straight Through Change Links + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + + And I press the "Continue" button + + #Why Replying + + When I set the radio button to "The person is not here" + + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "2000" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + + #change links + + When I click on the "Change" link in the same row as "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I set "Provide details" to "Residency information" + And I press the "Continue" button + Then I see text "Residency information" in the same row as "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + + When I click on the "Change" link in the same row as "Has the person you're replying for worked in the criminal justice system in the last 5 years?" + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police" + And I press the "Continue" button + + Then on the page I see + |text | + |Yes| + |Police service| + |London Met Police| + + When I click on the "Change" link in the same row as "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "I am sectioned and detained" + And I press the "Continue" button + Then I see text "Yes - I am sectioned and detained" in the same row as "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" + + When I click on the "Change" link in the same row as "Has it been decided that the person you're replying for 'lacks mental capacity'?" + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set "Provide brief details about why it was decided they lack mental capacity" to "I lack capacity" + And I press the "Continue" button + Then I see text "Yes - I lack capacity" in the same row as "Has it been decided that the person you're replying for 'lacks mental capacity'?" + + When I click on the "Change" link in the same row as "Is the person currently on bail for a criminal offence?" + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set "Provide details" to "I am on bail for crimes" + And I press the "Continue" button + Then I see text "Yes - I am on bail for crimes" in the same row as "Is the person currently on bail for a criminal offence?" + + When I click on the "Change" link in the same row as "Has the person been convicted of a criminal offence and been given a sentence?" + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "I am a convicted criminal" + And I press the "Continue" button + Then I see text "Yes - I am a convicted criminal" in the same row as "Has the person been convicted of a criminal offence and been given a sentence?" + + #submit + + And I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions" on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |644200264 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |442170501 | + +@Regression @JDB-3351 @JDB-3349 @JDB-3350 @JDB-3352 @JDB-3361 @JDB-3362 @JDB-3375 @JDB-3353 @JDB-3354 @JDB-3516 @JDB-3830 @JDB-3863 +@JDB-3903 @JDB-2237 @JDB-3790 @JDB-3960 @JDB-3961 @JDB-3962 @JDB-4089 @JDB-4249 @JDB-4325 @JDB-4570 @JDB-4716 +Scenario Outline: English 1st Party Straight Through Navigate Back + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + + And I press the "Continue" button + + #Why Replying + + When I set the radio button to "The person is not here" + + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "2000" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #eligiblity + + And I press the "Continue" button + + #Residency + + And I see "steps/qualify/residency/tp" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + And I see "steps/qualify/cjs-employed/tp" in the URL + When I see "Eligibility" on the page + And I do not see "Qualifying for jury service" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I see "steps/qualify/bail/tp" in the URL + And I do not see "Qualifying for jury service" on the page + And I see "Eligibility" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + And I see "steps/qualify/convictions/tp" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I see "steps/qualify/mental-health-sectioned/tp" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I see "steps/qualify/mental-health-capacity/tp" in the URL + And I do not see "Qualifying for jury service" on the page + When I see "Eligibility" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #navigate back + + And I click on the "Back" link + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Has the person been found guilty of a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Is the person currently on bail for a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + And the radio button "No" is "Selected" + + And I click on the "Back" link + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And the radio button "Yes" is "Selected" + + #navigate forward + + And I press the "Continue" button + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Is the person currently on bail for a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Has the person been found guilty of a criminal offence?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + And the radio button "No" is "Selected" + + And I press the "Continue" button + + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + And the radio button "No" is "Selected" + + + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I do not see "Eligibility" on the page + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Does the person have a disability or impairment that means they’ll need extra support or facilities in the court building where they are doing jury service?" on the page + + When I set the radio button to "No" + + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + And I see "You answered the eligibility questions for the person you're replying for" on the page + + #submit + + And I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions for the person you're replying for" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |644200355 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |442170501 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Underage.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Underage.feature new file mode 100644 index 00000000..f3af84b4 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_3rd_Underage.feature @@ -0,0 +1,143 @@ +Feature: Regression English_3rd_Underage + +@Regression @JDB-3081 @JDB-3889 @JDB-3790 @JDB-3983 @JDB-4097 @JDB-4502 +Scenario Outline: English 3rd Party Underage + + Given I am on "Public" "bau-test" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Your Details" on the page + + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "02078211818" + And I check the "By email" checkbox + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + When I set the radio button to "The person is unable to reply by themselves" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "2006" + + #Moving past DoB Section + + And I press the "Continue" button + Then I see "Is the date of birth correct?" on the page + + #And "Is the date of birth correct?" text is bold + + And I see "steps/your-details/confirm/tp" in the URL + + #change + + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Tell us if their date of birth is correct" on the page + + Then I set the radio button to "No" + And I press the "Continue" button + + #DoB + + When I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "" + When I press the "Continue" button + Then I see "There is a problem" on the page + + #JDB-4502 + + And I see "Enter the day the person was born" on the page + And I do not see "Enter the month the person was born" on the page + And I do not see "Enter the year the person was born" on the page + + #only day is set + + When I set "Day" to "27" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the month the person was born" on the page + + #day and month are set + + And I set "Month" to "04" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the year the person was born" on the page + + #only year is set + + When I set "Day" to "" + And I set "Month" to "" + And I set "Year" to "1988" + When I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the day the person was born" on the page + And I do not see "Enter the month the person was born" on the page + And I do not see "Enter the year the person was born" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "198a" + And I press the "Continue" button + Then I see "There is a problem" on the page + And I see "Enter the year the person was born as a 4 digit number. For example, 1982" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "2006" + And I press the "Continue" button + + Then I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + And I see text "27 April 2006" in the same row as "Date of birth" + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |741500001 |LNAMEONE |CH1 2AN |a@eeee.com |415181001 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_AccountLocked.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_AccountLocked.feature new file mode 100644 index 00000000..b9ed23c6 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_AccountLocked.feature @@ -0,0 +1,138 @@ +Feature: Regression_English_AccountLocked + +@Regression @Sprint01 @Account_Locked @JDB-2678 @JDB-3516 @JDB-3667 +Scenario Outline: 1st Party Account Locked + Given I am on "Public" "juror-test01" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + +#1st_English + + Then I see "Reply to a jury summons" on the page + +#start now + + + And I do not see any links on the page that open to a new page without an alt text + +#replying for myself + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #1 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + Then I see "Your combination of name, postcode and Juror number are not recognised." on the page + +#log on attempt #2 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + Then I see "Your combination of name, postcode and Juror number are not recognised." on the page + +#log on attempt #3 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + Then I see "Your combination of name, postcode and Juror number are not recognised." on the page + +#log on attempt #4 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + +#@JDB-2678 + + Then I see "For security reasons, your account has been locked due to multiple failed login attempts and you can no longer reply online. Please contact the Jury Central Summoning Bureau for more information - our details are below in the 'I do not have a juror number' section." on the page + +Examples: + |part_no |last_name |postcode |email | pool_no | + |841501129 |LNAME1129 |CH1 2AN |b@eeee.com | 415181001 | + +@Regression @Account_Locked @JDB-2678 @JDB-3667 +Scenario Outline: 3rd Party Account Locked + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + + Then I see "Reply to a jury summons" on the page + And I do not see any links on the page that open to a new page without an alt text + + And I do not see any links on the page that open to a new page without an alt text + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #1 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + Then I see "The combination of name, postcode and Juror number are not recognised." on the page + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #2 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + Then I see "The combination of name, postcode and Juror number are not recognised." on the page + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #3 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + Then I see "The combination of name, postcode and Juror number are not recognised." on the page + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #4 + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "Smith" + When I set "Juror postcode" to "SW17 7SR" + And I press the "Continue" button + And I do not see any links on the page that open to a new page without an alt text + +#@JDB-2678 +#JDB-3667 + + Then I see "For security reasons, this account has been locked due to multiple failed login attempts and you can no longer reply online. Please contact the Jury Central Summoning Bureau for more information - our details are below in the 'I do not have a juror number' section." on the page + And I do not see any links on the page that open to a new page without an alt text +Examples: + |part_no |last_name |postcode |email | pool_no | + |741500461 |LNAMEFOURSIXONE |CH1 2AN |b@eeee.com | 415181001 | + + diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_English_MentalHealthQuestionsSeparation.feature b/src/test/resources/cucumber/features/regression/REGRESSION_English_MentalHealthQuestionsSeparation.feature new file mode 100644 index 00000000..aee03e49 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_English_MentalHealthQuestionsSeparation.feature @@ -0,0 +1,1330 @@ +Feature: Regression 1st_MentalHealthQuestionsSeparation + +@Regression @JDB-3584 +Scenario Outline: 1st party MHQ1=Y MHQ2=Y + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Are you currently on bail for a criminal offence?" on the page + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + When I set the radio button to "Yes" + And I set "Provide details about how you're being detained, looked after or treated under the Mental Health Act" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + And I see "Yes, I can start on" on the page + When I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + |part_no |last_name |postcode | email |pool_no | + |741500530 |LNAMEFIVETHREEZERO |CH1 2AN |email@outlook.com|415181001 | + +@Regression @JDB-3584 +Scenario Outline: 1st party MHQ1=Y MHQ2=N + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check Name + + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check Address + + And I press the "Continue" button + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Are you currently on bail for a criminal offence?" on the page + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + When I set the radio button to "Yes" + And I set "Provide details" to "I am sectioned" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + And I see "Yes, I can start on" on the page + When I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I see "I am sectioned" on the page + And I do not see "I lack capacity" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + |part_no |last_name |postcode | email |pool_no | + |741500607 |LNAMESIXZEROSEVEN |CH1 2AN |email@outlook.com|415181001 | + +@Regression @JDB-3584 +Scenario Outline: 1st party MHQ1=N MHQ2=Y + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check Name + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Is this your address?" on the page + + #Check Address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Are you currently on bail for a criminal offence?" on the page + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "I lack capacity" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + And I see "Yes, I can start on" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I do not see "I am sectioned" on the page + And I see "I lack capacity" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + |part_no |last_name |postcode | email |pool_no | + |741500531 |LNAMEFIVETHREEONE |CH1 2AN |email@outlook.com|415181001 | + +@Regression @JDB-3584 +Scenario Outline: 1st party MHQ1=N MHQ2=N + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check Name + + And I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this your address?" on the page + + #Check Address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Are you currently on bail for a criminal offence?" on the page + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + Then I see "Have you been found guilty of a criminal offence?" on the page + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + + #When I press the "Submit" button + + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Pass" in the same row as "Mental health" + And I do not see "I am sectioned" on the page + And I do not see "I lack capacity" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500767 |415170401 |CH1 2AN |email@outlook.com|415170401 | + +@Regression @JDB-3584 +Scenario Outline: English_3rd_YY + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #Third Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Third Party Relationship + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + When I set "Main phone" to "02078211818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why Replying + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + + #Check Juror Name + + And I press the "Continue" button + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + + #Check address + + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #Juror DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the Juror + + When I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Eligibility + + Then I see "Confirm if the person is eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency Yes + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + + #Bail no + + Then I see "Is the person currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + Then I see "Has the person been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 1 + +# Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + + Then on the page I see + |text| + |Is the person you're replying for being detained, looked after or treated under the Mental Health Act?| + |Only select yes if, under the Mental Health Act 1983, they're:| + |being detained (sectioned) or liable to be detained| + |resident in a hospital due to a mental disorder| + |subject to a guardianship or community treatment order| + + And I click on the "Need help answering this?" link + Then on the page I see + |text| + |A person cannot be on a jury if any of these statements apply.| + |If they have mental health issues (including depression and anxiety) but are not being detained, looked after or treated under the Mental Health Act, they can still be on a jury.| + |(If they feel they cannot complete jury service because of significant mental health issues, you can still ask for them to be excused or change their dates.)| + + When I set the radio button to "Yes" + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Ac" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I press the "Continue" button +# Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + + #Mental health part 2 + + And on the page I see + |text| + |Has it been decided that the person you're replying for 'lacks mental capacity'?| + |This means, legally, they cannot make decisions for themselves.| + + And I click on the "Need help answering this?" link + Then on the page I see + |text| + |If someone lacks mental capacity, they cannot:| + |make their own decisions| + |understand and retain information| + |communicate thoughts and decisions to others| + |Some people are medically certified under the Mental Capacity Act as lacking in mental capacity because of an accident or injury.| + |Someone else may then need to be appointed to make decisions on their behalf.| + |If a person lacks mental capacity, they cannot do jury service.| + + When I set the radio button to "Yes" + And I set "Provide brief details about why it was decided they lack mental capacity" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + Then I see "Check your answers now" on the page + And I see text "Yes" in the same row as "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" + And I see text "Yes" in the same row as "Has it been decided that the person you're replying for 'lacks mental capacity'?" + + #When I press the "Submit" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + + And I see "You answered the eligibility questions" on the page + And I see "Yes" in the same row as "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" + And I see "Yes" in the same row as "Has it been decided that the person you're replying for 'lacks mental capacity'?" + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + And I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + | part_no |last_name |postcode | email |pool_no | + |641500932 |LNAMENINETHREETWO |CH1 2AN |email@outlook.com|415170601 | + +@Regression @JDB-3584 +Scenario Outline: English_3rd_YN + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #Third Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Third Party Relationship + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + When I set "Main phone" to "02078211818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why Replying + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + + #Check Juror Name + + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check address + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #Juror DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the Juror + + When I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Eligibility + + Then I see "Confirm if the person is eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency Yes + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person currently on bail for a criminal offence?" on the page + + #Bail no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Has the person been found guilty of a criminal offence?" on the page + + #Convictions no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + + #Mental health part 1 + + When I set the radio button to "Yes" + And I set "Provide details" to "They are sectioned" + + And I press the "Continue" button + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + + #Mental health part 2 + + When I set the radio button to "No" + + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + Then I see "We have sent an email to say you have replied to this jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I see "They are sectioned" on the page + And I do not see "They lack capacity" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + | part_no |last_name |postcode |email |pool_no | + |641500693 |LNAMENINETHREETWO |CH1 2AN |email@outlook.com |415170401 | + +@Regression @JDB-3584 +Scenario Outline: English_3rd_NY + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #Third Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + Then I see "Your relationship to the person" on the page + + #Third Party Relationship + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + When I set "Main phone" to "02078211818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + Then I see "Why are you replying for the other person?" on the page + + #Why Replying + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + Then I see "Is the name we have for them correct?" on the page + + #Check Juror Name + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Is this their address?" on the page + + #Check address + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Give the date of birth for the person you're replying for" on the page + + #Juror DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the Juror + + When I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Eligibility + + Then I see "Confirm if the person is eligible for jury service" on the page + + When I press the "Continue" button + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency Yes + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person currently on bail for a criminal offence?" on the page + + #Bail no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Has the person been found guilty of a criminal offence?" on the page + + #Convictions no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + + #Mental health part 1 + + When I set the radio button to "No" + + And I press the "Continue" button + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + + #Mental health part 2 + + When I set the radio button to "Yes" + And I set "Provide brief details about why it was decided they lack mental capacity" to "They lack capacity" + + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + Then I see "We have sent an email to say you have replied to this jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Mental health" + And I do not see "They are sectioned" on the page + And I see "They lack capacity" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + | part_no |last_name |postcode | email |pool_no | + |641500148 |LNAMENINETHREETWO |CH1 2AN |email@outlook.com|415170401 | + +@Regression @JDB-3584 +Scenario Outline: English_3rd_NN + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + Then I see "Their juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #Third Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Third Party Relationship + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + When I set "Main phone" to "02078211818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why Replying + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check Juror Name + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Is this their address?" on the page + + #Check address + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Give the date of birth for the person you're replying for" on the page + + #Juror DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the Juror + + When I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Eligibility + + Then I see "Confirm if the person is eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency Yes + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person currently on bail for a criminal offence?" on the page + + #Bail no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has the person been found guilty of a criminal offence?" on the page + + #Convictions no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" on the page + + #Mental health part 1 + + When I set the radio button to "No" + + And I press the "Continue" button + Then I see "Has it been decided that the person you're replying for 'lacks mental capacity'?" on the page + + #Mental health part 2 + + When I set the radio button to "No" + + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #I can attend + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + Then I see "We have sent an email to say you have replied to this jury summons." on the page + + #Bureau + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + When I click on the "Eligibility" link + Then I see "Pass" in the same row as "Mental health" + And I do not see "They are sectioned" on the page + And I do not see "They lack capacity" on the page + And I do not see "[MENTAL HEALTH Q2]" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500885 |LNAMENINETHREETWO |CH1 2AN |email@outlook.com|415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_Free_Text_Char_Count.feature b/src/test/resources/cucumber/features/regression/REGRESSION_Free_Text_Char_Count.feature new file mode 100644 index 00000000..dfa1b819 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_Free_Text_Char_Count.feature @@ -0,0 +1,1213 @@ +Feature: Free Text Char Count + +@RegressionWelsh +Scenario Outline: Welsh_3rd_Char_Counts + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then I see "Eich Manylion" on the page + + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + + And I set "Sut ydych chi" to "Friend" + And I press the "Parhau" button + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e" checkbox + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + When I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + When I set the radio button to "Ydy" + + When I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + When I set the radio button to "Ie" + + When I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #JDB-3107 + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + And I set the radio button to "Naddo" + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch fanylion" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Rhowch fanylion" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Parhau" button + + #CJS + + And I set the radio button to "Ydy" + Then I see "Dewiswch unrhyw sefydliadau y mae'r unigolyn rydych yn ymateb ar ei ran wedi gweithio iddynt." on the page + + And I check the "Arall" checkbox + + And I see "You have 1000 characters remaining" on the page + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Parhau" button + + #Bail + + And I set the radio button to "Ydy" + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch fanylion" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Rhowch fanylion" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Parhau" button + + #Criminal Convictions + + And I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + And I set the radio button to "Ydy" + And I see "You have 1000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Parhau" button + + #Mental Health + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + And I set the radio button to "Ie" + And I see "You have 1000 characters remaining" on the page + And I set "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Parhau" button + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I set the radio button to "Ie" + And I see "You have 1000 characters remaining" on the page + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Parhau" button + + #Can you attend + + And I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + + And I see "You have 1000 characters remaining" on the page + When I set text area with "id" of "deferralReason" to "These are the details." + And I see "You have 978 characters remaining" on the page + When I set text area with "id" of "deferralReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I click on the "Cliciwch i fynd yn ôl" link + + And I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + + And I see "You have 1000 characters remaining" on the page + When I set text area with "id" of "excusalReason" to "These are the details." + And I see "You have 978 characters remaining" on the page + When I set text area with "id" of "excusalReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I click on the "Cliciwch i fynd yn ôl" link + + And I set the radio button to "Ydi, mae'r unigolyn" + And I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + + And I set the radio button to "Oes" + + And I check the "Arall" checkbox + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch fanylion os gwelwch yn dda" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Rhowch fanylion os gwelwch yn dda" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddo wasanaethu ar reithgor" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddo wasanaethu ar reithgor" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + When I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see "A oes gan yr unigolyn anabledd neu nam sy'n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnynt yn yr adeilad llys lle byddant yn cyflawni’r gwasanaeth rheithgor?" on the page + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + And I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200900 |LNAMENINEZEROZERO |SY2 6LU |a@eeee.com |452170401 | + + +@Regression +Scenario Outline: English_3rd_Char_Counts_and_warnings + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + When I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why are you replying for juror + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Does the person you're answering for qualify for jury service? + + Then I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Eligibility questions + + #residency + + And I set the radio button to "No" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details about where the person you are answering for has lived since their 13th birthday" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Provide details" + And I press "back_space" in "Provide details" + And I see "You have 2 characters remaining" on the page + Then I press "enter" in "Provide details" + And I append text area with "id" of "livedConsecutiveDetails" with "These" + + And I press the "Continue" button + And I see "Details about where the person you are answering for has lived since their 13th birthday must be fewer characters" on the page + + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Continue" button + + #CJS Emp + + And I set the radio button to "Yes" + And I check the "Other" checkbox + + And I see "You have 1,000 characters remaining" on the page + And I set "Which other part of the Criminal Justice System?" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Which other part of the Criminal Justice System?" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Which other part of the Criminal Justice System?" + And I press "back_space" in "Which other part of the Criminal Justice System?" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Which other part of the Criminal Justice System?" + And I append text area with "id" of "cjsEmployerDetails" with "These" + + And I press the "Continue" button + And I see "Details of where and when the person has worked for another Criminal Justice System employer must be fewer characters" on the page + + And I set "Which other part of the Criminal Justice System?" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #bail + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details about the person's bail and criminal offence" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details about the person's bail and criminal offence" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Provide details about the person's bail and criminal offence" + And I press "back_space" in "Provide details about the person's bail and criminal offence" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Provide details about the person's bail and criminal offence" + And I append text area with "id" of "onBailDetails" with "These" + + And I press the "Continue" button + And I see "Details about the person's bail and criminal offence must be fewer characters" on the page + + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #criminaloffence + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Provide details" + And I append text area with "id" of "convictedDetails" with "These" + + And I press the "Continue" button + And I see "Details about the person's criminal offence must be fewer characters" on the page + + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #mentalhealth1 + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Provide details about how they're being detained, looked after or treated under the Mental Health Act" + And I append text area with "id" of "mentalHealthSectionedDetails" with "These" + + And I press the "Continue" button + And I see "Details details about how they're being detained, looked after or treated under the Mental Health Act must be fewer characters" on the page + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #mentalhealth2 + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide brief details about why it was decided they lack mental capacity" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide brief details about why it was decided they lack mental capacity" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set "Provide brief details about why it was decided they lack mental capacity" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Provide details" + And I append text area with "id" of "mentalHealthCapacityDetails" with "These" + + And I press the "Continue" button + And I see "Details about why it was decided they lack mental capacity must be fewer characters" on the page + + And I set "Provide brief details about why it was decided they lack mental capacity" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #excusal + + And I set the radio button to "No, they cannot do" + And I press the "Continue" button + + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I see "Explain why they cannot do jury service in the next 12 months." on the page + And I see "You do not need to attach or gather evidence before their summons deadline." on the page + And I see "We'll get in touch later if we need this." on the page + And I set text area with "id" of "excusalReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Explain why they cannot do jury service in the next 12 months." + And I append text area with "id" of "excusalReason" with "These" + + And I press the "Continue" button + And I see "The reason for asking for the person to be excused from jury service must be fewer characters" on the page + + And I set text area with "id" of "excusalReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #deferral + + Then I click on the "Back" link + Then I click on the "Back" link + + And I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I append text area with "id" of "deferralReason" with "These" + + And I press the "Continue" button + And I see "The reason for asking for a later date for the person's jury service must be fewer characters" on the page + + And I set text area with "id" of "deferralReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + Then I click on the "Back" link + Then I click on the "Back" link + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "Yes" + And I check the "Other" checkbox + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Provide details" + And I append text area with "id" of "assistanceTypeDetails" with "These" + + And I press the "Continue" button + And I see "The details of the person's disability or impairment must be fewer characters" on the page + + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #Check your answers + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200883 |LNAMEEIGHTEIGHTTHREE |SY2 6LU |email@outlook.com|452170401| + +@Regression +Scenario Outline: English_Special_Chars + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #name + + And I set the radio button to "Yes" + When I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "No" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details about where you have lived since your 13th birthday" to "1234567890" + And I see "You have 990 characters remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + Then "Provide details about where you have lived since your 13th birthday" is "1234567890" + When I set "Provide details about where you have lived since your 13th birthday" to "££££££££££" + And I see "You have 990 characters remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + Then "Provide details about where you have lived since your 13th birthday" is "££££££££££" + And I set "Provide details about where you have lived since your 13th birthday" to "@@@@@@@@@@" + And I see "You have 990 characters remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + Then "Provide details about where you have lived since your 13th birthday" is "@@@@@@@@@@" + And I set "Provide details about where you have lived since your 13th birthday" to "!$%^&*()-+" + And I see "You have 990 characters remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + Then "Provide details about where you have lived since your 13th birthday" is "!$%^&*()-+" + And I set "Provide details about where you have lived since your 13th birthday" to "{[]:;'@?>¬" + And I see "You have 990 characters remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + Then "Provide details about where you have lived since your 13th birthday" is "{[]:;'@?>¬" + And I set "Provide details about where you have lived since your 13th birthday" to "</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.," + And I see "You have 0 characters remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + Then "Provide details about where you have lived since your 13th birthday" is "</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.,</\|_=.," + And I set "Provide details about where you have lived since your 13th birthday" to "áéíóúüôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâôâ" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Provide details" + And I see "You have 1 character remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + And I see "You have 1 character remaining" on the page + And I set "Provide details about where you have lived since your 13th birthday" to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Provide details" + And I see "You have 1 character remaining" on the page + And I press the "Continue" button + Then I click on the "Back" link + + And I see "You have 1 character remaining" on the page + And I set "Provide details about where you have lived since your 13th birthday" to "These are the details." + And I press "enter" in "Provide details about where you have lived since your 13th birthday" + And I see "You have 977 characters remaining" on the page + And I append text area with "id" of "livedConsecutiveDetails" with "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details." + And I see "You have 818 characters remaining" on the page + And I press "enter" in "Provide details about where you have lived since your 13th birthday" + And I append text area with "id" of "livedConsecutiveDetails" with "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details." + And I see "You have 658 characters remaining" on the page + And I press "enter" in "Provide details about where you have lived since your 13th birthday" + And I append text area with "id" of "livedConsecutiveDetails" with "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details." + And I see "You have 62 characters remaining" on the page + And I press "enter" in "Provide details about where you have lived since your 13th birthday" + And I append text area with "id" of "livedConsecutiveDetails" with "These are the details. These are the details. These are the d" + And I see "You have 0 characters remaining" on the page + And I press the "Continue" button + + Then I see "Details about where you have lived since your 13th birthday must be fewer characters" on the page + And I see "There is a problem" on the page + + And I set "Provide details about where you have lived since your 13th birthday" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I press the "Continue" button + + Then I click on the "Back" link + And I see "You have 978 characters remaining" on the page + + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I see "Eligibility" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I see "Eligibility" on the page + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645700805 |LNAMEEIGHTZEROFIVE |SA1 4PF |email@outlook.com |457170401 | + +@Regression +Scenario Outline: English_1st_Char_Counts_and_warnings + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + And I set "Main phone" to "01211234444" + And I set "Another phone (optional)" to "07111111111" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + And I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + Then I see "What is your date of birth?" on the page + + #DoB + + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Eligibility questions + + And I press the "Continue" button + + #residency + + And I set the radio button to "No" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details about where you have lived since your 13th birthday" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details about where you have lived since your 13th birthday" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Provide details about where you have lived since your 13th birthday" + And I press "back_space" in "Provide details about where you have lived since your 13th birthday" + And I see "You have 2 characters remaining" on the page + Then I press "enter" in "Provide details about where you have lived since your 13th birthday" + And I append text area with "id" of "livedConsecutiveDetails" with "These" + + And I press the "Continue" button + And I see "Details about where you have lived since your 13th birthday must be fewer characters" on the page + + And I set "Provide details about where you have lived since your 13th birthday" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Continue" button + + #CJS Emp + + And I set the radio button to "Yes" + And I check the "Other" checkbox + + And I see "You have 1,000 characters remaining" on the page + And I set "Which other part of the Criminal Justice System?" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Which other part of the Criminal Justice System?" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Which other part of the Criminal Justice System?" + And I press "back_space" in "Which other part of the Criminal Justice System?" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Which other part of the Criminal Justice System?" + And I append text area with "id" of "cjsEmployerDetails" with "These" + + And I press the "Continue" button + And I see "Details of where and when you have worked for another Criminal Justice System employer must be fewer characters" on the page + + And I set "Which other part of the Criminal Justice System?" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #bail + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details about your bail and criminal offence" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details about your bail and criminal offence" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press "back_space" in "Provide details about your bail and criminal offence" + And I press "back_space" in "Provide details about your bail and criminal offence" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Provide details about your bail and criminal offence" + And I append text area with "id" of "onBailDetails" with "These" + + And I press the "Continue" button + And I see "Details about your bail and criminal offence must be fewer characters" on the page + + And I set "Provide details about your bail and criminal offence" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #criminaloffence + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + + Then I press "enter" in "Provide details" + And I append text area with "id" of "convictedDetails" with "These" + + And I press the "Continue" button + And I see "Details about your criminal offence must be fewer characters" on the page + + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #mentalhealth1 + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + + And I see "You have 2 characters remaining" on the page + +# Then I press "enter" in "Provide details" +# And I append text area with "id" of "mentalHealthSectionedDetails" with "These" +# +# And I press the "Continue" button +# And I see "Details about how you are detained, or likely to be detained, under the Mental Health Act 1983 must be fewer characters" on the page +# +# And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" +# And I see "You have 0 characters remaining" on the page +# + And I press the "Continue" button + + #mentalhealth2 + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide brief details about why it was decided you lack mental capacity" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide brief details about why it was decided you lack mental capacity" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set "Provide brief details about why it was decided you lack mental capacity" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + +# Then I press "enter" in "Provide details" +# And I append text area with "id" of "mentalHealthCapacityDetails" with "These" +# +# And I press the "Continue" button +# And I see "Details about how you lack capacity as stated in the Mental Capacity Act 2005 must be fewer characters" on the page +# +# And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" +# And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #excusal + + And I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + +# Then I press "enter" in "Please Explain why you cannot do jury service in the next 12 months. You do not need to attach or gather evidence before your summons deadline. We'll contact you later if we need this." +# And I append text area with "id" of "excusalReason" with "These" +# +# And I press the "Continue" button +# And I see "Your reason for asking to be excused from jury service must be fewer characters" on the page +# +# And I set text area with "id" of "excusalReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" +# And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #deferral + + Then I click on the "Back" link + Then I click on the "Back" link + + And I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the" + + And I press the "Continue" button + And I see "Your reason for asking for a later date for your jury service must be fewer characters" on the page + + And I set text area with "id" of "deferralReason" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + Then I click on the "Back" link + Then I click on the "Back" link + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "Yes" + And I check the "Other" checkbox + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "These are the details." + And I see "You have 978 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are" + And I see "You have 2 characters remaining" on the page + +# Then I press "enter" in "Provide details" +# And I append text area with "id" of "assistanceTypeDetails" with "These" +# +# And I press the "Continue" button +# And I see "The details of your disability or impairment must be fewer characters" on the page +# +# And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" +# And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + #Check your answers + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200922 |LNAMENINETWOTWO |SY2 6LU |email@outlook.com |452170401 | + +@Regression +Scenario Outline: English_1st_Char_Counts_YesToNo + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + And I set "Main phone" to "01211234444" + And I set "Another phone (optional)" to "07111111111" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + And I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + Then I see "What is your date of birth?" on the page + + #DoB + + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #Eligibility questions + + And I press the "Continue" button + + #residency + + And I set the radio button to "No" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "Yes" + And I do not see "You have 0 characters remaining" on the page + + And I set the radio button to "No" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "Yes" + + And I press the "Continue" button + + #CJS Emp + + And I set the radio button to "Yes" + And I check the "Other" checkbox + + And I see "You have 1,000 characters remaining" on the page + And I set "Which other part of the Criminal Justice System?" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "No" + And I do not see "You have 0 characters remaining" on the page + + And I set the radio button to "Yes" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "No" + + And I press the "Continue" button + + #bail + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "No" + And I do not see "You have 0 characters remaining" on the page + + And I set the radio button to "Yes" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "No" + + And I press the "Continue" button + + #criminaloffence + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "No" + And I do not see "You have 0 characters remaining" on the page + +# And I set the radio button to "Yes" +# And I see "You have 1,000 characters remaining" on the page +# +# And I set the radio button to "No" + + And I press the "Continue" button + + #mentalhealth1 + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details about how you're being detained, looked after or treated under the Mental Health Act" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I press the "Continue" button + + And I set the radio button to "No" + + #mentalhealth2 + + And I set the radio button to "Yes" + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide brief details about why it was decided you lack mental capacity" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + + And I set the radio button to "No" + And I do not see "You have 0 characters remaining" on the page + +# And I set the radio button to "Yes" +# And I see "You have 1,000 characters remaining" on the page +# +# And I set the radio button to "No" + + And I press the "Continue" button + + #candojuryservice + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "Yes" + And I check the "Other" checkbox + + And I see "You have 1,000 characters remaining" on the page + And I set "Provide details" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + +# And I set the radio button to "No" +# And I do not see "You have 0 characters remaining" on the page +# +# And I set the radio button to "Yes" +# And I see "You have 0 characters remaining" on the page +# +# And I set the radio button to "No" + + And I press the "Continue" button + + #Check your answers + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200927 |LNAMENINETWOSEVEN |SY2 6LU |email@outlook.com |452170401 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_HTML_Response_Summary.feature b/src/test/resources/cucumber/features/regression/REGRESSION_HTML_Response_Summary.feature new file mode 100644 index 00000000..052fa88b --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_HTML_Response_Summary.feature @@ -0,0 +1,1373 @@ +Feature: Regression HTML Response Summary + +@Regression @JDB-4531 +Scenario Outline: English_Max_Chars HTML Response Summary + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #name + + And I set the radio button to "Yes" + When I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #DOB + + Then I see "What is your date of birth?" on the page + When I set the date of birth to a Monday "-1500" weeks in the future + + And I press the "Continue" button + + #Qualify for jury service + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "No" + And I set "Provide details about where you have lived since your 13th birthday" to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I press the "Continue" button + + #CJS + + When I set the radio button to "Yes" + And I check the "Other" checkbox + And I set "Which other part of the Criminal Justice System?" to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I press the "Continue" button + + #Bail + + And I set the radio button to "Yes" + And I set "Provide details about your bail and criminal offence" to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "Yes" + And I set "Provide details about how you're being detained, looked after or treated under the Mental Health Act" to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I press the "Continue" button + + #I can attend + + And I see "Yes, I can start on" on the page + And I press the "Continue" button + + #confirm dates + + And I set the radio button to "Yes" + And I press the "Continue" button + + #RA no + + When I set the radio button to "Yes" + And I check the "Diabetes" checkbox + And I set "Tell us about any special arrangements or help you need while you're doing jury service." to "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + #Check your answers + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "You have said that you can do jury service on the date shown." on the page + And I see "What happens next" on the page + And I see "Your answers mean that you might not be able to do jury service." on the page + And I see "We will now check your answers. Then we'll write to you in the next 7 days to let you know if you must or must not do jury service" on the page + And I see "We may also get in touch to talk about the help you need so you can do jury service." on the page + And I see "If you are able to do jury service, at least 2 weeks before it starts we'll send you" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "How you replied" on the page + And I see "You gave us these juror details" on the page + And I see "<first_name> <last_name>" on the page + And I see "02078211818" in the same row as "Main phone:" + And I see "<email>" in the same row as "Email:" + And I see "You answered the eligibility questions" on the page + And I see "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + And I see "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" in the same row as "Has it been decided that you 'lack mental capacity'?" + And I see "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" in the same row as "Are you currently on bail for a criminal offence?" + And I see "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" in the same row as "Have you been found guilty of a criminal offence?" + And I see "You responded to the proposed date of your jury service" on the page + And I see "I can do jury service on the date shown" in the same row as "Confirm the date of your jury service" + And I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I see "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see "You told us about any help you'll need in court" on the page + And I see "Yes" in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your jury service?" + And I see "These are the details.These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are th" in the same row as "Please tell us about any special arrangements or help you need while you're doing jury service." + And I see "Getting ready for jury service" on the page + And I see "The GOV.UK website has information to help you prepare for your jury service." on the page + And I see "Visit https://www.gov.uk/jury-service to learn about:" on the page + And I see "Taking time off work" on the page + And I see "Discussing the trial" on the page + And I see "What you can claim" on the page + And I see "How to claim expenses" on the page + And I see "Questions about jury service" on the page + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about your jury service, call the Jury Central Summoning Bureau." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100027 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@Regression @JDB-4531 +Scenario Outline: English 1st Party Excusal HTML Response Summary + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + And I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "You have said that you cannot do jury service and would like to be excused." on the page + And I see "What happens next" on the page + And I see "We'll write to you within the next 7 days to let you know if you must do jury service or if you can be excused." on the page + And I see "If you must do jury service, at least 2 weeks before it starts we'll send you:" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "How you replied" on the page + And I see "You gave us these juror details" on the page + And I see "<first_name> <last_name>" on the page + And I see "27 April 1981" in the same row as "Date of Birth:" + And I see "02078211818" in the same row as "Main phone:" + And I see "<email>" in the same row as "Email:" + And I see "You answered the eligibility questions" on the page + And I see "Yes" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + And I see "No" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see "No" in the same row as "Has it been decided that you 'lack mental capacity'?" + And I see "No" in the same row as "Are you currently on bail for a criminal offence?" + And I see "No" in the same row as "Have you been found guilty of a criminal offence?" + And I see "You responded to the proposed date of your jury service" on the page + And I see "I cannot do jury service and would like to be excused" in the same row as "Confirm the date of your jury service" + And I see "Because you asked to be excused from jury service, you told us" on the page + And I see "Excuse me please" in the same row as "Why do you need to be excused from jury service?" + And I see "No" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see "You told us about any help you'll need in court" on the page + And I see "No" in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your jury service?" + And I do not see "Please tell us about any special arrangements or help you need while you're doing jury service." on the page + And I see "Getting ready for jury service" on the page + And I see "The GOV.UK website has information to help you prepare for your jury service." on the page + And I see "Visit https://www.gov.uk/jury-service to learn about:" on the page + And I see "Taking time off work" on the page + And I see "Discussing the trial" on the page + And I see "What you can claim" on the page + And I see "How to claim expenses" on the page + And I see "Questions about jury service" on the page + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about your jury service, call the Jury Central Summoning Bureau." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100388 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@Regression @JDB-4531 +Scenario Outline: English 1st Party Deferral HTML Response Summary + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + And I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + And I see "No, I need to change the date" on the page + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #confirm dates + + And I set the radio button to "Yes" + And I press the "Continue" button + + #help in court + + When I set the radio button to "No" + And I press the "Continue" button + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #JDB-4553 + + Then I see "at least 2 weeks before your jury service starts, we'll send you:" on the page + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "You have said that you need to change the date of your jury service." on the page + And I see "What happens next" on the page + And I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + And I see "Then, at least 2 weeks before your jury service starts, we'll send you:" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "How you replied" on the page + And I see "You gave us these juror details" on the page + And I see "<first_name> <last_name>" on the page + And I see "27 April 1981" in the same row as "Date of Birth:" + And I see "02078211818" in the same row as "Main phone:" + And I see "<email>" in the same row as "Email:" + And I see "You answered the eligibility questions" on the page + And I see "Yes" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + And I see "No" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see "No" in the same row as "Has it been decided that you 'lack mental capacity'?" + And I see "No" in the same row as "Are you currently on bail for a criminal offence?" + And I see "No" in the same row as "Have you been found guilty of a criminal offence?" + And I see "You responded to the proposed date of your jury service" on the page + And I see "I need to change the date of my jury service" in the same row as "Confirm the date of your jury service" + And I see "No" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see "You told us about any help you'll need in court" on the page + And I see "No" in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your jury service?" + And I do not see "Please tell us about any special arrangements or help you need while you're doing jury service." on the page + And I see "Getting ready for jury service" on the page + And I see "The GOV.UK website has information to help you prepare for your jury service." on the page + And I see "Visit https://www.gov.uk/jury-service to learn about:" on the page + And I see "Taking time off work" on the page + And I see "Discussing the trial" on the page + And I see "What you can claim" on the page + And I see "How to claim expenses" on the page + And I see "Questions about jury service" on the page + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about your jury service, call the Jury Central Summoning Bureau." on the page + And I see "Jury Central Summoning Bureau" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100388 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@RegressionWelsh @JDB-4531 +Scenario Outline: Welsh 1st Party Straight Through (welsh court) + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #Check Your Name + + And I set the radio button to "Ydy" + And I press the "Parhau" button + + #Address + + And I set the radio button to "Ie" + When I press the "Parhau" button + + #Phone + + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + + #Email + + And I set "Nodwch eich cyfeiriad e-bost" to "<email>" + And I set "Nodwch eich cyfeiriad e-bost eto" to "<email>" + And I press the "Parhau" button + + #DoB + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Qualify for jury service + + When I press the "Parhau" button + + #Residency + + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Convictions + + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental Health Sectioned + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Confirm attendance + + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #RA + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + + #submit + + And I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" on the page + And I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" link + + And I see "Copi o’ch ymateb i wŷs rheithgor" on the page + And I see "<last_name>" in the same row as "Enw" + And I see "<part_no>" in the same row as "Rhif rheithiwr" + And I see "Manylion eich gwŷs rheithgor" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Llys" + And I see "Rydych wedi dweud eich bod yn gallu gwasanaethu ar reithgor ar y dyddiad a nodir" on the page + And I see "Beth fydd yn digwydd nesaf?" on the page + And I see "O leiaf 2 wythnos cyn ichi ddechrau gwasanaethu ar reithgor, byddwn yn anfon y canlynol atoch:" on the page + And I see "llythyr yn cadarnhau dyddiad eich gwasanaeth rheithgor" on the page + And I see "pecyn gwybodaeth am fod yn rheithiwr a'r llys byddwch yn mynd iddo" on the page + And I see "Sut wnaethoch ymateb" on the page + And I see "Bu i chi roi’r manylion rheithiwr a ganlyn" on the page + And I see "<first_name> <last_name>" in the same row as "Enw" + And I see "27 Ebrill 1978" in the same row as "Dyddiad Geni:" + And I see "0207 821 1818" in the same row as "Prif rif ffôn:" + And I see "<email>" in the same row as "E-bost:" + And I see "Mi wnaethoch ateb y cwestiynau cymhwysedd" on the page + And I see "Do" in the same row as "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" + And I see "Nac ydw" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see "Na" in the same row as "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" + And I see "Nac ydw" in the same row as "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" + And I see "Naddo" in the same row as "Ydych chi wedi'ch cael yn euog o drosedd?" + And I see "Gallaf wasanaethu ar reithgor ar y dyddiad a nodir" on the page + And I see "Bu ichi ddweud wrthym am unrhyw gymorth y byddwch ei angen yn y llys" on the page + And I see "Nac oes" in the same row as "A oes gennych anabledd neu nam sy’n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnoch yn yr adeilad llys ble fyddwch yn cyflawni eich gwasanaeth rheithgor?" + And I see "Paratoi ar gyfer eich gwasanaeth rheithgor" on the page + And I see "Mae gan wefan GOV.UK wybodaeth i’ch helpu chi baratoi ar gyfer eich gwasanaeth rheithgor" on the page + And I see "Ewch i https://www.gov.uk/jury-service i ddysgu am:" on the page + And I see "Cymryd amser i ffwrdd o’r gwaith" on the page + And I see "Trafod y treial" on the page + And I see "Sut i hawlio treuliau" on the page + And I see "Cwestiynau am wasanaeth rheithgor" on the page + And I see "Cysylltu gyda Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "Os oes gennych unrhyw gwestiynau am eich gwasanaeth rheithgor, ffoniwch Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "Dydd Llun i ddydd Iau, 9am tan 5pm" on the page + And I see "Dydd Gwener, 9am tan 3pm" on the page + And I see "Canfod mwy am gostau galwadau" on the page + + Then I press the "back" button on my browser + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100048 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@Regression @JDB-4531 +Scenario Outline: English 3rd Party Deferral HTML Response summary + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #Why are you replying title + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1988" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + # Have you ever worked + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #confirm dates + + When I set the radio button to "Yes" + And I press the "Continue" button + + #help in court + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "You have said that you need to change the date of your jury service." on the page + And I see "What happens next" on the page + And I see "We'll write to you within the next 7 days to let you know if you can change the date of your jury service." on the page + And I see "Then, at least 2 weeks before your jury service starts, we'll send you:" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + + And I see "How you replied" on the page + And I see "You gave us these details about the person you're replying for" on the page + And I see "<first_name> <last_name>" on the page + And I see "1 January 1988" in the same row as "Date of Birth:" + + And I see "You're replying for another person called for jury service. You told us this about yourself" on the page + And I see "FirstNameA LastNameB" in the same row as "Your name:" + And I see "Friend" in the same row as "Your relationship to the summoned:" + And I see "0207 821 1818" in the same row as "Your main phone number:" + And I see "<email>" in the same row as "Your email address:" + And I see "The person is not here" in the same row as "Your reason for replying on behalf of the juror:" + + And I see "You answered the eligibility questions for the person you're replying for" on the page + And I see "Yes" in the same row as "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + And I see "No" in the same row as "Is the person you're replying for being detained, looked after or treated under the Mental Health Act?" + And I see "No" in the same row as "Has it been decided that the person you're replying for 'lacks mental capacity'?" + And I see "No" in the same row as "Is the person currently on bail for a criminal offence?" + And I see "No" in the same row as "Has the person been found guilty of a criminal offence?" + + And I see "You responded to the proposed date of the jury service" on the page + And I see "I need to change the date of jury service for the person I'm answering for" in the same row as "Confirm the date of their jury service" + + And I see "As you asked for the person to do jury service on a different date you told us" on the page + And I see "Deferral Reason" on the page + + And I see "No" in the same row as "Has the person you're replying for worked in the criminal justice system in the last 5 years?" + + And I see "You told us about any help the person you're replying for needs in court" on the page + And I see "No" in the same row as "Does the person have a disability or impairment that means they'll need extra support or facilities in the court building where they are doing jury service?" + And I do not see "Please tell us about any special arrangements or help the person you're answering for needs while they're doing jury service." on the page + + And I see "Getting ready for jury service" on the page + And I see "The GOV.UK website has information to help you prepare for your jury service." on the page + And I see "Visit https://www.gov.uk/jury-service to learn about:" on the page + And I see "Taking time off work" on the page + And I see "Discussing the trial" on the page + And I see "What you can claim" on the page + And I see "How to claim expenses" on the page + And I see "Questions about jury service" on the page + + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about your jury service, call the Jury Central Summoning Bureau." on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100552 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@Regression @JDB-4531 +Scenario Outline: English 1st Party Overage HTML Response Summary + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Moving past Name Section + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + When I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #On DoB Screen + + Then I see "What is your date of birth?" on the page + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1900" + + #Moving past DoB Section + + And I press the "Continue" button + Then I see "Is your date of birth correct?" on the page + + Then I set the radio button to "Yes" + + And I press the "Continue" button + Then I see "Check your answers now" on the page + And I see text "27 April 1900" in the same row as "Date of birth" + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + #HTML Response Summary + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "Your age makes you ineligible to do jury service." on the page + And I see "What happens next" on the page + And I see "By law, jurors must be aged 18 to 75. You do not have to do jury service because you are younger than 18 or older than 75." on the page + And I see "We'll write to confirm that you do not have to do jury service." on the page + And I see "You do not need to do anything else." on the page + + And I see "How you replied" on the page + And I see "You gave us these juror details" on the page + And I see "<first_name> <last_name>" on the page + And I see "27 April 1900" in the same row as "Date of Birth:" + And I see "02078211818" in the same row as "Main phone:" + And I see "<email>" in the same row as "Email:" + + And I do not see "Getting ready for jury service" on the page + And I do not see "Taking time off work" on the page + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about this, call the Jury Central Summoning Bureau." on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100536 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@Regression @JDB-4531 +Scenario Outline: English 3rd Deceased HTML Response Summary + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + #Login + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I set "First name" to "FirstName" + And I set "Last name" to "LastName" + And I press the "Continue" button + + #Relationship to Juror + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "02078211818" + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why Are You Replying + + When I set the radio button to "The person has died" + And I press the "Continue" button + + #Check Your Answers Now + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + Then I see "You have completed your reply" on the page + + #HTML Response Summary + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "You have said that the person summoned is deceased." on the page + And I see "What happens next" on the page + And I see "You do not need to do anything else." on the page + And I see "We're sorry for any distress" on the page + And I see "Jurors are selected at random from the electoral roll. This is not always completely up to date. That's why we sent a jury summons to this person. We do apologise for this and hope it has not caused too much distress." on the page + + And I do not see "How you replied" on the page + And I do not see "Getting ready for jury service" on the page + And I do not see "Taking time off work" on the page + And I do not see "Discussing the trial" on the page + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about this, call the Jury Central Summoning Bureau." on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Telephone: 0300 456 1024" on the page + And I see "Monday to Thursday 9am to 5pm" on the page + And I see "Friday 9am to 3pm" on the page + And I see "Find out about call charges" on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645100857 |451170401 |DOE |SW1H 9AJ |e@eeee.com | + +@Regression @JDB-4531 +Scenario Outline: English 1st ST HTML Check + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #bail + + Then I see "Are you currently on bail" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #crim offence + + Then I see "Have you been found guilty of a criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #confirm date + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in Court + #3608 + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Answers + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "You have said that you can do jury service on the date shown." on the page + And I see "What happens next" on the page + And I see "At least 2 weeks before your jury service starts, we'll send you:" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "How you replied" on the page + And I see "You gave us these juror details" on the page + And I see "<first_name> <last_name>" on the page + And I see "27 April 1981" in the same row as "Date of Birth:" + And I see "02078211818" in the same row as "Main phone:" + And I see "<email>" in the same row as "Email:" + And I see "You answered the eligibility questions" on the page + And I see "Yes" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + And I see "No" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see "No" in the same row as "Has it been decided that you 'lack mental capacity'?" + And I see "No" in the same row as "Are you currently on bail for a criminal offence?" + And I see "No" in the same row as "Have you been found guilty of a criminal offence?" + And I see "You responded to the proposed date of your jury service" on the page + And I see "I can do jury service on the date shown" in the same row as "Confirm the date of your jury service" + And I see "No" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see "You told us about any help you'll need in court" on the page + And I see "No" in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your jury service?" + And I do not see "Please tell us about any special arrangements or help you need while you're doing jury service." on the page + And I see "Getting ready for jury service" on the page + And I see "The GOV.UK website has information to help you prepare for your jury service." on the page + And I see "Visit https://www.gov.uk/jury-service to learn about:" on the page + And I see "Taking time off work" on the page + And I see "Discussing the trial" on the page + And I see "What you can claim" on the page + And I see "How to claim expenses" on the page + And I see "Questions about jury service" on the page + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about your jury service, call the Jury Central Summoning Bureau." on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100289 |451170401 |JOHN |DOE |SW1H 9AJ |e@eeee.com | + +@Regression @JDB-4531 +Scenario Outline: English 1st Ineligible HTML Check + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "No" + And I press the "Continue" button + And I set "First name" to "<first_name>" + And I set "Last name" to "<last_name>" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I set "Another phone" to "09999999999" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + And I set the radio button to "No" + And I set "Provide details about where you have lived since your 13th birthday" to "Residency" + And I press the "Continue" button + And I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Police Service" + And I press the "Continue" button + And I set the radio button to "Yes" + And I set "Provide details about your bail and criminal offence" to "Bail" + And I press the "Continue" button + And I set the radio button to "Yes" + When I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + And I set the radio button to "Yes" + And I set "Provide details about how you're being detained, looked after or treated under the Mental Health Act" to "Mental Health Sectioned" + And I press the "Continue" button + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "Mental Health Capacity" + And I press the "Continue" button + + #confirm date + + And I see "No, I need to change the date" on the page + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set the "First" single date field to a Monday "9" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "11" weeks in the future + + And I press the "Continue" button + + #confirm + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "Yes" + And I check the "Diabetes" checkbox + Then I set "Tell us about any special arrangements or help you need while you're doing jury service." to "Special Need is DIABETES" + And I press the "Continue" button + + #Check Answers + + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + #Confirmation + + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + And I click on the "Download a copy of your summons reply HTML" link + And I see "Copy of your jury summons reply" on the page + And I see "<last_name>" in the same row as "Name" + And I see "<part_no>" in the same row as "Juror number" + And I see "Your jury summons details" on the page + And I see "THE CROWN COURT AT SHEFFIELD" in the same row as "Court" + And I see "You have said that you need to change the date of your jury service." on the page + And I see "What happens next?" on the page + And I see "Your answers mean that you might not be able to do jury service. We will now check your answers." on the page + And I see "We may also get in touch to talk about the help you need so you can do jury service, and whether you are able to be excused." on the page + And I see "We'll be in touch within the next 7 days." on the page + And I see "If you are able to do jury service, at least 2 weeks before it starts we'll send you" on the page + And I see "a letter confirming the date of your jury service" on the page + And I see "an information pack about being a juror and the court you're going to" on the page + And I see "How you replied" on the page + And I see "You gave us these juror details" on the page + And I see "<first_name> <last_name>" on the page + And I see "27 April 1981" in the same row as "Date of Birth:" + And I see "02078211818" in the same row as "Main phone:" + And I see "09999999999" in the same row as "Another phone (optional):" + And I see "<email>" in the same row as "Email:" + And I see "You answered the eligibility questions" on the page + And I see "No" in the same row as "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" + And I see "Yes" in the same row as "Are you being detained, looked after or treated under the Mental Health Act?" + And I see "Yes" in the same row as "Has it been decided that you 'lack mental capacity'?" + And I see "Yes" in the same row as "Are you currently on bail for a criminal offence?" + And I see "Yes" in the same row as "Have you been found guilty of a criminal offence?" + And I see "You responded to the proposed date of your jury service" on the page + And I see "I need to change the date of my jury service" in the same row as "Confirm the date of your jury service" + And I see "Deferral Reason" on the page + And I see "Yes" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see "You told us about any help you'll need in court" on the page + And I see "Yes" in the same row as "Do you have a disability or impairment that means you'll need extra support or facilities in the court building where you are doing your jury service?" + And I see "Special Need is DIABETES" in the same row as "Please tell us about any special arrangements or help you need while you're doing jury service." + And I see "Getting ready for jury service" on the page + And I see "The GOV.UK website has information to help you prepare for your jury service." on the page + And I see "Visit https://www.gov.uk/jury-service to learn about:" on the page + And I see "Taking time off work" on the page + And I see "Discussing the trial" on the page + And I see "What you can claim" on the page + And I see "How to claim expenses" on the page + And I see "Questions about jury service" on the page + And I see "Contacting the Jury Central Summoning Bureau" on the page + And I see "If you have any questions about your jury service, call the Jury Central Summoning Bureau." on the page + + Then I press the "back" button on my browser + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply HTML" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100236 |451170401 |Sarah-Louise |DOE |SW1H 9AJ |e@eeee.com | diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_JDB-3845.feature b/src/test/resources/cucumber/features/regression/REGRESSION_JDB-3845.feature new file mode 100644 index 00000000..8ab9ccbd --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_JDB-3845.feature @@ -0,0 +1,1255 @@ +Feature: Regression Test JDB-3845 + +#CJS Question + +@RegressionWelsh @JDB-3845 +Scenario Outline: Welsh_3rd_CJS + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + + And I set "Sut ydych chi" to "Friend" + And I press the "Parhau" button + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e" checkbox + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + + When I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + + Then I set the radio button to "Ydy" + And I press the "Parhau" button + + Then I set the radio button to "Ie" + And I press the "Parhau" button + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + And I press the "Parhau" button + +#Residency + + And I set the radio button to "Do" + And I press the "Parhau" button + +#CJS + + And I set the radio button to "Ydy" + Then I see "Dewiswch unrhyw sefydliadau y mae'r unigolyn rydych yn ymateb ar ei ran wedi gweithio iddynt." on the page + And I check the "Yr heddlu" checkbox + And I set "Pa heddlu?" to "London Police service" + And I check the "Gwasanaeth Carchardai EM" checkbox + And I set "Pa ran o Wasanaeth Carchardai EM?" to "London Prison Service" + And I check the "Y Farnwriaeth" checkbox + And I check the "Yr Asiantaeth Troseddu Cenedlaethol" checkbox + And I check the "Gwasanaeth Llysoedd a Thribiwnlysoedd EM" checkbox + And I check the "Arall" checkbox + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Other part CJS" + And I press the "Parhau" button + +#Bail + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + +#Criminal Convictions + + And I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + +#Mental Health + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + +#Can you attend + + And I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + + And I set the radio button to "Nac oes" + + When I press the "Parhau" button + + #check answers + + And I see text "Ydy" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Yr heddlu" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "London Police service" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Gwasanaeth Carchardai EM" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "London Prison Service" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Yr Asiantaeth Troseddu Cenedlaethol" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Y Farnwriaeth" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Gwasanaeth Llysoedd a Thribiwnlysoedd EM" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Arall" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Other part CJS" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100710 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + +@RegressionWelsh @JDB-3845 +Scenario Outline: Welsh_1st_CJS + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + +#Juror's details + + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + +#Juror's address + + And I see "A fydd eich cyfeiriad chi yn newid yn fuan?" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + +#Juror's phone + + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + +#Juror's email + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + +#DoB + + And I see "Cymorth gyda'ch dyddiad geni" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + +#Do you qualify for jury service? + + When I press the "Parhau" button + +#Residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I press the "Parhau" button + +#CJS + + And I set the radio button to "Ydw" + And I check the "Yr heddlu" checkbox + And I set "Pa heddlu?" to "London Met Police Force" + And I check the "Gwasanaeth Carchardai EM" checkbox + And I set "Pa ran o Wasanaeth Carchardai EM?" to "Wandsworth Prison" + And I check the "Yr Asiantaeth Troseddu Cenedlaethol" checkbox + And I check the "Y Farnwriaeth" checkbox + And I check the "Gwasanaeth Llysoedd a Thribiwnlysoedd EM" checkbox + And I check the "Arall" checkbox + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Another part of the CJS" + And I press the "Parhau" button + +#Bail (Yes and no will be tested) + + And I set the radio button to "Ydw" + And I see "Nac ydw" on the page + And I set "Rhowch fanylion" to "I am on bail for crimes" + And I press the "Parhau" button + +#Convictions + + And I set the radio button to "Naddo" + And I press the "Parhau" button + +#Mental health sectioned + + And I set the radio button to "Ie" + And I set "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" to "I am sectioned" + And I press the "Parhau" button + +#Mental health capacity + + And I set the radio button to "Ie" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" to "I lack capacity" + And I press the "Parhau" button + +#Can you attend + + And I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + +#Special Requirements + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + +#Check your answers page + + And I see text "Ydw" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Yr heddlu" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "London Met Police Force" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Gwasanaeth Carchardai EM" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Wandsworth Prison" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Yr Asiantaeth Troseddu Cenedlaethol" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Y Farnwriaeth" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Gwasanaeth Llysoedd a Thribiwnlysoedd EM" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Arall" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Another part of the CJS" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100443 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + +@Regression @JDB-3845 +Scenario Outline: English_3rd party_CJS + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why are you replying for juror + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Does the person you're answering for qualify for jury service? + + Then I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Eligibility questions + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS Emp + + And I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police Force" + And I check the "HM Prison Service" checkbox + And I set "Which part of HM Prison Service" to "Wandsworth Prison" + And I check the "the National Crime Agency" checkbox + And I check the "the Judiciary" checkbox + And I check the "HM Courts & Tribunal Service" checkbox + And I check the "Other" checkbox + And I set "Which other part of the Criminal Justice System?" to "Another part of the CJS" + And I press the "Continue" button + + And I set the radio button to "No" + And I press the "Continue" button + And I set the radio button to "No" + And I press the "Continue" button + And I set the radio button to "No" + And I press the "Continue" button + And I set the radio button to "No" + And I press the "Continue" button + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I see text "Yes" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Police service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "London Met Police Force" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Prison Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Wandsworth Prison" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the National Crime Agency" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the Judiciary" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Courts & Tribunal Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Other" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Another part of the CJS" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + When I press the "Submit" button + + #JDB-3031 + #JDB-3704 + + Then I see "You have completed your reply" on the page + Then I see "If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them." on the page + Then I see "We have sent an email to say you have replied to this jury summons." on the page + Then I see "Download a copy of your summons reply" on the page + And I see "a letter confirming the date of their jury service" on the page + And I see "an information pack about being a juror and the court they're going to" on the page + And I see "Getting ready for jury service" on the page + And I see "The information below is also in the email that we have sent." on the page + And I see "You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch." on the page + And I see "Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses." on the page + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + And I see "What did you think of this service? (Takes 30 seconds)" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100187 |DOE |SW1H 9AJ |email@outlook.com |451170401 | + +@Regression @JDB-3845 +Scenario Outline: English_1st Party_CJS + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + + And I press the "Continue" button + + And I set the radio button to "Yes" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS Emp + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police Force" + And I check the "HM Prison Service" checkbox + And I set "Which part of HM Prison Service" to "Wandsworth Prison" + And I check the "the National Crime Agency" checkbox + And I check the "the Judiciary" checkbox + And I check the "HM Courts & Tribunal Service" checkbox + And I check the "Other" checkbox + And I set "Which other part of the Criminal Justice System?" to "Another part of the CJS" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I see text "Yes" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Police service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "London Met Police Force" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Prison Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Wandsworth Prison" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the National Crime Agency" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the Judiciary" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Courts & Tribunal Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Other" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Another part of the CJS" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + Then I click on the "CJS employment" link + Then I see "Police Force" on the page + And I see "London Met Police Force" on the page + And I see "HM Prison Service" on the page + And I see "Wandsworth Prison" on the page + And I see "National Crime Agency" on the page + And I see "Judiciary" on the page + And I see "HMCTS" on the page + And I see "Other" on the page + And I see "Another part of the CJS" on the page + + #taken out edit functions on bureau + +# Then I click on the "Change" link +# And I see "CJS employment" on the page +# And the radio button "Yes" is "selected" +# And "Police Force" is checked +# And I see "London Met Police Force" on the page +# And "HM Prison Service" is checked +# And I see "Wandsworth Prison" on the page +# And "the National Crime Agency" is checked +# And "the Judiciary" is checked +# And "HMCTS" is checked +# And "Other" is unchecked +# And I see "Another part of the CJS" on the page +# +# And I set the radio button to "No" under "CJS Employment" +# And I do not see "London Met Police Force" on the page +# And I do not see "Wandsworth Prison" on the page +# And I do not see "Another part of the CJS" on the page +# +# And I set the radio button to "Yes" under "CJS Employment" +# And I see "CJS Employment" on the page +# And the radio button "Yes" is "selected" +# And "Police Force" is checked +# And I see "London Met Police Force" on the page +# And "HM Prison Service" is checked +# And I see "Wandsworth Prison" on the page +# And "the National Crime Agency" is checked +# And "the Judiciary" is checked +# And "HMCTS" is checked +## And "Other" is checked +# And I see "Another part of the CJS" on the page +# +# And I click link with ID "cjsEmploymentSaveButton" +# And I see "Please give a reason for the change to this summons reply" on the page +# And I set "Please give a reason for the change to this summons reply" to "CJSEmployeeChangeNotes" +# +# And I click link with ID "changeLogSaveButton" +# Then I see "Police Force" on the page +# And I see "London Met Police Force" on the page +# And I see "HM Prison Service" on the page +# And I see "Wandsworth Prison" on the page +# And I see "National Crime Agency" on the page +# And I see "Judiciary" on the page +# And I see "HMCTS" on the page +# And I see "Other" on the page +# And I see "Another part of the CJS" on the page + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I see "Responded" on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |645100192 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + +@Regression @JDB-3845 +Scenario Outline: English_1st Party_CJS + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + + And I press the "Continue" button + + And I set the radio button to "Yes" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS Emp + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police Force" + And I check the "HM Prison Service" checkbox + And I set "Which part of HM Prison Service" to "Wandsworth Prison" + And I check the "the National Crime Agency" checkbox + And I check the "the Judiciary" checkbox + And I check the "HM Courts & Tribunal Service" checkbox + And I check the "Other" checkbox + And I set "Which other part of the Criminal Justice System?" to "Another part of the CJS" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I see text "Yes" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Police service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "London Met Police Force" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Prison Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Wandsworth Prison" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the National Crime Agency" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the Judiciary" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Courts & Tribunal Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Other" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Another part of the CJS" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100380 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + +@Regression @JDB-3845 +Scenario Outline: English_1st Party_CJS_Change Selection + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + + And I press the "Continue" button + + And I set the radio button to "Yes" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS Emp No + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I set the radio button to "No" + And I press the "Continue" button + + And I click on the "Back" link + + Then the radio button "No" is "selected" + And I do not see "the Judiciary" on the page + And I do not see "HM Courts & Tribunal Service" on the page + + And I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police Force" + And I check the "HM Prison Service" checkbox + And I set "Which part of HM Prison Service" to "Wandsworth Prison" + And I check the "the National Crime Agency" checkbox + And I check the "the Judiciary" checkbox + And I check the "HM Courts & Tribunal Service" checkbox + And I check the "Other" checkbox + And I set "Which other part of the Criminal Justice System?" to "Another part of the CJS" + + Then I set the radio button to "No" + And I do not see "the Judiciary" on the page + And I do not see "HM Courts & Tribunal Service" on the page + + Then I set the radio button to "Yes" + Then the radio button "Yes" is "selected" + And "Police service" is checked + And "Which police service?" is "London Met Police Force" + And "HM Prison Service" is checked + And "Which part of HM Prison Service" is "Wandsworth Prison" + And "the National Crime Agency" is checked + And "the Judiciary" is checked + And "HM Courts & Tribunal Service" is checked + And "Other" is checked + And "Which other part of the Criminal Justice System?" is "Another part of the CJS" + + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I see text "Yes" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Police service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "London Met Police Force" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Prison Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Wandsworth Prison" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the National Crime Agency" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "the Judiciary" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "HM Courts & Tribunal Service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Other" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Another part of the CJS" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + #change CJS answers + + When I click on the "Change" link in the same row as "Have you worked in the criminal justice system in the last 5 years?" + Then the radio button "Yes" is "selected" + And "Police service" is checked + And "Which police service?" is "London Met Police Force" + And "HM Prison Service" is checked + And "Which part of HM Prison Service" is "Wandsworth Prison" + And "the National Crime Agency" is checked + And "the Judiciary" is checked + And "HM Courts & Tribunal Service" is checked + And "Other" is checked + And "Which other part of the Criminal Justice System?" is "Another part of the CJS" + + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I see text "No" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode | email | pool_no | + |645100411 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + +@Regression @JDB-3845 +Scenario Outline: English_1st Party_CJS_Errors + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + + And I press the "Continue" button + + And I set the radio button to "Yes" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS Emp no selection errors + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Select whether you've worked in the criminal justice system in the last 5 years" on the page + + #CJS Emp Yes but so selection errors + + And I set the radio button to "Yes" + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Tick any organisations you worked for directly (not as a third party or subcontractor)" on the page + + And I check the "Police service" checkbox + And I check the "HM Prison Service" checkbox + And I check the "the National Crime Agency" checkbox + And I check the "the Judiciary" checkbox + And I check the "HM Courts & Tribunal Service" checkbox + And I check the "Other" checkbox + + #CJS Emp selction but no description errors + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Give details of where and when you have worked for the police service" on the page + And I see "Give details of where and when you have worked for HM Prison Service" on the page + And I see "Give details of where and when you have worked for another Criminal Justice System employer" on the page + + And I set "Which police service?" to "London Met Police Force" + And I set "Which part of HM Prison Service" to "Wandsworth Prison" + And I set "Which other part of the Criminal Justice System?" to "Another part of the CJS" + + And I press the "Continue" button + Then I click on the "Back" link + + #De-select + + And I uncheck the "Police service" checkbox + Then I do not see "Which police service?" on the page + And I uncheck the "HM Prison Service" checkbox + Then I do not see "Which part of HM Prison Service" on the page + And I uncheck the "the National Crime Agency" checkbox + And I uncheck the "the Judiciary" checkbox + And I uncheck the "HM Courts & Tribunal Service" checkbox + And I uncheck the "Other" checkbox + Then I do not see "Which other part of the Criminal Justice System?" on the page + + #errors + + And I press the "Continue" button + And I see "There is a problem" on the page + And I see "Tick any organisations you worked for directly (not as a third party or subcontractor)" on the page + + Then I set the radio button to "No" + And I do not see "the Judiciary" on the page + And I do not see "HM Courts & Tribunal Service" on the page + + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I see text "No" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100935 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + +@RegressionWelsh @JDB-3845 +Scenario Outline: Welsh_1st_CJS_Errors + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + +#Juror's details + + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + +#Juror's address + + And I see "A fydd eich cyfeiriad chi yn newid yn fuan?" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + +#Juror's phone + + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + +#Juror's email + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + +#DoB + + And I see "Cymorth gyda'ch dyddiad geni" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + +#Do you qualify for jury service? + + When I press the "Parhau" button + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + +#Residency + + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I press the "Parhau" button + +#CJS + +#CJS Emp no selection errors + + And I press the "Parhau" button + And I see "Mae problem" on the page + And I see "Dewiswch a ydych wedi gweithio yn y system cyfiawnder troseddol yn ystod y 5 mlynedd diwethaf" on the page + +#CJS Emp Yes but so selection errors + + And I set the radio button to "Ydw" + And I press the "Parhau" button + And I see "Mae problem" on the page + And I see "Ticiwch unrhyw sefydliadau rydych wedi gweithio iddynt yn uniongyrchol (nid fel trydydd parti neu is-gontractwr)" on the page + + And I check the "Yr heddlu" checkbox + And I check the "Gwasanaeth Carchardai EM" checkbox + And I check the "Yr Asiantaeth Troseddu Cenedlaethol" checkbox + And I check the "Y Farnwriaeth" checkbox + And I check the "Gwasanaeth Llysoedd a Thribiwnlysoedd EM" checkbox + And I check the "Arall" checkbox + + #CJS Emp selction but no description errors + + And I press the "Parhau" button + + And I see "Mae problem" on the page + + And I see "Rhowch fanylion am ble a phryd roeddech yn gweithio i'r Heddlu" on the page + And I see "Rhowch fanylion am ble a phryd roeddech yn gweithio i Wasanaeth Carchardai EM" on the page + And I see "Rhowch fanylion am pryd a lle rydych wedi gweithio mewn rhan arall o'r system cyfiawnder troseddol" on the page + And I set "Pa heddlu?" to "London Met Police Force" + And I set "Pa ran o Wasanaeth Carchardai EM?" to "Wandsworth Prison" + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Another part of the CJS" + + And I press the "Parhau" button + Then I click on the "Cliciwch i fynd yn ôl" link + + #De-select + + And I uncheck the "Yr heddlu" checkbox + Then I do not see "Pa heddlu?" on the page + And I uncheck the "Gwasanaeth Carchardai EM" checkbox + Then I do not see "Pa ran o Wasanaeth Carchardai EM?" on the page + And I uncheck the "Yr Asiantaeth Troseddu Cenedlaethol" checkbox + And I uncheck the "Y Farnwriaeth" checkbox + And I uncheck the "Gwasanaeth Llysoedd a Thribiwnlysoedd EM" checkbox + And I uncheck the "Arall" checkbox + Then I do not see "Pa ran arall o’r System Cyfiawnder Troseddol?" on the page + + #errors + + And I press the "Parhau" button + And I see "Mae problem" on the page + And I see "Ticiwch unrhyw sefydliadau rydych wedi gweithio iddynt yn uniongyrchol (nid fel trydydd parti neu is-gontractwr)" on the page + + Then I set the radio button to "Nac ydw" + And I do not see "Y Farnwriaeth" on the page + And I do not see "Gwasanaeth Llysoedd a Thribiwnlysoedd EM" on the page + + And I press the "Parhau" button + +#Bail + + And I set the radio button to "Ydw" + And I see "Nac ydw" on the page + And I set "Rhowch fanylion" to "I am on bail for crimes" + And I press the "Parhau" button + +#Convictions + + And I set the radio button to "Naddo" + And I press the "Parhau" button + +#Mental health sectioned + + And I set the radio button to "Ie" + And I set "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" to "I am sectioned" + And I press the "Parhau" button + +#Mental health capacity + + And I set the radio button to "Ie" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" to "I lack capacity" + And I press the "Parhau" button + +#Can you attend + + And I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + +#Special Requirements + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + +#Check your answers page + + And I see text "Nac ydw" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100043 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_JDB-4562_Def_Dates_Messages.feature b/src/test/resources/cucumber/features/regression/REGRESSION_JDB-4562_Def_Dates_Messages.feature new file mode 100644 index 00000000..e5ebad14 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_JDB-4562_Def_Dates_Messages.feature @@ -0,0 +1,610 @@ +Feature: Regression JDB-4562 Defferal Dates Messages + +@Regression @JDB-4531 +Scenario Outline: English 1st Party Deferral Dates Messages + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + And I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + When I set the radio button to "No" + And I press the "Continue" button + + And I see "No, I need to change the date" on the page + And I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + And I see "Tell us why you need another date for your jury service" on the page + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + And I press the "Continue" button + + And on the page I see + |text| + |Enter the first Monday you'd prefer to start jury service| + |Enter the second Monday you'd prefer to start jury service| + |Enter the third Monday you'd prefer to start jury service| + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "100" weeks in the future + + And I press the "Continue" button + +# JDB-4562 + + And I see "Your third choice must be a Monday between" on the page + + When I set the "First" single date field to a Monday "13" weeks in the future + When I set the "Second" single date field to a Monday "14" weeks in the future + When I set the "Third" single date field to a Monday "15" weeks in the future + + And I press the "Continue" button + + #confirm dates + + When I set the radio button to "Yes" + And I press the "Continue" button + + #help in court + + When I set the radio button to "No" + And I press the "Continue" button + + When I click on the "Change" link in the same row as "Choose 3 Mondays when you can start jury service" + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #confirm dates + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100344 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@RegressionWelsh @JDB-4562 +Scenario Outline: Welsh 1st Party Deferral Dates Messaged + + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #Juror's details + + And I set the radio button to "Ydy" + When I press the "Parhau" button + + #Juror's address + + And I set the radio button to "Ie" + When I press the "Parhau" button + + #Juror's phone + + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + + #Juror's email + + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #DoB and JDB-3409 + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Do you qualify for jury service? + + When I press the "Parhau" button + + #Residency + + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Criminal convictions + + And I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental health sectioned + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental health capacity + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Can you attend + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + + #JDB-3448 and JDB-3503 + + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + + #Deferral Reason + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Parhau" button + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "100" weeks in the future + + + And I press the "Parhau" button + + #JDB-4562 + + Then I see "Rhaid i'ch trydydd dewis fod yn ddydd Llun rhwng" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + And I set the radio button to "Ydw" + When I press the "Parhau" button + + #Special Requirements + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see text "askForAnotherDateReasonWhy" in the same row as "Eglurwch pam eich bod angen newid dyddiad eich gwasanaeth rheithgor" + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3071 + + And I see "Byddwn yn ysgrifennu atoch yn y 7 diwrnod nesaf i roi gwybod ichi os gallwch newid dyddiad eich gwasanaeth rheithgor." on the page + And I see "Yna, o leiaf bythefnos cyn i'ch gwasanaeth rheithgor ddechrau, byddwn yn anfon y canlynol atoch:" on the page + +Examples: + |part_no |last_name |postcode | email |pool_no | + |645100345 |LNAMENINENINESEVEN |SW1H 9AJ |a@eeee.com |451170401 | + +@Regression @JDB-4562 +Scenario Outline: English 3rd Party Deferral Dates Messages + + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "<first_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I see "Your Details" on the page + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #Why are you replying title + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1988" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + # Have you ever worked + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "No, we need to change the date" + And I press the "Continue" button + + #Deferral Reason + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Continue" button + + #JDB-3445 Deferral Date Screen Layout + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "100" weeks in the future + + And I press the "Continue" button + + #JDB-4562 + + Then I see "Their third choice must be a Monday between" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + When I set the radio button to "Yes" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + When I click on the "Change" link in the same row as "Give us 3 dates the person you're replying for could start jury service during the next 12 months" + And I press the "Continue" button + + When I set the radio button to "Yes" + And I press the "Continue" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + + Then I see "You have completed your reply" on the page + +Examples: + |part_no |pool_no |first_name |last_name |postcode |email | + |645100349 |451170401 |John |Doe |SW1H 9AJ |a@eeee.com | + +@RegressionWelsh @JDB-4652 +Scenario Outline: Welsh 3rd Party Deferral Dates Messages + + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I see "Rwy'n ymateb ar ran rhywun arall" on the page + And I see "Rwy'n ymateb dros fy hun" on the page + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #3rd Party Relationship + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Relationship" + And I press the "Parhau" button + + #3rd party Contact + + When I see "Eich manylion cyswllt" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + #Why replying + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Juror's Name + + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #Juror's DOB + + And I set "Diwrnod" to "01" + And I set "Mis" to "01" + And I set "Blwyddyn" to "1990" + And I press the "Parhau" button + + #Checking field JDB-3106 + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service JDB-3107 + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #can you attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + + #JDB-3448 and JDB-3503 + + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + #Reasons for Deferral Request + + When I set text area with "id" of "deferralReason" to "Reasons for deferral request" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "100" weeks in the future + + + And I press the "Parhau" button + + Then I see "Rhaid i'w trydydd dewis fod yn ddydd Llun rhwng" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + When I set the radio button to "Ydw" + When I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3071 + + And I see "Byddwn yn ysgrifennu at yr unigolyn rydych wedi ymateb ar ei ran yn y 7 diwrnod nesaf i roi gwybod iddynt os gallant newid dyddiad eu gwasanaeth rheithgor." on the page + And I see "Yna, o leiaf bythefnos cyn i'w gwasanaeth rheithgor ddechrau, byddwn yn anfon y canlynol atynt:" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100356 |LNAMESIXSIXZERO |SW1H 9AJ |a@eeee.com |451170401 | diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_JDB-5345-spaces in null values.feature b/src/test/resources/cucumber/features/regression/REGRESSION_JDB-5345-spaces in null values.feature new file mode 100644 index 00000000..6aeba68f --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_JDB-5345-spaces in null values.feature @@ -0,0 +1,178 @@ +Feature: JDB-5345 null values are not saved as spaces + +@Features +Scenario Outline: 1st Party English null values are not saved as spaces + + #moved to Features 02-02-24 move back to Regression + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + Given there is only a bureau copy of the record for juror "<part_no>" + + # Set part_no pool to not be urgent + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + # Submit response in pool + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|<postcode> |a@a.com| + + Then I see "You have completed your reply" on the page + + Then on "JUROR" . "POOL" I see "TITLE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ADDRESS3" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ADDRESS5" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ADDRESS6" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PH_LOCAL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TIMES_SEL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TRIAL_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "JUROR_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DEF_DATE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DATE_EXCUS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "EXC_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ACC_EXC" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DATE_DISQ" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DISQ_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "MILEAGE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "LOCATION" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NOTES" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_ATTENDANCES" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_DEF_POS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_ATTENDED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_FTA" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_AWOL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "EDIT_TAG" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PERM_DISQUAL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PAY_COUNTY_EMP" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PAY_EXPENSES" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SPEC_NEED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SPEC_NEED_MSG" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SMART_CARD" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "AMT_SPENT" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "COMPLETION_FLAG" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SORT_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "BANK_ACCT_NAME" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "BANK_ACCT_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "BLDG_SOC_ROLL_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "WAS_DEFERRED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ID_CHECKED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "POSTPONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "WELSH" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PAID_CASH" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TRAVEL_TIME" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SCAN_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "FINANCIAL_LOSS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "POLICE_CHECK" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SUMMONS_FILE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "REMINDER_SENT" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PHOENIX_CHECKED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "CONTACT_PREFERENCE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SERVICE_COMP_COMMS_STATUS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TRANSFER_DATE" is null where "PART_NO" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode | + |641500761 |415171001 |LNAMEONE |CH1 2AN | + +@Features +Scenario Outline: 3rd Party English null values are not saved as spaces + + #moved to Features 02-02-24 move back to Regression + + Given I am on "Bureau" "test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + Given there is only a bureau copy of the record for juror "<part_no>" + +# Set part_no pool to not be urgent + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + +# Submit response in pool + Given I have submitted a third party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|<postcode> |a@a.com| + +#respond the response + Given I am on "Bureau" "test" + When I log in as "SYSTEM" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + Then I see "<part_no>" in the same row as "<part_no>" + When I click on "<part_no>" in the same row as "<part_no>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "TITLE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ADDRESS3" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ADDRESS5" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ADDRESS6" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "H_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PHONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "W_PH_LOCAL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TIMES_SEL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TRIAL_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "JUROR_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DEF_DATE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DATE_EXCUS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "EXC_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ACC_EXC" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DATE_DISQ" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DISQ_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "MILEAGE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "LOCATION" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NOTES" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_ATTENDANCES" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_DEF_POS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_ATTENDED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_FTA" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "NO_AWOL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "EDIT_TAG" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PERM_DISQUAL" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PAY_COUNTY_EMP" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PAY_EXPENSES" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SPEC_NEED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SPEC_NEED_MSG" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SMART_CARD" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "AMT_SPENT" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "COMPLETION_FLAG" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SORT_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "BANK_ACCT_NAME" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "BANK_ACCT_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "BLDG_SOC_ROLL_NO" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "WAS_DEFERRED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "ID_CHECKED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "POSTPONE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "WELSH" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PAID_CASH" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TRAVEL_TIME" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SCAN_CODE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "FINANCIAL_LOSS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "POLICE_CHECK" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SUMMONS_FILE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "REMINDER_SENT" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "PHOENIX_CHECKED" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "CONTACT_PREFERENCE" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "SERVICE_COMP_COMMS_STATUS" is null where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "TRANSFER_DATE" is null where "PART_NO" is "<part_no>" + + Examples: + |part_no |pool_no |last_name |postcode | + |645200055 |452170401 |LNAMEONE |CH1 2AN | diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_Juror_Ineligiblity.feature b/src/test/resources/cucumber/features/regression/REGRESSION_Juror_Ineligiblity.feature new file mode 100644 index 00000000..4c17f451 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_Juror_Ineligiblity.feature @@ -0,0 +1,1861 @@ +Feature: Regression Test Ineligbility + +#CONTENTS +#Welsh_3rd_Ineligible_Confirmation Page +#Welsh_3rd_SpecialRequirements +#Welsh_3rd_Ineligible_SpecialRequirements +#Welsh_1st_StraightThrough_MentalResidency +#Welsh_1st_Inel Email Check +#Welsh_3rd_Deferral_Inel +#Checking the word Act in Mental Health Act is capitalised +#English 1st support in court +#English 3rd support in court + +@RegressionWelsh @JDB-3044 @JDB-3481 @JDB-3609 @JDB-3742 +Scenario Outline: Welsh_3rd_Ineligible_Confirmation Page + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then I see "Eich Manylion" on the page + + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + + And I set "Sut ydych chi" to "Friend" + And I press the "Parhau" button + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e" checkbox + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + When I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + When I press the "Parhau" button + Then I see "Mae arnoch angen dweud wrthym a oes gennym yr enw cywir ar eu cyfer" on the page + + Then I set the radio button to "Ydy" + And I press the "Parhau" button + + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + When I press the "Parhau" button + Then I see "Dewiswch un o'r opsiynau canlynol" on the page + + Then I set the radio button to "Ie" + And I press the "Parhau" button + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + + #I want to set the year dynamically to current year - 40 + + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #JDB-3107 + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + And I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + + #check hint text content + + Then I click on the "A ydych angen cymorth i ateb hyn?" link + + And on the page I see + |text| + |I fod yn gymwys ar gyfer gwasanaeth rheithgor, rhaid bod eu prif gyfeiriad wedi bod yn un o'r canlynol am unrhyw gyfnod o 5 mlynedd o leiaf:| + |Y DU| + |Ynysoedd y Sianel| + |Ynys Manaw| + |Rhaid bod y cyfnod hwn wedi bod ar ôl eu pen-blwydd yn 13 oed.| + |Rhaid bod eu prif gyfeiriad wedi bod yma am o leiaf 5 mlynedd yn olynol. Efallai eu bod wedi bod yn gweithio, yn astudio, wedi ymddeol neu'n ddi-waith.| + |Nid oes ots os aethant dramor ar deithiau hir neu wyliau dramor yn ystod y cyfnod hwn, cyn belled â bod eu prif gyfeiriad yma.| + |O 15 i 22 oed, roedd eu prif gyfeiriad yn y DU, Ynysoedd y Sianel neu Ynys Manaw ond, ar ôl hynny, fe wnaethant ymgartrefu mewn gwlad arall.| + |Mae hyn yn cyfrif fel cyfnod o 5 mlynedd ac yn eu gwneud yn gymwys i wasanaethu ar reithgor.| + |Os oedd ganddynt brif gyfeiriad yma am gyfnodau byrrach nad oeddent yn olynol, nid yw'r rhain yn cyfrif.| + |Er enghraifft, roedd ganddynt brif gyfeiriad yma am 2 flynedd. Yna, ymhellach ymlaen, bu iddynt ddychwelyd yma am 3 blynedd arall, yna ni fyddem yn cynnwys y rhain gyda'i gilydd.| + |Ni fyddai hyn yn cyfrif fel cyfnod o 5 mlynedd ac felly ni fyddent yn gymwys i wasanaethu ar reithgor.| + |Os nad ydych yn siŵr o hyd neu os ydynt yn aros am benderfyniad gan Deithebau a Mewnfudo'r DU| + |Rhaid i chi gysylltu â ni i gael cyngor ar eu sefyllfa benodol.| + + And I press the "Parhau" button + + #warning when no answer selected + + And I see "Dewiswch ydy os yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf, ers iddynt droi'n 13 oed" on the page + And I set the radio button to "Naddo" + Then I see "Rhowch fanylion am ble mae'r unigolyn rydych yn ymateb ar ei ran wedi byw ers ei ben-blwydd/ei phen-blwydd yn 13 mlwydd oed" on the page + And I press the "Parhau" button + + #warning when "No" selected but no reason given + + Then I see error "Rhowch fanylion am ble mae'r unigolyn rydych yn ymateb ar ei ran wedi byw ers ei ben-blwydd/ei phen-blwydd yn 13 mlwydd oed" + And I set "Rhowch fanylion am ble mae'r unigolyn rydych yn ymateb ar ei ran wedi byw ers ei ben-blwydd/ei phen-blwydd yn 13 mlwydd oed" to "Not a resident" + And I press the "Parhau" button + + #CJS + + And I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + And I see "Mae hyn yn cynnwys gweithio i'r heddlu, Gwasanaeth Carchardai EM, yr Asiantaeth Troseddu Cenedlaethol, y farnwriaeth, GLlTEM neu unrhyw ran arall o'r system cyfiawnder troseddol" on the page + + #check hint text content + + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Nid yw gweithio yn y System Cyfiawnder Troseddol yn atal unigolyn rhag gwasanaethu ar reithgor. Ond efallai byddwn yn cysylltu i ganfod mwy." on the page + + And I press the "Parhau" button + + #warning when no answer selected + + And I see "Dewiswch a yw'r unigolyn rydych yn ateb ar ei ran wedi gweithio yn y system cyfiawnder drosoeddol yn ystod y 5 mlynedd diwethaf" on the page + And I set the radio button to "Ydy" + And I press the "Parhau" button + + #warning when "Yes" selected but no reason given + + And I see "Ticiwch unrhyw sefydliadau mae'r unigolyn wedi gweithio iddynt yn uniongyrchol (nid fel trydydd parti neu is-gontractwr)" on the page + And I check the "Yr heddlu" checkbox + And I set "Pa heddlu?" to "London Police Force" + And I check the "Gwasanaeth Carchardai EM" checkbox + And I set "Pa ran o Wasanaeth Carchardai EM?" to "London Prison Service" + And I check the "Yr Asiantaeth Troseddu Cenedlaethol" checkbox + And I check the "Arall" checkbox + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Other part CJS" + And I press the "Parhau" button + + #Bail + + And I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + And I see "Os yw'r unigolyn yr ydych yn ateb ar ei ran ar fechnïaeth mewn achos troseddol, ni all wasanaethu ar reithgor." on the page + + #warning when no answer selected + + And I press the "Parhau" button + And I see error "Dewiswch 'Ydy' os yw'r unigolyn ar fechnïaeth am gyflawni trosedd" + + And I set the radio button to "Ydy" + + #warning when "Yes" selected but no reason given + + And I press the "Parhau" button + And I see "Rhowch fanylion am fechnïaeth a throsedd yr unigolyn" on the page + + And I set "Rhowch fanylion" to "Bailed for crimes" + And I press the "Parhau" button + + #Criminal Convictions + + And I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + + #hint text + + And I see "Dim ond os rhoddwyd dedfryd o garchar, gorchymyn cymunedol neu ddedfryd o garchar ohiriedig y mae hyn yn berthnasol." on the page + And I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + And on the page I see + |text| + |Pryd y gallant wasanaethu ar reithgor | + |Gallant wasanaethu ar reithgor os ydynt:| + |wedi cael dirwy goryrru| + |wedi cael pwyntiau cosb ar eu trwydded yrru| + |wedi gorfod mynychu cwrs ymwybyddiaeth cyflymder| + |Mae hyn yn berthnasol ar yr amod na chawsant unrhyw un o'r dedfrydau isod.| + |Pryd na allant wasanaethu ar reithgor| + |Ni allant wasanaethu ar reithgor os ydynt wedi cael un o’r dedfrydau troseddol isod yn y DU, Ynysoedd y Sianel neu Ynys Manaw. Ni allant ychwaith wasanaethu ar reithgor os ydynt wedi cael un o'r dedfrydau troseddol hyn am drosedd gwasanaeth o dan Ddeddf y Lluoedd Arfog 2006 yn unrhyw le yn y byd:| + |dedfryd o garchar neu gadw yn y ddalfa am 5 mlynedd neu fwy| + |dedfryd o garchar ar gyfer diogelu'r cyhoedd neu gadw yn y ddalfa er mwyn diogelu'r cyhoedd| + |dedfryd o garchar, y ddalfa neu gadw yn y ddalfa am oes| + |dedfryd estynedig o dan un o adrannau 226A, 226B, 227 neu 228 Deddf Cyfiawnder Troseddol 2003, (gan gynnwys dedfryd o'r fath a osodwyd o ganlyniad i adran 219A, 220, 221A neu 222 Deddf y Lluoedd Arfog 2006) neu adran 210A Deddf Gweithdrefn Droseddol (Yr Alban) 1995| + |cadw hyd mynno Ei Fawrhydi neu hyd mynno'r Ysgrifennydd Gwladol| + |Ni allant ychwaith wasanaethu ar reithgor os ydynt wedi cael un o'r dedfrydau troseddol hyn yn ystod y 10 mlynedd diwethaf:| + |gwnaethant wasanaethu unrhyw ran o ddedfryd o garchar neu gadw yn y ddalfa| + |cawsant ddedfryd o garchar ohiriedig neu orchymyn atal dros dro ar gyfer cadw yn y ddalfa| + |Ni allant ychwaith wasanaethu ar reithgor os ydynt, yn ystod y 10 mlynedd diwethaf yng Nghymru a Lloegr, wedi cael gorchymyn cymunedol, gan gynnwys unrhyw un o'r canlynol:| + |gorchymyn adsefydlu cymunedol| + |gorchymyn cosb gymunedol| + |gorchymyn cosb ac adsefydlu cymunedol| + |gorchymyn trin a phrofi am gyffuriau| + |gorchymyn ymatal rhag cymryd cyffuriau| + |Ni allant ychwaith wasanaethu ar reithgor os ydynt, yn ystod y 10 mlynedd diwethaf, wedi cael:| + |unrhyw orchymyn debyg o dan gyfraith yr Alban, Gogledd Iwerddon, Ynys Manaw neu unrhyw un o Ynysoedd y Sianel| + |gorchymyn cymunedol neu gymuned dramor o dan Ddeddf y Lluoedd Arfog 2006| + |Os bydd rhywun yn gwasanaethu ar reithgor pan fyddant yn gwybod na ddylent wneud hynny oherwydd euogfarn droseddol, efallai y cânt ddirwy o hyd at £5,000.| + + #warning when no answer selected + + And I press the "Parhau" button + And I see "Dewiswch 'Ydy' os yw'r unigolyn wedi'i gael yn euog o gyflawni trosedd" on the page + + #warning when "Yes" selected but no reason given + + And I set the radio button to "Ydy" + Then I see "Rhowch fanylion am drosedd yr unigolyn" on the page + And on the page I see + |text| + |Ar gyfer pob euogfarn, rhowch fanylion am:| + |y drosedd neu'r troseddau a gyflawnwyd ganddynt| + |pryd ddigwyddodd hyn| + |lle cawsant yr euogfar| + |hyd y ddedfryd| + And I press the "Parhau" button + And I see error "Rhowch fanylion am drosedd yr unigolyn" + And I set text area with "id" of "convictedDetails" to "Convicted for crimes" + And I press the "Parhau" button + + #Mental Health + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + + #hint text + + And on the page I see + |text| + |Dewiswch ie, os ydynt o dan y Ddeddf Iechyd Meddwl:| + |yn cael eich cadw (neu eich anfon i ysbyty meddwl) neu'n debygol o gael eich cadw| + |yn breswylwydd mewn ysbyty oherwydd anhwylder meddyliol| + |yn destun gwarcheidiaeth neu orchymyn triniaeth gymunedol| + + And I click on the "Angen help i ateb hwn?" link + + Then on the page I see + |text| + |Ni all person fod ar reithgor os yw un o'r datganiadau hyn yn berthnasol.| + |Os oes ganddynt broblemau iechyd meddwl (gan gynnwys iselder a phryder) ond nid ydynt yn cael ei cadw, eu gwarchod neu eu trin o dan y Ddeddf Iechyd Meddwl, gallant barhau i fod ar reithgor.| + |(Os ydynt o'r farn nad ydynt yn gall cwblhau gwasanaeth rheithgor oherwydd problemau iechyd meddwl sylweddol, gallwch ofyn iddynt gael eu hesgusodi neu am gael newid y dyddiad| + + And I press the "Parhau" button + + #warning when no answer selected + + And I see "Dewiswch 'ie' os yw'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl" on the page + And I set the radio button to "Ie" + Then I see "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" on the page + And I press the "Parhau" button + + #warning when "Yes" selected but no reason given + + And I see error "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" + And I set "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" to "Sectioned" + And I press the "Parhau" button + + #MHQ2 + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'" on the page + + #hint text + + And I press the "Parhau" button + + #warning when no answer selected + + And I see "Dewiswch ie os penderfynwyd nad oes gan y person yr ydych yn eiriol drosto y 'gallu meddyliol'" on the page + When I set the radio button to "Ie" + Then I see "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" on the page + And I press the "Parhau" button + And I see error "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" to "Lacks capacity" + And I press the "Parhau" button + + #Can you attend + + And I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + + ##JDB-3092 + + And I set the radio button to "Nac oes" + And I set the radio button to "Oes" + And I see "Disgrifiwch anabledd neu nam yr unigolyn." on the page + + And I check the "Symudedd cyfyngedig" checkbox + And I check the "Nam ar y clyw" checkbox + And I check the "Clefyd siwgr" checkbox + And I check the "Nam difrifol ar ei olwg" checkbox + And I check the "Anabledd dysgu" checkbox + And I check the "Arall" checkbox + And I set "Rhowch fanylion os gwelwch yn dda" to "Other special requirements" + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddo wasanaethu ar reithgor" to "More detail about special requirements" + And I click on the "Pam ein bod yn gofyn am hyn?" link + + Then I see "Os byddwch yn dweud wrthym fod gan yr unigolyn rydych yn ymateb ar ei ran nam neu anabledd, byddwn yn gwneud popeth y gallwn i ddiwallu ei anghenion yn yr adeilad llys pan fydd yn cyflawni ei wasanaeth rheithgor. Weithiau byddwn yn gwneud trefniadau i unigolyn ymweld â’r llys ymlaen llaw i gynllunio pa gymorth a chyfleusterau bydd ei angen. Byddwn yn gwneud ein gorau i'w helpu gyda symud o amgylch y llys, gweld neu glywed popeth, neu unrhyw gymorth arbennig arall bydd yr unigolyn rydych yn ymateb ar ei ran angen." on the page + And I see "Mae rhai o’r adeiladau llys yn hen ac mae’n anoddach i gael mynediad atynt. Os ydych chi’n dweud wrthym am anabledd neu nam yr unigolyn nawr, gallwn wirio p’un a yw’r llys ble fydd yn cyflawni ei wasanaeth rheithgor yn addas iddynt neu beidio." on the page + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran nam neu anabledd sydd gan yr unigolyn rydych yn ymateb ar ei ran, yna cysylltwch â ni." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see "Symudedd cyfyngedig, Nam ar y clyw, Clefyd siwgr, Nam difrifol ar ei olwg, Anabledd dysgu" on the page + And I see "Other special requirements" on the page + And I see "More detail about special requirements" on the page + And I see text "Ydy" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Ie" in the same row as "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" + And I see text "Ie" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + And I see text "Ydy" in the same row as "A yw'r unigolyn ar fechn" + And I see text "Ydy" in the same row as "A yw'r unigolyn wedi'i gael yn euog o drosedd?" + And I see text "Ie" in the same row as "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" + + Then I see text "Naddo" in the same row as "A yw'r unigolyn rydych yn ymateb ar ei ran wedi byw yn y Deyrnas Unedig, Ynysoedd y Sianel neu Ynys Manaw am gyfnod parhaus o bum mlynedd neu fwy ers ei ben-blwydd yn 13 oed?" + + Then I see text "Friend" in the same row as "Eich perthynas " + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3044 + + And I see "Rydym wedi anfon e-bost i ddweud eich bod wedi ymateb i'r wŷs hon." on the page + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs" on the page + + And I see "Byddwn nawr yn gwirio'ch atebion. Mae eich atebion yn golygu efallai na all yr unigolyn rydych wedi ymateb ar ei ran wasanaethu ar reithgor." on the page + And I see "Byddwn yn ysgrifennu at yr unigolyn rydych wedi ymateb ar ei ran yn y 7 diwrnod nesaf i roi gwybod iddynt os gallant wasanaethu ar reithgor ai peidio." on the page + And I see "Efallai byddwn yn cysylltu i drafod y cymorth bydd ei angen ar yr unigolyn rydych wedi ymateb ar ei ran er mwyn iddynt allu gwasanaethu ar reithgor." on the page + + And I see "Os gallant wasanaethu ar reithgor, o leiaf pythefnos cyn iddo ddechrau byddwn yn anfon y dogfennau canlynol atynt:" on the page + And I see "llythyr yn cadarnhau dyddiad y gwasanaeth rheithgor" on the page + And I see "pecyn gwybodaeth am fod yn rheithiwr a'r llys byddant yn mynd iddo" on the page + + #JDB-3704 + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + Then I see "Rydym wedi anfon e-bost i ddweud eich bod wedi ymateb i'r wŷs hon." on the page + Then I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs" on the page + Then I see "Beth fydd yn digwydd nesaf" on the page + Then I see "Byddwn nawr yn gwirio'ch atebion. Mae eich atebion yn golygu efallai na all yr unigolyn rydych wedi ymateb ar ei ran wasanaethu ar reithgor." on the page + Then I see "Byddwn yn ysgrifennu at yr unigolyn rydych wedi ymateb ar ei ran yn y 7 diwrnod nesaf i roi gwybod iddynt os gallant wasanaethu ar reithgor ai peidio." on the page + Then I see "Os gallant wasanaethu ar reithgor, o leiaf pythefnos cyn iddo ddechrau byddwn yn anfon y dogfennau canlynol atynt:" on the page + Then I see "llythyr yn cadarnhau dyddiad y gwasanaeth rheithgor" on the page + Then I see "pecyn gwybodaeth am fod yn rheithiwr a'r llys byddant yn mynd iddo" on the page + Then I see "Paratoi ar gyfer gwasanaeth rheithgor" on the page + Then I see "Mae'r wybodaeth isod hefyd yn y neges e-bost rydym wedi'i hanfon." on the page + Then I see "Gallwch chi, neu'r unigolyn rydych wedi ymateb ar ei ran, wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eu bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + Then I see "Rhagor o wybodaeth am wasanaethu ar reithgor. Gallwch darllenwch y rheolau ynghylch trafod y treial a chanfod sut i hawlio am gostau." on the page + Then I see "Chyfrifo pa dreuliau a lwfansau y gallwch eu hawlio." on the page + Then I do not see "Eich Canllaw i'r Gwasanaeth Rheithgor (PDF 85KB)" on the page + Then I see "Beth yw eich barn am y gwasanaeth hwn? (30 eiliad o'ch amser)" on the page + + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" on the page + And I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" link + + #residency + + And I see "Ydy" in the same row as "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + + #MHQ1 + + And I see "Ie" in the same row as "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl" + + #MHQ2 + + And I see "Ie" in the same row as "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'" + + + #bail + + And I see "Ydy" in the same row as "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" + + #crimes + + And I see "Ydy" in the same row as "A yw'r unigolyn wedi'i gael yn euog o drosedd?" + + + #MHQ1 + + And I see "Ie" in the same row as "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl" + + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500796 |LNAMESEVENNINESIX |CH1 2AN |a@eeee.com |415170401 | + + +@RegressionWelsh @JDB-3085 @JDB-3092 @JDB-3094 @JDB-3123 @JDB-3125 @JDB-3129 @JDB-3128 @JDB-3127 @JDB-3126 @JDB-3125 @JDB-3124 @JDB-3121 @JDB-3111 +@JDB-3108 @JDB-3107 @JDB-3131 @JDB-3481 +Scenario Outline: Welsh_3rd_SpecialRequirements + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then I see "Eich Manylion" on the page + + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + + And I set "Sut ydych chi" to "Friend" + And I press the "Parhau" button + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e" checkbox + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + When I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + When I press the "Parhau" button + Then I see "Mae arnoch angen dweud wrthym a oes gennym yr enw cywir ar eu cyfer" on the page + + Then I set the radio button to "Ydy" + And I press the "Parhau" button + + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + When I press the "Parhau" button + Then I see "Dewiswch un o'r opsiynau canlynol" on the page + + Then I set the radio button to "Ie" + And I press the "Parhau" button + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + + #I want to set the year dynamically to current year - 40 + + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #JDB-3107 + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + And I set the radio button to "Ydy" + Then I see "Dewiswch unrhyw sefydliadau y mae'r unigolyn rydych yn ymateb ar ei ran wedi gweithio iddynt." on the page + And I check the "Yr heddlu" checkbox + And I set "Pa heddlu?" to "London Police Force" + And I check the "Gwasanaeth Carchardai EM" checkbox + And I set "Pa ran o Wasanaeth Carchardai EM?" to "London Prison Service" + And I check the "Yr Asiantaeth Troseddu Cenedlaethol" checkbox + And I check the "Arall" checkbox + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Other part CJS" + And I press the "Parhau" button + + #Bail + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Criminal Convictions + + And I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + And I set the radio button to "Na" + And I set the radio button to "Ie" + And I see "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + #Can you attend + + And I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + + ##JDB-3092 + + And I set the radio button to "Nac oes" + And I set the radio button to "Oes" + And I see "Disgrifiwch anabledd neu nam yr unigolyn." on the page + + And I check the "Symudedd cyfyngedig" checkbox + And I check the "Nam ar y clyw" checkbox + And I check the "Clefyd siwgr" checkbox + And I check the "Nam difrifol ar ei olwg" checkbox + And I check the "Anabledd dysgu" checkbox + And I check the "Arall" checkbox + And I set "Rhowch fanylion os gwelwch yn dda" to "Other special requirements" + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddo wasanaethu ar reithgor" to "More detail about special requirements" + And I click on the "Pam ein bod yn gofyn am hyn?" link + + Then I see "Os byddwch yn dweud wrthym fod gan yr unigolyn rydych yn ymateb ar ei ran nam neu anabledd, byddwn yn gwneud popeth y gallwn i ddiwallu ei anghenion yn yr adeilad llys pan fydd yn cyflawni ei wasanaeth rheithgor. Weithiau byddwn yn gwneud trefniadau i unigolyn ymweld â’r llys ymlaen llaw i gynllunio pa gymorth a chyfleusterau bydd ei angen. Byddwn yn gwneud ein gorau i'w helpu gyda symud o amgylch y llys, gweld neu glywed popeth, neu unrhyw gymorth arbennig arall bydd yr unigolyn rydych yn ymateb ar ei ran angen." on the page + And I see "Mae rhai o’r adeiladau llys yn hen ac mae’n anoddach i gael mynediad atynt. Os ydych chi’n dweud wrthym am anabledd neu nam yr unigolyn nawr, gallwn wirio p’un a yw’r llys ble fydd yn cyflawni ei wasanaeth rheithgor yn addas iddynt neu beidio." on the page + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran nam neu anabledd sydd gan yr unigolyn rydych yn ymateb ar ei ran, yna cysylltwch â ni." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see "Symudedd cyfyngedig, Nam ar y clyw, Clefyd siwgr, Nam difrifol ar ei olwg, Anabledd dysgu" on the page + And I see "Other special requirements" on the page + And I see "More detail about special requirements" on the page + And I see text "Ydy" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Na" in the same row as "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" + And I see text "Na" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + Then I see text "Do" in the same row as "A yw'r unigolyn rydych yn ymateb ar ei ran wedi byw yn y Deyrnas Unedig, Ynysoedd y Sianel neu Ynys Manaw am gyfnod parhaus o bum mlynedd neu fwy ers ei ben-blwydd yn 13 oed?" + + Then I see text "Friend" in the same row as "Eich perthynas " + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3131 ST + RA + + And I see "Os gallant wasanaethu ar reithgor, o leiaf pythefnos cyn iddo ddechrau byddwn yn anfon y dogfennau canlynol atynt:" on the page + + #HTML + + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" on the page + And I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" link + + And I see "Ydy" in the same row as "person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see "Na" in the same row as "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl" + And I see "Na" in the same row as "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" + + +Examples: + |part_no |last_name |postcode |email |pool_no | + |841501648 |LNAMESIXSIXZERO |CH1 2AN |a@eeee.com |415181001 | + +@RegressionWelsh @JDB-3085 @JDB-3092 @JDB-3123 @JDB-3125 @JDB-3129 @JDB-3128 @JDB-3127 @JDB-3126 @JDB-3125 @JDB-3124 @JDB-3121 @JDB-3111 +@JDB-3108 @JDB-3107 @JDB-3131 @JDB-3481 +Scenario Outline: Welsh_3rd_Ineligible_SpecialRequirements + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then I see "Eich Manylion" on the page + + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + + And I set "Sut ydych chi" to "Friend" + And I press the "Parhau" button + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e" checkbox + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + When I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + When I press the "Parhau" button + Then I see "Mae arnoch angen dweud wrthym a oes gennym yr enw cywir ar eu cyfer" on the page + + Then I set the radio button to "Ydy" + And I press the "Parhau" button + + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + When I press the "Parhau" button + Then I see "Dewiswch un o'r opsiynau canlynol" on the page + + Then I set the radio button to "Ie" + And I press the "Parhau" button + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + + #I want to set the year dynamically to current year - 40 + + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #JDB-3107 + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + And I set the radio button to "Naddo" + And I set "Rhowch fanylion" to "Not a resident" + And I press the "Parhau" button + + #CJS + + And I set the radio button to "Ydy" + Then I see "Dewiswch unrhyw sefydliadau y mae'r unigolyn rydych yn ymateb ar ei ran wedi gweithio iddynt." on the page + And I check the "Yr heddlu" checkbox + And I set "Pa heddlu?" to "London Police Force" + And I check the "Gwasanaeth Carchardai EM" checkbox + And I set "Pa ran o Wasanaeth Carchardai EM?" to "London Prison Service" + And I check the "Yr Asiantaeth Troseddu Cenedlaethol" checkbox + And I check the "Arall" checkbox + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Other part CJS" + And I press the "Parhau" button + + #Bail + + And I set the radio button to "Ydy" + And I set "Rhowch fanylion" to "Bailed for crimes" + And I press the "Parhau" button + + #Criminal Convictions + + And I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + And I set the radio button to "Ydy" + And I set text area with "id" of "convictedDetails" to "Convicted for crimes" + And I press the "Parhau" button + + #Mental Health + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + And I set the radio button to "Ie" + And I set "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" to "Sectioned" + And I press the "Parhau" button + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I set the radio button to "Ie" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" to "Lacks capacity" + And I press the "Parhau" button + + #Can you attend + + And I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + + ##JDB-3092 + + And I set the radio button to "Nac oes" + And I set the radio button to "Oes" + And I see "Disgrifiwch anabledd neu nam yr unigolyn." on the page + + And I check the "Symudedd cyfyngedig" checkbox + And I check the "Nam ar y clyw" checkbox + And I check the "Clefyd siwgr" checkbox + And I check the "Nam difrifol ar ei olwg" checkbox + And I check the "Anabledd dysgu" checkbox + And I check the "Arall" checkbox + And I set "Rhowch fanylion os gwelwch yn dda" to "Other special requirements" + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddo wasanaethu ar reithgor" to "More detail about special requirements" + And I click on the "Pam ein bod yn gofyn am hyn?" link + + Then I see "Os byddwch yn dweud wrthym fod gan yr unigolyn rydych yn ymateb ar ei ran nam neu anabledd, byddwn yn gwneud popeth y gallwn i ddiwallu ei anghenion yn yr adeilad llys pan fydd yn cyflawni ei wasanaeth rheithgor. Weithiau byddwn yn gwneud trefniadau i unigolyn ymweld â’r llys ymlaen llaw i gynllunio pa gymorth a chyfleusterau bydd ei angen. Byddwn yn gwneud ein gorau i'w helpu gyda symud o amgylch y llys, gweld neu glywed popeth, neu unrhyw gymorth arbennig arall bydd yr unigolyn rydych yn ymateb ar ei ran angen." on the page + And I see "Mae rhai o’r adeiladau llys yn hen ac mae’n anoddach i gael mynediad atynt. Os ydych chi’n dweud wrthym am anabledd neu nam yr unigolyn nawr, gallwn wirio p’un a yw’r llys ble fydd yn cyflawni ei wasanaeth rheithgor yn addas iddynt neu beidio." on the page + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran nam neu anabledd sydd gan yr unigolyn rydych yn ymateb ar ei ran, yna cysylltwch â ni." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see "Symudedd cyfyngedig, Nam ar y clyw, Clefyd siwgr, Nam difrifol ar ei olwg, Anabledd dysgu" on the page + And I see "Other special requirements" on the page + And I see "More detail about special requirements" on the page + + + Then I see text "Naddo" in the same row as "A yw'r unigolyn rydych yn ymateb ar ei ran wedi byw yn y Deyrnas Unedig, Ynysoedd y Sianel neu Ynys Manaw am gyfnod parhaus o bum mlynedd neu fwy ers ei ben-blwydd yn 13 oed?" + +# Then I see text "Friend" in the same row as "Eich perthynas â'r unigolyn a gafodd yr wŷs" + + And I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + + Then I see "<part_no>" on the page + + #JDB-3131 ST + INEL + RA + + And I see "Os gallant wasanaethu ar reithgor, o leiaf pythefnos cyn iddo ddechrau byddwn yn anfon y dogfennau canlynol atynt:" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500866 |DOE |CH1 2AN |a@eeee.com |415170401 | + +@RegressionWelsh @JDB-3093 @JDB-3086 @JDB-3389 @JDB-3409 @JDB-3505 +Scenario Outline: Welsh_1st_StraightThrough_MentalResidency + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + + #Juror's details + + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + + #Juror's address + + And I see "A fydd eich cyfeiriad chi yn newid yn fuan?" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + + #Juror's phone + + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + + #Juror's email + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + + #DoB and JDB-3409 + + And I see "Cymorth gyda'ch dyddiad geni" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + + #Do you qualify for jury service? + + When I press the "Parhau" button + + #Residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + + #hint text + + And I click on the "A ydych angen cymorth i ateb hyn?" link + And on the page I see + |text| + |I fod yn gymwys ar gyfer gwasanaeth rheithgor, rhaid bod eich prif gyfeiriad wedi bod yn un o'r canlynol am unrhyw gyfnod o 5 mlynedd o leiaf:| + |Y DU| + |Ynysoedd y Sianel| + |Ynys Manaw| + |Rhaid bod y cyfnod hwn wedi bod ar ôl eich pen-blwydd yn 13 oed.| + |Beth sy'n cyfrif fel cyfnod o 5 mlynedd | + |Rhaid bod eich prif gyfeiriad wedi bod yma am o leiaf 5 mlynedd yn olynol. Efallai eich bod wedi bod yn gweithio, yn astudio, wedi ymddeol neu'n ddi-waith.| + |Does dim ots os aethoch chi dramor ar deithiau hir neu wyliau yn ystod y cyfnod hwn, cyn belled â bod eich prif gyfeiriad yma.| + |Enghraifft| + |Rhwng 15 a 22 oed, roedd eich prif gyfeiriad yn y DU, Ynysoedd y Sianel neu Ynys Manaw ond, ar ôl hynny, gwnaethoch ymgartrefu mewn gwlad arall. | + |Mae hyn yn cyfrif fel cyfnod o 5 mlynedd ac yn eich gwneud yn gymwys i wasanaethu ar reithgor.| + |Beth sydd ddim yn cyfrif| + |Os oedd gennych brif gyfeiriad yma am gyfnodau byrrach nad oeddent yn olynol, nid yw'r rhain yn cyfrif.| + |Er enghraifft, roedd gennych brif gyfeiriad yma am 2 flynedd. Yna, ymhellach ymlaen, bu ichi ddychwelyd yma am 3 blynedd arall, yna ni fyddem yn cynnwys y rhain gyda'i gilydd.| + |Ni fyddai hyn yn cyfrif fel cyfnod o 5 mlynedd ac felly ni fyddech yn gymwys i wasanaethu ar reithgor.| + |Os nad ydych yn siŵr o hyd neu os ydych yn aros am benderfyniad gan Deithebau a Mewnfudo'r DU| + |Rhaid i chi gysylltu â ni i gael cyngor ar eich sefyllfa benodol.| + + #warning if continue without selecting an option + + And I press the "Parhau" button + And I see "Dewiswch do os yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf, ers i chi droi'n 13 oed" on the page + + #warning if No selected but no reason provided + + And I set the radio button to "Naddo" + And I press the "Parhau" button + And I see "Rhowch fanylion am ble rydych wedi byw ers eich pen-blwydd yn 13 mlwydd oed" on the page + + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + And I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + + #hint text + + And on the page I see + |text| + |Mae hyn yn cynnwys gweithio i'r heddlu, Gwasanaeth Carchardai EM, yr Asiantaeth Troseddu Cenedlaethol, y farnwriaeth, GLlTEM neu unrhyw ran arall o'r system cyfiawnder troseddol| + + #warning if continue without selecting an option + + And I press the "Parhau" button + And I see "Dewiswch a ydych wedi gweithio yn y system cyfiawnder troseddol yn ystod y 5 mlynedd diwethaf" on the page + + #warning if No selected but no reason provided + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + And I see "Dewiswch unrhyw sefydliadau rydych wedi gweithio iddynt." on the page + And I see "Ticiwch unrhyw sefydliadau rydych wedi gweithio iddynt yn uniongyrchol (nid fel trydydd parti neu is-gontractwr)" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + + And I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + + #hint text + + And I see "Os ydych ar fechnïaeth mewn achos troseddol, ni allwch wasanaethu ar reithgor." on the page + + #warning if continue without selecting an option + + And I press the "Parhau" button + And I see "Dewiswch Do os ydych ar fechnïaeth ar hyn o bryd am gyflawni trosedd" on the page + + #warning if Yes selected but no reason provided + + And I set the radio button to "Ydw" + And I press the "Parhau" button + And I see "Rhowch fanylion am eich mechnïaeth a'ch trosedd" on the page + + And I set "Rhowch fanylion" to "I am on bail for crimes" + And I press the "Parhau" button + + #Convictions + + And I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + + + #hint text + + And on the page I see + |text| + |Dim ond os cawsoch ddedfryd o garchar, gorchymyn cymunedol neu ddedfryd o garchar ohiriedig y mae hyn yn berthnasol.| + + #warning if continue without selecting an option + + And I press the "Parhau" button + And I see "Dewiswch 'Do' os cawsoch eich cael yn euog o drosedd" on the page + + #warning if Yes selected but no reason provided + + And I set the radio button to "Do" + And I press the "Parhau" button + + And I see "Rhowch fanylion am eich trosedd" on the page + + And I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental health sectioned + + And I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + + #hint text + + And on the page I see + |text| + |Dewiswch 'ie' yn unig, o dan Ddeddf Galluedd Meddyliol 1983, os ydych| + |yn cael eich cadw (neu eich anfon i ysbyty meddwl) neu'n debygol o gael eich cadw| + |yn breswylwydd mewn ysbyty oherwydd anhwylder meddyliol| + |yn destun gwarcheidiaeth neu orchymyn triniaeth gymunedol| + + And I click on the "Angen help i ateb hwn?" link + And on the page I see + |text| + |Ni allwch fod ar reithgor os ydi un o'r datganiadau hyn yn berthnasol i chi.| + |Os oes gennych broblemau iechyd meddwl (yn cynnwys iselder a phryder) ond nid ydych yn cael eich cadw, eich gwarchod neu'n cael eich trin o dan y Ddeddf Galluedd Meddyliol, gallwch ddal i wasanaethu ar reithgor| + |(Os ydych yn teimlo na allwch chi gyflawni gwasanaeth rheithgor oherwydd problem iechyd meddwl sylweddol, gallwch barhau i ofyn am gael eich esgusodi neu newid eich dyddiadau.)| + + #warning if continue without selecting an option + + And I press the "Parhau" button + And I see "Dewisiwch 'ie' os ydych yn cael eich cadw, eich gwarchod neu eich trin o dan Ddeddf Iechyd Meddwl" on the page + + #warning if Yes selected but no reason provided + + And I set the radio button to "Ie" + And I press the "Parhau" button + And I see "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" on the page + And I see error "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" + And I set "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" to "I am sectioned" + And I press the "Parhau" button + + #Mental health capacity + + And I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + + #hint text + + And I see "Ystyr hyn yw na allwch chi wneud penderfyniadau dros eich hun yn gyfreithiol" on the page + Then I click on the "Angen help i ateb hwn?" link + And on the page I see + |text| + |Os nad oes y gallu meddyliol gan rywun, dydyn nhw ddim yn gallu:| + |gwneud eu penderfyniadau eu hunain| + |deall a chadw gwybodaeth| + |cyfathrebu meddyliau a phenderfyniadau i bobl eraill| + |Ardystiwyd rhai pobl yn feddygol o dan Ddeddf Galluedd Meddyliol 1983 nad oes ganddynt y gallu meddyliol oherwydd damwain neu anaf.| + |Efallai bod yn rhaid penodi rhywun arall i wneud penderfyniadau ar eu rhan| + |Os nad oes gan rywun y gallu meddyliol, ni allant wasanaethu ar reithgor| + + #warning if continue without selecting an option + + And I press the "Parhau" button + And I see "Dewiswch 'ie' os penderfyniwyd nad oes gennych y 'gallu meddyliol'" on the page + + #warning if Yes selected but no reason provided + + And I set the radio button to "Ie" + And I press the "Parhau" button + And I see "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" on the page + And I see error "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" to "I lack capacity" + And I press the "Parhau" button + + #Can you attend + + And I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #Special Requirements + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #residency + + And I see text "Do" in the same row as "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" + + #detained under MH act + + And I see text "Ie" in the same row as "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" + + #lack capacity + + And I see text "Ie" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + + #CJS + + And I see text "Nac ydw" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + + #Bail + + And I see text "Ie" in the same row as "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" + + #criminal offence + + And I see text "Na" in the same row as "Ydych chi wedi'ch cael yn euog o drosedd?" + + + #JDB-3086 Checking no as well + + And I see text "Ydw" in the same row as "ar hyn o bryd am gyflawni trosedd?" + And I click on the "Newid" link in the same row as "ar hyn o bryd am gyflawni trosedd?" + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + Then I see text "Nac ydw" in the same row as "ar hyn o bryd am gyflawni trosedd?" + + #submit + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #check html download + + + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" on the page + And I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" link + + And I see "Do" in the same row as "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" + And I see "Nac ydw" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see "Nac ydw" in the same row as "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" + And I see "Naddo" in the same row as "Ydych chi wedi'ch cael yn euog o drosedd?" + And I see "Ie" in the same row as "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" + And I see "Ie" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500240 |LNAME1327 |CH1 2AN |a@eeee.com |415170601 | + +@RegressionWelsh @JDB-4186 +Scenario Outline: Welsh_1st_Inel_Email_Check + Given I am on the welsh version of "Public" "bau-test" + Given I have cleared down the juror digital database + + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |841500436 |415181001 |400 | + + + Given auto straight through processing has been enabled + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "READ_ONLY" as "N" + + And I have submitted a first party Welsh ineligibilty response + | part_no |pool_number| last_name |postcode | email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Os byddwn yn cysylltu â chi, efallai bydd angen i chi ddarparu eich rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atoch." on the page + Then I see "Rydym wedi anfon neges e-bost atoch i gadarnhau eich bod wedi ymateb i’ch gwŷs rheithgor." on the page + Then I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs" on the page + Then I see "Beth fydd yn digwydd nesaf" on the page + Then I see "Byddwn nawr yn gwirio'ch atebion. Mae eich atebion yn golygu efallai na allwch wasanaethu ar reithgor." on the page + Then I see "Byddwn yn ysgrifennu atoch yn y 7 diwrnod nesaf i roi gwybod ichi os gallwch wasanaethu ar reithgor ai peidio" on the page + Then I see "Os gallwch chi wasanaethu ar reithgor, o leiaf 2 wythnos cyn ichi ddechrau byddwn yn anfon y canlynol atoch:" on the page + Then I see "llythyr yn cadarnhau dyddiad eich gwasanaeth rheithgor" on the page + Then I see "pecyn gwybodaeth am fod yn rheithiwr a'r llys byddwch yn mynd iddo" on the page + Then I see "Paratoi ar gyfer gwasanaeth rheithgor" on the page + Then I see "Mae'r wybodaeth isod hefyd yn y neges e-bost rydym wedi'i hanfon atoch" on the page + Then I see "Gallwch wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eich bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + Then I see "Rhagor o wybodaeth am wasanaethu ar reithgor. Gallwch darllenwch y rheolau ynghylch trafod y treial a chanfod sut i hawlio am gostau." on the page + Then I see "Chyfrifo pa dreuliau a lwfansau y gallwch eu hawlio." on the page + Then I do not see "Eich Canllaw i'r Gwasanaeth Rheithgor (PDF 85KB)" on the page + Then I see "Beth yw eich barn am y gwasanaeth hwn? (30 eiliad o'ch amser)" on the page + + Given I am on "Bureau" "juror-test01" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + Then I see "Summoned" on the page + + When I select "Disqualified" from Process reply + And I set the radio button to "B - On Bail" + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I see "Disqualified" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |841500436 |LNAME436 |CH1 2AN |e@mail.com |415181001 | + +@JDB-3130 @RegressionWelsh @JDB-3609 @JDB-3610 +Scenario Outline: Welsh_3rd_Deferral_Inel + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I see "Rwy'n ymateb ar ran rhywun arall" on the page + And I see "Rwy'n ymateb dros fy hun" on the page + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #3rd Party Relationship + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Relationship" + And I press the "Parhau" button + + #3rd party Contact + + When I see "Eich manylion cyswllt" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + #Why Replying + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + + #Juror's Name + + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + And I set the radio button to "Ydy" + When I press the "Parhau" button + + #Juror's Address + + Then I see "Ei gyfeiriad ef yw hwn?" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #Juror's DOB + + And I set "Diwrnod" to "01" + And I set "Mis" to "01" + And I set "Blwyddyn" to "1990" + And I press the "Parhau" button + + #Check juror address + + When I see "Manylion y Rheithiwr" on the page + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Checking field JDB-3106 + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service JDB-3107 + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ydy" + And I set "Rhowch fanylion" to "testBailWelshToMakeInellgibile" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #can you attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + #reasons for deferral request + + When I set text area with "id" of "deferralReason" to "Reasons for deferral request" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + #confirm + + When I set the radio button to "Ydw" + When I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + Then I see "Rhif rheithiwr yr unigolyn yr ydych wedi ymateb ar ei ran yw" on the page + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + Then I see "Rydym wedi anfon e-bost i ddweud eich bod wedi ymateb i'r wŷs hon." on the page + Then I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs" on the page + + Then I see "Byddwn nawr yn gwirio'ch atebion. Mae eich atebion yn golygu efallai na all yr unigolyn rydych wedi ymateb ar ei ran wasanaethu ar reithgor." on the page + Then I see "Byddwn yn ysgrifennu at yr unigolyn yn y 7 diwrnod nesaf i roi gwybod iddynt:" on the page + + #JDB-3610 missing "Os ydynt..." + + Then I see "Os gallant wasanaethu ar reithgor, o leiaf pythefnos cyn iddo ddechrau byddwn yn anfon y dogfennau canlynol atynt:" on the page + Then I see "llythyr yn cadarnhau dyddiad y gwasanaeth rheithgor" on the page + Then I see "pecyn gwybodaeth am fod yn rheithiwr a'r llys byddant yn mynd iddo" on the page + Then I see "Paratoi ar gyfer gwasanaeth rheithgor" on the page + Then I see "Gallwch chi, neu'r unigolyn rydych wedi ymateb ar ei ran, wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eu bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + Then I see "Rhagor o wybodaeth am wasanaethu ar reithgor. Gallwch darllenwch y rheolau ynghylch trafod y treial a chanfod sut i hawlio am gostau." on the page + Then I see "Chyfrifo pa dreuliau a lwfansau y gallwch eu hawlio." on the page + + Then I do not see "Eich Canllaw i'r Gwasanaeth Rheithgor (PDF 85KB)" on the page + Then I see "Beth yw eich barn am y gwasanaeth hwn? (30 eiliad o'ch amser)" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |841501653 |LNAMESIXSIXZERO |CH1 2AN |a@eeee.com |415181001 | + +@RegressionWelsh @JDB-3608 +Scenario Outline: THIS IS A WELSH 3rd SUPPORT IN COURT RESPONSE +Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #Reply to jury summons + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #3rd party name + + Then I see "Beth yw eich enw?" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + + #relationship + + Then I see "Eich perthynas â'r unigolyn" on the page + When I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + + #contact + + Then I see "Eich manylion cyswllt" on the page + When I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I check the "Trwy e-bost" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #reason + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + + # + + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + And I set the radio button to "Ydy" + And I press the "Parhau" button + + # + + Then I see "Ei gyfeiriad ef yw hwn?" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + + #dob + + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + + #contact juror + + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + When I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + # + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I set the radio button to "Do" + And I press the "Parhau" button + + #cjs + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #crim offence + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #MHQ1 + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + #MHQ2 + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + + # + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #support in court + #3608 + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Oes" + And I press the "Parhau" button + Then I see "Disgrifiwch anabledd neu nam yr unigolyn" on the page + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + + #check answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + Then I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + #confirmation + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + +Examples: + |part_no |pool_no |last_name |postcode | email | + |641500178 |415170401 |LNAMETWOSIXZERO |CH1 2AN |e@eeee.com | + +@RegressionSingle @replytypes @JDB-3031 +Scenario Outline: 1st Party Ineligible + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I press the "Continue" button + Then I see "Enter your first name" on the page + And I see "Enter your last name" on the page + + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + And I press the "Continue" button + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I see "Your Details" on the page + And I press the "Continue" button + Then I see "Choose a way for us to contact you" on the page + When I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why are you replying for juror + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + Then I see "Confirm if the person is eligible for jury service" on the page + + #Does the person you're answering for qualify for jury service? + + And I press the "Continue" button + + #Eligibility questions + + And I set the radio button to "No" + And I set "Provide details" to "Residency" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police Force" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I set "Provide details" to "Bail" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "Criminal Convictions" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "Mental Health Sectioned" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided they lack mental capacity" to "Mental Health Capacity" + And I press the "Continue" button + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "Yes" + And I check the "Diabetes" checkbox + And I press the "Continue" button + + #Check your answers + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + When I press the "Submit" button + + #JDB-3031 + #JDB-3704 + + Then I see "You have completed your reply" on the page + Then I see "If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them." on the page + Then I see "We have sent an email to say you have replied to this jury summons." on the page + Then I see "Download a copy of your summons reply" on the page + Then I see "We'll now check your answers. Your answers might mean that the person you've replied for is not able to do jury service." on the page + Then I see "We'll write to the person you replied for in the next 7 days to let them know if they are able to do jury service." on the page + And I see "We may get in touch to talk about the help they need so they can do jury service." on the page + And I see "If they can do jury service, at least 2 weeks before it starts we'll send them:" on the page + And I see "a letter confirming the date of their jury service" on the page + And I see "an information pack about being a juror and the court they're going to" on the page + And I see "Getting ready for jury service" on the page + And I see "The information below is also in the email that we have sent." on the page + And I see "You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch." on the page + And I see "Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses." on the page + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + And I see "What did you think of this service? (Takes 30 seconds)" on the page + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + + Given I am on "Bureau" "bau-test" + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + +Examples: + |part_no |last_name |postcode |email |pool_no | + |741500945 |LNAMENINEFOURFIVE |CH1 2AN |email@outlook.com |415180803 | + +@Regression @replytypes @JDB-3845 +Scenario Outline: New CJS Options 3rd party + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #3rd Party Name + + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Relationship to juror + + When I see "Your Details" on the page + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + When I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why are you replying for juror + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + Then I see "Is the name we have for them correct?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + Then I see "Is this their address?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Give the date of birth for the person you're replying for" on the page + + #DoB + + When I see "Juror Details" on the page + And I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the juror + + When I see "Juror Details" on the page + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Does the person you're answering for qualify for jury service? + + Then I see "Confirm if the person is eligible for jury service" on the page + And I press the "Continue" button + + #Eligibility questions + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS Emp + + And I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service?" to "London Met Police Force" + And I check the "HM Prison Service" checkbox + And I set "Which part of HM Prison Service" to "Wandsworth Prison" + And I check the "the National Crime Agency" checkbox + And I check the "the Judiciary" checkbox + And I check the "HM Courts & Tribunal Service" checkbox + And I check the "Other" checkbox + And I set "Which other part of the Criminal Justice System?" to "Another part of the CJS" + And I press the "Continue" button + + And I set the radio button to "No" + And I press the "Continue" button + And I set the radio button to "No" + And I press the "Continue" button + And I set the radio button to "No" + And I press the "Continue" button + And I set the radio button to "No" + And I press the "Continue" button + + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #Help in court + + And I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I see text "Yes" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "Police service" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + And I see text "London Met Police Force" in the same row as "Have you worked in the criminal justice system in the last 5 years?" + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + + When I press the "Submit" button + + #JDB-3031 + #JDB-3704 + + Then I see "You have completed your reply" on the page + Then I see "If we get in touch with them, they may need to give their juror number. It's also on the letter we sent them." on the page + Then I see "We have sent an email to say you have replied to this jury summons." on the page + Then I see "Download a copy of your summons reply" on the page + And I see "a letter confirming the date of their jury service" on the page + And I see "an information pack about being a juror and the court they're going to" on the page + And I see "Getting ready for jury service" on the page + And I see "The information below is also in the email that we have sent." on the page + And I see "You or the person you've replied for, can watch this video on YouTube about what happens when you're a juror, so they know what to expect. The video takes 13 minutes to watch." on the page + And I see "Learn more about jury service. You can read the rules about discussing the trial and find out how to claim expenses." on the page + And I do not see "Your Guide to Jury Service (PDF 85KB)" on the page + And I see "What did you think of this service? (Takes 30 seconds)" on the page + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "NEEDS REVIEW" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100866 |DOE |SW1H 9AJ |email@outlook.com |451170401 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_ReplyTypesIndicator.feature b/src/test/resources/cucumber/features/regression/REGRESSION_ReplyTypesIndicator.feature new file mode 100644 index 00000000..9fe8ba80 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_ReplyTypesIndicator.feature @@ -0,0 +1,3585 @@ +Feature: Regression English_ReplyTypesIndicator + +#this test contains scenarios that test the reply types indicator which do not already exist in other scripts + +@Regression @replytypes +Scenario Outline: English 1st Party + Juror Details Change + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + And I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "No" + And I press the "Continue" button + And I set "First name" to "Joe" + And I set "Last name" to "Blogs" + + And I press the "Continue" button + + And I set the radio button to "No" + When I press the "Continue" button + And I set "Address line 1" to "99 The Road" + And I set "Town or city" to "Town" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + Then I click on the "Download a copy of your summons reply HTML (15KB)" link + And I see "You answered the eligibility questions" on the page + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "NEEDS REVIEW" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "NEEDS REVIEW" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100925 |DOE |SW1H 9AJ |a@eeee.com |451170401 | + + +@RegressionSingle @replytypes +Scenario Outline: English 1st Party + RA + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #deferral + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "DEFERRAL" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "DEFERRAL" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200610 |452170401 |LNAMESIXONEZERO |SY2 6LU |e@eeee.com | + +@Regression @replytypes +Scenario Outline: English 1st Party + Residency + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "No" + And I set "Provide details" to "some reasons" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Straight through + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200637 |452170401 |LNAMESIXTHREESEVEN |SY2 6LU |e@eeee.com | + +@Regression @replytypes +Scenario Outline: English 1st Party + Bail + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "Yes" + Then I set "Provide details about your bail and criminal offence" to "some details" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Straight through + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200637 |452170401 |LNAMESIXTHREESEVEN |SY2 6LU |e@eeee.com | + +@Features +Scenario Outline: English 3rd Party + Convictions + + #moved into features 02-01-24 to return to Regression + + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "I am a convicted criminal" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200694 |LNAMESIXNINEFOUR |SY2 6LU |email@outlook.com |452170401 | + +@Regression @replytypes +Scenario Outline: English 3rd Party + Residency + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "No" + And I set "Provide details about where the person you are answering for has lived since their 13th birthday" to "some details" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200720 |LNAMESEVENTWOZERO |SY2 6LU |email@outlook.com |452170401 | + +@Regression @replytypes +Scenario Outline: English 3rd Party + Bail + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "Yes" + And I set "Provide details about the person's bail and criminal offence" to "some details" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200743 |LNAMESEVENFOURTHREE |SY2 6LU |email@outlook.com |452170401 | + +@Regression @replytypes +Scenario Outline: English 3rd Party + Mental Health + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "Yes" + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "some details" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided they lack mental capacity" to "some details" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + When I log in as "CPASS" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200748 |LNAMESEVENFOUREIGHT |SY2 6LU |email@outlook.com |452170401 | + +@Features +Scenario Outline: Multiple reply types + + #moved into Features 03-01-24 to return to Regression + + Given I am on "Public" "test" + + Given auto straight through processing has been enabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + |<part_no_two> |<pool_no> |400 | + |<part_no_three> |<pool_no> |400 | + |<part_no_four> |<pool_no> |400 | + |<part_no_five> |<pool_no> |400 | + |<part_no_six> |<pool_no> |400 | + |<part_no_seven> |<pool_no_two> |400 | + |<part_no_eight> |<pool_no> |400 | + |<part_no_nine> |<pool_no_three>|400 | + |<part_no_ten> |<pool_no> |400 | + |<part_no_eleven> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And "<part_no_two>" has "LNAME" as "<last_name>" + And "<part_no_two>" has "RET_DATE" as "5 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_two>" has "ZIP" as "<postcode>" + + And "<part_no_three>" has "LNAME" as "<last_name>" + And "<part_no_three>" has "RET_DATE" as "5 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_three>" has "ZIP" as "<postcode>" + + And "<part_no_four>" has "LNAME" as "<last_name>" + And "<part_no_four>" has "RET_DATE" as "5 mondays time" + And "<part_no_four>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_four>" has "ZIP" as "<postcode>" + + And "<part_no_five>" has "LNAME" as "<last_name>" + And "<part_no_five>" has "RET_DATE" as "5 mondays time" + And "<part_no_five>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_five>" has "ZIP" as "<postcode>" + + And "<part_no_six>" has "LNAME" as "<last_name>" + And "<part_no_six>" has "RET_DATE" as "5 mondays time" + And "<part_no_six>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_six>" has "ZIP" as "<postcode>" + + And "<part_no_seven>" has "LNAME" as "<last_name>" + And "<part_no_seven>" has "RET_DATE" as "5 mondays time" + And "<part_no_seven>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_seven>" has "ZIP" as "<postcode>" + + And "<part_no_eight>" has "LNAME" as "<last_name>" + And "<part_no_eight>" has "RET_DATE" as "5 mondays time" + And "<part_no_eight>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_eight>" has "ZIP" as "<postcode>" + + And "<part_no_nine>" has "LNAME" as "<last_name>" + And "<part_no_nine>" has "RET_DATE" as "5 mondays time" + And "<part_no_nine>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_nine>" has "ZIP" as "<postcode>" + + And "<part_no_ten>" has "LNAME" as "<last_name>" + And "<part_no_ten>" has "RET_DATE" as "5 mondays time" + And "<part_no_ten>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_ten>" has "ZIP" as "<postcode>" + + And "<part_no_eleven>" has "LNAME" as "<last_name>" + And "<part_no_eleven>" has "RET_DATE" as "5 mondays time" + And "<part_no_eleven>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_eleven>" has "ZIP" as "<postcode>" + + #RESPONSE 1 + #3rd party MH + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "Yes" + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "some details" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided they lack mental capacity" to "some details" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 2 + #3rd party bail + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_two>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "Yes" + And I set "Provide details about the person's bail and criminal offence" to "some details" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 3 + #3rd party residency + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_three>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "No" + And I set "Provide details about where the person you are answering for has lived since their 13th birthday" to "some details" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 4 + #3rd party convictions + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_four>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "I am a convicted criminal" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 5 + #1st bail + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_five>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "Yes" + Then I set "Provide details about your bail and criminal offence" to "some details" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Straight through + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_five>" on the page + + #RESPONSE 6 + #1st residency + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_six>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "No" + And I set "Provide details" to "some reasons" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Straight through + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_six>" on the page + + #RESPONSE 7 + #1st details change + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + And I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_seven>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "No" + And I press the "Continue" button + And I set "First name" to "Joe" + And I set "Last name" to "Blogs" + + And I press the "Continue" button + + And I set the radio button to "No" + When I press the "Continue" button + And I set "Address line 1" to "99 The Road" + And I set "Town or city" to "Town" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_seven>" on the page + + #RESPONSE 8 + #1st deferral + +# Given I am on "Public" "test" + Given I am on "Public" "test" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_eight>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #deferral + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_eight>" on the page + + #RESPONSE 9 + #1st excusal + + Given I am on "Public" "test" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_nine>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #Check Name + + When I set the radio button to "Yes" + When I press the "Continue" button + + #Check Address + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + When I press the "Continue" button + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 10 + #3rd Deceased + + Given I am on "Public" "test" + + And I have submitted a third party English deceased response + |part_no |pool_number|last_name |postcode |email | + |<part_no_ten> |<pool_no> |<last_name> |<postcode> |<email>| + + #RESPONSE 11 + #auto processed + + Given I am on "Public" "test" + + And I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_eleven> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + + When I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + And I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Search" link + + And I set "Juror's pool number" to "<pool_no_two>" + And I press the "Search" button + + And I see "<part_no_seven>" on the page + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Search" link + + And I set "Juror's pool number" to "<pool_no_three>" + And I press the "Search" button + + And I see "<part_no_nine>" on the page + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + + Given I am on "Bureau" "test" + + And I log in as "ARAMIS1" + + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_two>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_three>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_four>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_five>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_six>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_seven>" has reply type indicator "NEEDS REVIEW" + Then I see "<part_no_eight>" has reply type indicator "DEFERRAL" + Then I see "<part_no_nine>" has reply type indicator "EXCUSAL" + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_two>" on the page + When I click on "<part_no_two>" in the same row as "<part_no_two>" + And I see "INELIGIBLE" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_three>" on the page + When I click on "<part_no_three>" in the same row as "<part_no_three>" + And I see "INELIGIBLE" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_four>" on the page + When I click on "<part_no_four>" in the same row as "<part_no_four>" + And I see "INELIGIBLE" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_five>" on the page + When I click on "<part_no_five>" in the same row as "<part_no_five>" + And I see "INELIGIBLE" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_six>" on the page + When I click on "<part_no_six>" in the same row as "<part_no_six>" + And I see "INELIGIBLE" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_seven>" on the page + When I click on "<part_no_seven>" in the same row as "<part_no_seven>" + And I see "NEEDS REVIEW" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_eight>" on the page + When I click on "<part_no_eight>" in the same row as "<part_no_eight>" + And I see "DEFERRAL" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + Then I see "<part_no_nine>" on the page + When I click on "<part_no_nine>" in the same row as "<part_no_nine>" + And I see "EXCUSAL" on the page + + Then I press the "Process reply" button + Then I click on the "Responded" link + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + And I click on the "Your work" link + + And I click on the "Search" link + And I set "Juror number" to "<part_no_ten>" + And I press the "Search" button + + When I click on "<part_no_ten>" in the same row as "<part_no_ten>" + And I see "DECEASED" on the page + +# And I click on the "Back" link + + And I click on the "Search" link + And I set "Juror number" to "<part_no_eleven>" + And I press the "Search" button + And I see "<part_no_eleven>" on the page + + When I click on "<part_no_eleven>" in the same row as "<part_no_eleven>" + And I see "AUTO PROCESSED" on the page + + Then I click on the "Your work" link + Then I click on the "Completed" link + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "INELIGIBLE" on the page + + And I click on the "Back" link + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + And I see "INELIGIBLE" on the page + + And I click on the "Back" link + + When I click on "<part_no_three>" in the same row as "<part_no_three>" + And I see "INELIGIBLE" on the page + + And I click on the "Back" link + + When I click on "<part_no_four>" in the same row as "<part_no_four>" + And I see "INELIGIBLE" on the page + + And I click on the "Back" link + + When I click on "<part_no_five>" in the same row as "<part_no_five>" + And I see "INELIGIBLE" on the page + + And I click on the "Back" link + + When I click on "<part_no_six>" in the same row as "<part_no_six>" + And I see "INELIGIBLE" on the page + + And I click on the "Back" link + + When I click on "<part_no_seven>" in the same row as "<part_no_seven>" + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_eight>" in the same row as "<part_no_eight>" + And I see "DEFERRAL" on the page + + And I click on the "Back" link + + When I click on "<part_no_nine>" in the same row as "<part_no_nine>" + And I see "EXCUSAL" on the page + +Examples: + |part_no |part_no_two |part_no_three |part_no_four |part_no_five |part_no_six |part_no_seven |part_no_eight |part_no_nine |part_no_ten|part_no_eleven |last_name |postcode |email |pool_no |pool_no_two|pool_no_three | + |645200748 |645200743 |645200720 |645200694 |645200637 |645200884 |645100925 |645200610 |641500226 |645200130 |645200784 |LNAME |SY2 6LU |email@outlook.com |452170401 |451170401 |415170401 | + + +@Features +Scenario Outline: Multiple reply types in Awaiting Information + + #moved into Features 02-01-24 return to RegressionSingle + + Given I am on "Public" "test" + Given auto straight through processing has been enabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + |<part_no_two> |<pool_no> |400 | + |<part_no_three> |<pool_no> |400 | + |<part_no_four> |<pool_no> |400 | + |<part_no_five> |<pool_no> |400 | + |<part_no_six> |<pool_no> |400 | + |<part_no_seven> |<pool_no_two> |400 | + |<part_no_eight> |<pool_no> |400 | + |<part_no_nine> |<pool_no_three>|400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And "<part_no_two>" has "LNAME" as "<last_name>" + And "<part_no_two>" has "RET_DATE" as "5 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_two>" has "ZIP" as "<postcode>" + + And "<part_no_three>" has "LNAME" as "<last_name>" + And "<part_no_three>" has "RET_DATE" as "5 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_three>" has "ZIP" as "<postcode>" + + And "<part_no_four>" has "LNAME" as "<last_name>" + And "<part_no_four>" has "RET_DATE" as "5 mondays time" + And "<part_no_four>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_four>" has "ZIP" as "<postcode>" + + And "<part_no_five>" has "LNAME" as "<last_name>" + And "<part_no_five>" has "RET_DATE" as "5 mondays time" + And "<part_no_five>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_five>" has "ZIP" as "<postcode>" + + And "<part_no_six>" has "LNAME" as "<last_name>" + And "<part_no_six>" has "RET_DATE" as "5 mondays time" + And "<part_no_six>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_six>" has "ZIP" as "<postcode>" + + And "<part_no_seven>" has "LNAME" as "<last_name>" + And "<part_no_seven>" has "RET_DATE" as "5 mondays time" + And "<part_no_seven>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_seven>" has "ZIP" as "<postcode>" + + And "<part_no_eight>" has "LNAME" as "<last_name>" + And "<part_no_eight>" has "RET_DATE" as "5 mondays time" + And "<part_no_eight>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_eight>" has "ZIP" as "<postcode>" + + And "<part_no_nine>" has "LNAME" as "<last_name>" + And "<part_no_nine>" has "RET_DATE" as "5 mondays time" + And "<part_no_nine>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_nine>" has "ZIP" as "<postcode>" + + #RESPONSE 1 + #3rd party MH + + Given I am on "Public" "test" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "Yes" + And I set "Provide details about how they're being detained, looked after or treated under the Mental Health Act" to "some details" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided they lack mental capacity" to "some details" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 2 + #3rd party bail + + Given I am on "Public" "test" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_two>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "Yes" + And I set "Provide details about the person's bail and criminal offence" to "some details" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 3 + #3rd party residency + + Given I am on "Public" "test" + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_three>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1980" + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "No" + And I set "Provide details about where the person you are answering for has lived since their 13th birthday" to "some details" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 4 + #3rd party convictions + + Given I am on "Public" "test" + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_four>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #3rd Party Name + + When I set "First name" to "FirstNameA" + And I set "Last name" to "LastNameB" + And I press the "Continue" button + + #Relationship to juror + + And I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + #3rd Party Contact + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "0207 821 1818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #Why are you replying for the person? + + When I set the radio button to "The person is not here" + And I press the "Continue" button + + #Check juror name + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Check juror address + + And I set the radio button to "Yes" + And I press the "Continue" button + + #DoB + + When I set the date of birth to a Monday "-2950" weeks in the future + And I press the "Continue" button + + #Contacting the juror + + And I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Qualify for jury service + + And I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + And I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "Yes" + And I set text area with "id" of "convictedDetails" to "I am a convicted criminal" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "Yes" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #RESPONSE 5 + #1st bail + + Given I am on "Public" "test" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_five>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "Yes" + Then I set "Provide details about your bail and criminal offence" to "some details" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Straight through + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_five>" on the page + + #RESPONSE 6 + #1st residency + + Given I am on "Public" "test" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_six>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "No" + And I set "Provide details" to "some reasons" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Straight through + + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_six>" on the page + + #RESPONSE 7 + #1st details change + + Given I am on "Public" "test" + + And I set the radio button to "I am replying for myself" + + And I press the "Continue" button + + And I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_seven>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "No" + And I press the "Continue" button + And I set "First name" to "Joe" + And I set "Last name" to "Blogs" + + And I press the "Continue" button + + And I set the radio button to "No" + When I press the "Continue" button + And I set "Address line 1" to "99 The Road" + And I set "Town or city" to "Town" + + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + #JDB-4636 + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_seven>" on the page + + #RESPONSE 8 + #1st deferral + + Given I am on "Public" "test" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_eight>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #deferral + + When I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set the "First" single date field to a Monday "14" weeks in the future + When I set the "Second" single date field to a Monday "13" weeks in the future + When I set the "Third" single date field to a Monday "12" weeks in the future + + And I press the "Continue" button + + #check dates screen + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + Then I see "Check your answers now" on the page + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no_eight>" on the page + + #RESPONSE 9 + #1st excusal + + Given I am on "Public" "test" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_nine>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #Check Name + + When I set the radio button to "Yes" + When I press the "Continue" button + + #Check Address + + When I set the radio button to "Yes" + And I press the "Continue" button + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + When I press the "Continue" button + + #Residency + + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 1 + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental Health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #Confirm Date of Jury + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + + #Excusal Reason + + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers Now + + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #BUREAU + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + And I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Search" link + + And I set "Juror's pool number" to "<pool_no_two>" + And I press the "Search" button + + And I see "<part_no_seven>" on the page + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Search" link + + And I set "Juror's pool number" to "<pool_no_three>" + And I press the "Search" button + + And I see "<part_no_nine>" on the page + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "CPASS" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + + Given I am on "Bureau" "test" + When I log in as "CPASS" + + #Then I take a screenshot + + Then I see "<part_no>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_two>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_three>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_four>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_five>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_six>" has reply type indicator "INELIGIBLE" + Then I see "<part_no_seven>" has reply type indicator "NEEDS REVIEW" + Then I see "<part_no_eight>" has reply type indicator "DEFERRAL" + Then I see "<part_no_nine>" has reply type indicator "EXCUSAL" + + When I click on "<part_no>" in the same row as "<part_no>" + + #Then I take a screenshot + + And I see "INELIGIBLE" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_two>" on the page + When I click on "<part_no_two>" in the same row as "<part_no_two>" + + #Then I take a screenshot + + And I see "INELIGIBLE" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_three>" on the page + When I click on "<part_no_three>" in the same row as "<part_no_three>" + + #Then I take a screenshot + + And I see "INELIGIBLE" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_four>" on the page + When I click on "<part_no_four>" in the same row as "<part_no_four>" + + #Then I take a screenshot + + And I see "INELIGIBLE" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_five>" on the page + When I click on "<part_no_five>" in the same row as "<part_no_five>" + + #Then I take a screenshot + + And I see "INELIGIBLE" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_six>" on the page + When I click on "<part_no_six>" in the same row as "<part_no_six>" + + #Then I take a screenshot + + And I see "INELIGIBLE" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_seven>" on the page + When I click on "<part_no_seven>" in the same row as "<part_no_seven>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_eight>" on the page + When I click on "<part_no_eight>" in the same row as "<part_no_eight>" + + #Then I take a screenshot + + And I see "DEFERRAL" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + And I click on the "Your work" link + + Then I see "<part_no_nine>" on the page + When I click on "<part_no_nine>" in the same row as "<part_no_nine>" + + #Then I take a screenshot + + And I see "EXCUSAL" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting juror" + And I press the "Confirm" button + Then I see "AWAITING JUROR REPLY" on the page + + Then I click on the "Your work" link + Then I click on the "Awaiting information" link + + When I click on "<part_no>" in the same row as "<part_no>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_three>" in the same row as "<part_no_three>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_four>" in the same row as "<part_no_four>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_five>" in the same row as "<part_no_five>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_six>" in the same row as "<part_no_six>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_seven>" in the same row as "<part_no_seven>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_eight>" in the same row as "<part_no_eight>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + + And I click on the "Back" link + + When I click on "<part_no_nine>" in the same row as "<part_no_nine>" + + #Then I take a screenshot + + And I see "NEEDS REVIEW" on the page + +Examples: + |part_no |part_no_two |part_no_three |part_no_four |part_no_five |part_no_six |part_no_seven |part_no_eight |part_no_nine |part_no_ten|part_no_eleven |last_name |postcode |email |pool_no |pool_no_two|pool_no_three | + |645200748 |645200743 |645200720 |645200694 |645200637 |645200884 |645100925 |645200610 |641500226 |645200130 |645200784 |LNAME |SY2 6LU |email@outlook.com |452170401 |451170401 |415170401 | + + diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_Secrets_Changes.feature b/src/test/resources/cucumber/features/regression/REGRESSION_Secrets_Changes.feature new file mode 100644 index 00000000..7e08c4f6 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_Secrets_Changes.feature @@ -0,0 +1,612 @@ +Feature: Regression Secrets Changes Testing + +#Public Straight through auto processed +#Public over/under age through auto processed +#Public Process in Bureau (deferral) +#Public Deceased auto processed +#Bureau change juror details +#Bureau change 3rd party details +#Bureau change juror Eligibility details +#Bureau change juror Def/Exc details +#Bureau change juror CJS Emp details +#Bureau change juror Reasonable Adjustments details +#Bureau Add notes +#Bureau Add Call Log +#Bureau check change log + +@Secrets +Scenario Outline: Secrets Change - Public Straight through auto processed + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I see "<last_name>" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + And I see "<postcode>" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I see "Yes, I can start on" on the page + And I press the "Continue" button + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + + Given I am on "Bureau" "juror-test01" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And I see "Responded" on the page + + #error if you try to reply again + + Given I am on "Public" "juror-test01" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I see "There is a problem" on the page + And I see "You have no summons to complete." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500119 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |415170402 | + +@Secrets +Scenario Outline: Secrets Change - Public over/under age through auto processed + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I see "<last_name>" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + + And I see "<postcode>" on the page + When I set the radio button to "Yes" + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "2005" + And I press the "Continue" button + + And I press the "Continue" button + + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "DISQ_CODE" is "A" where "PART_NO" is "<part_no>" + + Given I am on "Bureau" "juror-test01" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And "Record status" is "Disqualified" + And I see "Ineligible" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |741500550 |LNAMEFIVEFIVEZERO |CH1 2AN |a@eeee.com |415181001 | + +@Secrets +Scenario Outline: Secrets Change - Public Not Auto Processed (deferral) + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + And I set "Juror last name" to "<last_name>" + And I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + When I set "Enter your email address" to "e@mail.com" + When I set "Enter your email address again" to "e@mail.com" + And I press the "Continue" button + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + #Qualify for jury service + + When I press the "Continue" button + + #Residency + + And I set the radio button to "Yes" + And I press the "Continue" button + + #Mental Health Sectioned + + And I set the radio button to "No" + And I press the "Continue" button + + #Mental Health Capacity + + And I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #defer + + And I see "No, I need to change the date" on the page + And I press the "Continue" button + When I set text area with "id" of "deferralReason" to "Deferral Reason" + And I press the "Continue" button + + When I set "First date" to "{7 mondays time}" + When I set "Second date" to "{8 mondays time}" + When I set "Third date" to "{9 mondays time}" + And I press the "Continue" button + + #CJS no + + When I set the radio button to "No" + And I press the "Continue" button + + #RA no + + When I set the radio button to "No" + And I press the "Continue" button + + #Check your answers + + And I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + And I see "Download a copy of your summons reply PDF (65KB)" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "N" where "PART_NO" is "<part_no>" + And on "JUROR" . "POOL" I see "STATUS" is "1" where "part_no" is "<part_no>" + +# Given I am on "Bureau" "juror-test01" +# And I log in as "CPASS" +# +# When I click on the "Search" link +# And I set "Juror number" to "<part_no>" +# And I press the "Search" button +# And I click on "<part_no>" in the same row as "<part_no>" +# And I see "Summoned" on the page +# +# Then I select "Deferral" from Process reply +# And I set the radio button to "Accept deferral" +# Then I see "Defer until" on the page +# +# When I set "Defer until" to "{7 mondays time}" +# And I select "O - OTHER" from the "Reason for deferral request" dropdown +# And I press the "Mark as completed" button +# Then I see "Completed" on the page +# +# Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" +# Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" +# +# Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "part_no" is "<part_no>" +# And on "JUROR" . "POOL" I see "STATUS" is "7" where "part_no" is "<part_no>" +# +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500119 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |415170402 | + +@Secrets +Scenario Outline: Secrets Change - Public Deceased auto processed + + Given I am on "Public" "juror-test01" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address" as "855 STREET NAME" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + When I set "First name" to "FirstName" + And I set "Last name" to "LastName" + And I press the "Continue" button + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + + When I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "02078211818" + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + When I set the radio button to "The person has died" + And I press the "Continue" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know" checkbox + And I press the "Submit" button + Then I see "You have completed your reply" on the page + And I see "Download a copy of your summons reply" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "EXC_CODE" is "D" where "PART_NO" is "<part_no>" + + Given I am on "Bureau" "juror-test01" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + And "Record status" is "Excused" + And I see "Deceased" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500119 |LNAMEONEONENINE|CH1 2AN |a@eeee.com |415170402 | + +@Secrets +Scenario Outline: Secrets Change Bureau + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #Set part_no pool to be urgent + Given "<part_no>" has "RET_DATE" as "2 mondays time" + And "<part_no>" has "NEXT_DATE" as "2 mondays time" + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + When I set "First name" to "regrFirstName" + And I set "Last name" to "regrLastName" + And I press the "Continue" button + + And I set "How do you know the person you're replying for?" to "friend" + And I press the "Continue" button + + And I check the "By phone (UK Numbers only)" checkbox + And I check the "By email" checkbox + And I set "Main phone" to "01111111119" + And I set "Another phone (optional)" to "07222222229" + And I set "Enter your email address" to "editableSummons@regression.com" + And I set "Enter your email address again" to "editableSummons@regression.com" + And I press the "Continue" button + + And I set the radio button to "The person is not here" + And I press the "Continue" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + And I set the radio button to "Yes" + When I press the "Continue" button + + And I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + + And I set the radio button to "Give a different phone number for the juror" + And I set "Main phone number" to "0333333339" + And I set "Another phone number (optional)" to "07444444444" + And I set the radio button to "Give a different email address for the juror" + And I set "Enter email address" to "editableSummons@regressionJURORContactEmail.com" + And I set "Enter the email address again" to "editableSummons@regressionJURORContactEmail.com" + And I press the "Continue" button + + When I press the "Continue" button + + When I set the radio button to "Yes" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + Then I set the radio button to "Yes" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + When I set the radio button to "Yes" + When I press the "Continue" button + + And I set the radio button to "No" + And I press the "Continue" button + + And I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "N" where "PART_NO" is "<part_no>" + + Given I am on "Bureau" "bau-test" + And I log in as "CPASS" + + And I see "To do" on the page + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I click on "<part_no>" in the same row as "<part_no>" + + And I click on the "edit" link + + And I set "First name" to "Changed" + And I set "Address line 1" to "NewRoad" + And I set "Day" to "10" + And I set "Main phone number" to "01214445555" + And I set "Edit email address" to "e@mail.com" + And I set "Confirm email address" to "e@mail.com" + + And I set "First name" to "ChangedThird" for "thirdParty" + And I set "Relationship to juror" to "ChnagedRelationship" for "thirdParty" + And I set "Main phone" to "07999999999" for "thirdParty" + And I set "Edit email address" to "third@email.com" for "thirdParty" + And I set "Confirm email address" to "third@email.com" for "thirdParty" + And I click on the "save" link + And I set "Please give a reason for the change to this summons reply" to "testNotesAB_TwoOnEditableC" + And I press the "Save" button + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "FIRST_NAME" is "Changed" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "ADDRESS" is "NewRoad" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PHONE_NUMBER" is "01214445555" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "EMAIL" is "e@mail.com" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "THIRDPARTY_FNAME" is "ChangedThird" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "RELATIONSHIP" is "ChnagedRelationship" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "MAIN_PHONE" is "07999999999" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "EMAIL_ADDRESS" is "third@email.com" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "N" where "PART_NO" is "<part_no>" + Then on "JUROR" . "POOL" I see "STATUS" is "1" where "PART_NO" is "<part_no>" + + When I click on the "Eligibility" link + + When I click on the "edit" link + + And I set the radio button to "No" under "Residency" + And I see "Provide details" on the page + And I set text area with "id" of "residencyDetails" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaaaa" + + When I click on the "save" link + And I set "Please give a reason for the change to this summons reply" to "testNotesABC" + And I press the "Save" button + + Then I see "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "RESIDENCY" is "N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "RESIDENCY_DETAIL" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "N" where "PART_NO" is "<part_no>" + + When I click on the "Deferral or excusal" link + + When I click on the "edit" link + + And I set the radio button to "No, I need to change the date" + + Then I see "I need to change the date of my jury service" on the page + And I set text area with "id" of "deferralReason" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + When I click on the "save" link + + And I set "Please give a reason for the change to this summons reply" to "testNotesAB_TwoOnEditableC" + And I press the "Save" button + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "DEFERRAL_REASON" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "N" where "PART_NO" is "<part_no>" + + When I click on the "CJS employee" link + + When I click on the "edit" link + + And I set the radio button to "Yes" + And I check the "Police service" checkbox + + And I set text area with "id" of "cjsPoliceDetails" to "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Naaaaaa" + Then "cjsPoliceDetails" is "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N" + + When I click on the "save" link + And I set "Please give a reason for the change to this summons reply" to "CJSEmployeeChangeNotes" + And I press the "Save" button + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE_CJS_EMPLOYMENT" I see "CJS_EMPLOYER" is "Police Force" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "N" where "PART_NO" is "<part_no>" + + When I click on the "Reasonable adjustments" link + + When I click on the "edit" link + And I check the "Limited mobility" checkbox + + When I click on the "save" link + And I set "Please give a reason for the change to this summons reply" to "resonableAdjustmentsNote" + And I press the "Save" button + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "Completed" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR" . "POOL" I see "RESPONDED" is "Y" where "PART_NO" is "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode | email | + |645100999 |451170401 |LNAMETWOSIXZERO|CH1 2AN |a@a.com| + +@Secrets +Scenario: Secrets Change Dashboard + Given I am on "Dashboard" "juror-test01" + And I see "35,016" on the page \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/REGRESSION_ThirdPartyFunctionality.feature b/src/test/resources/cucumber/features/regression/REGRESSION_ThirdPartyFunctionality.feature new file mode 100644 index 00000000..0f12c084 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/REGRESSION_ThirdPartyFunctionality.feature @@ -0,0 +1,140 @@ +Feature: Third Party Functionality Regression Script + +@Regression +Scenario Outline: + Given I am on "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + Given I clear down the history for juror record "<part_no>" + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "Address" as "<address>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for someone else" + And I press the "Continue" button + Then I see "Their juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Your Details" on the page + + When I press the "Continue" button + Then I see "Enter your first name" on the page + And I see "Enter your first name" on the page + And I see "Enter your last name" on the page + + When I set "First name" to "FirstNamea" + And I set "Last name" to "LastNameb" + + When I press the "Continue" button + + And I see "Your relationship to the person" on the page + And I set "How do you know the person you're replying for?" to "Friend" + + When I press the "Continue" button + + And I see "Your contact information" on the page + And I see "How would you like us to get in touch, if we need to?" on the page + + And I check the "By phone (UK Numbers only)" checkbox + And I set "Main phone" to "02078211818" + And I check the "By email" checkbox + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + + And I press the "Continue" button + + Then I see "Why are you replying for the other person?" on the page + When I set the radio button to "The person has died" + + And I press the "Continue" button + + Then I see "Check your answers now" on the page + And I see "It's important to check that all the information is right before you send this reply for the person who was summoned to jury service." on the page + And I see "You're replying for another person summoned for jury service. You told us this about yourself" on the page + And I see text "FirstNamea" in the same row as "Your name" + And I see text "LastNameb" in the same row as "Your name" + And I see text "Friend" in the same row as "Your relationship to the summoned" + And I see text "02078211818" in the same row as "Your main phone number" + And I see text "email@outlook.com" in the same row as "Your email address" + And I see text "The person has died" in the same row as "Your reason for replying on behalf of the juror" + When I click on the "Change" link in the same row as "Your name" + Then I see "Your Details" on the page + + When I set "First name" to "FirstNameAChanged" + And I set "Last name" to "LastNameBChanged" + And I press the "Continue" button + Then I see "Check your answers now" on the page + + And I see "It's important to check that all the information is right before you send this reply for the person who was summoned to jury service." on the page + And I see "You're replying for another person summoned for jury service. You told us this about yourself" on the page + And I see text "FirstNameAChanged" in the same row as "Your name" + And I see text "LastNameBChanged" in the same row as "Your name" + + Then I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + Given auto straight through processing has been disabled + When I press the "Submit" button + + Then I see "You have completed your reply" on the page + Then I see "<part_no>" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "TODO" where "JUROR_NUMBER" is "<part_no>" + #Continue from Step 17 + + Given I am on "Bureau" "test" + And I log in + Then I see "To do" on the page + Then I see "Your work" on the page + Then I see "Search" on the page + Then I see "Assign Replies" on the page + Then I see "Manage team" on the page + + When I click on the "Assign Replies" link + + Given I am on "Bureau" "test" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "LastNameB" on the page + And I see "Juror details" on the page + + Then I see "FirstNameAChanged" in the same row as "Third party name" + Then I see "<address>" in the same row as "Address" + + When I select "Deferral" from Process reply + + And I select "O - OTHER" from the "Reason for the deferral request" dropdown + And I set the radio button to "Accept deferral" + And I set the radio button to "Other" + + When I set the "Deferral" single date field to a Monday "10" weeks in the future + + And I press the "Confirm" button + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + Then on "JUROR" . "POOL" I see "STATUS" is "7" where "PART_NO" is "<part_no>" + Then on "JUROR" . "PART_HIST" I see "HISTORY_CODE" is "PDEF" where "PART_NO" is "<part_no>" + Then on "JUROR" . "PART_HIST" I see "HISTORY_CODE" is "RESP" where "PART_NO" is "<part_no>" + + # re-enable auto processing + Given auto straight through processing has been enabled + +Examples: + |part_no |pool_no |last_name |postcode |email |address | + |641500157 |415170401 |LNAMEONEFIVESEVEN |CH1 2AN |email@outlook.com |157 STREET NAME| + diff --git a/src/test/resources/cucumber/features/regression/Regression_Eligibility_Hint_Text.feature b/src/test/resources/cucumber/features/regression/Regression_Eligibility_Hint_Text.feature new file mode 100644 index 00000000..2b166ddd --- /dev/null +++ b/src/test/resources/cucumber/features/regression/Regression_Eligibility_Hint_Text.feature @@ -0,0 +1,428 @@ +Feature: Regression Eligibility Hint Text + +@Regression +Scenario Outline: English_1st_Eligibility_Hint_Text + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + + #Check name + + When I set the radio button to "Yes" + When I press the "Continue" button + Then I see "Is this your address?" on the page + + #Check address + + When I set the radio button to "Yes" + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email details + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency Yes + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + + #help text + + Then I click on the "Need help answering this?" link + + And on the page I see + |text| + |To be eligible for jury service, your main address must have been in one of the following for any period of at least 5 years:| + |UK| + |Channel Islands| + |Isle of Man| + |This period must have been after your 13th birthday.| + |What counts as a 5 year period| + |Your main address must have been here for at least 5 years in a row. You may have been working, studying, retired or unemployed.| + |It does not matter if you went away on long trips or holidays abroad during this time, as long as your main address was here.| + |Example| + |From age 15 to 22, your main address was in the UK, Channel Islands or Isle of Man but, after that, you settled in another country.| + |This counts as a 5 year period and makes you eligible for jury service.| + |What does not count| + |If you had a main address here for shorter periods that were not consecutive, these do not count.| + |For example, you had a main address here for 2 years. Then at a much later point, you returned here for another 3 years, then we would not add these together.| + |This would not count as a 5 year period and so you would not be eligible for jury service.| + |If you're still not sure or you're waiting on a decision from UK Visas and Immigration| + |You must contact us to get advice on your specific situation.| + |Jury Central Summoning Bureau| + |jurysummoning@justice.gov.uk| + |Telephone: 0300 456 1024| + |Monday to Thursday 9am to 5pm| + |Friday 9am to 3pm| + + Then I click on the "Need help answering this?" link + + And I see "Need help answering this?" on the page + And I do not see "To be eligible for jury service, your main address must have been in one of the following for any period of at least 5 years:" on the page + + And I press the "Continue" button + + #CJS no + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail no + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + When I set the radio button to "No" + And I click on the "Guidance on jury service if you have a conviction" link + + And on the page I see + |text| + |When you can do jury service| + |You can do jury service if you've:| + |had a speeding fine| + |had points on your driving license| + |been told to attend a speed awareness course| + |This applies as long as you did not receive any of the sentences below.| + |When you cannot do jury service| + |You cannot do jury service if you've ever had one of the criminal sentences below in the UK, Channel Islands or Isle of Man.| + |You also cannot do jury service if you've had one of these criminal sentences for a service offence under the Armed Forces Act 2006 anywhere in the world:| + |imprisonment or detention for 5 years or more| + |imprisonment for public protection or detention for public protection| + |imprisonment, custody or detention for life| + |an extended sentence under either of sections 226A, 226B, 227 or 228 of the Criminal Justice Act 2003, (including such a sentence imposed as a result of section 219A, 220, 221A or 222 of the Armed Forces Act 2006) or section 210A of the Criminal Procedure (Scotland) Act 1995| + |detention at His Majesty's pleasure or during the pleasure of the Secretary of State| + |You also cannot do jury service if you've had one of these criminal sentences in the last 10 years:| + |you served any part of a sentence of imprisonment or detention| + |you received a suspended sentence of imprisonment or a suspended order for detention| + |You also cannot do jury service if, in the last 10 years in England and Wales, you've had a community order, including any of the following:| + |community rehabilitation order| + |community punishment order| + |community punishment and rehabilitation order| + |drug treatment and testing order| + |drug abstinence order| + |You also cannot do jury service if, in the last 10 years, you've had:| + |any similar order under the law of Scotland, Northern Ireland, Isle of Man or any of the Channel Islands| + |a community or overseas community order under the Armed Forces Act 2006| + |If you serve on a jury when you know you should not because of a criminal conviction, you may be fined up to £5,000.| + + And I click on the "Guidance on jury service if you have a conviction" link + + And I do not see "When you can do jury service" on the page + + And I set the radio button to "Yes" + + And on the page I see + |text| + |For each conviction, give details of:| + |the offence or offences you committed| + |when this happened| + |where you were convicted| + |length of sentence| + + And I set the radio button to "No" + + And I press the "Continue" button + + #Mental health part 1 no + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 no + + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + When I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100224 |LNAMENINEFOURTWO |SW1H 9AJ |email@outlook.com |451170401 | + +@Regression +Scenario Outline: English_3rd_Eligibility_Hint_Text + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for someone else" + And I press the "Continue" button + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "What is your name?" on the page + + #Third Party Name + + When I set "First name" to "FirstName" + And I set "Last name" to "LastName" + And I press the "Continue" button + Then I see "Your relationship to the person" on the page + + #Third Party Relationship + + When I set "How do you know the person you're replying for?" to "Friend" + And I press the "Continue" button + Then I see "Your contact information" on the page + + #3rd Party Contact + + And I check the "By phone" checkbox + When I set "Main phone" to "02078211818" + And I check the "By email" checkbox + And I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "Why are you replying for the other person?" on the page + + #Why Replying + + When I set the radio button to "The person is not here" + And I press the "Continue" button + Then I see "Is the name we have for them correct?" on the page + + #Check Juror Name + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Is this their address?" on the page + + #Check address + + When I set the radio button to "Yes" + And I press the "Continue" button + Then I see "Give the date of birth for the person you're replying for" on the page + + #Juror DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "We might need to get in touch with the person to ask them more questions or give them information about their jury service" on the page + + #Contacting the Juror + + When I set the radio button to "Use the phone number that you have already given to contact you" + And I set the radio button to "Use the email address that you have already given to contact you" + And I press the "Continue" button + + #Eligibility + + Then I see "Confirm if the person is eligible for jury service" on the page + + When I press the "Continue" button + + #Residency Yes + + Then I see "Since they turned 13, has their main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + + #help text + + Then I click on the "Need help answering this?" link + + And I see "To be eligible for jury service, their main address must have been in one of the following for any period of at least 5 years:" on the page + + And on the page I see + |text| + |UK| + |Channel Islands| + |Isle of Man| + |This period must have been after their 13th birthday.| + |What counts as a 5 year period| + |Their main address must have been here for at least 5 years in a row. They may have been working, studying, retired or unemployed.| + |It does not matter if they went away on long trips or holidays abroad during this time, as long as their main address was here.| + |Example| + |From age 15 to 22, their main address was in the UK, Channel Islands or Isle of Man but, after that, they settled in another country.| + |This counts as a 5 year period and makes them eligible for jury service.| + |What does not count| + |If they had a main address here for shorter periods that were not consecutive, these do not count.| + |For example, they had a main address here for 2 years. Then at a much later point, they returned here for another 3 years, then we would not add these together.| + |This would not count as a 5 year period and so they would not be eligible for jury service.| + |If you're still not sure or they're waiting on a decision from UK Visas and Immigration| + |You must contact us to get advice on their specific situation.| + |Jury Central Summoning Bureau| + |jurysummoning@justice.gov.uk| + |Telephone: 0300 456 1024| + |Monday to Thursday 9am to 5pm| + |Friday 9am to 3pm| + + And I press the "Continue" button + + #CJS no + + Then I see "Has the person you're replying for worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #Bail no + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions no + + When I set the radio button to "No" + And I click on the "Guidance on jury service if you have a conviction" link + + And on the page I see + |text| + |When they can do jury service| + |They can do jury service if they've:| + |had a speeding fine| + |had points on their driving license| + |been told to attend a speed awareness course| + |This applies as long as they did not receive any of the sentences below.| + |When they cannot do jury service| + |They cannot do jury service if they've ever had one of the criminal sentences below in the UK, Channel Islands or Isle of Man. They also cannot do jury service if they've had one of these criminal sentences for a service offence under the Armed Forces Act 2006 anywhere in the world:| + |imprisonment or detention for 5 years or more| + |imprisonment for public protection or detention for public protection| + |imprisonment, custody or detention for life| + |an extended sentence under either of sections 226A, 226B, 227 or 228 of the Criminal Justice Act 2003, (including such a sentence imposed as a result of section 219A, 220, 221A or 222 of the Armed Forces Act 2006) or section 210A of the Criminal Procedure (Scotland) Act 1995| + |detention at His Majesty's pleasure or during the pleasure of the Secretary of State| + |They also cannot do jury service if they've had one of these criminal sentences in the last 10 years:| + |they served any part of a sentence of imprisonment or detention| + |they received a suspended sentence of imprisonment or a suspended order for detention| + |They also cannot do jury service if, in the last 10 years in England and Wales, they've had a community order, including any of the following:| + |community rehabilitation order| + |community punishment order| + |community punishment and rehabilitation order| + |drug treatment and testing order| + |drug abstinence order| + |They also cannot do jury service if, in the last 10 years, they've had:| + |any similar order under the law of Scotland, Northern Ireland, Isle of Man or any of the Channel Islands| + |a community or overseas community order under the Armed Forces Act 2006| + |If someone serves on a jury when they know they should not because of a criminal conviction, they may be fined up to £5,000.| + + And I click on the "Guidance on jury service if you have a conviction" link + + And I do not see "When they can do jury service" on the page + + And I set the radio button to "Yes" + + And on the page I see + |text| + |For each conviction, give details of:| + |the offence or offences they committed| + |when this happened| + |where they were convicted| + |length of sentence| + + And I set the radio button to "No" + + And I press the "Continue" button + + #Mental health part 1 no + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 no + + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + Then I see "Check your start date" on the page + Then I set the radio button to "Yes, they can start on" + And I press the "Continue" button + + #RA no + + Then I see "Will the person you're replying for need help when they're at the court?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + + #Check Your Answers + + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The answers I have given for the person I'm replying for are true as far as I know." checkbox + And I press the "Submit" button + Then I see "We have sent an email to say you have replied to this jury summons." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100912 |LNAMENINEEIGHTTWO |SW1H 9AJ |email@outlook.com |451170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regression/Regression_JDB4296.feature b/src/test/resources/cucumber/features/regression/Regression_JDB4296.feature new file mode 100644 index 00000000..9d3bd172 --- /dev/null +++ b/src/test/resources/cucumber/features/regression/Regression_JDB4296.feature @@ -0,0 +1,97 @@ +Feature: JDB-4296 + +@JDB-4296 @Regression +Scenario Outline: JDB-4296 + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Name + + And I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Address + + And I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone Details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + #Email + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + + #DoB + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + + #Residency + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #now start clicking Back + + Then I see "Have you worked" on the page + When I click on the "Back" link + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I click on the "Back" link + Then I see "Confirm you're eligible for jury service" on the page + When I click on the "Back" link + + #change DOB to make juror over age + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1901" + And I press the "Continue" button + Then I see "Confirm your date of birth" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + #Submit + + And I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100483 |DOE |SW1H 9AJ |email@outlook.com |451170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_A.feature b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_A.feature new file mode 100644 index 00000000..695ecdef --- /dev/null +++ b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_A.feature @@ -0,0 +1,358 @@ +Feature: Bureau A Test + +@RegressionSingle +Scenario Outline: Lift from QC Script for Bureau A Functionality + Given I am on "Public" "test" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |457170501 |400 | + |<part_no_two> |457170501 |400 | + |<part_no_three> |457170501 |400 | + + # Set part_no pool to not be urgent + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|CH1 2AN |a@a.com| + + # Set part_no pool to be urgent + + Given "<part_no_two>" has "RET_DATE" as "3 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name>" + And "<part_no_two>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode | email | + |<part_no_two> |<pool_no> |<last_name>|CH1 2AN |a@a.com| + + # Set part_no pool to be super urgent + + Given "<part_no_three>" has "RET_DATE" as "2 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name>" + And "<part_no_three>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_three>|<pool_no> |<last_name> |CH1 2AN |a@a.com| + + Given "<part_no_three>" has "READ_ONLY" as "Y" + Then the "URGENT" for juror "<part_no_three>" is set to "N" + Then the "SUPER_URGENT" for juror "<part_no_three>" is set to "Y" + + Given I am on "Bureau" "bau-test2" + And I log in + And I do not see any links on the page that open to a new page without an alt text + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + And I do not see any links on the page that open to a new page without an alt text + And I click on the "Sign out" link + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + And I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + Then I see "Urgent" icon in the same row as "<part_no_two>" + And I see "Send to court" icon in the same row as "<part_no_three>" + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "Record status" on the page + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information" link + Then I see "Mark this reply as awaiting information" on the page + + #check error message + + And I press the "Confirm" button + And I see "Select who the bureau is waiting for a reply from" on the page + + #check cancel + + Then I click on the "Cancel" link + + #now mark as awaiting info + + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information" link + Then I see "Mark this reply as awaiting information" on the page + When I set the radio button to "Awaiting court reply" + And I press the "Confirm" button + + When I click on the "Back" link + Then I see "AWAITING COURT REPLY" in the same row as "<part_no>" + + And I see "<part_no_two>" on the page + When I click on "<part_no_two>" in the same row as "<part_no_two>" + Then I see "Record status" on the page + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information'" link + Then I see "Mark this reply as awaiting information" on the page + When I set the radio button to "Awaiting court reply" + And I press the "Confirm" button + Then I see "AWAITING COURT REPLY" on the page + When I click on the "Back" link + Then I see "AWAITING COURT REPLY" in the same row as "<part_no_two>" + + When I click on "<part_no_three>" in the same row as "<part_no_three>" + + Then I see "Record status" on the page + And I do not see "Edit" on the page + And I do not see "edit" on the page + When I select "PDF sent to court..." from Process reply + + When I check the "PDF sent to court" checkbox + And I press the "Confirm" button + And I see "<part_no_three>" on the page + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_three>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_three>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "SUPER_URGENT" is "Y" where "JUROR_NUMBER" is "<part_no_three>" + + Then on "JUROR" . "pool" I see "RESPONDED" is "N" where "part_no" is "<part_no_three>" and "OWNER" is "400" + + When I click on the "Back" link + + Given the date received for the juror response "<part_no>" is set to 6 working days before the current date + Given the date received for the juror response "<part_no_two>" is set to 6 working days before the current date + #Given the date received for the juror response "<part_no_three>" is set to 6 working days before the current date + + And I click on the "Sign out" link + + Given I am on "Bureau" "test" + And I see "Username" on the page + And I log in as "ARAMIS1" + And I see "Awaiting information" on the page + And I click on the "Awaiting information" link + And I do not see any links on the page that open to a new page without an alt text + And I see "<part_no>" is flagged as overdue + And I see "<part_no_two>" is flagged as overdue + + #Then I see "Overdue" icon in the same row as "<part_no_three>" + + #re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no |part_no_two |part_no_three |pool_no |last_name |postcode | + |645700184 |645700878 |645700884 |457170501 |LNAMEONEFIVEFOUR |CH1 2AN | + + +@RegressionSingle +Scenario Outline: Bureau A script, steps 24 onwards + Given I am on "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |457170501 | 400 | + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Your details" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "First name" to "FIRSTNAMECHANGED" + And I set "Last name" to "LASTNAMECHANGED" + And I set "Title" to "TITLEA" + And I press the "Continue" button + Then I see "Is this your address?" on the page + + And I set the radio button to "No" + And I press the "Continue" button + + And I set "Address line 1" to "BUILDINGCHANGED" + And I press the "Continue" button + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "01211112222" + And I press the "Continue" button + + And I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + When I set "Day" to "01" + And I set "Month" to "01" + And I set "Year" to "1990" + And I press the "Continue" button + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + And I set the radio button to "No" + And I set "Provide details" to "residencyTestData" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "Yes" + And I check the "Police service" checkbox + And I set "Which police service" to "policeForceTestData" + And I press the "Continue" button + + Then I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "Yes" + And I set "Provide details about your bail and criminal offence" to "bailTestData" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + When I set the radio button to "Yes" + And I set "Provide details about how you're being detained, looked after or treated under the Mental Health Act" to "mentalHealthTestData" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + And I set the radio button to "Yes" + And I set "Provide brief details about why it was decided you lack mental capacity" to "mentalHealthCapacityTestData" + And I press the "Continue" button + + And I see "No, I need to change the date" on the page + And I set the radio button to "No, I need to change the date" + And I press the "Continue" button + And I set text area with "id" of "deferralReason" to "unableToAttendAndDeferring" + And I press the "Continue" button + Then I see "Choose 3 Mondays" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help" on the page + When I set the radio button to "Yes" + And I check the "Limited mobility" checkbox + And I check the "Hearing impairment" checkbox + And I check the "Diabetes" checkbox + And I check the "Severe sight impairment" checkbox + And I check the "Learning disability" checkbox + And I set "Tell us about any special arrangements or help yo" to "arrangementsTestData" + And I press the "Continue" button + + And I check the "The information" checkbox + And I press the "Submit" button + Then I see "You have completed your reply" on the page + + Given I am on "Bureau" "bau-test" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "1 results for" on the page + + When I click on "<part_no>" in the same row as "<part_no>" + And I see "<last_name>" on the page + And I see "FIRSTNAMECHANGED" on the page + And I see "LASTNAMECHANGED" on the page + And I see "TITLE" on the page + And I see "BUILDINGCHANGED" on the page + And I see "01/01/1990" on the page + And I see "<email>" on the page + And I see "INELIGIBLE" on the page + + When I click on the "Eligibility" link + Then I see "Attention" in the same row as "Residency" + Then I see "residencyTestData" in the same row as "Residency" + Then I see "Attention" in the same row as "Mental health" + Then I see "mentalHealthTestData" in the same row as "Mental health" + Then I see "Attention" in the same row as "Bail" + Then I see "bailTestData" in the same row as "Bail" + + When I click on the "Deferral or excusal" link + Then I see "Deferral or excusal" in the same row as "Deferral request" + Then I see "Deferral or excusal" in the same row as "unableToAttendAndDeferring" + Then I see "Available dates" on the page + + When I click on the "CJS employment" link + Then I see "Police Force" in the same row as "CJS employment" + And I see "policeForceTestData" in the same row as "CJS employment" + + When I click on the "Reasonable adjustments" link + Then I see "Disability or impairment" on the page + Then I see "LIMITED MOBILITY" on the page + Then I see "HEARING IMPAIRMENT" on the page + Then I see "DIABETIC" on the page + Then I see "VISUAL IMPAIRMENT" on the page + Then I see "READING" on the page + And I see "arrangementsTestData" in the same row as "Special arrangements or help the juror needs" + + And I see "TO DO" on the page + + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information'" link + And I set the radio button to "Awaiting court reply" + And I press the "Confirm" button + Then I see "AWAITING COURT REPLY" on the page + + Given I am on "Bureau" "bau-test" + And I log in + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "1 results for" on the page + When I click on "<part_no>" in the same row as "<part_no>" + + #JDB-1677 + + Then I see "Main Phone" on the page + And I see "Another Phone" on the page + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I see "Responded" on the page + + ## To do + + #select * from pool where part_no='<juror number>' + #JUROR.POOL is updated with a DOB, EMAIL, PHONE + + + #select * from part_hist where part_no='<juror number>' + #JUROR.PART_HIST is updated with a PDET row + + + #select * from part_amendments where part_no='<juror number>' + #JUROR.PART_AMENDMENTS is updated with a row indicating DOB change + +Examples: + |part_no |last_name |postcode |email | + |645700930 |LNAMEEIGHTFOUR |CH1 2AN |email@bureauA.com | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_AutoAllocation.feature b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_AutoAllocation.feature new file mode 100644 index 00000000..d0722562 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_AutoAllocation.feature @@ -0,0 +1,991 @@ +Feature: Bureau Auto Allocation of Responses + +# Test commented out as bureau edit links disabled +#@RegressionSingle @JDB-3761 +Scenario Outline: 1. Edit Juror Details on PENDING ALLOCATION + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |457170401 | 400 | + + # Set part_no pool to not be urgent + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + |<part_no> |<pool_no> | <last_name> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no>" + + #edit Juror's name + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "Process reply" on the page + When I click on the "Change" link + And I set "First name" to "Bob" + When I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "Some notes here" + And I click link with ID "changeLogSaveButton" + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no>" + +Examples: + |part_no |pool_no |last_name |postcode | + |645700182 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN | + +# Test commented out as bureau edit links disabled +#@RegressionSingle @JDB-3761 +Scenario Outline: 2. Edit Eligibility on PENDING ALLOCATION response + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_one> |457170401 |400 | + + # Set part_no pool to not be urgent + + Given "<part_no_one>" has "RET_DATE" as "5 mondays time" + And "<part_no_one>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_one>" has "LNAME" as "<last_name>" + And "<part_no_one>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + |<part_no_one> |<pool_no> | <last_name> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_one>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_one>" + + #edit Juror's eligibility + + When I click on "<part_no_one>" in the same row as "<part_no_one>" + Then I see "Process reply" on the page + When I click on the "Eligibility" link + When I click on the "Change" link + And I set the radio button to "No" under "Residency" + And I set "Provide details" to "Details" + When I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "Some reasons for change" + And I click link with ID "changeLogSaveButton" + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_one>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_one>" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_one|part_no_three |pool_no |last_name |postcode | + |645700115 |645700802 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN | + +# Test commented out as bureau edit links disabled +#@RegressionSingle @JDB-3761 +Scenario Outline: 3. Edit Deferral on PENDING ALLOCATION response + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_two> |457170401 |400 | + + # Set part_no pool to not be urgent + + Given "<part_no_two>" has "RET_DATE" as "5 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name>" + And "<part_no_two>" has "ZIP" as "<postcode>" + + #Submit a deferral request response in pool + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + When I set "9-digit juror number" to "<part_no_two>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "<postcode>" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + Then I see "What is your date of birth" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "Are you currently on bail for a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Mental Health" on the page + And I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + And I see "No, I need to change the date" on the page + And I set the radio button to "No, I need to change the date" + And I press the "Continue" button + + #deferral + + And I see "Tell us why you need another date for your jury service" on the page + When I set text area with "id" of "deferralReason" to "TestDeferralData" + And I press the "Continue" button + Then I see "Choose 3 Mondays when you can start jury service" on the page + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Continue" button + + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Will you need help when you're at the court?" on the page + Then I see "Do you have a disability or impairment that means you’ll need extra support or facilities in the court building where you are doing your Jury Service?" on the page + When I set the radio button to "No" + When I press the "Continue" button + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + Then I see "You have completed your reply" on the page + Then I see "<part_no_two>" on the page + + #log on to bureau as CPASS + + Given I am on "Bureau" "bau-test" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_two>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_two>" + + #edit Juror's deferral + + When I click on "<part_no_two>" in the same row as "<part_no_two>" + Then I see "Process reply" on the page + When I click on the "Deferral or excusal" link + When I click on the "Change" link + And I set the radio button to "I can do jury service on the date shown" + When I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "Some reasons for change" + And I click link with ID "changeLogSaveButton" + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_two>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_two>" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_two|pool_no |last_name |postcode |email | + |645700802 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN |e@mail.com | + +# Test commented out as bureau edit links disabled +#@RegressionSingle @JDB-3761 +Scenario Outline: 4. Edit Excusal on PENDING ALLOCATION response + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_three>|457170401 |400 | + + # Set part_no pool to not be urgent + + Given "<part_no_three>" has "RET_DATE" as "5 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name>" + And "<part_no_three>" has "ZIP" as "<postcode>" + + #Submit an excusal request response in pool + + Given I am on "Public" "juror-test02" + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + + Then I see "Your juror details" on the page + When I set "9-digit juror number" to "<part_no_three>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + When I press the "Continue" button + + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + And I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + When I press the "Continue" button + + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Have you been found guilty of a criminal offence?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your start date" on the page + + #excusal + + When I set the radio button to "No, I cannot do jury service and need to be excused" + And I press the "Continue" button + Then I see "Why do you need to be excused from jury service?" on the page + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Continue" button + + Then I see "Will you need help when" on the page + When I set the radio button to "No" + And I press the "Continue" button + + Then I see "Check your answers now" on the page + When I check the "The information" checkbox + And I press the "Submit" button + And I see "You have completed your reply" on the page + + #log on to bureau as CPASS + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_three>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_three>" + + #edit Juror's excusal + + When I click on "<part_no_three>" in the same row as "<part_no_three>" + Then I see "Process reply" on the page + When I click on the "Deferral or excusal" link + When I click on the "Change" link + And I set the radio button to "I can do jury service on the date shown" + When I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "Some reasons for change" + And I click link with ID "changeLogSaveButton" + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_three>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_three>" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_three |pool_no |last_name |postcode |email | + |645700802 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN |e@mail.com | + +# Test commented out as bureau edit links disabled +#@RegressionSingle @JDB-3761 +Scenario Outline: 5. Edit CJS Employment on PENDING ALLOCATION response + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no_four>|457170401 | 400 | + + # Set part_no pool to not be urgent + + Given "<part_no_four>" has "RET_DATE" as "5 mondays time" + And "<part_no_four>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_four>" has "LNAME" as "<last_name>" + And "<part_no_four>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_four> |<pool_no> |<last_name> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_four>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_four>" + + #edit Juror's CJS emp + + When I click on "<part_no_four>" in the same row as "<part_no_four>" + Then I see "Process reply" on the page + When I click on the "CJS employment" link + When I click on the "Change" link + And I set the radio button to "Yes" under "CJS Employment" + And I check the "National Crime Agency" checkbox + And I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "Some reasons for change" + And I click link with ID "changeLogSaveButton" + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_four>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_four>" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_four |pool_no |last_name |postcode | + |645700129 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN | + +# Test commented out as bureau edit links disabled +#@RegressionSingle @JDB-3761 +Scenario Outline: 6. Edit Reasonable Adjustments on PENDING ALLOCATION response + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no_five>|457170401 | 400 | + + # Set part_no pool to not be urgent + + Given "<part_no_five>" has "RET_DATE" as "5 mondays time" + And "<part_no_five>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_five>" has "LNAME" as "<last_name>" + And "<part_no_five>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "<part_no_five>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + + #name + + Then I see "Is the name we have for you correct?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #address + + Then I see "Is this your address?" on the page + And I set the radio button to "Yes" + And I press the "Continue" button + + #phone + + Then I see "What is your phone number?" on the page + When I set "Main phone" to "02078211818" + And I press the "Continue" button + + #email + + Then I see "What is your email address?" on the page + When I set "Enter your email address" to "<email>" + When I set "Enter your email address again" to "<email>" + And I press the "Continue" button + + #dob + + Then I see "What is your date of birth?" on the page + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + #qualifying + + Then I see "Confirm you're eligible for jury service" on the page + And I press the "Continue" button + + #residency + + Then I see "Since you turned 13, has your main address" on the page + When I set the radio button to "Yes" + And I press the "Continue" button + + #CJS + + Then I see "Have you worked in the criminal justice system in the last 5 years?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #bail + + Then I see "Are you currently on bail" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #crim offence + + Then I see "Have you been found guilty of a criminal offence" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ1 + + Then I see "Are you being detained, looked after or treated under the Mental Health Act?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #MHQ2 + + Then I see "Has it been decided that you 'lack mental capacity'?" on the page + When I set the radio button to "No" + And I press the "Continue" button + + #confirm date + + Then I see "Check your start date" on the page + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #Help in Court + + Then I see "Will you need help when you're at the court?" on the page + When I set the radio button to "Yes" + Then I check the "Diabetes" checkbox + And I press the "Continue" button + + #Check Answers + + Then I see "Check your answers now" on the page + Then I check the "The information I have given is true to the best of my knowledge" checkbox + When I press the "Submit" button + + #Confirmation + + And I see "You have completed your reply" on the page + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_five>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_five>" + + #edit Juror's reasonable adjustments + + When I click on "<part_no_five>" in the same row as "<part_no_five>" + Then I see "Process reply" on the page + When I click on the "Reasonable adjustments" link + When I click on the "Change" link + And I check the "Limited mobility" checkbox + When I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "Some reasons for change" + And I click link with ID "changeLogSaveButton" + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_five>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_five>" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_five |pool_no |last_name |postcode |email | + |645700224 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN |e@mail.com | + +@RegressionSingle @JDB-3761 +Scenario Outline: 7. Edit Notes and Logs on PENDING ALLOCATION response + + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_six> |457170401 |400 | + + # Set part_no pool to not be urgent + + Given "<part_no_six>" has "RET_DATE" as "5 mondays time" + And "<part_no_six>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_six>" has "LNAME" as "<last_name>" + And "<part_no_six>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + |<part_no_six> |<pool_no> | <last_name> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_six>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_six>" + + #add notes + + When I click on "<part_no_six>" in the same row as "<part_no_six>" + Then I see "Process reply" on the page + When I click on the "Logs" link + And I click on the "Add or Edit" link + And I see "Notes" on the page + And I see "<last_name>" on the page + And I see "/<part_no_six>/notes/edit" in the URL + And I set text area with "id" of "notes" to "Some notes in the notes field" + And I press the "Save" button + Then I see "Notes" on the page + And "notes" is "Some notes in the notes field" + + #edit notes + + And I click on the "Add or Edit" link + And I append text area with "id" of "notes" with " and some more notes" + And I press the "Save" button + Then I see "Notes" on the page + And "notes" is "Some notes in the notes field and some more notes" + + #check I can enter special characters + + And I click on the "Add or Edit" link + And I set text area with "id" of "notes" to "Some-one 0% £300 & * ! @ + [] her's ?'" + And I press the "Save" button + And "notes" is "Some-one 0% £300 & * ! @ + [] her's ?'" + + #check I can enter 2000 chars + + And I click on the "Add or Edit" link + And I set text area with "id" of "notes" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + And I see "You have 0 characters remaining" on the page + And I press the "Save" button + And "notes" is "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + + #check I cannot enter >2000 chars + + And I click on the "Add or Edit" link + And I set text area with "id" of "notes" to "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details" + And I see "You have 10 characters too many" on the page + And I press the "Save" button + And I see "There is a problem" on the page + And I see "Notes must be 2000 characters or fewer" on the page + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I press "back_space" in "Notes" + And I see "You have 0 characters remaining" on the page + And I press the "Save" button + And "notes" is "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + + #check I cannot leave notes empty + + And I click on the "Add or Edit" link + And I set text area with "id" of "notes" to "" + And I press the "Save" button + And I see "There is a problem" on the page + And I see "Enter notes text" on the page + + #click cancel + + Then I click on the "Cancel" link + And "notes" is "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_six>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_six>" + + #check notes are still there + + When I click on "<part_no_six>" in the same row as "<part_no_six>" + When I click on the "Logs" link + And "notes" is "These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are tThese are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are the details. These are t" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_six|pool_no |last_name |postcode |e@mail | + |645700267 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN |e@mail.com | + +@RegressionSingle @JDB-3761 +Scenario Outline: 8. Set to Awaiting Response on PENDING ALLOCATION response + Given I am on "Public" "juror-test01" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no_seven> |457170401 | 400 | + + # Set part_no pool to not be urgent + + Given "<part_no_seven>" has "RET_DATE" as "5 mondays time" + And "<part_no_seven>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_seven>" has "LNAME" as "<last_name>" + And "<part_no_seven>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + |<part_no_seven> |<pool_no> | <last_name> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "juror-test01" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_seven>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_seven>" + + #set response to awaiting information + + When I click on "<part_no_seven>" in the same row as "<part_no_seven>" + Then I see "Process reply" on the page + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information'" link + When I set the radio button to "Awaiting juror" + And I press the "Confirm" button + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_seven>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_seven>" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_seven |pool_no |last_name |postcode | + |645700135 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN | + +@RegressionSingle @JDB-3761 +Scenario Outline: 9. Complete a PENDING ALLOCATION response + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no_eight> |457170401 | 400 | + + # Set part_no pool to not be urgent + + Given "<part_no_eight>" has "RET_DATE" as "5 mondays time" + And "<part_no_eight>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_eight>" has "LNAME" as "<last_name>" + And "<part_no_eight>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + |<part_no_eight> |<pool_no> | <last_name> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_eight>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_eight>" + + #set response to responded + + When I click on "<part_no_eight>" in the same row as "<part_no_eight>" + Then I see "Process reply" on the page + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_eight>" + + # re-enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_eight |pool_no |last_name |postcode | + |645700136 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN | + +# Test commented out as bureau edit links disabled +#@RegressionSingle @JDB-3761 +Scenario Outline: 10. test that editing an allocated response doesnt auto allocate to me + Given I am on "Public" "juror-test02" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no_nine> |457170401 | 400 | + + # Set part_no pool to not be urgent + + Given "<part_no_nine>" has "RET_DATE" as "5 mondays time" + And "<part_no_nine>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_nine>" has "LNAME" as "<last_name>" + And "<part_no_nine>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_nine> |<pool_no> |<last_name> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + #check response is pending allocation + + And I click on the "Search" link + And I set "Juror number" to "<part_no_nine>" + And I press the "Search" button + Then I see "TO DO" in the same row as "<part_no_nine>" + + #set response to awaiting information + + When I click on "<part_no_nine>" in the same row as "<part_no_nine>" + Then I see "Process reply" on the page + When I select "Awaiting information" from Process reply + When I set the radio button to "Awaiting juror" + And I press the "Update reply status" button + + #check the response is now allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_nine>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_nine>" + + #check SYSTEM can update record and it's not allocated to them + + Given I am on "Bureau" "juror-test02" + And I log in as "SYSTEM" + + And I click on the "Search" link + And I set "Juror number" to "<part_no_nine>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_nine>" + + When I click on "<part_no_nine>" in the same row as "<part_no_nine>" + Then I see "Process reply" on the page + When I click on the "Change" link + And I set "First name" to "Bob" + When I click on the "Save" link + And I set "Please give a reason for the change to this summons reply" to "Some reasons for change" + And I click link with ID "changeLogSaveButton" + + #check the response is still allocated to CPASS + + And I click on the "Search" link + And I set "Juror number" to "<part_no_nine>" + And I press the "Search" button + Then I see "CPASS" in the same row as "<part_no_nine>" + + # re enable auto processing + + Given auto straight through processing has been enabled + +Examples: + |part_no_nine |pool_no |last_name |postcode | + |645700138 |457170401 |LNAMEONEFIVEFOUR |CH1 2AN | + +@RegressionSingle @JDB-3761 +Scenario Outline: 11. Complete a PENDING ALLOCATION response that has been processed in Juror DB before Juror Digital + + Given I am on "Public" "juror-test02" + Given auto straight through processing has been enabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_ten> |<pool_no> |400 | + + #Set part_no pool to be urgent + Given "<part_no_ten>" has "RET_DATE" as "3 mondays time" + And "<part_no_ten>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_ten>" has "LNAME" as "<last_name>" + And "<part_no_ten>" has "ZIP" as "<postcode>" + And "<part_no_ten>" has "DOB" as "01-JAN-1977" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_ten> |<pool_no> |<last_name>|<postcode> |<email>| + + #update JUROR to responded + Given "<part_no_ten>" has "RESPONDED" as "Y" + Given "<part_no_ten>" has "STATUS" as "2" + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_ten>" + And I press the "Search" button + And I click on "<part_no_ten>" in the same row as "<part_no_ten>" + + #check I get a warning that the record is completed + + Then I see "Response Completed" on the page + Then I see "This response has already been processed in Juror, please check the details are correct" on the page + + #ok message + + And I press the "Ok" button + + #check status on screen + + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_ten>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_ten>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_ten>" on the page + +Examples: + |part_no_ten|pool_no |last_name |postcode |email | + |645700296 |457170401 |LNAMETWOSIXZERO|CH1 2AN |a@a.com| + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_C_Re_Allocate.feature b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_C_Re_Allocate.feature new file mode 100644 index 00000000..c15a3f67 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_C_Re_Allocate.feature @@ -0,0 +1,184 @@ +Feature: Bureau C Test + +@RegressionSingle +Scenario Outline: Bureau C script + + Given I am on "Bureau" "test" + + And pool no "<pool_no>" is reset to pending allocation + And I have cleared down the juror digital database + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + | <part_no_two> |<pool_no> | 400 | + | <part_no_three> |<pool_no> | 400 | + + Given auto straight through processing has been enabled + + And "<part_no>" has "RET_DATE" as "6 mondays time" + And "<part_no>" has "NEXT_DATE" as "6 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + And "<part_no_two>" has "RET_DATE" as "6 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "6 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name>" + And "<part_no_two>" has "ZIP" as "<postcode>" + + And "<part_no_three>" has "RET_DATE" as "6 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "6 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name>" + And "<part_no_three>" has "ZIP" as "<postcode>" + + Given I have submitted a first party English ineligibilty response + | part_no |pool_number | last_name |postcode | email |details | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email> |<details> | + |<part_no_two> |<pool_no> | <last_name> |<postcode> |<email> |<details> | + |<part_no_three> |<pool_no> | <last_name> |<postcode> |<email> |<details> | + + Given I am on "Bureau" "test" + + When I log in + And I click on the "Assign Replies" link + + #And I see "3" in the same row as "Non urgent" in Backlog box + And I set input field with "name" of "allocateNonUrgent" to "3" + When I check the "ARAMIS1" checkbox + And I press the "Assign replies" button + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + And I press the "Select all" button + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "SYSTEM" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + Then I see "<part_no>" in the same row as "<part_no>" + When I click on the "To do" link + + # Proves that I have sent from Backlog to SYSTEM/Logged in USer + + When I click on "<part_no>" in the same row as "<part_no>" + Then I press the "More actions" button + And I click on the "Send to a colleague" link + + #check error if no name input + + Then I see "to a colleague" on the page + And I press the "Send" button + And I see "Select an officer to send this reply to" on the page + + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + Then I see "To do" on the page + Then I do not see "<part_no>" on the page + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + And I press the "Select all" button + And I press the "Send to" button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + And I click on the "Sign out" link + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + Then I see "<part_no>" on the page + + When I click on "<part_no>" in the same row as "<part_no>" + Then I press the "More actions" button + And I click on the "Send to a colleague" link + And I set input field with "id" of "sendToOfficer" to "SYSTEM" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + Then I do not see "<part_no>" on the page + + And I click on the "Sign out" link + + Given I am on "Bureau" "test" + And I log in + Then I see "<part_no>" on the page + + When I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + And I click on the "Select all" link + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + And I click on the "Sign out" link + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + Then I see "<part_no>" on the page + Then I see "<part_no_two>" on the page + Then I see "<part_no_three>" on the page + + And I click on the "Sign out" link + + Given I am on "Bureau" "test" + And I log in + When I click on the "Search" link + And I set "Juror's pool number" to "<pool>" + And I click on the "Advanced search" link + And I check the "To do" checkbox + And I press the "Search" button + And I press the "Select all" button + And I press the "Send to" button + And I set input field with "id" of "sendToOfficer" to "Return to unass" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + And I click on the "Sign out" link + + Given I am on "Bureau" "test" + And I log in as "CPASS" + Then I do not see "<part_no>" on the page + Then I do not see "<part_no_two>" on the page + Then I do not see "<part_no_three>" on the page + + + + #And I send to Backlog + + ## New Replies cannot be assigned to the backlog if they are assigned to the current user + + +#Expected Result +#Step 1 +#Search for a response which is in the backlog (New Replies), and assign it to a team member +#Response assigned. +#Step 2 +#Select a response from your Team Leader's To Do list, and assign it to New Replies +#Response sent to New Replies. +#Step 3 +#Select a response from the backlog (New Replies), and assign it to another team member +#Response reassigned to another team member successfully. +#Step 4 +#Select a response from your To Do list and assign to your team leader +#Response assigned to team leader. +#Step 5 +#Logged in as a Team Leader Do a search which returns multiple responses, Select All and reassign to another team member +#Multiple responses assigned to team member. +#Step 6 +#Do a search which returns multiple responses, Select All and reassign to backlog + + +Examples: + |part_no |part_no_two|part_no_three |pool_no |last_name |postcode |email |details | + |641500613 |641500616 |641500618 |415170401 |LNAMEEIGHTFOUR |CH1 2AN |email@bureauA.com |12345abcde | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_New.feature b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_New.feature new file mode 100644 index 00000000..7d0452f8 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_New.feature @@ -0,0 +1,1350 @@ +Feature: Bureau Functionality - NEW + +@RegressionSingle +Scenario: Log on + Given I am on "Bureau" "test" + Given bureau username "CPASS" has "LOGIN_ENABLED_YN" set to "Y" + And I have reset user "CPASS" + + #1st attempt + + When I log in with "CPASS" and "WrongPassword" + Then I see "There is a problem" on the page + And I see "Username and password do not match - try again. You’ll be locked out of your account after 3 attempts." on the page + + #2nd attempt + When I log in with "CPASS" and "WrongPassword" + Then I see "There is a problem" on the page + And I see "Username and password do not match - try again. You’ll be locked out of your account after 3 attempts." on the page + + #3rd attempt + + When I log in with "CPASS" and "WrongPassword" + Then I see "There is a problem" on the page + And I see "Username and password do not match - try again. You’ll be locked out of your account after 3 attempts." on the page + + #disabled + + When I log in with "CPASS" and "WrongPassword" + Then I see "There is a problem" on the page + And I see "Your account is locked because you entered incorrect details 3 times. To unlock your account, contact your manager." on the page + + #invalid username + + When I log in with "BOB" and "WrongPassword" + Then I see "There is a problem" on the page + And I see "Username and password do not match - try again. You’ll be locked out of your account after 3 attempts." on the page + + #no credentials + + When I log in with "" and "" + Then I see "There is a problem" on the page + And I see "Enter your username" on the page + And I see "Enter your password" on the page + + #no username + + When I log in with "" and "password" + Then I see "There is a problem" on the page + And I see "Enter your username" on the page + + #no password + + When I log in with "SYSTEM" and "" + Then I see "There is a problem" on the page + And I see "Enter your password" on the page + + #successful log on as manager + + Then I log in + And I see link with text "Your work" + And I see link with text "Search" + And I see link with text "Assign Replies" + And I see link with text "Manage team" + + #sign out + + Then I click on the "Sign out" link + And I see "Manage replies to jury summons" on the page + And I see "Sign in" on the page + And I see "Username" on the page + And I see "Password" on the page + + Then bureau username "CPASS" has "LOGIN_ENABLED_YN" set to "Y" + And I have reset user "CPASS" + + #successful log on as team member + + And I log in as "ARAMIS1" + And I see link with text "Your work" + And I see link with text "Search" + And I do not see link with text "Assign Replies" + And I do not see link with text "Manage team" + + #sign out + + Then I click on the "Sign out" link + And I see "Manage replies to jury summons" on the page + And I see "Sign in" on the page + And I see "Username" on the page + And I see "Password" on the page + + #password expiry warning + +# Given bureau username "CPASS" has "PASSWORD_CHANGED_DATE" set to "2020-12-21 00:00:00" + Given bureau username "CPASS" has an expired password + When I log in as "CPASS" + And I see "There is a problem" on the page + And I see "Your password has expired. Please use the facility in the Juror application to specify a new one" on the page + + And I have reset user "CPASS" + +@RegressionSingle +Scenario Outline: Your Work + Given I am on "Public" "test" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |457170501 |400 | + |<part_no_two> |457170501 |400 | + |<part_no_three> |457170501 |400 | + |<part_no_four> |457170501 |400 | + + # Using Staff Member CPASS + + # Set part_no pool to not be urgent + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|CH1 2AN |a@a.com| + + #update response to have been received 6 days ago + + Given the "DATE_RECEIVED" for juror "<part_no>" is set to "-2 mondays time" + + # Set part_no pool to be urgent + + Given "<part_no_two>" has "RET_DATE" as "3 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name_two>" + And "<part_no_two>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode | email | + |<part_no_two> |<pool_no> |<last_name_two>|CH1 2AN |a@a.com| + + # Set part_no pool to be super urgent + + Given "<part_no_three>" has "RET_DATE" as "2 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name_three>" + And "<part_no_three>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_three>|<pool_no> |<last_name_three> |CH1 2AN |a@a.com| + + Given "<part_no_three>" has "READ_ONLY" as "Y" + Then the "URGENT" for juror "<part_no_three>" is set to "N" + Then the "SUPER_URGENT" for juror "<part_no_three>" is set to "Y" + + # Submit response in pool + + Given "<part_no_four>" has "RET_DATE" as "5 mondays time" + And "<part_no_four>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_four>" has "LNAME" as "<last_name_four>" + And "<part_no_four>" has "ZIP" as "<postcode>" + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_four> |<pool_no> |<last_name_four> |CH1 2AN |a@a.com| + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + And I do not see any links on the page that open to a new page without an alt text + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + And I see "Manage replies to jury summons" on the page + And I see "Your work" on the page + And I see link with text "ARAMIS1" + And I see link with text "Sign out" + And I see link with text "To do" + And I see link with text "Awaiting information" + And I see link with text "Completed" + And I see link with text "Your work" + And I see link with text "Search" + And I see "/inbox" in the URL + + Then I see "<part_no>" on the page +# And on Bureau I see "<part_no>" under "High priority" + And I see "<part_no>" is flagged as overdue + And I see "LNAMEONE" in the same row as "<part_no>" + And I see "SWANSEA" in the same row as "<part_no>" + + Then I see "<part_no_two>" on the page + Then I see "URGENT" icon in the same row as "<part_no_two>" + And I see "LNAMETWO" in the same row as "<part_no_two>" + And I see "SWANSEA" in the same row as "<part_no_two>" + + Then I see "<part_no_three>" on the page + And I see "SEND TO COURT" icon in the same row as "<part_no_three>" + And I see "LNAMETHREE" in the same row as "<part_no_three>" + And I see "SWANSEA" in the same row as "<part_no_three>" + + Then I see "<part_no_four>" on the page + And I see "LNAMEFOUR" in the same row as "<part_no_four>" + And I see "SWANSEA" in the same row as "<part_no_four>" + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "Record status" on the page + And I see "OVERDUE" on the page + + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information'" link + And I see "Awaiting juror" on the page + And I set the radio button to "Awaiting juror" + + Then I press the "Confirm" button + + Then I see "AWAITING JUROR" on the page + + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + When I set the radio button to "Awaiting court reply" + And I press the "Confirm" button + Then I see "AWAITING COURT REPLY" on the page + When I click on the "Your work" link + Then I do not see "<part_no>" on the page + When I click on the "Awaiting information" link + And I see "/pending" in the URL + Then I see "<part_no>" on the page + Then I see "AWAITING COURT REPLY" in the same row as "<part_no>" + And I see "<part_no>" is flagged as overdue + + When I click on the "To do" link + When I click on "<part_no_two>" in the same row as "<part_no_two>" + Then I see "Record status" on the page + And I see "URGENT" on the page + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + And I see "Awaiting court reply" on the page + When I set the radio button to "Awaiting court reply" + And I press the "Confirm" button + Then I see "AWAITING COURT REPLY" on the page + When I click on the "Your work" link + Then I do not see "<part_no_two>" on the page + When I click on the "Awaiting information" link + And I see "/pending" in the URL + Then I see "<part_no_two>" on the page + Then I see "AWAITING COURT REPLY" in the same row as "<part_no_two>" + Then I see "URGENT" icon in the same row as "<part_no_two>" + + When I click on the "Your work" link + + When I click on the "To do" link + And I see "SEND TO COURT" icon in the same row as "<part_no_three>" + When I click on "<part_no_three>" in the same row as "<part_no_three>" + And I see "SEND TO COURT" on the page + + When I click on the "Your work" link + Then I see "<part_no_four>" on the page + Then I see link with text "<part_no_four>" + When I click on "<part_no_four>" in the same row as "<part_no_four>" + Then I see "Record status" on the page + Then I press the "More actions" button + Then I click on the "Mark as 'Awaiting information'" link + Then I see "Who is the bureau waiting for information from?" on the page + When I set the radio button to "Awaiting court reply" + And I press the "Confirm" button + Then I see "AWAITING COURT REPLY" on the page + When I click on the "Your work" link + Then I do not see "<part_no_four>" on the page + When I click on the "Awaiting information" link + Then I see "<part_no_four>" on the page + Then I see "AWAITING COURT REPLY" in the same row as "<part_no_four>" + + #send to court + + When I click on the "To do" link + When I click on "<part_no_three>" in the same row as "<part_no_three>" + And I do not see "edit" on the page + When I select "PDF sent to court" from Process reply + When I check the "PDF sent to court" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I do not see "SEND TO COURT" on the page + When I click on the "Your work" link + Then I do not see "<part_no_three>" on the page + When I click on the "Completed" link + And I see "/completed" in the URL + Then I see "<part_no_three>" on the page + + #complete + + When I click on the "Awaiting information" link + When I click on "<part_no>" in the same row as "<part_no>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I do not see "OVERDUE" on the page + When I click on the "Your work" link + And I do not see "<part_no>" on the page + When I click on the "Completed" link + Then I see "<part_no>" on the page + + When I click on the "Awaiting information" link + When I click on "<part_no_two>" in the same row as "<part_no_two>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I do not see "URGENT" on the page + When I click on the "Your work" link + When I click on the "Awaiting information" link + And I do not see "<part_no_two>" on the page + When I click on the "Completed" link + Then I see "<part_no_two>" on the page + + When I click on the "Awaiting information" link + When I click on "<part_no_four>" in the same row as "<part_no_four>" + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + When I click on the "Your work" link + When I click on the "Awaiting information" link + And I do not see "<part_no_four>" on the page + When I click on the "Completed" link + Then I see "<part_no_four>" on the page + + Given auto straight through processing has been enabled + +Examples: + |part_no |part_no_two |part_no_three |part_no_four |pool_no |last_name |last_name_two |last_name_three |last_name_four |postcode | + |645700184 |645700878 |645700884 |645700585 |457170501 |LNAMEONE |LNAMETWO |LNAMETHREE |LNAMEFOUR |CH1 2AN | + +@RegressionSingle +Scenario Outline: Edit Response + Given I am on "Public" "test" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |457170501 |400 | + |<part_no_two> |457170501 |400 | + |<part_no_three> |457170501 |400 | + + # Using Staff Member CPASS + + # Set part_no pool to not be urgent + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|CH1 2AN |a@a.com| + + # Set part_no pool to be urgent + + Given "<part_no_two>" has "RET_DATE" as "3 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name_two>" + And "<part_no_two>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode | email | + |<part_no_two> |<pool_no> |<last_name_two>|CH1 2AN |a@a.com| + + # Set part_no pool to be super urgent + + Given "<part_no_three>" has "RET_DATE" as "2 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name_three>" + And "<part_no_three>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_three>|<pool_no> |<last_name_three> |CH1 2AN |a@a.com| + + Given "<part_no_three>" has "READ_ONLY" as "Y" + Then the "URGENT" for juror "<part_no_three>" is set to "N" + Then the "SUPER_URGENT" for juror "<part_no_three>" is set to "Y" + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + And I do not see any links on the page that open to a new page without an alt text + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + + And on the page I see + |text| + |Your work| + |To do| + |<part_no>| + |<part_no_two>| + |<part_no_three>| + + And I click on the "<part_no>" link + + And on the page I see + |text| + |<last_name>| + |Reply status| + |Reply type| + |Juror number| + |<part_no>| + |Record status| + |Summoned| + |Reply received| + |Pool number| + |<pool_no>| + |Court start date| + |Court name| + |SWANSEA| + |Juror's reply| + |Logs| + + Then I click on the "Back" link + And I see "Your work" on the page + + Given auto straight through processing has been enabled + +Examples: + |part_no |part_no_two |part_no_three |pool_no |last_name |last_name_two |last_name_three |postcode | + |645700184 |645700878 |645700884 |457170501 |LNAMESTANDARD |LNAMEURGENT |LNAMESUPERURGENT |CH1 2AN | + +@RegressionSingle +Scenario Outline: Search as Team Member + Given I am on "Public" "test" + Given "ARAMIS1" has court 9 set as "457" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |457170501 |400 | + |<part_no_two> |457170501 |400 | + |<part_no_three> |457170501 |400 | + + # Using Staff Member CPASS + + # Set part_no pool to not be urgent + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|CH1 2AN |a@a.com| + + # Set part_no pool to be urgent + + Given "<part_no_two>" has "RET_DATE" as "3 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name_two>" + And "<part_no_two>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode | email | + |<part_no_two> |<pool_no> |<last_name_two>|CH1 2AN |a@a.com| + + # Set part_no pool to be super urgent + + Given "<part_no_three>" has "RET_DATE" as "2 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name_three>" + And "<part_no_three>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_three>|<pool_no> |<last_name_three> |CH1 2AN |a@a.com| + + Given "<part_no_three>" has "READ_ONLY" as "Y" + Then the "URGENT" for juror "<part_no_three>" is set to "N" + Then the "SUPER_URGENT" for juror "<part_no_three>" is set to "Y" + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + And I do not see any links on the page that open to a new page without an alt text + + # Go to New Replies count + # Set the team members allocation count, set others to 0 and click send + + Given I am on "Bureau" "test" + And I log in as "ARAMIS1" + And I see "Manage replies to jury summons" on the page + And I see "Your work" on the page + And I see link with text "ARAMIS1" + And I see link with text "Sign out" + And I see link with text "To do" + And I see link with text "Awaiting information" + And I see link with text "Completed" + And I see link with text "Your work" + And I see link with text "Search" + And I see "/inbox" in the URL + + And I click on the "Search" link + And I see "Search" on the page + And I see "/search" in the URL + And I see "Juror number" on the page + And I see "Juror's last name" on the page + And I see "Juror's pool number" on the page + + And I press the "Search" button + And I see "Enter a juror number, a juror's last name or a juror's pool number to search" on the page + + And I do not see "Filters" on the page + And I do not see "Alerts" on the page + And I do not see "Urgent" on the page + And I do not see "Status" on the page + And I do not see "To do" on the page + And I do not see "Awaiting court reply" on the page + And I do not see "Awaiting juror reply" on the page + And I do not see "Awaiting translation" on the page + And I do not see "Completed" on the page + And I do not see "Officer assigned" on the page + + And I press the "Search" button + Then I see "Enter a juror number, a juror's last name or a juror's pool number to search" on the page + + And I click on the "Clear search" link + Then I do not see "Enter a juror number, a juror's last name or a juror's pool number to search" on the page + + And I set "Juror number" to "letters" + Then "Juror number" is "" + + And I set "Juror's last name" to "NORESULTS" + Then "Juror's last name" is "NORESULTS" + + And I set "Juror's pool number" to "letters" + Then "Juror's pool number" is "" + + #no results + + Then I press the "Search" button + And I see "0 results for " on the page + And I see "No responses were found that match your search criteria." on the page + + #one result - search on name + + Then I click on the "Clear search" link + And I set "Juror's last name" to "<last_name>" + Then "Juror's last name" is "<last_name>" + + Then I press the "Search" button + And I see "1 results for " on the page + And I see "<last_name>" in the same row as "<part_no>" + + #three results - search on pool no + + Then I click on the "Clear search" link + Then I do not see "<part_no>" on the page + + And I set "Juror's pool number" to "<pool_no>" + Then "Juror's pool number" is "<pool_no>" + + Then I press the "Search" button + And I see "results for " on the page + And I see "<last_name>" in the same row as "<part_no>" + And I see "<last_name_two>" in the same row as "<part_no_two>" + And I see "<last_name_three>" in the same row as "<part_no_three>" + + Then I see "Urgent" icon in the same row as "<part_no_two>" + Then I see "Send to court" icon in the same row as "<part_no_three>" + + #search on juror number + + Then I click on the "Clear search" link + And I set "Juror number" to "<part_no>" + Then I press the "Search" button + And I see "results for " on the page + And I see "<last_name>" in the same row as "<part_no>" + And I see "<pool_no>" in the same row as "<part_no>" + And I see "ARAMIS1" in the same row as "<part_no>" + And I see "TO DO" on the page + + Given auto straight through processing has been enabled + +Examples: + |part_no |part_no_two |part_no_three |pool_no |last_name |last_name_two |last_name_three |postcode | + |645700184 |645700878 |645700884 |457170501 |LNAMESTANDARD |LNAMEURGENT |LNAMESUPERURGENT |CH1 2AN | + +@RegressionSingle +Scenario Outline: Search as Team Leader + Given I am on "Public" "test" + Given auto straight through processing has been disabled + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |457170501 |400 | + |<part_no_two> |457170501 |400 | + |<part_no_three> |457170501 |400 | + + # Set part_no pool to not be urgent + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|CH1 2AN |a@a.com| + + # Set part_no pool to be urgent + + Given "<part_no_two>" has "RET_DATE" as "3 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name_two>" + And "<part_no_two>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode | email | + |<part_no_two> |<pool_no> |<last_name_two>|CH1 2AN |a@a.com| + + # Set part_no pool to be super urgent + + Given "<part_no_three>" has "RET_DATE" as "2 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name_three>" + And "<part_no_three>" has "ZIP" as "<postcode>" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_three>|<pool_no> |<last_name_three> |CH1 2AN |a@a.com| + + Given "<part_no_three>" has "READ_ONLY" as "Y" + Then the "URGENT" for juror "<part_no_three>" is set to "N" + Then the "SUPER_URGENT" for juror "<part_no_three>" is set to "Y" + + #assign to CPASS + + Given I am on "Bureau" "test" + And I log in + + When I click on the "Assign Replies" link + And I assign all the New Replies to "ARAMIS1" + And I do not see any links on the page that open to a new page without an alt text + + And I see "Manage replies to jury summons" on the page + And I click on the "Your work" link + And I see link with text "SYSTEM" + And I see link with text "Sign out" + And I see link with text "To do" + And I see link with text "Awaiting information" + And I see link with text "Completed" + And I see link with text "Your work" + And I see link with text "Search" + And I see "/inbox" in the URL + + And I click on the "Search" link + And I see "Search" on the page + And I see "/search" in the URL + And I see "Juror number" on the page + And I see "Juror's last name" on the page + And I see "Juror's pool number" on the page + And I see "Advanced search" on the page + + And I press the "Search" button + Then I see "Enter a juror number, a juror's last name, a juror's pool number or advanced criteria to search" on the page + + And I do not see "Alerts" on the page + And I do not see "Urgent" on the page + And I do not see "Status" on the page + And I do not see "To do" on the page + And I do not see "Awaiting court reply" on the page + And I do not see "Awaiting juror reply" on the page + And I do not see "Awaiting translation" on the page + And I do not see "Completed" on the page + + And I click on the "Advanced search" link + And I see "Officer assigned" on the page + And I see "Alerts" on the page + And I see "Urgent" on the page + And I see "Status" on the page + And I see "To do" on the page + And I see "Awaiting court reply" on the page + And I see "Awaiting juror reply" on the page + And I see "Awaiting translation" on the page + And I see "Completed" on the page + + And I set "Juror number" to "letters" + Then "Juror number" is "" + + And I set "Juror's last name" to "NORESULTS" + Then "Juror's last name" is "NORESULTS" + + And I set "Juror's pool number" to "letters" + Then "Juror's pool number" is "" + + #no results + + Then I press the "Search" button + And I see "0 results for " on the page + And I see "No responses were found that match your search criteria." on the page + + #one result + + Then I click on the "Clear search" link + Then I do not see "NORESULTS" on the page + And I set "Juror's last name" to "LNAMESTANDARD" + Then "Juror's last name" is "LNAMESTANDARD" + + Then I press the "Search" button + And I see "results for " on the page + And I see "LNAMESTANDARD" in the same row as "<part_no>" + + #name appears if it's just 1 + + And I press the "Select all" button + And I press the "Send to..." button + And I see "Send this reply to a colleague" on the page + And I see "LNAMESTANDARD" on the page + And I see "Cancel" on the page + And I click on the "Cancel" link + + #three results + + Then I click on the "Clear search" link + Then I do not see "<part_no>" on the page + And I do not see "<last_name>" on the page + And I set "Juror's pool number" to "457170501" + Then "Juror's pool number" is "457170501" + + Then I press the "Search" button + + And I see "LNAMESTANDARD" in the same row as "<part_no>" + And I see "LNAMEURGENT" in the same row as "<part_no_two>" + And I see "LNAMESUPERURGENT" in the same row as "<part_no_three>" + + #names do not appear + + And I press the "Select all" button + And I press the "Send to..." button + And I see "Send 3 replies to a colleague" on the page + And I do not see "LNAMESTANDARD" on the page + And I do not see "LNAMEURGENT" on the page + And I do not see "LNAMESUPERURGENT" on the page + And I see "Cancel" on the page + And I click on the "Cancel" link + + #more than 250 results + + Then I click on the "Clear search" link + And I click on the "Advanced search" link + And I check the "closed" checkbox + Then I press the "Search" button + And I see "250 results for " on the page + And I see "The specified search resulted in more than 250 results. This list only shows the oldest 250." on the page + + #search on a specific user + + Then I click on the "Clear search" link + And I click on the "Advanced search" link + And I select "ARAMIS1" from the "Officer assigned" dropdown + Then I press the "Search" button + And I see "results for " on the page + + #search on urgent + + Then I click on the "Clear search" link + And I click on the "Advanced search" link + And I check the "urgentsOnly" checkbox + And I select "ARAMIS1" from the "Officer assigned" dropdown + Then I press the "Search" button + And I do not see "LNAMESTANDARD" on the page + And I see "LNAMEURGENT" in the same row as "<part_no_two>" + And I see "LNAMESUPERURGENT" in the same row as "<part_no_three>" + + #allocate from search results + + And I press the "Select all" button + And I press the "Unselect all" button + And I press the "Select all" button + Then I see "results for" on the page + And I press the "Send to..." button + And I see "Cancel" on the page + And I click on the "Cancel" link + + And I click link with ID "deselectAllLink" + + And I click link with ID "selectAllLink" + Then I press the "Send to..." button + Then I see "Select an officer" on the page + And I set input field with "id" of "sendToOfficer" to "SYSTEM" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + And I see "Your work" on the page + + #check responses have moved + + And I click on the "Search" link + And I click on the "Advanced search" link + Then I click on the "Clear search" link + And I click on the "Advanced search" link + And I select "ARAMIS1" from the "Officer assigned" dropdown + Then I press the "Search" button + And I see "results for " on the page + Then I press the "Select all" button + Then I press the "Unselect all" button + + And I click on the "Advanced search" link + Then I see "results for “ARAMIS1”" on the page + And I select "SYSTEM" from the "Officer assigned" dropdown + Then I press the "Search" button + And I do not see "LNAMESTANDARD" on the page + And I see "LNAMEURGENT" in the same row as "<part_no_two>" + And I see "LNAMESUPERURGENT" in the same row as "<part_no_three>" + + Given auto straight through processing has been enabled + +Examples: + |part_no |part_no_two |part_no_three |pool_no |last_name |last_name_two |last_name_three |postcode | + |645700184 |645700878 |645700884 |457170501 |LNAMESTANDARD |LNAMEURGENT |LNAMESUPERURGENT |CH1 2AN | + +@Regression @JDB-3743 +Scenario Outline: Work Allocation Fields and Labels Checks + + Given I am on "Bureau" "test" +# And pool no "<pool_no>" is reset to pending allocation + And I have cleared down the juror digital database + When I log in + And I click on the "Assign Replies" link + + Then I see "Number of replies in the backlog" on the page + And I see "How many replies do you want to assign to each officer you select?" on the page + And I see "Select the officers you want to assign these replies to" on the page + And I see "Officers and replies they’re currently assigned" on the page + And I see "Total currently assigned" on the page + And I see "Assign Replies" on the page + + And on Bureau I see "Total" under "Number of replies in the backlog" + And on Bureau I see "Standard" under "Number of replies in the backlog" + And on Bureau I see "Urgent" under "Number of replies in the backlog" + And on Bureau I see "Send to court" under "Number of replies in the backlog" + + Then I see "0" in the same row as "total" in Backlog box + + Then I see "0" in the same row as "urgent" in Backlog box + Then I see "0" in the same row as "standard" in Backlog box + + And on Bureau I see "Standard" under "How many replies do you want to assign to each officer you select?" + And on Bureau I see "Urgent" under "How many replies do you want to assign to each officer you select?" + And on Bureau I see "Send to court" under "How many replies do you want to assign to each officer you select?" + + #AC8, AC9 and AC10 + + And I set input field with "name" of "allocateNonUrgent" to "abcdefghijklmnopqrstuvwxyz" + Then I see "" in "allocateNonUrgent" Allocate Replies box + And I set input field with "name" of "allocateNonUrgent" to "-1" + Then I see "1" in "allocateNonUrgent" Allocate Replies box + And I set input field with "name" of "allocateNonUrgent" to "1.1" + Then I see "11" in "allocateNonUrgent" Allocate Replies box + And I set input field with "name" of "allocateNonUrgent" to "1234567890" + Then I see "12345" in "allocateNonUrgent" Allocate Replies box + And I set input field with "name" of "allocateNonUrgent" to "" + + And I set input field with "name" of "allocateUrgent" to "abcdefghijklmnopqrstuvwxyz" + Then I see "" in "allocateUrgent" Allocate Replies box + And I set input field with "name" of "allocateUrgent" to "-1" + Then I see "1" in "allocateUrgent" Allocate Replies box + And I set input field with "name" of "allocateUrgent" to "1.1" + Then I see "11" in "allocateUrgent" Allocate Replies box + And I set input field with "name" of "allocateUrgent" to "1234567890" + Then I see "12345" in "allocateUrgent" Allocate Replies box + And I set input field with "name" of "allocateUrgent" to "" + + And I set input field with "name" of "allocateSuperUrgent" to "abcdefghijklmnopqrstuvwxyz" + Then I see "" in "allocateSuperUrgent" Allocate Replies box + And I set input field with "name" of "allocateSuperUrgent" to "-1" + Then I see "1" in "allocateSuperUrgent" Allocate Replies box + And I set input field with "name" of "allocateSuperUrgent" to "1.1" + Then I see "11" in "allocateSuperUrgent" Allocate Replies box + And I set input field with "name" of "allocateSuperUrgent" to "1234567890" + Then I see "12345" in "allocateSuperUrgent" Allocate Replies box + And I set input field with "name" of "allocateSuperUrgent" to "" + + And the "Assign replies" button is disabled + + And I check the "Select all" checkbox + Then "ARAMIS1" is checked + And "Team Pick List User" is checked + And "AutomationStaffMemberTWO" is checked + + When I uncheck the "Select all" checkbox + Then "ARAMIS1" is unchecked + And "Team Pick List User" is unchecked + And "AutomationStaffMemberTWO" is unchecked + +Examples: + |pool_no | + |442170401 | + +@RegressionSingle +Scenario Outline: Work Allocation + + Given I am on "Bureau" "test" + And pool no "<pool_no>" is reset to pending allocation + And I have cleared down the juror digital database + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no_four> |<pool_no> | 400 | + | <part_no_five> |<pool_no> | 400 | + | <part_no_six> |<pool_no> | 400 | + + #set up some responses + + #non-urgent + + And "<part_no_four>" has "LNAME" as "<last_name>" + And "<part_no_four>" has "ZIP" as "<postcode>" + And "<part_no_four>" has "RET_DATE" as "5 mondays time" + And "<part_no_four>" has "NEXT_DATE" as "5 mondays time" + + #urgent + + And "<part_no_five>" has "LNAME" as "<last_name>" + And "<part_no_five>" has "ZIP" as "<postcode>" + And "<part_no_five>" has "RET_DATE" as "3 mondays time" + And "<part_no_five>" has "NEXT_DATE" as "3 mondays time" + + #super urgent + + And "<part_no_six>" has "LNAME" as "<last_name>" + And "<part_no_six>" has "ZIP" as "<postcode>" + And "<part_no_six>" has "RET_DATE" as "1 mondays time" + And "<part_no_six>" has "NEXT_DATE" as "1 mondays time" + And "<part_no_six>" has "READ_ONLY" as "Y" + + Given I am on "Bureau" "test" + And I log in + And I click on the "Assign Replies" link + + And the "Assign replies" button is disabled + + And I set input field with "name" of "allocateNonUrgent" to "12345" + And I set input field with "name" of "allocateUrgent" to "12345" + And I set input field with "name" of "allocateSuperUrgent" to "12345" + + And the "Assign replies" button is disabled + + And I set input field with "name" of "allocateNonUrgent" to "" + And I set input field with "name" of "allocateUrgent" to "" + And I set input field with "name" of "allocateSuperUrgent" to "" + + And I check the "ARAMIS1" checkbox + + And the "Assign replies" button is disabled + + #AC13 + + And I set input field with "name" of "allocateNonUrgent" to "12345" + And I set input field with "name" of "allocateUrgent" to "12345" + And I set input field with "name" of "allocateSuperUrgent" to "12345" + + And I uncheck the "ARAMIS1" checkbox + When I press the "Assign replies" button + And "ARAMIS1-standard" assigned replies count is "0" + And "ARAMIS1-urgent" assigned replies count is "0" + And "ARAMIS1-send" assigned replies count is "0" + And "ARAMIS1-total" assigned replies count is "0" + + #submit responses with auto-processing disabled + + Given I am on "Public" "test" + And auto straight through processing has been disabled + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + |<part_no_four> |<pool_no> | <last_name> |<postcode> |<email>| + |<part_no_five> |<pool_no> | <last_name> |<postcode> |<email>| + |<part_no_six> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + When I log in + And I click on the "Assign Replies" link + + #Allocate the non-urgent to CPASS + + And I set input field with "name" of "allocateNonUrgent" to "1" + And the "Assign replies" button is disabled + And I check the "ARAMIS1" checkbox + And I press the "Assign replies" button + And "ARAMIS1-standard" assigned replies count is "1" + And "ARAMIS1-urgent" assigned replies count is "0" + And "ARAMIS1-send" assigned replies count is "0" + And "ARAMIS1-total" assigned replies count is "1" + + Then I see "2" in the same row as "total" in Backlog box + Then I see "0" in the same row as "standard" in Backlog box + + Then I see "1" in the same row as "urgent" in Backlog box + + And I see "" in "allocateNonUrgent" Allocate Replies box + And I see "" in "allocateUrgent" Allocate Replies box + And I see "" in "allocateSuperUrgent" Allocate Replies box + And the "Assign replies" button is disabled + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is "ARAMIS1" where "JUROR_NUMBER" is "<part_no_four>" + + #Allocate the urgent to CPASS + + And I set input field with "name" of "allocateUrgent" to "1" + And the "Assign replies" button is disabled + When I check the "ARAMIS1" checkbox + And I press the "Assign replies" button + And "ARAMIS1-standard" assigned replies count is "1" + And "ARAMIS1-urgent" assigned replies count is "1" + And "ARAMIS1-send" assigned replies count is "0" + And "ARAMIS1-total" assigned replies count is "2" + + Then I see "1" in the same row as "total" in Backlog box + + Then I see "0" in the same row as "urgent" in Backlog box + Then I see "0" in the same row as "standard" in Backlog box + + And I see "" in "allocateNonUrgent" Allocate Replies box + And I see "" in "allocateUrgent" Allocate Replies box + And I see "" in "allocateSuperUrgent" Allocate Replies box + And the "Assign replies" button is disabled + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is "ARAMIS1" where "JUROR_NUMBER" is "<part_no_five>" + + #Allocate the super-urgent to CPASS + + And I set input field with "name" of "allocateSuperUrgent" to "1" + And the "Assign replies" button is disabled + When I check the "ARAMIS1" checkbox + And I press the "Assign replies" button + And "ARAMIS1-standard" assigned replies count is "1" + And "ARAMIS1-urgent" assigned replies count is "1" + And "ARAMIS1-send" assigned replies count is "1" + And "ARAMIS1-total" assigned replies count is "3" + Then I see "0" in the same row as "total" in Backlog box + + Then I see "0" in the same row as "urgent" in Backlog box + Then I see "0" in the same row as "standard" in Backlog box + And I see "" in "allocateNonUrgent" Allocate Replies box + And I see "" in "allocateUrgent" Allocate Replies box + And I see "" in "allocateSuperUrgent" Allocate Replies box + And the "Assign replies" button is disabled + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is "ARAMIS1" where "JUROR_NUMBER" is "<part_no_six>" + And auto straight through processing has been enabled + +Examples: + |part_no_four |part_no_five |part_no_six |pool_no |last_name |postcode |email | + |644200456 |644200458 |644200811 |442170401 |LNAME |NN1 3HQ |email@outlook.com | + +@RegressionSingle +Scenario Outline: Work Allocation - AUTO are not counted + +Given I am on "Bureau" "test" + And pool no "<pool_no>" is reset to pending allocation + And I have cleared down the juror digital database + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no_seven> |<pool_no> | 400 | + + #set up some a response + + #non-urgent + + And "<part_no_seven>" has "LNAME" as "<last_name>" + And "<part_no_seven>" has "ZIP" as "<postcode>" + And "<part_no_seven>" has "RET_DATE" as "5 mondays time" + And "<part_no_seven>" has "NEXT_DATE" as "5 mondays time" + + #submit response with auto-processing enabled + + Given I am on "Public" "test" + And auto straight through processing has been enabled + And I have submitted a first party English straight through response + | part_no |pool_number| last_name |postcode | email | + |<part_no_seven>|<pool_no> | <last_name> |<postcode> |<email>| + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "STAFF_LOGIN" is "AUTO" where "JUROR_NUMBER" is "<part_no_seven>" + + Given I am on "Bureau" "test" + When I log in + And I click on the "Assign Replies" link + + And I do not see "AUTO" on the page + + #check counts + + Then I see "0" in the same row as "total" in Backlog box + + Then I see "0" in the same row as "urgent" in Backlog box + Then I see "0" in the same row as "standard" in Backlog box + + And "total-all" assigned replies count is "0" + And "total-standard" assigned replies count is "0" + And "total-urgent" assigned replies count is "0" + And "total-send" assigned replies count is "0" + +Examples: + |part_no_seven |pool_no |last_name |postcode |email | + |644200477 |442170401 |LNAME |NN1 3HQ |email@outlook.com | + + +@RegressionSingle +Scenario: Manage Team + + Given I am on "Bureau" "test" + And I log in + And staff with name "New Name" does not exist + And I see "Manage replies to jury summons" on the page + And I see "Your work" on the page + And I see link with text "SYSTEM" + And I see link with text "Sign out" + And I see link with text "To do" + And I see link with text "Awaiting information" + And I see link with text "Completed" + And I see link with text "Your work" + And I see link with text "Search" + And I see link with text "Assign Replies" + And I see link with text "Manage team" + And I see "/inbox" in the URL + + And I click on the "Manage team" link + And I see "/staff" in the URL + And I see "Manage team" on the page + And I see "Staff name" on the page + And I see "Team leader" on the page + And I see "Status" on the page + And I see "-" in the same row as "ARAMIS1" + And I see "Team leader" in the same row as "SYSTEM" + Then I see "ACTIVE" in the same row as "ARAMIS1" + + # Inactive hidden by default + + And I do not see "INACTIVE" on the page + And I do not see "LEVEL1" on the page + And the radio button "Show active team members only" is "Selected" + Then I set the radio button to "Show all team members" + Then I see "INACTIVE" in the same row as "AutomationStaffTWO" + Then I set the radio button to "Show active team members only" + And I do not see "INACTIVE" on the page + And I do not see "AutomationStaffTWO" on the page + Then I set the radio button to "Show all team members" + Then I click on the "Your work" link + And I click on the "Manage team" link + And the radio button "Show all team members" is "Selected" + + #add team member + + Then I press the "Add a new team member" button + And I see "Add a new team member" on the page + And I see "/create" in the URL + + #error check when fields not completed + + Then I press the "Save" button + And I see "Please provide a name for the new staff member" on the page + And I see "Please enter the staff member Juror application user name" on the page + + #successfully add user + + And I set "Name" to "New Name" + And I set "Username" to "NEWUSER" + And the radio button "No" is "selected" + And I set the radio button to "Yes" + + Then I press the "Save" button + And I see "Manage team" on the page + Then I see "ACTIVE" in the same row as "New Name" + Then I see "Team leader" in the same row as "New Name" + + #set team member to team leader + + Then I click on the "New Name" link + And "Name" is "New Name" + And "Username" is "NEWUSER" + And I see "/NEWUSER" in the URL + And the radio button "No" is "selected" + Then I set the radio button to "Yes" + Then I press the "Save" button + And I see "Manage team" on the page + Then I see "ACTIVE" in the same row as "New Name" + Then I see "Team leader" in the same row as "New Name" + + #edit user's name + + Then I click on the "New Name" link + And "Name" is "New Name" + And "Username" is "NEWUSER" + And I see "/NEWUSER" in the URL + #fails due to JDB-5504 + And the radio button "Yes" is "selected" + And the radio button "Active" is "selected" + Then I set "Name" to "Updated New Name" + Then I press the "Save" button + And I see "Manage team" on the page + Then I see "ACTIVE" in the same row as "Updated New Name" + + #set team leader as inactive + + Then I click on the "Updated New Name" link + And "Name" is "Updated New Name" + And "Username" is "NEWUSER" + And I see "/NEWUSER" in the URL + And the radio button "Yes" is "selected" + And I set the radio button to "Inactive" + And the radio button "Inactive" is "selected" + Then I press the "Save" button + And I see "Manage team" on the page + Then I see "INACTIVE" in the same row as "Updated New Name" + + #attempt to re-activate user who is not known in heritage + + Then I click on the "Updated New Name" link + And "Name" is "Updated New Name" + And "Username" is "NEWUSER" + And I see "/NEWUSER" in the URL + And the radio button "Yes" is "selected" + And the radio button "Inactive" is "selected" + Then I set the radio button to "Active" + Then I press the "Save" button + And I see "There is a problem" on the page + And I see "The staff profile you are trying to activate has been made inactive in the Juror application. Please reactivate in Juror and then try again." on the page + Then I click on the "Cancel" link + And I see "Manage team" on the page + + #attempt to add duplicate + + Then I press the "Add a new team member" button + And I see "Add a new team member" on the page + And I set "Name" to "New Name" + And I set "Username" to "NEWUSER" + And the radio button "Yes" is "selected" + Then I press the "Save" button + And I see "There is a problem" on the page + And I see "This Juror username has already been allocated to Updated New Name" on the page + + #attempt to deactivate when user has assigned responses + +@RegressionSingle +Scenario Outline: Results grid updates when status changes are made + Given I am on "Bureau" "test" + + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + # Set part_no pool to not be urgent + + Given "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + + #turn off auto processing + + Given auto straight through processing has been disabled + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> |<last_name>|<postcode> |a@a.com| + + Given I am on "Bureau" "test" + When I log in + + Then I click on the "Search" link + And I set "Juror's pool number" to "<pool_no>" + And I press the "Search" button + + #record notes + + When I click on "<part_no>" in the same row as "<part_no>" + When I click on the "Logs" link + And I click on the "Notes" link + And I click on the "Add or Edit" link + And I set text area with "id" of "notes" to "Some notes here" + And I press the "Save" button + + When I click on the "Back" link + Then I see "SYSTEM" in the same row as "<last_name>" + + + #now reassign + + And I press the "Select all" button + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + + Then I see "ARAMIS1" in the same row as "<last_name>" + + #now mark as awaiting info + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "Record status" on the page + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information" link + Then I see "Mark this reply as awaiting information" on the page + When I set the radio button to "Awaiting court reply" + And I press the "Confirm" button + + When I click on the "Back" link + Then I see "AWAITING COURT REPLY" in the same row as "<part_no>" + + #now mark as responded + + When I click on "<part_no>" in the same row as "<part_no>" + Then I see "Record status" on the page + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I see "Responded" on the page + + When I click on the "Back" link + Then I see "COMPLETED" in the same row as "<part_no>" + + +Examples: + |part_no |pool_no |last_name |postcode |email | + |644200477 |442170401 |LNAMEUPDATE|NN1 3HQ |email@outlook.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_launchdarkly.feature b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_launchdarkly.feature new file mode 100644 index 00000000..8497c03f --- /dev/null +++ b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_Bureau_launchdarkly.feature @@ -0,0 +1,664 @@ +Feature: Bureau - launch darkly negative test + + @Regression + Scenario Outline: Test Lead cannot see MOD functionality E2E + + #your work page + Given I am on "Bureau" "test" + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #set up some responses + #non-urgent + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Given I am on "Public" "test" + And I have submitted a first party Welsh ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #your work + + #see juror digital functionality + And I see "Your work" on the page + And I see link with text "<user>" + And I see link with text "Sign out" + And I see link with text "To do" + And I see link with text "Awaiting information" + And I see link with text "Completed" + And I see link with text "Your work" + And I see link with text "Search" + And I see link with text "Assign Replies" + And I see link with text "Manage team" + + #do not see modernisation functionality + And I do not see "Summons replies" on the page + And I do not see link with text "Apps" + And I do not see "Applications" on the page + And I do not see link with text "Pool management" + And I do not see link with text "Juror management" + And I do not see link with text "Trial management" + And I do not see link with text "Administration" + And I do not see link with text "Summons management" + And I do not see link with text "Expense management" + And I do not see link with text "Reporting" + And I do not see "Search for a juror record" on the page + And I do not see "Search for a juror record by using their juror record number or using a barcode scan" on the page + When I check the search juror button is not visible + When I check the Apps button is not visible + + #try navigating to modernisation pages - pool-management + And I see "/inbox" in the URL + Given I navigate to "/pool-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - summons-management + And I see "/inbox" in the URL + Given I navigate to "/summons-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - trial-management + And I see "/inbox" in the URL + Given I navigate to "/trial-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - juror-management + And I see "/inbox" in the URL + Given I navigate to "/juror-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - expense-management + And I see "/inbox" in the URL + Given I navigate to "/expense-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - reporting + And I see "/inbox" in the URL + Given I navigate to "/reporting" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - administration + And I see "/inbox" in the URL + Given I navigate to "/administration" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #Search page + And I click on the "Search" link + + #I can see juror digital functionality + And I see "Search" on the page + And I see "Juror number" on the page + And I see "Juror's last name" on the page + And I see "Juror's pool number" on the page + And I see "Advanced search" on the page + + #I do not see modernisation functionality + And I do not see link with text "Apps" + And I do not see "Applications" on the page + And I do not see link with text "Pool management" + And I do not see link with text "Juror management" + And I do not see link with text "Trial management" + And I do not see link with text "Administration" + And I do not see link with text "Summons management" + And I do not see link with text "Expense management" + And I do not see link with text "Reporting" + And I do not see "Search for a juror record" on the page + And I do not see "Search for a juror record by using their juror record number or using a barcode scan" on the page + When I check the search juror button is not visible + When I check the Apps button is not visible + + #Assign Replies + And I click on the "Assign Replies" link + + #can see juror digital functionality + And I see "Assign Replies" on the page + And I see "Send to court" backlog count label on the page + And I see "Send to court" replies to assign count label on the page + And I see "Send to court" assigned to staff count label on the page + + #cant see modernisation functionality + And I do not see link with text "Apps" + And I do not see "Applications" on the page + And I do not see link with text "Pool management" + And I do not see link with text "Juror management" + And I do not see link with text "Trial management" + And I do not see link with text "Administration" + And I do not see link with text "Summons management" + And I do not see link with text "Expense management" + And I do not see link with text "Reporting" + When I check the search juror button is not visible + When I check the Apps button is not visible + + #summons response details + + #Search page + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + #view page + When I click on "<part_no>" in the same row as "<part_no>" + And I do not see "SUMMONS REPLY" on the page + And I do not see link with text "View juror" + And I do not see "Service start date" on the page + + #check reasonable adjustments + Then I click on the "Reasonable adjustments" link + And I do not see link with text "Check court can accommodate" + + #respond summons + When I select "Responded" from Process reply + And I do not see "Deferral request" on the page + And I do not see "Excusal - grant or refuse" on the page + And I do not see "Disqualify" on the page + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + Then I see "COMPLETED" on the page + And I check the processed success banner is not visible + + #Manage team + And I click on the "Manage team" link + + #can see JD functionality + And I see "Manage team" on the page + And I do not see link with text "Apps" + And I do not see "Applications" on the page + And I do not see link with text "Pool management" + And I do not see link with text "Juror management" + And I do not see link with text "Trial management" + And I do not see link with text "Administration" + And I do not see link with text "Summons management" + And I do not see link with text "Expense management" + And I do not see link with text "Reporting" + When I check the search juror button is not visible + When I check the Apps button is not visible + + Examples: + |user |part_no |pool_no |last_name |postcode |email | + |SYSTEM |645200143 |452170401 |LNAME |NN1 3HQ |email@outlook.com | + + @Regression + Scenario Outline: Test Lead cannot see MOD pool management link + Given I am on "Bureau" "test" + And I log in as "<user>" + And I do not see link with text "Pool management" + + And I click on the "Sign out" link + + And I log in as "<user>" + And I do not see link with text "Juror management" + + And I click on the "Sign out" link + + And I log in as "<user>" + And I do not see link with text "Trial management" + + And I click on the "Sign out" link + + And I log in as "<user>" + And I do not see link with text "Administration" + + And I click on the "Sign out" link + + And I log in as "<user>" + And I do not see link with text "Summons management" + + And I click on the "Sign out" link + + And I log in as "<user>" + And I do not see link with text "Expense management" + + And I click on the "Sign out" link + + And I log in as "<user>" + And I do not see link with text "Reporting" + + And I click on the "Sign out" link + + And I log in as "<user>" + When I check the search juror button is not visible + + And I click on the "Sign out" link + + And I log in as "<user>" + #try navigating to modernisation pages - pool-management + And I see "/inbox" in the URL + Given I navigate to "/pool-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #try navigating to modernisation pages - summons-management + And I see "/inbox" in the URL + Given I navigate to "/summons-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #try navigating to modernisation pages - trial-management + And I see "/inbox" in the URL + Given I navigate to "/trial-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #try navigating to modernisation pages - juror-management + And I see "/inbox" in the URL + Given I navigate to "/juror-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #try navigating to modernisation pages - expense-management + And I see "/inbox" in the URL + Given I navigate to "/expense-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #try navigating to modernisation pages - reporting + And I see "/inbox" in the URL + Given I navigate to "/reporting" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #try navigating to modernisation pages - administration + And I see "/inbox" in the URL + Given I navigate to "/administration" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #Assign Replies + And I click on the "Assign Replies" link + #can see juror digital functionality + And I see "Send to court" backlog count label on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #Assign Replies + And I click on the "Assign Replies" link + #can see juror digital functionality + And I see "Send to court" replies to assign count label on the page + + And I click on the "Sign out" link + + And I log in as "<user>" + #Assign Replies + And I click on the "Assign Replies" link + #can see juror digital functionality + And I see "Send to court" assigned to staff count label on the page + + Examples: + |user | + |SYSTEM | + + @Regression + Scenario Outline: I do not see "SUMMONS REPLY" on the page + Given I am on "Public" "test" + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #set up some responses + #non-urgent + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Given I am on "Public" "test" + And I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #summons response details + + #Search page + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + #view page + When I click on "<part_no>" in the same row as "<part_no>" + And I do not see "SUMMONS REPLY" on the page + + Examples: + |user |part_no |pool_no |last_name |postcode |email | + |SYSTEM |645200163 |452170401 |LNAME |NN1 3HQ |email@outlook.com | + + @Regression + Scenario Outline: And I do not see link with text "View juror" + Given I am on "Public" "test" + + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #set up some responses + #non-urgent + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Given I am on "Public" "test" + And I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #summons response details + + #Search page + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + #view page + When I click on "<part_no>" in the same row as "<part_no>" + And I do not see link with text "View juror" + + Examples: + |user |part_no |pool_no |last_name |postcode |email | + |SYSTEM |645200184 |452170401 |LNAME |NN1 3HQ |email@outlook.com | + + @Regression + Scenario Outline: And I do not see "Service start date" on the page + Given I am on "Public" "test" + + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #set up some responses + #non-urgent + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Given I am on "Public" "test" + And I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #summons response details + + #Search page + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + #view page + When I click on "<part_no>" in the same row as "<part_no>" + And I do not see "Service start date" on the page + + Examples: + |user |part_no |pool_no |last_name |postcode |email | + |SYSTEM |645200410 |452170401 |LNAME |NN1 3HQ |email@outlook.com | + + @Regression + Scenario Outline: And I do not see link with text "Check court can accommodate" + Given I am on "Public" "test" + + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #set up some responses + #non-urgent + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Given I am on "Public" "test" + And I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #summons response details + + #Search page + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + #view page + When I click on "<part_no>" in the same row as "<part_no>" + + #check reasonable adjustments + Then I click on the "Reasonable adjustments" link + And I do not see link with text "Check court can accommodate" + + Examples: + |user |part_no |pool_no |last_name |postcode |email | + |SYSTEM |645200415 |452170401 |LNAME |NN1 3HQ |email@outlook.com | + + @Regression + Scenario Outline: And I check the processed success banner is not visible + Given I am on "Public" "test" + And pool no "<pool_no>" is reset to pending allocation + And I have cleared down the juror digital database + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #set up some responses + #non-urgent + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Given I am on "Public" "test" + And I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #summons response details + + #Search page + And I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + #view page + When I click on "<part_no>" in the same row as "<part_no>" + + #respond summons + When I respond the juror response in Juror Digital + And I check the processed success banner is not visible + + Examples: + |user |part_no |pool_no |last_name |postcode |email | + |SYSTEM |645200019 |452170401 |LNAME |NN1 3HQ |email@outlook.com | + + @Regression + Scenario Outline: Member of Test Team cannot see MOD functionality E2E + + Given I am on "Bureau" "test" + + And the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + #set up some responses + #non-urgent + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Given I am on "Public" "test" + And I have submitted a first party English ineligibilty response + |part_no |pool_number|last_name |postcode |email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email>| + + Given I am on "Bureau" "test" + And I log in as "<user>" + + #your work + + #see juror digital functionality + And I see "Your work" on the page + And I see link with text "<user>" + And I see link with text "Sign out" + And I see link with text "To do" + And I see link with text "Awaiting information" + And I see link with text "Completed" + And I see link with text "Your work" + And I see link with text "Search" + + #do not see modernisation functionality + And I do not see "Summons replies" on the page + And I do not see link with text "Apps" + And I do not see "Applications" on the page + And I do not see link with text "Pool management" + And I do not see link with text "Juror management" + And I do not see link with text "Trial management" + And I do not see link with text "Administration" + And I do not see link with text "Summons management" + And I do not see link with text "Expense management" + And I do not see link with text "Reporting" + When I check the search juror button is not visible + When I check the Apps button is not visible + + #try navigating to modernisation pages + And I see "/inbox" in the URL + Given I navigate to "/pool-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - summons-management + And I see "/inbox" in the URL + Given I navigate to "/summons-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - trial-management + And I see "/inbox" in the URL + Given I navigate to "/trial-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - juror-management + And I see "/inbox" in the URL + Given I navigate to "/juror-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - expense-management + And I see "/inbox" in the URL + Given I navigate to "/expense-management" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - reporting + And I see "/inbox" in the URL + Given I navigate to "/reporting" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #try navigating to modernisation pages - administration + And I see "/inbox" in the URL + Given I navigate to "/administration" URL + And I see "Page not found" on the page + And I see "If you entered a web address please check it was correct." on the page + Given I navigate to "/inbox" URL + + #Search page + And I click on the "Search" link + + #I can see juror digital functionality + And I see "Search" on the page + And I see "Juror number" on the page + And I see "Juror's last name" on the page + And I see "Juror's pool number" on the page + And I do not see "Advanced search" on the page + + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + #summons response details + + #view page + When I click on "<part_no>" in the same row as "<part_no>" + And I do not see "SUMMONS REPLY" on the page + And I do not see link with text "View juror" + And I do not see "Service start date" on the page + + #I do not see modernisation functionality + And I do not see link with text "Apps" + And I do not see "Applications" on the page + And I do not see link with text "Pool management" + And I do not see link with text "Juror management" + And I do not see link with text "Trial management" + And I do not see link with text "Administration" + And I do not see link with text "Summons management" + And I do not see link with text "Expense management" + And I do not see link with text "Reporting" + When I check the search juror button is not visible + When I check the Apps button is not visible + + Examples: + |user |part_no |pool_no |last_name |postcode |email | + |ARAMIS1|645200030 |452170401 |LNAME |NN1 3HQ |email@outlook.com | diff --git a/src/test/resources/cucumber/features/regressionSingle/REGRESSION_CookiesPrivacyPolicy.feature b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_CookiesPrivacyPolicy.feature new file mode 100644 index 00000000..cf4977ed --- /dev/null +++ b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_CookiesPrivacyPolicy.feature @@ -0,0 +1,338 @@ +Feature: Regression JDB-4528 Cookies and Privacy Policy + +@Cookies @JDB-4860 +Scenario: Analytics Cookies opt in + + Given I am looking at cookies on "Public" "bau-test" + + #new cookies banner + + And I see "Cookies on Reply to a jury summons" on the page + And I see "We use some essential cookies to make this service work." on the page + And I see "We’d also like to use analytics cookies so we can understand how you use the service and make improvements." on the page + And I see "Accept analytics cookies" on the page + + #accept cookies + + And I press the "Accept analytics cookies" button + And I see "Hide cookie message" on the page + And I see "You’ve accepted analytics cookies. You can change your cookie settings at any time." on the page + And I do not see "Cookies on Reply to a jury summons" on the page + And I do not see "We use some essential cookies to make this service work." on the page + And I do not see "We’d also like to use analytics cookies so we can understand how you use the service and make improvements." on the page + + And I press the "Hide cookie message" button + + Then I do not see "Hide cookie message" on the page + And I do not see "You’ve accepted analytics cookies. You can change your cookie settings at any time." on the page + +@RegressionSingle @JDB-4860 +Scenario: Analytics Cookies opt out + + Given I am looking at cookies on "Public" "bau-test" + + #new cookies banner + + And I see "Cookies on Reply to a jury summons" on the page + And I see "We use some essential cookies to make this service work." on the page + And I see "We’d also like to use analytics cookies so we can understand how you use the service and make improvements." on the page + And I see "Accept analytics cookies" on the page + + #reject cookies + + And I press the "Reject analytics cookies" button + And I see "Hide cookie message" on the page + And I see "You’ve rejected analytics cookies. You can change your cookie settings at any time." on the page + And I do not see "Cookies on Reply to a jury summons" on the page + And I do not see "We use some essential cookies to make this service work." on the page + And I do not see "We’d also like to use analytics cookies so we can understand how you use the service and make improvements." on the page + + And I press the "Hide cookie message" button + + And I do not see "Hide cookie message" on the page + And I do not see "You’ve rejected analytics cookies. You can change your cookie settings at any time." on the page + + +@RegressionSingle @JDB-4528 +Scenario: English View Cookies + + Given I am looking at cookies on "Public" "bau-test" + + #new cookies banner + + And I see "Cookies on Reply to a jury summons" on the page + And I see link with text "View cookies" + Then I click on the "View cookies" link + Then I click on the "How we use cookies" link + + And I see "Cookies" on the page + And I see "Small files (known as 'cookies') are put onto your computer to collect information about how you browse the site." on the page + And I see "Cookies are used to:" on the page + And I see "measure how you use the website so it can be updated and improved based on your needs" on the page + And I see "remember the notifications you've seen so that you're not shown them again" on the page + And I see "GOV.UK cookies are not used to identify you personally." on the page + And I see "You'll normally see a message on the site before a cookie is stored on your computer." on the page + And I see "Find out more about how to manage cookies" on the page + And I click on the "how to manage cookies" link + And I see "aboutcookies.org" in the URL + Then I press the "back" button on my browser + And I see "How cookies are used" on the page + And I see "Measuring website usage (Google Analytics)" on the page + And I see "We use Google Analytics to capture data about how our website is being used by the people who visit it. This includes information about how long you spend on each of the pages on our website and the activity you undertake while you are on there." on the page + And I see "Google Analytics can capture demographic information about your age, gender, location and language preferences." on the page + And I see "The reports give us information on the device you are using to access the website, what browser you are using and the version of operating system you are running. This helps us to make sure the website works for everyone." on the page + And I see "We specifically track how many times our PDF content is downloaded, how many times users exit the site through external links and how many people access the ‘Find out more’ information that are listed against some questions on our website." on the page + And I see "All data we capture is anonymous and there is no personally identifiable data available to us." on the page + And I see "We use this information to improve the service and performance as well as wider analysis" on the page + And I see "The following cookies are used:" on the page + And I see "This helps us identify how you use GOV.UK so we can make the site better" in the same row as "_gat" + And I see "1 minute" in the same row as "_gat" +# And I see "This helps us identify unique users of GOV.UK so we can make the site better" in the same row as "_ga" + And I see "2 years" in the same row as "_ga" +# And I see "This helps us identify unique users of GOV.UK so we can make the site better" in the same row as "_gid" + And I see "24 hours" in the same row as "_gid" + And I see "You can opt out of Google Analytics cookies" on the page + And I click on the "out of Google Analytics cookies" link + And I see "/cookie-settings" in the URL + Then I press the "back" button on my browser + And I see "Sessions" on the page + And I see "A cookie is set to record your session activity." on the page + And I see "Keeps track of whether you're logged in or not" in the same row as "sessionID" + And I see "When you close your browser" in the same row as "sessionID" + And I see "Used to direct you to the same server for each request" in the same row as "ApplicationGatewayAffinity" + And I see "When you close your browser" in the same row as "ApplicationGatewayAffinity" + And I see "Our feedback survey" on the page + And I see "We use SmartSurvey to enable users of the service to provide feedback on their experience of using the service." on the page + And I see "Details about SmartSurveys security and privacy policy can be found at:" on the page + And I see link with text "https://www.smartsurvey.co.uk/security" + And I click on the "https://www.smartsurvey.co.uk/security" link + And I see "smartsurvey.co.uk/security" in the URL + Then I press the "back" button on my browser + And I see "We will use the results from completed survey responses to give us information from your experience of using the service, this will enable us to consider how we further improve the service." on the page + And I see "All data we capture is anonymous and there is no personally identifiable data available to us." on the page + And I see "If you take part, SmartSurvey will save extra cookies to your computer to track your progress through it. SmartSurvey is used to collect responses to the survey. If you take part, SmartSurvey will save extra cookies to your computer to track your progress through it. Information on how SmartSurvey uses Cookies can be found at:" on the page + And I see link with text "https://www.smartsurvey.co.uk/how-we-use-cookies" + And I click on the "https://www.smartsurvey.co.uk/how-we-use-cookies" link + And I see "/how-we-use-cookies" in the URL + Then I press the "back" button on my browser + And I see "Change your settings" on the page + And I see "You can change which cookies you're happy for us to use" on the page + And I click on the "change which cookies you're happy for us to use" link + And I see "/cookie-settings" in the URL + +@Cookies @JDB-4528 +Scenario: English Cookie Settings + + Given I am looking at cookies on "Public" "bau-test" + + #new cookies banner + + And I see "Cookies on Reply to a jury summons" on the page + And I press the "Accept analytics cookies" button + And I see "You’ve accepted analytics cookies. You can change your cookie settings at any time." on the page + Then I click on the "change your cookie settings" link + + And I see "/cookie-settings" in the URL + + And I see "Cookies are files saved on your phone, tablet or computer when you visit a website." on the page + And I see "We use cookies to store information about how you use the GOV.UK website, such as the pages you visit." on the page + And I see "Cookie settings" on the page + And I see "We use 2 types of cookie. You can choose which cookies you're happy for us to use." on the page + And I see "Cookies that measure website use" on the page + And I see "We use Google Analytics to measure how you use the website so we can improve it based on user needs. We do not allow Google to use or share the data about how you use this site." on the page + And I see "Google Analytics sets cookies that store anonymised information about:" on the page + And I see "how you got to the site" on the page + And I see "the pages you visit on GOV.UK and government digital services, and how long you spend on each page" on the page + And I see "what you click on while you're visiting the site" on the page + And the radio button "Do not use cookies that measure my website use" is "unselected" + And the radio button "Use cookies that measure my website use" is "selected" + And I set the radio button to "Do not use cookies that measure my website use" + And the radio button "Do not use cookies that measure my website use" is "selected" + And the radio button "Use cookies that measure my website use" is "unselected" + And I see "Strictly necessary cookies" on the page + And I see "These essential cookies do things like remember your progress through a form (for example a licence application)" on the page + And I see "They always need to be on." on the page + And I see link with text "How we use cookies" + And I click on the "How we use cookies" link + And I see "/help/cookies" in the URL + Then I press the "back" button on my browser + And I press the "Save changes" button + +@Cookies @JDB-4528 +Scenario: English Privacy Policy + + Given I am looking at cookies on "Public" "bau-test" + + And I see link with text "Privacy policy" + Then I click on the "Privacy policy" link + And I switch to the new window + And I see "Terms and conditions and privacy policy" on the page + + And I see "Using the Reply to Jury Summons service means you agree to our privacy policy and to these terms and conditions. Please read them carefully." on the page + And I see "Terms and conditions" on the page + And I see "General" on the page + And I see "These terms and conditions affect your rights and liabilities under the law. They govern your use of, and relationship with, the Reply to Jury Summons service. They do not apply to other services provided by the Ministry of Justice (MOJ), or to any other department or service linked to in this service." on the page + And I see "If you do not agree to these terms and conditions and the privacy policy, do not use this service. Instead, please complete the forms sent to you by post (the Juror summons letter pack) and return them to the Juror Central Summonsing Bureau 7 days from the date from which you received your juror summons letter." on the page + And I see "Applicable law" on the page + And I see "Your use of this service and any dispute arising from its use will be governed by and construed in accordance with the laws of England and Wales, including but not limited to the:" on the page + And I see "Juries Act 1974" on the page + And I see "Juries Act 1976" on the page + And I see "Juries Act 2003" on the page + And I see "Criminal Justice Act 2003" on the page + And I see "Mental Health Act 1983" on the page + And I see "Mental Capacity Act 2005" on the page + And I see "Coroners and Justice Act 2009" on the page + And I see "Armed Forces Act 2006" on the page + And I see "Computer Misuse Act 1990" on the page + And I see "Data Protection Act 1998" on the page + And I see "Human Rights Act 1998" on the page + And I see "Freedom of Information Act 2000" on the page + And I see "Using this service responsibly" on the page + And I see "The service is intended for use by jurors, or by others on their behalf and only with their consent." on the page + And I see "There are risks in using a shared computer, such as in an internet café, to use this service. It’s your responsibility to be aware of these risks and to avoid using any computer which may leave your personal information accessible by others. You are responsible if you choose to leave a computer unprotected while in the process of responding to a juror summons letter." on the page + And I see "We make every effort to check and test this service whenever we amend or update it. However, you must take your own precautions to ensure that the way you access this service does not expose you to the risk of viruses, malicious computer code or other forms of interference which may damage your own computer system." on the page + And I see "You must not misuse our service by knowingly introducing viruses, trojans, worms, logic bombs or other malicious or technologically harmful material. You must not attempt to gain unauthorised access to our service, the system on which our service is stored or any server, computer or database connected to our service. You must not attack our site via a denial-of-service attack or a distributed denial-of-service attack." on the page + And I see "Privacy policy" on the page + And I see "Information provided by this service" on the page + And I see "We work hard to ensure that information within this Reply to Jury Summons service is accurate. However, we cannot guarantee the accuracy and completeness of any information at all times" on the page + And I see "While we make every effort to ensure this service is accessible at all times, we are not liable if it is unavailable for any period of time." on the page + And I see "How we use your information" on the page + And I see "The Juror Central Summoning Bureau and Crown courts use and retain personal data entered into the Reply to Jury Summons service for selection of jurors who will be asked to consider evidence presented to them at Crown Court and on occasion at Coroners Court or Tribunals." on the page + And I see "Your information is securely stored within the HM Courts and Tribunals Service (HMCTS) Juror database. It will be removed and securely deleted when your Jury service has been completed and there is no reason to retain it further." on the page + And I see "After submitting your response, you will not be able to see it anymore or amend it online." on the page + And I see "If you want to make changes to your summons reply, or any other details, after making your reply online, contact the Jury Central Summoning Bureau by email or by post before the date of service quoting your Juror number." on the page + And I see "Anyone who believes their personal data is kept within the service has the right to submit a subject access request under the Data Protection Act 1998 to the MoJ" on the page + And I see "For further information regarding this process please click on link below" on the page + And I see link with text "https://www.gov.uk/government/publications/request-your-personal-data-from-moj" + And I click on the "https://www.gov.uk/government/publications/request-your-personal-data-from-moj" link + And I see "personal-information-charter" in the URL + Then I press the "back" button on my browser + And I see "We will not share your information with any other organisation unless it is required for the purposes of:" on the page + And I see "prevention or detection of crime" on the page + And I see "apprehension or prosecution of offenders" on the page + And I see "preventing terrorism or national security" on the page + And I see "We will also share your information where specific provision of law requires us to do so." on the page + And I see "Separately from the information entered by those using this service, we also collect site-usage information from this service, which allows us to see how the service is being used in order to allow us to improve it. This information does not contain any personal data." on the page + And I see "We’ll only ever collect information that will help us make the site work better for you; information that will let us contact you if you’ve asked us to, let us give you accurate information if you need it, and give us a sense of how people are using this service, so we can keep improving it." on the page + And I see "It includes:" on the page + And I see "questions, queries or feedback you leave, including your email address if you send a message via feedback" on the page + And I see "your truncated IP address (with the trailing octet removed), and details of which version of web browser you used" on the page + And I see "information on how you use the site, using cookies and page tagging techniques to help us improve the website" on the page + And I see "This helps us to:" on the page + And I see "improve the site by monitoring how you use it" on the page + And I see "respond to any feedback you send us, if you’ve asked us to" on the page + And I see "provide you with information about local services if you want it" on the page + And I see "We cannot identify you personally using your site usage data." on the page + And I see "Where is your data stored" on the page + And I see "We store your data on our secure servers in the UK and the European Economic Area (EEA). By submitting your personal data, you agree to this." on the page + And I see "Keeping your data secure" on the page + And I see "Transmitting information over the internet is generally not completely secure, and we cannot guarantee the security of your data. We do, however, use SSL (secure sockets layer) to encrypt all data transferred to, and received from, our server. We take data security very seriously and take every step to ensure that your data remains private and secure." on the page + And I see "Transmit data at your own risk" on the page + And I see "We have procedures and security features in place to try and keep your data secure once we receive it." on the page + And I see "We will not share your information with any other organisation unless it is required for the purposes of:" on the page + And I see "Disclosing your information" on the page + And I see "We may pass on your personal information if we have a legal obligation to do so." on the page + And I see "How we manage sessions" on the page + And I see "This service is for replying to a Jury Summons letter. During this time, personal information about you may be visible to anyone with access to the computer (or other device) you are using." on the page + And I see "Your data is retrieved from the HMCTS Juror database for the “Your Details” page, and stored on your device until your session expires." on the page + And I see "Data Protection Act 1998" on the page + And I see "This service complies with all principles of the DPA 1998. Ministry of Justice (MOJ) is the 'data controller' for the purposes of the Act. The information you enter into this service is used for the purposes of managing the jury summons process and is stored in a secure database for auditing purposes until your jury service has been completed. No personal data will be used in testing this service." on the page + And I see "Our hosting provider, and MOJ staff responsible for supporting the service, will have access to the server in which all personal information entered into the site is stored." on the page + And I see "Disclaimer" on the page + And I see "We do not accept liability for loss or damage incurred by users of this service, whether direct, indirect or consequential, whether caused by tort, breach of contract or otherwise. This includes loss of income or revenue, business, profits or contracts, anticipated savings, data, goodwill, tangible property or wasted time in connection with this service or any websites linked to it and any materials posted on it. This condition shall not prevent claims for loss of or damage to your tangible property or any other claims for direct financial loss that are not excluded by any of the categories set out above." on the page + And I see "This does not affect our liability for death or personal injury arising from our negligence, nor our liability for fraudulent misrepresentation or misrepresentation as to a fundamental matter, nor any other liability which cannot be excluded or limited under applicable law." on the page + + @RegressionSingle + Scenario: Welsh Analytics Cookies opt in + + Given I am looking at cookies on Welsh "Public" "bau-test" + And I see "Cwcis ar ffurflen Ymateb i wŷs rheithgor" on the page + And I see "Rydym yn defnyddio rhai cwcis hanfodol i wneud i'r gwasanaeth hwn weithio." on the page + And I see "Hoffem hefyd ddefnyddio cwcis dadansoddol fel y gallwn ddeall sut rydych yn defnyddio'r gwasanaeth a gwneud gwelliannau." on the page + And I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + And I press the "Derbyn cwcis dadansoddol" button + And I see "Cuddio'r neges ynghylch cwcis" on the page + + @RegressionSingle + Scenario: Welsh Privacy Policy + + Given I am looking at cookies on Welsh "Public" "bau-test" + + And I see link with text "Polisi preifatrwydd" + Then I click on the "Polisi preifatrwydd" link + And I switch to the new window + And I see "Telerau ac amodau a pholisi preifatrwydd" on the page + + And I see "Drwy ddefnyddio’r gwasanaeth ar-lein Ymateb i’r Wŷs Rheithgor, rydych yn cytuno i’n polisi preifatrwydd a’r telerau ac amodau hyn. Darllenwch nhw’n ofalus, os gwelwch yn dda." on the page + And I see "Telerau ac Amodau" on the page + And I see "Cyffredinol" on the page + And I see "Mae’r telerau ac amodau hyn yn effeithio ar eich hawliau a’ch rhwymedigaethau dan y gyfraith. Maent yn rheoli’r defnydd a wnewch o’r gwasanaeth ar-lein Ymateb i’r Wŷs Rheithgor a’ch perthynas â’r gwasanaeth hwnnw. Nid ydynt yn berthnasol i wasanaethau eraill a ddarperir gan y Weinyddiaeth Cyfiawnder, nac i unrhyw adran neu wasanaeth arall sy’n gysylltiedig â’r gwasanaeth hwn." on the page + And I see "Os nad ydych yn cytuno â’r telerau ac amodau hyn a’r polisi preifatrwydd, peidiwch â defnyddio’r gwasanaeth hwn. Yn hytrach, llenwch y ffurflenni a anfonwyd atoch yn y post (y pecyn gwŷs rheithgor) a’u dychwelyd i'r Swyddfa Ganolog Gwysio Rheithgor cyn pen 7 diwrnod i’r dyddiad y cawsoch eich llythyr gwŷs rheithgor." on the page + And I see "Y Gyfraith sy’n Berthnasol" on the page + And I see "Bydd y defnydd a wnewch o’r gwasanaeth hwn ac unrhyw anghydfod sy’n codi o’i ddefnyddio yn cael eu rheoli a’u dehongli yn unol â chyfreithiau Cymru a Lloegr, yn cynnwys ond ddim yn gyfyngedig i:" on the page + And I see "Deddf Rheithgorau 1974" on the page + And I see "Deddf Rheithgorau 1976" on the page + And I see "Deddf Rheithgorau 2003" on the page + And I see "Deddf Cyfiawnder Troseddol 2003" on the page + And I see "Deddf Iechyd Meddwl 1983" on the page + And I see "Deddf Galluedd Meddyliol 2005" on the page + And I see "Deddf Crwneriaid a Chyfiawnder 2009" on the page + And I see "Deddf Lluoedd Arfog 2006" on the page + And I see "Deddf Camddefnyddio Cyfrifiaduron 1990" on the page + And I see "Deddf Diogelu Data 1998" on the page + And I see "Deddf Hawliau Dynol 1998" on the page + And I see "Deddf Rhyddid Gwybodaeth 2000" on the page + And I see "Defnyddio’r gwasanaeth hwn yn gyfrifol" on the page + And I see "Mae'r gwasanaeth i'w ddefnyddio gan reithwyr, neu gan eraill ar eu rhan, a dim ond gyda’u caniatâd." on the page + And I see "Mae peryglon wrth ddefnyddio cyfrifiadur sy'n cael ei rannu, megis mewn caffi rhyngrwyd, i ddefnyddio'r gwasanaeth hwn. Eich cyfrifoldeb chi yw bod yn ymwybodol o’r peryglon hyn ac osgoi defnyddio unrhyw gyfrifiadur lle mae posibilrwydd y gall eraill weld eich gwybodaeth bersonol. Chi sy’n gyfrifol os ydych yn dewis gadael cyfrifiadur heb ei ddiogelu tra’r ydych yn y broses o ymateb i wŷs rheithgor." on the page + And I see "Byddwn yn gwneud pob ymdrech i wirio a phrofi’r gwasanaeth hwn pryd bynnag y byddwn yn ei ddiwygio neu ei ddiweddaru. Fodd bynnag, mae’n rhaid i chi gymryd gofal eich hunan i sicrhau nad yw’r ffordd yr ydych yn cael mynediad at y gwasanaeth hwn yn eich gadael yn agored i’r perygl o feirysau, cod cyfrifiadur maleisus neu ymyrraeth o fath arall a allai achosi difrod i’ch system gyfrifiadurol eich hunan." on the page + And I see "Ni ddylech gamddefnyddio ein gwasanaeth drwy gyflwyno’n fwriadol feirysau, ymwelwyr diwahoddiad (trojans), mwydod (worms), bomiau rhesymeg (logic bombs) neu unrhyw ddeunydd arall maleisus neu niweidiol i dechnoleg. Ni ddylech geisio cael mynediad heb awdurdod at ein gwasanaeth, y system lle caiff ein gwasanaeth ei storio nac unrhyw weinydd, cyfrifiadur neu gronfa ddata sy’n gysylltiedig â’n gwasanaeth. Ni ddylech ymosod ar ein gwefan drwy ymosodiad gwrthod gwasanaeth neu ymosodiad gwrthod gwasanaeth a ddosbarthwyd." on the page + And I see "Privacy policy" on the page + And I see "Gwybodaeth a ddarperir gan y gwasanaeth hwn" on the page + And I see "Rydym yn gweithio’n galed i sicrhau bod gwybodaeth o fewn y gwasanaeth ar-lein Ymateb i Wŷs Rheithgor hwn yn gywir. Fodd bynnag, ni allwn warantu bod unrhyw wybodaeth yn gywir ac yn gyflawn bob amser." on the page + And I see "Er y gwnawn bob ymdrech i sicrhau mynediad at y gwasanaeth hwn bob amser, nid ydym yn atebol os nad yw ar gael am unrhyw gyfnod." on the page + And I see "Sut rydym yn defnyddio eich gwybodaeth" on the page + And I see "Mae’r Swyddfa Ganolog Gwysio Rheithgor a’r llys y Goron yn defnyddio a chadw data personol a gofnodir yn y gwasanaeth Ymateb i Wŷs Rheithgor i ddethol rheithwyr a fydd yn cael eu gofyn i ystyried tystiolaeth a gyflwynir iddynt mewn Llys y Goron ac, o dro i dro, mewn Llys y Crwner neu Dribiwnlys." on the page + And I see "Caiff eich gwybodaeth ei storio’n ddiogel yng nghronfa ddata rheithwyr Gwasanaeth Llysoedd a Thribiwnlysoedd EM (GLlTEM). Bydd yn cael ei ddileu’n ddiogel pan fyddwch wedi cwblhau eich gwasanaeth rheithgor ac nid oes rheswm i'w chadw." on the page + And I see "Ar ôl cyflwyno eich ymateb, ni fyddwch yn gallu ei weld mwyach na’i ddiwygio ar-lein." on the page + And I see "Os ydych eisiau gwneud newidiadau i’ch ymateb i’r wŷs rheithgor, neu unrhyw fanylion eraill, ar ôl cofnodi eich ymateb ar-lein, cysylltwch â’r Swyddfa Ganolog Gwysio Rheithgor drwy e-bost neu drwy'r post cyn dyddiad eich gwasanaeth rheithgor gan ddyfynnu eich Rhif rheithiwr." on the page + And I see "Mae gan unrhyw un sy’n credu bod ei ddata personol yn cael ei gadw o fewn y gwasanaeth hwn yr hawl i gyflwyno SAR (subect access request) i’r Weinyddiaeth Cyfiawnder dan Ddeddf Diogelu Data 1998." on the page + And I see "Cliciwch ar y ddolen isod i gael rhagor o wybodaeth am y broses hon:" on the page + And I see link with text "https://www.gov.uk/government/publications/request-your-personal-data-from-moj" + And I click on the "https://www.gov.uk/government/publications/request-your-personal-data-from-moj" link + And I see "personal-information-charter" in the URL + Then I press the "back" button on my browser + And I see "Ni fyddwn yn rhannu eich gwybodaeth gydag unrhyw asiantaeth arall oni bai fod hynny’n ofynnol at y dibenion canlynol:" on the page + And I see "atal neu ganfod trosedd" on the page + And I see "arestio neu erlyn troseddwyr" on the page + And I see "atal terfysgaeth neu warchod diogelwch gwladol" on the page + And I see "Byddwn yn rhannu eich gwybodaeth ble fo gofyniad yn y gyfraith i ni wneud hynny." on the page + And I see "Ar wahân i’r wybodaeth bersonol y mae’r rhai sy’n defnyddio’r gwasanaeth yn ei chofnodi, rydym hefyd yn casglu gwybodaeth am ddefnydd o’r wefan sy’n ein galluogi i weld sut mae’r gwasanaeth yn cael ei ddefnyddio fel y gallwn ei wella. Nid yw’r wybodaeth hon yn cynnwys unrhyw ddata personol." on the page + And I see "Byddwn ond yn casglu gwybodaeth a fydd yn ein cynorthwyo i wella'r gwefan ar eich cyfer; gwybodaeth a fydd yn ein galluogi i gysylltu â chi os ydych wedi gofyn inni wneud hynny, ein galluogi i roi gwybodaeth gywir ichi os byddwch ei hangen, a rhoi syniad inni am sut mae pobl yn defnyddio’r gwasanaeth hwn, er mwyn i ni barhau i’w wella." on the page + And I see "Mae’n cynnwys:" on the page + And I see "Cwestiynau, ymholiadau neu adborth rydych yn ei roi, gan gynnwys eich cyfeiriad e-bost, os ydych yn anfon neges trwy'r swyddogaeth adborth" on the page + And I see "eich cyfeiriad IP, a manylion ynghylch pa fath o borwr y gwnaethoch ei ddefnyddio" on the page + And I see "gwybodaeth ynghylch sut rydych yn defnyddio’r wefan, gan ddefnyddio cwcis a thechnegau tagio tudalen er mwyn ein helpu i wella’r wefan" on the page + And I see "Mae hyn yn ein helpu i:" on the page + And I see "wella’r wefan trwy fonitro sut rydych yn ei defnyddio" on the page + And I see "ymateb i unrhyw adborth rydych yn ei roi inni, os ydych wedi gofyn am ymateb" on the page + And I see "darparu gwybodaeth ichi am wasanaethau lleol os ydych eisiau’r wybodaeth" on the page + And I see "Nid oes modd i ni eich adnabod trwy ddefnyddio eich data defnyddiwr safle." on the page + And I see "Ble mae eich data’n cael ei storio" on the page + And I see "Rydym yn storio eich data ar ein gweinyddion diogel yn y DU a’r Ardal Economaidd Ewropeaidd (EEA). Drwy gyflwyno eich data personol, rydych yn cytuno i hyn." on the page + And I see "Cadw eich data’n ddiogel" on the page + And I see "Yn gyffredinol, nid yw trosglwyddo gwybodaeth dros y rhyngrwyd yn hollol ddiogel, ac ni allwn warantu y bydd eich data’n ddiogel. Fodd bynnag, rydym yn defnyddio SSL (haen socedi diogel) i amgryptio'r holl ddata sy'n cael ei drosglwyddo i'n gweinydd ac allan ohono. Rydym yn cymryd diogelu data o ddifrif ac yn cymryd pob cam posib i sicrhau bod eich data yn aros yn breifat a diogel." on the page + And I see "Trosglwyddo data - ar eich risg chi" on the page + And I see "Mae gennym weithdrefnau a nodweddion diogelwch mewn lle i geisio cadw’ch data’n ddiogel wedi iddo’n cyrraedd." on the page + And I see "Ni fyddwn yn rhannu eich gwybodaeth ag unrhyw sefydliad arall at ddibenion marchnata, ymchwil i’r farchnad na masnachol, ac nid ydym yn anfon eich manylion ymlaen i wefannau eraill." on the page + And I see "Datgelu eich gwybodaeth" on the page + And I see "Efallai y byddwn yn anfon eich gwybodaeth bersonol ymlaen os yw’n ddyletswydd gyfreithiol arnom i wneud hynny." on the page + And I see "Sut rydym yn rheoli sesiynau" on the page + And I see "Mae’r gwasanaeth hwn ar gyfer ymateb i lythyr Gwŷs Rheithgor Pan fyddwch yn gwneud hyn, efallai y bydd yn bosib i unrhyw un sydd â mynediad at y cyfrifiadur (neu ddyfais arall) rydych yn ei ddefnyddio weld gwybodaeth bersonol amdanoch chi." on the page + And I see "Mae’ch data yn cael ei godi o gronfa ddata Rheithwyr GLlTEM o’r dudalen “Eich Manylion”, ac yn cael ei storio ar eich dyfais nes bod eich sesiwn yn dod i ben." on the page + And I see "Deddf Diogelu Data 1998" on the page + And I see "Mae’r gwasanaeth hwn yn cydymffurfio â holl egwyddorion Deddf Diogelu Data 1998. Y Weinyddiaeth Cyfiawnder yw’r ‘rheolwr data’ at ddibenion y Ddeddf. Defnyddir yr wybodaeth a roddwch i’r gwasanaeth at ddibenion rheoli’r broses gwysio rheithgor, ac mae’n cael ei storio mewn cronfa ddata ddiogel at bwrpasau archwilio nes eich bod wedi cwblhau eich gwasanaeth rheithgor. Ni fydd unrhyw ddata personol yn cael ei ddefnyddio wrth brofi’r gwasanaeth hwn." on the page + And I see "Bydd gan ein gwesteiwr, a staff y Weinyddiaeth Cyfiawnder sy’n gyfrifol am gefnogi’r gwasanaeth hwn, fynediad at y gweinydd lle mae’r holl wybodaeth bersonol a gofnodir yn y gwasanaeth hwn yn cael ei storio." on the page + And I see "Ymwrthodiad" on the page + And I see "Nid ydym yn derbyn atebolrwydd am golled neu ddifrod sy’n dod i ran defnyddwyr y gwasanaeth hwn, naill ai’n uniongyrchol, yn anuniongyrchol neu’n ganlyniadol, pa un ai a yw’n cael ei achosi drwy gamwedd, tor-cytundeb neu fel arall. Mae hyn yn cynnwys colli incwm neu refeniw, busnes, elw neu gytundebau, arbedion a ragwelwyd, data, ewyllys da, eiddo diriaethol neu wastraff amser sy’n gysylltiedig â’r gwasanaeth hwn neu unrhyw wefannau sy’n gysylltiedig ag ef ac unrhyw ddeunydd sy’n cael ei bostio arno. Ni fydd yr amod hwn yn atal hawliadau am golled neu ddifrod i’ch eiddo diriaethol nac unrhyw hawliadau eraill am golled ariannol uniongyrchol nad ydynt wedi’i heithrio gan unrhyw rai o’r categorïau uchod." on the page + And I see "Nid yw hyn yn effeithio ar ein hatebolrwydd am farwolaeth neu anaf personol sy’n codi o’n hesgeuluster, nac ar ein hatebolrwydd am gamliwio twyllodrus neu gamliwio mewn perthynas â mater sylfaenol, nac unrhyw atebolrwydd arall na ellir ei eithrio neu ei gyfyngu dan y gyfraith berthnasol." on the page diff --git a/src/test/resources/cucumber/features/regressionSingle/REGRESSION_RecordsUpdatedInJurorBeforeJD.feature b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_RecordsUpdatedInJurorBeforeJD.feature new file mode 100644 index 00000000..d19e5abc --- /dev/null +++ b/src/test/resources/cucumber/features/regressionSingle/REGRESSION_RecordsUpdatedInJurorBeforeJD.feature @@ -0,0 +1,612 @@ +Feature: JDB-3198 + +#currently fails due to JDB-3761 which is coming in sprint 14 + +@RegressionSingle @JDB-3198 +Scenario Outline: Can Complete Record when juror.pool.status=1 (summoned) + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_one> |<pool_no> |400 | + + #Set part_no pool to be urgent + Given "<part_no_one>" has "RET_DATE" as "3 mondays time" + And "<part_no_one>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_one>" has "LNAME" as "<last_name>" + And "<part_no_one>" has "ZIP" as "<postcode>" + + # Submit response in pool + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no_one> |<pool_no> |<last_name> |<postcode> |<email>| + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_one>" + And I press the "Search" button + And I click on "<part_no_one>" in the same row as "<part_no_one>" + + #check status = summoned + + Then I see "Summoned" on the page + + When I select "Responded" from Process reply + And I check the "Mark juror as 'responded'" checkbox + And I press the "Confirm" button + + #now check status = responded + + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_one>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_one>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_one>" on the page + +Examples: + |part_no_one|pool_no |last_name |postcode |email | + |645100458 |451170401 |DOE |SW1H 9AJ |a@a.com| + +@RegressionSingle @JDB-3198 @JDB-3732 +Scenario Outline: Cannot Complete Record when juror.pool.status=2 (Responded) + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_two> |<pool_no> |400 | + + #Set part_no pool to be urgent + Given "<part_no_two>" has "RET_DATE" as "3 mondays time" + And "<part_no_two>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_two>" has "LNAME" as "<last_name>" + And "<part_no_two>" has "ZIP" as "<postcode>" + And "<part_no_two>" has "DOB" as "01-JAN-1977" + + # Submit response in pool + Given I have submitted a first party English straight through response + |part_no |pool_number|last_name |postcode |email | + |<part_no_two> |<pool_no> |<last_name> |<postcode> |<email>| + + #update JUROR to responded + Given "<part_no_two>" has "RESPONDED" as "Y" + Given "<part_no_two>" has "STATUS" as "2" + + Given I am on "Bureau" "juror-test01" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_two>" + And I press the "Search" button + And I click on "<part_no_two>" in the same row as "<part_no_two>" + + #check I get a warning that the record is completed + + Then I see "Response Completed" on the page + Then I see "This response has already been processed in Juror, please check the details are correct" on the page + + #ok message + + And I press the "Ok" button + + #check status on screen + + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_two>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_two>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_two>" on the page + +Examples: + |part_no_two|pool_no |last_name |postcode |email | + |645100454 |451170401 |LNAMETWOSIXZERO |CH1 2AN |a@a.com| + +@RegressionSingle @JDB-3198 @JDB-3732 +Scenario Outline: Cannot Complete Record when juror.pool.status=5 (Excused) + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_three> |<pool_no> |400 | + + #Set part_no pool to be urgent + + Given "<part_no_three>" has "RET_DATE" as "3 mondays time" + And "<part_no_three>" has "NEXT_DATE" as "3 mondays time" + And "<part_no_three>" has "LNAME" as "<last_name>" + And "<part_no_three>" has "ZIP" as "<postcode>" + And "<part_no_three>" has "DOB" as "01-JAN-1977" + + # Submit response in pool + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no_three> |<pool_no> |<last_name> |<postcode> |<email>| + + #update JUROR to excused + + Given "<part_no_three>" has "RESPONDED" as "Y" + And "<part_no_three>" has "STATUS" as "5" + And "<part_no_three>" has "DATE_EXCUS" as "01-JAN-2019" + And "<part_no_three>" has "EXC_CODE" as "D" + And "<part_no_three>" has "USER_EDTQ" as "CPASS" + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_three>" + And I press the "Search" button + And I click on "<part_no_three>" in the same row as "<part_no_three>" + + #check I get a warning that the record is completed + + Then I see "Response Completed" on the page + Then I see "This response has already been processed in Juror, please check the details are correct" on the page + + #ok message + + And I press the "Ok" button + + #check status on screen + + Then I see "Excused" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_three>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_three>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_three>" on the page + +Examples: + |part_no_three |pool_no |last_name |postcode |email | + |645100746 |451170401 |LNAMETWOSIXZERO |CH1 2AN |a@a.com| + +@RegressionSingle @JDB-3198 @JDB-3732 +Scenario Outline: Cannot Complete Record when juror.pool.status=6 (Disqualified) + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_four> |<pool_no> |400 | + + #Set part_no pool to be urgent + Given "<part_no_four>" has "RET_DATE" as "2 mondays time" + And "<part_no_four>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_four>" has "LNAME" as "<last_name>" + And "<part_no_four>" has "ZIP" as "<postcode>" + And "<part_no_four>" has "DOB" as "01-JAN-1977" + + # Submit response in pool + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no_four> |<pool_no> |<last_name> |<postcode> |<email>| + + #update JUROR to disq + Given "<part_no_four>" has "RESPONDED" as "Y" + And "<part_no_four>" has "STATUS" as "6" + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_four>" + And I press the "Search" button + And I click on "<part_no_four>" in the same row as "<part_no_four>" + + #check I get a warning that the record is completed + + Then I see "Response Completed" on the page + Then I see "This response has already been processed in Juror, please check the details are correct" on the page + + #ok message + + And I press the "Ok" button + + #check status on screen + + Then I see "Disqualified" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_four>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_four>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_four>" on the page + +Examples: + |part_no_four |pool_no |last_name |postcode |email | + |645100572 |451170401 |LNAMETWOSIXZERO |CH1 2AN |a@a.com| + +@RegressionSingle @JDB-3198 @JDB-3732 +Scenario Outline: Cannot Complete Record when juror.pool.status=7 (Deferred) + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_five> |<pool_no> |400 | + + #Set part_no pool to be urgent + Given "<part_no_five>" has "RET_DATE" as "2 mondays time" + And "<part_no_five>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_five>" has "LNAME" as "<last_name>" + And "<part_no_five>" has "ZIP" as "<postcode>" + And "<part_no_five>" has "DOB" as "01-JAN-1977" + + # Submit response in pool + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no_five> |<pool_no> |<last_name> |<postcode> |<email>| + + #update JUROR to deferred + Given "<part_no_five>" has "RESPONDED" as "Y" + And "<part_no_five>" has "STATUS" as "7" + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_five>" + And I press the "Search" button + And I click on "<part_no_five>" in the same row as "<part_no_five>" + + #check I get a warning that the record is completed + + Then I see "Response Completed" on the page + Then I see "This response has already been processed in Juror, please check the details are correct" on the page + + #ok message + + And I press the "Ok" button + + Then I see "Deferred" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_five>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_five>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_five>" on the page + +Examples: + |part_no_five |pool_no |last_name |postcode |email | + |645100747 |451170401 |LNAMETWOSIXZERO |CH1 2AN |a@a.com| + +@RegressionSingle @JDB-3198 +Scenario Outline: Cannot Complete Record when juror.pool.status=11 (Awaiting info) + + Given I am on "Public" "juror-test01" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_six> |<pool_no> |400 | + + #Set part_no pool to be urgent + + Given "<part_no_six>" has "RET_DATE" as "2 mondays time" + And "<part_no_six>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_six>" has "LNAME" as "<last_name>" + And "<part_no_six>" has "ZIP" as "<postcode>" + And "<part_no_six>" has "DOB" as "01-JAN-1977" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no_six> |<pool_no> |<last_name> |<postcode> |<email>| + + #update JUROR to awaiting info + + Given "<part_no_six>" has "RESPONDED" as "Y" + And "<part_no_six>" has "STATUS" as "11" + + Given I am on "Bureau" "juror-test01" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_six>" + And I press the "Search" button + And I click on "<part_no_six>" in the same row as "<part_no_six>" + + #check I get a warning that the record is awaiting* in legacy juror + + Then I see "The status of this reply was changed in the Juror app to 'Awaiting information'. Select below the party that the bureau is waiting on information from." on the page + And I see "You cannot access this juror record until the status has been updated." on the page + And I see "Who is the bureau waiting for information from?" on the page + + #error when nothing selected + + And I press the "Confirm" button + Then I see "Select who the bureau is waiting for a reply from" on the page + + #select a status + + Then I set the radio button to "Awaiting court reply" + Then I set the radio button to "Awaiting translation" + Then I set the radio button to "Awaiting juror" + + #back + + And I click on the "Back" link + + #re-search + + When I click on the "Search" link + And I set "Juror number" to "<part_no_six>" + And I press the "Search" button + Then I see "1 results for “<part_no_six>”" on the page + + #select again + + And I click on "<part_no_six>" in the same row as "<part_no_six>" + + #check I get a warning that the record is awaiting* in legacy juror + + Then I see "The status of this reply was changed in the Juror app to 'Awaiting information'. Select below the party that the bureau is waiting on information from." on the page + And I see "You cannot access this juror record until the status has been updated." on the page + And I see "Who is the bureau waiting for information from?" on the page + + #select a status + + Then I set the radio button to "Awaiting juror" + + #ok message + + And I press the "Confirm" button + + #check status = awaiting info + + And I see "AWAITING JUROR" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "AWAITING_CONTACT" where "JUROR_NUMBER" is "<part_no_six>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "N" where "JUROR_NUMBER" is "<part_no_six>" + +Examples: + |part_no_six |pool_no |last_name |postcode |email | + |645100718 |451170401 |LNAMETWOSIXZERO |CH1 2AN |a@a.com| + +@RegressionSingle @JDB-3198 +Scenario Outline: Cannot Complete Record when juror.pool.status=2 and processing status=AWAITING* + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_seven>|<pool_no> |400 | + + #Set part_no pool to be urgent + + Given "<part_no_seven>" has "RET_DATE" as "2 mondays time" + And "<part_no_seven>" has "NEXT_DATE" as "2 mondays time" + And "<part_no_seven>" has "LNAME" as "<last_name>" + And "<part_no_seven>" has "ZIP" as "<postcode>" + And "<part_no_seven>" has "DOB" as "01-JAN-1977" + + # Submit response in pool + + Given I have submitted a first party English straight through response + |part_no |pool_number |last_name |postcode |email | + |<part_no_seven> |<pool_no> |<last_name> |<postcode> |<email>| + + #update JUROR DIGITAL to awaiting information + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_seven>" + And I press the "Search" button + And I click on "<part_no_seven>" in the same row as "<part_no_seven>" + Then I press the "More actions" button + And I click on the "Mark as 'Awaiting information" link + And I set the radio button to "Awaiting juror" + + #update JUROR to responded + + Given "<part_no_seven>" has "RESPONDED" as "Y" + And "<part_no_seven>" has "STATUS" as "2" + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_seven>" + And I press the "Search" button + And I click on "<part_no_seven>" in the same row as "<part_no_seven>" + + #check I get a warning that the record is completed + + Then I see "Response Completed" on the page + Then I see "This response has already been processed in Juror, please check the details are correct" on the page + + #ok message + + And I press the "Ok" button + + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_seven>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_seven>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_seven>" on the page + +Examples: + |part_no_seven |pool_no |last_name |postcode |email | + |645100075 |451170401 |LNAMETWOSIXZERO |CH1 2AN |a@a.com| + +@RegressionSingle @JDB-3198 @JDB-3732 +Scenario Outline: Cannot Complete Record when juror.pool.status=2 (Responded) and record is pending allocation + + Given I am on "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no_eight>|<pool_no> |400 | + + #Set part_no pool to be not urgent + Given "<part_no_eight>" has "RET_DATE" as "5 mondays time" + And "<part_no_eight>" has "NEXT_DATE" as "5 mondays time" + And "<part_no_eight>" has "LNAME" as "<last_name>" + And "<part_no_eight>" has "ZIP" as "<postcode>" + And "<part_no_eight>" has "DOB" as "01-JAN-1977" + + Then I see "Reply to a jury summons" on the page + + + Then I see "Are you replying for yourself or for someone else?" on the page + + When I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + #Juror Log In + + When I set "9-digit juror number" to "<part_no_eight>" + When I set "Juror last name" to "<last_name>" + When I set "Juror postcode" to "<postcode>" + And I press the "Continue" button + Then I see "Is the name we have for you correct?" on the page + When I set the radio button to "Yes" + + #Check name + + When I press the "Continue" button + Then I see "Is this your address?" on the page + When I set the radio button to "Yes" + + #Check address + + When I press the "Continue" button + Then I see "What is your phone number?" on the page + + #Phone details + + When I set "Main phone" to "0207 821 1818" + And I press the "Continue" button + Then I see "What is your email address?" on the page + + #Email details + + When I set "Enter your email address" to "email@outlook.com" + And I set "Enter your email address again" to "email@outlook.com" + And I press the "Continue" button + Then I see "What is your date of birth?" on the page + + #DoB + + When I set "Day" to "27" + And I set "Month" to "04" + And I set "Year" to "1981" + And I press the "Continue" button + + Then I see "Confirm you're eligible for jury service" on the page + + When I press the "Continue" button + Then I see "Since you turned 13, has your main address been in the UK, Channel Islands or Isle of Man for any period of at least 5 years?" on the page + + #Residency + + When I set the radio button to "No" + And I set "Provide details" to "Not a resident" + And I press the "Continue" button + + #CJS + + When I set the radio button to "No" + And I press the "Continue" button + + #Bail + + When I set the radio button to "No" + And I press the "Continue" button + + #Convictions + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 1 + + When I set the radio button to "No" + And I press the "Continue" button + + #Mental health part 2 + + When I set the radio button to "No" + And I press the "Continue" button + + #I can attend + + And I see "Yes, I can start on" on the page + And I set the radio button to "Yes, I can start on" + And I press the "Continue" button + + #RA + + When I set the radio button to "No" + And I press the "Continue" button + + #Check Your Answers + + Then I see "Check your answers now" on the page + + #When I press the "Submit" button + + When I check the "The information I have given is true to the best of my knowledge" checkbox + And I press the "Submit" button + Then I see "We have sent you an email to say you have replied to your jury summons." on the page + + #update JUROR to responded + Given "<part_no_eight>" has "RESPONDED" as "Y" + Given "<part_no_eight>" has "STATUS" as "2" + + Given I am on "Bureau" "juror-test02" + And I log in as "CPASS" + + When I click on the "Search" link + And I set "Juror number" to "<part_no_eight>" + And I press the "Search" button + And I click on "<part_no_eight>" in the same row as "<part_no_eight>" + + #check I get a warning that the record is completed + + Then I see "Response Completed" on the page + Then I see "This response has already been processed in Juror, please check the details are correct" on the page + + #ok message + + And I press the "Ok" button + + #check status on screen + + Then I see "Responded" on the page + And I see "COMPLETED" on the page + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no_eight>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no_eight>" + + #check record is now in "completed today" + + When I click on the "Your work" link + Then I click on the "Completed" link + Then I see "<part_no_eight>" on the page + +Examples: + |part_no_eight |pool_no |last_name |postcode |email | + |645700901 |457170401 |LNAMENINEZEROONE |CH1 2AN |a@a.com| diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Deferral.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Deferral.feature new file mode 100644 index 00000000..974822a9 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Deferral.feature @@ -0,0 +1,504 @@ +Feature: Regression Welsh_1st_Deferral + +@RegressionWelsh @JDB-3516 @JDB-3089 @JDB-3089A @JDB-3409 @JDB-3445 @JDB-3448 @JDB-3503 @JDB-3071 @JDB-3603 @JDB-3819 @JDB-4249 +Scenario Outline: Welsh 1st Party Deferral + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + And I do not see any links on the page that open to a new page without an alt text + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + + #Juror's details + + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's address + + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's phone + + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's email + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #DoB and JDB-3409 + + And I see "Cymorth gyda'ch dyddiad geni" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Do you qualify for jury service? + + When I press the "Parhau" button + + #Residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "Do" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #CJS + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Bail + + And I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Criminal convictions + + And I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + And I set the radio button to "Naddo" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Mental health sectioned + + And I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Mental health capacity + + And I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Can you attend + + And I see "Gwiriwch eich dyddiad dechrau" on the page + And I see "Rydych wedi cael gwŷs i ddechrau gwasanaeth rheithgor ar" on the page + And I see "Ydych chi'n gallu dechrau gwasanaeth rheithgor ar y dyddiad hwn?" on the page + And I see "Ydw, rydw i'n gallu dechrau ar" on the page + And I see "Nac ydw, hoffwn newid y dyddiad" on the page + And I see "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" on the page + + And I click on the "A fydd angen i mi wasanaethu'n hirach na phythefnos?" link + And I see "Dim ond pythefnos y mae angen i'r rhan fwyaf o bobl wasanaethu ar reithgor." on the page + And I see "Efallai y bydd y llys yn gofyn i chi wasanaethu am fwy o amser pan fyddwch yn cyrraedd y llys." on the page + And I see "Os nad ydych yn gallu gwasanaethu am fwy na phythefnos, gallwch drafod hyn gyda rheolwr y rheithgor yn y llys." on the page + + And I click on the "Beth os oes problem yn nes at yr amser ac nid wyf yn gallu gwasanaethu?" link + Then I see "Rhaid i chi gysylltu â ni bryd hynny i roi gwybod i ni." on the page + + And I press the "Parhau" button + And I see "Dewiswch os ydych yn gallu dechrau eich gwasanaeth rheithgor ar y dyddiad hwn ai peidio" on the page + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3448 and JDB-3503 + + And I see "steps/confirm-date/deferral-reason" in the URL + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + And I see "Mae'n rhaid i chi gael rheswm da dros newid dyddiad, er enghraifft:" on the page + And I see "gwyliau wedi'i drefnu" on the page + And I see "llawdriniaeth" on the page + And I see "arholiad" on the page + And I see "nid yw eich cyflogwr yn fodlon rhoi amser i ffwrdd o'r gwaith i chi" on the page + And I see "Dim ond unwaith y gallwch newid y dyddiad." on the page + And I do not see any links on the page that open to a new page without an alt text + + #Deferral Reason + + And I press the "Parhau" button + And I see "Nodwch y rheswm dros fod angen dyddiad arall ar gyfer eich gwasanaeth rheithgor" on the page + + When I set text area with "id" of "deferralReason" to "Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here " + And I see "You have 14 characters too many" on the page + + And I press the "Parhau" button + And I see "Os gwelwch yn dda, sicrhewch fod hyd y rheswm yn llai na 1000 o nodau" on the page + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3445 Deferral Date Screen Layout + #JDB-3603 + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Dewiswch 3 dydd Llun pan allwch ddechrau gwasanaeth rheithgor" on the page + And I see "Rhaid i'r rhain fod rhwng" on the page + And I see "Rhaid i chi fod ar gael i wasanaethu am o leiaf pythefnos" on the page + And I see "Dewis cyntaf" on the page + And I see "Ail ddewis" on the page + And I see "Trydydd dewis" on the page + + #help text + + And I click on the "A fydd angen i mi wasanaethu'n hirach na phythefnos?" link + And I see "Dim ond pythefnos y mae angen i'r rhan fwyaf o bobl wasanaethu ar reithgor." on the page + And I see "Efallai y bydd y llys yn gofyn i chi wasanaethu am fwy o amser pan fyddwch yn cyrraedd y llys." on the page + And I see "Os nad ydych yn gallu gwasanaethu am fwy na phythefnos, gallwch drafod hyn gyda rheolwr y rheithgor yn y llys." on the page + Then I click on the "Beth os oes problem yn nes at yr amser ac nid wyf yn gallu gwasanaethu?" link + Then I see "Rhaid i chi gysylltu â ni bryd hynny i roi gwybod i ni." on the page + And I do not see any links on the page that open to a new page without an alt text + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + And on the page I see + |text| + |Gwiriwch eich dyddiadau| + |Dyddiadau y gallwch ddechrau gwasanaeth rheithgor| + |Nid oes angen i chi ddweud wrthym yr holl ddyddiadau eraill rydych ar gael.| + |Byddwn yn dewis un o'r 3 dyddiad sydd orau gennych.| + |Os na allwn ddefnyddio un o'r dyddiadau hyn am unrhyw reswm, byddwn yn cysylltu â chi.| + |Ydych chi am fwrw ymlaen â'r dyddiadau hyn?| + + Then I set the radio button to "Ydw" + And I press the "Parhau" button + + #Special Requirements + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + And on the page I see + |text| + |Bu ichi ymateb i'r dyddiad arfaethedig ar gyfer eich gwasanaeth rheithgor| + |Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor| + |Rwyf angen newid dyddiad fy ngwasanaeth rheithgor| + |askForAnotherDateReasonWhy| + |Dewiswch 3 dydd Llun pan allwch ddechrau gwasanaeth rheithgor| + |Dewis cyntaf| + |Ail ddewis| + |Trydydd dewis| + + And I do not see any links on the page that open to a new page without an alt text + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + And I do not see any links on the page that open to a new page without an alt text + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3071 + + And I see "Byddwn yn ysgrifennu atoch yn y 7 diwrnod nesaf i roi gwybod ichi os gallwch newid dyddiad eich gwasanaeth rheithgor." on the page + And I see "Yna, o leiaf bythefnos cyn i'ch gwasanaeth rheithgor ddechrau, byddwn yn anfon y canlynol atoch:" on the page + And I do not see any links on the page that open to a new page without an alt text + + And I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" link + + And on the page I see + |text| + |Bu ichi ymateb i’r dyddiad arfaethedig ar gyfer y gwasanaeth rheithgor| + |Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor| + |Rwyf angen newid dyddiad fy ngwasanaeth rheithgor| + |askForAnotherDateReasonWhy| + |Dewiswch 3 dydd Llun pan allwch ddechrau gwasanaeth rheithgor| + |Dewis cyntaf| + |Ail ddewis| + |Trydydd dewis| + + Then I press the "back" button on my browser + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500997 |LNAMENINENINESEVEN |CH1 2AN |a@eeee.com |415170401 | + +@RegressionSingle +Scenario Outline: Welsh 1st Party Deferral - bank holiday + Given I am on the welsh version of "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + And I do not see any links on the page that open to a new page without an alt text + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + + #Juror's details + + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's address + + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's phone + + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's email + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #DoB and JDB-3409 + + And I see "Cymorth gyda'ch dyddiad geni" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Do you qualify for jury service? + + When I press the "Parhau" button + + #Residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "Do" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #CJS + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Bail + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Criminal convictions + + And I set the radio button to "Naddo" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Mental health sectioned + + And I set the radio button to "Na" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Mental health capacity + + And I set the radio button to "Na" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Can you attend + + And I see "Gwiriwch eich dyddiad dechrau" on the page + And I see "Rydych wedi cael gwŷs i ddechrau gwasanaeth rheithgor ar" on the page + And I see "Ydych chi'n gallu dechrau gwasanaeth rheithgor ar y dyddiad hwn?" on the page + And I see "Ydw, rydw i'n gallu dechrau ar" on the page + And I see "Nac ydw, hoffwn newid y dyddiad" on the page + And I see "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" on the page + + And I click on the "A fydd angen i mi wasanaethu'n hirach na phythefnos?" link + And I see "Dim ond pythefnos y mae angen i'r rhan fwyaf o bobl wasanaethu ar reithgor." on the page + And I see "Efallai y bydd y llys yn gofyn i chi wasanaethu am fwy o amser pan fyddwch yn cyrraedd y llys." on the page + And I see "Os nad ydych yn gallu gwasanaethu am fwy na phythefnos, gallwch drafod hyn gyda rheolwr y rheithgor yn y llys." on the page + + And I click on the "Beth os oes problem yn nes at yr amser ac nid wyf yn gallu gwasanaethu?" link + Then I see "Rhaid i chi gysylltu â ni bryd hynny i roi gwybod i ni." on the page + + And I press the "Parhau" button + And I see "Dewiswch os ydych yn gallu dechrau eich gwasanaeth rheithgor ar y dyddiad hwn ai peidio" on the page + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3448 and JDB-3503 + + And I see "steps/confirm-date/deferral-reason" in the URL + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + And I see "Mae'n rhaid i chi gael rheswm da dros newid dyddiad, er enghraifft:" on the page + And I see "gwyliau wedi'i drefnu" on the page + And I see "llawdriniaeth" on the page + And I see "arholiad" on the page + And I see "nid yw eich cyflogwr yn fodlon rhoi amser i ffwrdd o'r gwaith i chi" on the page + And I see "Dim ond unwaith y gallwch newid y dyddiad." on the page + And I do not see any links on the page that open to a new page without an alt text + + #Deferral Reason + + And I press the "Parhau" button + And I see "Nodwch y rheswm dros fod angen dyddiad arall ar gyfer eich gwasanaeth rheithgor" on the page + + When I set text area with "id" of "deferralReason" to "Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here " + And I see "You have 14 characters too many" on the page + + And I press the "Parhau" button + And I see "Os gwelwch yn dda, sicrhewch fod hyd y rheswm yn llai na 1000 o nodau" on the page + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3445 Deferral Date Screen Layout + #JDB-3603 + + And I see "steps/confirm-date/deferral-dates" in the URL + Then I see "Dewiswch 3 dydd Llun pan allwch ddechrau gwasanaeth rheithgor" on the page + And I see "Rhaid i'r rhain fod rhwng" on the page + And I see "Rhaid i chi fod ar gael i wasanaethu am o leiaf pythefnos" on the page + And I see "Dewis cyntaf" on the page + And I see "Ail ddewis" on the page + And I see "Trydydd dewis" on the page + + #help text + + And I click on the "A fydd angen i mi wasanaethu'n hirach na phythefnos?" link + And I see "Dim ond pythefnos y mae angen i'r rhan fwyaf o bobl wasanaethu ar reithgor." on the page + And I see "Efallai y bydd y llys yn gofyn i chi wasanaethu am fwy o amser pan fyddwch yn cyrraedd y llys." on the page + And I see "Os nad ydych yn gallu gwasanaethu am fwy na phythefnos, gallwch drafod hyn gyda rheolwr y rheithgor yn y llys." on the page + Then I click on the "Beth os oes problem yn nes at yr amser ac nid wyf yn gallu gwasanaethu?" link + Then I see "Rhaid i chi gysylltu â ni bryd hynny i roi gwybod i ni." on the page + And I do not see any links on the page that open to a new page without an alt text + + Then I create a bank holiday "8" Mondays in the future for court/bureau "400" new schema + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + And on the page I see + |text| + |Gwiriwch eich dyddiadau| + |Dyddiadau y gallwch ddechrau gwasanaeth rheithgor| + |Nid oes angen i chi ddweud wrthym yr holl ddyddiadau eraill rydych ar gael.| + |Byddwn yn dewis un o'r 3 dyddiad sydd orau gennych.| + |Os na allwn ddefnyddio un o'r dyddiadau hyn am unrhyw reswm, byddwn yn cysylltu â chi.| + |Ydych chi am fwrw ymlaen â'r dyddiadau hyn?| + + Then I set the radio button to "Ydw" + And I press the "Parhau" button + + #Bank holiday + + And on the page I see + |text| + |Mae o leiaf un dydd Llun a ddewiswyd gennych yn ŵyl banc| + |Rydych chi wedi dewis o leiaf un dydd Llun sy'n ŵyl banc yn y DU.| + |Os byddwn yn dewis hwn fel eich dyddiad dechrau, bydd eich gwasanaeth rheithgor yn dechrau ar y dydd Mawrth canlynol ar y cynharaf| + |Byddwn yn anfon cadarnhad atoch o'ch dyddiad dechrau maes o law.| + + And I press the "Parhau" button + + #Special Requirements + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see text "askForAnotherDateReasonWhy" in the same row as "Eglurwch pam eich bod angen newid dyddiad eich gwasanaeth rheithgor" + And I do not see any links on the page that open to a new page without an alt text + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + And I do not see any links on the page that open to a new page without an alt text + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + And I do not see any links on the page that open to a new page without an alt text + + #JDB-3071 + + And I see "Byddwn yn ysgrifennu atoch yn y 7 diwrnod nesaf i roi gwybod ichi os gallwch newid dyddiad eich gwasanaeth rheithgor." on the page + And I see "Yna, o leiaf bythefnos cyn i'ch gwasanaeth rheithgor ddechrau, byddwn yn anfon y canlynol atoch:" on the page + And I do not see any links on the page that open to a new page without an alt text + + And I delete bank holiday new schema + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100984 |LNAME4823 |SW1H 9AJ |a@eeee.com |451170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_ErrorChecks.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_ErrorChecks.feature new file mode 100644 index 00000000..021135fc --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_ErrorChecks.feature @@ -0,0 +1,549 @@ +Feature: Regression Welsh_1st_ErrorChecks + +@RegressionWelsh @4485 +Scenario Outline: Welsh_1st_ErrorChecks - status is Undeliverable + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "STATUS" as "9" + + When I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + When I press the "Parhau" button + Then I see "Nodwch eich rhif rheithiwr 9 digid - gallwch ddod o hyd iddo ar eich llythyr gwŷs rheithgor" on the page + And I see "Rhaid i chi nodi eich enw olaf yn union fel y mae'n ymddangos ar eich llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir" on the page + And I see "Rhaid i chi nodi eich cod post yn union fel y mae'n ymddangos ar eich llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir" on the page + + Then I click on the "Problemau wrth nodi eich manylion?" link + And I see "Os ydych wedi gwirio'ch manylion a’ch bod dal methu parhau, gallwch gysylltu â ni." on the page + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "Dydd Llun i Ddydd Iau 9am – 5pm" on the page + And I see "Dydd Gwener 9am – 3pm" on the page + And I see "Canfod mwy am gostau galwadau" on the page + + #Juror Log In + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + And I see "Mae ein cofnodion yn dangos eich bod eisoes wedi ymateb i'r wŷs rheithgor hon" on the page + And I see "Os ydych eisiau dweud wrthym am newidiadau neu os ydym wedi gofyn am ragor o wybodaeth gennych, mae angen ichi gysylltu â ni ar e-bost, dros y ffôn neu lythyr." on the page + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "Dydd Llun i Ddydd Iau 9am – 5pm" on the page + And I see "Dydd Gwener 9am – 3pm" on the page + And I see "Canfod mwy am gostau galwadau" on the page + + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "Phoenix House" on the page + And I see "Rushton Avenue" on the page + And I see "Bradford" on the page + And I see "BD3 7BH" on the page + + And I see "Ni allwch ddefnyddio'r gwasanaeth digidol hwn i roi gwybodaeth ychwanegol i ni." on the page + + + Examples: + |part_no |last_name |postcode |email |pool_no | + |645100311 |DOE |SW1H 9AJ |email@outlook.com |451170401 | + +@RegressionWelsh @4494 @4488 +Scenario Outline: Welsh_1st_ErrorChecks - Court date is in the past + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "-1 mondays time" + And "<part_no>" has "NEXT_DATE" as "-1 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + When I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + #Juror Log In + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Mae'r dyddiad ar gyfer eich gwŷs rheithgor wedi mynd heibio. Ni allwch ymateb drwy ddefnyddio'r gwasanaeth hwn." on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |645100653 |DOE |SW1H 9AJ |email@outlook.com |451170401 | + + +@RegressionWelsh @JDB-3348 @JDB-3499 @JDB-3525 @JDB-3564 @JDB-3589 @JDB-3572 @JDB-3668 @JDB-3669 @JDB-3670 @JDB-3671 +@JDB-3672 @JDB-3573 @JDB-3711 @JDB-3715 @JDB-3817 +Scenario Outline: Welsh_1st_ErrorChecks + + Given I am on the welsh version of "Public" "bau-test" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<Postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<Postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + + #Check name + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + And I set "Enw cyntaf" to "" + And I set "Cyfenw" to "" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch eich enw cyntaf" on the page + And I see "Nodwch eich cyfenw" on the page + When I set "Enw cyntaf" to "FirstName" + And I set "Cyfenw" to "LastName" + And I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + + #Check address + + And I set the radio button to "Na" + And I press the "Parhau" button + And I set "Llinell Cyfeiriad 1" to "" + And I set "Tref neu ddinas" to "" + And I set "Cod post" to "" + And I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Nodwch linell gyntaf eich cyfeiriad" on the page + And I see "Nodwch y dref neu'r ddinas lle rydych yn byw" on the page + And I see "Nodwch eich cod post" on the page + + #Checking Invalids check with Jorge + + When I set "Llinell Cyfeiriad 1" to "|||" + And I set "Tref neu ddinas" to "|||" + And I set "Sir (dewisol)" to "|||" + And I set "Cod post" to "|||" + And I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Gwiriwch linell gyntaf eich cyfeiriad" on the page + And I see "Gwiriwch y dref neu'r ddinas lle rydych yn byw" on the page + And I see "Gwiriwch eich sir" on the page + And I see "Gwiriwch eich cod post" on the page + When I set "Llinell Cyfeiriad 1" to "123 ADDRESS LINE ONE" + When I set "Llinell Cyfeiriad 2" to "123 ADDRESS LINE TWO" + When I set "Llinell Cyfeiriad 3" to "123 ADDRESS LINE THREE" + And I set "Tref neu ddinas" to "London" + And I set "Sir (dewisol)" to "" + And I set "Cod post" to "CH1 2AN" + And I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + + #Phone details + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + + #Email details + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch eich cyfeiriad e-bost" on the page + And I see "Nodwch eich cyfeiriad e-bost a gwiriwch eich fod yr un fath â beth sydd yn y blwch cyntaf" on the page + + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Nodwch eich cyfeiriad e-bost a gwiriwch eich fod yr un fath â beth sydd yn y blwch cyntaf" on the page + + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + + #DoB + + When I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Nodwch y diwrnod y cawsoch eich geni" on the page + And I do not see "Nodwch y mis y cawsoch eich geni" on the page + And I do not see "Nodwch y flwyddyn y cawsoch eich geni" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "198a" + And I press the "Parhau" button + Then I see "Mae problem" on the page +# And I see "Gwiriwch eich dyddiad geni" on the page + And I see "Rhowch y flwyddyn y cawsoch eich geni fel rhif 4 digid. Er enghraifft, 1982" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + + When I press the "Parhau" button + + #Residency Yes + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Dewiswch do os yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf, ers i chi droi'n 13 oed" + When I set the radio button to "Naddo" + Then I see "Rhowch fanylion am ble rydych wedi byw ers eich pen-blwydd yn 13 mlwydd oed" on the page + And I press the "Parhau" button + Then I see "Mae problem" on the page + + #JDB-3572 + + And I see error "Rhowch fanylion am ble rydych wedi byw ers eich pen-blwydd yn 13 mlwydd oed" + + When I set the radio button to "Do" + And I press the "Parhau" button + + #CJS JDB-3817 + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Dewiswch a ydych wedi gweithio yn y system cyfiawnder troseddol yn ystod y 5 mlynedd diwethaf" + + When I set the radio button to "Ydw" + Then I see "Dewiswch unrhyw sefydliadau rydych wedi gweithio iddynt." on the page + And I press the "Parhau" button + + #JDB-3525 test, should NOT allow to progress straight to RA (Now fixed) + + Then I see error "Ticiwch unrhyw sefydliadau rydych wedi gweithio iddynt yn uniongyrchol (nid fel trydydd parti neu is-gontractwr)" + + When I check the "Yr heddlu" checkbox + Then I see "Pa heddlu?" on the page + And I check the "Gwasanaeth Carchardai EM" checkbox + Then I see "Pa ran o Wasanaeth Carchardai EM?" on the page + And I check the "Arall" checkbox + Then I see "Pa ran arall o’r System Cyfiawnder Troseddol?" on the page + And I press the "Parhau" button + Then I see error "Rhowch fanylion am ble a phryd roeddech yn gweithio i'r Heddlu" + Then I see error "Rhowch fanylion am ble a phryd roeddech yn gweithio i Wasanaeth Carchardai EM" + Then I see error "Rhowch fanylion am pryd a lle rydych wedi gweithio mewn rhan arall o'r system cyfiawnder troseddol" + + Then I uncheck the "Yr heddlu" checkbox + Then I uncheck the "Gwasanaeth Carchardai EM" checkbox + Then I uncheck the "Arall" checkbox + + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail no + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Dewiswch Do os ydych ar fechnïaeth ar hyn o bryd am gyflawni trosedd" + + When I set the radio button to "Ydw" + Then I see "Rhowch fanylion am eich mechnïaeth a'ch trosedd" on the page + And I press the "Parhau" button + Then I see "Mae problem" on the page + Then I see error "Rhowch fanylion am eich mechnïaeth" + + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Convictions no + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Dewiswch 'Do' os cawsoch eich cael yn euog o drosedd" + When I set the radio button to "Do" + Then I see "Rhowch fanylion am eich trosedd" on the page + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Rhowch fanylion am eich trosedd" + + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental health part 1 no + # JDB-3573 + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Dewisiwch 'ie' os ydych yn cael eich cadw, eich gwarchod neu eich trin o dan Ddeddf Iechyd Meddwl" + + When I set the radio button to "Ie" + Then I see "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" on the page + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" + + When I set the radio button to "Na" + And I press the "Parhau" button + + #Mental health part 2 no + #JDB-3574 + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Dewiswch 'ie' os penderfyniwyd nad oes gennych y 'gallu meddyliol'" + + When I set the radio button to "Ie" + Then I see "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" on the page + And I press the "Parhau" button + Then I see "Mae problem" on the page + Then I see error "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" + + When I set the radio button to "Na" + And I press the "Parhau" button + + #I can attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #RA no + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Dewiswch 'Oes' os byddwch chi angen cymorth pan fyddwch yn y llys" on the page + + When I set the radio button to "Oes" + And I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Dewiswch os oes gennych symudedd cyfyngedig, nam ar y clyw, clefyd siwgr, nam difrifol ar eich golwg neu anabledd neu nam o fath arall" on the page + + When I check the "Arall" checkbox + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch fanylion os gwelwch yn dda" on the page + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers + + When I press the "Cyflwyno" button + Then I see "Mae problem" on the page + Then I see "Cadarnhewch fod eich gwybodaeth yn gywir cyn ichi anfon eich ymateb" on the page + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + + #Deferral Reason + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + + When I set text area with "id" of "deferralReason" to "Defer me please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allwch ddechrau gwasanaeth rheithgor" on the page + + #Deferral Dates + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch y dydd Llun cyntaf y byddai'n well gennych ddechrau gwasanaeth rheithgor" on the page + And I see "Rhowch yr ail ddewis o ddydd Llun y byddai'n well gennych ddechrau gwasanaeth rheithgor" on the page + And I see "Rhowch y trydydd dewis o ddydd Llun y byddai'n well gennych ddechrau gwasanaeth rheithgor" on the page + + When I set the "First" single date field to a Monday "16" weeks in the future + When I set the "Second" single date field to a Monday "16" weeks in the future + When I set the "Third" single date field to a Monday "18" weeks in the future + And I press the "Parhau" button + + Then I see "Mae problem" on the page + And I see "Nodwch ddyddiad sy'n wahanol i'ch dewisiadau eraill" on the page + + When I set the "First" single date field to a Monday "100" weeks in the future + When I set the "Second" single date field to a Monday "101" weeks in the future + When I set the "Third" single date field to a Monday "102" weeks in the future + And I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Rhaid i'ch dewis cyntaf fod yn ddydd Llun rhwng" on the page + And I see "Rhaid i'ch ail ddewis fod yn ddydd Llun rhwng" on the page + And I see "Rhaid i'ch trydydd dewis fod yn ddydd Llun rhwng" on the page + + When I set the "First" single date field to a Monday "16" weeks in the future + When I set the "Second" single date field to a Monday "17" weeks in the future + When I set the "Third" single date field to a Monday "18" weeks in the future + And I press the "Parhau" button + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + + #Excusal Reason + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Eglurwch pam na allwch chi wasanaethu ar reithgor yn ystod y 12 mis nesaf" on the page + + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #When I press the "Submit" button + + When I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + Then I see "Rydym wedi anfon neges e-bost atoch i gadarnhau eich bod wedi ymateb i’ch gwŷs rheithgor." on the page + +Examples: + |part_no |last_name |Postcode |pool_no | + |641500998 |LNAMENINENINEEIGHT |CH1 2AN |415170401 | + +@RegressionWelsh @JDB-4100 +Scenario Outline: Welsh response completed in Legacy and login attempted on Digital + Given I am on the welsh version of "Public" "bau-test" + Given I have cleared down the juror digital database + Given the juror numbers have not been processed + |part_no |pool_no |Owner | + |641500623 |415181001 |400 | + + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "READ_ONLY" as "N" + And "<part_no>" has "RESPONDED" as "Y" + And "<part_no>" has "STATUS" as "2" + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + When I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + And I set "Cyfenw'r Rheithiwr" to "<last_name>" + And I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + And I see "Mae ein cofnodion yn dangos eich bod eisoes wedi ymateb i'r wŷs rheithgor hon" on the page + And I see "Os ydych eisiau dweud wrthym am newidiadau neu os ydym wedi gofyn am ragor o wybodaeth gennych, mae angen ichi gysylltu â ni ar e-bost, dros y ffôn neu lythyr." on the page + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "Dydd Llun i Ddydd Iau 9am – 5pm" on the page + And I see "Dydd Gwener 9am – 3pm" on the page + And I see "Canfod mwy am gostau galwadau" on the page + + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "Phoenix House" on the page + And I see "Rushton Avenue" on the page + And I see "Bradford" on the page + And I see "BD3 7BH" on the page + + And I see "Ni allwch ddefnyddio'r gwasanaeth digidol hwn i roi gwybodaeth ychwanegol i ni." on the page + + +Examples: + |part_no |last_name |postcode | + |641500661 |DOE |SW1H 9AJ | + + + @RegressionWelsh @4485 + Scenario Outline: Welsh Already Replied info page + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "STATUS" as "9" + + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + When I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + And I set "Cyfenw'r Rheithiwr" to "<last_name>" + And I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + And I see "Mae ein cofnodion yn dangos eich bod eisoes wedi ymateb i'r wŷs rheithgor hon" on the page + And I see "Os ydych eisiau dweud wrthym am newidiadau neu os ydym wedi gofyn am ragor o wybodaeth gennych, mae angen ichi gysylltu â ni ar e-bost, dros y ffôn neu lythyr." on the page + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "Dydd Llun i Ddydd Iau 9am – 5pm" on the page + And I see "Dydd Gwener 9am – 3pm" on the page + And I see "Canfod mwy am gostau galwadau" on the page + + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "Phoenix House" on the page + And I see "Rushton Avenue" on the page + And I see "Bradford" on the page + And I see "BD3 7BH" on the page + + And I see "Ni allwch ddefnyddio'r gwasanaeth digidol hwn i roi gwybodaeth ychwanegol i ni." on the page + + Examples: + |part_no |last_name |postcode |pool_no| + |645200277 |LNAMESIXSEVENSIX |SW1H 9AJ |452170501| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Excusal.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Excusal.feature new file mode 100644 index 00000000..d58203d2 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Excusal.feature @@ -0,0 +1,148 @@ +Feature: Regression Welsh_1st_Excusal + +@RegressionWelsh @JDB-3089 @JDB-3089A @JDB-3409 @JDB-3447 @JDB-3653 @JDB-3816 @JDB-4249 +Scenario Outline: Welsh 1st Party Excusal + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I do not see any links on the page that open to a new page without an alt text + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + + #Juror's details + +# When I see "Beth sy'n digwydd os rwyf wedi newid fy enw?" on the page + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + + #Juror's address + +# And I see "Beth sy'n digwydd os rwyf wedi newid fy nghyfeiriad?" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + + #Juror's phone + + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + + #Juror's email + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + + #DoB + + And I see "Cymorth gyda'ch dyddiad geni" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Do you qualify for jury service? + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + When I press the "Parhau" button + + #Residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Criminal convictions + + And I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental health sectioned + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental health capacity + + And I set the radio button to "Na" + And I press the "Parhau" button + + #Can you attend, select excusal + + And I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + + #Reason for excusal JDB-3653 and JDB-3816 + + And I see "steps/confirm-date/excusal" in the URL + Then I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + And I see "Eglurwch pam na allwch chi wasanaethu ar reithgor yn ystod y 12 mis nesaf." on the page + And I see "Nid oes angen ichi atodi na chasglu tystiolaeth cyn dyddiad terfyn eich gwŷs." on the page + And I see "Byddwn yn cysylltu â chi yn nes ymlaen os bydd angen hynny." on the page + And I click on the "A fydd angen imi ddarparu tystiolaeth yn fuan?" link + And I see "Os bydd angen tystiolaeth arnom, byddwn yn cysylltu â chi eto i ddweud wrthych." on the page + And I see "Er enghraifft, os ydych yn rhy wael i wasanaethu ar reithgor, efallai y byddwn yn gofyn am lythyr gan eich meddyg." on the page + And I see "Byddwch yn cael amser i gasglu unrhyw dystiolaeth felly peidiwch â phoeni am geisio ei chasglu ar hyn o bryd." on the page + And I see "Dylech aros nes byddwn wedi dweud wrthych pa dystiolaeth yr ydym ei hangen, os o gwbl." on the page + And I do not see "Pa dystiolaeth y bydd rhaid i mi o bosib ei gyflwyno?" on the page + + And I press the "Parhau" button + Then I see "Rhowch y rheswm pam na allwch wasanaethu ar reithgor yn ystod y 12 mis nesaf" on the page + + When I set text area with "id" of "excusalReason" to "reasons for excusal request" + And I press the "Parhau" button + + #Special Requirements + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see text "reasons for excusal request" in the same row as "Eglurwch pam na allwch chi wasanaethu ar reithgor yn ystod y 12 mis nesaf" + And I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + Then I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML (15KB)" link + And I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + +Examples: + | part_no |last_name |postcode | email | pool_no| + |841501327 |LNAME1327 |CH1 2AN |a@eeee.com |415181001| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_ProblemCheck.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_ProblemCheck.feature new file mode 100644 index 00000000..a3f57426 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_ProblemCheck.feature @@ -0,0 +1,190 @@ +Feature: Regression Welsh_1st_ProblemCheck + +@RegressionWelsh @JDB-3460 +Scenario Outline: Welsh_1st_ProblemCheck + + Given I am on the welsh version of "Public" "bau-test" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + Then I see "Eich manylion rheithiwr" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Rhif rheithiwr" to "<part_no>" + And I set "Cyfenw" to "<last_name>" + And I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #JDB-4281 + #JDB-4125 + + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + Then I see "Beth yw eich enw?" on the page + And I set "Enw cyntaf" to "" + And I set "Cyfenw" to "" + And I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Enw cyntaf" to "FirstName" + And I set "Cyfenw" to "LastName" + And I press the "Parhau" button + + Then I see "Eich cyfeiriad chi yw hwn?" on the page + Then I see "A fydd eich cyfeiriad chi yn newid yn fuan?" on the page + And I click on the "A fydd eich cyfeiriad chi yn newid yn fuan?" link + Then I see "Os bydd eich cyfeiriad yn newid yn fuan, nodwch eich cyfeiriad presennol, er mwyn i ni allu cysylltu â chi." on the page + Then I see "Ar ôl i chi symud, cysylltwch â'r swyddfa wysio rheithgorau ganolog trwy ffonio 0300 456 1024, a rhoi eich cyfeiriad newydd iddynt." on the page + Then I see "Os ydych yn symud o'r ardal lle'r ydych yn byw ar hyn o bryd, mae'n bosibl y byddwn yn newid lleoliad eich gwasanaeth rheithgor." on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + And I set "Llinell Cyfeiriad 1" to "" + And I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Llinell Cyfeiriad 1" to "123 ADDRESS LINE ONE" + And I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + + When I press the "Parhau" button + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Do" + And I press the "Parhau" button + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Naddo" + And I press the "Parhau" button + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Nac oes" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + When I press the "Cyflwyno" button + Then I see "Mae problem" on the page + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set text area with "id" of "deferralReason" to "Deferral reason please" + And I press the "Parhau" button + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + And on the page I see + |text| + |Gwiriwch eich dyddiadau| + |Dyddiadau y gallwch ddechrau gwasanaeth rheithgor| + |Nid oes angen i chi ddweud wrthym yr holl ddyddiadau eraill rydych ar gael.| + |Byddwn yn dewis un o'r 3 dyddiad sydd orau gennych.| + |Os na allwn ddefnyddio un o'r dyddiadau hyn am unrhyw reswm, byddwn yn cysylltu â chi.| + |Ydych chi am fwrw ymlaen â'r dyddiadau hyn?| + + Then I set the radio button to "Ydw" + And I press the "Parhau" button + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + When I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + And I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500799 |LNAMESEVENNINENINE |CH1 2AN |a@eeee.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_RA.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_RA.feature new file mode 100644 index 00000000..ddbd118d --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_RA.feature @@ -0,0 +1,130 @@ +Feature: Regression Welsh_1st_RA + +@RegressionWelsh @JDB-3608 +Scenario Outline: Welsh_1st_RA + + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #name + + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + And I set the radio button to "Ydy" + And I press the "Parhau" button + + #address + + Then I see "Eich cyfeiriad chi yw hwn?" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + + #phone + + Then I see "Beth yw eich rhif ffôn?" on the page + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + + #email + + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + When I set "Nodwch eich cyfeiriad e-bost" to "<email>" + When I set "Nodwch eich cyfeiriad e-bost eto" to "<email>" + And I press the "Parhau" button + + #dob + + Then I see "Beth yw eich dyddiad geni?" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + + #eligibility + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #bail + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #crim offence + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #MHQ1 + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + #MHQ2 + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I set the radio button to "Na" + And I press the "Parhau" button + + #Confirm Date + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #Support in Court + #3608 + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I set the radio button to "Oes" + And I press the "Parhau" button + Then I see "Dewiswch os oes gennych symudedd cyfyngedig, nam ar y clyw, clefyd siwgr, nam difrifol ar eich golwg neu anabledd neu nam o fath arall" on the page + When I check the "Symudedd cyfyngedig" checkbox + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Answers + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth" checkbox + When I press the "Cyflwyno" button + + #Confirmation + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |641500159 |415170402 |LNAMEONEFIVENINE |CH1 2AN |e@eeee.com| \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_SkipMainContent.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_SkipMainContent.feature new file mode 100644 index 00000000..ae24ab17 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_SkipMainContent.feature @@ -0,0 +1,238 @@ +Feature: Welsh_1st_SkipMainContent + +@RegressionWelsh @JDB-3413 @JDB-3609 @JDB-3357 @JDB-3590 @JDB-3515 +Scenario Outline: Welsh 1st Party Straight Through with Skip to Main Content Checks + + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + When I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ymateb i wŷs rheithgor" on the page + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + And I set the radio button to "Ydy" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Eich cyfeiriad chi yw hwn?" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Beth yw eich rhif ffôn?" on the page + + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + + When I set "Nodwch eich cyfeiriad e-bost" to "<email>" + When I set "Nodwch eich cyfeiriad e-bost eto" to "<email>" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Beth yw eich dyddiad geni?" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + + When I set the radio button to "Do" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Gwiriwch eich ymatebion nawr" on the page + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth" checkbox + + When I press the "Cyflwyno" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then the page language is "cy" + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + + #JDB-3609 + + Then I see "Gallwch wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eich bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + And I see "Rhagor o wybodaeth am wasanaethu ar reithgor. Gallwch darllenwch y rheolau ynghylch trafod y treial a chanfod sut i hawlio am gostau." on the page + And I see "Chyfrifo pa dreuliau a lwfansau y gallwch eu hawlio." on the page + +Examples: + |part_no |pool_no |last_name |postcode |email | + |641500914 |415170401 |DOE |SW1H 9AJ |e@eeee.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_StraightThrough.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_StraightThrough.feature new file mode 100644 index 00000000..e6d8e507 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_StraightThrough.feature @@ -0,0 +1,552 @@ +Feature: Regression Welsh_1st_StraightThrough + +@RegressionWelsh @JDB-3087 @JDB-3095 @JDB-3096 @JDB-3099 @JDB-3358 @JDB-3359 @JDB-3350 @JDB-3360 @JDB-3361 @JDB-3352 +@JDB-3362 @JDB-3373 @JDB-3378 @JDB-3363 @JDB-3364 @JDB-3371 @JDB-3377 @JDB-3370 @JDB-3376 @JDB-3355 @JDB-3372 @JDB-3409 @JDB-3420 @JDB-3453 +@JDB-3473 @JDB-3469 @JDB-3468 @JDB-3465 @JDB-3464 @JDB-3463 @JDB-3456 @JDB-3375 @JDB-3506 @JDB-3807 @JDB-3808 @JDB-3809 @JDB-3810 @JDB-3811 +@JDB-3812 @JDB-3813 @JDB-3814 @JDB-3815 @JDB-3818 @JDB-3820 @JDB-3821 @JDB-3873 @JDB-3833 @JDB-3863 @JDB-3880 @JDB-3905 @JDB-3906 @JDB-3939 +@JDB-3908 @JDB-3909 @JDB-3911 @JDB-3914 @JDB-2237 @JDB-3790 @JDB-4089 @JDB-4249 +Scenario Outline: Welsh 1st Party Straight Through (english court) + Given I am on the welsh version of "Public" "bau-test" + Given auto straight through processing has been enabled + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + Then I see "Beth ddylwn ei wneud os oes angen cymorth arnaf i ymateb?" on the page + And I click on the "Beth ddylwn ei wneud os oes angen cymorth arnaf i ymateb?" link + And I see "Gallwch ofyn i aelod o'ch teulu, ffrind neu ofalydd i'ch helpu." on the page + And I see "Gallant ymateb ar eich rhan neu'ch cynorthwyo i ymateb dros eich hun" on the page + And I see "Mae'n bosib y gallech gael cymorth gyda defnyddio cyfrifiadur yn eich llyfrgell leol" on the page + And I see "Os oes angen rhagor o gymorth arnoch, gallwch ein ffonio ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + #Login JDB-3808 + + And I see "steps/login" in the URL + When I click on the "Nid oes gennyf rif rheithiwr" link + Then I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + + #JDB-3939 + + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Rhowch eich enw olaf fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + And I see "Rhowch eich cod post fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #Check Your Name + + And I see "steps/your-details/name" in the URL + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + Then I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + + #Check Your Address JDB-3809 + + And I see "steps/your-details/address" in the URL + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + And I do not see "Gwiriwch fod eich enw a'r cyfeiriad yn gywir" on the page + When I press the "Parhau" button + + #Phone + + And I see "steps/your-details/phone" in the URL + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener. | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + + #Email + + And I see "steps/your-details/email" in the URL + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + #JDB-3820 + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "<email>" + And I set "Nodwch eich cyfeiriad e-bost eto" to "<email>" + And I press the "Parhau" button + + #DoB JDB-3810 + + And I see "steps/your-details/date-of-birth" in the URL + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + | Er enghraifft, 15 03 1982 | + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Mae angen i chi ddweud wrthym beth yw eich dyddiad geni er mwyn i ni wirio os ydych o'r oedran priodol i wasanaethu ar reithgor." on the page + And I do not see "Nodwch ddyddiad geni'r unigolyn er mwyn i ni wirioos ydynt o'r oedran priodol i wasanaethu ar reithgor." on the page + + Then I see "Ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "os oes arnoch angen cyngor am hyn." on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Qualify for jury service + + And I see "steps/qualify" in the URL + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + And I see "Bydd eich atebion yn yr adran nesaf yn ein helpu i wirio a ydych yn gallu gwasanaethu ar reithgor ai peidio." on the page + And I see "Rhaid ichi ateb y cwestiynau hyd yn oed os ydych:" on the page + And I see "yn meddwl nad ydych yn gymwys" on the page + And I see "eisiau cael eich esgusodi" on the page + And I see "Gallwch ofyn i gael eich esgusodi ar ôl yr adran hon, os bydd angen." on the page + When I press the "Parhau" button + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + + #Residency JDB-3909 + + And I see "steps/qualify/residency" in the URL + And I see "Cymhwysedd" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link + Then I see "I fod yn gymwys ar gyfer gwasanaeth rheithgor, rhaid bod eich prif gyfeiriad wedi bod yn un o'r canlynol am unrhyw gyfnod o 5 mlynedd o leiaf:" on the page + + And I do not see "Cymhwyso ar gyfer gwasanaeth rheithgor" on the page + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS JDB-3873 + + And I see "steps/qualify/cjs-employed" in the URL + And I see "Cymhwysedd" on the page + And I do not see "Cymhwyso ar gyfer gwasanaeth rheithgor" on the page + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + + And I see "steps/qualify/bail" in the URL + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + And I see "Cymhwysedd" on the page + And I do not see "Cymhwyso ar gyfer gwasanaeth rheithgor" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Convictions JDB-3814 + + And I see "steps/qualify/convictions" in the URL + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + And I see "Cymhwysedd" on the page + And I do not see "Cymhwyso ar gyfer gwasanaeth rheithgor" on the page + And I see "Dim ond os cawsoch ddedfryd o garchar, gorchymyn cymunedol neu ddedfryd o garchar ohiriedig y mae hyn yn berthnasol." on the page + When I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + + #JDB-4552 + + And I see "dedfryd o garchar neu gadw yn y ddalfa am 5 mlynedd neu fwy" on the page + And I see "dedfryd o garchar ar gyfer diogelu'r cyhoedd neu gadw yn y ddalfa er mwyn diogelu'r cyhoedd" on the page + And I see "dedfryd o garchar, y ddalfa neu gadw yn y ddalfa am oes" on the page + And I see "dedfryd estynedig o dan un o adrannau 226A, 226B, 227 neu 228 Deddf Cyfiawnder Troseddol 2003, (gan gynnwys dedfryd o'r fath a osodwyd o ganlyniad i adran 219A, 220, 221A neu 222 Deddf y Lluoedd Arfog 2006) neu adran 210A Deddf Gweithdrefn Droseddol (Yr Alban) 1995" on the page + And I see "cadw hyd mynno Ei Fawrhydi neu hyd mynno'r Ysgrifennydd Gwladol" on the page + + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental Health Sectioned + + And I see "steps/qualify/mental-health-sectioned" in the URL + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I see "Cymhwysedd" on the page + + And I do not see "Cymhwyso ar gyfer gwasanaeth rheithgor" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + + #Mental Health Capacity JDB-3812 and JDB-3813 JDB-3880 JDB-4552 + + And I see "steps/qualify/mental-health-capacity" in the URL + And I see "Cymhwysedd" on the page + And I do not see "Cymhwyso ar gyfer gwasanaeth rheithgor" on the page + And I click on the "Angen help i ateb hwn?" link + And I see "Os nad oes y gallu meddyliol gan rywun, dydyn nhw ddim yn gallu:" on the page + And I see "gwneud eu penderfyniadau eu hunain" on the page + And I see "deall a chadw gwybodaeth" on the page + And I see "cyfathrebu meddyliau a phenderfyniadau i bobl eraill" on the page + And I see "Ardystiwyd rhai pobl yn feddygol o dan Ddeddf Galluedd Meddyliol 1983 nad oes ganddynt y gallu meddyliol oherwydd damwain neu anaf." on the page + And I see "Efallai bod yn rhaid penodi rhywun arall i wneud penderfyniadau ar eu rhan." on the page + And I see "Os nad oes gan rywun y gallu meddyliol, ni allant wasanaethu ar reithgor." on the page + + And I see "Ie" on the page + And I see "Na" on the page + And I set the radio button to "Ie" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" to "Reasons for capacity" + And I press the "Parhau" button + + #Confirm attendance + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + + + And I press the "Parhau" button + + #RA JDB-3815 + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran eich nam neu anabledd, yna cysylltwch â ni. Neu gallwch ofyn i rywun arall ffonio ar eich rhan." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I press the "Parhau" button + And I see "Gwiriwch eich ymatebion nawr" on the page + + #Check your answers JDB-3818 and JDB-3880 + + When I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + And I see "Bu ichi ymateb i'r dyddiad arfaethedig ar gyfer eich gwasanaeth rheithgor" on the page + Then I see text "Ie" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + And I see "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" on the page + + #change MH capacity to No JDB-3880 + + Then I click on the "Newid" link in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + And I see "Cymhwysedd" on the page + And I do not see "Cymhwyso ar gyfer gwasanaeth rheithgor" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + When I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + Then I see text "Na" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + And I see "Rwy'n deall efallai y bydd yr atebion a roddais yn cael eu gwirio a gellir fy erlyn os wyf wedi rhoi unrhyw wybodaeth y gwn ei bod yn anwir." on the page + + #submit + + # JDB-4552 + + And I see "Gallwch gael eich barnu'n euog a chael dirwy o hyd at £1000 os byddwch yn darparu gwybodaeth anwireddus i osgoi gwasanaethu ar reithgor. Mae hyn hefyd yn berthnasol os byddwch yn methu â darparu'r wybodaeth yr ydym ei hangen i benderfynu a ydych yn gymwys i wasanaethu ar reithgor ai peidio." on the page + And I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + + Then I see "O leiaf 2 wythnos cyn ichi ddechrau gwasanaethu ar reithgor, byddwn yn anfon y canlynol atoch:" on the page + Then I do not see "Yna, o leiaf pythefnos cyn i’r gwasanaeth rheithgor ddechrau byddwn yn anfon y dogfennau canlynol atoch:" on the page + Then I see "Gallwch wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eich bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML (15KB)" on the page + Then I click on the "HTML (15KB)" link + And I see "Mi wnaethoch ateb y cwestiynau cymhwysedd" on the page + + #Bureau + + Given I am on "Bureau" "bau-test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + + Then I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is null where "part_no" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |841501049 |LastNameB |CH1 2AN |e@mail.com |415181001 | + +@RegressionWelsh +Scenario Outline: Welsh 1st Party Straight Through (welsh court) + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + #Login JDB-3808 + + When I click on the "Nid oes gennyf rif rheithiwr" link + Then I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + + #JDB-3939 + + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Rhowch eich enw olaf fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + And I see "Rhowch eich cod post fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #Check Your Name + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + Then I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + + #Check Your Address JDB-3809 + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + And I do not see "Gwiriwch fod eich enw a'r cyfeiriad yn gywir" on the page + When I press the "Parhau" button + + #Phone + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener. | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + + #Email + + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + #JDB-3820 + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #DoB JDB-3810 + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + | Er enghraifft, 15 03 1982 | + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Mae angen i chi ddweud wrthym beth yw eich dyddiad geni er mwyn i ni wirio os ydych o'r oedran priodol i wasanaethu ar reithgor." on the page + And I do not see "Nodwch ddyddiad geni'r unigolyn er mwyn i ni wirioos ydynt o'r oedran priodol i wasanaethu ar reithgor." on the page + + Then I see "Ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "os oes arnoch angen cyngor am hyn." on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Eligible for jury service + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + When I press the "Parhau" button + + #Residency JDB-3909 + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link +# Then I see "Gwiriwch hyn gyda ni trwy ffonio:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page +# When I click on the "Cliciwch i fynd yn ôl" link + + And I see "Cymhwysedd" on the page + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS JDB-3873 + + And I see "Cymhwysedd" on the page + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Convictions JDB-3814 + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + + When I see "Cymhwysedd" on the page +# When I click on the "Rhagor o wybodaeth" link + + And I see "Os ydych ar fechnïaeth mewn achos troseddol, ni allwch wasanaethu ar reithgor." on the page + And I click on the "Cliciwch i fynd yn ôl" link + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Mental Health Sectioned + + When I see "Cymhwysedd" on the page + And I set the radio button to "Naddo" + And I press the "Parhau" button + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + + #Mental Health Capacity JDB-3812 and JDB-3813 JDB-3880 + + When I see "Cymhwysedd" on the page + And I click on the "Angen help i ateb hwn?" link + And I see "Ni allwch fod ar reithgor os ydi un o'r datganiadau hyn yn berthnasol i chi." on the page + + And I see "Ie" on the page + And I see "Na" on the page + And I set the radio button to "Ie" + And I set "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" to "Reasons for sectioned" + + And I press the "Parhau" button + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Confirm attendance + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + + + And I press the "Parhau" button + + #RA JDB-3815 + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran eich nam neu anabledd, yna cysylltwch â ni. Neu gallwch ofyn i rywun arall ffonio ar eich rhan." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I press the "Parhau" button + And I see "Gwiriwch eich ymatebion nawr" on the page + + #Check your answers JDB-3818 and JDB-3880 + + When I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + And I see "Bu ichi ymateb i'r dyddiad arfaethedig ar gyfer eich gwasanaeth rheithgor" on the page + Then I see text "Ie" in the same row as "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" + And I see "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" on the page + + #change MH capacity to No JDB-3880 + + Then I click on the "Newid" link in the same row as "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + When I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + Then I see text "Na" in the same row as "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" + And I see "Rwy'n deall efallai y bydd yr atebion a roddais yn cael eu gwirio a gellir fy erlyn os wyf wedi rhoi unrhyw wybodaeth y gwn ei bod yn anwir." on the page + + #submit + + And I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + + Then I see "O leiaf 2 wythnos cyn ichi ddechrau gwasanaethu ar reithgor, byddwn yn anfon y canlynol atoch:" on the page + Then I do not see "Yna, o leiaf pythefnos cyn i’r gwasanaeth rheithgor ddechrau byddwn yn anfon y dogfennau canlynol atoch:" on the page + Then I see "Gallwch wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eich bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + + #Bureau + + Given I am on "Bureau" "bau-test" + And I log in as "SYSTEM" + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + + When I click on "<part_no>" in the same row as "<part_no>" + +# When I select "Responded" from Process reply +# And I set the radio button to "Accept juror as responded" +# +# And I press the "Mark as completed" button + And I see "COMPLETED" on the page + + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_STATUS" is "CLOSED" where "JUROR_NUMBER" is "<part_no>" + Then on "JUROR_DIGITAL" . "JUROR_RESPONSE" I see "PROCESSING_COMPLETE" is "Y" where "JUROR_NUMBER" is "<part_no>" + + #JDB-3453 + + Then on "JUROR" . "POOL" I see "WELSH" is "Y" where "part_no" is "<part_no>" + +Examples: + |part_no |last_name |postcode |email | pool_no | + |645700813 |LastNameB |SA1 4PF |b@eeee.com | 457170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Underage.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Underage.feature new file mode 100644 index 00000000..3d4a3137 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_1st_Underage.feature @@ -0,0 +1,196 @@ +Feature: Regression Welsh_1st_Underage + +@RegressionWelsh @JDB-3072 @JDB-3080 @JDB-3411 @JDB-3886 @JDB-3790 +Scenario Outline: Welsh 1st Party Underage + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #JDB-3358 + + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + + #JDB-3359 and JDB-3355 + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + Then I see "Beth yw eich dyddiad geni?" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + #I want to set the year dynamically to current year - 16 + + And I set "Blwyddyn" to "2006" + And I press the "Parhau" button + Then I see "Cadarnhewch y dyddiad geni" on the page + + And I see "steps/your-details/confirm" in the URL + And I see "Bu ichi ddweud mai eich dyddiad geni oedd 27 Ebrill 2006." on the page + And I see "A yw eich dyddiad geni yn gywir?" on the page + + #check error message + + And I press the "Parhau" button + Then I see "Dywedwch wrthym os yw eich dyddiad geni yn gywir" on the page + + Then I set the radio button to "Na" + And I press the "Parhau" button + + And I see "Er enghraifft, 15 03 1982" on the page + And I set "Diwrnod" to "02" + And I set "Mis" to "02" + And I press the "Parhau" button + + Then I set the radio button to "Ie" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see text "2 Chwefror 2006" in the same row as "Dyddiad geni" + + Then I check the "wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |741500874 |LNAMEEIGHTSEVENFOUR|CH1 2AN |b@eeee.com |415181001 | + +@JDB-3417 @JDB-3454 @RegressionWelsh +Scenario Outline: Welsh 1st Underage with Error Check + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #JDB-3358 + + Then on the page I see + | text | + | Eich Manylion | + | A yw'r enw sydd gennym ar eich cyfer chi yn gywir? | + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + + #JDB-3359 and JDB-3355 + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Beth yw eich rhif ffôn?" on the page + + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + Then I see "Beth yw eich cyfeiriad e-bost?" on the page + + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Beth yw eich dyddiad geni?" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + #I want to set the year dynamically to current year - 16 + + And I set "Blwyddyn" to "2006" + And I press the "Parhau" button + Then I see "Cadarnhewch y dyddiad geni" on the page + + #JDB-3417 + + And I see "Bu ichi ddweud mai eich dyddiad geni oedd 27 Ebrill 2006." on the page + And I see "A yw eich dyddiad geni yn gywir?" on the page + + And I set the radio button to "Na" + And I press the "Parhau" button + + And I set "Diwrnod" to "" + And I set "Mis" to "" + And I set "Blwyddyn" to "" + And I press the "Parhau" button + And I see "Nodwch y diwrnod y cawsoch eich geni" on the page + And I do not see "Nodwch y mis y cawsoch eich geni" on the page + And I do not see "Nodwch y flwyddyn y cawsoch eich geni" on the page + + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "198a" + And I press the "Parhau" button + And I see "Rhowch y flwyddyn y cawsoch eich geni fel rhif 4 digid. Er enghraifft, 1982" on the page + + When I set "Diwrnod" to "02" + And I set "Mis" to "02" + And I set "Blwyddyn" to "2006" + And I press the "Parhau" button + + And I set the radio button to "Ie" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see text "2 Chwefror 2006" in the same row as "Dyddiad geni" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500837 |DOE |CH1 2AN |b@eeee.com |415170401 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Deferral.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Deferral.feature new file mode 100644 index 00000000..8bbf45e2 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Deferral.feature @@ -0,0 +1,473 @@ +Feature: Regression Welsh_3rd_Deferral + +@RegressionWelsh @replytypes @JDB-3117 @JDB-3116 @JDB-3115 @JDB-3105 @JDB-3104 @JDB-3103 @JDB-3100 @JDB-3079 @JDB-3078 @JDB-3106 +@JDB-3390 @JDB-3445 @JDB-3448 @JDB-3503 @JDB-3071 @JDB-3603 @JDB-3819 @JDB-4249 +Scenario Outline: Welsh 3rd Party Deferral + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I see "Rwy'n ymateb ar ran rhywun arall" on the page + And I see "Rwy'n ymateb dros fy hun" on the page + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #3rd Party Relationship + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Relationship" + And I press the "Parhau" button + + #3rd party Contact + + When I see "Eich manylion cyswllt" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + #Why replying + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Juror's Name + + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #Juror's DOB + + And I set "Diwrnod" to "01" + And I set "Mis" to "01" + And I set "Blwyddyn" to "1990" + And I press the "Parhau" button + + #Checking field JDB-3106 + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service JDB-3107 + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #can you attend + + Then I see "Ydi'r unigolyn yn gallu dechrau gwasanaeth rheithgor ar y dyddiad hwn?" on the page + + When I click on the "A fydd angen i'r unigolyn wasanaethu am fwy na phythefnos?" link + Then I see "Dim ond pythefnos y mae angen i'r rhan fwyaf o bobl wasanaethu ar reithgor." on the page + And I see "Efallai y bydd y llys yn gofyn iddynt wasanaethu am fwy o amser pan fyddant yn cyrraedd y llys." on the page + And I see "Os nad ydynt yn gallu gwasanaethu am fwy na phythefnos, gallant drafod hyn gyda rheolwr y rheithgor yn y llys." on the page + + When I click on the "Beth os oes problem yn nes at yr amser ac nid ydynt yn gallu gwasanaethu?" link + Then I see "Rhaid i chi neu nhw gysylltu â ni bryd hynny i roi gwybod i ni." on the page + + And I press the "Parhau" button + Then I see "Dewiswch os ydi'r unigolyn yn gallu dechrau gwasanaeth rheithgor ar y dyddiad hwn ai peidio" on the page + + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + + #JDB-3448 and JDB-3503 + + Then I see "Mae'n rhaid iddynt gael rheswm da dros newid dyddiad, er enghraifft" on the page + + #Reasons for Deferral Request + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + + And I press the "Parhau" button + Then I see "Nodwch eu rheswm dros fod angen dyddiad arall ar gyfer eu gwasanaeth rheithgor" on the page + + When I set text area with "id" of "deferralReason" to "Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here " + And I see "You have 14 characters too many" on the page + + And I press the "Parhau" button + And I see "Os gwelwch yn dda, sicrhewch fod hyd y rheswm yn llai na 1000 o nodau" on the page + + When I set text area with "id" of "deferralReason" to "Reasons for deferral request" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + #confirm dates + + When I set the radio button to "Ydw" + And I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + And on the page I see + |text| + |Gwiriwch eich ymatebion nawr| + |Bu ichi ymateb i'r dyddiad arfaethedig ar gyfer y gwasanaeth rheithgor| + |Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgo| + |Rydw i angen newid dyddiad y gwasanaeth rheithgor ar gyfer yr unigolyn rwy'n ymateb ar ei ran| + |Reasons for deferral request| + |Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor| + |Dewis cyntaf| + |Ail ddewis| + |Trydydd dewis| + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3071 + + And I see "Byddwn yn ysgrifennu at yr unigolyn rydych wedi ymateb ar ei ran yn y 7 diwrnod nesaf i roi gwybod iddynt os gallant newid dyddiad eu gwasanaeth rheithgor." on the page + And I see "Yna, o leiaf bythefnos cyn i'w gwasanaeth rheithgor ddechrau, byddwn yn anfon y canlynol atynt:" on the page + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + And I log in as "ARAMIS1" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "DEFERRAL" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |841501643 |LNAMESIXSIXZERO |CH1 2AN |a@eeee.com |415181001 | + +@RegressionSingle +Scenario Outline: Welsh 3rd Party Deferral - Bank Holiday + Given I am on the welsh version of "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I see "Rwy'n ymateb ar ran rhywun arall" on the page + And I see "Rwy'n ymateb dros fy hun" on the page + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #3rd Party Relationship + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Relationship" + And I press the "Parhau" button + + #3rd party Contact + + When I see "Eich manylion cyswllt" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + #Why replying + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Juror's Name + + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #Juror's DOB + + And I set "Diwrnod" to "01" + And I set "Mis" to "01" + And I set "Blwyddyn" to "1990" + And I press the "Parhau" button + + #Checking field JDB-3106 + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service JDB-3107 + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #can you attend + + Then I see "Ydi'r unigolyn yn gallu dechrau gwasanaeth rheithgor ar y dyddiad hwn?" on the page + + When I click on the "A fydd angen i'r unigolyn wasanaethu am fwy na phythefnos?" link + Then I see "Dim ond pythefnos y mae angen i'r rhan fwyaf o bobl wasanaethu ar reithgor." on the page + And I see "Efallai y bydd y llys yn gofyn iddynt wasanaethu am fwy o amser pan fyddant yn cyrraedd y llys." on the page + And I see "Os nad ydynt yn gallu gwasanaethu am fwy na phythefnos, gallant drafod hyn gyda rheolwr y rheithgor yn y llys." on the page + + When I click on the "Beth os oes problem yn nes at yr amser ac nid ydynt yn gallu gwasanaethu?" link + Then I see "Rhaid i chi neu nhw gysylltu â ni bryd hynny i roi gwybod i ni." on the page + + And I press the "Parhau" button + Then I see "Dewiswch os ydi'r unigolyn yn gallu dechrau gwasanaeth rheithgor ar y dyddiad hwn ai peidio" on the page + + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + + #JDB-3448 and JDB-3503 + + Then I see "Mae'n rhaid iddynt gael rheswm da dros newid dyddiad, er enghraifft" on the page + + #Reasons for Deferral Request + + And I see "steps/confirm-date/deferral-reason/tp" in the URL + + And I press the "Parhau" button + Then I see "Nodwch eu rheswm dros fod angen dyddiad arall ar gyfer eu gwasanaeth rheithgor" on the page + + When I set text area with "id" of "deferralReason" to "Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here Large amount of text here " + And I see "You have 14 characters too many" on the page + + And I press the "Parhau" button + And I see "Os gwelwch yn dda, sicrhewch fod hyd y rheswm yn llai na 1000 o nodau" on the page + + When I set text area with "id" of "deferralReason" to "Reasons for deferral request" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + #JDB-3445 Deferral Date Screen Layout + + And I see "steps/confirm-date/deferral-dates/tp" in the URL + + And I create a bank holiday "6" Mondays in the future for court/bureau "400" new schema + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + #confirm dates + + When I set the radio button to "Ydw" + And I press the "Parhau" button + + #Bank holiday + + And on the page I see + |text| + |Mae o leiaf un dydd Llun a ddewiswyd gennych yn ŵyl banc| + |Rydych chi wedi dewis o leiaf un dydd Llun sy'n ŵyl banc yn y DU.| + |Os byddwn yn dewis hwn fel eu dyddiad dechrau, bydd eu gwasanaeth rheithgor yn dechrau ar y dydd Mawrth canlynol ar y cynharaf.| + |Byddwn yn anfon cadarnhad o'r dyddiad dechrau maes o law.| + + And I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3071 + + And I see "Byddwn yn ysgrifennu at yr unigolyn rydych wedi ymateb ar ei ran yn y 7 diwrnod nesaf i roi gwybod iddynt os gallant newid dyddiad eu gwasanaeth rheithgor." on the page + And I see "Yna, o leiaf bythefnos cyn i'w gwasanaeth rheithgor ddechrau, byddwn yn anfon y canlynol atynt:" on the page + + And I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML" link + + And on the page I see + |text| + |Bu ichi ymateb i’r dyddiad arfaethedig ar gyfer y gwasanaeth rheithgor| + |Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor| + |Rydw i angen newid dyddiad y gwasanaeth rheithgor| + |Reasons for deferral request| + |Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor| + |Dewis cyntaf| + |Ail ddewis| + |Trydydd dewis| + + And I delete bank holiday new schema + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645100262 |LNAMESIXSIXZERO |SW1H 9AJ |a@eeee.com |451170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Deferral_Inelegible.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Deferral_Inelegible.feature new file mode 100644 index 00000000..76f0eca3 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Deferral_Inelegible.feature @@ -0,0 +1,219 @@ +Feature: Regression Welsh_3rd_Deferral_Inelegible + +@RegressionWelsh @replytypes @JDB-3583 @JDB-3603 +Scenario Outline: Welsh 3rd Party Deferral + Inelegible + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I see "Rwy'n ymateb ar ran rhywun arall" on the page + And I see "Rwy'n ymateb dros fy hun" on the page + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + And I do not see any links on the page that open to a new page without an alt text + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I do not see any links on the page that open to a new page without an alt text + And I press the "Parhau" button + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + And I do not see any links on the page that open to a new page without an alt text + + #3rd Party Relationship + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Relationship" + And I press the "Parhau" button + + #3rd party Contact + + When I see "Eich manylion cyswllt" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I do not see any links on the page that open to a new page without an alt text + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Why replying + + When I set the radio button to "Nid yw'r unigolyn yma" + And I do not see any links on the page that open to a new page without an alt text + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's Name + + When I see "Manylion y Rheithiwr" on the page + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I see "Manylion y Rheithiwr" on the page + And I do not see any links on the page that open to a new page without an alt text + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + And I do not see any links on the page that open to a new page without an alt text + + #Juror's DOB + + And I set "Diwrnod" to "01" + And I set "Mis" to "01" + And I set "Blwyddyn" to "1990" + And I press the "Parhau" button + + #Checking field JDB-3106 + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service JDB-3107 + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Naddo" + And I set "Rhowch fanylion" to "Not a resident" + And I press the "Parhau" button + + #CJS + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ydy" + And I set "Rhowch fanylion" to "Bailed" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ydy" + And I set text area with "id" of "convictedDetails" to "Convicted" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ie" + And I set "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" to "Sectioned" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ie" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" to "Lacks capacity" + And I press the "Parhau" button + + #can you attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + + #JDB-3448 and JDB-3503 + + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + #Reasons for Deferral Request + + When I set text area with "id" of "deferralReason" to "Reasons for deferral request" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + #confirm dates + + When I set the radio button to "Ydw" + When I press the "Parhau" button + + #Special Reqs + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3583 + + And I see "Byddwn nawr yn gwirio'ch atebion. Mae eich atebion yn golygu efallai na all yr unigolyn rydych wedi ymateb ar ei ran wasanaethu ar reithgor." on the page + + #JDB-3071 (I think this is superseded + #And I see "Byddwn yn ysgrifennu at yr unigolyn rydych wedi ymateb ar ei ran yn y 7 diwrnod nesaf i roi gwybod iddynt os gallant newid dyddiad eu gwasanaeth rheithgor." on the page + #And I see "Yna, o leiaf pythefnos cyn i’r gwasanaeth rheithgor ddechrau byddwn yn anfon y dogfennau canlynol atynt:" on the page + + Given I am on "Bureau" "bau-test" + And I log in + + When I click on the "Search" link + And I set "Juror number" to "<part_no>" + And I press the "Search" button + Then I see "<part_no>" on the page + + And I click link with ID "selectAllLink" + And I press the "Send to..." button + And I set input field with "id" of "sendToOfficer" to "ARAMIS1" + And I press the "Send" button + And I press the "Send" button + Then I see "Your work" on the page + + Then I click on the "Sign out" link + And I log in as "ARAMIS1" + Then I see "<part_no>" on the page + Then I see "<part_no>" has reply type indicator "INELIGIBLE" +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500151 |DOE |SW1H 9AJ |a@eeee.com |415170401 | diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_ErrorChecks.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_ErrorChecks.feature new file mode 100644 index 00000000..66f20730 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_ErrorChecks.feature @@ -0,0 +1,460 @@ +Feature: Regression Welsh_3rd_ErrorChecks + +@RegressionWelsh @JDB-3348 @JDB-3525 @JDB-3526 @JDB-3502 @JDB-3524 @JDB-3564 @JDB-3589 @JDB-3588 @JDB-3668 @JDB-3669 @JDB-3670 @JDB-3671 +@JDB-3672 @JDB-3711 @JDB-3715 @JDB-3825 @JDB-3881 +Scenario Outline: Welsh_3rd_ErrorChecks + Given I am on the welsh version of "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch a ydych yn ymateb dros eich hun neu ar ran rhywun arall" on the page + When I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I press the "Parhau" button + Then I see "Nodwch eu rhif rheithiwr 9 digid - gallwch ddod o hyd iddo ar eu llythyr gwŷs rheithgor" on the page + And I see "Rhaid i chi nodi eu henw olaf yn union fel y mae'n ymddangos ar eu llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir" on the page + And I see "Rhaid i chi nodi eu cod post yn union fel y mae'n ymddangos ar eu llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir" on the page + + Then I click on the "Problemau wrth nodi eu manylion?" link + And I see "Os ydych wedi gwirio eu manylion a’ch bod dal methu parhau, gallwch gysylltu â ni." on the page + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "Dydd Llun i Ddydd Iau 9am – 5pm" on the page + And I see "Dydd Gwener 9am – 3pm" on the page + And I see "Canfod mwy am gostau galwadau" on the page + + #Juror Log In (Find out how to trigger all messages) + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #Third Party Name + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch eich enw cyntaf" on the page + And I see "Nodwch eich cyfenw" on the page + When I set "Enw cyntaf" to "FirstName" + And I set "Cyfenw" to "LastName" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Third Party Relationship + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch sut ydych chi'n adnabod yr unigolyn sydd wedi cael gwŷs i wasanaethu ar reithgor" on the page + When I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch sut yr hoffech i ni gysylltu â chi" on the page + + When I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I check the "Trwy e-bost" checkbox + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch eich prif rif ffôn" on the page + And I see "Nodwch eich cyfeiriad e-bost" on the page + And I see "Nodwch eich cyfeiriad e-bost a gwiriwch ei fod yr un fath â'r un rydych eisoes wedi'i roi" on the page + + When I set "Prif rif ffôn" to "02078211818" + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "Mismatched@outlook.com" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch eich cyfeiriad e-bost a gwiriwch ei fod yr un fath â'r un rydych eisoes wedi'i roi" on the page + + When I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + #Why Replying + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dywedwch wrthym pam ydych chi'n ymateb ar ran yr unigolyn a enwir ar y wŷs rheithgor" on the page + + When I set the radio button to "Arall" + And I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Rhowch fanylion" on the page + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check Juror Name + #JDB-4281 + #JDB-4125 + + When I set the radio button to "Na" + And I press the "Parhau" button + And I set "Enw cyntaf" to "" + And I set "Cyfenw" to "" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch enw cyntaf yr unigolyn" on the page + And I see "Nodwch gyfenw'r unigolyn" on the page + + When I set "Enw cyntaf" to "JurorFirstName" + And I set "Cyfenw" to "JurorLastName" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + And I click on the "A fydd ei gyfeiriad yn newid yn fuan?" link + And I see "Os bydd ei gyfeiriad yn newid yn fuan, nodwch ei gyfeiriad presennol, er mwyn i ni allu cysylltu ag ef." on the page + And I see "Os ydyw yn symud o'r ardal lle mae'n byw ar hyn o bryd, mae'n bosibl y byddwn yn newid lleoliad ei wasanaeth rheithgor." on the page + + #Check address JDB-3526 + + When I set the radio button to "Na" + And I press the "Parhau" button + And I set "Cod post" to "" + And I set "Tref neu ddinas" to "" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch y dref neu'r ddinas" on the page + And I see "Nodwch y cod post" on the page + + #Checking Invalids check with Jorge + + And I set input field with "id" of "addressTown" to "|||" +# And I set "Tref neu ddinas" to "|||" + + And I set input field with "id" of "addressCounty" to "|||" +# And I set "Sir (dewisol)" to "|||" + + And I set input field with "id" of "addressPostcode" to "|||" +# And I set "Cod post" to "|||" + + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Gwiriwch y dref neu'r ddinas" on the page + And I see "Gwiriwch y sir" on the page + And I see "Gwiriwch y cod post" on the page + And I set "Tref neu ddinas" to "London" + And I set "Sir (dewisol)" to "" + And I set "Cod post" to "CH1 2AN" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #Juror DoB + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch y diwrnod gafodd yr unigolyn ei eni" on the page + + And I set input field with "id" of "dobDay" to "27" +# When I set "Diwrnod" to "27" + + And I set input field with "id" of "dobMonth" to "04" +# And I set "Mis" to "04" + + And I set input field with "id" of "dobYear" to "198a" +# And I set "Blwyddyn" to "198a" + + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch y flwyddyn y ganwyd yr unigolyn fel rhif 4 digid. Er enghraifft, 1982" on the page + + And I set input field with "id" of "dobDay" to "27" +# When I set "Diwrnod" to "27" + + And I set input field with "id" of "dobMonth" to "04" +# And I set "Mis" to "04" + + And I set input field with "id" of "dobYear" to "1981" +# And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the Juror + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch rif ffôn cyswllt i ni ei ddefnyddio i gysylltu â chi neu'r rheithiwr" on the page + And I see "Dewiswch gyfeiriad e-bost i ni ei ddefnyddio i gysylltu â chi neu’r rheithiwr" on the page + + When I set the radio button to "Rhoi rhif ffôn gwahanol ar gyfer y rheithiwr" + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Nodwch y prif rif ffôn" on the page + And I see "Nodwch gyfeiriad e-bost cyswllt" on the page + + When I set "Prif rif ffôn" to "|||" + And I set "Rhif ffôn arall (dewisol)" to "|||" + And I set "Nodwch y cyfeiriad e-bost" to "|||" + And I set "Nodwch y cyfeiriad e-bost unwaith eto" to "|||" + And I press the "Parhau" button + Then I see "Gwiriwch y prif rif ffôn" on the page + And I see "Gwiriwch y rhif ffôn arall" on the page + And I see "Gwiriwch y cyfeiriad e-bost" on the page + + When I set "Prif rif ffôn" to "02078211818" + And I set "Nodwch y cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch y cyfeiriad e-bost unwaith eto" to "mismatch@outlook.com" + And I press the "Parhau" button + Then I see "Gwiriwch y rhif ffôn arall" on the page + Then I see "Nodwch gyfeiriad e-bost a gwiriwch eich fod yr un fath â beth sydd yn y blwch cyntaf" on the page + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Eligibility + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + When I press the "Parhau" button + + #Residency Yes + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch ydy os yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf, ers iddynt droi'n 13 oed" on the page + When I set the radio button to "Naddo" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch fanylion am ble mae'r unigolyn rydych yn ymateb ar ei ran wedi byw ers ei ben-blwydd/ei phen-blwydd yn 13 mlwydd oed" on the page + + When I set the radio button to "Do" + And I press the "Parhau" button + + #CJS no + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch a yw'r unigolyn rydych yn ateb ar ei ran wedi gweithio yn y system cyfiawnder drosoeddol yn ystod y 5 mlynedd diwethaf" on the page + + When I set the radio button to "Ydy" + And I press the "Parhau" button + + #JDB-3525 AND JDB-3881 test, should NOT allow to progress straight to RA + + Then I see "Ticiwch unrhyw sefydliadau mae'r unigolyn wedi gweithio iddynt yn uniongyrchol (nid fel trydydd parti neu is-gontractwr)" on the page + + When I check the "Yr heddlu" checkbox + And I check the "Gwasanaeth Carchardai EM" checkbox + And I check the "Arall" checkbox + And I press the "Parhau" button + Then I see "Rhowch fanylion am ble a phryd roedd yr unigolyn yn gweithio i'r Heddlu" on the page + Then I see "Rhowch fanylion am pryd a lle maent wedi gweithio mewn rhan arall o'r system cyfiawnder troseddol" on the page + And I see "Rhowch fanylion am pryd a lle maent wedi gweithio mewn rhan arall o'r system cyfiawnder troseddol" on the page + + And I uncheck the "Arall" checkbox + And I uncheck the "Yr heddlu" checkbox + And I uncheck the "Gwasanaeth Carchardai EM" checkbox + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail no + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch 'Ydy' os yw'r unigolyn ar fechnïaeth am gyflawni trosedd" on the page + + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Mae problem" on the page + Then I see "Rhowch fanylion am fechnïaeth a throsedd yr unigolyn" on the page + + When I set the radio button to "Nac yd" + And I press the "Parhau" button + + #Convictions no + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch 'Ydy' os yw'r unigolyn wedi'i gael yn euog o gyflawni trosedd" on the page + + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch fanylion am drosedd yr unigolyn" on the page + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental health part 1 no + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch 'ie' os yw'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl" on the page + + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd Meddwl" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + + #Mental health part 2 no + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch ie os penderfynwyd nad oes gan y person yr ydych yn eiriol drosto y 'gallu meddyliol'" on the page + + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see error "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" + + When I set the radio button to "Na" + And I press the "Parhau" button + + #I can attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau ar" + And I press the "Parhau" button + + #RA no + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Dewiswch 'Oes' os bydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys" on the page + + When I set the radio button to "Oes" + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Dewiswch os oes ganddynt symudedd cyfyngedig, nam ar y clyw, clefyd siwgr, nam difrifol ar eu golwg neu anabledd neu nam o fath arall" on the page + + When I check the "Arall" checkbox + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch fanylion os gwelwch yn dda" on the page + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers + + When I press the "Cyflwyno" button + Then I see "Mae problem" on the page + Then I see "Cadarnhewch fod eich gwybodaeth yn gywir cyn ichi anfon eich ymateb" on the page + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + #Deferral Reason + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Nodwch eu rheswm dros fod angen dyddiad arall ar gyfer eu gwasanaeth rheithgor" on the page + + When I set text area with "id" of "deferralReason" to "Defer them please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + #Deferral Dates JDB-3524 + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch y dydd Llun cyntaf y byddai'n well ganddynt ddechrau gwasanaeth rheithgor" on the page + And I see "Rhowch yr ail ddydd Llun y byddai'n well ganddynt ddechrau gwasanaeth rheithgor" on the page + And I see "Rhowch y trydydd dydd Llun y byddai'n well ganddynt ddechrau gwasanaeth rheithgor" on the page + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "10" weeks in the future + When I set the "Third" single date field to a Monday "10" weeks in the future + And I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch ddyddiad sy'n wahanol i'r dewisiadau eraill" on the page + + When I set the "First" single date field to a Monday "100" weeks in the future + When I set the "Second" single date field to a Monday "101" weeks in the future + When I set the "Third" single date field to a Monday "102" weeks in the future + And I press the "Parhau" button + Then I see "Mae problem" on the page + + And I see "Rhaid i'w dewis cyntaf fod yn ddydd Llun rhwng" on the page + And I see "Rhaid i'w hail ddewis fod yn ddydd Llun rhwng" on the page + And I see "Rhaid i'w trydydd dewis fod yn ddydd Llun rhwng" on the page + + When I set the "First" single date field to a Monday "12" weeks in the future + When I set the "Second" single date field to a Monday "13" weeks in the future + When I set the "Third" single date field to a Monday "14" weeks in the future + And I press the "Parhau" button + + And on the page I see + |text| + |Gwirio dyddiadau| + |Dyddiadau y gallant ddechrau gwasanaeth rheithgor| + |Nid oes angen i chi ddweud wrthym yr holl ddyddiadau eraill y maent ar gael.| + |Byddwn yn dewis un o'r 3 dyddiad hyn.| + |Ydych chi am fwrw ymlaen â'r dyddiadau hyn?| + + When I set the radio button to "Ydw" + And I press the "Parhau" button + + #Check Your Answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen iddo gael ei esgusodi rhag gwasanaethu ar reithgor?" on the page + + #Excusal Reason + + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I see "Rhowch y rheswm pam na all wasanaethu ar reithgor yn ystod y 12 mis nesaf" on the page + + When I set text area with "id" of "excusalReason" to "Excuse them please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #When I press the "Submit" button + + When I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + Then I see "Rydym wedi anfon e-bost i ddweud eich bod wedi ymateb i'r wŷs hon." on the page + +Examples: + |part_no |last_name |postcode |pool_no | + |641500795 |DOE |SW1H 9AJ |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Excusal.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Excusal.feature new file mode 100644 index 00000000..df912236 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Excusal.feature @@ -0,0 +1,192 @@ +Feature: Regression Welsh_3rd_Excusal + +@RegressionWelsh @JDB-3044 @JDB-3609 @JDB-3612 @JDB-3653 @JDB-3826 @JDB-3869 +Scenario Outline: Welsh 3rd Party Excusal + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #JDB-3869 test + + Then I see "Ei fanylion rheithiwr" on the page + And I see "Gallwch ddod o hyd i'r rhif rheithiwr ar y llythyr gwŷs rheithgor." on the page + And I see "Rhowch enw olaf yr unigolyn fel y mae wedi'i nodi ar eu llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + And I see "Rhowch eu cod post fel y mae wedi'i nodi ar eu llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #3rd Party Name + + Then I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to Juror + + When I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + When I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + #Why are you replying + + And I see "Nid yw'r unigolyn yn gallu ymateb dros ei hun" on the page + And I see "Nid yw'r unigolyn â'r gallu i ymateb drosto'i hun. Efallai bod hyn oherwydd bod ganddo anabledd neu nam." on the page + + And I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check Juror's Name JDB-3826 + + And I set the radio button to "Na" + And I press the "Parhau" button + When I click on the "Beth fydd yn digwydd os ydyw wedi newid ei enw?" link + And I see "Os yw ei enw wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check Juror's Address + + And I set the radio button to "Na" + And I press the "Parhau" button + When I click on the "Beth fydd yn digwydd os ydyw wedi newid ei gyfeiriad?" link + And I see "Os yw ei gyfeiriad wedi newid, efallai y byddwn yn gallu symud ei wasanaeth rheithgor i Lys yn nes at ei gyfeiriad newydd." on the page + And I see "Byddwn yn cysylltu ag ef yn ddiweddarach ynglŷn â hyn. Parhewch i ddefnyddio'r ffurflen ar-lein ar hyn o bryd." on the page + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB + + When I click on the "Cymorth gyda'ch dyddiad geni" link + And I see "Nodwch ddyddiad geni'r unigolyn er mwyn i ni wirio os ydynt o'r oedran priodol i wasanaethu ar reithgor." on the page + And I see "Os nad yw'r unigolyn yn gwybod ei union ddyddiad geni, defnyddiwch yr un maent yn ei nodi ar ddogfennau swyddogol megis pasbort neu drwydded yrru." on the page + And I see "Os na allwch roi dyddiad geni ar gyfer yr unigolyn, efallai y bydd yn rhaid ichi anfon copïau o ddogfennau adnabod drwy'r post. Bydd yn rhaid i chi ymateb i'r wŷs gan ddefnyddio'r ffurflen a anfonwyd drwy'r post yn hytrach nag ar-lein. Os oes arnoch angen cymorth, ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + + #I want to set the year dynamically to current year - 40 + + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + + When I press the "Parhau" button + And I set the radio button to "Do" + And I press the "Parhau" button + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set the radio button to "Na" + And I press the "Parhau" button + And I set the radio button to "Na" + And I press the "Parhau" button + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + #Can you attend, select excusal + + And I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + + #Reason for excusal JDB-3653 + + And I see "steps/confirm-date/excusal/tp" in the URL + Then I see "Pam fod angen iddo gael ei esgusodi rhag gwasanaethu ar reithgor?" on the page + And I see "Eglurwch pam na all wasanaethu ar reithgor yn ystod y 12 mis nesaf." on the page + And I see "Nid oes angen ichi atodi na chasglu tystiolaeth cyn dyddiad terfyn yr wŷs." on the page + And I see "Byddwn yn cysylltu yn nes ymlaen os bydd angen hynny." on the page + + And I click on the "A fydd angen inni ddarparu tystiolaeth yn fuan?" link + And I see "Os bydd angen tystiolaeth arnom, byddwn yn cysylltu â chi eto i ddweud wrthych." on the page + And I see "Er enghraifft, os yw'n rhy wael i wasanaethu ar reithgor, efallai y byddwn yn gofyn am lythyr doctor." on the page + And I see "Bydd yn cael amser i gasglu unrhyw dystiolaeth felly peidiwch â phoeni am geisio ei chasglu ar hyn o bryd." on the page + And I see "Arhoswch nes byddwn wedi dweud wrthych pa dystiolaeth yr ydym ei hangen, os o gwbl." on the page + + And I press the "Parhau" button + Then I see "Rhowch y rheswm pam na all wasanaethu ar reithgor yn ystod y 12 mis nesaf" on the page + + When I set text area with "id" of "excusalReason" to "Excusal reason" + And I press the "Parhau" button + + #RA + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check Your Answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + And I see "Pam fod angen iddo gael ei esgusodi rhag gwasanaethu ar reithgor?" on the page + + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + + #JDB-3612 + + And I see "Beth fydd yn digwydd nesaf" on the page + And I see "Byddwn yn ysgrifennu at yr unigolyn rydych wedi ymateb ar ei ran yn y 7 diwrnod nesaf i roi gwybod iddynt os oes rhaid iddynt wasanaethu ar reithgor neu os gallant gael eu hesgusodi." on the page + And I see "Os oes rhaid iddynt wasanaethu ar reithgor, byddwn yn anfon y canlynol atynt o leiaf bythefnos cyn iddo ddechrau:" on the page + And I see "llythyr yn cadarnhau dyddiad y gwasanaeth rheithgor" on the page + And I see "pecyn gwybodaeth am fod yn rheithiwr a'r llys byddant yn mynd iddo" on the page + + #JDB-3609 + + And I see "Gallwch chi, neu'r unigolyn rydych wedi ymateb ar ei ran, wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eu bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + And I see "Rhagor o wybodaeth am wasanaethu ar reithgor. Gallwch darllenwch y rheolau ynghylch trafod y treial a chanfod sut i hawlio am gostau." on the page + And I see "Chyfrifo pa dreuliau a lwfansau y gallwch eu hawlio." on the page + And I do not see "Eich Canllaw i'r Gwasanaeth Rheithgor (PDF 85KB)" on the page + And I see "Beth yw eich barn am y gwasanaeth hwn? (30 eiliad o'ch amser)" on the page + + Then I click on the "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML (15KB)" link + And I see "Pam fod angen iddo gael ei esgusodi rhag gwasanaethu ar reithgor?" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500336 |LNAMESIXSIXZERO|CH1 2AN |a@eeee.com |415170601 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_ProblemCheck.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_ProblemCheck.feature new file mode 100644 index 00000000..c1bad274 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_ProblemCheck.feature @@ -0,0 +1,223 @@ +Feature: Regression Welsh_3rd_ProblemCheck + +@RegressionWelsh @JDB-3460 @JDB-3516 +Scenario Outline: Welsh_3rd_ProblemCheck + + Given I am on the welsh version of "Public" "bau-test" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I do not see any links on the page that open to a new page without an alt text + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Ei fanylion rheithiwr" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Rhif rheithiwr" to "<part_no>" + And I set "Cyfenw" to "<last_name>" + And I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Enw cyntaf" to "FirstName" + And I do not see any links on the page that open to a new page without an alt text + And I set "Cyfenw" to "LastName" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I do not see any links on the page that open to a new page without an alt text + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set "Enw cyntaf" to "" + And I set "Cyfenw" to "" + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Enw cyntaf" to "JurorFirstName" + And I set "Cyfenw" to "JurorLastName" + And I do not see any links on the page that open to a new page without an alt text + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + And I set "Cod post" to "" + And I do not see any links on the page that open to a new page without an alt text + When I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Mae problem" on the page + When I set "Cod post" to "<postcode>" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I do not see any links on the page that open to a new page without an alt text + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + And I do not see any links on the page that open to a new page without an alt text + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I do not see any links on the page that open to a new page without an alt text + And I press the "Parhau" button + + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I do not see any links on the page that open to a new page without an alt text + When I set the radio button to "Do" + And I press the "Parhau" button + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Mae problem" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + And I do not see any links on the page that open to a new page without an alt text + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I do not see any links on the page that open to a new page without an alt text + When I set the radio button to "Na" + And I press the "Parhau" button + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + And I do not see any links on the page that open to a new page without an alt text + When I set the radio button to "Na" + And I press the "Parhau" button + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + And I do not see any links on the page that open to a new page without an alt text + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I press the "Parhau" button + Then I see "Mae problem" on the page + When I set the radio button to "Nac oes" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + When I press the "Cyflwyno" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Mae problem" on the page + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + When I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Mae problem" on the page + When I set text area with "id" of "deferralReason" to "Deferral reason please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + When I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Mae problem" on the page + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + #confirm + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Eglurwch pam na all wasanaethu ar reithgor yn ystod y 12 mis nesaf." on the page + Then I see "Nid oes angen ichi atodi na chasglu tystiolaeth cyn dyddiad terfyn yr wŷs." on the page + Then I see "Byddwn yn cysylltu yn nes ymlaen os bydd angen hynny." on the page + + When I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + Then I see "Mae problem" on the page + And I see "Rhowch y rheswm pam na all wasanaethu ar reithgor yn ystod y 12 mis nesaf" on the page + When I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + And I do not see any links on the page that open to a new page without an alt text + Then I check the "wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + And I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500863 |LNAMEEIGHTSIXTHREE |CH1 2AN |a@eeee.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_SkipMainContent.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_SkipMainContent.feature new file mode 100644 index 00000000..74817088 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_SkipMainContent.feature @@ -0,0 +1,252 @@ +Feature: Welsh_3rd_SkipMainContent + +@RegressionWelsh @JDB-3609 @JDB-3357 @JDB-3590 +Scenario Outline: Welsh 3rd Party Straight Through with Skip to Main Content Checks + + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "FNAME" as "FNAMESEVENONETHREE" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + #And "<part_no>" has "FNAME" as "FNAMEEIGHTFIVEFIVE" + And "<part_no>" has "Address" as "855 STREET NAME" + #And "<part_no>" has "Address2" as "ANYTOWN" + #And "<part_no>" has "Address3" as "" + And "<part_no>" has "Address4" as "LONDON" + And "<part_no>" has "ZIP" as "<postcode>" + + #JDB-3357 Skip to main content check + #Reply to jury summons + + When I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + When I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ymateb i wŷs rheithgor" on the page + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Beth yw eich enw?" on the page + + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Eich perthynas â'r unigolyn" on the page + + When I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Eich manylion cyswllt" on the page + + When I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I check the "Trwy e-bost" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + And I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + And I set the radio button to "Ydy" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ei gyfeiriad ef yw hwn?" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + When I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + When I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + + When I set the radio button to "Do" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + + When I set the radio button to "Nac oes" + And I press the "Parhau" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Gwiriwch eich ymatebion nawr" on the page + + Then I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + + When I press the "Cyflwyno" button + + #JDB-3357 Skip to main content check + + Then I hit the tab key + Then I see "Ymlaen i'r prif gynnwys" on the page + Then I click on the "Ymlaen i'r prif gynnwys" link + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + + #JDB-3609 + + Then I see "Gallwch chi, neu'r unigolyn rydych wedi ymateb ar ei ran, wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eu bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + + +Examples: + | part_no |pool_no |last_name |postcode | email | + |641500790 |415170401 |DOE |SW1H 9AJ |e@eeee.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_StraightThrough.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_StraightThrough.feature new file mode 100644 index 00000000..ca85d715 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_StraightThrough.feature @@ -0,0 +1,242 @@ +Feature: Regression Welsh_3rd_StraightThrough + +@RegressionWelsh +Scenario Outline: Welsh 3rd Party Straight Through + Given I am on the welsh version of "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #Juror Log In JDB-3808 and JDB-3940 + + And I see "steps/login/tp" in the URL + When I click on the "Nid oes gennyf rif rheithiwr ar gyfer yr unigolyn" link + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + And I see "branches/third-party-details/name" in the URL + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + And I see "branches/third-party-details/relationship" in the URL + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + And I see "branches/third-party-details/contact" in the URL + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I click on the "Os ydych yn byw dramor" link + And I see "Os ydych yn byw dramor ar hyn o bryd a heb rif ffôn y DU, byddwn angen cysylltu â chi drwy ddefnyddio cyfeiriad e-bost." on the page + And I press the "Parhau" button + + #Why are you replying title + + And I see "branches/third-party-reason" in the URL + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + When I set the radio button to "Nid yw'r unigolyn yma" + And I see "Efallai ei fod yn teithio, yn yr ysbyty, neu i ffwrdd am fwy nag ychydig ddyddiau am reswm arall." on the page + And I see "Nid yw'r unigolyn yn gallu ymateb dros ei hun" on the page + And I see "Nid yw'r unigolyn â'r gallu i ymateb drosto'i hun. Efallai bod hyn oherwydd bod ganddo anabledd neu nam." on the page + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + And I see "branches/third-party-personal-details/name" in the URL + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ydy" + When I press the "Parhau" button + + #Check juror address + + And I see "branches/third-party-personal-details/address" in the URL + And I set the radio button to "Ie" + When I press the "Parhau" button + + #DoB JDB-3810 + + And I see "branches/third-party-personal-details/date-of-birth" in the URL + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Os oes arnoch angen cymorth, ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I see "Manylion y Rheithiwr" on the page + And I see "Er enghraifft, 15 03 1982" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + And I see "branches/third-party-contact-details" in the URL + When I see "Manylion y Rheithiwr" on the page + And I see "Nodwch rifau ffôn y gallwn eu defnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field JDB-3824 + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service + + And I see "steps/qualify/tp" in the URL + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency JDB-3811 and JDB-3910 + + And I see "steps/qualify/residency/tp" in the URL + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link + Then I see "Rhaid i chi gysylltu â ni i gael cyngor ar eu sefyllfa benodol." on the page + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + When I click on the "Cliciwch i fynd yn ôl" link + + And I press the "Parhau" button + + When I set the radio button to "Do" + And I press the "Parhau" button + + #CJS no JDB-3822 + + And I see "steps/qualify/cjs-employed/tp" in the URL + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Ydy" + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + And I see "steps/qualify/bail/tp" in the URL + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + + #Convictions + + And I see "steps/qualify/convictions/tp" in the URL + When I see "Cymhwysedd" on the page + And I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + + # JDB-4552 + + And I see "dedfryd o garchar neu gadw yn y ddalfa am 5 mlynedd neu fwy" on the page + And I see "dedfryd o garchar ar gyfer diogelu'r cyhoedd neu gadw yn y ddalfa er mwyn diogelu'r cyhoedd" on the page + And I see "dedfryd o garchar, y ddalfa neu gadw yn y ddalfa am oes" on the page + And I see "dedfryd estynedig o dan un o adrannau 226A, 226B, 227 neu 228 Deddf Cyfiawnder Troseddol 2003, (gan gynnwys dedfryd o'r fath a osodwyd o" on the page + And I see "cadw hyd mynno Ei Fawrhydi neu hyd mynno'r Ysgrifennydd Gwladol" on the page + And I see "Ni allant ychwaith wasanaethu ar reithgor os ydynt wedi cael un o'r dedfrydau troseddol hyn yn ystod y 10 mlynedd diwethaf:" on the page + And I see "gwnaethant wasanaethu unrhyw ran o ddedfryd o garchar neu gadw yn y ddalfa" on the page + And I see "cawsant ddedfryd o garchar ohiriedig neu orchymyn atal dros dro ar gyfer cadw yn y ddalfa" on the page + And I see "Ni allant ychwaith wasanaethu ar reithgor os ydynt, yn ystod y 10 mlynedd diwethaf yng Nghymru a Lloegr, wedi cael gorchymyn cymunedol, gan gynnwys unrhyw un o'r canlynol:" on the page + Then I see "gorchymyn adsefydlu cymunedol" on the page + Then I see "gorchymyn cosb gymunedol" on the page + Then I see "gorchymyn cosb ac adsefydlu cymunedol" on the page + Then I see "gorchymyn trin a phrofi am gyffuriau" on the page + Then I see "gorchymyn ymatal rhag cymryd cyffuriau" on the page + Then I see "Ni allant ychwaith wasanaethu ar reithgor os ydynt, yn ystod y 10 mlynedd diwethaf, wedi cael:" on the page + +# And I click on the "Cliciwch i fynd yn ôl" link +# Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page +# And I see "Os yw'r unigolyn yr ydych yn ateb ar ei ran ar fechnïaeth mewn achos troseddol, ni all wasanaethu ar reithgor." on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + And I see "steps/qualify/mental-health-sectioned/tp" in the URL + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + + #Mental Health Capacity JDB-3813 + + And I see "steps/qualify/mental-health-capacity/tp" in the URL + When I see "Cymhwysedd" on the page + + And I set the radio button to "Na" + And I press the "Parhau" button + + #The person can attend + + And I see "steps/confirm-date/tp" in the URL + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + + And I press the "Parhau" button + + #RA no JDB-3815 + + And I see "steps/assistance/tp" in the URL + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran nam neu anabledd sydd gan yr unigolyn rydych yn ymateb ar ei ran, yna cysylltwch â ni." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check your answers + + And I see "steps/confirm-information/tp" in the URL + And I see "Mi wnaethoch ateb y cwestiynau cymhwysedd ar gyfer yr unigolyn yr ydych yn ymateb ar ei ran" on the page + When I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + And I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + And I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + And I see "Rwy'n deall efallai y bydd yr atebion a roddais yn cael eu gwirio a gellir fy erlyn os wyf wedi rhoi unrhyw wybodaeth y gwn ei bod yn anwir yn fwriadol." on the page + And I see "Efallai y cewch eich euogfarnu ac y cewch ddirwy o hyd at £1000 os byddwch yn rhoi gwybodaeth ffug ar gyfer yr unigolyn a gafodd wŷs i osgoi gwasanaethu ar reithgor. Mae hyn hefyd yn berthnasol os byddwch yn methu â rhoi'r wybodaeth sydd ei hangen arnom i benderfynu a yw'r unigolyn sydd wedi cael gwŷs yn gymwys i wasanaethu ar reithgor." on the page + And I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + + And I see "steps/confirmation/tp" in the URL + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + And I see "Lawrlwythwch gopi o'ch ymateb i'r wŷs HTML (15KB)" on the page + Then I click on the "HTML (15KB)" link + And I see "Mi wnaethoch ateb y cwestiynau cymhwysedd" on the page + +Examples: + |part_no |last_name |postcode |pool_no | + |641500260 |LNAMETWOSIXZERO |CH1 2AN |415170402 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_StraightThrough_EmailCheck.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_StraightThrough_EmailCheck.feature new file mode 100644 index 00000000..660ba382 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_StraightThrough_EmailCheck.feature @@ -0,0 +1,55 @@ +Feature: Welsh_3rd_ST_EmailCheck + +@RegressionWelsh @JDB-3487 +Scenario Outline: Check that email fields for 3rd party Welsh are correct + Given I am on the welsh version of "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #Juror Log In + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name JDB-3380 and JDB-3365 + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror JDB-3368 and JDB-3366 + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact JDB-3379 and JDB-3367 + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + + And I do not see "bostt" on the page + And I press the "Parhau" button + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500280 |LNAMETWOEIGHTZERO |CH1 2AN |a@eeee.com |415170601 | diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Underage.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Underage.feature new file mode 100644 index 00000000..6c854418 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_3rd_Underage.feature @@ -0,0 +1,98 @@ +Feature: Regression Welsh_3rd_Underage + +@RegressionWelsh @JDB-3072 @JDB-3466 @JDB-3887 @JDB-3790 +Scenario Outline: Welsh 3rd Party Underage + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then I see "Eich Manylion" on the page + + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + + And I set "Sut ydych chi" to "Friend" + And I press the "Parhau" button + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e" checkbox + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + And I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check Juror Name + + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check Juror Address + + And I set the radio button to "Ie" + When I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "2006" + And I press the "Parhau" button + Then I see "Cadarnhewch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #JDB-3466 + + And I see "steps/your-details/confirm/tp" in the URL + And I see "Bu ichi ddweud mai dyddiad geni'r unigolyn oedd 27 Ebrill 2006" on the page + And I see "A yw'r dyddiad geni yn gywir?" on the page + + And I press the "Parhau" button + Then I see "Dywedwch wrthym os yw ei ddyddiad geni yn gywir" on the page + + And I set the radio button to "Na" + And I press the "Parhau" button + + And I see "Er enghraifft, 15 03 1982" on the page + And I set "Diwrnod" to "02" + And I set "Mis" to "02" + And I press the "Parhau" button + + Then I set the radio button to "Ie" + And I press the "Parhau" button + + And I see text "2 Chwefror 2006" in the same row as "Dyddiad geni" + + Then I see "Gwiriwch eich ymatebion nawr" on the page + Then I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau" on the page + Then I see "<part_no>" on the page + +Examples: + |part_no |last_name |postcode |email | pool_no | + |641500868 |LNAMEEIGHTSIXEIGHT |CH1 2AN |b@eeee.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_4533.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_4533.feature new file mode 100644 index 00000000..d9f9cec8 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_4533.feature @@ -0,0 +1,590 @@ +Feature: Regression Welsh Cookie Policy + +@RegressionWelsh @JDB-4533 +Scenario Outline: Welsh Cookie Policy + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + #Cookies Policy + + And I click on the "Cwcis" link + + #Opens new tab + + And on the page I see + |text| + |Cwcis| + |Ffeiliau a gedwir ar eich ffôn, eich tabled neu'ch cyfrifiadur pan fyddwch chi'n ymweld â gwefan yw cwcis.| + |Rydym yn defnyddio cwcis i storio gwybodaeth am sut rydych yn defnyddio gwefan GOV.UK, megis y tudalennau yr ydych yn ymweld â hwy.| + |Gosodiadau cwcis| + |Rydym yn defnyddio 2 fath o gwcis. Gallwch ddewis pa gwcis yr ydych yn hapus inni eu defnyddio.| + |Cwcis sy'n mesur y defnydd a wneir o wefan| + |Rydym yn defnyddio Google Analytics i fesur sut rydych yn defnyddio'r wefan fel y gallwn ei gwella yn seiliedig ar anghenion defnyddwyr. Nid ydym yn caniatáu i Google ddefnyddio neu rannu'r data am sut rydych yn defnyddio'r wefan hon.| + |Mae Google Analytics yn gosod cwcis sy'n storio gwybodaeth gyffredinol am:| + |sut y daethoch i'r wefan hon| + |y tudalennau rydych chi'n ymweld â nhw ar GOV.UK a gwasanaethau digidol y Llywodraeth, a pha mor hir rydych chi'n ei dreulio ar bob tudalen| + |beth rydych chi'n clicio arno tra byddwch yn ymweld â'r wefan| + |Cwcis hanfodol yn unig| + |Mae'r cwcis hanfodol hyn yn gwneud pethau fel cofio lle'r oeddech wedi cyrraedd wrth lenwi ffurflen (er enghraifft cais am drwydded)| + |Mae'r cwcis hanfodol hyn yn gwneud pethau fel cofio lle'r oeddech wedi cyrraedd wrth lenwi ffurflen (er enghraifft cais am drwydded)| + + And the radio button "Derbyn cwcis" is "selected" + And the radio button "Peidio" is "unselected" + + And I click on the "Sut rydym yn defnyddio cwcis" link + + Then I see "Mesur defnydd o’r wefan (Google Analytics)" on the page + + Then I see "Mae meddalwedd Google Analytics yn casglu gwybodaeth am sut byddwch yn defnyddio'r wefan. Rydym yn gwneud hyn i helpu sicrhau bod y wefan yn cwrdd ag anghenion y defnyddwyr ac i’n helpu ni i wneud gwelliannau." on the page + Then I see "Mae Google Analytics yn gallu casglu gwybodaeth am eich demograffig, megis eich oedran, eich rhyw, eich lleoliad â’ch dewis iaith." on the page + Then I see "Mae’r adroddiadau yn rhoi gwybodaeth i ni am y ddyfais rydych yn ei ddefnyddio i gael mynediad at y wefan, pa borwr rydych yn ei ddefnyddio, a fersiwn y system weithredu sy'n cael ei defnyddio. Mae hyn yn ein cynorthwyo i sicrhau bod y wefan yn gweithio i bawb." on the page + + Then I see "Yn benodol, rydym yn cofnodi sawl gwaith y mae ein dogfennau PDF yn cael eu lawrlwytho, sawl gwaith y mae defnyddwyr yn gadael y wefan trwy glicio ar ddolenni allanol, a’r nifer o bobl sy’n clicio ar y dolenni 'Rhagor o wybodaeth' sydd wedi'u rhestru wrth ymyl rhai o’r cwestiynau ar ein gwefan." on the page + + And I see "Mae’r holl ddata rydym yn eu casglu yn ddienw, ac nid oes gennym fynediad at unrhyw ddata all eich adnabod yn bersonol." on the page + + And I see "Rydym yn defnyddio’r wybodaeth hon i wella'r gwasanaeth a'n perfformiad yn ogystal â chynnal dadansoddi pellach" on the page + + Then I see "Mae’r cwcis canlynol yn cael eu defnyddio:" on the page + + And I see "Enw" in the same row as "Diben" + And I see "Diben" in the same row as "Enw" + + Then I see "Mae’r rhain yn ein helpu i weld sut yr ydych chi’n defnyddio GOV.UK er mwyn gwella’r wefan" in the same row as "_gat" + And I see "2 flynedd" in the same row as "_ga" + Then I see "24 awr" in the same row as "_gid" + + And I see "Daw i ben" in the same row as "Enw" + + Then I see "1 munud" in the same row as "_gat" + Then I see "Mae’r rhain yn ein helpu i weld sut yr ydych chi’n defnyddio GOV.UK er mwyn gwella’r wefan" in the same row as "_ga" + Then I see "Mae’r rhain yn ein helpu i weld sut yr ydych chi’n defnyddio GOV.UK er mwyn gwella’r wefan" in the same row as "_gid" + + And I see "Gallwch chi ddewis peidio derbyn cwcis Google Analytics." on the page + Then I click on the "ddewis peidio derbyn cwcis Google Analytics." link + Then I see "cookie-settings" in the URL + Then I press the "back" button on my browser + + And I see "Sesiynau" on the page + And I see "Mae cwci yn cael ei osod i gofnodi eich gweithgaredd yn ystod y sesiwn." on the page + + Then I see "Enw" in the same row as "Diben" + + Then I see "Nodi p’un a ydych wedi mewngofnodi ai peidio" in the same row as "sessionID" + Then I see "Fe’i defnyddir i’ch cyfeirio’n ôl at yr un gweinyddwr ar gyfer pob cais" in the same row as "ApplicationGatewayAffinity" + + Then I see "Diben" in the same row as "Enw" + + Then I see "Daw i ben" in the same row as "Enw" + And I see "Pan fyddwch chi’n cau’ch porwr" in the same row as "sessionID" + And I see "Pan fyddwch chi’n cau’ch porwr" in the same row as "ApplicationGatewayAffinity" + + Then I see "Ein harolwg adborth" on the page + Then I see "Rydym yn defnyddio SmartSurvey i alluogi defnyddwyr y gwasanaeth i roi adborth am eu profiadau ar ddefnyddio’r gwasanaeth." on the page + Then I see "Ceir rhagor o fanylion am bolisi diogelwch a chyfrinachedd SmartSurvey yn:" on the page + + Then I click on the "https://www.smartsurvey.co.uk/security" link + And I see "www.smartsurvey.co.uk/security" in the URL + Then I press the "back" button on my browser + + Then I see "Byddwn yn defnyddio canlyniadau’r ymatebion i’r arolwg i roi gwybodaeth inni am eich profiad o ddefnyddio'r gwasanaeth, bydd hyn yn ein galluogi i ystyried sut allwn wella'r gwasanaeth ymhellach." on the page + + Then I see "Mae’r holl ddata rydym yn eu casglu yn ddienw, ac nid oes gennym fynediad at unrhyw ddata all eich adnabod yn bersonol." on the page + Then I see "Os byddwch yn cymryd rhan, bydd SmartSurvey yn cadw rhagor o gwcis ar eich cyfrifiadur i ddilyn eich cynnydd trwy'r arolwg. Mae SmartSurvey yn cael ei ddefnyddio i gasglu’r ymatebion i’r arolwg. Os byddwch yn cymryd rhan, bydd SmartSurvey yn cadw rhagor o gwcis ar eich cyfrifiadur i ddilyn eich cynnydd trwy'r arolwg. Ceir gwybodaeth am sut mae SmartSurvey yn defnyddio Cwcis yn:" on the page + Then I click on the "https://www.smartsurvey.co.uk/how-we-use-cookies" link + And I see "/how-we-use-cookies" in the URL + Then I press the "back" button on my browser + + #Translations not arrived yet + + #Then I see "Change your settings" on the page + #Then I see "You can change which cookies you're happy for us to use" on the page + #Then I click on the "change which cookies you're happy for us to use" link + #Then I press the "back" button on my browser + +Examples: + |part_no |last_name |postcode |pool_no | + |641500567 |LastNameB |SW1H 9AJ |415170401 | + + +@RegressionWelsh @JDB-4533 +Scenario Outline: Welsh 1st Party Cookies Polciy on each Page + Given I am on the welsh version of "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + And I set the radio button to "n ymateb dros fy hun" + And I see link with text "Cwcis" + And I press the "Parhau" button + + Then I see "Eich manylion rheithiwr" on the page + When I click on the "Nid oes gennyf rif rheithiwr" link + Then I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Rhowch eich enw olaf fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + And I see "Rhowch eich cod post fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I see link with text "Cwcis" + And I press the "Parhau" button + + And I set the radio button to "Nac ydy" + And I see link with text "Cwcis" + And I press the "Parhau" button + + Then I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I see link with text "Cwcis" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + And I do not see "Gwiriwch fod eich enw a'r cyfeiriad yn gywir" on the page + And I see link with text "Cwcis" + When I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener. | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I see link with text "Cwcis" + And I press the "Parhau" button + + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "<email>" + And I set "Nodwch eich cyfeiriad e-bost eto" to "<email>" + And I see link with text "Cwcis" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + | Er enghraifft, 15 03 1982 | + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Mae angen i chi ddweud wrthym beth yw eich dyddiad geni er mwyn i ni wirio os ydych o'r oedran priodol i wasanaethu ar reithgor." on the page + And I do not see "Nodwch ddyddiad geni'r unigolyn er mwyn i ni wirioos ydynt o'r oedran priodol i wasanaethu ar reithgor." on the page + + Then I see "Ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "os oes arnoch angen cyngor am hyn." on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I see link with text "Cwcis" + And I press the "Parhau" button + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + And I see link with text "Cwcis" + + When I press the "Parhau" button + + #Residency JDB-3909 + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link + Then I see "Rhaid i chi gysylltu â ni i gael cyngor ar eich sefyllfa benodol." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Cymhwysedd" on the page + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I see link with text "Cwcis" + + And I press the "Parhau" button + + #CJS JDB-3873 + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + And I do not see any links on the page that open to a new page without an alt text + When I set the radio button to "Nac ydw" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Bail + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydw" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Convictions JDB-3814 + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I see "Dim ond os cawsoch ddedfryd o garchar, gorchymyn cymunedol neu ddedfryd o garchar ohiriedig y mae hyn yn berthnasol." on the page + When I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + And I see "dedfryd o garchar neu gadw yn y ddalfa am 5 mlynedd neu fwy" on the page + + #JDB-4552 + + And I see "dedfryd o garchar neu gadw yn y ddalfa am 5 mlynedd neu fwy" on the page + And I see "dedfryd o garchar ar gyfer diogelu'r cyhoedd neu gadw yn y ddalfa er mwyn diogelu'r cyhoedd" on the page + And I see "dedfryd o garchar, y ddalfa neu gadw yn y ddalfa am oes" on the page + And I see "dedfryd estynedig o dan un o adrannau 226A, 226B, 227 neu 228 Deddf Cyfiawnder Troseddol 2003, (gan gynnwys dedfryd o'r fath a osodwyd o ganlyniad i adran 219A, 220, 221A neu 222 Deddf y Lluoedd Arfog 2006) neu adran 210A Deddf Gweithdrefn Droseddol (Yr Alban) 1995" on the page + And I see "cadw hyd mynno Ei Fawrhydi neu hyd mynno'r Ysgrifennydd Gwladol" on the page + And I see "Ni allwch ychwaith wasanaethu ar reithgor os ydych wedi cael un o'r dedfrydau troseddol hyn yn ystod y 10 mlynedd diwethaf:" on the page + And I do not see "carchar er mwyn diogelu’n cyhoedd neu gael eich cadw’n gaethiwed er mwyn diogelu’r cyhoedd" on the page + When I set the radio button to "Naddo" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Mental Health Capacity JDB-3812 and JDB-3813 JDB-3880 JDB-4552 + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I click on the "Angen help i ateb hwn?" link + And I see "Os nad oes y gallu meddyliol gan rywun, dydyn nhw ddim yn gallu:" on the page + And I see "gwneud eu penderfyniadau eu hunain" on the page + And I see "deall a chadw gwybodaeth" on the page + And I see "cyfathrebu meddyliau a phenderfyniadau i bobl eraill" on the page + And I see "Ardystiwyd rhai pobl yn feddygol o dan Ddeddf Galluedd Meddyliol 1983 nad oes ganddynt y gallu meddyliol oherwydd damwain neu anaf." on the page + And I see "Efallai bod yn rhaid penodi rhywun arall i wneud penderfyniadau ar eu rhan." on the page + And I see "Os nad oes gan rywun y gallu meddyliol, ni allant wasanaethu ar reithgor." on the page + + And I see "Ie" on the page + And I see "Na" on the page + And I set the radio button to "Ie" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" to "Reasons for capacity" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Confirm attendance + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + And I see link with text "Cwcis" + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + And I do not see any links on the page that open to a new page without an alt text + + When I set text area with "id" of "deferralReason" to "askForAnotherDateReasonWhy" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + + And I see link with text "Cwcis" + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + #RA JDB-3815 + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran eich nam neu anabledd, yna cysylltwch â ni. Neu gallwch ofyn i rywun arall ffonio ar eich rhan." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see link with text "Cwcis" + And I press the "Parhau" button + And I see "Gwiriwch eich ymatebion nawr" on the page + And I see link with text "Cwcis" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500227 |LNAMETWOTWOSEVEN |CH1 2AN |e@mail.com |415170402 | + +@RegressionWelsh @JDB-4533 +Scenario Outline: Welsh 3rd Party Cookies Policy on each page + Given I am on the welsh version of "Public" "test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Juror Log In JDB-3808 and JDB-3940 + + When I click on the "Nid oes gennyf rif rheithiwr ar gyfer yr unigolyn" link + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I see link with text "Cwcis" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I see link with text "Cwcis" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I see link with text "Cwcis" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I see "Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I click on the "Os ydych yn byw dramor" link + And I see "Os ydych yn byw dramor ar hyn o bryd a heb rif ffôn y DU, byddwn angen cysylltu â chi drwy ddefnyddio cyfeiriad e-bost." on the page + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Why are you replying title + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + When I set the radio button to "Nid yw'r unigolyn yma" + And I see "Efallai ei fod yn teithio, yn yr ysbyty, neu i ffwrdd am fwy nag ychydig ddyddiau am reswm arall." on the page + And I see "Nid yw'r unigolyn yn gallu ymateb dros ei hun" on the page + And I see "Nid yw'r unigolyn â'r gallu i ymateb drosto'i hun. Efallai bod hyn oherwydd bod ganddo anabledd neu nam." on the page + And I see link with text "Cwcis" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ydy" + And I see link with text "Cwcis" + When I press the "Parhau" button + + #Check juror address + + And I see link with text "Cwcis" + And I set the radio button to "Ie" + When I press the "Parhau" button + + #DoB JDB-3810 + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Os oes arnoch angen cymorth, ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I see "Manylion y Rheithiwr" on the page + And I see "Er enghraifft, 15 03 1982" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I see link with text "Cwcis" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + When I see "Manylion y Rheithiwr" on the page + And I see "Nodwch rifau ffôn y gallwn eu defnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener." on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field JDB-3824 + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Qualify for jury service + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Residency JDB-3811 and JDB-3910 + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I see "Cymhwysedd" on the page + And I set the radio button to "Do" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #CJS no JDB-3822 + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Ydy" + And I set the radio button to "Nac ydy" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + + # JDB-4552 + + And I see "dedfryd o garchar neu gadw yn y ddalfa am 5 mlynedd neu fwy" on the page + And I see "dedfryd o garchar ar gyfer diogelu'r cyhoedd neu gadw yn y ddalfa er mwyn diogelu'r cyhoedd" on the page + And I see "dedfryd o garchar, y ddalfa neu gadw yn y ddalfa am oes" on the page + And I see "dedfryd estynedig o dan un o adrannau 226A, 226B, 227 neu 228 Deddf Cyfiawnder Troseddol 2003, (gan gynnwys dedfryd o'r fath a osodwyd o ganlyniad i adran 219A, 220, 221A neu 222 Deddf y Lluoedd Arfog 2006) neu adran 210A Deddf Gweithdrefn Droseddol (Yr Alban) 1995" on the page + And I see "cadw hyd mynno Ei Fawrhydi neu hyd mynno'r Ysgrifennydd Gwladol" on the page + And I see "Ni allant ychwaith wasanaethu ar reithgor os ydynt, yn ystod y 10 mlynedd diwethaf, wedi cael:" on the page + When I set the radio button to "Nac ydy" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Mental Health Capacity JDB-3813 + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I click on the "Angen help i ateb hwn?" link + + # JDB-4552 + + And I see "Os nad oes y gallu meddyliol gan rywun, dydyn nhw ddim yn gallu:" on the page + And I see "gwneud eu penderfyniadau eu hunain" on the page + And I see "deall a chadw gwybodaeth" on the page + And I see "cyfathrebu meddyliau a phenderfyniadau i bobl eraill" on the page + And I see "Ardystiwyd rhai pobl yn feddygol o dan Ddeddf Galluedd Meddyliol 1983 nad oes ganddynt y gallu meddyliol oherwydd damwain neu anaf." on the page + And I see "Efallai bod yn rhaid penodi rhywun arall i wneud penderfyniadau ar eu rhan." on the page + When I set the radio button to "Na" + And I see link with text "Cwcis" + And I press the "Parhau" button + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + And I see link with text "Cwcis" + + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + + #JDB-3448 and JDB-3503 + + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + And I see link with text "Cwcis" + + When I set text area with "id" of "deferralReason" to "Reasons for deferral request" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + And I see link with text "Cwcis" + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + #RA no JDB-3815 + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran nam neu anabledd sydd gan yr unigolyn rydych yn ymateb ar ei ran, yna cysylltwch â ni." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see link with text "Cwcis" + And I press the "Parhau" button + + #Check your answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see link with text "Cwcis" + When I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + And I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + And I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + And I see "Rwy'n deall efallai y bydd yr atebion a roddais yn cael eu gwirio a gellir fy erlyn os wyf wedi rhoi unrhyw wybodaeth y gwn ei bod yn anwir yn fwriadol." on the page + + And I see "Efallai y cewch eich euogfarnu ac y cewch ddirwy o hyd at £1000 os byddwch yn rhoi gwybodaeth ffug ar gyfer yr unigolyn a gafodd wŷs i osgoi gwasanaethu ar reithgor." on the page + And I see "Mae hyn hefyd yn berthnasol os byddwch yn methu â rhoi'r wybodaeth sydd ei hangen arnom i benderfynu a yw'r unigolyn sydd wedi cael gwŷs yn gymwys i wasanaethu ar reithgor." on the page + And I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + +Examples: + |part_no |last_name |postcode |pool_no | + |641500184 |LNAMEONEEIGHTFOUR |CH1 2AN |415170402 | + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_4546.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_4546.feature new file mode 100644 index 00000000..562c64f7 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_4546.feature @@ -0,0 +1,531 @@ +Feature: Regression Welsh Accessibility Statement + +@RegressionWelsh @JDB-4546 +Scenario: Welsh Accessibility Statement + + Given I am on the welsh version of "Public" "bau-test" + + #Accessibility Statement + + And I click on the "Datganiad hygyrchedd" link + And I switch to the new window + + And I see "Datganiad hygyrchedd ar gyfer y gwasanaeth Ymateb i Wŷs Rheithg" on the page + And I see "Datganiad hygyrchedd ar gyfer y gwasanaeth Ymateb i Wŷs Rheithgor yn" on the page + And I click on the "gov.uk/reply-jury-summons" link + And I see "reply-jury-summons" in the URL + Then I press the "back" button on my browser + + And I see "Mae'r wefan hon yn cael ei chynnal gan Wasanaeth Llysoedd a Thribiwnlysoedd EF (GLlTEF). Rydym eisiau i gynifer o bobl â phosibl allu defnyddio'r wefan hon. Er enghraifft, mae hynny'n golygu y dylech allu:" on the page + And I see "newid lliwiau, lefelau cyferbyniad a ffontiau" on the page + And I see "gwneud y testun hyd at 300% yn fwy heb iddo ddiflannu oddi ar y sgrin" on the page + And I see "defnyddio'r rhan fwyaf o'r wefan gan ddefnyddio bysellfwrdd yn unig" on the page + And I see "defnyddio'r rhan fwyaf o'r wefan gan ddefnyddio meddalwedd adnabod llais" on the page + And I see "gwrando ar y rhan fwyaf o'r testun ar y wefan gan ddefnyddio darllenydd sgrin (gan gynnwys y fersiynau diweddaraf o JAWS, NVDA a VoiceOver)" on the page + And I see "Rydym hefyd wedi sicrhau ein bod wedi defnyddio iaith syml." on the page + And I see "roi cyngor ichi ar sut i wneud eich dyfais yn haws i'w defnyddio os oes gennych anabledd." on the page + And I click on the "AbilityNet" link + And I see "abilitynet" in the URL + Then I press the "back" button on my browser + + Then I see "Pa mor hygyrch yw'r wefan hon?" on the page + And I see "Mae'r wefan hon wedi cael ei harchwilio'n annibynnol ar gyfer hygyrchedd ac nid ydym yn ymwybodol o unrhyw rannau o'r wefan hon nad ydynt yn gwbl hygyrch." on the page + And I see "Riportio problemau hygyrchedd gyda'r wefan hon" on the page + Then I see "Rydym bob amser yn ceisio gwella hygyrchedd y wefan hon. Os ydych yn dod o hyd i unrhyw broblemau nad ydynt wedi'u rhestru ar y dudalen hon neu'n credu nad ydym yn bodloni gofynion hygyrchedd:" on the page + + Then I see "anfonwch e-bost i jurysummoning@justice.gov.uk" on the page + Then I see "ffoniwch 0300 303 5173" on the page + Then I see "neu ysgrifennwch atom yn:" on the page + Then I see "Jury Central Summoning Bureau" on the page + Then I see "Phoenix House" on the page + Then I see "Rushton Avenue" on the page + Then I see "Bradford" on the page + Then I see "BD3 7BH" on the page + + Then I see "Y Weithdrefn Orfodi" on the page + Then I see "Y Comisiwn Cydraddoldeb a Hawliau Dynol (EHRC) sy’n gyfrifol am orfodi Rheoliadau Hygyrchedd Cyrff y Sector Cyhoeddus (Gwefannau ac Apiau Ffonau Symudol) (Rhif 2) 2018 (y 'rheoliadau hygyrchedd'). Os nad ydych yn hapus â'r ffordd rydym yn ymateb i'ch cwyn," on the page + And I click on the "cysylltwch â'r Gwasanaeth Cynghori a Chefnogi Cydraddoldeb (EASS)" link + And I see "equalityadvisoryservice" in the URL + Then I press the "back" button on my browser + + Then I see "Cysylltu â ni drwy e-bost neu dros y ffôn" on the page + And I see "Gallwch gysylltu â'n tîm gwasanaeth cwsmeriaid yn y Swyddfa Ganolog Gwysio Rheithgor drwy:" on the page + And I see "anfon e-bost i jurysummoning@justice.gov.uk" on the page + And I see "ffonio 0300 303 5173" on the page + + Then I see "Gwybodaeth dechnegol am hygyrchedd y wefan hon" on the page + Then I see "Mae GLlTEM wedi ymrwymo i sicrhau bod y wefan yn hygyrch, yn unol â Rheoliadau Hygyrchedd Cyrff y Sector Cyhoeddus (Gwefannau ac Apiau Ffonau Symudol) (Rhif 2) 2018." on the page + + Then I see "Statws Cydymffurfio" on the page + Then I see "Mae'r wefan hon yn cydymffurfio'n llwyr â Chanllawiau Hygyrchedd Cynnwys y We fersiwn 2.1 safon AA." on the page + And I click on the "Chanllawiau Hygyrchedd Cynnwys y We fersiwn 2.1" link + And I see "WCAG21" in the URL + Then I press the "back" button on my browser + + And I see "Paratoi'r datganiad hygyrchedd hwn" on the page + And I see "Paratowyd y datganiad hwn ar y 27 Awst 2020. Fe'i adolygwyd ddiwethaf ar y 14 Mehefin 2023." on the page + And I see "Cafodd y wefan hon ei phrofi diwethaf ar yr 8 Mehefin 2023. Cynhaliwyd y prawf gan Digital Accessibility Centre Ltd." on the page + And I see "Os oes angen copi o'r adroddiad prawf hygyrchedd llawn arnoch cysylltwch â Andrew Singleton Bisby." on the page +# Then I see "Gallwch ddarllen adroddiad llawn y prawf hygyrchedd yma." on the page +# And I click on the "ddarllen adroddiad llawn y prawf hygyrchedd yma" link +# And I see "accessibility-statement/report" in the URL +# Then I press the "back" button on my browser + +@RegressionWelsh @JDB-4546 +Scenario Outline: Welsh 1st Party - Accessibility Statement on each page + + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "ZIP" as "<postcode>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + And I see link with text "Datganiad hygyrchedd" + + #Login JDB-3808 + + When I click on the "Nid oes gennyf rif rheithiwr" link + Then I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + And I see link with text "Datganiad hygyrchedd" + + #JDB-3939 + + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Rhowch eich enw olaf fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + And I see "Rhowch eich cod post fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + #Check Your Name + + And I see link with text "Datganiad hygyrchedd" + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + Then I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Check Your Address JDB-3809 + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + And I do not see "Gwiriwch fod eich enw a'r cyfeiriad yn gywir" on the page + When I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Phone + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Email + + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + #JDB-3820 + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "<email>" + And I set "Nodwch eich cyfeiriad e-bost eto" to "<email>" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #DoB JDB-3810 + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + | Er enghraifft, 15 03 1982 | + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Mae angen i chi ddweud wrthym beth yw eich dyddiad geni er mwyn i ni wirio os ydych o'r oedran priodol i wasanaethu ar reithgor." on the page + And I do not see "Nodwch ddyddiad geni'r unigolyn er mwyn i ni wirioos ydynt o'r oedran priodol i wasanaethu ar reithgor." on the page + + Then I see "Ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "os oes arnoch angen cyngor am hyn." on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Qualify for jury service + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + When I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Residency JDB-3909 + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link + Then I see "Rhaid i chi gysylltu â ni i gael cyngor ar eich sefyllfa benodol." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Cymhwysedd" on the page + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #CJS JDB-3873 + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydw" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Bail + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Convictions JDB-3814 + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + When I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link +# Then I see "NI ALLWCH" on the page +# And "NI ALLWCH" text is bold + And I see "dedfryd o garchar neu gadw yn y ddalfa am 5 mlynedd neu fwy" on the page + And I see "dedfryd o garchar ar gyfer diogelu'r cyhoedd neu gadw yn y ddalfa er mwyn diogelu'r cyhoedd" on the page + When I set the radio button to "Naddo" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Mental Health Sectioned + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Mental Health Capacity JDB-3812 and JDB-3813 JDB-3880 + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I click on the "Angen help i ateb hwn?" link + And I see "Os nad oes y gallu meddyliol gan rywun, dydyn nhw ddim yn gallu:" on the page + And I see "gwneud eu penderfyniadau eu hunain" on the page + And I see "deall a chadw gwybodaeth" on the page + And I see "cyfathrebu meddyliau a phenderfyniadau i bobl eraill" on the page + And I see "Ardystiwyd rhai pobl yn feddygol o dan Ddeddf Galluedd Meddyliol 1983 nad oes ganddynt y gallu meddyliol oherwydd damwain neu anaf." on the page + And I see "Efallai bod yn rhaid penodi rhywun arall i wneud penderfyniadau ar eu rhan." on the page + And I see "Os nad oes gan rywun y gallu meddyliol, ni allant wasanaethu ar reithgor." on the page + + And I see "Ie" on the page + And I see "Na" on the page + And I set the radio button to "Ie" + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" to "Reasons for capacity" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Confirm attendance + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + + + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #RA JDB-3815 + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran eich nam neu anabledd, yna cysylltwch â ni. Neu gallwch ofyn i rywun arall ffonio ar eich rhan." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + And I see "Gwiriwch eich ymatebion nawr" on the page + + #Check your answers JDB-3818 and JDB-3880 + + When I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + And I see "Bu ichi ymateb i'r dyddiad arfaethedig ar gyfer eich gwasanaeth rheithgor" on the page + Then I see text "Ie" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + And I see "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" on the page + + #change MH capacity to No JDB-3880 + + Then I click on the "Newid" link in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + When I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + Then I see text "Na" in the same row as "A benderfynwyd nad oes gennych y gallu meddyliol?" + And I see "Rwy'n deall efallai y bydd yr atebion a roddais yn cael eu gwirio a gellir fy erlyn os wyf wedi rhoi unrhyw wybodaeth y gwn ei bod yn anwir." on the page + + #submit + + And I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + And I see link with text "Datganiad hygyrchedd" + + Then I see "O leiaf 2 wythnos cyn ichi ddechrau gwasanaethu ar reithgor, byddwn yn anfon y canlynol atoch:" on the page + Then I do not see "Yna, o leiaf pythefnos cyn i’r gwasanaeth rheithgor ddechrau byddwn yn anfon y dogfennau canlynol atoch:" on the page + Then I see "Gallwch wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eich bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + + +Examples: + |part_no |pool_no |last_name |postcode |email | + |645200713 |452170401 |LNAMESEVENONETHREE |SY2 6LU |e@eeee.com | + + +@RegressionWelsh @JDB-4546 +Scenario Outline: Welsh 3rd Party - Accessibility statement on each page + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I see link with text "Datganiad hygyrchedd" + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Juror Log In JDB-3808 and JDB-3940 + + When I click on the "Nid oes gennyf rif rheithiwr ar gyfer yr unigolyn" link + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I click on the "Os ydych yn byw dramor" link + And I see "Os ydych yn byw dramor ar hyn o bryd a heb rif ffôn y DU, byddwn angen cysylltu â chi drwy ddefnyddio cyfeiriad e-bost." on the page + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Why are you replying title + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + When I set the radio button to "Nid yw'r unigolyn yma" + And I see "Efallai ei fod yn teithio, yn yr ysbyty, neu i ffwrdd am fwy nag ychydig ddyddiau am reswm arall." on the page + And I see "Nid yw'r unigolyn yn gallu ymateb dros ei hun" on the page + And I see "Nid yw'r unigolyn â'r gallu i ymateb drosto'i hun. Efallai bod hyn oherwydd bod ganddo anabledd neu nam." on the page + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ydy" + When I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Check juror address + + And I set the radio button to "Ie" + When I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #DoB JDB-3810 + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Os oes arnoch angen cymorth, ffoniwch ni ar:" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I see "Manylion y Rheithiwr" on the page + And I see "Er enghraifft, 15 03 1982" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field JDB-3824 + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Qualify for jury service + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Residency JDB-3811 and JDB-3910 + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link + Then I see "Rhaid i chi gysylltu â ni i gael cyngor ar eu sefyllfa benodol." on the page + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I set the radio button to "Do" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #CJS no JDB-3822 + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Ydy" + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + Then I see "Pryd y gallant wasanaethu ar reithgor" on the page + And I see "Dim ond os rhoddwyd dedfryd o garchar, gorchymyn cymunedol neu ddedfryd o garchar ohiriedig y mae hyn yn berthnasol." on the page + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Mental Health Capacity JDB-3813 + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I click on the "Angen help i ateb hwn?" link + And I see "Os nad oes gan rywun y gallu meddyliol, ni allant wasanaethu ar reithgor." on the page + + And I set the radio button to "Na" + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #The person can attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #RA no JDB-3815 + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Os ydych yn pryderu am unrhyw beth arall ynghylch y gwasanaeth rheithgor o ran nam neu anabledd sydd gan yr unigolyn rydych yn ymateb ar ei ran, yna cysylltwch â ni." on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I press the "Parhau" button + And I see link with text "Datganiad hygyrchedd" + + #Check your answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + When I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + And I see link with text "Datganiad hygyrchedd" + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500676 |LNAMESIXSEVENSIX |CH1 2AN |email@outlook.com |415170401 | + diff --git a/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_AccountLocked.feature b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_AccountLocked.feature new file mode 100644 index 00000000..144db26e --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/REGRESSION_Welsh_AccountLocked.feature @@ -0,0 +1,142 @@ +Feature: Regression_Welsh_AccountLocked + +@RegressionWelsh @JDB-2678 @JDB-3516 @JDB-3667 +Scenario Outline: 1st Party Account Locked + Given I am on the welsh version of "Public" "juror-test01" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + +# And "<part_no>" has "LNAME" as "<last_name>" +# And "<part_no>" has "RET_DATE" as "5 mondays time" +# And "<part_no>" has "NEXT_DATE" as "5 mondays time" +# And "<part_no>" has "ZIP" as "<postcode>" +# +##1st_English +# +# Then I see "Reply to a jury summons" on the page +# When I click on the "Welsh (Cymraeg)" link +# +# +##start now +# +# When I press the "Dechrau nawr" button +# And I do not see any links on the page that open to a new page without an alt text + +#replying for myself + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #1 + + When I set "Rhif rheithiwr" to "<part_no>" + And I set "Cyfenw" to "Smith" + And I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + Then I see "Nid yw'r cyfuniad o’ch enw, cod post a rhif rheithiwr wedi’u hadnabod" on the page + +#log on attempt #2 + + When I set "Rhif rheithiwr" to "<part_no>" + And I set "Cyfenw" to "Smith" + And I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + Then I see "Nid yw'r cyfuniad o’ch enw, cod post a rhif rheithiwr wedi’u hadnabod" on the page + +#log on attempt #3 + + When I set "Rhif rheithiwr" to "<part_no>" + And I set "Cyfenw" to "Smith" + And I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + Then I see "Nid yw'r cyfuniad o’ch enw, cod post a rhif rheithiwr wedi’u hadnabod" on the page + +#log on attempt #4 + + When I set "Rhif rheithiwr" to "<part_no>" + And I set "Cyfenw" to "Smith" + And I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + +#@JDB-2678 + + Then I see "Am resymau diogelwch, mae eich cyfrif wedi'i gloi oherwydd ymdrechion mewngofnodi lluosog ac ni allwch ateb ar-lein bellach. Cysylltwch â Chanolfan Atgyfeirio Canolog y Rheithgor am fwy o wybodaeth - mae ein manylion isod yn yr adran 'Nid oes gennyf rif rheithgor'." on the page + +Examples: + |part_no |last_name |postcode |email | pool_no | + |841501977 |LNAME1977 |CH1 2AN |b@eeee.com | 415181001 | + +@RegressionWelsh @JDB-2678 @JDB-3667 +Scenario Outline: 3rd Party Account Locked + Given I am on the welsh version of "Public" "juror-test01" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + +# Then I see "Reply to a jury summons" on the page +# When I click on the "Welsh (Cymraeg)" link +# +# And I do not see any links on the page that open to a new page without an alt text +# When I press the "Dechrau nawr" button +# And I do not see any links on the page that open to a new page without an alt text + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #1 + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "Smith" + When I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + Then I see "Nid yw'r cyfuniad o’r enw, cod post a rhif rheithiwr yn gyfarwydd." on the page + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #2 + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "Smith" + When I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + Then I see "Nid yw'r cyfuniad o’r enw, cod post a rhif rheithiwr yn gyfarwydd." on the page + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #3 + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "Smith" + When I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + Then I see "Nid yw'r cyfuniad o’r enw, cod post a rhif rheithiwr yn gyfarwydd." on the page + And I do not see any links on the page that open to a new page without an alt text + +#log on attempt #4 + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "Smith" + When I set "Cod post Rheithiwr" to "SW17 7SR" + And I press the "Parhau" button + And I do not see any links on the page that open to a new page without an alt text + +#@JDB-2678 +#JDB-3667 + + Then I see "Mae’r cyfrif hwn wedi cael ei gloi am resymau diogelwch oherwydd sawl ymgais aflwyddiannus i fewngofnodi. Ni allwch mwyach ymateb ar-lein. Os gwelwch yn dda, cysylltwch ȃ Swyddfa Ganolog Gwysio Rheithgor i gael rhagor o wybodaeth – mae ein manylion isod yn yr adran ‘nid oes gen i rif rheithiwr’." on the page + And I do not see any links on the page that open to a new page without an alt text +Examples: + |part_no |last_name |postcode |email | pool_no | + |841501970 |LNAME1970 |CH1 2AN |b@eeee.com | 415181001 | + + diff --git a/src/test/resources/cucumber/features/regressionWelsh/WelshCharacterChecks.feature b/src/test/resources/cucumber/features/regressionWelsh/WelshCharacterChecks.feature new file mode 100644 index 00000000..0a44464a --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/WelshCharacterChecks.feature @@ -0,0 +1,122 @@ +Feature: WelshCharChecks + +@RegressionWelsh @JDB-3653 +Scenario: WelshCharChecksTest + + Given I am on the welsh version of "Public" "juror-test02" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | 641500293 |415170601 | 400 | + + And "641500293" has "LNAME" as "LNAMETWONINETHREE" + And "641500293" has "RET_DATE" as "5 mondays time" + And "641500293" has "NEXT_DATE" as "5 mondays time" + And "641500293" has "ZIP" as "CH1 2AN" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + And I set "Rhif rheithiwr – 9 digid" to "641500293" + And I set "Cyfenw'r Rheithiwr" to "LNAMETWONINETHREE" + And I set "Cod post Rheithiwr" to "CH1 2AN" + And I see "Rhowch eich enw olaf fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + And I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + And I press the "Parhau" button + + And I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + #And I see "Os yw eich enw wedi newid ac mae'n wahanol i'r enw ar ei llythyr gwŷs rheithgor, nodwch eich enw cywir yma. Byddwn yn cysylltu â chi hwyrach ymlaen i wirio hyn. Er enghraifft, efallai bydd angen i ni weld tystysgrif priodas neu dystysgrif newid enw. Ewch ymlaen gyda'r ffurflen ar-lein nawr." on the page + #And I see "Os yw eich cyfeiriad wedi newid, efallai byddwn yn gallu symud eich gwasanaeth rheithgor i lys sy'n agosach at eich cyfeiriad newydd. Byddwn yn cysylltu â chi ynglŷn â hyn hwyrach ymlaen. Ewch ymlaen gyda'r ffurflen ar-lein nawr." on the page + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + And I see "Eich cyfeiriad chi yw hwn?" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + And I set "Prif rif ffôn" to "01111112221" + And I set "Rhif ffôn arall (dewisol)" to "0111112223" + And I press the "Parhau" button + And I set input field with "id" of "emailAddress" to "email@1.com" + And I set input field with "id" of "emailAddressConfirmation" to "email@1.com" + And I press the "Parhau" button + + And I set "Diwrnod" to "01" + And I set "Mis" to "01" + And I set "Blwyddyn" to "1990" + + And I press the "Parhau" button + + #eligibility + + And I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #residency + + And I see "Cymhwysedd" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #cjs + + And I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + And I see "Mae hyn yn cynnwys gweithio i'r heddlu, Gwasanaeth Carchardai EM, yr Asiantaeth Troseddu Cenedlaethol, y farnwriaeth, GLlTEM neu unrhyw ran arall o'r system cyfiawnder troseddol" on the page + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #bail + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #convictions + + And I set the radio button to "Naddo" + And I press the "Parhau" button + + #mental health + + And I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + And I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + And I see "Gwiriwch eich dyddiad dechrau" on the page + And I see "Rydych wedi cael gwŷs i ddechrau gwasanaeth rheithgor ar" on the page + And I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + + And I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + And I see "Eglurwch pam na allwch chi wasanaethu ar reithgor yn ystod y 12 mis nesaf." on the page + And I see "Nid oes angen ichi atodi na chasglu tystiolaeth cyn dyddiad terfyn eich gwŷs." on the page + And I see "Byddwn yn cysylltu â chi yn nes ymlaen os bydd angen hynny." on the page + + And I set text area with "id" of "excusalReason" to "testA" + And I press the "Parhau" button + + And I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + And I see "A oes gennych anabledd neu nam sy’n golygu bydd angen cymorth neu gyfleusterau ychwanegol arnoch yn yr adeilad llys ble fyddwch yn cyflawni eich gwasanaeth rheithgor?" on the page + And I set the radio button to "Nac oes" + And I press the "Parhau" button + And I see "Gwiriwch eich ymatebion nawr" on the page + And I see "Mae’n bwysig eich bod yn gwirio bod yr holl wybodaeth yn gywir cyn i chi anfon eich ymateb." on the page + And I see "Bu i chi roi’r manylion rheithiwr a ganlyn" on the page + And I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + And I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + And I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + And I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + + And I see "Na allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi." on the page + And I see "Gan eich bod wedi gofyn am gael eich esgusodi rhag gwasanaethu ar reithgor, bu ichi ddweud" on the page + And I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + And I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_1000_CharGuidance.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_1000_CharGuidance.feature new file mode 100644 index 00000000..b6d14b65 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_1000_CharGuidance.feature @@ -0,0 +1,212 @@ +Feature: Welsh_1st_1000_CharGuidance + +@RegressionWelsh @JDB-3618 @JDB-3620 @JDB-3621 @JDB-3622 @JDB-3623 @JDB-3624 @JDB-3625 @JDB-3626 @JDB-3627 @JDB-3628 @JDB-3653 +Scenario Outline: Welsh 1st Party - Character count warning should be on all applicable pages + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + And I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | A yw'r enw sydd gennym ar eich cyfer chi yn gywir? | + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I set the radio button to "Ie" + When I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener. | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Qualify for jury service + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + When I press the "Parhau" button + + #Residency JDB-3620 + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I set the radio button to "Naddo" + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch fanylion" to "Not a resident" + And I press the "Parhau" button + + #CJS no JDB-3625 + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Ydw" + And I check the "Arall" checkbox + + And I see "You have 1000 characters remaining" on the page + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Other CJS part" + And I press the "Parhau" button + + #Bail JDB-3623 + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + + When I set the radio button to "Ydw" + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch fanylion" to "I am bailed" + And I press the "Parhau" button + + #Convictions JDB-3624 + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I set the radio button to "Do" + + And I see "You have 1000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "I am convicted" + And I press the "Parhau" button + + #Mental health part 1 JDB-3621 + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I set the radio button to "Ie" + + And I see "You have 1000 characters remaining" on the page + And I set "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" to "I am sectioned" + And I press the "Parhau" button + + #Mental health part 2 JDB-3622 + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I set the radio button to "Ie" + + And I see "You have 1000 characters remaining" on the page + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes gennych alluedd meddyliol" to "I lack capacity" + And I press the "Parhau" button + + #I can attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #RA no JDB-3627 and JDB-3628 + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I set the radio button to "Oes" + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig bydd arnoch angen wrth ichi wasanaethu ar reithgor." to "Wheelchair user" + When I check the "Arall" checkbox + And I set "Rhowch fanylion os gwelwch yn dda" to "Other RA stuff" + And I press the "Parhau" button + + #Check Your Answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + + #Deferral Reason JDB-3626 + + When I see "You have 1000 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "Defer me please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allwch ddechrau gwasanaeth rheithgor" on the page + + #Deferral Dates + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + #confirm + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + + #Excusal Reason JDB-3618 + + When I see "You have 1000 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #When I press the "Submit" button + + When I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + Then I see "Rydym wedi anfon neges e-bost atoch i gadarnhau eich bod wedi ymateb i’ch gwŷs rheithgor." on the page + + Examples: + |part_no |last_name |postcode |email |pool_no | + |641500030 |DOE |SW1H 9AJ |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_BetaBanner.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_BetaBanner.feature new file mode 100644 index 00000000..c5a2f17c --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_BetaBanner.feature @@ -0,0 +1,226 @@ +Feature: Welsh_1st_BetaBanner + +# Beta banner removed 27-07-20 + +@RegressionWelsh @JDB-3522 @JDB-4570 +Scenario Outline: Welsh 1st Party Beta Banner Check + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + And I set the radio button to "n ymateb dros fy hun" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + And I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + + #Login + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | A yw'r enw sydd gennym ar eich cyfer chi yn gywir? | + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener. | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + When I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + #Qualify for jury service + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + + When I press the "Parhau" button + + #Residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Naddo" + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + + Then I see "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Bail + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Convictions + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I see "Dim ond os cawsoch ddedfryd o garchar, gorchymyn cymunedol neu ddedfryd o garchar ohiriedig y mae hyn yn berthnasol." on the page + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Confirm attendance + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #RA + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Nac oes" + And I press the "Parhau" button + + #Check Your Answers Now + + And I see "Gwiriwch eich ymatebion nawr" on the page + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + #Confirm Date of Jury Service + + When I set the radio button to "Nac ydw, hoffwn newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnoch i wneud eich gwasanaeth rheithgor" on the page + + #Deferral Reason + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set text area with "id" of "deferralReason" to "Defer me please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allwch ddechrau gwasanaeth rheithgor" on the page + + #Deferral Dates + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + #confirm + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers Now + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad eich gwasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + #Confirm Date of Jury Service + + When I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen ichi gael eich esgusodi rhag gwasanaethu ar reithgor?" on the page + + #Excusal Reason + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers Now + + When I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + Then I see "Rydym wedi anfon neges e-bost atoch i gadarnhau eich bod wedi ymateb i’ch gwŷs rheithgor." on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + +Examples: + |part_no |last_name |postcode |email | pool_no | + |641500830 |DOE |SW1H 9AJ |b@eeee.com | 415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_CJS_Checks.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_CJS_Checks.feature new file mode 100644 index 00000000..dac73f3a --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_CJS_Checks.feature @@ -0,0 +1,191 @@ +Feature: Welsh_1st_CJS_Checks + +@RegressionWelsh @JDB-3873 +Scenario Outline: Welsh 1st Party CJS buttons, Other and Check Answers checks + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I click on the "Nid oes gennyf rif rheithiwr" link + Then I see "Gallwch ddod o hyd i'ch rhif rheithiwr ar eich llythyr gwŷs rheithgor." on the page + + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + And I see "Rhowch eich enw olaf fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + And I see "Rhowch eich cod post fel y mae wedi'i nodi ar y llythyr gwŷs rheithgor, hyd yn oed os yw'n anghywir. Gallwch ei newid nes ymlaen." on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | A yw'r enw sydd gennym ar eich cyfer chi yn gywir? | + + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I click on the "Beth sy'n digwydd os rwyf wedi newid fy enw?" link + + And I see "Os yw eich enw chi wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Eich cyfeiriad chi yw hwn? | + + And I do not see "Gwiriwch fod eich enw a'r cyfeiriad yn gywir" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich rhif ffôn? | + | Darparwch rif ffôn yn y DU y gallwn ei ddefnyddio i gysylltu â chi rhwng 9am a 5pm, dydd Llun i ddydd Gwener. | + | Prif rif ffôn | + | Rhif ffôn arall (dewisol) | + + When I set "Prif rif ffôn" to "0207 821 1818" + And I press the "Parhau" button + + Then on the page I see + | text| + | Eich Manylion | + | Beth yw eich cyfeiriad e-bost? | + | Pam fod arnom angen eich cyfeiriad e-bost? | + + When I see "Pam fod arnom angen eich cyfeiriad e-bost?" on the page + And I set "Nodwch eich cyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch eich cyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + Then on the page I see + | text | + | Eich Manylion | + | Beth yw eich dyddiad geni? | + | Cymorth gyda'ch dyddiad geni | + + When I click on the "Cymorth gyda'ch dyddiad geni" link + Then I see "Mae angen i chi ddweud wrthym beth yw eich dyddiad geni er mwyn i ni wirio os ydych o'r oedran priodol i wasanaethu ar reithgor." on the page + And I do not see "Nodwch ddyddiad geni'r unigolyn er mwyn i ni wirioos ydynt o'r oedran priodol i wasanaethu ar reithgor." on the page + + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + #Qualify for jury service + + Then I see "Cadarnhau a ydych yn gymwys i wasanaethu ar reithgor" on the page + + When I press the "Parhau" button + + #Residency + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I click on the "A ydych angen cymorth i ateb hyn?" link + Then I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + When I click on the "Cliciwch i fynd yn ôl" link + + And I see "yn meddwl nad ydych yn gymwys" on the page + And I press the "Parhau" button + + #CJS JDB-3873 + + Then I see "Ers i chi droi'n 13 oed, a yw eich prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I set the radio button to "Do" + + And I press the "Parhau" button + When I set the radio button to "Ydw" + + And I check the "Arall" checkbox + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Other CJS Info" + And I press the "Parhau" button + + #Bail + + Then I see "Ydych chi ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + #Convictions + + Then I see "Ydych chi wedi'ch cael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I see "Dim ond os cawsoch ddedfryd o garchar, gorchymyn cymunedol neu ddedfryd o garchar ohiriedig y mae hyn yn berthnasol." on the page + + When I set the radio button to "Naddo" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + When I see "Cymhwysedd" on the page + + And I see "Ie" on the page + And I see "Na" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Confirm attendance + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Ydw, rydw i'n gallu dechrau" + And I press the "Parhau" button + + #RA + + Then I see "A fyddech chi angen cymorth pan fyddwch yn y llys?" on the page + When I set the radio button to "Nac oes" + And I click on the "Pam ein bod yn gofyn am hyn?" link + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I press the "Parhau" button + + #Check your answers + + And I see "Gwiriwch eich ymatebion nawr" on the page + When I see text "Ydw" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Arall" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + And I see text "Other CJS Info" in the same row as "A ydych chi wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" + + And I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + And I press the "Cyflwyno" button + + Then I see "O leiaf 2 wythnos cyn ichi ddechrau gwasanaethu ar reithgor, byddwn yn anfon y canlynol atoch:" on the page + Then I do not see "Yna, o leiaf pythefnos cyn i’r gwasanaeth rheithgor ddechrau byddwn yn anfon y dogfennau canlynol atoch:" on the page + Then I see "Gallwch wylio fideo am beth sy'n digwydd wrth fod yn rheithiwr ar YouTube, fel eich bod yn gwybod beth i'w ddisgwyl. Mae'r fideo'n para 13 munud." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500777 |DOE |SW1H 9AJ |b@eeee.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_Logon.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_Logon.feature new file mode 100644 index 00000000..54ab704d --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_1st_Logon.feature @@ -0,0 +1,28 @@ +Feature: 1st Party Welsh Logon + +@RegressionWelsh @JDB-3402 @JDB-4325 +Scenario: 1st Party Welsh Logon + + Given I am on the welsh version of "Public" "juror-test01" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + And I set "Rhif rheithiwr – 9 digid" to "testData" + And I set "Cyfenw'r Rheithiwr" to "testData" + And I set "Cod post Rheithiwr" to "testData" + + When I click on the "Nid oes gennyf rif rheithiwr" link + Then I see "Os nad oes gennych rif rheithiwr, cysylltwch â:" on the page + And I do not see "::" on the page + And I do not see ": :" on the page + And I see "Swyddfa Ganolog Gwysio Rheithgor" on the page + And I see "jurysummoning@justice.gov.uk" on the page + And I see "Rhif ffôn: 0300 456 1024" on the page + And I see "Llinell Gymraeg: 0300 303 5173" on the page + And I see "Dydd Llun i Ddydd Iau 9am – 5pm" on the page + And I see "Dydd Gwener 9am – 3pm" on the page + And I see "Canfod mwy am gostau galwadau" on the page + + \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_1000_CharGuidance.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_1000_CharGuidance.feature new file mode 100644 index 00000000..18684150 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_1000_CharGuidance.feature @@ -0,0 +1,239 @@ +Feature: Welsh_3rd_1000_CharGuidance + +@RegressionWelsh @JDB-3634 @JDB-3618 @JDB-3620 @JDB-3621 @JDB-3622 @JDB-3623 @JDB-3624 @JDB-3625 @JDB-3626 @JDB-3627 @JDB-3628 +@JDB-3653 +Scenario Outline: Welsh 3rd Party - Character count warning should be on all applicable pages + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #Juror Log In + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + + #Why are you replying for the person? JDB-3634 + + When I set the radio button to "Arall" + + And I see "You have 100 characters remaining" on the page + And I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + When I see "Manylion y Rheithiwr" on the page + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I see "Manylion y Rheithiwr" on the page + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB + + When I see "Manylion y Rheithiwr" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I press the "Parhau" button + + #Residency JDB-3620 + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Naddo" + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch fanylion" to "Not a resident" + And I press the "Parhau" button + + #CJS JDB-3625 + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Ydy" + And I check the "Arall" checkbox + + And I see "You have 1000 characters remaining" on the page + And I set "Pa ran arall o’r System Cyfiawnder Troseddol?" to "Other CJS part" + And I press the "Parhau" button + + #Bail JDB-3623 + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ydy" + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch fanylion" to "Person on bail" + And I press the "Parhau" button + + #Convictions JDB-3624 + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ydy" + + And I see "You have 1000 characters remaining" on the page + And I set text area with "id" of "convictedDetails" to "Person is convicted" + And I press the "Parhau" button + + #Mental Health Sectioned JDB-3621 + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I set the radio button to "Ie" + + And I see "You have 1000 characters remaining" on the page + And I set "Eglurwch sut y maent yn cael eu cadw dan glo, sut ofal maent yn ei gael neu sut maent yn cael eu trin o dan y Ddeddf Iechyd" to "Person is sectioned" + And I press the "Parhau" button + + #JDB-3467 + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + + #Mental Health Capacity JDB-3622 + + When I see "Cymhwysedd" on the page + And I set the radio button to "Ie" + + And I see "You have 1000 characters remaining" on the page + And I set "Eglurwch yn gryno pam y penderfynwyd nad oes ganddynt alluedd meddyliol" to "Person lacks capacity" + And I press the "Parhau" button + + #The person can attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + + #RA JDB-3627 and JDB-3628 + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Oes" + + And I see "You have 1000 characters remaining" on the page + And I set "Rhowch wybod inni am unrhyw drefniadau arbennig neu gymorth bydd yr unigolyn rydych yn ymateb ar ei ran ei angen wrth iddo wasanaethu ar reithgor." to "Wheelchair user" + When I check the "Arall" checkbox + And I set "Rhowch fanylion os gwelwch yn dda" to "Other RA stuff" + And I press the "Parhau" button + + #Check your answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + #Deferral Reason JDB-3626 + + When I see "You have 1000 characters remaining" on the page + And I set text area with "id" of "deferralReason" to "Defer them please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + #Deferral Dates + + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + And I press the "Parhau" button + + #confirm dates + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + When I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen iddo gael ei esgusodi rhag gwasanaethu ar reithgor?" on the page + + #Excusal Reason JDB-3618 + + When I see "You have 1000 characters remaining" on the page + And I set text area with "id" of "excusalReason" to "Excuse them please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #When I press the "Submit" button + + When I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + Then I see "Os byddwn yn cysylltu â nhw, efallai bydd angen iddynt ddarparu eu rhif rheithiwr. Mae'r rhif hefyd ar y llythyr bu inni anfon atynt." on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500884 |DOE |SW1H 9AJ |a@eeee.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_BetaBanner.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_BetaBanner.feature new file mode 100644 index 00000000..abf1fb41 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_BetaBanner.feature @@ -0,0 +1,247 @@ +Feature: Welsh_3rd_BetaBanner + +# Beta banner has been removed 27-07-20 + +@RegressionWelsh @JDB-3522 @JDB-4570 +Scenario Outline: Welsh 3rd Party Beta Banner Check + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + Then I see "A ydych yn ymateb dros eich hun neu ar ran rhywun arall?" on the page + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + #Juror Log In + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + When I see "Eich Manylion" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + When I see "Eich Manylion" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I see "Eich Manylion" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #Why are you replying? + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + When I see "Manylion y Rheithiwr" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I see "Manylion y Rheithiwr" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB JDB-3369 + + When I see "Manylion y Rheithiwr" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + When I see "Manylion y Rheithiwr" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS no + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I set the radio button to "Nac ydy" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I click on the "Canllawiau mewn perthynas â gwasanaethu ar reithgor os oes gennych euogfarn" link + And on the page I see + |text| + |gorchymyn adsefydlu cymunedol| + |gorchymyn cosb gymunedol| + |gorchymyn cosb ac adsefydlu cymunedol| + |gorchymyn trin a phrofi am gyffuriau| + |gorchymyn ymatal rhag cymryd cyffuriau| + |Ni allant ychwaith wasanaethu ar reithgor os ydynt, yn ystod y 10 mlynedd diwethaf, wedi cael:| + When I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'?" on the page + When I see "Cymhwysedd" on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + + #Confirm Date of Jury Service + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + #RA no + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I set the radio button to "Nac oes" + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I press the "Parhau" button + + #Check your answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + #Confirm Date of Jury Service + + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + #Deferral Reason + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set text area with "id" of "deferralReason" to "Defer them please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + #Deferral Dates + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check Your Answers Now + + When I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + + #Confirm Date of Jury Service + + When I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen iddo gael ei esgusodi rhag gwasanaethu ar reithgor?" on the page + + #Excusal Reason + + When I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + And I set text area with "id" of "excusalReason" to "Excuse them please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + When I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + + #When I press the "Submit" button + + Then I see "Rydym wedi anfon e-bost i ddweud eich bod wedi ymateb i'r wŷs hon." on the page + And I do not see "Gwasanaeth newydd yw hwn – bydd eich adborth yn ein helpu i’w wella" on the page + +Examples: + |part_no |last_name |postcode |email |pool_no | + |841500099 |LNAME99 |CH1 2AN |a@eeee.com |415181001 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_MoreJurorDetails.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_MoreJurorDetails.feature new file mode 100644 index 00000000..77fe6f68 --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_3rd_MoreJurorDetails.feature @@ -0,0 +1,97 @@ +Feature: Welsh_3rd_MoreJurorDetails + +@RegressionWelsh @JDB-3424 @JDB-3423 @JDB-3422 +Scenario Outline: + Given I am on the welsh version of "Public" "juror-test02" + Given the juror numbers have not been processed + |part_no |pool_no |owner | + |<part_no> |<pool_no> |400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + #Juror Log In + + When I set "Rhif rheithiwr – 9 digid" to "<part_no>" + When I set "Cyfenw'r Rheithiwr" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name JDB-3380 and JDB-3365 + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror JDB-3368 and JDB-3366 + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact JDB-3379 and JDB-3367 + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + #Why are you replying for the person? Fails below due to ' + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name JDB-3369 and JDB-3422 + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + And I click on the "Beth fydd yn digwydd os ydyw wedi newid ei enw?" link + Then I see "Os yw ei enw wedi newid, byddwn yn cysylltu â chi i wirio hynny. Efallai y byddwn yn gofyn am dystysgrif briodas, tystysgrif partneriaeth sifil neu weithred newid enw." on the page + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address JDB-3369 and JDB-3424 + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB JDB-3369 and JDB-3423 + + When I see "Manylion y Rheithiwr" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror JDB-3369 + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + Then I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + + +Examples: + |part_no |last_name |postcode |email |pool_no | + |645200075 |LNAMESEVENFIVE |SY2 6LU |email@outlook.com |452170401 | + diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_JDB-3635.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_JDB-3635.feature new file mode 100644 index 00000000..10c82a0f --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_JDB-3635.feature @@ -0,0 +1,235 @@ +Feature: Welsh_JDB-3635 + +@RegressionWelsh @JDB-3635 @JDB-3827 +Scenario Outline: Checking that TP is visible in all 3rd Party browser URLs after 3rd party specific screens + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + + #Juror Log In + + When I see "/tp" in the URL + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + Then I see "Beth yw eich enw?" on the page + + #3rd Party Name + + When I see "Eich Manylion" on the page + When I set "Enw cyntaf" to "FirstNameA" + And I set "Cyfenw" to "LastNameB" + And I press the "Parhau" button + Then I see "Eich perthynas â'r unigolyn" on the page + + #Relationship to juror + + When I see "Eich Manylion" on the page + And I set "Sut ydych chi'n adnabod yr unigolyn rydych yn ymateb ar ei ran?" to "Friend" + And I press the "Parhau" button + Then I see "Eich manylion cyswllt" on the page + + #3rd Party Contact + + When I see "Eich Manylion" on the page + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "0207 821 1818" + And I check the "Trwy e-bost" checkbox + And I set "Nodwch gyfeiriad e-bost" to "email@outlook.com" + And I set "Nodwch gyfeiriad e-bost eto" to "email@outlook.com" + And I press the "Parhau" button + + #Why are you replying title + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + And I do not see "Pam ydych chi'n ymateb?" on the page + + #Why are you replying for juror + #JDB3827 + + When I set the radio button to "Nid yw'r unigolyn yma" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + + #Check juror name + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ydy" + And I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + + #Check juror address + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Ie" + And I press the "Parhau" button + Then I see "Nodwch ddyddiad geni'r unigolyn rydych chi'n ymateb ar ei ran" on the page + + #DoB + + When I see "Manylion y Rheithiwr" on the page + And I set "Diwrnod" to "27" + And I set "Mis" to "04" + And I set "Blwyddyn" to "1981" + And I press the "Parhau" button + Then I see "Efallai bydd yn rhaid inni gysylltu â'r unigolyn i ofyn rhagor o gwestiynau neu roi rhagor o wybodaeth iddynt am eu gwasanaeth rheithgor" on the page + + #Contacting the juror + + When I see "Manylion y Rheithiwr" on the page + And I set the radio button to "Defnyddio'r rhif ffôn rydych eisoes wedi'i ddarparu i gysylltu â chi" + + #Checking field + + And I set the radio button to "Rhoi cyfeiriad e-bost gwahanol ar gyfer y rheithiwr" + And I see "Nodwch gyfeiriad e-bost" on the page + + And I set the radio button to "Defnyddio'r cyfeiriad e-bost rydych eisoes wedi'i ddarparu i gysylltu â chi" + And I press the "Parhau" button + + #Qualify for jury service + + When I see "Cadarnhau a yw'r unigolyn yn gymwys i wasanaethu ar reithgor" on the page + And I see "/tp" in the URL + And I press the "Parhau" button + + #Residency + + Then I see "Ers iddynt droi'n 13 oed, a yw eu prif gyfeiriad wedi bod yn y DU, Ynysoedd y Sianel neu Ynys Manaw am unrhyw gyfnod o 5 mlynedd o leiaf?" on the page + When I see "Cymhwysedd" on the page + And I see "/tp" in the URL + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS no + + Then I see "A yw'r person yr ydych yn ymateb ar ei ran wedi gweithio yn y system cyfiawnder troseddol yn y 5 mlynedd diwethaf?" on the page + When I see "/tp" in the URL + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Bail + + Then I see "A yw'r unigolyn ar fechnïaeth ar hyn o bryd am gyflawni trosedd?" on the page + When I see "Cymhwysedd" on the page + And I see "/tp" in the URL + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Convictions + + Then I see "A yw'r unigolyn wedi'i gael yn euog o drosedd?" on the page + When I see "Cymhwysedd" on the page + And I see "/tp" in the URL + And I set the radio button to "Nac ydy" + And I press the "Parhau" button + + #Mental Health Sectioned + + Then I see "A ydi'r person yr ydych yn ymateb ar ei ran yn cael ei gadw, ei warchod neu ei drin o dan y Ddeddf Iechyd Meddwl?" on the page + When I see "Cymhwysedd" on the page + And I see "/tp" in the URL + And I set the radio button to "Na" + And I press the "Parhau" button + + #Mental Health Capacity + + Then I see "A wnaed penderfyniad nad oes gan y person yr ydych yn ymateb ar ei ran y 'gallu meddyliol'" on the page + When I see "Cymhwysedd" on the page + And I see "/tp" in the URL + And I set the radio button to "Na" + And I press the "Parhau" button + + #The person can attend + + Then I see "Gwiriwch eich dyddiad dechrau" on the page + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I see "/tp" in the URL + And I press the "Parhau" button + + #RA no + + Then I see "A fydd yr unigolyn rydych yn ymateb ar ei ran angen cymorth pan fydd yn y llys?" on the page + When I see "/tp" in the URL + And I set the radio button to "Nac oes" + And I press the "Parhau" button + + #Check your answers + + Then I see "Gwiriwch eich ymatebion nawr" on the page + When I see "/tp" in the URL + And I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + And I see "/tp" in the URL + When I set the radio button to "Nac ydi, rhaid newid y dyddiad" + And I press the "Parhau" button + Then I see "Dywedwch wrthym pam fod angen dyddiad arall arnynt ar gyfer y gwasanaeth rheithgor" on the page + + #Deferral Reason + + When I see "/tp" in the URL + When I set text area with "id" of "deferralReason" to "Defer me please" + And I press the "Parhau" button + Then I see "Dewiswch 3 dydd Llun pan allant ddechrau gwasanaeth rheithgor" on the page + + #Deferral Dates + + When I see "/tp" in the URL + When I set the "First" single date field to a Monday "6" weeks in the future + When I set the "Second" single date field to a Monday "7" weeks in the future + When I set the "Third" single date field to a Monday "8" weeks in the future + + And I press the "Parhau" button + + And I set the radio button to "Ydw" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see "/tp" in the URL + + #Check your answers now + + And I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + And I see "/tp" in the URL + When I set the radio button to "Nac ydi, ni all yr unigolyn wasanaethu ar reithgor a rhaid esgusodi" + And I press the "Parhau" button + Then I see "Pam fod angen iddo gael ei esgusodi rhag gwasanaethu ar reithgor?" on the page + + #Excusal Reason + + When I see "/tp" in the URL + And I set text area with "id" of "excusalReason" to "Excuse me please" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + #Check your answers now + + And I click on the "Newid" link in the same row as "Cadarnhewch ddyddiad ei wasanaeth rheithgor" + Then I see "Gwiriwch eich dyddiad dechrau" on the page + And I see "/tp" in the URL + When I set the radio button to "Ydi, mae'r unigolyn yn gallu dechrau" + And I press the "Parhau" button + Then I see "Gwiriwch eich ymatebion nawr" on the page + + When I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + And I press the "Cyflwyno" button + + #When I press the "Submit" button + + Then I see "Rydym wedi anfon e-bost i ddweud eich bod wedi ymateb i'r wŷs hon." on the page + And I see "/tp" in the URL + +Examples: + |part_no |last_name |postcode |email |pool_no | + |641500598 |DOE |SW1H 9AJ |email@outlook.com |415170401 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_LogOn_Content.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_LogOn_Content.feature new file mode 100644 index 00000000..ed9c0c1e --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_LogOn_Content.feature @@ -0,0 +1,90 @@ +Feature: Welsh_LogOn_Content + +@RegressionWelsh @JDB-3081 @JDB-3077 @JDB-3080 +Scenario Outline: + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "Rwy'n ymateb ar ran rhywun arall" + And I press the "Parhau" button + Then I see "Ei fanylion rheithiwr" on the page + + When I click on the "Nid oes gennyf rif rheithiwr" link + Then I see "Bradford" on the page + And I do not see "Pocock" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then I see "Eich Manylion" on the page + + When I set "Enw cyntaf" to "FirstNamea" + And I set "Cyfenw" to "LastNameb" + And I press the "Parhau" button + + And I set "Sut ydych chi" to "Friend" + And I press the "Parhau" button + + And I check the "Dros y ffôn (rhifau yn y DU yn unig)" checkbox + And I set "Prif rif ffôn" to "02078211818" + And I check the "Trwy e" checkbox + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + + Then I see "Pam ydych chi'n ymateb ar ran yr unigolyn arall?" on the page + + And I set the radio button to "Nid yw'r unigolyn yn gallu ymateb dros ei hun" + And I press the "Parhau" button + Then I see "A yw'r enw sydd gennym ar ei gyfer yn gywir?" on the page + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Ei gyfeiriad ef yw hwn?" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + +#I want to set the year dynamically to current year - 16 + + And I set "Blwyddyn" to "2006" + And I press the "Parhau" button + + Then I see "Cadarnhewch ddyddiad geni" on the page + And I see "unigolyn oedd 27 Ebrill 2006" on the page + And I see "r dyddiad geni yn gywir?" on the page + + Then I set the radio button to "Na" + And I press the "Parhau" button + + And I set "Diwrnod" to "02" + And I set "Mis" to "04" + + And I press the "Parhau" button + + Then I set the radio button to "Ie" + And I press the "Parhau" button + + Then I see "Gwiriwch eich ymatebion nawr" on the page + And I see text "2 Ebrill 2006" in the same row as "Dyddiad geni" + + Then I check the "Hyd gwn i, mae'r wybodaeth rwyf wedi ei rhoi am yr unigolyn rwyf yn ymateb ar ei ran yn gywir." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + +Examples: + | part_no |last_name |postcode | email | pool_no | + |841500146 |LNAME146 |CH1 2AN |a@eeee.com |415181001 | diff --git a/src/test/resources/cucumber/features/regressionWelsh/Welsh_Yes_No.feature b/src/test/resources/cucumber/features/regressionWelsh/Welsh_Yes_No.feature new file mode 100644 index 00000000..9c30a75f --- /dev/null +++ b/src/test/resources/cucumber/features/regressionWelsh/Welsh_Yes_No.feature @@ -0,0 +1,117 @@ +Feature: Welsh_Yes_No + +@RegressionWelsh @JDB-3085 @JDB-3089 @JDB-3091 +Scenario Outline: + Given I am on the welsh version of "Public" "bau-test" + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + And "<part_no>" has "LNAME" as "<last_name>" + And "<part_no>" has "RET_DATE" as "5 mondays time" + And "<part_no>" has "NEXT_DATE" as "5 mondays time" + And "<part_no>" has "ZIP" as "<postcode>" + + And I set the radio button to "n ymateb dros fy hun" + And I press the "Parhau" button + Then I see "Eich manylion rheithiwr" on the page + + When I set "Rhif rheithiwr" to "<part_no>" + When I set "Cyfenw" to "<last_name>" + When I set "Cod post Rheithiwr" to "<postcode>" + And I press the "Parhau" button + + Then I see "Eich Manylion" on the page + + #Juror's details + + Then I see "A yw'r enw sydd gennym ar eich cyfer chi yn gywir?" on the page + And I set the radio button to "Ydy" + When I press the "Parhau" button + Then I see "Eich cyfeiriad chi yw hwn?" on the page + And I set the radio button to "Ie" + When I press the "Parhau" button + + When I set "Prif rif ffôn" to "02078211818" + And I press the "Parhau" button + + When I set input field with "id" of "emailAddress" to "<email>" + When I set input field with "id" of "emailAddressConfirmation" to "<email>" + And I press the "Parhau" button + + When I set "Diwrnod" to "27" + And I set "Mis" to "04" + + #I want to set the year dynamically to current year - 40 + + And I set "Blwyddyn" to "1978" + And I press the "Parhau" button + + + #do you qualify for jury service? + + And I press the "Parhau" button + + And I set the radio button to "Do" + And I press the "Parhau" button + + #CJS + ##JDB-3091 + + And I set the radio button to "Nac ydw" + And I set the radio button to "Ydw" + And I see "Dewiswch unrhyw sefydliadau rydych wedi gweithio iddynt." on the page + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + # Bail + + And I set the radio button to "Nac ydw" + And I press the "Parhau" button + + And I set the radio button to "Naddo" + And I press the "Parhau" button + + #mental health + ##JDB-3085 + Then I see "Ydych chi'n cael eich cadw, yn cael eich gwarchod neu eich trin o dan y Ddeddf Galluedd Meddyliol?" on the page + And I set the radio button to "Na" + And I set the radio button to "Ie" + And I see "Eglurwch sut yr ydych yn cael eich cadw dan glo, sut ofal ydych yn ei gael neu sut yr ydych yn cael eich trin o dan y Ddeddf Iechyd Meddwl" on the page + And I set the radio button to "Na" + And I press the "Parhau" button + Then I see "A benderfynwyd nad oes gennych y gallu meddyliol?" on the page + + When I set the radio button to "Na" + And I press the "Parhau" button + + #can you attend, select excusal + #JDB-3089 + + And I set the radio button to "Nac ydw, ni allaf wasanaethu ar reithgor a hoffwn gael fy esgusodi" + And I press the "Parhau" button + + #reasons for excusal + + And I set text area with "id" of "excusalReason" to "reasons for excusal request" + And I press the "Parhau" button + + #Special Reqs + + And I set the radio button to "Nac oes" + When I press the "Parhau" button + + #Check your answers page + + Then I see "Gwiriwch eich ymatebion nawr" on the page + + Then I check the "Mae'r wybodaeth a roddais uchod yn wir hyd eithaf fy ngwybodaeth." checkbox + When I press the "Cyflwyno" button + + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "Rydych wedi cwblhau'r broses ymateb" on the page + Then I see "<part_no>" on the page + +Examples: + | part_no |last_name |postcode | email | pool_no| + |841501661 |LNAMESIXSIXZERO |CH1 2AN |a@eeee.com |415181001| diff --git a/src/test/resources/cucumber/features/skeletonTest/JM-2034.feature b/src/test/resources/cucumber/features/skeletonTest/JM-2034.feature new file mode 100644 index 00000000..d7ae1a48 --- /dev/null +++ b/src/test/resources/cucumber/features/skeletonTest/JM-2034.feature @@ -0,0 +1,67 @@ +Feature: JM-2034 delete pool requests + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to delete a pool request as a bureau user + Given I am on "Bureau" "test" + + And I log in as "<user>" + When I navigate to the pool request screen + + #create pool request + Then I create a "<poolType>" court pool request for court "<court>" + + #delete pool request + And I navigate to the pool search screen + When I enter the pool number of the pool I have just created on the pool search screen + And I press the "Continue" button + + And I click the delete pool request button + Then I am asked if I'm sure I want to delete + When I click the confirm deletion button + Then a message is displayed on the pool requests page informing me that the pool has been deleted + And the pool is no longer visible + + Examples: + |user |poolType |court | + |MODTESTBUREAU|Crown |415 | + |MODTESTBUREAU|High |415 | + |MODTESTBUREAU|Civil |415 | + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test that I am unable to delete a pool request with Jurors allocated to it + Given I am on "Bureau" "test" + + And I log in as "<user>" + When I navigate to the pool request screen + + #create pool request + Then I create a "<poolType>" court pool request for court "<court>" with "0" deferral + + #add jurors + And I navigate to the pool search screen + When I enter the pool number of the pool I have just created on the pool search screen + And I press the "Continue" button + + Then I press the "Summon jurors" button + And I set "Citizens to summon" to "5" + And I press the "Create pool and summon citizens" button + + #retrive pool from Active Pools + And I navigate to the pool search screen + And I enter the pool number of the pool I have just created on the pool search screen + And I press the "Continue" button + + #try to delete + And I click the delete pool request button + Then I am asked if I'm sure I want to delete this pool + When I click the confirm deletion button + Then I see "Unable to delete pool" in the pool banner + + #tear down pool + Then I clear down the data for the pool + + Examples: + |user |poolType |court | + |MODTESTBUREAU|Crown |415 | + |MODTESTBUREAU|High |415 | + |MODTESTBUREAU|Civil |415 | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/skeletonTest/JM-251.feature b/src/test/resources/cucumber/features/skeletonTest/JM-251.feature new file mode 100644 index 00000000..71c26572 --- /dev/null +++ b/src/test/resources/cucumber/features/skeletonTest/JM-251.feature @@ -0,0 +1,116 @@ +Feature: JM-251 + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to create a new pool of jurors to be summoned for jury duty as a bureau officer + Given I am on "Bureau" "test" + + Given a bureau owned pool is created with jurors + | court |juror_number | pool_number | att_date_weeks_in_future | owner | + | <court> |<juror_number> | <pool_number> | 5 | 400 | + + Given I log in as "<user>" + + And I navigate to the pool request screen + And I create a "<poolType>" court pool request for court "<court>" with "0" deferral + + Then I can see the newly created pool + + Given a deferral is inserted for an existing juror new schema + |owner | pool_no | part_no | no_weeks| loc_code | + |400 | <pool_number> | <juror_number> | 9 | <court> | + + When I select the pool that I have just created to move to the pool summary page + Then the system will display non-editable information on the pool summary screen + |jurorsRequested |150 | + |jurorsConfirmed |0 | + |jurorsSummoned |0 | + |currentPoolSize |0 /150 | + |courtName |Chester | + |courtLocationCode |<court> | + |courtStartDate | | + + And the pool summary donut displays + |summoned |0 | + |required |150| + |confirmed |0 | + |unavailable |0 | + |notResponded |0 | + |surplus |0 | + + And I see the pool status is REQUESTED + + # Can move to the summon citizens for pool screen + + And I press the "Summon jurors" button + Then I should see the editable and non-editable information on the summon citizens for pool screen + |jurorsRequested |150 | + |jurorsRequired |149 | + |courtCatchmentArea |<court>| + |deferrals |1 | + + #error if no value entered + And I press the "Create pool and summon citizens" button + Then I see "Enter the number of citizens to summon" on the page + + # Can see an error if the amount of citizens summoned is more than allowed + When I set the number of users I want to summon to "5000" + Then I should see an error stating the amount of citizens summoned is more than allowed + + # Can successfully submit a pool request + When I set the number of users I want to summon to "149" + + #retrive pool + When I click on the "Search" link + When I search for pool number + + And I see the pool status is ACTIVE + + And the pool summary donut displays + |summoned |150 | + |required |150 | + |confirmed |1 | + |unavailable |0 | + |notResponded |149 | + |surplus |0 | + + Examples: + |user |poolType |court | juror_number | pool_number | + |MODTESTBUREAU |Crown |415 | 041500014 | 415300112 | + + + @JurorTransformationMulti @NewSchemaConverted + Scenario Outline: Test to create a new pool of jurors to be summoned for jury duty as a court officer + Given I am on "Bureau" "test" + + And I log in as "<user>" + + And I navigate to the pool request screen + + And I create a "<poolType>" court pool request + Then I can see the newly created pool + + When I select the pool that I have just created to move to the pool summary page + Then the system will display non-editable information on the pool summary screen + |jurorsRequested |150 | + |jurorsConfirmed |0 | + |jurorsSummoned |0 | + |currentPoolSize |0 /150 | + |courtName |Chester | + |courtLocationCode |415 | + |courtStartDate | | + + And I see the pool status is REQUESTED + + And the pool summary donut displays + |summoned |0 | + |required |150| + |confirmed |0 | + |unavailable |0 | + |notResponded |0 | + |surplus |0 | + + And the Summon citizens button is not visible + + Examples: + |user |poolType | + |MODTESTCOURT |Crown | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/smoketest/SmokeTest_buraeu.feature b/src/test/resources/cucumber/features/smoketest/SmokeTest_buraeu.feature new file mode 100644 index 00000000..5920593a --- /dev/null +++ b/src/test/resources/cucumber/features/smoketest/SmokeTest_buraeu.feature @@ -0,0 +1,35 @@ +Feature: Environment Smoke Tests - Bureau + +@SmokeTest @SmokeTest_Bureau @pod +Scenario: + Given I am on "Bureau" "test" + Given PCQs has been disabled + And I have reset user "SYSTEM" + And I have reset user "CPASS" + And I have deleted all holidays new schema + + And I see "Sign in" on the page + And I log in as "SYSTEM" + Then I see "To do" on the page + + Then I click on the "Search" link + And I see "Advanced search" on the page + When I click on the "Advanced search" link + And I check the Urgent checkbox on Search screen + + And I press the "Search" button + + And I see "results for "is urgent"" on the page + + When I click on "645" in the same row as "645" + And I see "Juror details" on the page + + + + + + + + + + diff --git a/src/test/resources/cucumber/features/smoketest/SmokeTest_notify.feature b/src/test/resources/cucumber/features/smoketest/SmokeTest_notify.feature new file mode 100644 index 00000000..8dd44555 --- /dev/null +++ b/src/test/resources/cucumber/features/smoketest/SmokeTest_notify.feature @@ -0,0 +1,19 @@ +@SmokeTest_Notify +Feature: Notify Email Test + +@Smoketest @JDB-3595 +Scenario Outline: 1st party straight through Notify Email Test + + Given I am on "Public" "test1.1" + + Given the juror numbers have not been processed + | part_no | pool_no | owner | + | <part_no> |<pool_no> | 400 | + + Given I have submitted a straight through response + | part_no |pool_number | last_name |postcode | email | + |<part_no> |<pool_no> | <last_name> |<postcode> |<email> | + +Examples: + |part_no |pool |last_name |postcode |email | + |644200931 |442170401 |LNAMENINETHREEONE |NN1 3HQ |e@mail.com | \ No newline at end of file diff --git a/src/test/resources/cucumber/features/smoketest/SmokeTest_public.feature b/src/test/resources/cucumber/features/smoketest/SmokeTest_public.feature new file mode 100644 index 00000000..c6d68486 --- /dev/null +++ b/src/test/resources/cucumber/features/smoketest/SmokeTest_public.feature @@ -0,0 +1,39 @@ +Feature: Environment Smoke Tests - Public + +@SmokeTest +Scenario: + Given I am on "Public" "test" + Given PCQs has been disabled + Then I see "Reply to a jury summons" on the page + + And I set the radio button to "I am replying for myself" + And I press the "Continue" button + Then I see "Your juror details" on the page + + When I set "9-digit juror number" to "" + And I set "Juror last name" to "" + And I set "Juror postcode" to "" + + When I press the "Continue" button + Then I see "Enter your 9-digit juror number - you can find it on your jury summons letter" on the page + And I see "Enter your last name" on the page + And I see "Enter your postcode" on the page + + When I set "9-digit juror number" to "" + And I set "Juror last name" to "" + And I set "Juror postcode" to "" + + When I set "9-digit juror number" to "123456789" + And I press the "Continue" button + Then I do not see "Enter your 9-digit" on the page + + And I see "Enter your last name" on the page + And I see "Enter your postcode" on the page + + + + + + + + diff --git a/src/test/resources/drivers/chromedriver-linux64_118.0.5993.70/LICENSE.chromedriver b/src/test/resources/drivers/chromedriver-linux64_118.0.5993.70/LICENSE.chromedriver new file mode 100644 index 00000000..a719b5b3 --- /dev/null +++ b/src/test/resources/drivers/chromedriver-linux64_118.0.5993.70/LICENSE.chromedriver @@ -0,0 +1,5748 @@ +// Copyright 2015 The Chromium Authors +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google LLC nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +Google Double Conversion +-------------------- +Copyright 2006-2011, the V8 project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +dynamic annotations +-------------------- +/* Copyright (c) 2008-2009, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * --- + * Author: Kostya Serebryany + */ + +-------------------- +google-glog's symbolization library +-------------------- +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +xdg-mime +-------------------- +-------------------------------------------------------------------------------- +Academic Free License v. 2.0 +-------------------------------------------------------------------------------- + +This Academic Free License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following notice immediately following the copyright notice for the Original +Work: + +Licensed under the Academic Free License version 2.0 +1) Grant of Copyright License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license to do the +following: + +a) to reproduce the Original Work in copies; +b) to prepare derivative works ("Derivative Works") based upon the Original + Work; +c) to distribute copies of the Original Work and Derivative Works to the + public; +d) to perform the Original Work publicly; and +e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license, under patent +claims owned or controlled by the Licensor that are embodied in the Original +Work as furnished by the Licensor, to make, use, sell and offer for sale the +Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred +form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor hereby +agrees to provide a machine-readable copy of the Source Code of the Original +Work along with each copy of the Original Work that Licensor distributes. +Licensor reserves the right to satisfy this obligation by placing a +machine-readable copy of the Source Code in an information repository +reasonably calculated to permit inexpensive and convenient access by You for as +long as Licensor continues to distribute the Original Work, and by publishing +the address of that information repository in a notice immediately following +the copyright notice that applies to the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names +of any contributors to the Original Work, nor any of their trademarks or +service marks, may be used to endorse or promote products derived from this +Original Work without express prior written permission of the Licensor. Nothing +in this License shall be deemed to grant any rights to trademarks, copyrights, +patents, trade secrets or any other intellectual property of Licensor except as +expressly stated herein. No patent license is granted to make, use, sell or +offer to sell embodiments of any patent claims other than the licensed claims +defined in Section 2. No right is granted to the trademarks of Licensor even if +such marks are included in the Original Work. Nothing in this License shall be +interpreted to prohibit Licensor from licensing under different terms from this +License any Original Work that Licensor otherwise would have a right to +license. + +5) This section intentionally omitted. + +6) Attribution Rights. You must retain, in the Source Code of any Derivative +Works that You create, all copyright, patent or trademark notices from the +Source Code of the Original Work, as well as any notices of licensing and any +descriptive text identified therein as an "Attribution Notice." You must cause +the Source Code for any Derivative Works that You create to carry a prominent +Attribution Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that +the copyright in and to the Original Work and the patent rights granted herein +by Licensor are owned by the Licensor or are sublicensed to You under the terms +of this License with the permission of the contributor(s) of those copyrights +and patent rights. Except as expressly stated in the immediately proceeding +sentence, the Original Work is provided under this License on an "AS IS" BASIS +and WITHOUT WARRANTY, either express or implied, including, without limitation, +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. +This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No +license to Original Work is granted hereunder except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, +whether in tort (including negligence), contract, or otherwise, shall the +Licensor be liable to any person for any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License +or the use of the Original Work including, without limitation, damages for loss +of goodwill, work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses. This limitation of liability shall not +apply to liability for death or personal injury resulting from Licensor's +negligence to the extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of incidental or +consequential damages, so this exclusion and limitation may not apply to You. + +9) Acceptance and Termination. If You distribute copies of the Original Work or +a Derivative Work, You must make a reasonable effort under the circumstances to +obtain the express assent of recipients to the terms of this License. Nothing +else but this License (or another written agreement between Licensor and You) +grants You permission to create Derivative Works based upon the Original Work +or to exercise any of the rights granted in Section 1 herein, and any attempt +to do so except under the terms of this License (or another written agreement +between Licensor and You) is expressly prohibited by U.S. copyright law, the +equivalent laws of other countries, and by international treaty. Therefore, by +exercising any of the rights granted to You in Section 1 herein, You indicate +Your acceptance of this License and all of its terms and conditions. + +10) Termination for Patent Action. This License shall terminate automatically +and You may no longer exercise any of the rights granted to You by this License +as of the date You commence an action, including a cross-claim or counterclaim, +for patent infringement (i) against Licensor with respect to a patent +applicable to software or (ii) against any entity with respect to a patent +applicable to the Original Work (but excluding combinations of the Original +Work with other software or hardware). + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this +License may be brought only in the courts of a jurisdiction wherein the +Licensor resides or in which Licensor conducts its primary business, and under +the laws of that jurisdiction excluding its conflict-of-law provisions. The +application of the United Nations Convention on Contracts for the International +Sale of Goods is expressly excluded. Any use of the Original Work outside the +scope of this License or after its termination shall be subject to the +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq., +the equivalent laws of other countries, and international treaty. This section +shall survive the termination of this License. + +12) Attorneys Fees. In any action to enforce the terms of this License or +seeking damages relating thereto, the prevailing party shall be entitled to +recover its costs and expenses, including, without limitation, reasonable +attorneys' fees and costs incurred in connection with such action, including +any appeal of such action. This section shall survive the termination of this +License. + +13) Miscellaneous. This License represents the complete agreement concerning +the subject matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent necessary to +make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether +in upper or lower case, means an individual or a legal entity exercising rights +under, and complying with all of the terms of, this License. For legal +entities, "You" includes any entity that controls, is controlled by, or is +under common control with you. For purposes of this definition, "control" means +(i) the power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of such +entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise +restricted or conditioned by this License or by law, and Licensor promises not +to interfere with or be responsible for such uses by You. + +This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. +Permission is hereby granted to copy and distribute this license without +modification. This license may not be modified without the express written +permission of its copyright owner. + +-------------------- +xdg-user-dirs +-------------------- + Copyright (c) 2007 Red Hat, inc + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +-------------------- +Abseil +-------------------- + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +-------------------- +Implementation of WebDriver BiDi standard +-------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +-------------------- +BoringSSL +-------------------- +BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL +licensing. Files that are completely new have a Google copyright and an ISC +license. This license is reproduced at the bottom of this file. + +Contributors to BoringSSL are required to follow the CLA rules for Chromium: +https://cla.developers.google.com/clas + +Files in third_party/ have their own licenses, as described therein. The MIT +license, for third_party/fiat, which, unlike other third_party directories, is +compiled into non-test libraries, is included below. + +The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the +OpenSSL License and the original SSLeay license apply to the toolkit. See below +for the actual license texts. Actually both licenses are BSD-style Open Source +licenses. In case of any license issues related to OpenSSL please contact +openssl-core@openssl.org. + +The following are Google-internal bug numbers where explicit permission from +some authors is recorded for use of their work. (This is purely for our own +record keeping.) + 27287199 + 27287880 + 27287883 + 263291445 + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + + +ISC license used for completely new code in BoringSSL: + +/* Copyright (c) 2015, Google Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + + +The code in third_party/fiat carries the MIT license: + +Copyright (c) 2015-2016 the fiat-crypto authors (see +https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Licenses for support code +------------------------- + +Parts of the TLS test suite are under the Go license. This code is not included +in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so +distributing code linked against BoringSSL does not trigger this license: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +BoringSSL uses the Chromium test infrastructure to run a continuous build, +trybots etc. The scripts which manage this, and the script for generating build +metadata, are under the Chromium license. Distributing code linked against +BoringSSL does not trigger this license. + +Copyright 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +Fiat-Crypto: Synthesizing Correct-by-Construction Code for Cryptographic Primitives +-------------------- +The MIT License (MIT) + +Copyright (c) 2015-2020 the fiat-crypto authors (see +https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------- +Brotli +-------------------- +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------- +Compact Encoding Detection +-------------------- +// Copyright 2010 The Chromium Authors +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google LLC nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +Crashpad +-------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------- +CRC32C +-------------------- +Copyright 2017, The CRC32C Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +dav1d is an AV1 decoder :) +-------------------- +Copyright © 2018, VideoLAN and dav1d authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +Expat XML Parser +-------------------- +Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper +Copyright (c) 2001-2022 Expat maintainers + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------- +ffmpeg +-------------------- +# License + +Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 +or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other +files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to +FFmpeg. + +Some optional parts of FFmpeg are licensed under the GNU General Public License +version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of +these parts are used by default, you have to explicitly pass `--enable-gpl` to +configure to activate them. In this case, FFmpeg's license changes to GPL v2+. + +Specifically, the GPL parts of FFmpeg are: + +- libpostproc +- optional x86 optimization in the files + - `libavcodec/x86/flac_dsp_gpl.asm` + - `libavcodec/x86/idct_mmx.c` + - `libavfilter/x86/vf_removegrain.asm` +- the following building and testing tools + - `compat/solaris/make_sunver.pl` + - `doc/t2h.pm` + - `doc/texi2pod.pl` + - `libswresample/tests/swresample.c` + - `tests/checkasm/*` + - `tests/tiny_ssim.c` +- the following filters in libavfilter: + - `signature_lookup.c` + - `vf_blackframe.c` + - `vf_boxblur.c` + - `vf_colormatrix.c` + - `vf_cover_rect.c` + - `vf_cropdetect.c` + - `vf_delogo.c` + - `vf_eq.c` + - `vf_find_rect.c` + - `vf_fspp.c` + - `vf_histeq.c` + - `vf_hqdn3d.c` + - `vf_kerndeint.c` + - `vf_lensfun.c` (GPL version 3 or later) + - `vf_mcdeint.c` + - `vf_mpdecimate.c` + - `vf_nnedi.c` + - `vf_owdenoise.c` + - `vf_perspective.c` + - `vf_phase.c` + - `vf_pp.c` + - `vf_pp7.c` + - `vf_pullup.c` + - `vf_repeatfields.c` + - `vf_sab.c` + - `vf_signature.c` + - `vf_smartblur.c` + - `vf_spp.c` + - `vf_stereo3d.c` + - `vf_super2xsai.c` + - `vf_tinterlace.c` + - `vf_uspp.c` + - `vf_vaguedenoiser.c` + - `vsrc_mptestsrc.c` + +Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then +the configure parameter `--enable-version3` will activate this licensing option +for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts, +`COPYING.GPLv3` to learn the exact legal terms that apply in this case. + +There are a handful of files under other licensing terms, namely: + +* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and + `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for + licensing details. Specifically note that you must credit the IJG in the + documentation accompanying your program if you only distribute executables. + You must also indicate any changes including additions and deletions to + those three files in the documentation. +* `tests/reference.pnm` is under the expat license. + + +## External libraries + +FFmpeg can be combined with a number of external libraries, which sometimes +affect the licensing of binaries resulting from the combination. + +### Compatible libraries + +The following libraries are under GPL version 2: +- avisynth +- frei0r +- libcdio +- libdavs2 +- librubberband +- libvidstab +- libx264 +- libx265 +- libxavs +- libxavs2 +- libxvid + +When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by +passing `--enable-gpl` to configure. + +The following libraries are under LGPL version 3: +- gmp +- libaribb24 +- liblensfun + +When combining them with FFmpeg, use the configure option `--enable-version3` to +upgrade FFmpeg to the LGPL v3. + +The VMAF, mbedTLS, RK MPI, OpenCORE and VisualOn libraries are under the Apache License +2.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with +version 3 of those licenses. So to combine these libraries with FFmpeg, the +license version needs to be upgraded by passing `--enable-version3` to configure. + +The smbclient library is under the GPL v3, to combine it with FFmpeg, +the options `--enable-gpl` and `--enable-version3` have to be passed to +configure to upgrade FFmpeg to the GPL v3. + +### Incompatible libraries + +There are certain libraries you can combine with FFmpeg whose licenses are not +compatible with the GPL and/or the LGPL. If you wish to enable these +libraries, even in circumstances that their license may be incompatible, pass +`--enable-nonfree` to configure. This will cause the resulting binary to be +unredistributable. + +The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are +incompatible with the GPLv2 and v3. To the best of our knowledge, they are +compatible with the LGPL. + + +******************************************************************************** + +libavcodec/arm/jrevdct_arm.S + +C-like prototype : + void j_rev_dct_arm(DCTBLOCK data) + + With DCTBLOCK being a pointer to an array of 64 'signed shorts' + + Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +******************************************************************************** + +libavcodec/arm/vp8dsp_armv6.S + +VP8 ARMv6 optimisations + +Copyright (c) 2010 Google Inc. +Copyright (c) 2010 Rob Clark <rob@ti.com> +Copyright (c) 2011 Mans Rullgard <mans@mansr.com> + +This file is part of FFmpeg. + +FFmpeg is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +FFmpeg is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with FFmpeg; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +This code was partially ported from libvpx, which uses this license: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +* Neither the name of Google nor the names of its contributors may +be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************** + +libavcodec/x86/xvididct.asm + +XVID MPEG-4 VIDEO CODEC + + Conversion from gcc syntax to x264asm syntax with modifications + by Christophe Gisquet <christophe.gisquet@gmail.com> + + =========== SSE2 inverse discrete cosine transform =========== + + Copyright(C) 2003 Pascal Massimino <skal@planet-d.net> + + Conversion to gcc syntax with modifications + by Alexander Strange <astrange@ithinksw.com> + + Originally from dct/x86_asm/fdct_sse2_skal.asm in Xvid. + + Vertical pass is an implementation of the scheme: + Loeffler C., Ligtenberg A., and Moschytz C.S.: + Practical Fast 1D DCT Algorithm with Eleven Multiplications, + Proc. ICASSP 1989, 988-991. + + Horizontal pass is a double 4x4 vector/matrix multiplication, + (see also Intel's Application Note 922: + http://developer.intel.com/vtune/cbts/strmsimd/922down.htm + Copyright (C) 1999 Intel Corporation) + + More details at http://skal.planet-d.net/coding/dct.html + + ======= MMX and XMM forward discrete cosine transform ======= + + Copyright(C) 2001 Peter Ross <pross@xvid.org> + + Originally provided by Intel at AP-922 + http://developer.intel.com/vtune/cbts/strmsimd/922down.htm + (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm) + but in a limited edition. + New macro implements a column part for precise iDCT + The routine precision now satisfies IEEE standard 1180-1990. + + Copyright(C) 2000-2001 Peter Gubanov <peter@elecard.net.ru> + Rounding trick Copyright(C) 2000 Michel Lespinasse <walken@zoy.org> + + http://www.elecard.com/peter/idct.html + http://www.linuxvideo.org/mpeg2dec/ + + These examples contain code fragments for first stage iDCT 8x8 + (for rows) and first stage DCT 8x8 (for columns) + + conversion to gcc syntax by Michael Niedermayer + + ====================================================================== + + This file is part of FFmpeg. + + FFmpeg is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + FFmpeg is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with FFmpeg; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +******************************************************************************** + +libavformat/oggparsetheora.c + +Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +******************************************************************************** + +libavutil/x86/x86inc.asm + +x86inc.asm: x264asm abstraction layer + + Copyright (C) 2005-2018 x264 project + + Authors: Loren Merritt <lorenm@u.washington.edu> + Henrik Gramner <henrik@gramner.com> + Anton Mitrofanov <BugMaster@narod.ru> + Fiona Glaser <fiona@x264.com> + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +******************************************************************************** + +libavcodec/jrevdct.c + +This file is part of the Independent JPEG Group's software. + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and +you, its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1994-1996, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to +these conditions: +(1) If any part of the source code for this software is distributed, then +this README file must be included, with this copyright and no-warranty +notice unaltered; and any additions, deletions, or changes to the original +files must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work +of the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG +code, not just to the unmodified library. If you use our work, you ought +to acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company +name in advertising or publicity relating to this software or products +derived from it. This software may be referred to only as "the Independent +JPEG Group's software". + +We specifically permit and encourage the use of this software as the basis +of commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + +******************************************************************************** + +libavcodec/mips/aacdec_mips.h +libavcodec/mips/aacsbr_mips.h +libavcodec/mips/compute_antialias_fixed.h +libavcodec/mips/compute_antialias_float.h +libavutil/fixed_dsp.c +libavutil/fixed_dsp.h +libavutil/mips/libm_mips.h +libavutil/softfloat_tables.h + +Copyright (c) 2012 +MIPS Technologies, Inc., California. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Authors: +Branimir Vasic (bvasic@mips.com) +Darko Laus (darko@mips.com) +Djordje Pesut (djordje@mips.com) +Goran Cordasic (goran@mips.com) +Nedeljko Babic (nedeljko.babic imgtec com) +Mirjana Vulin (mvulin@mips.com) +Stanislav Ocovaj (socovaj@mips.com) +Zoran Lukic (zoranl@mips.com) + +******************************************************************************** + +libavformat/oggdec.c +libavformat/oggdec.h +libavformat/oggparseogm.c +libavformat/oggparsevorbis.c + +Copyright (C) 2005 Michael Ahlberg, MÃ¥ns RullgÃ¥rd + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +******************************************************************************** + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! +-------------------- +FreeType +-------------------- + The FreeType Project LICENSE + ---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © <year> The FreeType + Project (www.freetype.org). All rights reserved. + """ + + Please replace <year> with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + https://www.freetype.org + + +--- end of FTL.TXT --- + +-------------------- +harfbuzz-ng +-------------------- +HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. +For parts of HarfBuzz that are licensed under different licenses see individual +files names COPYING in subdirectories where applicable. + +Copyright © 2010-2022 Google, Inc. +Copyright © 2015-2020 Ebrahim Byagowi +Copyright © 2019,2020 Facebook, Inc. +Copyright © 2012,2015 Mozilla Foundation +Copyright © 2011 Codethink Limited +Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies) +Copyright © 2009 Keith Stribley +Copyright © 2011 Martin Hosken and SIL International +Copyright © 2007 Chris Wilson +Copyright © 2005,2006,2020,2021,2022,2023 Behdad Esfahbod +Copyright © 2004,2007,2008,2009,2010,2013,2021,2022,2023 Red Hat, Inc. +Copyright © 1998-2005 David Turner and Werner Lemberg +Copyright © 2016 Igalia S.L. +Copyright © 2022 Matthias Clasen +Copyright © 2018,2021 Khaled Hosny +Copyright © 2018,2019,2020 Adobe, Inc +Copyright © 2013-2015 Alexei Podtelezhnikov + +For full copyright notices consult the individual files in the package. + + +Permission is hereby granted, without written agreement and without +license or royalty fees, to use, copy, modify, and distribute this +software and its documentation for any purpose, provided that the +above copyright notice and the following two paragraphs appear in +all copies of this software. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN +IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO +PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +-------------------- +icu +-------------------- +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +See Terms of Use <https://www.unicode.org/copyright.html> +for definitions of Unicode Inc.’s Data Files and Software. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2023 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + +---------------------------------------------------------------------- + +Third-Party Software Licenses + +This section contains third-party software notices and/or additional +terms for licensed third-party software components included within ICU +libraries. + +---------------------------------------------------------------------- + +ICU License - ICU 1.8.1 to ICU 57.1 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1995-2016 International Business Machines Corporation and others +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +All trademarks and registered trademarks mentioned herein are the +property of their respective owners. + +---------------------------------------------------------------------- + +Chinese/Japanese Word Break Dictionary Data (cjdict.txt) + + # The Google Chrome software developed by Google is licensed under + # the BSD license. Other software included in this distribution is + # provided under other licenses, as set forth below. + # + # The BSD License + # http://opensource.org/licenses/bsd-license.php + # Copyright (C) 2006-2008, Google Inc. + # + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided with + # the distribution. + # Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # + # The word list in cjdict.txt are generated by combining three word lists + # listed below with further processing for compound word breaking. The + # frequency is generated with an iterative training against Google web + # corpora. + # + # * Libtabe (Chinese) + # - https://sourceforge.net/project/?group_id=1519 + # - Its license terms and conditions are shown below. + # + # * IPADIC (Japanese) + # - http://chasen.aist-nara.ac.jp/chasen/distribution.html + # - Its license terms and conditions are shown below. + # + # ---------COPYING.libtabe ---- BEGIN-------------------- + # + # /* + # * Copyright (c) 1999 TaBE Project. + # * Copyright (c) 1999 Pai-Hsiang Hsiao. + # * All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the TaBE Project nor the names of its + # * contributors may be used to endorse or promote products derived + # * from this software without specific prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # /* + # * Copyright (c) 1999 Computer Systems and Communication Lab, + # * Institute of Information Science, Academia + # * Sinica. All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the Computer Systems and Communication Lab + # * nor the names of its contributors may be used to endorse or + # * promote products derived from this software without specific + # * prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, + # University of Illinois + # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 + # + # ---------------COPYING.libtabe-----END-------------------------------- + # + # + # ---------------COPYING.ipadic-----BEGIN------------------------------- + # + # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science + # and Technology. All Rights Reserved. + # + # Use, reproduction, and distribution of this software is permitted. + # Any copy of this software, whether in its original form or modified, + # must include both the above copyright notice and the following + # paragraphs. + # + # Nara Institute of Science and Technology (NAIST), + # the copyright holders, disclaims all warranties with regard to this + # software, including all implied warranties of merchantability and + # fitness, in no event shall NAIST be liable for + # any special, indirect or consequential damages or any damages + # whatsoever resulting from loss of use, data or profits, whether in an + # action of contract, negligence or other tortuous action, arising out + # of or in connection with the use or performance of this software. + # + # A large portion of the dictionary entries + # originate from ICOT Free Software. The following conditions for ICOT + # Free Software applies to the current dictionary as well. + # + # Each User may also freely distribute the Program, whether in its + # original form or modified, to any third party or parties, PROVIDED + # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear + # on, or be attached to, the Program, which is distributed substantially + # in the same form as set out herein and that such intended + # distribution, if actually made, will neither violate or otherwise + # contravene any of the laws and regulations of the countries having + # jurisdiction over the User or the intended distribution itself. + # + # NO WARRANTY + # + # The program was produced on an experimental basis in the course of the + # research and development conducted during the project and is provided + # to users as so produced on an experimental basis. Accordingly, the + # program is provided without any warranty whatsoever, whether express, + # implied, statutory or otherwise. The term "warranty" used herein + # includes, but is not limited to, any warranty of the quality, + # performance, merchantability and fitness for a particular purpose of + # the program and the nonexistence of any infringement or violation of + # any right of any third party. + # + # Each user of the program will agree and understand, and be deemed to + # have agreed and understood, that there is no warranty whatsoever for + # the program and, accordingly, the entire risk arising from or + # otherwise connected with the program is assumed by the user. + # + # Therefore, neither ICOT, the copyright holder, or any other + # organization that participated in or was otherwise related to the + # development of the program and their respective officials, directors, + # officers and other employees shall be held liable for any and all + # damages, including, without limitation, general, special, incidental + # and consequential damages, arising out of or otherwise in connection + # with the use or inability to use the program or any product, material + # or result produced or otherwise obtained by using the program, + # regardless of whether they have been advised of, or otherwise had + # knowledge of, the possibility of such damages at any time during the + # project or thereafter. Each user will be deemed to have agreed to the + # foregoing by his or her commencement of use of the program. The term + # "use" as used herein includes, but is not limited to, the use, + # modification, copying and distribution of the program and the + # production of secondary products from the program. + # + # In the case where the program, whether in its original form or + # modified, was distributed or delivered to or received by a user from + # any person, organization or entity other than ICOT, unless it makes or + # grants independently of ICOT any specific warranty to the user in + # writing, such person, organization or entity, will also be exempted + # from and not be held liable to the user for any such damages as noted + # above as far as the program is concerned. + # + # ---------------COPYING.ipadic-----END---------------------------------- + +---------------------------------------------------------------------- + +Lao Word Break Dictionary Data (laodict.txt) + + # Copyright (C) 2016 and later: Unicode, Inc. and others. + # License & terms of use: http://www.unicode.org/copyright.html + # Copyright (c) 2015 International Business Machines Corporation + # and others. All Rights Reserved. + # + # Project: https://github.com/rober42539/lao-dictionary + # Dictionary: https://github.com/rober42539/lao-dictionary/laodict.txt + # License: https://github.com/rober42539/lao-dictionary/LICENSE.txt + # (copied below) + # + # This file is derived from the above dictionary version of Nov 22, 2020 + # ---------------------------------------------------------------------- + # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, this + # list of conditions and the following disclaimer. Redistributions in binary + # form must reproduce the above copyright notice, this list of conditions and + # the following disclaimer in the documentation and/or other materials + # provided with the distribution. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # OF THE POSSIBILITY OF SUCH DAMAGE. + # -------------------------------------------------------------------------- + +---------------------------------------------------------------------- + +Burmese Word Break Dictionary Data (burmesedict.txt) + + # Copyright (c) 2014 International Business Machines Corporation + # and others. All Rights Reserved. + # + # This list is part of a project hosted at: + # github.com/kanyawtech/myanmar-karen-word-lists + # + # -------------------------------------------------------------------------- + # Copyright (c) 2013, LeRoy Benjamin Sharon + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: Redistributions of source code must retain the above + # copyright notice, this list of conditions and the following + # disclaimer. Redistributions in binary form must reproduce the + # above copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided + # with the distribution. + # + # Neither the name Myanmar Karen Word Lists, nor the names of its + # contributors may be used to endorse or promote products derived + # from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # -------------------------------------------------------------------------- + +---------------------------------------------------------------------- + +Time Zone Database + + ICU uses the public domain data and code derived from Time Zone +Database for its time zone support. The ownership of the TZ database +is explained in BCP 175: Procedure for Maintaining the Time Zone +Database section 7. + + # 7. Database Ownership + # + # The TZ database itself is not an IETF Contribution or an IETF + # document. Rather it is a pre-existing and regularly updated work + # that is in the public domain, and is intended to remain in the + # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do + # not apply to the TZ Database or contributions that individuals make + # to it. Should any claims be made and substantiated against the TZ + # Database, the organization that is providing the IANA + # Considerations defined in this RFC, under the memorandum of + # understanding with the IETF, currently ICANN, may act in accordance + # with all competent court orders. No ownership claims will be made + # by ICANN or the IETF Trust on the database or the code. Any person + # making a contribution to the database or code waives all rights to + # future claims in that contribution or in the TZ Database. + +---------------------------------------------------------------------- + +Google double-conversion + +Copyright 2006-2011, the V8 project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- + +File: aclocal.m4 (only for ICU4C) +Section: pkg.m4 - Macros to locate and utilise pkg-config. + + +Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. + +As a special exception to the GNU General Public License, if you +distribute this file as part of a program that contains a +configuration script generated by Autoconf, you may include it under +the same distribution terms that you use for the rest of that +program. + + +(The condition for the exception is fulfilled because +ICU4C includes a configuration script generated by Autoconf, +namely the `configure` script.) + +---------------------------------------------------------------------- + +File: config.guess (only for ICU4C) + + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see <https://www.gnu.org/licenses/>. + +As a special exception to the GNU General Public License, if you +distribute this file as part of a program that contains a +configuration script generated by Autoconf, you may include it under +the same distribution terms that you use for the rest of that +program. This Exception is an additional permission under section 7 +of the GNU General Public License, version 3 ("GPLv3"). + + +(The condition for the exception is fulfilled because +ICU4C includes a configuration script generated by Autoconf, +namely the `configure` script.) + +---------------------------------------------------------------------- + +File: install-sh (only for ICU4C) + + +Copyright 1991 by the Massachusetts Institute of Technology + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of M.I.T. not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. M.I.T. makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +-------------------- +ipcz +-------------------- +// Copyright 2022 The Chromium Authors +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google LLC nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +jsoncpp +-------------------- +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== +(END LICENSE TEXT) + +The MIT license is compatible with both the GPL and commercial +software, affording one all of the rights of Public Domain with the +minor nuisance of being required to keep the above copyright notice +and license text in the source code. Note also that by accepting the +Public Domain "license" you can re-license your copy using whatever +license you like. + +-------------------- +Alliance for Open Media Video Codec +-------------------- +Copyright (c) 2016, Alliance for Open Media. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +-------------------- +libevent +-------------------- +Libevent is available for use under the following license, commonly known +as the 3-clause (or "modified") BSD license: + +============================== +Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu> +Copyright (c) 2007-2010 Niels Provos and Nick Mathewson + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +============================== + +Portions of Libevent are based on works by others, also made available by +them under the three-clause BSD license above. The copyright notices are +available in the corresponding source files; the license is as above. Here's +a list: + +log.c: + Copyright (c) 2000 Dug Song <dugsong@monkey.org> + Copyright (c) 1993 The Regents of the University of California. + +strlcpy.c: + Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> + +win32.c: + Copyright (c) 2003 Michael A. Davis <mike@datanerds.net> + +evport.c: + Copyright (c) 2007 Sun Microsystems + +min_heap.h: + Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin@gmail.com> + +tree.h: + Copyright 2002 Niels Provos <provos@citi.umich.edu> + +-------------------- +libjpeg-turbo +-------------------- +libjpeg-turbo Licenses +====================== + +libjpeg-turbo is covered by three compatible BSD-style open source licenses: + +- The IJG (Independent JPEG Group) License, which is listed in + [README.ijg](README.ijg) + + This license applies to the libjpeg API library and associated programs + (any code inherited from libjpeg, and any modifications to that code.) + +- The Modified (3-clause) BSD License, which is listed below + + This license covers the TurboJPEG API library and associated programs, as + well as the build system. + +- The [zlib License](https://opensource.org/licenses/Zlib) + + This license is a subset of the other two, and it covers the libjpeg-turbo + SIMD extensions. + + +Complying with the libjpeg-turbo Licenses +========================================= + +This section provides a roll-up of the libjpeg-turbo licensing terms, to the +best of our understanding. + +1. If you are distributing a modified version of the libjpeg-turbo source, + then: + + 1. You cannot alter or remove any existing copyright or license notices + from the source. + + **Origin** + - Clause 1 of the IJG License + - Clause 1 of the Modified BSD License + - Clauses 1 and 3 of the zlib License + + 2. You must add your own copyright notice to the header of each source + file you modified, so others can tell that you modified that file (if + there is not an existing copyright header in that file, then you can + simply add a notice stating that you modified the file.) + + **Origin** + - Clause 1 of the IJG License + - Clause 2 of the zlib License + + 3. You must include the IJG README file, and you must not alter any of the + copyright or license text in that file. + + **Origin** + - Clause 1 of the IJG License + +2. If you are distributing only libjpeg-turbo binaries without the source, or + if you are distributing an application that statically links with + libjpeg-turbo, then: + + 1. Your product documentation must include a message stating: + + This software is based in part on the work of the Independent JPEG + Group. + + **Origin** + - Clause 2 of the IJG license + + 2. If your binary distribution includes or uses the TurboJPEG API, then + your product documentation must include the text of the Modified BSD + License (see below.) + + **Origin** + - Clause 2 of the Modified BSD License + +3. You cannot use the name of the IJG or The libjpeg-turbo Project or the + contributors thereof in advertising, publicity, etc. + + **Origin** + - IJG License + - Clause 3 of the Modified BSD License + +4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be + free of defects, nor do we accept any liability for undesirable + consequences resulting from your use of the software. + + **Origin** + - IJG License + - Modified BSD License + - zlib License + + +The Modified (3-clause) BSD License +=================================== + +Copyright (C)2009-2023 D. R. Commander. All Rights Reserved.<br> +Copyright (C)2015 Viktor Szathmáry. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +- Neither the name of the libjpeg-turbo Project nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +Why Three Licenses? +=================== + +The zlib License could have been used instead of the Modified (3-clause) BSD +License, and since the IJG License effectively subsumes the distribution +conditions of the zlib License, this would have effectively placed +libjpeg-turbo binary distributions under the IJG License. However, the IJG +License specifically refers to the Independent JPEG Group and does not extend +attribution and endorsement protections to other entities. Thus, it was +desirable to choose a license that granted us the same protections for new code +that were granted to the IJG for code derived from their software. + +-------------------- +libpng +-------------------- +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE +========================================= + +PNG Reference Library License version 2 +--------------------------------------- + + * Copyright (c) 1995-2019 The PNG Reference Library Authors. + * Copyright (c) 2018-2019 Cosmin Truta. + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * Copyright (c) 1996-1997 Andreas Dilger. + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +The software is supplied "as is", without warranty of any kind, +express or implied, including, without limitation, the warranties +of merchantability, fitness for a particular purpose, title, and +non-infringement. In no event shall the Copyright owners, or +anyone distributing the software, be liable for any damages or +other liability, whether in contract, tort or otherwise, arising +from, out of, or in connection with the software, or the use or +other dealings in the software, even if advised of the possibility +of such damage. + +Permission is hereby granted to use, copy, modify, and distribute +this software, or portions hereof, for any purpose, without fee, +subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you + use this software in a product, an acknowledgment in the product + documentation would be appreciated, but is not required. + + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + + +PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) +----------------------------------------------------------------------- + +libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are +Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are +derived from libpng-1.0.6, and are distributed according to the same +disclaimer and license as libpng-1.0.6 with the following individuals +added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Mans Rullgard + Cosmin Truta + Gilles Vollant + James Yu + Mandar Sahastrabuddhe + Google Inc. + Vadim Barkov + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of + the library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is + with the user. + +Some files in the "contrib" directory and some configure-generated +files that are distributed with libpng have other copyright owners, and +are released under other open source licenses. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from +libpng-0.96, and are distributed according to the same disclaimer and +license as libpng-0.96, with the following individuals added to the +list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, +and are distributed according to the same disclaimer and license as +libpng-0.88, with the following individuals added to the list of +Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +Some files in the "scripts" directory have other copyright owners, +but are released under this license. + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing +Authors and Group 42, Inc. disclaim all warranties, expressed or +implied, including, without limitation, the warranties of +merchantability and of fitness for any purpose. The Contributing +Authors and Group 42, Inc. assume no liability for direct, indirect, +incidental, special, exemplary, or consequential damages, which may +result from the use of the PNG Reference Library, even if advised of +the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + + 1. The origin of this source code must not be misrepresented. + + 2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, +without fee, and encourage the use of this source code as a component +to supporting the PNG file format in commercial products. If you use +this source code in a product, acknowledgment is not required but would +be appreciated. + +-------------------- +libsecret +-------------------- + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! +-------------------- +libsrtp +-------------------- +/* + * + * Copyright (c) 2001-2017 Cisco Systems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * Neither the name of the Cisco Systems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +-------------------- +Android Explicit Synchronization +-------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------- +libvpx +-------------------- +Copyright (c) 2010, The WebM Project authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google, nor the WebM Project, nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------- +WebP image encoder/decoder +-------------------- +Copyright (c) 2010, Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional IP Rights Grant (Patents) +------------------------------------ + +"These implementations" means the copyrightable works that implement the WebM +codecs distributed by Google as part of the WebM Project. + +Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, +royalty-free, irrevocable (except as stated in this section) patent license to +make, have made, use, offer to sell, sell, import, transfer, and otherwise +run, modify and propagate the contents of these implementations of WebM, where +such license applies only to those patent claims, both currently owned by +Google and acquired in the future, licensable by Google that are necessarily +infringed by these implementations of WebM. This grant does not include claims +that would be infringed only as a consequence of further modification of these +implementations. If you or your agent or exclusive licensee institute or order +or agree to the institution of patent litigation or any other patent +enforcement activity against any entity (including a cross-claim or +counterclaim in a lawsuit) alleging that any of these implementations of WebM +or any code incorporated within any of these implementations of WebM +constitute direct or contributory patent infringement, or inducement of +patent infringement, then any patent rights granted to you under this License +for these implementations of WebM shall terminate as of the date such +litigation is filed. + +-------------------- +libxml +-------------------- +Except where otherwise noted in the source code (e.g. the files hash.c, +list.c and the trio files, which are covered by a similar licence but +with different Copyright notices) all the files are: + + Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------- +libyuv +-------------------- +Copyright 2011 The LibYuv Project Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +modp base64 decoder +-------------------- + * MODP_B64 - High performance base64 encoder/decoder + * Version 1.3 -- 17-Mar-2006 + * http://modp.com/release/base64 + * + * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the modp.com nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +OpenH264 +-------------------- +Copyright (c) 2013, Cisco Systems +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------- +opus +-------------------- +Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, + Jean-Marc Valin, Timothy B. Terriberry, + CSIRO, Gregory Maxwell, Mark Borgerding, + Erik de Castro Lopo + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Opus is subject to the royalty-free patent licenses which are +specified at: + +Xiph.Org Foundation: +https://datatracker.ietf.org/ipr/1524/ + +Microsoft Corporation: +https://datatracker.ietf.org/ipr/1914/ + +Broadcom Corporation: +https://datatracker.ietf.org/ipr/1526/ + +-------------------- +Perfetto +-------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright (c) 2017, The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +-------------------- +PFFFT: a pretty fast FFT. +-------------------- +Copyright (c) 2013 Julien Pommier ( pommier@modartt.com ) + +Based on original fortran 77 code from FFTPACKv4 from NETLIB, +authored by Dr Paul Swarztrauber of NCAR, in 1985. + +As confirmed by the NCAR fftpack software curators, the following +FFTPACKv5 license applies to FFTPACKv4 sources. My changes are +released under the same terms. + +FFTPACK license: + +http://www.cisl.ucar.edu/css/software/fftpack5/ftpk.html + +Copyright (c) 2004 the University Corporation for Atmospheric +Research ("UCAR"). All rights reserved. Developed by NCAR's +Computational and Information Systems Laboratory, UCAR, +www.cisl.ucar.edu. + +Redistribution and use of the Software in source and binary forms, +with or without modification, is permitted provided that the +following conditions are met: + +- Neither the names of NCAR's Computational and Information Systems +Laboratory, the University Corporation for Atmospheric Research, +nor the names of its sponsors or contributors may be used to +endorse or promote products derived from this Software without +specific prior written permission. + +- Redistributions of source code must retain the above copyright +notices, this list of conditions, and the disclaimer below. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions, and the disclaimer below in the +documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +-------------------- +Protocol Buffers +-------------------- +Copyright 2008 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. + +-------------------- +re2 - an efficient, principled regular expression library +-------------------- +// Copyright (c) 2009 The RE2 Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +Recurrent neural network for audio noise reduction +-------------------- +Copyright (c) 2017, Mozilla +Copyright (c) 2007-2017, Jean-Marc Valin +Copyright (c) 2005-2017, Xiph.Org Foundation +Copyright (c) 2003-2004, Mark Borgerding + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.Org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +Selenium Atoms +-------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2022 Software Freedom Conservancy (SFC) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------- +Closure Library +-------------------- + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +-------------------- +Sizzle +-------------------- +Sizzle is released under three licenses: MIT, BSD, and GPL. You may pick the license that best suits your development needs. The text of all three licenses are provided below. + +MIT License +---- + +Copyright (c) 2009 John Resig + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +BSD License +---- + +Copyright (c) 2009, John Resig +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the <organization> nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY John Resig ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +GPL License +---- + +The GNU General Public License (GPL) +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +-------------------- +Wicked Good XPath +-------------------- +The MIT License + +Copyright (c) 2007 Cybozu Labs, Inc. +Copyright (c) 2012 Google Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------- +sqlite +-------------------- +The author disclaims copyright to this source code. In place of +a legal notice, here is a blessing: + + May you do good and not evil. + May you find forgiveness for yourself and forgive others. + May you share freely, never taking more than you give. + +-------------------- +Vulkan Deps +-------------------- +// Copyright 2015 The Chromium Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +WebRTC +-------------------- +Copyright (c) 2011, The WebRTC project authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------- +Wuffs (Wrangling Untrusted File Formats Safely) +-------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------- +zlib +-------------------- +version 1.2.12, March 27th, 2022 + +Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +-------------------- +Zstandard +-------------------- +BSD License + +For Zstandard software + +Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook, nor Meta, nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/test/resources/drivers/chromedriver-linux64_118.0.5993.70/chromedriver b/src/test/resources/drivers/chromedriver-linux64_118.0.5993.70/chromedriver new file mode 100644 index 00000000..eb6e60ac Binary files /dev/null and b/src/test/resources/drivers/chromedriver-linux64_118.0.5993.70/chromedriver differ diff --git a/src/test/resources/drivers/chromedriver91.exe b/src/test/resources/drivers/chromedriver91.exe new file mode 100644 index 00000000..e12a8546 Binary files /dev/null and b/src/test/resources/drivers/chromedriver91.exe differ diff --git a/src/test/resources/environment.properties b/src/test/resources/environment.properties new file mode 100644 index 00000000..c6f4e5e0 --- /dev/null +++ b/src/test/resources/environment.properties @@ -0,0 +1,36 @@ +#stg hmcts +public_stg=https://juror-public.staging.apps.hmcts.net +bureau_stg=https://juror.staging.apps.hmcts.net +database_stg=jdbc:postgres://juror-api-stg.postgres.database.azure.com:5432/juror +expenses_stg=https://juror-public.staging.apps.hmcts.net/expense-calculator +dashboard_stg=https://juror.staging.apps.hmcts.net/dashboard +defexcusdash_stg=https://juror.staging.apps.hmcts.net/dashboard/deferral-excusal +pcqreturnurl_stg=https://juror-public.staging.apps.hmcts.net/steps/confirm-information + +#test hmcts +public_test=https://juror-public.test.apps.hmcts.net +bureau_test=https://juror.test.apps.hmcts.net +database_test=jdbc:postgres://juror-api-test.postgres.database.azure.com:5432/juror +expenses_test=https://juror-public.test.apps.hmcts.net/expense-calculator +dashboard_test=https://juror.test.apps.hmcts.net/dashboard +defexcusdash_test=https://juror.test.apps.hmcts.net/dashboard/deferral-excusal +pcqreturnurl_test=https://juror-public.test.apps.hmcts.net/steps/confirm-information + +#ithc hmcts +public_ithc=https://juror-public.ithc.apps.hmcts.net +bureau_ithc=https://juror.ithc.apps.hmcts.net +database_ithc=jdbc:postgres://juror-api-ithc.postgres.database.azure.com:5432/juror +expenses_ithc=https://juror-public.ithc.apps.hmcts.net/expense-calculator +dashboard_ithc=https://juror.ithc.apps.hmcts.net/dashboard +defexcusdash_ithc=https://juror.ithc.apps.hmcts.net/dashboard/deferral-excusal +pcqreturnurl_ithc=https://juror-public.ithc.apps.hmcts.net/steps/confirm-information + +#demo hmcts +public_demo=https://juror-public.demo.apps.hmcts.net +bureau_demo=https://juror.demo.apps.hmcts.net +database_demo=jdbc:postgres://juror-api-demo.postgres.database.azure.com:5432/juror +expenses_demo=https://juror-public.demo.apps.hmcts.net/expense-calculator +dashboard_demo=https://juror.demo.apps.hmcts.net/dashboard +defexcusdash_demo=https://juror.demo.apps.hmcts.net/dashboard/deferral-excusal +pcqreturnurl_demo=https://juror-public.demo.apps.hmcts.net/steps/confirm-information + diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties new file mode 100644 index 00000000..f4f5935b --- /dev/null +++ b/src/test/resources/log4j.properties @@ -0,0 +1,27 @@ + +#### Use two appenders, one to log to console, another to log to a file +log4j.rootCategory=info, stdout, R +#log4j.rootLogger=debug, stdout, R + +#### First appender writes to console +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# Pattern to output the caller's file name and line number. +#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F%L) - %m%n +#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n +log4j.appender.stdout.layout.ConversionPattern=%t -\ + \%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n + +#### Second appender writes to a file +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=selenium.log + +# Control the maximum log file size +log4j.appender.R.MaxFileSize=10000KB +# Archive log files (one backup file here) +log4j.appender.R.MaxBackupIndex=1 +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n + + diff --git a/src/test/resources/workstation.properties b/src/test/resources/workstation.properties new file mode 100644 index 00000000..8257e5cd --- /dev/null +++ b/src/test/resources/workstation.properties @@ -0,0 +1,5 @@ +usingDriver = chrome +#usingDriver = msedge +headlessChrome = false +usingProxy = 0 +