View | Details | Raw Unified | Return to bug 40118
Collapse All | Expand All

(-)a/t/cypress/integration/KohaTable/Holdings_spec.ts (-1 / +49 lines)
Lines 1-6 Link Here
1
const RESTdefaultPageSize = "20"; // FIXME Mock this
1
const RESTdefaultPageSize = "20"; // FIXME Mock this
2
const baseTotalCount = "42";
2
const baseTotalCount = "42";
3
3
4
describe("circ/pendingreserves/holdst", () => {
5
    const table_id = "holdst";
6
    beforeEach(() => {
7
        cy.login();
8
        cy.title().should("eq", "Koha staff interface");
9
        cy.query("DELETE FROM reserves;");
10
        cy.query(
11
            "INSERT INTO reserves (reserve_id, borrowernumber, reservedate, biblionumber, deleted_biblionumber, item_group_id, branchcode, desk_id, notificationdate, reminderdate, cancellationdate, cancellation_reason, reservenotes, priority, found, timestamp, itemnumber, waitingdate, expirationdate, patron_expiration_date, lowestPriority, suspend, suspend_until, itemtype, item_level_hold, non_priority) VALUES (1, 51, '2025-06-11', 437, NULL, NULL, 'CPL', NULL, NULL, NULL, NULL, NULL, '', 1, NULL, '2025-06-11 14:05:16', NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, 0, 0), (2, 51, '2025-06-11', 76, NULL, NULL, 'CPL', NULL, NULL, NULL, NULL, NULL, '', 1, NULL, '2025-06-11 14:05:22', NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, 0, 0);"
12
        );
13
        cy.visit(
14
            "/cgi-bin/koha/circ/pendingreserves.pl?from=2025-06-09&to=2025-06-11&run_report=Submit"
15
        );
16
    });
17
18
    it("Should render library filters", () => {
19
        cy.get(`#${table_id} thead:first th:nth-child(6)`).should(
20
            "have.text",
21
            "Libraries"
22
        );
23
        cy.get(`#${table_id} thead:first th:nth-child(6) select`)
24
            .children()
25
            .should("have.length", 4)
26
            .then(options => {
27
                expect(options.eq(0).val()).to.eq("");
28
                expect(options.eq(1).val()).to.eq("Centerville");
29
                expect(options.eq(2).val()).to.eq("Fairview");
30
                expect(options.eq(3).val()).to.eq("Midway");
31
            });
32
    });
33
34
    it("Should filter table on library", () => {
35
        cy.get(`#${table_id} thead:first th:nth-child(6) select`).select(
36
            "Fairview"
37
        );
38
        cy.get(`#${table_id} tbody tr:first td:nth-child(5)`).should(
39
            "contain",
40
            "Nordic roots"
41
        );
42
        cy.get(`#${table_id} tbody tr:nth-child(2)`).should("not.exist");
43
    });
44
45
    afterEach(
46
        () =>
47
            function () {
48
                cy.query("DELETE FROM reserves;");
49
            }
50
    );
51
});
52
4
describe("catalogue/detail/holdings_table", () => {
53
describe("catalogue/detail/holdings_table", () => {
5
    const table_id = "holdings_table";
54
    const table_id = "holdings_table";
6
    beforeEach(() => {
55
    beforeEach(() => {
7
- 

Return to bug 40118