Skip to content

Commit

Permalink
Merge pull request #1126 from TomaszKandula/dev
Browse files Browse the repository at this point in the history
merge: dev to master
  • Loading branch information
TomaszKandula committed Jun 28, 2024
2 parents 7829a5b + 213ed10 commit aef0e28
Show file tree
Hide file tree
Showing 26 changed files with 489 additions and 209 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,34 @@ exports[`test account group component: resetPasswordView should render correctly
className="makeStyles-section-1"
>
<WithStyles(ForwardRef(Container))
maxWidth="sm"
className="makeStyles-container-2"
>
<Styled(MuiBox)
pb={10}
pt={18}
pt={8}
>
<Styled(MuiBox)
pb={6}
pt={4}
>
<BackArrowView />
</Styled(MuiBox)>
<WithStyles(ForwardRef(Card))
className="makeStyles-card-4"
className="makeStyles-card-5"
elevation={0}
>
<WithStyles(ForwardRef(CardContent))
className="makeStyles-card_content-5"
className="makeStyles-card_content-6"
>
<Styled(MuiBox)
mb={3}
textAlign="center"
>
<Memo(ForwardRef(AccountCircleIcon))
className="makeStyles-account-2"
className="makeStyles-account-3"
/>
<WithStyles(ForwardRef(Typography))
className="makeStyles-caption-3"
className="makeStyles-caption-4"
>
Reset Password
</WithStyles(ForwardRef(Typography))>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export const ResetPasswordStyle = makeStyles(() => ({
section: {
backgroundColor: Colours.colours.white,
},
container: {
maxWidth: 700,
},
account: {
fontSize: 72,
color: Colours.colours.violet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Card, CardContent, CircularProgress } from "@material-ui/core";
import { AccountCircle } from "@material-ui/icons";
import Skeleton from "@material-ui/lab/Skeleton";
import { ViewProperties } from "../../../../Shared/Abstractions";
import { BackArrow } from "../../../../Shared/Components";
import { ReactChangeEvent, ReactKeyboardEvent } from "../../../../Shared/types";
import { ResetPasswordStyle } from "./resetPasswordStyle";

Expand Down Expand Up @@ -43,8 +44,11 @@ export const ResetPasswordView = (props: Properties): JSX.Element => {
const classes = ResetPasswordStyle();
return (
<section className={classes.section}>
<Container maxWidth="sm">
<Box pt={18} pb={10}>
<Container className={classes.container}>
<Box pt={8} pb={10}>
<Box pt={4} pb={6}>
<BackArrow />
</Box>
<Card elevation={0} className={classes.card}>
<CardContent className={classes.card_content}>
<Box mb={3} textAlign="center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,57 @@ exports[`test account group component: resetPassword should renders correctly '<
class="makeStyles-section-1"
>
<div
class="MuiContainer-root MuiContainer-maxWidthSm"
class="MuiContainer-root makeStyles-container-2 MuiContainer-maxWidthLg"
>
<div
class="MuiBox-root MuiBox-root-7"
class="MuiBox-root MuiBox-root-8"
>
<div
class="MuiPaper-root MuiCard-root makeStyles-card-4 MuiPaper-elevation0 MuiPaper-rounded"
class="MuiBox-root MuiBox-root-9"
>
<a
href="/"
>
<button
class="MuiButtonBase-root MuiIconButton-root makeStyles-icon-10"
tabindex="0"
type="button"
>
<span
class="MuiIconButton-label"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"
/>
</svg>
</span>
<span
class="MuiTouchRipple-root"
/>
</button>
</a>
<hr
class="MuiDivider-root makeStyles-divider-11"
/>
</div>
<div
class="MuiPaper-root MuiCard-root makeStyles-card-5 MuiPaper-elevation0 MuiPaper-rounded"
>
<div
class="MuiCardContent-root makeStyles-card_content-5"
class="MuiCardContent-root makeStyles-card_content-6"
>
<div
class="MuiBox-root MuiBox-root-8"
class="MuiBox-root MuiBox-root-12"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root makeStyles-account-2"
class="MuiSvgIcon-root makeStyles-account-3"
focusable="false"
viewBox="0 0 24 24"
>
Expand All @@ -30,11 +64,11 @@ exports[`test account group component: resetPassword should renders correctly '<
/>
</svg>
<p
class="MuiTypography-root makeStyles-caption-3 MuiTypography-body1"
class="MuiTypography-root makeStyles-caption-4 MuiTypography-body1"
/>
</div>
<div
class="MuiBox-root MuiBox-root-9"
class="MuiBox-root MuiBox-root-13"
>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-spacing-xs-2"
Expand All @@ -60,11 +94,11 @@ exports[`test account group component: resetPassword should renders correctly '<
/>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-10 MuiOutlinedInput-notchedOutline"
class="PrivateNotchedOutline-root-14 MuiOutlinedInput-notchedOutline"
style="padding-left:8px"
>
<legend
class="PrivateNotchedOutline-legend-11"
class="PrivateNotchedOutline-legend-15"
style="width:0.01px"
>
<span>
Expand All @@ -77,19 +111,16 @@ exports[`test account group component: resetPassword should renders correctly '<
</div>
</div>
<div
class="MuiBox-root MuiBox-root-14"
class="MuiBox-root MuiBox-root-18"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained makeStyles-button-20 MuiButton-fullWidth"
class="MuiButtonBase-root MuiButton-root MuiButton-contained makeStyles-button-25 MuiButton-fullWidth"
tabindex="0"
type="submit"
>
<span
class="MuiButton-label"
/>
<span
class="MuiTouchRipple-root"
/>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "../../../setupTests";
import React from "react";
import * as Redux from "react-redux";
import * as Router from "react-router";
import { BrowserRouter } from "react-router-dom";
import { render } from "enzyme";
import { ResetPassword } from "./resetPassword";

Expand Down Expand Up @@ -33,7 +34,11 @@ describe("test account group component: resetPassword", () => {
});

it("should renders correctly '<ResetPassword />' when content is loaded.", () => {
const html = render(<ResetPassword />);
const html = render(
<BrowserRouter>
<ResetPassword />
</BrowserRouter>
);
expect(useDispatchMock).toBeCalledTimes(1);
expect(html).toMatchSnapshot();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,34 @@ exports[`test account group component: updatePasswordView should render correctl
className="makeStyles-section-1"
>
<WithStyles(ForwardRef(Container))
maxWidth="sm"
className="makeStyles-container-2"
>
<Styled(MuiBox)
pb={10}
pt={18}
pt={8}
>
<Styled(MuiBox)
pb={6}
pt={4}
>
<BackArrowView />
</Styled(MuiBox)>
<WithStyles(ForwardRef(Card))
className="makeStyles-card-4"
className="makeStyles-card-5"
elevation={0}
>
<WithStyles(ForwardRef(CardContent))
className="makeStyles-card_content-5"
className="makeStyles-card_content-6"
>
<Styled(MuiBox)
mb={3}
textAlign="center"
>
<Memo(ForwardRef(AccountCircleIcon))
className="makeStyles-account-2"
className="makeStyles-account-3"
/>
<WithStyles(ForwardRef(Typography))
className="makeStyles-caption-3"
className="makeStyles-caption-4"
>
Update password
</WithStyles(ForwardRef(Typography))>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export const UpdatePasswordStyle = makeStyles(() => ({
section: {
backgroundColor: Colours.colours.white,
},
container: {
maxWidth: 700,
},
account: {
fontSize: 72,
color: Colours.colours.violet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AccountCircle } from "@material-ui/icons";
import Skeleton from "@material-ui/lab/Skeleton";
import { ViewProperties } from "../../../../Shared/Abstractions";
import { ReactChangeEvent, ReactKeyboardEvent } from "../../../../Shared/types";
import { TextFiedWithPassword } from "../../../../Shared/Components";
import { BackArrow, TextFiedWithPassword } from "../../../../Shared/Components";
import { UpdatePasswordStyle } from "./updatePasswordStyle";

interface Properties extends ViewProperties {
Expand Down Expand Up @@ -46,8 +46,11 @@ export const UpdatePasswordView = (props: Properties): JSX.Element => {
const classes = UpdatePasswordStyle();
return (
<section className={classes.section}>
<Container maxWidth="sm">
<Box pt={18} pb={10}>
<Container className={classes.container}>
<Box pt={8} pb={10}>
<Box pt={4} pb={6}>
<BackArrow />
</Box>
<Card elevation={0} className={classes.card}>
<CardContent className={classes.card_content}>
<Box mb={3} textAlign="center">
Expand Down
Loading

0 comments on commit aef0e28

Please sign in to comment.