Lines 375-380
describe("kohaTable (using REST API)", () => {
Link Here
|
375 |
); |
375 |
); |
376 |
}); |
376 |
}); |
377 |
}); |
377 |
}); |
|
|
378 |
|
379 |
it("Browse by last name", () => { |
380 |
cy.task("buildSampleObjects", { |
381 |
object: "patron", |
382 |
count: RESTdefaultPageSize, |
383 |
values: {}, |
384 |
}).then(patrons => { |
385 |
// Needs more properties to not explode |
386 |
// account_balace: balance_str.escapeHtml(...).format_price is not a function |
387 |
patrons = patrons.map(p => ({ ...p, account_balance: 0 })); |
388 |
|
389 |
cy.intercept("GET", "/api/v1/patrons*", { |
390 |
statusCode: 200, |
391 |
body: patrons, |
392 |
headers: { |
393 |
"X-Base-Total-Count": baseTotalCount, |
394 |
"X-Total-Count": baseTotalCount, |
395 |
}, |
396 |
}); |
397 |
|
398 |
cy.visit("/cgi-bin/koha/members/members-home.pl"); |
399 |
|
400 |
cy.window().then(win => { |
401 |
win.categories_map = patrons.reduce((map, p) => { |
402 |
map[p.category_id] = p.category_id; |
403 |
return map; |
404 |
}, {}); |
405 |
}); |
406 |
|
407 |
cy.get("#searchresults .browse .filterByLetter:first").click(); |
408 |
}); |
409 |
}); |
378 |
}); |
410 |
}); |
379 |
}); |
411 |
}); |
380 |
|
412 |
|
381 |
- |
|
|