Bugzilla – Attachment 184306 Details for
Bug 40318
"Receive shipments" should not open in a new tab/window - vendor list view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40318: Add tests
Bug-40318-Add-tests.patch (text/plain), 2.96 KB, created by
David Nind
on 2025-07-18 09:08:34 UTC
(
hide
)
Description:
Bug 40318: Add tests
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-07-18 09:08:34 UTC
Size:
2.96 KB
patch
obsolete
>From 469beb1ae8d632d406540aeefaaf2ca64a59d9be Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 17 Jul 2025 15:22:28 +0200 >Subject: [PATCH] Bug 40318: Add tests > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../integration/Acquisitions/Vendors_spec.ts | 66 +++++++++++++++++++ > 1 file changed, 66 insertions(+) > >diff --git a/t/cypress/integration/Acquisitions/Vendors_spec.ts b/t/cypress/integration/Acquisitions/Vendors_spec.ts >index 43a073d2d34..f39079932d3 100644 >--- a/t/cypress/integration/Acquisitions/Vendors_spec.ts >+++ b/t/cypress/integration/Acquisitions/Vendors_spec.ts >@@ -233,3 +233,69 @@ describe("Vendor CRUD operations", () => { > .contains("deleted"); > }); > }); >+ >+describe("Vendor module", () => { >+ beforeEach(() => { >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ >+ cy.task("buildSampleObject", { >+ object: "vendor", >+ values: { active: 1 }, >+ }) >+ .then(generatedVendor => { >+ delete generatedVendor.list_currency; >+ delete generatedVendor.invoice_currency; >+ return cy.task("insertObject", { >+ type: "vendor", >+ object: generatedVendor, >+ }); >+ }) >+ .then(vendor => { >+ cy.wrap(vendor).as("vendor"); >+ return cy.task("buildSampleObject", { >+ object: "basket", >+ values: { vendor_id: vendor.id }, >+ }); >+ }) >+ .then(generatedBasket => { >+ return cy.task("insertObject", { >+ type: "basket", >+ object: generatedBasket, >+ }); >+ }) >+ .then(basket => { >+ cy.wrap(basket).as("basket"); >+ }); >+ }); >+ >+ afterEach(function () { >+ cy.task("deleteSampleObjects", [ >+ { vendor: this.vendor, basket: this.basket }, >+ ]); >+ }); >+ >+ it("receive should open in the same tab", function () { >+ cy.visit("/cgi-bin/koha/acquisition/vendors"); >+ >+ // table_id is currently 'DataTables_Table_0', and it should be fixed >+ cy.get("#vendors_list table.dataTable") >+ .invoke("attr", "id") >+ .then(table_id => { >+ cy.intercept("GET", "/api/v1/acquisitions/vendors*").as( >+ "get-vendors" >+ ); >+ cy.get(`#${table_id}_wrapper input.dt-input`).type( >+ this.vendor.name >+ ); >+ cy.wait("@get-vendors"); >+ cy.get(`#${table_id} tbody tr:first`) >+ .contains("Receive shipments") >+ .click(); >+ cy.url().should( >+ "contain", >+ `/cgi-bin/koha/acqui/parcels.pl?booksellerid=${this.vendor.id}` >+ ); >+ }); >+ }); >+}); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40318
:
183840
|
183841
|
183847
|
183848
|
183916
|
183917
|
184199
|
184305
|
184306
|
184351
|
184352