Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/vdyp 464 to 443 To test coverage in sonar #89

Draft
wants to merge 83 commits into
base: feature/VDYP-443
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
c260fd7
Moving executiuon step to general processing engine class
smithkm Oct 31, 2024
e1d43af
Refactoring
smithkm Nov 6, 2024
7432075
Unit testing framework for model objects
smithkm Nov 13, 2024
576ae44
Unit tests for deepEquals matcher for VdypSite
smithkm Nov 13, 2024
7f35fd7
Unit tests for deepEquals matcher for VdypCompatibilityVariables
smithkm Nov 14, 2024
e107666
Unit tests for deep equals matcher for species
smithkm Nov 14, 2024
c603ec6
Species deepEquals unit tests and generalization of *Variable enums a…
smithkm Nov 15, 2024
8344baa
Refactor to use common enum for UC variables
smithkm Nov 18, 2024
9f24b55
Fix predecessor method
smithkm Nov 18, 2024
62cfa12
Fix incorrect UCVs being used after refactor
smithkm Nov 18, 2024
c105a97
Refactor Forward to use common processing state base classes
smithkm Nov 18, 2024
0723605
Unit tests for deep equals matcher for layer
smithkm Nov 19, 2024
6f45153
Unit tests for polygon deep equals
smithkm Nov 19, 2024
7f2e97c
use UtilizationClassVariable accessor enum in place of reflection
smithkm Nov 19, 2024
8703160
Fix error druing CV update
smithkm Nov 19, 2024
9253b83
Bank deep equals
smithkm Nov 23, 2024
7ddbd49
Deep Equals for Bank
smithkm Nov 27, 2024
ec1a2a6
VDYP-500, functionality to download the API response zip file contain…
vividroyjeong Nov 28, 2024
687280c
Deep Equals for Layer State
smithkm Nov 28, 2024
46e1968
Deep equals for processing state
smithkm Nov 28, 2024
3e972eb
State dump Bank.
smithkm Dec 3, 2024
72906ea
ProcessingState write state for tests
smithkm Dec 4, 2024
d78f01e
Dump state for processing state tests
smithkm Dec 5, 2024
7620e02
Fix sonar warnings
smithkm Dec 9, 2024
114816c
Merge branch 'feature/VDYP-443' into feature/VDYP-464
smithkm Dec 10, 2024
aba5475
Merge branch 'bcgov:main' into feature/frontend-dev
vividroyjeong Dec 11, 2024
74da2ba
Re-config proxy
vividroyjeong Dec 11, 2024
cbf25b6
new client-lib
vividroyjeong Dec 11, 2024
ff4824e
Merge branch 'feature/frontend-dev' of https://github.com/vividroyjeo…
vividroyjeong Dec 11, 2024
775e96b
Change fileUploadRunModel process
vividroyjeong Dec 11, 2024
0ab4c2a
Merge pull request #42 from vividroyjeong/feature/frontend-dev
vividroyjeong Dec 11, 2024
b5a1d17
Remove tslint/eslint disable
vividroyjeong Dec 12, 2024
9d5b4ee
Delete unnecessary comments and unused import class
vividroyjeong Dec 12, 2024
107ffc3
Delete unused dcsvprojection/scsvprojection api client libraries
vividroyjeong Dec 12, 2024
9ae9fd6
Delete unnecessary comments
vividroyjeong Dec 12, 2024
400464a
Merge pull request #43 from vividroyjeong/feature/frontend-dev
vividroyjeong Dec 12, 2024
43c2a0c
Merge pull request #92 from bcgov/feature/frontend
vividroyjeong Dec 12, 2024
7993702
csv creation
vividroyjeong Dec 13, 2024
e367683
storybook setup init
vividroyjeong Dec 13, 2024
6eb75f6
JobTypeSelection story
vividroyjeong Dec 13, 2024
4edee67
type declare
vividroyjeong Dec 15, 2024
e7cbebb
Remove test stories - cardView and JobTypeSelection
vividroyjeong Dec 16, 2024
0dbb924
AppProgressCircular component story
vividroyjeong Dec 16, 2024
980d713
Merge pull request #44 from vividroyjeong/feature/storybook
vividroyjeong Dec 16, 2024
d49d85e
Merge branch 'bcgov:main' into main
vividroyjeong Dec 16, 2024
b48797a
AppMessageDialog story
vividroyjeong Dec 17, 2024
f79309a
AppSnackbar component story
vividroyjeong Dec 18, 2024
8b6fb69
Merge branch 'main' of https://github.com/vividroyjeong/NR-VDYP into …
vividroyjeong Dec 18, 2024
771a1e4
Merge pull request #45 from vividroyjeong/feature/storybook
vividroyjeong Dec 18, 2024
7e1767d
Merge branch 'main' of https://github.com/vividroyjeong/NR-VDYP into …
vividroyjeong Dec 18, 2024
c206e36
Merge pull request #93 from bcgov/feature/frontend
vividroyjeong Dec 18, 2024
f7e8bb0
Single polygon projection request
vividroyjeong Dec 18, 2024
204c33d
Merge branch 'main' of https://github.com/vividroyjeong/NR-VDYP into …
vividroyjeong Dec 18, 2024
f7bb2bc
Remove components and view that will not be included in MVP1
vividroyjeong Dec 18, 2024
49b8dc6
AppProgressCircular import
vividroyjeong Dec 18, 2024
d67fb40
Unexpected semicolon issue fix
vividroyjeong Dec 18, 2024
aad2b7a
Show "Model Parameter Selection" title only on the "Input Model Param…
vividroyjeong Dec 19, 2024
213123b
Title changes based on running projection method selection
vividroyjeong Dec 19, 2024
1f55d63
display result set for projection running - model report, view error …
vividroyjeong Dec 20, 2024
6bf65e8
test-data set
vividroyjeong Dec 20, 2024
15804f2
Remove test-data load
vividroyjeong Dec 20, 2024
6796f3a
Reporting views - relocating and restructuring reporting logic from C…
vividroyjeong Dec 21, 2024
151dfd7
PrintButton, DownloadButton -> Button component
vividroyjeong Dec 21, 2024
8600efc
Reporting storybooks
vividroyjeong Dec 23, 2024
a9b5c69
Show "No data available to download." message / correct emitted event…
vividroyjeong Dec 23, 2024
1c78906
Input model parameter views moving
vividroyjeong Dec 23, 2024
e81d5ff
Merge pull request #46 from vividroyjeong/feature/create-csv
vividroyjeong Dec 23, 2024
4e17cbd
Merge pull request #94 from bcgov/feature/frontend
vividroyjeong Dec 23, 2024
386b9c6
cypress initial commit
vividroyjeong Dec 23, 2024
e7226b6
cypress config update
vividroyjeong Dec 25, 2024
74de2a6
Button, ProgressCircular Component testing
vividroyjeong Dec 25, 2024
d4ca3c7
MessageDialog Component testing
vividroyjeong Dec 30, 2024
416d8e9
Notification storybook
vividroyjeong Dec 30, 2024
9c5c407
ReportingActions, ReportingOutput component testing
vividroyjeong Dec 31, 2024
84df487
ReportingContainer component testing / Configure Cypress to integrate…
vividroyjeong Jan 3, 2025
01192e7
Layout Header component -> smaller components / Implement storybooks …
vividroyjeong Jan 7, 2025
9e50a49
ModelParameterInput, FileUpload, model-param-selection-panes large co…
vividroyjeong Jan 13, 2025
ef51cf5
Merge pull request #47 from vividroyjeong/feature/input-param-comp
vividroyjeong Jan 13, 2025
96da318
Merge pull request #96 from bcgov/feature/frontend
vividroyjeong Jan 14, 2025
c419d44
with build version to see in UI
vividroyjeong Jan 17, 2025
b262062
copy root ca cert for upstream
vividroyjeong Jan 17, 2025
ade53df
Merge pull request #103 from bcgov/feature/root-cert-test
vividroyjeong Jan 17, 2025
5cc228c
Merge remote-tracking branch 'origin/main' into feature/VDYP-464
smithkm Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript', '@vue/eslint-config-prettier/skip-formatting'],
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting',
'plugin:storybook/recommended',
'plugin:cypress/recommended',
],
parserOptions: {
ecmaVersion: 'latest',
},
Expand Down
2 changes: 2 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ coverage

# env
.env

*storybook.log
9 changes: 9 additions & 0 deletions frontend/.storybook/StoryWrapper.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<v-app>
<v-main>
<slot name="story"></slot>
</v-main>
</v-app>
</template>

<script></script>
16 changes: 16 additions & 0 deletions frontend/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { StorybookConfig } from '@storybook/vue3-vite'

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/vue3-vite',
options: {},
},
}
export default config
24 changes: 24 additions & 0 deletions frontend/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { Preview } from '@storybook/vue3'
import { setup } from '@storybook/vue3'
import { registerPlugins } from '../src/plugins'
import { withVuetifyTheme } from './withVeutifyTheme.decorator'
import '../src/styles/style.scss'

setup((app) => {
registerPlugins(app)
})

export const decorators = [withVuetifyTheme]

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}

export default preview
16 changes: 16 additions & 0 deletions frontend/.storybook/withVeutifyTheme.decorator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { h } from 'vue'
import StoryWrapper from './StoryWrapper.vue'

export const withVuetifyTheme = (storyFn, context) => {
const story = storyFn()

return () => {
return h(
StoryWrapper,
{},
{
story: () => h(story, { ...context.args }),
},
)
}
}
12 changes: 5 additions & 7 deletions frontend/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@
}
rewrite @spa_router {http.matchers.file.relative}
# Proxy requests to API service
handle_path /api/* {
reverse_proxy {$VITE_API_URL} {
header_up Host {http.reverse_proxy.upstream.hostport}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
}
}
reverse_proxy /api/* {$VITE_API_URL} {
header_up Host {http.reverse_proxy.upstream.hostport}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
}
header {
X-Frame-Options "SAMEORIGIN"
X-XSS-Protection "1;mode=block"
Expand Down
5 changes: 5 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ RUN apk add --no-cache ca-certificates && \
mkdir -p /config/caddy /data/caddy && \
chown -R 1001:1001 /config/caddy /data/caddy

# Copy the root CA certificate to /etc/ssl/certs
ARG CONTEXT="./frontend"
COPY ${CONTEXT}/entrust_g2_ca.crt /etc/ssl/certs/entrust_g2_ca.crt
RUN update-ca-certificates

# Copy static files and run formatting
ARG CONTEXT="./frontend"
COPY --from=build /app/dist /srv
Expand Down
18 changes: 18 additions & 0 deletions frontend/cypress.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig } from 'cypress'

export default defineConfig({
// e2e: {
// setupNodeEvents(on, config) {
// // implement node event listeners here
// },
// },
fixturesFolder: 'cypress/fixtures',
component: {
devServer: {
framework: 'vue',
bundler: 'vite',
},
// supportFile: 'cypress/support/component.js',
supportFile: 'cypress/support/component.ts',
},
})
12 changes: 12 additions & 0 deletions frontend/cypress.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/// <reference types="cypress" />

import { MountOptions, VueWrapper } from 'cypress/vue'
import { Component } from 'vue'

declare global {
namespace Cypress {
interface Chainable {
mount(component: Component, options?: MountOptions): Chainable<VueWrapper>
}
}
}
29 changes: 29 additions & 0 deletions frontend/cypress/fixtures/ErrorLog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- I SUCCESS - Substitution of Supplied BA/TPH as Projected values has been disabled.
092H014 0 0 600 (Rcrd ID: 2493719 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1876 is too short to generate yields for species 'FDC'
092H014 0 0 600 (Rcrd ID: 2493719 ) 1 - I SPECIESNOTFOUND - Projected data for species 'FDC' was not generated at stand age 0.0 (Calendar Year: 1876)
092H014 0 0 600 (Rcrd ID: 2493719 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1876 is too short to generate yields for species 'PLI'
092H073 0 0 2185 (Rcrd ID: 2558002 ) 1 - I SUCCESS - Directly assigning Estimated SI of 20.00 to Species 'BA' and recomputing input height.
092H073 0 0 2185 (Rcrd ID: 2558002 ) 1 - I SUCCESS - Assigning converted Estimated SI of 20.00 to Species 'HW' and recomputing input height.
092H073 0 0 2185 (Rcrd ID: 2558002 ) 1 - I SUCCESS - Based on Estimated SI of 20.00, recomputed input height for species 'BA' at reference age 20.0 to be 4.93m
092H073 0 0 2185 (Rcrd ID: 2558002 ) 1 - I SUCCESS - Based on Estimated SI of 22.28, recomputed input height for species 'HW' at reference age 20.0 to be 7.01m
092H073 0 0 2185 (Rcrd ID: 2558002 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1976 is too short to generate yields for species 'BA'
092H073 0 0 2185 (Rcrd ID: 2558002 ) 1 - I SPECIESNOTFOUND - Projected data for species 'BA' was not generated at stand age 0.0 (Calendar Year: 1976)
092H073 0 0 2185 (Rcrd ID: 2558002 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1976 is too short to generate yields for species 'HW'
092H025 0 0 388 (Rcrd ID: 6212668 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1876 is too short to generate yields for species 'FDC'
092H025 0 0 388 (Rcrd ID: 6212668 ) 1 - I SPECIESNOTFOUND - Projected data for species 'FDC' was not generated at stand age 0.0 (Calendar Year: 1876)
092H025 0 0 388 (Rcrd ID: 6212668 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1876 is too short to generate yields for species 'HW'
092G089 0 0 51042508 (Rcrd ID: 8489172 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1755 is too short to generate yields for species 'FDC'
092G089 0 0 51042508 (Rcrd ID: 8489172 ) 1 - I SPECIESNOTFOUND - Projected data for species 'FDC' was not generated at stand age 0.0 (Calendar Year: 1755)
092G089 0 0 51042508 (Rcrd ID: 8489172 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1755 is too short to generate yields for species 'HW'
083D056 0 0 30790200 (Rcrd ID: 9884561 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1761 is too short to generate yields for species 'SX'
083D056 0 0 30790200 (Rcrd ID: 9884561 ) 1 - I SPECIESNOTFOUND - Projected data for species 'SX' was not generated at stand age 0.0 (Calendar Year: 1761)
083D056 0 0 30790200 (Rcrd ID: 9884561 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1761 is too short to generate yields for species 'BL'
093C085 0 0 3402903 (Rcrd ID: 13727877 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1853 is too short to generate yields for species 'SX'
093C085 0 0 3402903 (Rcrd ID: 13727877 ) 1 - I SPECIESNOTFOUND - Projected data for species 'SX' was not generated at stand age 0.0 (Calendar Year: 1853)
093G045 0 0 85306886 (Rcrd ID: 14330826 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1913 is too short to generate yields for species 'SB'
093G045 0 0 85306886 (Rcrd ID: 14330826 ) 1 - I SPECIESNOTFOUND - Projected data for species 'SB' was not generated at stand age 0.0 (Calendar Year: 1913)
092G028 0 0 7489355 (Rcrd ID: 14473383 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1907 is too short to generate yields for species 'CW'
092G028 0 0 7489355 (Rcrd ID: 14473383 ) 1 - I SPECIESNOTFOUND - Projected data for species 'CW' was not generated at stand age 0.0 (Calendar Year: 1907)
092G028 0 0 7489355 (Rcrd ID: 14473383 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1907 is too short to generate yields for species 'HW'
093C080 0 0 42373828 (Rcrd ID: 15138818 ) 1 - I INVALIDSITEINFO - Height 0.0 at Projection Year 1913 is too short to generate yields for species 'PLI'
093C080 0 0 42373828 (Rcrd ID: 15138818 ) 1 - I SPECIESNOTFOUND - Projected data for species 'PLI' was not generated at stand age 0.0 (Calendar Year: 1913)
39 changes: 39 additions & 0 deletions frontend/cypress/fixtures/ProgressLog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

VDYP7 Console version: '7.17d'

INI File: 'C:\Data_YC\VDYP7\ver7.33b\VDYP7\VDYP.ini'
Input Path: ''
HCSV Poly Inp: 'C:\Data_YC\VDYP7\console_instruction\virtual_tour\VDYP7_INPUT_POLY.csv'
HCSV Layer Inp: 'C:\Data_YC\VDYP7\console_instruction\virtual_tour\VDYP7_INPUT_LAYER.csv'
Output Path: 'C:\Data_YC\VDYP7\console_instruction\virtual_tour\VDYP7_OUTPUT_YLDTBL.csv'
Error File: 'C:\Data_YC\VDYP7\console_instruction\virtual_tour\VDYP7_OUTPUT_ERRMSG.txt'
Log File: 'C:\Data_YC\VDYP7\console_instruction\virtual_tour\VDYP7_OUTPUT_LOG.txt'
Debug Folder: ''
Debug Mode: 'Inactive'
Start Age: 0
End Age: 250
Start Year: N/A
End Year: N/A
Increment: 10
Inc. Ref Year: No
Inc. Crnt Year: No
Inc. Spcl Year: Yes (-9)
Back Grow Enabled: Yes
Forward Grow Enabled: Yes

Processing Polygon 2493719: '' '092H014'-600
Processing Polygon 2558002: '' '092H073'-2185
Processing Polygon 6212668: '' '092H025'-388
Processing Polygon 8489172: '' '092G089'-51042508
Processing Polygon 9884561: '' '083D056'-30790200
Processing Polygon 13727877: '' '093C085'-3402903
Processing Polygon 14330826: '' '093G045'-85306886
Processing Polygon 14473383: '' '092G028'-7489355
Processing Polygon 15138818: '' '093C080'-42373828

Processing Summary:
Polygons Processed: 9
Polygons Skipped: 0
-------
9

Loading
Loading