From cdc8e8f1bc86381442e086ee5531546667cc1087 Mon Sep 17 00:00:00 2001 From: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:20:42 -0700 Subject: [PATCH] fix client lint and test steps in CI --- .../components/sign-in-up/LoginForm/index.js | 2 +- .../sign-in-up/__tests__/Login-test.js | 18 ++++++++++-------- .../__tests__/__snapshots__/Login-test.js.snap | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/client/src/global/components/sign-in-up/LoginForm/index.js b/client/src/global/components/sign-in-up/LoginForm/index.js index 92ccb20c95..ba29b4e31f 100644 --- a/client/src/global/components/sign-in-up/LoginForm/index.js +++ b/client/src/global/components/sign-in-up/LoginForm/index.js @@ -20,7 +20,7 @@ export default function LoginForm({ hideOverlay, willRedirect }) { - const signupEnabled = process.env.ALLOW_SIGNUP === 'true'; + const signupEnabled = process.env.ALLOW_SIGNUP === "true"; const { t } = useTranslation(); const dispatch = useDispatch(); const authentication = useFromStore("authentication"); diff --git a/client/src/global/components/sign-in-up/__tests__/Login-test.js b/client/src/global/components/sign-in-up/__tests__/Login-test.js index 93b46bf2cd..82b7fbc6f6 100644 --- a/client/src/global/components/sign-in-up/__tests__/Login-test.js +++ b/client/src/global/components/sign-in-up/__tests__/Login-test.js @@ -31,12 +31,14 @@ describe("global/components/sign-in-up/LoginForm", () => { expect($handleViewChange).toHaveBeenCalled(); }); - it("should trigger handleViewChange callback when show create is clicked", () => { - $handleViewChange.mockClear(); - $wrapper - .find('button') - .at(1) - .simulate("click"); - expect($handleViewChange).toHaveBeenCalled(); - }); + if (process.env.ALLOW_SIGNUP === "true") { + it("should trigger handleViewChange callback when show create is clicked", () => { + $handleViewChange.mockClear(); + $wrapper + .find('button') + .at(1) + .simulate("click"); + expect($handleViewChange).toHaveBeenCalled(); + }); + }; }); diff --git a/client/src/global/components/sign-in-up/__tests__/__snapshots__/Login-test.js.snap b/client/src/global/components/sign-in-up/__tests__/__snapshots__/Login-test.js.snap index 55793c46a2..f439333a5d 100644 --- a/client/src/global/components/sign-in-up/__tests__/__snapshots__/Login-test.js.snap +++ b/client/src/global/components/sign-in-up/__tests__/__snapshots__/Login-test.js.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`global/components/sign-in-up/LoginForm matches the snapshot 1`] = `"
"`; +exports[`global/components/sign-in-up/LoginForm matches the snapshot 1`] = `"
"`;