Skip to content

Commit 9809c53

Browse files
authored
Remember to run Prettier, even when it has precommit hook (#339)
1 parent 0fbfda4 commit 9809c53

File tree

18 files changed

+71
-72
lines changed

18 files changed

+71
-72
lines changed

integration_tests/pages/LoginPage.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export class LoginPage extends BasePage {
44
email = this.page.getByTestId("email");
55
password = this.page.getByTestId("password");
66
loginBtn = this.page.getByTestId("loginBtn");
7-
showPasswordBtn = this.page.locator("[aria-label='toggle password visibility']");
7+
showPasswordBtn = this.page.locator(
8+
"[aria-label='toggle password visibility']",
9+
);
810
}
9-

integration_tests/test/login.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ test("show and hide password", async ({ loginPage }) => {
2424
await loginPage.password.type("123456");
2525

2626
await loginPage.showPasswordBtn.click();
27-
expect(await loginPage.password.getAttribute('type')).toBe('text');
27+
expect(await loginPage.password.getAttribute("type")).toBe("text");
2828

2929
await loginPage.showPasswordBtn.click();
30-
expect(await loginPage.password.getAttribute('type')).toBe('password');
31-
});
30+
expect(await loginPage.password.getAttribute("type")).toBe("password");
31+
});

src/components/BuildList/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { FunctionComponent } from "react";
2-
import { makeStyles, createStyles } from '@mui/styles';
2+
import { makeStyles, createStyles } from "@mui/styles";
33
import {
44
List,
55
ListItemButton,

src/components/CommentsPopper.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import React from "react";
2-
import { makeStyles } from '@mui/styles';
3-
import { Button, Popper, Fade, Paper, TextField, Badge, type Theme } from "@mui/material";
2+
import { makeStyles } from "@mui/styles";
3+
import {
4+
Button,
5+
Popper,
6+
Fade,
7+
Paper,
8+
TextField,
9+
Badge,
10+
type Theme,
11+
} from "@mui/material";
412
import {
513
usePopupState,
614
bindToggle,
@@ -16,7 +24,6 @@ const useStyles = makeStyles((theme: Theme) => ({
1624
},
1725
}));
1826

19-
2027
interface IProps {
2128
text: string | undefined;
2229
onSave: (comment: string) => Promise<void | string | number>;

src/components/LoginForm.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ const LoginForm = () => {
6363
</Grid>
6464

6565
<Grid item>
66-
<PasswordField
67-
password={password}
68-
setPassword={setPassword}
69-
/>
66+
<PasswordField password={password} setPassword={setPassword} />
7067
</Grid>
7168
</Grid>
7269
</CardContent>

src/components/PasswordField.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import React, { useState } from "react";
2-
import {
3-
IconButton,
4-
InputAdornment,
5-
} from "@mui/material";
2+
import { IconButton, InputAdornment } from "@mui/material";
63
import { Visibility, VisibilityOff } from "@mui/icons-material";
74
import { TextValidator } from "react-material-ui-form-validator";
85

96
interface PasswordFieldProps {
10-
password: string;
11-
setPassword: React.Dispatch<React.SetStateAction<string>>;
12-
label?: string;
7+
password: string;
8+
setPassword: React.Dispatch<React.SetStateAction<string>>;
9+
label?: string;
1310
}
1411

15-
const PasswordField = ({password, setPassword, label = "Password" }: PasswordFieldProps) => {
12+
const PasswordField = ({
13+
password,
14+
setPassword,
15+
label = "Password",
16+
}: PasswordFieldProps) => {
1617
const [showPassword, setShowPassword] = useState<boolean>(false);
1718

1819
const handleClickShowPassword = () => setShowPassword((show) => !show);

src/components/ProjectSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { FunctionComponent } from "react";
2-
import { makeStyles, createStyles } from '@mui/styles';
2+
import { makeStyles, createStyles } from "@mui/styles";
33
import {
44
FormControl,
55
InputLabel,

src/components/RegisterForm.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import React, { useState, FormEvent } from "react";
2-
import {
3-
Button,
4-
Grid,
5-
Card,
6-
CardContent,
7-
CardActions,
8-
} from "@mui/material";
2+
import { Button, Grid, Card, CardContent, CardActions } from "@mui/material";
93
import { useUserDispatch, login } from "../contexts";
104
import { usersService } from "../services";
115
import { useSnackbar } from "notistack";
@@ -39,7 +33,7 @@ const RegisterForm = () => {
3933
}),
4034
);
4135
};
42-
36+
4337
const errorForTwoChar = "Enter at least two characters.";
4438

4539
return (
@@ -105,10 +99,7 @@ const RegisterForm = () => {
10599
/>
106100
</Grid>
107101
<Grid item>
108-
<PasswordField
109-
password={password}
110-
setPassword={setPassword}
111-
/>
102+
<PasswordField password={password} setPassword={setPassword} />
112103
</Grid>
113104
</Grid>
114105
</CardContent>

src/components/TestDetailsDialog/DrawArea.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,5 @@ export const DrawArea: FunctionComponent<IDrawArea> = ({
339339
);
340340

341341
// TODO: Separate SVG with reason...
342-
return (
343-
<>
344-
{imageName ? imageCanvas() : <NoImagePlaceholder />}
345-
</>
346-
);
342+
return <>{imageName ? imageCanvas() : <NoImagePlaceholder />}</>;
347343
};

src/components/TestDetailsDialog/TestDetailsModal.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState } from "react";
2-
import { makeStyles } from '@mui/styles';
2+
import { makeStyles } from "@mui/styles";
33
import {
44
Typography,
55
Button,
@@ -603,11 +603,7 @@ const TestDetailsModal: React.FunctionComponent<TestDetailsModalProps> = ({
603603
<TestStatusChip status={testRun.status} />
604604
</Grid>
605605
<Grid item className={classes.closeIcon}>
606-
<IconButton
607-
color="inherit"
608-
onClick={handleClose}
609-
size="large"
610-
>
606+
<IconButton color="inherit" onClick={handleClose} size="large">
611607
<Close />
612608
</IconButton>
613609
</Grid>

0 commit comments

Comments
 (0)