-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[No QA]: Add test to reauthenticate offline user #51805
[No QA]: Add test to reauthenticate offline user #51805
Conversation
@allgandalf Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@@ -50,7 +53,7 @@ afterEach(() => { | |||
}); | |||
|
|||
describe('NetworkTests', () => { | |||
test('failing to reauthenticate while offline should not log out user', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this part of the description because this test doesn't turn off the network
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay so this happens when the user is online, cool no problem with the change
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
tests/unit/NetworkTest.ts
Outdated
jsonCode: CONST.JSON_CODE.NOT_AUTHENTICATED, | ||
}), | ||
) | ||
// // Call Authenticate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// // Call Authenticate | |
// Call Authenticate |
tests/unit/NetworkTest.ts
Outdated
authToken: 'newAuthToken', | ||
}), | ||
) | ||
// // Call ReconnectApp again, it should connect with a new token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// // Call ReconnectApp again, it should connect with a new token | |
// Call ReconnectApp again, it should connect with a new token |
@zirgulis can you mark the title as : [No QA]: Add test to reauthenticate offline user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve this new unit test.
To anyone who checks this change in future take a look at this thread, for starters we have added a test to simulate the failing to reauthenticate while offline should not log out user
.
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.0.58-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.58-2 🚀
|
Explanation of Change
Fixed Issues
$ #51185
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop