Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/116361-change-bag-api
Browse files Browse the repository at this point in the history
  • Loading branch information
remyvdwereld committed Sep 30, 2024
2 parents c576807 + 48d8725 commit 001a3e0
Show file tree
Hide file tree
Showing 40 changed files with 1,463 additions and 1,512 deletions.
4 changes: 0 additions & 4 deletions .env.acceptance
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ REACT_APP_HOST_TON=https://ton.woon-a.azure.amsterdam.nl/
REACT_APP_AUTH_URL=https://acc.iam.amsterdam.nl/auth/
REACT_APP_KEYCLOAK_REALM=datapunt-ad-acc
REACT_APP_KEYCLOAK_CLIENT_ID=wonen-zaaksysteem-frontend

# Sentry
REACT_APP_SENTRY_PROJECT_NAME=zaken-frontend
REACT_APP_SENTRY_DSN=https://f667fd1828ec8f0c074f59f8bb3dd595@sentry.data.amsterdam.nl/10
4 changes: 0 additions & 4 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ REACT_APP_AZA_FE=https://wonen.zaken.amsterdam.nl/
REACT_APP_API_HOST_TON=https://api.ton.amsterdam.nl/
REACT_APP_HOST_TON=https://ton.amsterdam.nl/

# Sentry
REACT_APP_SENTRY_PROJECT_NAME=zaken-frontend
REACT_APP_SENTRY_DSN=https://f667fd1828ec8f0c074f59f8bb3dd595@sentry.data.amsterdam.nl/10

# Keycloak
REACT_APP_KEYCLOAK_REALM=datapunt-ad

Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install
run: npm install
Expand All @@ -24,20 +25,20 @@ jobs:
- name: Test
run: npm test

- name: Cypress run
if: ${{ github.actor != 'dependabot[bot]' }}
uses: cypress-io/github-action@v6
with:
record: false
# Run test against acc, otherwise a local backend is needed.
start: npm run acc
wait-on: "http://localhost:2999/"
env:
# pass GitHub token to allow accurately detecting a build vs a re-run build for Cypress Dashboard
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# pass the Dashboard record key as an environment variable for Cypress Dashboard
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_TEST_USER_PASSWORD: ${{ secrets.CYPRESS_TEST_USER_PASSWORD }}
# - name: Cypress run
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: cypress-io/github-action@v4
# with:
# record: false
# # Run test against acc, otherwise a local backend is needed.
# start: npm run acc
# wait-on: "http://localhost:2999/"
# env:
# # pass GitHub token to allow accurately detecting a build vs a re-run build for Cypress Dashboard
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # pass the Dashboard record key as an environment variable for Cypress Dashboard
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# CYPRESS_TEST_USER_PASSWORD: ${{ secrets.CYPRESS_TEST_USER_PASSWORD }}

- name: Build
run: docker build .
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: manifests deploy

dc = docker-compose
dc = docker compose

ENVIRONMENT ?= local
HELM_ARGS = manifests/chart \
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
- GitHub repository (https://github.com/Amsterdam/zaken-frontend) OIS Basis
- GitHub repository dependency (https://github.com/Amsterdam/wonen-ui) OIS Basis
- GitHub repository dependency (https://github.com/Amsterdam/amsterdam-react-final-form) OIS Basis
- Jenkins (https://ci.secure.amsterdam.nl/job/fixxx/job/zaken-frontend/) (over VPN) OIS Basis
- Sentry (https://sentry.data.amsterdam.nl/sentry/zaken-frontend/) OIS Basis
- NPM (https://www.npmjs.com/settings/amsterdam/packages) OIS Slack #frontend-amsterdam

### Connecting to Acceptance API
Expand Down
9 changes: 5 additions & 4 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { defineConfig } from "cypress"
export default defineConfig({
projectId: "tbpt8b",
chromeWebSecurity: false,
screenshotOnRunFailure: false,
video: false,
screenshotOnRunFailure: true,
video: true,
viewportWidth: 1280,
viewportHeight: 1024,
defaultCommandTimeout: 10000,
pageLoadTimeout: 30000,
requestTimeout: 10000,
env: {
baseUrlData: "https://api.data.amsterdam.nl/",
Expand Down Expand Up @@ -35,8 +36,8 @@ export default defineConfig({
},
component: {
devServer: {
framework: "create-react-app",
bundler: "webpack"
framework: "react",
bundler: "vite"
}
}
})
2 changes: 1 addition & 1 deletion cypress/e2e/020_visit/visit.plan.authorization.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('Plan "huisbezoek"', () => {

it("Schedule visit from date", () => {
cy.get('[data-testid="visit_from_datetime"]')
.type(moment().format("YYYY-MM-DD"))
.type(dayjs().format("YYYY-MM-DD"))
})

it("Schedule priority", () => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/020_visit/visit.plan.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from "moment";
import dayjs from "dayjs";
import address from "../../fixtures/address.json";
import visit from "../../fixtures/visit.json";

Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Test visit.plan.spec', () => {
cy.get('[data-testid="visit_from"]').select(visit.visitFrom);

cy.get('[data-testid="visit_from_datetime"]').type(
moment().format("YYYY-MM-DD")
dayjs().format("YYYY-MM-DD")
);

cy.get('[data-testid="priority"]').select(visit.priority);
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<base href="/">
<title>%REACT_APP_PAGE_TITLE%</title>
<script type="module" src="src/index"></script>
<script src='/config/env.js'></script>
<script type="module" src="src/index"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Loading

0 comments on commit 001a3e0

Please sign in to comment.