From d22c7b3d0574ad887d99bb9a9fd40d92fb464fa1 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 19 Sep 2024 13:41:26 +0200 Subject: [PATCH] v1 finalized --- box.json | 3 +- config/modules/cbdebugger.cfc | 2 +- server-adobe.json | 2 +- tests/index.cfm | 34 +++++++++++--------- tests/specs/integration/api-v1/RantsTest.cfc | 6 ++-- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/box.json b/box.json index 747b704..7b04013 100644 --- a/box.json +++ b/box.json @@ -50,8 +50,9 @@ "runner":"http://localhost:60146/tests/runner.cfm" }, "scripts":{ + "start:adobe":"server start serverConfigFile=server-adobe.json --force", + "start:boxlang":"server start serverConfigFile=server-boxlang.json --force", "start:lucee":"server start serverConfigFile=server-lucee.json --force", - "start:adobe":"server start serverConfigFile=server.json --force", "lint":"cflint **.cf* --text --html --json --!exitOnError --suppress", "format":"cfformat run config,Application.cfc,modules_app/**/*.cfc,tests/specs/**/*.cfc --overwrite --verbose", "format:watch":"cfformat watch config,Application.cfc,modules_app/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json", diff --git a/config/modules/cbdebugger.cfc b/config/modules/cbdebugger.cfc index 9ec0841..e8173d1 100644 --- a/config/modules/cbdebugger.cfc +++ b/config/modules/cbdebugger.cfc @@ -50,7 +50,7 @@ component { expanded : false, // If enabled, we will profile HTTP Body content, disabled by default as it contains lots of data profileHTTPBody : false - }, + } }, // ColdBox Tracer Appender Messages tracers : { enabled : true, expanded : false }, diff --git a/server-adobe.json b/server-adobe.json index b00c5ed..7ce0379 100644 --- a/server-adobe.json +++ b/server-adobe.json @@ -12,7 +12,7 @@ "enable":"true" } }, - "cfconfig":{ + "cfconfig":{ "file":".cfconfig.json" }, "scripts":{ diff --git a/tests/index.cfm b/tests/index.cfm index 485e396..1ad8dd4 100644 --- a/tests/index.cfm +++ b/tests/index.cfm @@ -5,7 +5,7 @@ ASSETS_DIR = expandPath( "/testbox/system/reports/assets" ); TESTBOX_VERSION = new testBox.system.TestBox().getVersion(); // TEST LOCATIONS -> UPDATE AS YOU SEE FIT - rootMapping = "/tests/specs"; + rootMapping = "/tests"; // Local Variables rootPath = expandPath( rootMapping ); @@ -90,20 +90,24 @@ Below is a listing of the runners matching the "runner*.(cfm|bxm)" pattern.

- - - - class="btn btn-success btn-sm my-1 mx-1" - - class="btn btn-info btn-sm my-1 mx-1" - - > - #runners.name# - - + + +

No runners found in this directory

+ + + + class="btn btn-success btn-sm my-1 mx-1" + + class="btn btn-info btn-sm my-1 mx-1" +
+ > + #runners.name# + + + diff --git a/tests/specs/integration/api-v1/RantsTest.cfc b/tests/specs/integration/api-v1/RantsTest.cfc index e775b39..831ade6 100644 --- a/tests/specs/integration/api-v1/RantsTest.cfc +++ b/tests/specs/integration/api-v1/RantsTest.cfc @@ -61,7 +61,7 @@ component extends="tests.resources.BaseTest" { //debug( returnedJSON ); expect( returnedJSON.error ).toBeFalse(); expect( event ).toHaveStatusCode( 200 ); - expect( returnedJSON.data ).toHaveKeyWithCase( "ID" ); + expect( returnedJSON.data ).toHaveKey( "ID" ); expect( returnedJSON.data.id ).toBe( testRantId ); expect( returnedJSON.messages ).toHaveLength( 0 ); } ); @@ -157,8 +157,8 @@ component extends="tests.resources.BaseTest" { var returnedJSON = event.getRenderData().data; expect( returnedJSON.error ).toBeFalse(); expect( event.getStatusCode() ).toBe( 200 ); - expect( returnedJSON.data ).toHaveKeyWithCase( "rantID" ); - expect( returnedJSON.data.rantID ).toBeGT( 7 ); + expect( returnedJSON.data ).toHaveKey( "rantID" ); + expect( returnedJSON.data.rantID ).notToBeEmpty(); expect( returnedJSON.messages[ 1 ] ).toBe( "Rant Created" ); } ); } );