Bug 38899: Move the toolbar out of the form
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f24e0d52e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
cf18d97ca5
commit
53fdcd4e2c
|
|
@ -5,17 +5,17 @@
|
||||||
{{ $__("Edit vendor #%s").format(vendor.id) }}
|
{{ $__("Edit vendor #%s").format(vendor.id) }}
|
||||||
</h1>
|
</h1>
|
||||||
<h1 v-else>{{ $__("Add vendor") }}</h1>
|
<h1 v-else>{{ $__("Add vendor") }}</h1>
|
||||||
|
<Toolbar :sticky="true">
|
||||||
|
<ButtonSubmit :text="$__('Save')" icon="save" />
|
||||||
|
<ToolbarButton
|
||||||
|
:to="{ name: 'VendorList' }"
|
||||||
|
:title="$__('Cancel')"
|
||||||
|
icon="times"
|
||||||
|
cssClass="btn btn-link"
|
||||||
|
>
|
||||||
|
</ToolbarButton>
|
||||||
|
</Toolbar>
|
||||||
<form @submit="onSubmit($event)" id="add_vendor">
|
<form @submit="onSubmit($event)" id="add_vendor">
|
||||||
<Toolbar :sticky="true">
|
|
||||||
<ButtonSubmit :text="$__('Save')" icon="save" />
|
|
||||||
<ToolbarButton
|
|
||||||
:to="{ name: 'VendorList' }"
|
|
||||||
:title="$__('Cancel')"
|
|
||||||
icon="times"
|
|
||||||
cssClass="btn btn-link"
|
|
||||||
>
|
|
||||||
</ToolbarButton>
|
|
||||||
</Toolbar>
|
|
||||||
<VendorDetails :vendor="vendor" />
|
<VendorDetails :vendor="vendor" />
|
||||||
<VendorContacts :vendor="vendor" />
|
<VendorContacts :vendor="vendor" />
|
||||||
<VendorInterfaces :vendor="vendor" />
|
<VendorInterfaces :vendor="vendor" />
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ describe("Vendor CRUD operations", () => {
|
||||||
// Click the button in the toolbar
|
// Click the button in the toolbar
|
||||||
cy.visit("/cgi-bin/koha/acquisition/vendors");
|
cy.visit("/cgi-bin/koha/acquisition/vendors");
|
||||||
cy.contains("New vendor").click();
|
cy.contains("New vendor").click();
|
||||||
cy.get("#vendor_add h1").contains("Add vendor");
|
cy.get("h1").contains("Add vendor");
|
||||||
|
|
||||||
// Fill in the form for normal attributes
|
// Fill in the form for normal attributes
|
||||||
cy.get("#vendor_add").contains("Submit").click();
|
cy.get("#vendor_add").contains("Submit").click();
|
||||||
|
|
@ -140,7 +140,7 @@ describe("Vendor CRUD operations", () => {
|
||||||
cy.get("#vendors_list table tbody tr:first").contains("Edit").click();
|
cy.get("#vendors_list table tbody tr:first").contains("Edit").click();
|
||||||
cy.wait("@get-vendor");
|
cy.wait("@get-vendor");
|
||||||
cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
|
cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
|
||||||
cy.get("#vendor_add h1").contains("Edit vendor");
|
cy.get("h1").contains("Edit vendor");
|
||||||
|
|
||||||
// Form has been correctly filled in
|
// Form has been correctly filled in
|
||||||
cy.get("#vendor_name").should("have.value", vendor.name);
|
cy.get("#vendor_name").should("have.value", vendor.name);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue