Bug 38201: Fix InfiniteScrollSelect_spec.ts

Same as
  commit 64a271992a
  Bug 38201: Improve Agreements/Edit tests

    It removes the following DT warning in the console

    DataTables warning: table id=DataTables_Table_0 - Requested unknown parameter 'status' for row 0, column 4. For more information about this error, please see https://datatables.net/tn/4

    related to bug 40809

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-10-03 16:09:55 +02:00 committed by Lucas Gass
parent e0ebd40991
commit fef3b93bbf
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 5 additions and 13 deletions

View File

@ -346,27 +346,19 @@ describe("Infinite scroll", () => {
}).as("get-vendor-options");
// Intercept initial /agreements request once
cy.intercept(
{
method: "GET",
url: "/api/v1/erm/agreements*",
times: 1,
},
{
body: agreements,
}
);
// and
// Intercept follow-up 'search' request after entering /agreements
cy.intercept("GET", "/api/v1/erm/agreements?_page*", {
cy.intercept("GET", "/api/v1/erm/agreements*", {
statusCode: 200,
body: agreements,
headers: {
"X-Base-Total-Count": "1",
"X-Total-Count": "1",
},
}).as("get-single-agreement-search-result");
}).as("get-agreements");
cy.visit("/cgi-bin/koha/erm/agreements");
cy.wait("@get-single-agreement-search-result");
cy.wait("@get-agreements");
cy.wait("@get-agreements");
// Intercept request after edit click
cy.intercept("GET", "/api/v1/erm/agreements/*", agreement).as(