Giter Club home page Giter Club logo

civil-ccd-definition's Introduction

civil-ccd-definition

Civil CCD Definition and E2E tests

Contents:

Building and deploying the application

Dependencies

The project is dependent on other Civil repositories:

To set up complete local environment for Civil check civil-sdk

Preview environment

Preview environment will be created when opening new PR. Camunda BPMN definitions will be pulled from the latest GitHub release. Service instance will be running the latest image version deployed to ACR.

To access XUI visit url (make sure that it starts with https, otherwise IDAM won't let you log in):

  • https://xui-civil-ccd-pr-PR_NUMBER.service.core-compute-preview.internal

To access Camunda visit url (login and password are both admin):

  • https://camunda-civil-ccd-pr-PR_NUMBER.service.core-compute-preview.internal

Below labels are needed on the PR


  "enable_keep_helm" label to retain helm release on preview

  "pr-values:enableNotifyEmails" label to be able to send live notifications on the PR

  "pr-values:elasticsearch" label to have elastic search running - needed for scheduler testing

  "pr-values:enableWA" label to verify work allocation task
  

Running Crossbrowser tests:

Install saucelabs on local machine

$ yarn test:crossbrowser

Testing

The repo uses codeceptjs framework for e2e tests.

To install dependencies enter yarn install.

To run e2e tests enter yarn test in the command line.

Optional configuration

To run tests with browser window open set SHOW_BROWSER_WINDOW=true. By default, the browser window is hidden.

Smoke test

To run smoke tests enter yarn test:smoke.

Functional tests

To run functional tests enter yarn test:functional.

For running UI tests, set CCD_UI_TESTS=true

API test

Before running API tests, you will need the SENDGRID_API_KEY environment variable setup and to be running the service locally along with all containers.

To run API tests enter yarn test:api. set CCD_UI_TESTS=false

Testing in IntelliJ (Ultimate Edition)

  1. Running a test_name.js
  • Select the .js file containing the tests you want to run and modify its run configuration.

  • Set "Node interpreter" to: [...]\node.exe

  • Set "Node parameters" to: "[...]\civil-ccd-definition\node_modules\codeceptjs\bin\codecept.js" run --debug --verbose

  • Set "Working directory" to: "[...]\civil-ccd-definition"

  • Set JavaScript file to: "[...]\test_name.js"

  • Set "Environment variables" to:

  • S2S_SECRET=[...];ENVIRONMENT=[...];NODE_TLS_REJECT_UNAUTHORIZED=0;SHOW_BROWSER_WINDOW=true

  1. Running a test from package.json
  • Run > Edit configurations > + > Node.js

  • Set "Node interpreter" to: [...]\node.exe

  • Set "Node parameters" to: "[...]\civil-ccd-definition\node_modules\codeceptjs\bin\codecept.js" run --grep @[test_name] --debug --verbose

  • Set "Working directory" to: "[...]\civil-ccd-definition"

  • Set "Environment variables" to:

  • S2S_SECRET=[...];ENVIRONMENT=[...];NODE_TLS_REJECT_UNAUTHORIZED=0;SHOW_BROWSER_WINDOW=true

Adding Git Conventions

Include the git conventions.

  • Make sure your git version is at least 2.9 using the git --version command
  • Run the following command:
git config --local core.hooksPath .git-config/hooks

Once the above is done, you will be required to follow specific conventions for your commit messages and branch names.

If you violate a convention, the git error message will report clearly the convention you should follow and provide additional information where necessary.

Optional:

  • Install this plugin in Chrome: https://github.com/refined-github/refined-github

    It will automatically set the title for new PRs according to the first commit message, so you won't have to change it manually.

    Note that it will also alter other behaviours in GitHub. Hopefully these will also be improvements to you.

In case of problems

  1. Get in touch with your Technical Lead so that they can get you unblocked

  2. If the rare eventuality that the above is not possible, you can disable enforcement of conventions using the following command

    git config --local --unset core.hooksPath

    Still, you shouldn't be doing it so make sure you get in touch with a Technical Lead soon afterwards.

License

This project is licensed under the MIT License - see the LICENSE file for details

civil-ccd-definition's People

Contributors

asthamalviya avatar azam-hmcts avatar bhagyashreesharma90 avatar bhssamray avatar dependabot-preview[bot] avatar dharmendrak avatar douglasrice avatar drummondjm avatar dtortolav1 avatar filippo-possenti-version1 avatar gareth40343 avatar harryh96 avatar hmcts-version1-ignacio avatar karthick-mohanasundaram-hmcts avatar kenneth-hmcts avatar m-meulendijks-v1 avatar miguelmolina3691 avatar mmnycz avatar mounikahmcts avatar neeta-hmcts avatar pd-dudkiewicz avatar pliao-hmcts avatar sabahirfan avatar sampankumar avatar sankaviv1 avatar sankhajuria avatar sherlynkhaw avatar shwetatandel-hmcts avatar swalker125 avatar vasudevganesanhmcts avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

civil-ccd-definition's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm faker Available

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Replace dependency faker with @faker-js/faker ^5.5.3

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • Update all non-major dependencies (camunda-bpm, ccd, chai, civil-service, codeceptjs, eslint, gradle, node, playwright, yarn, org.slf4j:slf4j-api, com.github.hmcts:befta-fw, org.junit.platform:junit-platform-engine, org.junit.platform:junit-platform-commons, org.junit.jupiter:junit-jupiter-params, org.junit.jupiter:junit-jupiter-engine, org.junit.jupiter:junit-jupiter-api)

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/label.yml
  • actions/labeler v2
.github/workflows/main.yml
.github/workflows/stale.yml
  • actions/stale v6
gradle
settings.gradle
build.gradle
  • org.junit.jupiter:junit-jupiter-api 5.10.1
  • org.junit.jupiter:junit-jupiter-engine 5.10.1
  • org.junit.jupiter:junit-jupiter-params 5.10.1
  • org.junit.platform:junit-platform-commons 1.10.1
  • org.junit.platform:junit-platform-engine 1.10.1
  • com.github.hmcts:befta-fw 9.0.2
  • org.slf4j:slf4j-api 2.0.9
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8
helmv3
charts/civil-ccd/Chart.yaml
  • postgresql 1.0.2
  • civil-service 0.0.67
  • civil-general-applications 0.0.64
  • ccd 9.0.21
  • xui-webapp ~1.0.8
  • aac-manage-case-assignment ~0.2.9
  • idam-pr 2.3.0
  • camunda-bpm 0.0.44
  • servicebus 1.0.7
  • wa ~1.0.6
  • ccd-message-publisher ~0.1.7
npm
package.json
  • chai ^4.3.4
  • codeceptjs ^3.5.11
  • deep-equal-in-any-order ^1.0.28
  • eslint ^8.20.0
  • eslint-plugin-codeceptjs ^1.3.0
  • faker ^5.5.3
  • html_codesniffer ^2.5.1
  • husky ^7.0.2
  • lodash ^4.17.21
  • mocha 9.2.2
  • mocha-junit-reporter ^2.0.2
  • mocha-multi ^1.1.6
  • mochawesome ^7.0.1
  • node-cache ^5.1.2
  • node-fetch ^2.6.9
  • playwright ^1.41.1
  • totp-generator ^0.0.14
  • uuid ^3.4.0
  • webdriverio ^6.12.1
  • minimatch ^3.0.5
  • yarn 3.7.0
nvm
.nvmrc
  • node 18.20.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.