@@ -46,15 +46,11 @@ describe('Circulation scenario B: standard loan with transit', function() {
46
46
* 6. The item is received at owning library and goes on shelf.
47
47
*/
48
48
before ( 'Login as a professional and create a document and an item' , function ( ) {
49
- // Open app on frontpage
50
- cy . visit ( '' ) ;
51
- // Check language and force to english
52
- cy . setLanguageToEnglish ( ) ;
53
49
// Login as librarian (Leonard)
54
50
cy . adminLogin ( this . users . librarians . leonard . email , this . common . uniquePwd ) ;
55
51
// Create a document
56
52
// Go to document editor
57
- cy . goToMenu ( 'create-bibliographic-record-menu-frontpage ') ;
53
+ cy . visit ( '/professional/records/documents/new ') ;
58
54
// Populate form with simple record
59
55
cy . populateSimpleRecord ( this . documents . book ) ;
60
56
//Save record
@@ -69,7 +65,7 @@ describe('Circulation scenario B: standard loan with transit', function() {
69
65
} ) ;
70
66
71
67
after ( 'Clean data: remove item and document' , function ( ) {
72
- // TODO: find a way to preserve cookies (auth) and server after a test
68
+ cy . logout ( ) ;
73
69
cy . server ( ) ;
74
70
cy . adminLogin ( this . users . librarians . leonard . email , this . common . uniquePwd ) ;
75
71
// Go to document detail view and remove item
@@ -106,7 +102,8 @@ describe('Circulation scenario B: standard loan with transit', function() {
106
102
// Login as librarian (Leonard)
107
103
cy . adminLogin ( this . users . librarians . leonard . email , this . common . uniquePwd ) ;
108
104
// Go to requests list
109
- cy . goToMenu ( 'requests-menu-frontpage' )
105
+ cy . get ( '#user-services-menu' ) . click ( ) ;
106
+ cy . get ( '#requests-menu' ) . click ( ) ;
110
107
// Check that the document is present
111
108
cy . get ( 'table' ) . should ( 'contain' , this . itemBarcode ) ;
112
109
// Enter the barcode and validate
@@ -122,7 +119,8 @@ describe('Circulation scenario B: standard loan with transit', function() {
122
119
// Login as librarian
123
120
cy . adminLogin ( this . users . librarians . spock . email , this . common . uniquePwd ) ;
124
121
// Go to checkin view
125
- cy . goToMenu ( 'circulation-menu-frontpage' ) ;
122
+ cy . get ( '#user-services-menu' ) . click ( ) ;
123
+ cy . get ( '#circulation-menu' ) . click ( ) ;
126
124
// Enter item barcode for receive
127
125
cy . get ( '#search' ) . type ( this . itemBarcode ) . type ( '{enter}' ) ;
128
126
// Check that the item has been received
@@ -135,7 +133,8 @@ describe('Circulation scenario B: standard loan with transit', function() {
135
133
// Login as librarian
136
134
cy . adminLogin ( this . users . librarians . spock . email , this . common . uniquePwd ) ;
137
135
// Go to checkin view
138
- cy . goToMenu ( 'circulation-menu-frontpage' ) ;
136
+ cy . get ( '#user-services-menu' ) . click ( ) ;
137
+ cy . get ( '#circulation-menu' ) . click ( ) ;
139
138
// Checkout
140
139
cy . scanPatronBarcodeThenItemBarcode ( james , this . itemBarcode )
141
140
// Check that the checkout has been done
@@ -148,7 +147,8 @@ describe('Circulation scenario B: standard loan with transit', function() {
148
147
// Login as librarian
149
148
cy . adminLogin ( this . users . librarians . spock . email , this . common . uniquePwd ) ;
150
149
// Go to checkin view
151
- cy . goToMenu ( 'circulation-menu-frontpage' ) ;
150
+ cy . get ( '#user-services-menu' ) . click ( ) ;
151
+ cy . get ( '#circulation-menu' ) . click ( ) ;
152
152
// Checkin
153
153
cy . scanItemBarcode ( this . itemBarcode ) ;
154
154
// Check that the checkin has been done
@@ -164,14 +164,14 @@ describe('Circulation scenario B: standard loan with transit', function() {
164
164
// Login as librarian
165
165
cy . adminLogin ( this . users . librarians . leonard . email , this . common . uniquePwd ) ;
166
166
// Go to checkin view
167
- cy . goToMenu ( 'circulation-menu-frontpage' ) ;
167
+ cy . get ( '#user-services-menu' ) . click ( ) ;
168
+ cy . get ( '#circulation-menu' ) . click ( ) ;
168
169
// Receive
169
170
cy . scanItemBarcode ( this . itemBarcode ) ;
170
171
// Check that the item has been received
171
172
cy . get ( '#item-' + this . itemBarcode + ' [name="action-done"]' ) . should ( 'contain' , 'receive' ) ;
172
173
// Check that the item is on shelf
173
174
cy . get ( '#item-' + this . itemBarcode + ' [name="circ-info"] [name="status"]' )
174
175
. should ( 'contain' , 'on shelf' ) ;
175
- cy . logout ( ) ;
176
176
} ) ;
177
177
} ) ;
0 commit comments