Skip to content

Commit

Permalink
fix: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
leleOFA committed Jan 31, 2025
1 parent 60a3a72 commit 7e3a788
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/pn-commons/src/components/InactivityHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ const InactivityHandler: React.FC<Props> = ({ inactivityTimer, onTimerExpired, c

const differenceTimerModal = setTimeout(() => {
setOpenModal(true);

}, inactivityTimer - (20 * 1000));
}, inactivityTimer - (5 * 1000));

// cleanup function
return () => {
Expand All @@ -44,7 +43,6 @@ const InactivityHandler: React.FC<Props> = ({ inactivityTimer, onTimerExpired, c

return (
<>

<PnDialog
open={openModal}
aria-labelledby="session-dialog-title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ describe('InactivityHandler Component', () => {
() => {
expect(timerExpiredHandler).toHaveBeenCalledTimes(0);
},
{ timeout: inactivityTimer + 1000 }
);
expect(buttonOfSessionModal).not.toBeInTheDocument()
});
});
2 changes: 1 addition & 1 deletion packages/pn-pa-webapp/src/navigation/SessionGuard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const INITIALIZATION_SEQUENCE = [
INITIALIZATION_STEPS.SESSION_CHECK,
];

const inactivityTimer = 5 * 6 * 1000;
const inactivityTimer = 10 * 1000;

const manageUnforbiddenError = (e: any) => {
if (e.status === 451) {
Expand Down

0 comments on commit 7e3a788

Please sign in to comment.