-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1416 from airqo-platform/NET-timeout-sessions
[Netmanager] Sessions Timeout For user login
- Loading branch information
Showing
3 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import ConfirmDialog from 'views/containers/ConfirmDialog'; | ||
|
||
describe('ConfirmDialog Component', () => { | ||
it('renders without crashing', () => { | ||
const wrapper = shallow( | ||
<ConfirmDialog | ||
open={true} | ||
close={() => {}} | ||
title="Session Expired" | ||
message="Your session has expired due to inactivity. Please log in again." | ||
confirmBtnMsg="Log In" | ||
confirm={() => {}} | ||
error={false} | ||
/> | ||
); | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
}); |
49 changes: 49 additions & 0 deletions
49
netmanager/src/__tests__/__snapshots__/TimeSession.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ConfirmDialog Component renders without crashing 1`] = ` | ||
<WithStyles(ForwardRef(Dialog)) | ||
aria-describedby="confirm-dialog-description" | ||
aria-labelledby="confirm-dialog-title-del" | ||
classes="confirm-dialog" | ||
onClose={[Function]} | ||
open={true} | ||
> | ||
<div | ||
className="confirm-dialog" | ||
> | ||
<div | ||
className="confirm-dialog-title" | ||
> | ||
Session Expired | ||
</div> | ||
<div | ||
className="confirm-dialog-message" | ||
> | ||
Your session has expired due to inactivity. Please log in again. | ||
</div> | ||
<div | ||
className="confirm-dialog-controls" | ||
> | ||
<WithStyles(ForwardRef(Button)) | ||
onClick={[Function]} | ||
variant="contained" | ||
> | ||
Cancel | ||
</WithStyles(ForwardRef(Button))> | ||
<WithStyles(ForwardRef(Button)) | ||
onClick={[Function]} | ||
style={ | ||
Object { | ||
"background": "#2f67e2", | ||
"color": "white", | ||
} | ||
} | ||
type="submit" | ||
variant="contained" | ||
> | ||
Log In | ||
</WithStyles(ForwardRef(Button))> | ||
</div> | ||
</div> | ||
</WithStyles(ForwardRef(Dialog))> | ||
`; |