From 35d4c940b6ff53c3730dd95213a60c993091f686 Mon Sep 17 00:00:00 2001 From: TomNUSDS <74203452+TomNUSDS@users.noreply.github.com> Date: Fri, 10 Dec 2021 08:37:38 -0800 Subject: [PATCH 1/6] Run automated checks on regular PR (NOT master or production) --- .github/workflows/build_frontend.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build_frontend.yaml b/.github/workflows/build_frontend.yaml index a4bbd3e36da..19f1db9c2ef 100644 --- a/.github/workflows/build_frontend.yaml +++ b/.github/workflows/build_frontend.yaml @@ -60,5 +60,9 @@ jobs: - name: Build staging fallthrough for PR branch (conditional check) if: (!(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/production')) + working-directory: ./frontend run: | + yarn lint:prettier + yarn lint:eslint + yarn test:ci yarn build:staging From 5f20ca0f7546d4b290b616bca326198b3f555a79 Mon Sep 17 00:00:00 2001 From: TomNUSDS <74203452+TomNUSDS@users.noreply.github.com> Date: Fri, 10 Dec 2021 08:45:25 -0800 Subject: [PATCH 2/6] Touching version to trigger React Build for ci/cd --- frontend-react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend-react/package.json b/frontend-react/package.json index 8b11a6d6a70..057cc48dc65 100644 --- a/frontend-react/package.json +++ b/frontend-react/package.json @@ -1,6 +1,6 @@ { "name": "react-frontend", - "version": "0.1.0", + "version": "0.1.1", "private": true, "npmClient": "yarn", "proxy": "http://localhost:7071", From e451a5228780dbb6d246f4cc8f95e52018f1a87c Mon Sep 17 00:00:00 2001 From: TomNUSDS <74203452+TomNUSDS@users.noreply.github.com> Date: Fri, 10 Dec 2021 08:52:17 -0800 Subject: [PATCH 3/6] Fix working directory --- .github/workflows/build_frontend.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_frontend.yaml b/.github/workflows/build_frontend.yaml index 19f1db9c2ef..d57c41f7bb7 100644 --- a/.github/workflows/build_frontend.yaml +++ b/.github/workflows/build_frontend.yaml @@ -60,7 +60,7 @@ jobs: - name: Build staging fallthrough for PR branch (conditional check) if: (!(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/production')) - working-directory: ./frontend + working-directory: ./frontend-react run: | yarn lint:prettier yarn lint:eslint From 773081ea98d761af393f8c777ea7706c31eb2b91 Mon Sep 17 00:00:00 2001 From: TomNUSDS <74203452+TomNUSDS@users.noreply.github.com> Date: Fri, 10 Dec 2021 09:33:47 -0800 Subject: [PATCH 4/6] Pushing broken test to verify ci/cd --- frontend-react/src/components/Title.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend-react/src/components/Title.test.tsx b/frontend-react/src/components/Title.test.tsx index f761c08209f..1cded445c3a 100644 --- a/frontend-react/src/components/Title.test.tsx +++ b/frontend-react/src/components/Title.test.tsx @@ -10,7 +10,7 @@ describe("Title component", () => { }); it("verify title shows", async () => { - expect(await screen.findByText(UNIQUE_TITLE)).toBeInTheDocument(); + expect(await screen.findByText(UNIQUE_TITLE)).not.toBeInTheDocument(); // temp break to test ci/cd check expect(await screen.findByText(UNIQUE_PRETITLE)).toBeInTheDocument(); }); }); From da0e6205493567ec2a58883076a4deacce97fa48 Mon Sep 17 00:00:00 2001 From: TomNUSDS <74203452+TomNUSDS@users.noreply.github.com> Date: Fri, 10 Dec 2021 09:38:21 -0800 Subject: [PATCH 5/6] Undo intentionally broken unit test --- frontend-react/src/components/Title.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend-react/src/components/Title.test.tsx b/frontend-react/src/components/Title.test.tsx index 1cded445c3a..f761c08209f 100644 --- a/frontend-react/src/components/Title.test.tsx +++ b/frontend-react/src/components/Title.test.tsx @@ -10,7 +10,7 @@ describe("Title component", () => { }); it("verify title shows", async () => { - expect(await screen.findByText(UNIQUE_TITLE)).not.toBeInTheDocument(); // temp break to test ci/cd check + expect(await screen.findByText(UNIQUE_TITLE)).toBeInTheDocument(); expect(await screen.findByText(UNIQUE_PRETITLE)).toBeInTheDocument(); }); }); From 1a3283d162e03ec1d99c3031f23d97bf205d3e22 Mon Sep 17 00:00:00 2001 From: TomNUSDS <74203452+TomNUSDS@users.noreply.github.com> Date: Fri, 10 Dec 2021 09:45:39 -0800 Subject: [PATCH 6/6] Remove unused includes --- .../src/pages/tos-sign/TermsOfServiceForm.test.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/frontend-react/src/pages/tos-sign/TermsOfServiceForm.test.tsx b/frontend-react/src/pages/tos-sign/TermsOfServiceForm.test.tsx index 1443130dbf4..2d6449c8465 100644 --- a/frontend-react/src/pages/tos-sign/TermsOfServiceForm.test.tsx +++ b/frontend-react/src/pages/tos-sign/TermsOfServiceForm.test.tsx @@ -1,10 +1,4 @@ -import { - fireEvent, - render, - screen, - waitForElementToBeRemoved, - waitFor, -} from "@testing-library/react"; +import { fireEvent, render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { BrowserRouter } from "react-router-dom";