Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
177
Merge Requests
12
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Compare Revisions
eb2a9249d8d829cae2c40a5801134d78eb0cee38...22369c5966641d8c77f2cecf8a4bdfb3f8f78545
Source
22369c5966641d8c77f2cecf8a4bdfb3f8f78545
...
Target
eb2a9249d8d829cae2c40a5801134d78eb0cee38
Compare
Commits (2)
(feat) improve login e2e
· 83a9aa31
Martin Santangelo
authored
20 hours ago
83a9aa31
Merge branch 'feat/more-relaiable-login-e2e' into 'epic/e2e-detox'
· 22369c59
Brian Hatchet
authored
16 minutes ago
More reliable login e2e See merge request
!427
22369c59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
e2e/login.spec.js
View file @
22369c59
import
login
from
"
./actions/login
"
;
import
sleep
from
'
../src/common/helpers/sleep
'
;
describe
(
'
Login Flow
'
,
()
=>
{
beforeEach
(
async
()
=>
{
...
...
@@ -12,13 +11,18 @@ describe('Login Flow', () => {
});
it
(
'
should show error
'
,
async
()
=>
{
// should login successfully
await
expect
(
element
(
by
.
id
(
'
usernameInput
'
))).
toBeVisible
();
// login should be visible
await
waitFor
(
element
(
by
.
id
(
'
usernameInput
'
)))
.
toBeVisible
()
.
withTimeout
(
10000
);
// we moved the login logic to an action to avoid code duplication
await
login
(
'
bad
'
,
'
credentials
'
);
await
sleep
(
1000
);
// wait for the message
await
waitFor
(
element
(
by
.
id
(
'
loginMsg
'
)))
.
toBeVisible
()
.
withTimeout
(
2000
);
// it should show the error message
// according to the detox docs it should be toHaveText but it only works with toHaveLabel
...
...
@@ -26,8 +30,10 @@ describe('Login Flow', () => {
});
it
(
'
should login successfully
'
,
async
()
=>
{
// should login successfully
await
expect
(
element
(
by
.
id
(
'
usernameInput
'
))).
toBeVisible
();
// login should be visible
await
waitFor
(
element
(
by
.
id
(
'
usernameInput
'
)))
.
toBeVisible
()
.
withTimeout
(
10000
);
// we moved the login logic to an action to avoid code duplication
await
login
(
process
.
env
.
loginUser
,
process
.
env
.
loginPass
);
...
...
This diff is collapsed.