Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

chore: increase sign in timeout to 60 seconds #2705

Merged
merged 4 commits into from
Aug 21, 2020
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
5 changes: 5 additions & 0 deletions src/domains/profile/components/SignIn/SignIn.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ describe("SignIn", () => {
expect(queryByText(/Maximum sign in attempts reached/)).toBeTruthy();
expect(getByTestId("SignIn__submit-button")).toBeDisabled();

await act(async () => {
jest.advanceTimersByTime(60000);
jest.clearAllTimers();
});

await waitFor(() => {
expect(queryByText("The Password is invalid")).toBeTruthy();
});
Expand Down
2 changes: 1 addition & 1 deletion src/domains/profile/components/SignIn/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type SignInProps = {
};

const MAX_ATTEMPTS = 3;
const TIMEOUT = 5;
const TIMEOUT = 60;

export const SignIn = ({ isOpen, profile, onCancel, onClose, onSuccess }: SignInProps) => {
const { t } = useTranslation();
Expand Down