diff --git a/.github/workflows/app-codecov-test.yml b/.github/workflows/app-codecov-test.yml new file mode 100644 index 000000000..32b6a9fba --- /dev/null +++ b/.github/workflows/app-codecov-test.yml @@ -0,0 +1,72 @@ +name: APP (React 18) + +on: + push: + branches: [dev] + paths: + - 'frontend/**' # Triggers on changes to files in the frontend/ directory. + - '!frontend/cypress/**' # Will not trigger on changes to the following. + - '!frontend/cypress.config.*' + - '!frontend/.eslintrc.*' + - '!frontend/.prettierrc.*' + - '!frontend/Dockerfile*' + - '!frontend/nginx.conf' + - '!frontend/vite.config.*' + pull_request: + types: [opened, synchronize] # Triggered by opened or changed pull requests. + branches: [dev] + paths: + - 'frontend/**' # Triggers on changes to files in the frontend/ directory. + - '!frontend/cypress/**' # Will not trigger on changes to the following. + - '!frontend/cypress.config.*' + - '!frontend/.eslintrc.*' + - '!frontend/.prettierrc.*' + - '!frontend/Dockerfile*' + - '!frontend/nginx.conf' + - '!frontend/vite.config.*' + - '.github/workflows/app-codecov-test.yml' + +jobs: + build: + runs-on: ubuntu-latest + env: + CI: true + working-directory: ./frontend + codeCov-token: ${{ secrets.CodeCov }} + + strategy: + matrix: + node-version: [18] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - run: npm i + working-directory: ${{env.working-directory}} + + # - run: npm run build --if-present + # working-directory: ${{env.working-directory}} + + - run: npm run coverage + working-directory: ${{env.working-directory}} + + - name: Codecov + uses: codecov/codecov-action@v3 + with: + # User defined upload name. Visible in Codecov UI + name: PIMS + # Repository upload token - get it from codecov.io. Required only for private repositories + token: ${{env.codeCov-token}} + # Path to coverage file to upload + file: ${{env.working-directory}}/coverage/lcov.info + # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) + flags: unittests + # Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON) + env_vars: javascript + # Specify whether or not CI build should fail if Codecov runs into an error during upload + fail_ci_if_error: true diff --git a/.github/workflows/app-jest-coverage.yml b/.github/workflows/app-jest-coverage.yml index 9b31e2a3c..6d99c48d2 100644 --- a/.github/workflows/app-jest-coverage.yml +++ b/.github/workflows/app-jest-coverage.yml @@ -14,12 +14,13 @@ on: - '!frontend/vite.config.*' - '!frontend/tsconfig.json' - '!frontend/README.md' + - '.github/workflows/app-jest-coverage.yml' jobs: codeclimate-jest-coverage: runs-on: ubuntu-latest env: - GIT_BRANCH: ${{ github.event.pull_request.head.ref }} + GIT_BRANCH: dev GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} CC_TEST_REPORTER_ID: 37fdb6f058122c17fc2419b78b02b1d5582694f7cd84a2b735de8eec235e9c5b diff --git a/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap b/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap index 4e92dc78e..22b16cdf2 100644 --- a/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap +++ b/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap @@ -119,21 +119,9 @@ exports[`SteppedForm component renders correctly 1`] = ` >
- - - + Add another associated Parcel
diff --git a/frontend/src/components/maps/leaflet/InfoSlideOut/__snapshots__/HeaderActions.test.tsx.snap b/frontend/src/components/maps/leaflet/InfoSlideOut/__snapshots__/HeaderActions.test.tsx.snap index e125c030e..6f678687e 100644 --- a/frontend/src/components/maps/leaflet/InfoSlideOut/__snapshots__/HeaderActions.test.tsx.snap +++ b/frontend/src/components/maps/leaflet/InfoSlideOut/__snapshots__/HeaderActions.test.tsx.snap @@ -1,52 +1,31 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`HeaderActions View HeaderActions renders correctly 1`] = ` -.c0 { - background-color: filterBackgroundColor; - height: 35px; - width: 322px; - margin: 0px 0px 5px -10px; - font-size: 14px; - padding: 10px; -} - -.c0 a { - padding: 0px 10px; - color: slideOutBlue; -} - -.c1 { - border-left: 2px solid rgba(96, 96, 96, 0.2); - height: 18px; - width: 0; - padding: 0; -} -
Actions: View details
Update
Zoom map diff --git a/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/BuildingForm.test.tsx.snap b/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/BuildingForm.test.tsx.snap index 5f8f1f1d3..963c0adc2 100644 --- a/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/BuildingForm.test.tsx.snap +++ b/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/BuildingForm.test.tsx.snap @@ -238,21 +238,9 @@ exports[`Building Form component renders correctly 1`] = ` >
- - - + Add another associated Parcel
diff --git a/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/LandForm.test.tsx.snap b/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/LandForm.test.tsx.snap index ccdad6c21..37de6d46b 100644 --- a/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/LandForm.test.tsx.snap +++ b/frontend/src/features/mapSideBar/SidebarContents/__snapshots__/LandForm.test.tsx.snap @@ -220,21 +220,9 @@ exports[`Land Form component renders correctly 1`] = ` >
- - - + Add another associated Parcel
diff --git a/frontend/src/features/mapSideBar/SidebarContents/subforms/__snapshots__/AssociatedLandReviewPage.test.tsx.snap b/frontend/src/features/mapSideBar/SidebarContents/subforms/__snapshots__/AssociatedLandReviewPage.test.tsx.snap new file mode 100644 index 000000000..e84ea1e23 --- /dev/null +++ b/frontend/src/features/mapSideBar/SidebarContents/subforms/__snapshots__/AssociatedLandReviewPage.test.tsx.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AssociatedLandReviewPage renders correctly 1`] = ` +
+
+

+ Review associated land information +

+

+ Please review the information you have entered. You can edit it by clicking on the edit icon for each section. When you are satisfied that the information provided is correct, click the submit button to save this information to the PIMS inventory. +

+
+
+`; diff --git a/frontend/src/features/mapSideBar/SidebarContents/subforms/__snapshots__/BuildingReviewPage.test.tsx.snap b/frontend/src/features/mapSideBar/SidebarContents/subforms/__snapshots__/BuildingReviewPage.test.tsx.snap index ab3e153c7..c70f98dd4 100644 --- a/frontend/src/features/mapSideBar/SidebarContents/subforms/__snapshots__/BuildingReviewPage.test.tsx.snap +++ b/frontend/src/features/mapSideBar/SidebarContents/subforms/__snapshots__/BuildingReviewPage.test.tsx.snap @@ -6,19 +6,29 @@ exports[`building review page renders correctly 1`] = `

Review your building info

Please review the information you have entered. You can edit it by clicking on the edit icon for each section. When you are satisfied that the information provided is correct, click the submit button to save this information to the PIMS inventory.

-
-
-
-
-
-
icon-business.svg
Building Identification
-
+
+
+
+
+
+
+
+
+
+
+
+
+

Building Identification

+
-
-
-
+
+
+
+

Agency:

+
+
@@ -27,221 +37,210 @@ exports[`building review page renders correctly 1`] = `
-
-
-
-
+
+

Building Name:

+
+
-
-
-
-
+
+

Description:

+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+

Street Address:

-
-
-
-
-
+
+

-
-
-
-
-
-
-
-
+
+

Location:

-
-
-
-
-
-
-
-
-
-
-
+
+

-
-
-
-
-
-
-
+
+

Province:

+
+
+

-

-
-
-
+
+

Postal Code:

+
+
+

+
+
+

Latitude:

+
+
-
-
-
-
+
+

Longitude:

+
+
-

-
-
-
-
+
+

SRES Classification:

+
+
-
-
-
-
+
+

Main Usage:

+
+
-
-
-
-
+
+

Type of Construction:

+
+
-
-
-
-
+
+

Number of Floors:

+
+
-
-
-
-
-
-
-
-
+
+
+
+

Harmful info if released?

+
+
+
+
-
-
-
-
-
icon-business.svg
Occupancy
-
+