Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session Timeout #46

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open

Session Timeout #46

wants to merge 44 commits into from

Conversation

isaqueha
Copy link
Collaborator

@isaqueha isaqueha commented Sep 10, 2020

Description

This PR adds the Session Timeout dialog and engine;
The Information Dialog is included since it is a dependency.

Testing

  1. Open Application;
  2. Let the application unattended;
  3. Wait for 13 minutes (or change the Constants.js file);
  4. Check that a Warning Popup displays;
  5. Wait for 15 minutes (or change the Constants.js file);
  6. Check that a Timeout Popup displays.

Automated Tests

  • Select this if your code has automated Tests for it.

References

@isaqueha isaqueha self-assigned this Sep 10, 2020
src/util/Layout.js Outdated Show resolved Hide resolved
src/util/Layout.js Outdated Show resolved Hide resolved
src/util/Constants.js Outdated Show resolved Hide resolved
src/App.js Outdated Show resolved Hide resolved
Copy link
Owner

@LuisValgoi LuisValgoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the comments

@isaqueha
Copy link
Collaborator Author

@LuisValgoi, I have done some changes, can you review it again?

About the Unit Tests, I could only test the snapshot.
That's because the Dialogs are not "open" by default, and the screen.getByTestId can't find them.
Any suggestions on what to test in the Unit Tests?

@LuisValgoi
Copy link
Owner

@isaqueha check my last commits pls?

@LuisValgoi
Copy link
Owner

@isaqueha another thing:

Wouldn´t be nice for us to like add two black box test to see the sessiontimeout state?

examples:

1st

i should render, wait 15min and see the text as “has expired”

2nd

i should render, wait 13min and see the text as “almost expiring”

@lpohren
Copy link
Collaborator

lpohren commented Sep 21, 2020

@isaqueha ,
I removed the snapshot test for the Information Dialog, it was not building the component. It is probably happening because needs the dialog ref, which we cannot use in the test.
For the SessionTimeout test, the 'Session expired' test is failing for me and in the CI, I couldn't fix it.

@isaqueha
Copy link
Collaborator Author

Hi @lpohren,
The SessionTimeout test is broken in fact, probably it has the same issue with the Information Dialog and the dialog ref.
I think we can go without snapshots for these dialogs.
What do you think?

@lpohren
Copy link
Collaborator

lpohren commented Sep 23, 2020

Yes, I agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants