Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coldbox, testbox mapping paths in tests application #4

Merged
merged 3 commits into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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