From e1ba08b83d89a62575f81d63c4415aae2a9d1ebc Mon Sep 17 00:00:00 2001
From: jbirddog <100367399+jbirddog@users.noreply.github.com>
Date: Tue, 9 May 2023 12:55:49 -0400
Subject: [PATCH] Rename Save as draft to Close, add tooltip (#246)
---
.../cypress/pilot/NDR_PP1/initiaterequest.cy.js | 4 ++--
spiffworkflow-frontend/src/routes/TaskShow.tsx | 11 ++++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js
index 63172bde1..d85e337a8 100644
--- a/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js
+++ b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/initiaterequest.cy.js
@@ -405,7 +405,7 @@ describe.only('Initiate a Request - Without Files', () => {
cy.get('#root_item_1_unit_price').type('4500');
cy.get('button')
- .contains(/^Save as draft$/)
+ .contains(/^Close$/)
.click();
//cy.get('button')
@@ -505,7 +505,7 @@ describe.only('Initiate a Request - Without Files', () => {
cy.get('.cds--text-area__wrapper').find('#root').type('2021 Newest HP 17.3 inch FHD Laptop, AMD Ryzen 5 5500U 6core(Beat i7-1160G7, up to 4.0GHz),16GB RAM, 1TB PCIe SSD, Bluetooth 4.2, WiFi, HDMI, USB-A&C, Windows 10 S, w/Ghost Manta Accessories, Silver\nhttps://www.amazon.com/HP-i7-11G7-Bluetooth-Windows');
cy.get('button')
- .contains(/^Save as draft$/)
+ .contains(/^Close$/)
.click();
// cy.get('button')
diff --git a/spiffworkflow-frontend/src/routes/TaskShow.tsx b/spiffworkflow-frontend/src/routes/TaskShow.tsx
index e8ec096de..7ceacb4cc 100644
--- a/spiffworkflow-frontend/src/routes/TaskShow.tsx
+++ b/spiffworkflow-frontend/src/routes/TaskShow.tsx
@@ -348,20 +348,21 @@ export default function TaskShow() {
if (task.state === 'READY') {
let submitButtonText = 'Submit';
- let saveAsDraftButton = null;
+ let closeButton = null;
if (task.typename === 'ManualTask') {
submitButtonText = 'Continue';
} else if (task.typename === 'UserTask') {
- saveAsDraftButton = (
+ closeButton = (
);
}
@@ -370,7 +371,7 @@ export default function TaskShow() {
- {saveAsDraftButton}
+ {closeButton}
<>
{task.signal_buttons.map((signal) => (