-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[FIX] App forgetting workspace when server is not finished added #2798
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
bb92e32
[FIX] App forgetting workspace
gerzonc d8e84f2
Added e2e tests
gerzonc 7fc0d6c
Merge branch 'develop' into fix.app-forgetting-workspace
gerzonc 649147d
Update login.js
gerzonc 9c38f92
Merge branch 'develop' into fix.app-forgetting-workspace
gerzonc db89bed
Update logout.js
gerzonc ea907a6
Merge branch 'develop' into fix.app-forgetting-workspace
gerzonc f61fdf6
Reverted changes on login and share, updated init
gerzonc 39cb93d
Merge branch 'develop' into fix.app-forgetting-workspace
gerzonc 1946ccb
Update 08-persistantworkspace.spec.js
gerzonc f601c11
Revert unnecessary changes
gerzonc d5b1950
Merge branch 'develop' into fix.app-forgetting-workspace
gerzonc 05aba22
Merge branch 'develop' into fix.app-forgetting-workspace
gerzonc 7b46bfc
Revert line change
gerzonc 0d5e834
Update share.js
gerzonc 7d4fe55
Merge branch 'develop' into fix.app-forgetting-workspace
gerzonc cf0f832
Merge branch 'develop' into fix.app-forgetting-workspace
diegolmello 5b84b6c
Tweak tests
diegolmello 48087a0
Use wm shorthand
diegolmello a5bb3b6
Remove irrelevant calls to RocketChat.TOKEN_KEY
diegolmello 63645d4
Merge branch 'develop' into fix.app-forgetting-workspace
diegolmello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,86 @@ | ||
| const { | ||
| expect, element, by, waitFor | ||
| } = require('detox'); | ||
| const { navigateToLogin, tapBack, sleep } = require('../../helpers/app'); | ||
| const data = require('../../data'); | ||
|
|
||
| describe('Persistant workspace', () => { | ||
| describe('From Onboarding', () => { | ||
| before(async() => { | ||
| await device.launchApp({ permissions: { notifications: 'YES' }, newInstance: true, delete: true }); | ||
|
|
||
| }); | ||
|
|
||
| it('should select a valid server, close the app and open again', async() => { | ||
| await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(2000); | ||
| await element(by.id('join-workspace')).tap(); | ||
| await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(6000); | ||
| await element(by.id('new-server-view-input')).replaceText(data.server); | ||
| await element(by.id('new-server-view-button')).tap(); | ||
| await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(6000); | ||
| await device.terminateApp(); | ||
| await device.launchApp({ permissions: { notifications: 'YES' }}); | ||
| await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(2000); | ||
| }); | ||
| }); | ||
|
|
||
| describe('From Current Server', () => { | ||
| before(async() => { | ||
| await device.launchApp({ permissions: { notifications: 'YES' }, newInstance: true, delete: true }); | ||
| await navigateToLogin(); | ||
| }); | ||
|
|
||
| it('should login to server, add new server, close the app, open the app and show previous logged server', async() => { | ||
| await element(by.id('login-view-email')).replaceText(data.users.regular.username); | ||
| await element(by.id('login-view-password')).replaceText(data.users.regular.password); | ||
| await element(by.id('login-view-submit')).tap(); | ||
| await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(6000); | ||
|
|
||
| await element(by.id('rooms-list-header-server-dropdown-button')).tap(); | ||
| await waitFor(element(by.id('rooms-list-header-server-dropdown'))).toBeVisible().withTimeout(5000); | ||
| await element(by.id('rooms-list-header-server-add')).tap(); | ||
|
|
||
| await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(6000); | ||
| await element(by.id('new-server-view-input')).replaceText(data.alternateServer); | ||
| await element(by.id('new-server-view-button')).tap(); | ||
| await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(6000); | ||
| await device.terminateApp(); | ||
| await device.launchApp({ permissions: { notifications: 'YES' } }); | ||
| await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(6000); | ||
| }); | ||
| }); | ||
|
|
||
| describe('From New Server', () => { | ||
| before(async() => { | ||
| await device.launchApp({ permissions: { notifications: 'YES' }, newInstance: true, delete: true }); | ||
| await navigateToLogin(); | ||
| }); | ||
|
|
||
| it('should login to server, add new server, login to new server, close the app, open the app and show latest logged server', async() => { | ||
| await element(by.id('login-view-email')).replaceText(data.users.regular.username); | ||
| await element(by.id('login-view-password')).replaceText(data.users.regular.password); | ||
| await element(by.id('login-view-submit')).tap(); | ||
| await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(6000); | ||
|
|
||
| await element(by.id('rooms-list-header-server-dropdown-button')).tap(); | ||
| await waitFor(element(by.id('rooms-list-header-server-dropdown'))).toBeVisible().withTimeout(5000); | ||
| await element(by.id('rooms-list-header-server-add')).tap(); | ||
|
|
||
| await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(6000); | ||
| await element(by.id('new-server-view-input')).replaceText(data.alternateServer); | ||
| await element(by.id('new-server-view-button')).tap(); | ||
| await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(6000); | ||
|
|
||
| await element(by.id('workspace-view-login')).tap(); | ||
| await waitFor(element(by.id('login-view'))).toBeVisible().withTimeout(2000); | ||
| await expect(element(by.id('login-view'))).toBeVisible(); | ||
| await element(by.id('login-view-email')).replaceText('userfourkjadssldkjaasdf'); | ||
| await element(by.id('login-view-password')).replaceText('123'); | ||
| await element(by.id('login-view-submit')).tap(); | ||
| await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(6000); | ||
| await device.terminateApp(); | ||
| await device.launchApp({ permissions: { notifications: 'YES' } }); | ||
| await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(6000); | ||
| }); | ||
| }); | ||
| }); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.