Skip to content

Commit

Permalink
Merge branch 'test' into fix-emailFieldValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
aatuny committed Jan 3, 2024
2 parents ec8d414 + e8d0c16 commit b0abb6c
Show file tree
Hide file tree
Showing 55 changed files with 4,147 additions and 922 deletions.
26 changes: 26 additions & 0 deletions .env.cypress
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Note: most values are defaults but still defined here in case the defaults do change
NODE_ENV=development
MAINTENANCE_MODE=false

HTTP_PORT=8080
HTTPS_PORT=8080

TLS_KEY=''
TLS_CERT=''

API_HOST='http://localhost:8081'
API_PATH_PREFIX=''
API_KEY=''
ALLOW_SELF_SIGNED=false

DISABLE_TURNSTILE=true
SITE_KEY=''

HELMET_CONFIG='{}'

NOTIFICATION_BANNER='{"text":{"fi":"Test (fin)", "sv":"Test (swe)", "en":"Test (eng)"},"title":{"fi":"Test title (fin)", "sv":"Test title (swe)", "en":"Test title (eng)"},"type":"info"}'
# Note: these do not work really but are defined so that the href attribute of the link can be tested
CONTACT_INFORMATION_CHANGE_URL='{"fi": "http://localhost:8080/contact-information-change-fin", "sv": "http://localhost:8080/contact-information-change-swe", "en": "http://localhost:8080/contact-information-change-eng"}'
CUSTOMER_SERVICE_CONTACT='{"phone": "123456", "email": "[email protected]"}'

PROXY_CUSTOM_HEADER='x-foobar'
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
"plugin:react/recommended",
"plugin:cypress/recommended"
],
"rules": {
"react/display-name": [
Expand Down Expand Up @@ -82,6 +83,7 @@
"env": {
"browser": true,
"es2021": true,
"node": true
"node": true,
"cypress/globals": true
}
}
16 changes: 15 additions & 1 deletion .github/workflows/kb-node-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,23 @@ jobs:
with:
args: '.'

cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v6
with:
record: false # Do not record tests to Cypress Cloud
config-file: cypress.config.js
build: npm run build
start: npm run start:cypress-server
wait-on: 'http://localhost:8080'

openshift-webhook:
name: OpenShift webhook for image builder
needs: [build-node-versions, njsscan]
needs: [build-node-versions, njsscan, cypress-run, license-scan]
runs-on: ubuntu-latest

steps:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,8 @@ dist

# Dev
dev-certs

# cypress
/cypress/screenshots
/cypress/videos
/cypress/downloads
10 changes: 10 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable no-unused-vars */
const {defineConfig} = require('cypress');

module.exports = defineConfig({
e2e: {
// API request responses are mocked so running over HTTP for e2e test use case is ok
baseUrl: 'http://localhost:8080',
testIsolation: true
}
});
Loading

0 comments on commit b0abb6c

Please sign in to comment.