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