Skip to content

Commit

Permalink
Merge branch 'main' into BICAWS7-3076-add-resolved-date-range-to-case…
Browse files Browse the repository at this point in the history
…-list-query
  • Loading branch information
ian-antking authored Sep 5, 2024
2 parents e0e615a + 06f8166 commit 71609f5
Show file tree
Hide file tree
Showing 8 changed files with 304 additions and 15 deletions.
27 changes: 18 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
node: circleci/node@5.2.0
node: circleci/node@6.1.0

commands:
################### Helpers
Expand All @@ -11,12 +11,24 @@ commands:
name: Clone bichard7-next-core
command: git clone --depth 1 https://github.com/ministryofjustice/bichard7-next-core.git ~/bichard7-next-core

install_npm_packages:
steps:
- restore_cache:
name: Load node_modules from the cache if they haven't changed
keys:
- v1-npm-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
- v1-npm-deps-
- run:
name: Install npm dependencies
command: npm i
- save_cache:
key: v1-npm-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths: node_modules
setup:
steps:
- checkout
- node_install
- node/install-packages:
include-branch-in-cache-key: true
- install_npm_packages
- checkout_core
- run:
name: Set GB locale
Expand Down Expand Up @@ -178,8 +190,7 @@ jobs:
steps:
- checkout
- node_install
- node/install-packages:
include-branch-in-cache-key: true
- install_npm_packages
- run:
name: Check the code for linting errors
command: npm run lint
Expand All @@ -191,8 +202,7 @@ jobs:
steps:
- checkout
- node_install
- node/install-packages:
include-branch-in-cache-key: true
- install_npm_packages
- run:
name: Run code-based unit tests
command: npm run test:unit
Expand Down Expand Up @@ -245,8 +255,7 @@ jobs:
- checkout_core
- install_ms_edge
- node_install
- node/install-packages:
include-branch-in-cache-key: true
- install_npm_packages
- run:
name: Install Cypress
command: ./.circleci/scripts/install-cypress.sh 2>&1
Expand Down
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ dist
# Cypress artifacts
cypress/videos
cypress/screenshots

# SWC cache
.swc/
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,7 @@ public/images/govuk-mask-icon.svg
public/images/govuk-opengraph-image.png

# Ignore auto-generated zap.yaml
scripts/zap/zap.yaml
scripts/zap/zap.yaml

# SWC cache
.swc/
17 changes: 17 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false,
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"target": "esnext"
},
"module": {
"type": "commonjs"
}
}
8 changes: 7 additions & 1 deletion cypress/e2e/case-list/index.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ describe("Case list", () => {
})

it("Should display 0 cases when there are no cases 'locked to me' and hide the bottom pagination bar ", () => {
const lockUsernames = ["BichardForce02", "BichardForce03", null, "A really really really long.name"]
const lockUsernames = [
"BichardForce01",
"BichardForce02",
"BichardForce03",
null,
"A really really really long.name"
]
cy.task(
"insertCourtCasesWithFields",
lockUsernames.map((username) => ({
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */

module.exports = {
preset: "ts-jest",
setupFilesAfterEnv: ["<rootDir>/setupTests.ts"],
Expand All @@ -11,5 +12,8 @@ module.exports = {
"^entities/(.*)$": "<rootDir>/src/entities/$1",
"^services/(.*)$": "<rootDir>/src/services/$1",
"^middleware/(.*)$": "<rootDir>/src/middleware/$1"
},
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest"
}
}
Loading

0 comments on commit 71609f5

Please sign in to comment.