Lines 31-36
describe("Record sources CRUD tests", () => {
Link Here
|
31 |
|
31 |
|
32 |
it("Add", () => { |
32 |
it("Add", () => { |
33 |
cy.visit("/cgi-bin/koha/admin/admin-home.pl"); |
33 |
cy.visit("/cgi-bin/koha/admin/admin-home.pl"); |
|
|
34 |
cy.wait(500); |
34 |
cy.contains("Record sources").click(); |
35 |
cy.contains("Record sources").click(); |
35 |
cy.contains("New record source").click(); |
36 |
cy.contains("New record source").click(); |
36 |
cy.get("#name").type("Poop"); |
37 |
cy.get("#name").type("Poop"); |
Lines 57-62
describe("Record sources CRUD tests", () => {
Link Here
|
57 |
}, |
58 |
}, |
58 |
}); |
59 |
}); |
59 |
cy.visit("/cgi-bin/koha/admin/record_sources"); |
60 |
cy.visit("/cgi-bin/koha/admin/record_sources"); |
|
|
61 |
cy.wait(500); |
60 |
cy.get("#record_sources_list").contains( |
62 |
cy.get("#record_sources_list").contains( |
61 |
"There are no record sources defined" |
63 |
"There are no record sources defined" |
62 |
); |
64 |
); |
Lines 89-94
describe("Record sources CRUD tests", () => {
Link Here
|
89 |
}, |
91 |
}, |
90 |
}); |
92 |
}); |
91 |
cy.visit("/cgi-bin/koha/admin/record_sources"); |
93 |
cy.visit("/cgi-bin/koha/admin/record_sources"); |
|
|
94 |
cy.wait(500); |
92 |
cy.get("#record_sources_list").contains("Showing 1 to 3 of 3 entries"); |
95 |
cy.get("#record_sources_list").contains("Showing 1 to 3 of 3 entries"); |
93 |
|
96 |
|
94 |
cy.get(".dataTable > tbody > tr:first-child").within(() => { |
97 |
cy.get(".dataTable > tbody > tr:first-child").within(() => { |
Lines 151-156
describe("Record sources CRUD tests", () => {
Link Here
|
151 |
can_be_edited: true, |
154 |
can_be_edited: true, |
152 |
}, |
155 |
}, |
153 |
}); |
156 |
}); |
|
|
157 |
cy.wait(500); |
154 |
cy.get("#record_sources_list table tbody tr:first") |
158 |
cy.get("#record_sources_list table tbody tr:first") |
155 |
.contains("Edit") |
159 |
.contains("Edit") |
156 |
.click(); |
160 |
.click(); |
Lines 166-171
describe("Record sources CRUD tests", () => {
Link Here
|
166 |
}, |
170 |
}, |
167 |
}); |
171 |
}); |
168 |
cy.visit("/cgi-bin/koha/admin/record_sources/edit/1"); |
172 |
cy.visit("/cgi-bin/koha/admin/record_sources/edit/1"); |
|
|
173 |
cy.wait(500); |
169 |
cy.get("#name").should("have.value", "Source 1"); |
174 |
cy.get("#name").should("have.value", "Source 1"); |
170 |
cy.get("#can_be_edited").should("not.be.checked"); |
175 |
cy.get("#can_be_edited").should("not.be.checked"); |
171 |
|
176 |
|
Lines 210-215
describe("Record sources CRUD tests", () => {
Link Here
|
210 |
}, |
215 |
}, |
211 |
}); |
216 |
}); |
212 |
cy.visit("/cgi-bin/koha/admin/record_sources"); |
217 |
cy.visit("/cgi-bin/koha/admin/record_sources"); |
|
|
218 |
cy.wait(500); |
213 |
cy.intercept("DELETE", "/api/v1/record_sources/2", { |
219 |
cy.intercept("DELETE", "/api/v1/record_sources/2", { |
214 |
statusCode: 204, |
220 |
statusCode: 204, |
215 |
body: {}, |
221 |
body: {}, |
216 |
- |
|
|