Skip to content

Commit

Permalink
Merge pull request #4 from coldbox-templates/patch/broken-lib-mapping…
Browse files Browse the repository at this point in the history
…s-in-tests-app

Fix coldbox, testbox mapping paths in tests application
  • Loading branch information
lmajano authored Aug 20, 2022
2 parents c732d55 + 5ee5177 commit 5992c3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/views/main/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

<div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
<a
href="#getSetting( "appMapping" )#/tests/index.cfm"
href="/tests/index.cfm"
class="btn btn-dark btn-lg"
role="button"
target="_blank"
Expand All @@ -126,7 +126,7 @@
</a>

<a
href="#getSetting( "appMapping" )#/tests/runner.cfm"
href="/tests/runner.cfm"
class="btn btn-dark btn-lg"
role="button"
target="_blank"
Expand Down
14 changes: 7 additions & 7 deletions tests/Application.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ component{
// Map back to its root
rootPath = REReplaceNoCase( this.mappings[ "/tests" ], "tests(\\|/)", "" );
// App Mappings
this.mappings[ "/app" ] = rootPath & "app";
this.mappings[ "/coldbox" ] = rootPath & "coldbox";
this.mappings[ "/lib" ] = rootPath & "lib";
this.mappings[ "/logs" ] = rootPath & "logs";
this.mappings[ "/app" ] = rootPath & "app";
this.mappings[ "/lib" ] = rootPath & "lib";
this.mappings[ "/logs" ] = rootPath & "logs";
this.mappings[ "/modules" ] = rootPath & "modules";
this.mappings[ "/testbox" ] = rootPath & "testbox";
this.mappings[ "/root" ] = rootPath & "public";
this.mappings[ "/root" ] = rootPath & "public";
this.mappings[ "/coldbox" ] = this.mappings[ "/lib" ] & "/coldbox";
this.mappings[ "/testbox" ] = this.mappings[ "/lib" ] & "/testbox";

public boolean function onRequestStart( targetPage ){
// Set a high timeout for long running tests
setting requestTimeout="9999";
// New ColdBox Virtual Application Starter
request.coldBoxVirtualApp = new coldbox.system.testing.VirtualApp( appMapping = "/cbTestHarness" );
request.coldBoxVirtualApp = new coldbox.system.testing.VirtualApp( appMapping = "/app" );

// If hitting the runner or specs, prep our virtual app and database
if ( getBaseTemplatePath().replace( expandPath( "/tests" ), "" ).reFindNoCase( "(runner|specs)" ) ) {
Expand Down

0 comments on commit 5992c3f

Please sign in to comment.