├── Procfile ├── cypress.json ├── manifests ├── overlays │ ├── minikube │ │ ├── kustomization.yaml │ │ └── traefik-ingress-service.yaml │ ├── eks │ │ ├── kustomization.yaml │ │ ├── fluentd-cloudwatch-configmap.yaml │ │ ├── fluentd-cloudwatch-cluster-role.yaml │ │ ├── storage-class-default.yaml │ │ ├── fluentd-cloudwatch-cluster-role-binding.yaml │ │ ├── certs-claim.yaml │ │ ├── traefik-ingress-service.yaml │ │ ├── fluentd-cloudwatch-daemonset-template.yaml │ │ └── traefik-ingress-controller-deployment.yaml │ └── aks │ │ ├── kustomization.yaml │ │ ├── storage-class-managedhdd.yaml │ │ ├── certs-claim.yaml │ │ ├── traefik-ingress-service.yaml │ │ ├── vac-benefits-directory-ingress.yaml │ │ └── traefik-ingress-controller-deployment.yaml ├── base │ ├── traefik-ingress-controller-service-account.yaml │ ├── traefik-ingress-controller-webui-service.yaml │ ├── vac-benefits-directory-service.yaml │ ├── traefik-ingress.yaml │ ├── traefik-ingress-controller-cluster-role-binding.yaml │ ├── kustomization.yaml │ ├── traefik-ingress-controller-cluster-role.yaml │ ├── traefik-ingress-controller-deployment.yaml │ ├── vac-benefits-directory-deployment.yaml │ ├── datadog-serviceaccount.yaml │ └── datadog-agent.yaml └── README.md ├── static └── leaf-favicon.png ├── .circleci ├── notify_failure.sh └── get-semvar.sh ├── cypress ├── fixtures │ └── example.json ├── plugins │ └── index.js ├── support │ ├── index.js │ └── commands.js └── integration │ └── guided_experience_spec.js ├── __tests__ ├── fixtures │ ├── responses.js │ ├── benefitExamples.js │ ├── translate.js │ ├── question_clear_logic.js │ ├── translations.js │ ├── needs.js │ ├── benefit_types.js │ ├── question_display_logic.js │ ├── benefitEligibility.js │ ├── multiple_choice_options.js │ ├── questions.js │ └── benefits.js ├── data │ ├── needs_data_test.js │ ├── questions_data_test.js │ ├── benefit_examples_data_test.js │ ├── benefit_eligibility_data_test.js │ ├── question_clear_logic_data_test.js │ ├── question_display_logic_data_test.js │ ├── multiple_choice_options_data_test.js │ ├── translations_data_test.js │ └── benefits_data_test.js ├── pages │ ├── needs_test.js │ ├── index_test.js │ ├── service_type_test.js │ ├── status_and_vitals_test.js │ └── service_health_issue_test.js ├── components │ ├── vac_footer_en_test.js │ ├── vac_footer_fr_test.js │ ├── noscript_test.js │ ├── details_test.js │ ├── card_details_test.js │ ├── skip_to_main_content_test.js │ ├── phase_badge_test.js │ ├── button_test.js │ ├── breadcrumbs_test.js │ ├── icons │ │ └── alert_icon_test.js │ ├── checkbox_test.js │ ├── paper_test.js │ ├── typography │ │ ├── filter_text_test.js │ │ ├── one_liner_test.js │ │ ├── body_test.js │ │ ├── header_test.js │ │ ├── footer_link_test.js │ │ └── anchor_link_test.js │ ├── radio_test.js │ ├── header_button_test.js │ ├── disabled_cookies_banner_test.js │ ├── header_link_test.js │ ├── container_test.js │ ├── myvac_button_test.js │ ├── no_results_buttons_test.js │ ├── footer_button_test.js │ ├── feedback_submitted_test.js │ ├── dropdown_test.js │ ├── need_tag_test.js │ ├── word_mark_test.js │ ├── results_header_test.js │ ├── tooltip_test.js │ ├── card_header_important_info_test.js │ ├── text_area_test.js │ ├── child_benefit_list_test.js │ ├── version_banner_test.js │ ├── example_bullets_test.js │ ├── need_button_test.js │ ├── vac_header_en_test.js │ ├── vac_header_fr_test.js │ ├── layout_test.js │ ├── guided_experience_needs_test.js │ ├── share_box_test.js │ ├── head_test.js │ ├── error_boundary_test.js │ ├── benefit_card_header_test.js │ ├── guided_experience_profile_test.js │ ├── learn_more_button_test.js │ └── needs_selector_test.js └── utils │ └── url_check_test.js ├── utils ├── hydrate_from_fixtures.js ├── hardcoded_strings.js ├── polyfills.js ├── url_check.js └── analytics.js ├── pages ├── needs.js ├── serviceType.js ├── statusAndVitals.js ├── serviceHealthIssue.js ├── index.js ├── benefits-directory.js └── all-benefits.js ├── app.json ├── jest.setup.js ├── styleguide.config.js ├── .gitignore ├── jest.config.js ├── .eslintrc.json ├── components ├── phase_badge.js ├── error_boundary.js ├── no_results_buttons.js ├── typography │ ├── body.js │ ├── filter_text.js │ ├── one_liner.js │ ├── footer_link.js │ └── anchor_link.js ├── results_header.js ├── icons │ ├── ExpandMore.js │ ├── utils │ │ └── createSvgIcon.js │ ├── SaveUnchecked.js │ ├── Close.js │ ├── SaveChecked.js │ ├── Edit.js │ ├── CloseButton.js │ ├── Tag.js │ ├── Language.js │ └── alert_icon.js ├── card_header_important_info.js ├── need_tag.js ├── myvac_button.js ├── skip_to_main_content.js ├── head.js ├── guided_experience_profile.js ├── footer_button.js ├── container.js ├── noscript.js ├── feedback_submitted.js ├── disabled_cookies_banner.js ├── learn_more_button.js ├── tooltip.js ├── details.js ├── version_banner.js ├── paper.js ├── card_details.js ├── breadcrumbs.js ├── guided_experience_needs.js ├── guided_experience_page.js ├── header_link.js ├── card_header_parent_info.js ├── dropdown.js ├── need_button.js ├── header_button.js ├── child_benefit_list.js └── radio.js ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── scripts ├── download.js └── test_benefit_urls.js ├── doc ├── en │ ├── SECURITY.md │ └── CONTENT_UPDATE.md └── fr │ └── SECURITE.md ├── Dockerfile ├── LICENSE ├── lib ├── pageContext.js └── i18nHOC.js ├── styles.js ├── next.config.js ├── .babelrc ├── fallback-pages └── browser-incompatible.html ├── theme.js ├── selectors └── urls.js └── .snyk /Procfile: -------------------------------------------------------------------------------- 1 | web: yarn start 2 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:3000", 3 | "video": false 4 | } 5 | -------------------------------------------------------------------------------- /manifests/overlays/minikube/kustomization.yaml: -------------------------------------------------------------------------------- 1 | bases: 2 | - ../../base 3 | resources: 4 | - traefik-ingress-service.yaml 5 | -------------------------------------------------------------------------------- /static/leaf-favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veteransaffairscanada/vac-benefits-directory/HEAD/static/leaf-favicon.png -------------------------------------------------------------------------------- /manifests/base/traefik-ingress-controller-service-account.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: traefik-ingress-controller 5 | namespace: kube-system 6 | -------------------------------------------------------------------------------- /.circleci/notify_failure.sh: -------------------------------------------------------------------------------- 1 | if [ "${CIRCLE_BRANCH}" == "master" ]; then 2 | curl -X POST --data-urlencode "payload={\"text\": \" Master is failing!!!\"}" $VAC_DEV_SLACK_URL 3 | fi 4 | -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /__tests__/fixtures/responses.js: -------------------------------------------------------------------------------- 1 | const responsesFixture = { 2 | patronType: "", 3 | serviceType: "", 4 | statusAndVitals: "", 5 | serviceHealthIssue: "" 6 | }; 7 | 8 | export default responsesFixture; 9 | -------------------------------------------------------------------------------- /utils/hydrate_from_fixtures.js: -------------------------------------------------------------------------------- 1 | import benefitsFixture from "../__tests__/fixtures/benefits"; 2 | 3 | export const hydrateFromFixtures = loadDataStore => { 4 | loadDataStore({ 5 | benefits: benefitsFixture 6 | }); 7 | }; 8 | -------------------------------------------------------------------------------- /manifests/overlays/eks/kustomization.yaml: -------------------------------------------------------------------------------- 1 | bases: 2 | - ../../base 3 | resources: 4 | - traefik-ingress-service.yaml 5 | - certs-claim.yaml 6 | - storage-class-default.yaml 7 | patches: 8 | - traefik-ingress-controller-deployment.yaml 9 | -------------------------------------------------------------------------------- /pages/needs.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import GuidedExperiencePage from "../components/guided_experience_page"; 3 | 4 | let Needs = props => { 5 | return ; 6 | }; 7 | 8 | export default Needs; 9 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vac-poc", 3 | "scripts": {}, 4 | "env": { 5 | "AIRTABLE_READ_KEY": { "required": true }, 6 | "AIRTABLE_BASE_KEY": { "required": false } 7 | }, 8 | "formation": {}, 9 | "addons": [], 10 | "buildpacks": [] 11 | } 12 | -------------------------------------------------------------------------------- /pages/serviceType.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import GuidedExperiencePage from "../components/guided_experience_page"; 3 | 4 | let ServiceType = props => { 5 | return ; 6 | }; 7 | 8 | export default ServiceType; 9 | -------------------------------------------------------------------------------- /pages/statusAndVitals.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import GuidedExperiencePage from "../components/guided_experience_page"; 3 | 4 | let StatusAndVitals = props => { 5 | return ; 6 | }; 7 | 8 | export default StatusAndVitals; 9 | -------------------------------------------------------------------------------- /manifests/overlays/aks/kustomization.yaml: -------------------------------------------------------------------------------- 1 | bases: 2 | - ../../base 3 | resources: 4 | - traefik-ingress-service.yaml 5 | - certs-claim.yaml 6 | - storage-class-managedhdd.yaml 7 | - vac-benefits-directory-ingress.yaml 8 | patches: 9 | - traefik-ingress-controller-deployment.yaml 10 | -------------------------------------------------------------------------------- /manifests/overlays/aks/storage-class-managedhdd.yaml: -------------------------------------------------------------------------------- 1 | kind: StorageClass 2 | apiVersion: storage.k8s.io/v1beta1 3 | provisioner: kubernetes.io/azure-disk 4 | metadata: 5 | name: managedhdd 6 | parameters: 7 | storageaccounttype: Standard_LRS 8 | kind: Managed 9 | reclaimPolicy: Delete 10 | -------------------------------------------------------------------------------- /pages/serviceHealthIssue.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import GuidedExperiencePage from "../components/guided_experience_page"; 3 | 4 | let ServiceHealthIssue = props => { 5 | return ; 6 | }; 7 | 8 | export default ServiceHealthIssue; 9 | -------------------------------------------------------------------------------- /manifests/base/traefik-ingress-controller-webui-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: traefik-web-ui 5 | namespace: kube-system 6 | spec: 7 | selector: 8 | k8s-app: traefik-ingress-lb 9 | ports: 10 | - name: web 11 | port: 80 12 | targetPort: 8080 13 | -------------------------------------------------------------------------------- /manifests/overlays/eks/fluentd-cloudwatch-configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: fluentd-cloudwatch 5 | namespace: kube-system 6 | labels: 7 | app: fluentd-cloudwatch 8 | env: system 9 | data: 10 | AWS_REGION: us-west-2 11 | CW_LOG_GROUP: vac-eks-cluster 12 | -------------------------------------------------------------------------------- /__tests__/data/needs_data_test.js: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | describe("Needs data", () => { 4 | let data; 5 | beforeEach(() => { 6 | data = JSON.parse(fs.readFileSync("data/data.json")).needs; 7 | }); 8 | 9 | it("is not empty", () => { 10 | expect(data).not.toHaveLength(0); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/data/questions_data_test.js: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | describe("Questions data", () => { 4 | let data; 5 | beforeEach(() => { 6 | data = JSON.parse(fs.readFileSync("data/data.json")).questions; 7 | }); 8 | 9 | it("is not empty", () => { 10 | expect(data).not.toHaveLength(0); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/pages/needs_test.js: -------------------------------------------------------------------------------- 1 | /* eslint-env jest */ 2 | import React from "react"; 3 | import { shallow } from "enzyme"; 4 | import Needs from "../../pages/needs"; 5 | 6 | describe("Needs", () => { 7 | it("renders GuidedExperiencePage", async () => { 8 | expect(shallow().length).toEqual(1); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /__tests__/pages/index_test.js: -------------------------------------------------------------------------------- 1 | /* eslint-env jest */ 2 | import React from "react"; 3 | import { shallow } from "enzyme"; 4 | import { Index } from "../../pages/index"; 5 | 6 | describe("Index", () => { 7 | it("renders GuidedExperiencePage", async () => { 8 | expect(shallow().length).toEqual(1); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /manifests/overlays/eks/fluentd-cloudwatch-cluster-role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1beta1 2 | kind: ClusterRole 3 | metadata: 4 | name: default 5 | namespace: kube-system 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - pods 11 | verbs: 12 | - get 13 | - list 14 | - watch 15 | -------------------------------------------------------------------------------- /__tests__/data/benefit_examples_data_test.js: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | describe("Benefit examples data", () => { 4 | let data; 5 | beforeEach(() => { 6 | data = JSON.parse(fs.readFileSync("data/data.json")).benefitExamples; 7 | }); 8 | 9 | it("is not empty", () => { 10 | expect(data).not.toHaveLength(0); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /manifests/overlays/eks/storage-class-default.yaml: -------------------------------------------------------------------------------- 1 | kind: StorageClass 2 | apiVersion: storage.k8s.io/v1 3 | provisioner: kubernetes.io/aws-ebs 4 | metadata: 5 | name: gp2 6 | annotations: 7 | "storageclass.kubernetes.io/is-default-class": "true" 8 | parameters: 9 | type: gp2 10 | reclaimPolicy: Delete 11 | mountOptions: 12 | - debug 13 | -------------------------------------------------------------------------------- /__tests__/data/benefit_eligibility_data_test.js: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | describe("Benefit eligibility data", () => { 4 | let data; 5 | beforeEach(() => { 6 | data = JSON.parse(fs.readFileSync("data/data.json")).benefitEligibility; 7 | }); 8 | 9 | it("is not empty", () => { 10 | expect(data).not.toHaveLength(0); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/data/question_clear_logic_data_test.js: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | describe("Question clear logic data", () => { 4 | let data; 5 | beforeEach(() => { 6 | data = JSON.parse(fs.readFileSync("data/data.json")).questionClearLogic; 7 | }); 8 | 9 | it("is not empty", () => { 10 | expect(data).not.toHaveLength(0); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/pages/service_type_test.js: -------------------------------------------------------------------------------- 1 | /* eslint-env jest */ 2 | import React from "react"; 3 | import { shallow } from "enzyme"; 4 | import ServiceType from "../../pages/serviceType"; 5 | 6 | describe("ServiceType", () => { 7 | it("renders GuidedExperiencePage", async () => { 8 | expect(shallow().length).toEqual(1); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /__tests__/data/question_display_logic_data_test.js: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | describe("Question display logic data", () => { 4 | let data; 5 | beforeEach(() => { 6 | data = JSON.parse(fs.readFileSync("data/data.json")).questionDisplayLogic; 7 | }); 8 | 9 | it("is not empty", () => { 10 | expect(data).not.toHaveLength(0); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/data/multiple_choice_options_data_test.js: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | describe("Multiple choice options data", () => { 4 | let data; 5 | beforeEach(() => { 6 | data = JSON.parse(fs.readFileSync("data/data.json")).multipleChoiceOptions; 7 | }); 8 | 9 | it("is not empty", () => { 10 | expect(data).not.toHaveLength(0); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /manifests/overlays/eks/fluentd-cloudwatch-cluster-role-binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1beta1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: default 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: ClusterRole 8 | name: default 9 | subjects: 10 | - kind: ServiceAccount 11 | name: default 12 | namespace: kube-system 13 | -------------------------------------------------------------------------------- /__tests__/pages/status_and_vitals_test.js: -------------------------------------------------------------------------------- 1 | /* eslint-env jest */ 2 | import React from "react"; 3 | import { shallow } from "enzyme"; 4 | import StatusAndVitals from "../../pages/statusAndVitals"; 5 | 6 | describe("StatusAndVitals", () => { 7 | it("renders GuidedExperiencePage", async () => { 8 | expect(shallow().length).toEqual(1); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /jest.setup.js: -------------------------------------------------------------------------------- 1 | import { configure } from "enzyme"; 2 | import Adapter from "enzyme-adapter-react-16"; 3 | 4 | configure({ adapter: new Adapter() }); 5 | 6 | const position = { coords: { latitude: 10, longitude: 10 } }; 7 | const mockGeolocation = { 8 | getCurrentPosition: async success => success(position) 9 | }; 10 | 11 | global.navigator.geolocation = mockGeolocation; 12 | -------------------------------------------------------------------------------- /manifests/base/vac-benefits-directory-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: find-benefits-and-services 5 | spec: 6 | ports: 7 | - name: http 8 | targetPort: 3000 9 | port: 3000 10 | selector: 11 | app: vac-benefits-directory 12 | task: find-benefits-and-services 13 | type: ClusterIP 14 | status: 15 | loadBalancer: {} 16 | -------------------------------------------------------------------------------- /manifests/base/traefik-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: traefik-web-ui 5 | namespace: kube-system 6 | spec: 7 | rules: 8 | - host: traefik.vacdevopslab.com 9 | http: 10 | paths: 11 | - path: / 12 | backend: 13 | serviceName: traefik-web-ui 14 | servicePort: web 15 | -------------------------------------------------------------------------------- /utils/hardcoded_strings.js: -------------------------------------------------------------------------------- 1 | exports.tableNames = [ 2 | "benefits", 3 | "benefitEligibility", 4 | "needs", 5 | "translations", 6 | "questions", 7 | "multipleChoiceOptions", 8 | "questionDisplayLogic", 9 | "questionClearLogic", 10 | "benefitExamples" 11 | ]; 12 | 13 | exports.servicePersonOptions = ["veteran", "servingMember"]; 14 | exports.familyOptions = ["family"]; 15 | -------------------------------------------------------------------------------- /__tests__/pages/service_health_issue_test.js: -------------------------------------------------------------------------------- 1 | /* eslint-env jest */ 2 | import React from "react"; 3 | import { shallow } from "enzyme"; 4 | import ServiceHealthIssue from "../../pages/serviceHealthIssue"; 5 | 6 | describe("ServiceHealthIssue", () => { 7 | it("renders GuidedExperiencePage", async () => { 8 | expect(shallow().length).toEqual(1); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /manifests/overlays/minikube/traefik-ingress-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: traefik-ingress-service 5 | namespace: kube-system 6 | spec: 7 | ports: 8 | - name: http 9 | port: 80 10 | protocol: TCP 11 | - name: admin 12 | port: 8080 13 | protocol: TCP 14 | selector: 15 | k8s-app: traefik-ingress-lb 16 | type: NodePort 17 | -------------------------------------------------------------------------------- /manifests/overlays/eks/certs-claim.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | annotations: 5 | volume.beta.kubernetes.io/storage-class: gp2 6 | labels: 7 | io.kompose.service: certs-claim 8 | name: certs-claim 9 | namespace: kube-system 10 | spec: 11 | accessModes: 12 | - ReadWriteOnce 13 | resources: 14 | requests: 15 | storage: 100Mi 16 | status: {} 17 | -------------------------------------------------------------------------------- /manifests/overlays/aks/certs-claim.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | annotations: 5 | volume.beta.kubernetes.io/storage-class: managedhdd 6 | labels: 7 | io.kompose.service: certs-claim 8 | name: certs-claim 9 | namespace: kube-system 10 | spec: 11 | accessModes: 12 | - ReadWriteOnce 13 | resources: 14 | requests: 15 | storage: 100Mi 16 | status: {} 17 | -------------------------------------------------------------------------------- /manifests/base/traefik-ingress-controller-cluster-role-binding.yaml: -------------------------------------------------------------------------------- 1 | kind: ClusterRoleBinding 2 | apiVersion: rbac.authorization.k8s.io/v1beta1 3 | metadata: 4 | name: traefik-ingress-controller 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: ClusterRole 8 | name: traefik-ingress-controller 9 | subjects: 10 | - kind: ServiceAccount 11 | name: traefik-ingress-controller 12 | namespace: kube-system 13 | -------------------------------------------------------------------------------- /styleguide.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | components: "components/*.js", 3 | exampleMode: "hide", 4 | styleguideDir: "documentation", 5 | title: "VAC Component Documentation", 6 | usageMode: "expand", 7 | webpackConfig: { 8 | module: { 9 | rules: [ 10 | { 11 | test: /\.js$/, 12 | exclude: /node_modules/, 13 | loader: "babel-loader" 14 | } 15 | ] 16 | } 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /manifests/overlays/aks/traefik-ingress-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: traefik-ingress-service 5 | namespace: kube-system 6 | spec: 7 | ports: 8 | - name: http 9 | port: 80 10 | protocol: TCP 11 | - name: https 12 | port: 443 13 | protocol: TCP 14 | - name: admin 15 | port: 8080 16 | protocol: TCP 17 | selector: 18 | k8s-app: traefik-ingress-lb 19 | type: LoadBalancer 20 | -------------------------------------------------------------------------------- /manifests/overlays/eks/traefik-ingress-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: traefik-ingress-service 5 | namespace: kube-system 6 | spec: 7 | ports: 8 | - name: http 9 | port: 80 10 | protocol: TCP 11 | - name: https 12 | port: 443 13 | protocol: TCP 14 | - name: admin 15 | port: 8080 16 | protocol: TCP 17 | selector: 18 | k8s-app: traefik-ingress-lb 19 | type: LoadBalancer 20 | -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import GuidedExperiencePage from "../components/guided_experience_page"; 3 | import Cookies from "universal-cookie"; 4 | 5 | export class Index extends Component { 6 | constructor(props) { 7 | super(props); 8 | this.cookies = new Cookies(); 9 | } 10 | 11 | render() { 12 | return ; 13 | } 14 | } 15 | 16 | export default Index; 17 | -------------------------------------------------------------------------------- /__tests__/components/vac_footer_en_test.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { mount } from "enzyme"; 3 | import VacFooterEn from "../../components/vac_footer_en"; 4 | const { axe, toHaveNoViolations } = require("jest-axe"); 5 | expect.extend(toHaveNoViolations); 6 | 7 | describe("VacFooterEn", () => { 8 | it("passes axe tests", async () => { 9 | let html = mount().html(); 10 | expect(await axe(html)).toHaveNoViolations(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/components/vac_footer_fr_test.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { mount } from "enzyme"; 3 | import VacFooterFr from "../../components/vac_footer_fr"; 4 | const { axe, toHaveNoViolations } = require("jest-axe"); 5 | expect.extend(toHaveNoViolations); 6 | 7 | describe("VacFooterFr", () => { 8 | it("passes axe tests", async () => { 9 | let html = mount().html(); 10 | expect(await axe(html)).toHaveNoViolations(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /__tests__/fixtures/benefitExamples.js: -------------------------------------------------------------------------------- 1 | const benefitExamplesFixture = [ 2 | { 3 | english: "example 0", 4 | french: "example 0 fr", 5 | linked_benefits: ["b0_en"] 6 | }, 7 | { 8 | english: "example 1", 9 | french: "example 1 fr", 10 | linked_benefits: ["b3_en"] 11 | }, 12 | { 13 | english: "example 2", 14 | french: "example 2 fr", 15 | linked_benefits: ["b1_en"] 16 | } 17 | ]; 18 | 19 | export default benefitExamplesFixture; 20 | -------------------------------------------------------------------------------- /manifests/overlays/aks/vac-benefits-directory-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: vac-benefits-directory 5 | annotations: 6 | kubernetes.io/ingress.class: traefik 7 | spec: 8 | rules: 9 | - host: benefits-avantages.veterans.gc.ca 10 | http: 11 | paths: 12 | - path: / 13 | backend: 14 | serviceName: find-benefits-and-services 15 | servicePort: http 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | /cypress/screenshots 9 | 10 | # production 11 | /build 12 | /dist 13 | /documentation 14 | /.next 15 | 16 | # misc 17 | .DS_Store 18 | .env 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | .idea 23 | *.swp 24 | locales/en/common.missing.json 25 | 26 | #Eclipse specific 27 | .project 28 | .settings/* 29 | -------------------------------------------------------------------------------- /__tests__/components/noscript_test.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Noscript from "../../components/noscript"; 3 | import { mount } from "enzyme"; 4 | 5 | const { axe, toHaveNoViolations } = require("jest-axe"); 6 | expect.extend(toHaveNoViolations); 7 | 8 | describe("Test Noscript component", () => { 9 | it("passes axe tests", async () => { 10 | let html = mount(