File tree Expand file tree Collapse file tree 6 files changed +15
-51
lines changed Expand file tree Collapse file tree 6 files changed +15
-51
lines changed Original file line number Diff line number Diff line change @@ -18,27 +18,21 @@ describe('/allocations behaviour', () => {
18
18
cy . url ( ) . should ( 'include' , 'login' )
19
19
} )
20
20
21
- it ( 'Should be accesible if the user is an admin' , ( ) => {
22
- cy . adminSignIn ( )
23
- cy . visitPage ( '/allocations/1' )
24
- cy . url ( ) . should ( 'include' , 'allocations' )
25
- } )
26
-
27
- it ( 'Should be accesible if the user is not an admin' , ( ) => {
21
+ it ( 'Should be accesible for a logged user' , ( ) => {
28
22
cy . userSignIn ( )
29
23
cy . visitPage ( '/allocations/1' )
30
24
cy . url ( ) . should ( 'include' , 'allocations' )
31
25
} )
32
26
33
27
it ( 'Should be an input' , ( ) => {
34
- cy . adminSignIn ( )
28
+ cy . userSignIn ( )
35
29
cy . visitPage ( '/allocations/1' )
36
30
cy . get ( 'input[name="threshold"]' )
37
31
} )
38
32
39
33
it ( 'Should redirect the user' , ( ) => {
40
34
const threshold = 2
41
- cy . adminSignIn ( )
35
+ cy . userSignIn ( )
42
36
cy . visitPage ( '/allocations/1' )
43
37
44
38
cy . get ( 'input[name="threshold"]' )
Original file line number Diff line number Diff line change @@ -18,20 +18,14 @@ describe('/contributions behaviour', () => {
18
18
cy . url ( ) . should ( 'include' , 'login' )
19
19
} )
20
20
21
- it ( 'Should be accesible if the user is an admin' , ( ) => {
22
- cy . adminSignIn ( )
23
- cy . visitPage ( '/contributions' )
24
- cy . url ( ) . should ( 'include' , 'contributions' )
25
- } )
26
-
27
- it ( 'Should be accesible if the user is not an admin' , ( ) => {
21
+ it ( 'Should be accesible for a logged user' , ( ) => {
28
22
cy . userSignIn ( )
29
23
cy . visitPage ( '/contributions' )
30
24
cy . url ( ) . should ( 'include' , 'contributions' )
31
25
} )
32
26
33
27
it ( 'Should be a table with several inputs' , ( ) => {
34
- cy . adminSignIn ( )
28
+ cy . userSignIn ( )
35
29
cy . visitPage ( '/contributions' )
36
30
cy . get ( 'table' )
37
31
. find ( 'input' )
@@ -40,7 +34,7 @@ describe('/contributions behaviour', () => {
40
34
41
35
it ( 'Should input be modified' , ( ) => {
42
36
const value = '12'
43
- cy . adminSignIn ( )
37
+ cy . userSignIn ( )
44
38
cy . visitPage ( '/contributions' )
45
39
cy . get ( 'table' )
46
40
. find ( 'input' )
Original file line number Diff line number Diff line change @@ -10,20 +10,14 @@ describe('/dashboard behaviour', () => {
10
10
cy . url ( ) . should ( 'include' , 'login' )
11
11
} )
12
12
13
- it ( 'Should be accesible if the user is an admin' , ( ) => {
14
- cy . adminSignIn ( )
15
- cy . visitPage ( '/dashboard' )
16
- cy . url ( ) . should ( 'include' , 'dashboard' )
17
- } )
18
-
19
- it ( 'Should be accesible if the user is not an admin' , ( ) => {
13
+ it ( 'Should be accesible for a logged user' , ( ) => {
20
14
cy . userSignIn ( )
21
15
cy . visitPage ( '/dashboard' )
22
16
cy . url ( ) . should ( 'include' , 'dashboard' )
23
17
} )
24
18
25
19
it ( 'Should display information' , ( ) => {
26
- cy . adminSignIn ( )
20
+ cy . userSignIn ( )
27
21
cy . visitPage ( '/dashboard' )
28
22
cy . url ( ) . should ( 'include' , 'dashboard' )
29
23
cy . get ( '.panel' )
@@ -32,7 +26,7 @@ describe('/dashboard behaviour', () => {
32
26
} )
33
27
34
28
it ( 'Should have a link to /contributions' , ( ) => {
35
- cy . adminSignIn ( )
29
+ cy . userSignIn ( )
36
30
cy . visitPage ( '/dashboard' )
37
31
cy . url ( ) . should ( 'include' , 'dashboard' )
38
32
cy . get ( '.panel a' )
Original file line number Diff line number Diff line change @@ -10,13 +10,7 @@ describe('/learn behaviour', () => {
10
10
cy . url ( ) . should ( 'include' , 'login' )
11
11
} )
12
12
13
- it ( 'Should be accesible if the user is an admin' , ( ) => {
14
- cy . adminSignIn ( )
15
- cy . visitPage ( '/learn?url=/dashboard' )
16
- cy . url ( ) . should ( 'include' , 'dashboard' )
17
- } )
18
-
19
- it ( 'Should be accesible if the user is not an admin' , ( ) => {
13
+ it ( 'Should be accesible for a logged user' , ( ) => {
20
14
cy . userSignIn ( )
21
15
cy . visitPage ( '/learn?url=/dashboard' )
22
16
cy . url ( ) . should ( 'include' , 'dashboard' )
Original file line number Diff line number Diff line change @@ -18,28 +18,22 @@ describe('/memos behaviour', () => {
18
18
cy . url ( ) . should ( 'include' , 'login' )
19
19
} )
20
20
21
- it ( 'Should be accesible if the user is an admin' , ( ) => {
22
- cy . adminSignIn ( )
23
- cy . visitPage ( '/memos' )
24
- cy . url ( ) . should ( 'include' , 'memos' )
25
- } )
26
-
27
- it ( 'Should be accesible if the user is not an admin' , ( ) => {
21
+ it ( 'Should be accesible for a logged user' , ( ) => {
28
22
cy . userSignIn ( )
29
23
cy . visitPage ( '/memos' )
30
24
cy . url ( ) . should ( 'include' , 'memos' )
31
25
} )
32
26
33
27
it ( 'Should exists a textarea' , ( ) => {
34
- cy . adminSignIn ( )
28
+ cy . userSignIn ( )
35
29
cy . visitPage ( '/memos' )
36
30
cy . get ( 'textarea[name="memo"]' )
37
31
} )
38
32
39
33
it ( 'Should memo be generated' , ( ) => {
40
34
const text = 'Hello World!'
41
35
42
- cy . adminSignIn ( )
36
+ cy . userSignIn ( )
43
37
cy . visitPage ( '/memos' )
44
38
cy . get ( 'textarea[name="memo"]' )
45
39
. clear ( )
Original file line number Diff line number Diff line change @@ -10,13 +10,7 @@ describe('/research behaviour', () => {
10
10
cy . url ( ) . should ( 'include' , 'login' )
11
11
} )
12
12
13
- it ( 'Should be accesible if the user is an admin' , ( ) => {
14
- cy . adminSignIn ( )
15
- cy . visitPage ( '/research' )
16
- cy . url ( ) . should ( 'include' , 'research' )
17
- } )
18
-
19
- it ( 'Should be accesible if the user is not an admin' , ( ) => {
13
+ it ( 'Should be accesible for a logged user' , ( ) => {
20
14
cy . userSignIn ( )
21
15
cy . visitPage ( '/research' )
22
16
cy . url ( ) . should ( 'include' , 'research' )
@@ -31,7 +25,7 @@ describe('/research behaviour', () => {
31
25
32
26
it ( 'Should have an input text as a valid stock symbol' , ( ) => {
33
27
const stockSymbol = 'AAPL'
34
- cy . adminSignIn ( )
28
+ cy . userSignIn ( )
35
29
cy . visitPage ( '/research' )
36
30
cy . get ( '.form-control' )
37
31
. clear ( )
You can’t perform that action at this time.
0 commit comments