From 19322de01474afb889e85a89b09f5cfc5cf61755 Mon Sep 17 00:00:00 2001 From: Robert Baillie Date: Tue, 11 Jan 2022 08:51:16 +0000 Subject: [PATCH] Added additional edit buttons back into the view and edit form Added additional buttons into the save buttons --- .../lwc/saveButtons/__tests__/saveButtons.test.js | 15 +++++++++++++++ .../default/lwc/saveButtons/saveButtons.html | 4 ++++ .../__tests__/viewAndEditForm.test.js | 12 ++++++++++++ .../lwc/viewAndEditForm/viewAndEditForm-card.html | 6 +++++- .../viewAndEditForm/viewAndEditForm-modal.html | 6 +++++- 5 files changed, 41 insertions(+), 2 deletions(-) diff --git a/framework/default/ortoo-core/default/lwc/saveButtons/__tests__/saveButtons.test.js b/framework/default/ortoo-core/default/lwc/saveButtons/__tests__/saveButtons.test.js index ddbefe83c72..c2d67b92574 100644 --- a/framework/default/ortoo-core/default/lwc/saveButtons/__tests__/saveButtons.test.js +++ b/framework/default/ortoo-core/default/lwc/saveButtons/__tests__/saveButtons.test.js @@ -55,6 +55,21 @@ describe('c-save-buttons', () => { }); }); + it( 'Has an additional-buttons slot', () => { + + const element = createElement('c-save-buttons', { + is: SaveButtons + }); + + document.body.appendChild( element ); + + return Promise.resolve() + .then( () => { + const additionalButtonsSlot = element.shadowRoot.querySelector( 'slot[name="additional-buttons"]'); + expect( additionalButtonsSlot ).not.toBeNull(); + }); + }) + it( 'Will use the passed prefix to define the element ids', () => { const element = createElement('c-modal', { diff --git a/framework/default/ortoo-core/default/lwc/saveButtons/saveButtons.html b/framework/default/ortoo-core/default/lwc/saveButtons/saveButtons.html index 3067208a798..f84efb1b110 100644 --- a/framework/default/ortoo-core/default/lwc/saveButtons/saveButtons.html +++ b/framework/default/ortoo-core/default/lwc/saveButtons/saveButtons.html @@ -1,6 +1,7 @@