diff --git a/form-creator-database b/form-creator-database index 4471b8cfc730d87b0d87882e4ccc0ffde1da189a..ed5adee518fdc089faa39bee67e6aac7dcc91ca9 160000 --- a/form-creator-database +++ b/form-creator-database @@ -1 +1 @@ -Subproject commit 4471b8cfc730d87b0d87882e4ccc0ffde1da189a +Subproject commit ed5adee518fdc089faa39bee67e6aac7dcc91ca9 diff --git a/src/api/controllers/form.spec.ts b/src/api/controllers/form.spec.ts index 578c28e1cfeccca43a1356d5063704bfc4e57384..6caad77da469d3c62ca2adfff4e63e13e63c6dc0 100644 --- a/src/api/controllers/form.spec.ts +++ b/src/api/controllers/form.spec.ts @@ -216,6 +216,20 @@ describe("API data controller - form", () => { .end(done); }); + it("should respond 200 when putting valid form update deleting form", (done) => { + request(server) + .put("/form/4") + .set("Authorization", "bearer " + testToken) + .send(formScenario.deleteForm) + + .expect(200) + .expect((res: any) => { + expect(res.body.message).to.be.equal(formScenario.msg); + }) + + .end(done); + }); + it("should respond 200 when putting valid form update undo changes", (done) => { request(server) .put("/form/4") diff --git a/src/api/controllers/form.ts b/src/api/controllers/form.ts index 7fc27750312635334172de09ba5b4eb4d803f5a8..5d170a6b17bd0edac13f4efc915321bfe59d6c21 100644 --- a/src/api/controllers/form.ts +++ b/src/api/controllers/form.ts @@ -20,13 +20,13 @@ */ import { waterfall } from "async"; -import { OptHandler } from "../../utils/optHandler"; -import { DiffHandler } from "../../utils/diffHandler"; +import { NextFunction, Response } from "express"; import { Form, FormOptions } from "../../core/form"; +import { FormAnswer, FormAnswerOptions } from "../../core/formAnswer"; import { FormUpdate, FormUpdateOptions } from "../../core/formUpdate"; -import { Response, NextFunction } from "express"; +import { DiffHandler } from "../../utils/diffHandler"; +import { OptHandler } from "../../utils/optHandler"; import { Request } from "../apiTypes"; -import { FormAnswer, FormAnswerOptions } from "../../core/formAnswer"; export class FormCtrl { @@ -71,6 +71,7 @@ export class FormCtrl { , description: formResult.description , inputs: [] , answerTimes: formResult.answerTimes + , status: true }; const formUpdate: FormUpdate = DiffHandler.diff(formResult, new Form(formOpts)); diff --git a/src/api/controllers/user.ts b/src/api/controllers/user.ts index d4f9d57df4429485ae7ea95d1194678caae3a7a8..c807cd554155f83864bd8517cdfe44145c63bfe8 100644 --- a/src/api/controllers/user.ts +++ b/src/api/controllers/user.ts @@ -250,6 +250,7 @@ export class UserCtrl { , answersNumber: 0 , answerTimes: form.answerTimes , date: "" + , status: form.status })); callback(null, mappedForms); diff --git a/src/core/form.ts b/src/core/form.ts index fb8be5340a8094898921f95611c88207040037fd..46dcd6f67186f7c7fc0424fdf087cbfca0b5c6ef 100644 --- a/src/core/form.ts +++ b/src/core/form.ts @@ -38,6 +38,9 @@ export interface FormOptions { /** Number of times an user can answer this form */ answerTimes?: boolean; + + /* Controls if form has been deleted. */ + status?: boolean; } /** * Form Class to manage project's forms @@ -53,6 +56,8 @@ export class Form { public readonly inputs: Input[]; /** Number of times an user can answer this form */ public readonly answerTimes: boolean; + /* Controls if form has been deleted. */ + public readonly status: boolean; /** * Creates a new instance of Form Class @@ -66,6 +71,10 @@ export class Form { return new Input(OptHandler.input(i)); }); this.answerTimes = options.answerTimes ? options.answerTimes : false; + this.status = options.status; + if ((options.status === undefined) || (options.status === null) ) { + this.status = true; + } } } diff --git a/src/core/formUpdate.ts b/src/core/formUpdate.ts index 4091c307dcf511c3ba73e0f741d351effbcf0ab7..8fb27a52063005c2cb31d38107854af86acd73f2 100644 --- a/src/core/formUpdate.ts +++ b/src/core/formUpdate.ts @@ -46,7 +46,7 @@ export class FormUpdate { public readonly form: Form; /** Date which form was updated. */ public readonly updateDate: Date; - /** True when Form title or description has changed. */ + /** True when Form title, description or status has changed. */ public readonly changed?: boolean; /** Array of InputUpdate containing changes on inputs. */ public readonly inputUpdates: InputUpdate[]; diff --git a/src/utils/answerQueryBuilder.ts b/src/utils/answerQueryBuilder.ts index 21dd4f0cef78de96faa7f363c615eacb95e7114d..9ec441b28ef7dbe9499be50b383fc575c58c643b 100644 --- a/src/utils/answerQueryBuilder.ts +++ b/src/utils/answerQueryBuilder.ts @@ -468,6 +468,7 @@ export class AnswerQueryBuilder extends QueryBuilder { , description: undefined , inputs: [] , answerTimes: answerResult.answerTimes + , status: true }; const formAnswerTmp: FormAnswerOptions = { id: answerResult.id diff --git a/src/utils/dbHandler.spec.ts b/src/utils/dbHandler.spec.ts index 35f07ca94463d16f3cdd643c3f973cccada7ba22..f8e3d6a6db62ce8f7c474c9aca5a50deb15948c3 100644 --- a/src/utils/dbHandler.spec.ts +++ b/src/utils/dbHandler.spec.ts @@ -285,6 +285,15 @@ describe("Database Handler", () => { done(); }); }); + + it("should delete existent form with id = 3", (done) => { + dbhandler.form.executeQuery(dbHandlerScenario.deleteForm3, (err: Error, result?: QueryResult) => { + expect(err).to.be.a("null"); + expect(result.command).to.be.equal("UPDATE"); + done(); + + }); + }); }); describe("Read and Write on Database", () => { @@ -377,6 +386,13 @@ describe("Read and Write on Database", () => { }); }); + it("should update a form to delete it", (done) => { + dbhandler.form.update(new FormUpdate (dbHandlerScenario.updateDelete), (err: Error) => { + expect(err).to.be.a("null"); + done(); + }); + }); + it("should update inputs and insert FormUpdate", (done) => { dbhandler.form.update(new FormUpdate (dbHandlerScenario.updateInput), (err: Error) => { expect(err).to.be.a("null"); diff --git a/src/utils/diffHandler.ts b/src/utils/diffHandler.ts index 7a542eaacc87dcaa7681a3c57bf53e5d105ebe6d..bfc57558165ab5736660d0424558ae2d21697d5e 100644 --- a/src/utils/diffHandler.ts +++ b/src/utils/diffHandler.ts @@ -48,7 +48,8 @@ export class DiffHandler { , updateDate: new Date() , changed: ((newForm.title !== oldForm.title) || (newForm.description !== oldForm.description) || - (newForm.answerTimes !== oldForm.answerTimes)) + (newForm.answerTimes !== oldForm.answerTimes) || + (newForm.status !== oldForm.status)) , inputUpdates: [] }; diff --git a/src/utils/formQueryBuilder.ts b/src/utils/formQueryBuilder.ts index 449da78b55fe3997cad8e3e078e4013374ec7202..4d4b7f8425b1a042bb9a0d9f777508b54c2fa0ee 100644 --- a/src/utils/formQueryBuilder.ts +++ b/src/utils/formQueryBuilder.ts @@ -95,7 +95,7 @@ export class FormQueryBuilder extends QueryBuilder { * @param cb.err - Error information when the method fails. */ private executeListForms(userId: number, cb: (err: Error, forms?: Form[]) => void) { - const queryString: string = "SELECT t1.id,t1.title,t1.description,t1.times FROM form t1 \ + const queryString: string = "SELECT t1.id,t1.title,t1.description,t1.times,t1.status FROM form t1 \ INNER JOIN form_owner t2 ON (t1.id=t2.id_form \ AND t2.id_user=$1);"; const query: QueryOptions = { @@ -120,6 +120,7 @@ export class FormQueryBuilder extends QueryBuilder { , description: row["description"] , inputs: [] , answerTimes: row["times"] + , status: row["status"] }; const formTmp: Form = new Form(formOpt); @@ -251,6 +252,7 @@ export class FormQueryBuilder extends QueryBuilder { , description: result.rows[0]["description"] , inputs: [] , answerTimes: result.rows[0]["times"] + , status: result.rows[0]["status"] }); callback(null, formTmp); @@ -422,6 +424,7 @@ export class FormQueryBuilder extends QueryBuilder { , description: form.description , inputs: inputsTmp , answerTimes: form.answerTimes + , status: form.status }); anotherCallback(null, formTmp); } @@ -469,7 +472,7 @@ export class FormQueryBuilder extends QueryBuilder { * @param cb.form - Form or null if form not exists. */ private executeReadForm(id: number, cb: (err: Error, form?: QueryResult) => void) { - const queryString: string = "SELECT id, title, description, times FROM form WHERE id=$1;"; + const queryString: string = "SELECT id, title, description, times, status FROM form WHERE id=$1;"; const query: QueryOptions = { query: queryString , parameters: [id] @@ -777,8 +780,8 @@ export class FormQueryBuilder extends QueryBuilder { * @param cb.result - Form identifier or null if any error occurs. */ private executeWriteForm(form: Form, cb: (err: Error, result?: number) => void) { - const queryString: string = "INSERT INTO form (title, description, times) \ - VALUES ($1, $2, $3) \ + const queryString: string = "INSERT INTO form (title, description, times, status) \ + VALUES ($1, $2, $3, $4) \ RETURNING id;"; const query: QueryOptions = { query: queryString @@ -786,6 +789,7 @@ export class FormQueryBuilder extends QueryBuilder { form.title , form.description , form.answerTimes + , form.status ] }; @@ -1041,6 +1045,9 @@ export class FormQueryBuilder extends QueryBuilder { }, (callback: (err: Error) => void) => { this.executeUpdateForm(form.answerTimes, form.id, "times", callback); + }, + (callback: (err: Error) => void) => { + this.executeUpdateForm(form.status, form.id, "status", callback); } ], (error) => { cb(error); diff --git a/src/utils/optHandler.ts b/src/utils/optHandler.ts index 02b33d27bcb80e0d332f801c82bd185397cf3f7b..c6dd1a962c4195f8efda393aa5a9b459c7c18e05 100644 --- a/src/utils/optHandler.ts +++ b/src/utils/optHandler.ts @@ -55,7 +55,8 @@ export class OptHandler { description: obj.description, id: obj.id, inputs: obj.inputs.map((i: any) => OptHandler.input(i)), - answerTimes: obj.answerTimes + answerTimes: obj.answerTimes, + status: obj.status, }; return option; @@ -325,7 +326,8 @@ export class OptHandler { description: obj.description, id: obj.id, inputs: obj.inputs.map((i: any) => OptHandler.input(i)), - answerTimes: obj.answerTimes + answerTimes: obj.answerTimes, + status: obj.status }; return option; diff --git a/test/scenario.ts b/test/scenario.ts index 27d79a26d86459222effe5360224ebeee9d86e10..6763eab961826b9240c60c971b7634bfd0fbefb3 100644 --- a/test/scenario.ts +++ b/test/scenario.ts @@ -551,6 +551,7 @@ const form1: Form = { , Input2 ], answerTimes: true + , status: true }; /** New form with one more Input */ @@ -565,6 +566,8 @@ const form2: Form = { , Input4 ], answerTimes: true + , status: true + }; /** New form with swapped inputs */ const form3: Form = { @@ -577,6 +580,7 @@ const form3: Form = { , Input3 ], answerTimes: true + , status: true }; /** New form with inputs that were removed and added */ const form4: Form = { @@ -589,6 +593,7 @@ const form4: Form = { , Input3UndefinedID ], answerTimes: true + , status: true }; /** New form resulting from the aplication of all operations */ const form5: Form = { @@ -602,6 +607,7 @@ const form5: Form = { , Input4 ], answerTimes: true + , status: true }; /** New form resulting from the restoration of an Input */ const form6: Form = { @@ -614,6 +620,7 @@ const form6: Form = { , Input3Placement1id3 ], answerTimes: true + , status: true }; /** New form */ const form7: Form = { @@ -626,6 +633,7 @@ const form7: Form = { , Input3idNULL ], answerTimes: true + , status: true }; /** New form created with a wrong title */ const form8: Form = { @@ -637,6 +645,7 @@ const form8: Form = { , Input2 ], answerTimes: true + , status: true }; /** New form created */ const formToRead: Form = { @@ -648,6 +657,7 @@ const formToRead: Form = { , Input2 ], answerTimes: true + , status: true }; /** Old form that serves as a base for comparison */ const formBase: Form = { @@ -660,6 +670,7 @@ const formBase: Form = { , Input3 ], answerTimes: true + , status: true }; /** Another old form that serves as a base for comparison */ const formBase2: Form = { @@ -672,6 +683,7 @@ const formBase2: Form = { , Input4Placement2id4 ], answerTimes: true + , status: true }; /** Another old form that serves as a base for comparison */ const formBase3: Form = { @@ -683,6 +695,7 @@ const formBase3: Form = { , mixedInput1 ], answerTimes: true + , status: true }; /** Empty form used as a base for comparison */ const emptyForm: Form = { @@ -691,6 +704,7 @@ const emptyForm: Form = { , description: "Form Description 1" , inputs: [] , answerTimes: true + , status: true }; /** Expected input update to check an form update with a 'remove' type */ const expInput1: InputUpdate = { @@ -1101,6 +1115,7 @@ const expFormtoUpdateNullId: Form = { , description: "Form Description 1" , inputs: [Input1] , answerTimes: true + , status: true }; /** Expected form update having null id */ const expFormUpdate: FormUpdate = { @@ -1191,6 +1206,7 @@ const formMissingTitle: any = { , OptHandler.input(optsInput3) ], answerTimes: true + , status: true }; /** Form that has no description atribute */ const formMissingDescription: any = { @@ -1202,6 +1218,7 @@ const formMissingDescription: any = { , OptHandler.input(optsInput3) ], answerTimes: true + , status: true }; /** Form that has no input atribute */ const formMissingInputs: any = { @@ -1209,6 +1226,7 @@ const formMissingInputs: any = { , title: "Form Title 1" , description: "Form Description 1" , answerTimes: true + , status: true }; /** Input that has no placement atribute */ const inputMissingPlacement: any = { @@ -1349,6 +1367,7 @@ const fullFormOptions: FormOptions = { , OptHandler.input(optsInput3) ], answerTimes: true + , status: true }; const formForAnswer: Form = { id: 1 @@ -1360,6 +1379,7 @@ const formForAnswer: Form = { , Input3 ], answerTimes: true + , status: true }; /** Valid form created used fullFormOptions */ const tmpForm: Form = new Form(OptHandler.form(fullFormOptions)); @@ -1443,6 +1463,7 @@ const validFormUpdateObj: any = { , updateObj3 ], answerTimes: true + , status: true }; /** FormUpdate with non-array inputUpdates */ const formUpdateNotArrayInputUpdates: any = { @@ -1461,6 +1482,7 @@ const formUpdateMissingForm: any = { , updateObj3 ], answerTimes: true + , status: true }; /** FormUpdate missing the inputs to update */ const formUpdateMissinginputUpdate: any = { @@ -1782,6 +1804,7 @@ const formWithValidSubForm1: FormOptions = { , new Input(inputOpt1ForForm8) ], answerTimes: true + , status: true }; /** A form with a valid SubForm */ const formWithValidSubForm2: FormOptions = { @@ -1793,6 +1816,7 @@ const formWithValidSubForm2: FormOptions = { , new Input(inputOpt1ForForm11) ], answerTimes: true + , status: true }; /** A form with a invalid SubForm */ const formWithInvalidSubForm1: FormOptions = { @@ -1804,6 +1828,7 @@ const formWithInvalidSubForm1: FormOptions = { , inputOpt1ForForm9 ], answerTimes: true + , status: true }; /** A form with a invalid SubForm */ @@ -1816,6 +1841,7 @@ const formWithInvalidSubForm2: FormOptions = { , inputOpt1ForForm9 ], answerTimes: true + , status: true }; /** A updated version of form 8 */ @@ -1828,6 +1854,7 @@ const updatedFormWithValidSubForm1: FormOptions = { , inputOpt2ForForm8 ], answerTimes: true + , status: true }; /** A updated version of form 8 */ const updatedFormWithValidSubForm2: FormOptions = { @@ -1839,6 +1866,7 @@ const updatedFormWithValidSubForm2: FormOptions = { , inputOptWithValidSubForm3 ], answerTimes: true + , status: true }; /** A invalid updated version of form 8 */ @@ -1852,6 +1880,7 @@ const updatedFormWithInvalidSubForm1: FormOptions = { , inputOptWithInvalidSubForm4 ], answerTimes: true + , status: true }; /** InputUpdateOptions with subForms */ @@ -2109,6 +2138,10 @@ const queryToRemoveNEInputAnswers: QueryOptions = { query: queryStringRemoveNEIn const queryStringRemoveInputAnswers: string = "DELETE FROM input_answer WHERE id=18 OR id=19;"; /** Query obj to be used to remove the previously inserted inputAnswers Obj */ const queryToRemoveInputAnswers: QueryOptions = { query: queryStringRemoveInputAnswers, parameters: [] }; +/** QueryString to be used on a query to delete form */ +const queryStringRemoveForm3: string = "UPDATE form SET status='false' WHERE id=3;"; +/** Query obj to be used to delete form */ +const queryToRemoveForm3: QueryOptions = { query: queryStringRemoveForm3, parameters: [] }; /** 2nd describe */ /** Input Options object to be used on a formOptions */ @@ -2243,6 +2276,20 @@ const formObjToUpdateDBH: FormOptions = { , inputObjToUpdateDBH3 ], answerTimes: true + , status: true +}; +/** FormOptions object to be used on formupdateOptions */ +const formObjToDeleteForm: FormOptions = { + id: 1 + , title: "Form Title 1" + , description: "Form Description 1" + , inputs: [ + inputObjToUpdateDBH1 + , optsInput2 + , inputObjToUpdateDBH3 + ], + answerTimes: true + , status: true }; /** FormUpdateOptions to Upadte the form and insert a formupdate */ const formUpdateOptsObjDBH1: FormUpdateOptions = { @@ -2280,6 +2327,14 @@ const formUpdateOptsObjDBH3: FormUpdateOptions = { , updateObjDBH3REENABLE ] }; +/** FormUpdateOptions to Upadte the form and change status to false (delete form) */ +const formUpdateOptsObjDBH4: FormUpdateOptions = { + id: 1 + , form: formObjToDeleteForm + , updateDate: new Date() + , changed: true + , inputUpdates: [] +}; /** Form options that will have to be read */ const formOptsObjDBH: FormOptions = { id: 1 @@ -2291,6 +2346,7 @@ const formOptsObjDBH: FormOptions = { , OptHandler.input(inputOptsDBH3) ], answerTimes: true + , status: true }; /** Form options that will have to be write */ const formOptsObjDBH2: FormOptions = { @@ -2301,6 +2357,7 @@ const formOptsObjDBH2: FormOptions = { , OptHandler.input(inputOptsDBH5) ], answerTimes: true + , status: true }; /** InputAnswerOptions to be used on the first dictionary */ const inputAnswersOptDBH1: InputAnswerOptions = { @@ -2582,6 +2639,7 @@ const formObjDBH1: Form = { , description: "Form Description 1" , inputs: [inputDBH1] , answerTimes: false + , status: true }; /** Form, with sugestions on the inputs, that will be inserted */ const formObjDBH2: Form = { @@ -2596,6 +2654,7 @@ const formObjDBH2: Form = { ], answerTimes: true , id: 6 + , status: true }; /** Form with inputs having 'typeof' on the validation property */ const formObjdbh3: Form = { @@ -2612,6 +2671,7 @@ const formObjdbh3: Form = { ], answerTimes: true , id: 7 + , status: true }; /** InputUpdate uesd on a invalid formUpdate */ const inputUpdateObjDBH: InputUpdate = { @@ -2782,6 +2842,7 @@ const formWithId6: FormOptions = { ], answerTimes: true , id: 6 + , status: true }; /** ============================================= */ /** form testing Scenario */ @@ -2823,6 +2884,7 @@ const formObjInput1to3WithTrueEnable: FormOptions = { , optsInput3EnableTrue ], answerTimes: true + , status: true }; /** Valid form to post */ const validFormOptsToPost: FormOptions = { @@ -2861,6 +2923,7 @@ const validFormOptsToPost: FormOptions = { } ], answerTimes: true + , status: true }; /** Malformed form that misses title */ @@ -2899,6 +2962,7 @@ const formOptsMissingTitle: any = { } ], answerTimes: true + , status: true }; /** FormOpts to udate with a SWAP operation */ const formOptsToUpdateSWAP: FormOptions = { @@ -2941,6 +3005,7 @@ const formOptsToUpdateSWAP: FormOptions = { } ], answerTimes: true + , status: true }; /** FormOpts to udate with a ADD operation */ const formOptsToUpdateADD: FormOptions = { @@ -3010,6 +3075,7 @@ const formOptsToUpdateADD: FormOptions = { } ], answerTimes: true + , status: true }; /** FormOpts to udate with a REMOVE operation */ const formOptsToUpdateREMOVE: FormOptions = { @@ -3018,6 +3084,7 @@ const formOptsToUpdateREMOVE: FormOptions = { , description: "Form Description 3" , inputs: [], answerTimes: true + , status: true }; /** FormOpts to udate with a REENABLE operation */ const formOptsToUpdateREENABLE: FormOptions = { @@ -3050,8 +3117,9 @@ const formOptsToUpdateREENABLE: FormOptions = { } ], answerTimes: true + , status: true }; -/** FormOpts to udate changing the title */ +/** FormOpts to update changing the title */ const formOptsToUpdateChangingTheTitle: FormOptions = { id: 4 , title: "Title 4" @@ -3094,6 +3162,52 @@ const formOptsToUpdateChangingTheTitle: FormOptions = { } ], answerTimes: false + , status: true +}; +/** FormOpts to delete form */ +const formOptsToDeleteForm: FormOptions = { + id: 4 + , title: "Title 4" + , description: "Description 4" + , inputs: [ + { + placement: 0 + , description: "Description Question 1 Form 4" + , question: "Question 1 Form 4" + , enabled: true + , type: InputType.TEXT + , validation: [ + { type: ValidationType.MANDATORY, arguments: [] } + ] + , id: 8 + } + , { + placement: 1 + , description: "Description Question 2 Form 4" + , question: "Question 2 Form 4" + , enabled: true + , type: InputType.TEXT + , validation: [ + { type: 3, arguments: ["10"] } + , { type: 4, arguments: ["2"] } + ] + , id: 9 + } + , { + placement: 2 + , description: "Description Question 3 Form 4" + , question: "Question 3 Form 4" + , enabled: true + , type: InputType.TEXT + , validation: [ + { type: 3, arguments: ["10"] } + , { type: 4, arguments: ["2"] } + ] + , id: 10 + } + ], + answerTimes: false + , status: false }; /** FormOpts to udate to Undo changes */ const formOptsToUpdateUdoingChanges: FormOptions = { @@ -3138,6 +3252,7 @@ const formOptsToUpdateUdoingChanges: FormOptions = { } ], answerTimes: false + , status: true }; /** A valid formUpdate */ const validFormUpdate2: FormOptions = { @@ -3179,6 +3294,7 @@ const validFormUpdate2: FormOptions = { } ], answerTimes: true + , status: true }; /** FormUpdate Options that misses title and description */ const formOptionsToUpdateMissingProperties: any = { @@ -3218,6 +3334,7 @@ const formOptionsToUpdateMissingProperties: any = { } ], answerTimes: true + , status: true }; const formReadAnswer: FormAnswer[] = @@ -3342,6 +3459,7 @@ const formReadAnswer: FormAnswer[] = { type: 4, arguments: ["2"] }] }], answerTimes: true + , status: true }), timestamp: new Date("22 january 2019 19:10:25"), inputAnswers: @@ -3418,6 +3536,7 @@ const formReadAnswer: FormAnswer[] = { type: 4, arguments: ["2"] }] }], answerTimes: true + , status: true }), timestamp: new Date("10 february 2020 14:07:49 UTC"), inputAnswers: @@ -3965,6 +4084,8 @@ export const dbHandlerScenario = { removeNEInputAnswers: queryToRemoveNEInputAnswers, /** Query to remove the input answers from the Database */ removeInputAnswers: queryToRemoveInputAnswers, + /** Query to delete form with id 3 */ + deleteForm3: queryToRemoveForm3, /** Form options that will have to be read */ formToRead: formOptsObjDBH, @@ -3979,6 +4100,8 @@ export const dbHandlerScenario = { /** Input update options that will have to update the form and insert a formupdate */ updateInput: formUpdateOptsObjDBH2, /** Form update options that will have to reenable a input and insert a formupdate */ + updateDelete: formUpdateOptsObjDBH4, + /** Form update options that will have to update status on a form to false */ reenabledInputs: formUpdateOptsObjDBH3, /** Form update that will fail to update by not having it's operation recognized */ failedUpdate: formUpdateObjDBH1, @@ -4048,6 +4171,8 @@ export const formScenario = { formToReenableInputs: formOptsToUpdateREENABLE, /** Update to change the form title */ changeTitle: formOptsToUpdateChangingTheTitle, + /** Update to delete form */ + deleteForm: formOptsToDeleteForm, /** Update by undoing changes */ undo: formOptsToUpdateUdoingChanges, /** A valid formUpdate being used on a non-existent form */