Skip to content

Commit 5519205

Browse files
style: apply eslint formatting fixes
1 parent acee0a3 commit 5519205

4 files changed

Lines changed: 28 additions & 14 deletions

File tree

src/modules/Auth/features/Login/Login.schema.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ export const loginFormSchema = () => {
1616
password: yup
1717
.string()
1818
.required(passwordRequired)
19-
.test('no-whitespace', passwordBlankSpaces, (password) => !password || checkPassword(password).hasNoSpaces),
19+
.test(
20+
'no-whitespace',
21+
passwordBlankSpaces,
22+
(password) => !password || checkPassword(password).hasNoSpaces,
23+
),
2024
})
2125
.required();
2226
};

src/modules/Auth/features/RecoverPassword/RecoverForm/RecoverForm.schema.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ export const newPasswordSchema = () => {
1919
.string()
2020
.required(passwordRequired)
2121
.min(ACCOUNT_PASSWORD_MIN_LENGTH, passwordMinLength)
22-
.test('no-whitespace', passwordBlankSpaces, (password) => !password || checkPassword(password).hasNoSpaces)
23-
.test('char-types', passwordCharacterTypes, (password) => !password || checkPassword(password).meetsCharTypeRequirement),
22+
.test(
23+
'no-whitespace',
24+
passwordBlankSpaces,
25+
(password) => !password || checkPassword(password).hasNoSpaces,
26+
)
27+
.test(
28+
'char-types',
29+
passwordCharacterTypes,
30+
(password) => !password || checkPassword(password).meetsCharTypeRequirement,
31+
),
2432
passwordConfirmation: yup
2533
.string()
2634
.required(passwordConfirmationRequired)

src/modules/Auth/features/SignUp/SignUpForm/SignUpForm.schema.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@ export const SignUpFormSchema = () => {
2323
.string()
2424
.required(passwordRequired)
2525
.min(ACCOUNT_PASSWORD_MIN_LENGTH, passwordMinLength)
26-
.test('no-whitespace', passwordBlankSpaces, (password) => !password || checkPassword(password).hasNoSpaces)
27-
.test('char-types', passwordCharacterTypes, (password) => !password || checkPassword(password).meetsCharTypeRequirement),
26+
.test(
27+
'no-whitespace',
28+
passwordBlankSpaces,
29+
(password) => !password || checkPassword(password).hasNoSpaces,
30+
)
31+
.test(
32+
'char-types',
33+
passwordCharacterTypes,
34+
(password) => !password || checkPassword(password).meetsCharTypeRequirement,
35+
),
2836
termsOfService: yup.boolean().oneOf([true], termsOfServiceAgreementRequired),
2937
})
3038
.required();

src/shared/components/PasswordRequirementsTooltip/PasswordRequirementsTooltip.test.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ import { PasswordRequirementsTooltip } from './PasswordRequirementsTooltip';
77

88
describe('PasswordRequirementsTooltip', () => {
99
test('renders the info icon', () => {
10-
const { getByTestId } = renderWithProviders(
11-
<PasswordRequirementsTooltip password="" />,
12-
);
10+
const { getByTestId } = renderWithProviders(<PasswordRequirementsTooltip password="" />);
1311

1412
expect(getByTestId('password-requirements-info')).toBeInTheDocument();
1513
});
1614

1715
test('shows tooltip content on hover', async () => {
18-
const { getByTestId } = renderWithProviders(
19-
<PasswordRequirementsTooltip password="" />,
20-
);
16+
const { getByTestId } = renderWithProviders(<PasswordRequirementsTooltip password="" />);
2117

2218
await userEvent.hover(getByTestId('password-requirements-info'));
2319

@@ -32,9 +28,7 @@ describe('PasswordRequirementsTooltip', () => {
3228
});
3329

3430
test('shows all requirements as unmet for empty password', async () => {
35-
const { getByTestId } = renderWithProviders(
36-
<PasswordRequirementsTooltip password="" />,
37-
);
31+
const { getByTestId } = renderWithProviders(<PasswordRequirementsTooltip password="" />);
3832

3933
await userEvent.hover(getByTestId('password-requirements-info'));
4034
await screen.findByText('Password must include:');

0 commit comments

Comments
 (0)