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

i17 fix CI #33

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion client/src/global/components/sign-in-up/LoginForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
18 changes: 10 additions & 8 deletions client/src/global/components/sign-in-up/__tests__/Login-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
};
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`global/components/sign-in-up/LoginForm matches the snapshot 1`] = `"<div><div class=\\"css-rrdd1g-LinksWrapper e13az8bp1\\"><button class=\\"css-u5m31a-ViewLink e13az8bp0\\">forms.signin_overlay.forgot_password</button><button class=\\"css-u5m31a-ViewLink e13az8bp0\\">forms.signin_overlay.need_account</button></div><div class=\\"css-1de147d-Wrapper e19w5a0q0\\"><button class=\\"button-secondary css-xlncs-Button ejqe3we0\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg button-secondary__icon svg-icon--socialEmail32\\" width=\\"26\\" height=\\"26\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M28.586,6.99999997 L3.41499996,6.99999997 L16,18.159 L28.586,6.99999997 L28.586,6.99999997 Z M16,20.584 L2.99999996,9.05699998 L2.99999996,25 L29,25 L29,9.05699998 L16,20.584 L16,20.584 Z\\"></path></svg><span class=\\"button-secondary__text\\">forms.signin_overlay.log_in_with_provider</span></button><button class=\\"button-secondary css-xlncs-Button ejqe3we0\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg button-secondary__icon svg-icon--socialTwitter32\\" width=\\"26\\" height=\\"26\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M30,7.31619997 C28.9515228,7.78072545 27.8393881,8.0856069 26.7006,8.22069998 C27.9003003,7.50286885 28.798046,6.37328518 29.2265,5.04249997 C28.0989009,5.71176382 26.8651508,6.18326004 25.5786,6.43659997 C23.7976636,4.54435699 20.9689701,4.0817104 18.6779871,5.30797114 C16.3870042,6.53423188 15.2031629,9.14460899 15.79,11.676 C11.1708147,11.4447105 6.86706167,9.26302756 3.94999996,5.67399997 C2.42561389,8.29903306 3.20400896,11.6568278 5.72789997,13.3434 C4.81566995,13.3148893 3.92350112,13.0685314 3.12589996,12.6249 L3.12539996,12.6971 C3.12573033,15.4316379 5.05254245,17.7873646 7.73269997,18.33 C6.8867092,18.5599269 5.99937697,18.5935827 5.13839997,18.4284 C5.8907162,20.7684358 8.04713954,22.3715983 10.5047,22.4179 C8.46977147,24.0149399 5.95678428,24.8810499 3.36999996,24.8769 C2.91216116,24.877069 2.45470735,24.8503564 1.99999996,24.7969 C4.62662885,26.4847185 7.68363698,27.3806651 10.8058,27.3777 C21.3722,27.3777 27.1502,18.6244 27.1502,11.0332 C27.1502,10.7842 27.1446667,10.5365 27.1336,10.2901 C28.2582178,9.47703381 29.2288714,8.46997741 30,7.31619997 L30,7.31619997 Z\\"></path></svg><span class=\\"button-secondary__text\\">forms.signin_overlay.log_in_with_provider</span></button></div></div>"`;
exports[`global/components/sign-in-up/LoginForm matches the snapshot 1`] = `"<div><div class=\\"css-rrdd1g-LinksWrapper e13az8bp1\\"><button class=\\"css-u5m31a-ViewLink e13az8bp0\\">forms.signin_overlay.forgot_password</button></div><div class=\\"css-1de147d-Wrapper e19w5a0q0\\"><button class=\\"button-secondary css-xlncs-Button ejqe3we0\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg button-secondary__icon svg-icon--socialEmail32\\" width=\\"26\\" height=\\"26\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M28.586,6.99999997 L3.41499996,6.99999997 L16,18.159 L28.586,6.99999997 L28.586,6.99999997 Z M16,20.584 L2.99999996,9.05699998 L2.99999996,25 L29,25 L29,9.05699998 L16,20.584 L16,20.584 Z\\"></path></svg><span class=\\"button-secondary__text\\">forms.signin_overlay.log_in_with_provider</span></button><button class=\\"button-secondary css-xlncs-Button ejqe3we0\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg button-secondary__icon svg-icon--socialTwitter32\\" width=\\"26\\" height=\\"26\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M30,7.31619997 C28.9515228,7.78072545 27.8393881,8.0856069 26.7006,8.22069998 C27.9003003,7.50286885 28.798046,6.37328518 29.2265,5.04249997 C28.0989009,5.71176382 26.8651508,6.18326004 25.5786,6.43659997 C23.7976636,4.54435699 20.9689701,4.0817104 18.6779871,5.30797114 C16.3870042,6.53423188 15.2031629,9.14460899 15.79,11.676 C11.1708147,11.4447105 6.86706167,9.26302756 3.94999996,5.67399997 C2.42561389,8.29903306 3.20400896,11.6568278 5.72789997,13.3434 C4.81566995,13.3148893 3.92350112,13.0685314 3.12589996,12.6249 L3.12539996,12.6971 C3.12573033,15.4316379 5.05254245,17.7873646 7.73269997,18.33 C6.8867092,18.5599269 5.99937697,18.5935827 5.13839997,18.4284 C5.8907162,20.7684358 8.04713954,22.3715983 10.5047,22.4179 C8.46977147,24.0149399 5.95678428,24.8810499 3.36999996,24.8769 C2.91216116,24.877069 2.45470735,24.8503564 1.99999996,24.7969 C4.62662885,26.4847185 7.68363698,27.3806651 10.8058,27.3777 C21.3722,27.3777 27.1502,18.6244 27.1502,11.0332 C27.1502,10.7842 27.1446667,10.5365 27.1336,10.2901 C28.2582178,9.47703381 29.2288714,8.46997741 30,7.31619997 L30,7.31619997 Z\\"></path></svg><span class=\\"button-secondary__text\\">forms.signin_overlay.log_in_with_provider</span></button></div></div>"`;
Loading