|
Lines 68-92
function get_items() {
Link Here
|
| 68 |
biblio: { |
68 |
biblio: { |
| 69 |
biblio_id: 1, |
69 |
biblio_id: 1, |
| 70 |
title: "a biblio title", |
70 |
title: "a biblio title", |
|
|
71 |
author: "an author", |
| 71 |
}, |
72 |
}, |
| 72 |
external_id: "bc_1", |
73 |
external_id: "bc_1", |
| 73 |
item_id: 1, |
74 |
item_id: 1, |
|
|
75 |
callnumber: "cn_1", |
| 74 |
}, |
76 |
}, |
| 75 |
{ |
77 |
{ |
| 76 |
biblio: { |
78 |
biblio: { |
| 77 |
biblio_id: 2, |
79 |
biblio_id: 2, |
| 78 |
title: "an other biblio title", |
80 |
title: "an other biblio title", |
|
|
81 |
author: "another author", |
| 79 |
}, |
82 |
}, |
| 80 |
external_id: "bc_2", |
83 |
external_id: "bc_2", |
| 81 |
item_id: 2, |
84 |
item_id: 2, |
|
|
85 |
callnumber: "cn_2", |
| 82 |
}, |
86 |
}, |
| 83 |
{ |
87 |
{ |
| 84 |
biblio: { |
88 |
biblio: { |
| 85 |
biblio_id: 3, |
89 |
biblio_id: 3, |
| 86 |
title: "yet an other biblio title", |
90 |
title: "yet an other biblio title", |
|
|
91 |
author: "yet another author", |
| 87 |
}, |
92 |
}, |
| 88 |
external_id: "bc_3", |
93 |
external_id: "bc_3", |
| 89 |
item_id: 3, |
94 |
item_id: 3, |
|
|
95 |
callnumber: "cn_3", |
| 90 |
}, |
96 |
}, |
| 91 |
]; |
97 |
]; |
| 92 |
} |
98 |
} |
|
Lines 128-133
function get_train_items() {
Link Here
|
| 128 |
train_item_1.processing_id = 1; |
134 |
train_item_1.processing_id = 1; |
| 129 |
train_item_1.processing = get_processings()[0]; |
135 |
train_item_1.processing = get_processings()[0]; |
| 130 |
train_item_1.item_id = 1; |
136 |
train_item_1.item_id = 1; |
|
|
137 |
train_item_1.train_item_id = 1; |
| 138 |
train_item_1.user_train_item_id = 1; |
| 131 |
|
139 |
|
| 132 |
let train_item_2 = get_items()[1]; |
140 |
let train_item_2 = get_items()[1]; |
| 133 |
let processing_attributes = get_attributes(); |
141 |
let processing_attributes = get_attributes(); |
|
Lines 158-163
function get_train_items() {
Link Here
|
| 158 |
train_item_2.processing_id = 1; |
166 |
train_item_2.processing_id = 1; |
| 159 |
train_item_2.processing = get_processings()[0]; |
167 |
train_item_2.processing = get_processings()[0]; |
| 160 |
train_item_2.item_id = 2; |
168 |
train_item_2.item_id = 2; |
|
|
169 |
train_item_2.train_item_id = 2; |
| 170 |
train_item_2.user_train_item_id = 2; |
| 161 |
|
171 |
|
| 162 |
let train_item_3 = get_items()[0]; |
172 |
let train_item_3 = get_items()[0]; |
| 163 |
let processing_attributes = get_other_attributes(); |
173 |
let processing_attributes = get_other_attributes(); |
|
Lines 181-186
function get_train_items() {
Link Here
|
| 181 |
train_item_3.processing_id = 2; |
191 |
train_item_3.processing_id = 2; |
| 182 |
train_item_3.processing = get_processings()[1]; |
192 |
train_item_3.processing = get_processings()[1]; |
| 183 |
train_item_3.item_id = 3; |
193 |
train_item_3.item_id = 3; |
|
|
194 |
train_item_3.train_item_id = 3; |
| 195 |
train_item_3.user_train_item_id = 3; |
| 184 |
|
196 |
|
| 185 |
return [train_item_1, train_item_2, train_item_3]; |
197 |
return [train_item_1, train_item_2, train_item_3]; |
| 186 |
} |
198 |
} |
|
Lines 568-575
describe("Trains", () => {
Link Here
|
| 568 |
"GET", |
580 |
"GET", |
| 569 |
"/api/v1/preservation/trains/" + train.train_id, |
581 |
"/api/v1/preservation/trains/" + train.train_id, |
| 570 |
train_with_one_item |
582 |
train_with_one_item |
| 571 |
); |
583 |
).as("get-train"); |
| 572 |
cy.contains("Submit").click(); |
584 |
cy.contains("Submit").click(); |
|
|
585 |
cy.wait("@get-train"); |
| 573 |
cy.get("#trains_show").contains("Showing 1 to 1 of 1 entries"); |
586 |
cy.get("#trains_show").contains("Showing 1 to 1 of 1 entries"); |
| 574 |
|
587 |
|
| 575 |
let train_with_2_items = Object.assign({}, train); |
588 |
let train_with_2_items = Object.assign({}, train); |