|
Lines 212-258
describe("Trains", () => {
Link Here
|
| 212 |
'{"permissions":{"manage_sysprefs":"1"},"settings":{"enabled":"1","not_for_loan_default_train_in":"42","not_for_loan_waiting_list_in": "24"}}' |
212 |
'{"permissions":{"manage_sysprefs":"1"},"settings":{"enabled":"1","not_for_loan_default_train_in":"42","not_for_loan_waiting_list_in": "24"}}' |
| 213 |
); |
213 |
); |
| 214 |
|
214 |
|
| 215 |
cy.intercept( |
215 |
cy.intercept("GET", "/api/v1/authorised_value_categories?q=*", [ |
| 216 |
"GET", |
216 |
{ |
| 217 |
"/api/v1/authorised_value_categories/NOT_LOAN/authorised_values", |
217 |
authorised_values: [ |
| 218 |
[ |
218 |
{ |
| 219 |
{ |
219 |
category_name: "NOT_LOAN", |
| 220 |
category_name: "NOT_LOAN", |
220 |
description: "Ordered", |
| 221 |
description: "Ordered", |
221 |
value: "-1", |
| 222 |
value: "-1", |
222 |
}, |
| 223 |
}, |
223 |
{ |
| 224 |
{ |
224 |
category_name: "NOT_LOAN", |
| 225 |
category_name: "NOT_LOAN", |
225 |
description: "Not for loan", |
| 226 |
description: "Not for loan", |
226 |
value: "1", |
| 227 |
value: "1", |
227 |
}, |
| 228 |
}, |
228 |
{ |
| 229 |
{ |
229 |
category_name: "NOT_LOAN", |
| 230 |
category_name: "NOT_LOAN", |
230 |
description: "Staff collection", |
| 231 |
description: "Staff collection", |
231 |
value: "2", |
| 232 |
value: "2", |
232 |
}, |
| 233 |
}, |
233 |
{ |
| 234 |
{ |
234 |
category_name: "NOT_LOAN", |
| 235 |
category_name: "NOT_LOAN", |
235 |
description: "Added to bundle", |
| 236 |
description: "Added to bundle", |
236 |
value: "3", |
| 237 |
value: "3", |
237 |
}, |
| 238 |
}, |
238 |
{ |
| 239 |
{ |
239 |
category_name: "NOT_LOAN", |
| 240 |
category_name: "NOT_LOAN", |
240 |
description: "In preservation", |
| 241 |
description: "In preservation", |
241 |
value: "24", |
| 242 |
value: "24", |
242 |
}, |
| 243 |
}, |
243 |
{ |
| 244 |
{ |
244 |
category_name: "NOT_LOAN", |
| 245 |
category_name: "NOT_LOAN", |
245 |
description: "In preservation external", |
| 246 |
description: "In preservation external", |
246 |
value: "42", |
| 247 |
value: "42", |
247 |
}, |
| 248 |
}, |
248 |
{ |
| 249 |
{ |
249 |
category_name: "NOT_LOAN", |
| 250 |
category_name: "NOT_LOAN", |
250 |
description: "In preservation other", |
| 251 |
description: "In preservation other", |
251 |
value: "43", |
| 252 |
value: "43", |
252 |
}, |
| 253 |
}, |
253 |
], |
| 254 |
] |
254 |
category_name: "NOT_LOAN", |
| 255 |
); |
255 |
is_integer_only: false, |
|
|
256 |
is_system: true, |
| 257 |
}, |
| 258 |
]); |
| 256 |
}); |
259 |
}); |
| 257 |
|
260 |
|
| 258 |
it("List trains", () => { |
261 |
it("List trains", () => { |
|
Lines 668-673
describe("Trains", () => {
Link Here
|
| 668 |
}); |
671 |
}); |
| 669 |
} |
672 |
} |
| 670 |
); |
673 |
); |
|
|
674 |
cy.intercept("GET", "/api/v1/authorised_value_categories?q=*", [ |
| 675 |
{ |
| 676 |
authorised_values: [], |
| 677 |
category_name: "COUNTRY", |
| 678 |
is_integer_only: false, |
| 679 |
is_system: false, |
| 680 |
}, |
| 681 |
]); |
| 671 |
cy.get("#add_to_train .approve").click(); |
682 |
cy.get("#add_to_train .approve").click(); |
| 672 |
train.items = get_train_items().filter( |
683 |
train.items = get_train_items().filter( |
| 673 |
train_item => train_item.item_id == 1 || train_item.item_id == 2 |
684 |
train_item => train_item.item_id == 1 || train_item.item_id == 2 |
| 674 |
- |
|
|