Bugzilla – Attachment 188202 Details for
Bug 40191
Design pattern: Redirect user to a view of the record after saving instead of list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40191: Add a cypress test for the new functionality
Bug-40191-Add-a-cypress-test-for-the-new-functiona.patch (text/plain), 2.24 KB, created by
Matt Blenkinsop
on 2025-10-21 09:21:04 UTC
(
hide
)
Description:
Bug 40191: Add a cypress test for the new functionality
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-10-21 09:21:04 UTC
Size:
2.24 KB
patch
obsolete
>From 6dfe14503912e91d4db63a22bcfc9ffad85f2b4d Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Tue, 21 Oct 2025 10:13:22 +0100 >Subject: [PATCH] Bug 40191: Add a cypress test for the new functionality > >--- > t/cypress/integration/VueFramework_spec.ts | 41 ++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > >diff --git a/t/cypress/integration/VueFramework_spec.ts b/t/cypress/integration/VueFramework_spec.ts >index 4eb30660c21..37a95862130 100644 >--- a/t/cypress/integration/VueFramework_spec.ts >+++ b/t/cypress/integration/VueFramework_spec.ts >@@ -329,4 +329,45 @@ describe("Form features", () => { > cy.get("#name").should("have.value", vendor.name); > }); > }); >+ it("Should give three possible actions on saving", function () { >+ cy.visit("/cgi-bin/koha/acquisition/vendors/add"); >+ cy.get("#toolbar button").contains("Save"); >+ cy.get("#toolbar a.dropdown-toggle").click(); >+ cy.get("#toolbar ul.dropdown-menu li:first").contains( >+ "Save and continue editing" >+ ); >+ cy.get("#toolbar ul.dropdown-menu li") >+ .eq(1) >+ .contains("Save and return to list"); >+ >+ const vendor = cy.getVendor(); >+ >+ cy.intercept( >+ "GET", >+ new RegExp("/api/v1/acquisitions/vendors/(?!config$).+"), >+ vendor >+ ).as("get-vendor"); >+ cy.get("#name").type(vendor.name); >+ cy.get("#toolbar button").contains("Save").click(); >+ cy.wait("@get-vendor"); >+ cy.get("#vendors_show"); >+ >+ cy.visit("/cgi-bin/koha/acquisition/vendors/add"); >+ cy.get("#name").type(vendor.name); >+ cy.get("#toolbar a.dropdown-toggle").click(); >+ cy.get("#toolbar ul.dropdown-menu li:first") >+ .contains("Save and continue editing") >+ .click(); >+ cy.wait("@get-vendor"); >+ cy.get("#vendors_add"); >+ >+ cy.visit("/cgi-bin/koha/acquisition/vendors/add"); >+ cy.get("#name").type(vendor.name); >+ cy.get("#toolbar a.dropdown-toggle").click(); >+ cy.get("#toolbar ul.dropdown-menu li") >+ .eq(1) >+ .contains("Save and return to list") >+ .click(); >+ cy.get("#vendors_list"); >+ }); > }); >-- >2.50.1
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 40191
:
188107
|
188108
|
188109
|
188137
|
188138
|
188139
|
188164
|
188165
|
188167
|
188193
|
188194
|
188195
|
188196
|
188197
|
188198
|
188201
|
188202
|
188203
|
188768
|
188769
|
188770
|
188771
|
188772
|
188773
|
188774
|
188775
|
188776