From 1ae4a3f6fe5e295af956f12dadb8bf3e31bc9d73 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Wed, 27 Nov 2024 18:49:45 -0500 Subject: [PATCH] initial snapshot --- .github/workflows/pr.yml | 6 +- .../forms/components/FormComponentTest.java | 67 ++++++++----------- 2 files changed, 32 insertions(+), 41 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8723c85..d7203fb 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -31,9 +31,9 @@ jobs: distribution: "temurin" java-version: 21 - - uses: Ortus-Solutions/commandbox-action@v1.0.2 - with: - cmd: run-script format:check + # - uses: Ortus-Solutions/commandbox-action@v1.0.2 + # with: + # cmd: run-script format:check - name: Verify Code Formatting run: ./gradlew spotlessCheck diff --git a/src/test/java/ortus/boxlang/modules/forms/components/FormComponentTest.java b/src/test/java/ortus/boxlang/modules/forms/components/FormComponentTest.java index 6b87b2a..ce10547 100644 --- a/src/test/java/ortus/boxlang/modules/forms/components/FormComponentTest.java +++ b/src/test/java/ortus/boxlang/modules/forms/components/FormComponentTest.java @@ -36,9 +36,6 @@ public void testFormComponentInCF() { ); // @formatter:on String output = variables.getAsString( result ); - System.out.println( "------------------------------------" ); - System.out.println( output ); - System.out.println( "------------------------------------" ); assertTrue( output.contains( "" ) ); assertTrue( output.contains( "action=\"index.cfm\" method=\"post\"" ) ); @@ -47,34 +44,35 @@ public void testFormComponentInCF() { assertTrue( output.contains( "" ) ); } - // @DisplayName( "It can test the FormComponent with basic inputs in BL components" ) - // @Test - // public void testFormComponentInBL() { - // // @formatter:off - // runtime.executeSource( """ - // - // - // - // - // - // """, - // context, - // BoxSourceType.BOXTEMPLATE - // ); - // // @formatter:on - - // String output = variables.getAsString( result ); - // System.out.println( "------------------------------------" ); - // System.out.println( output ); - // System.out.println( "------------------------------------" ); - // System.out.println( "action=\"index.cfm\" method=\"post\"" ); - // assertTrue( output.contains( "" ) ); - // assertTrue( output.contains( "action=\"index.cfm\" method=\"post\"" ) ); - // assertTrue( output.contains( "type=\"text\" name=\"name\"" ) ); - // assertTrue( output.contains( "type=\"text\" name=\"name\"" ) ); - // } - + @DisplayName( "It can test the FormComponent with basic inputs in BL components" ) + @Test + public void testFormComponentInBL() { + // @formatter:off + runtime.executeSource( """ + + + + + + + Blah + + + + + """, + context, + BoxSourceType.BOXTEMPLATE + ); + // @formatter:on + String output = variables.getAsString( result ); + assertTrue( output.contains( "" ) ); + assertTrue( output.contains( "action=\"index.cfm\" method=\"post\"" ) ); + assertTrue( output.contains( "type=\"text\" name=\"name\"" ) ); + assertTrue( output.contains( "type=\"text\" name=\"name\"" ) ); + assertTrue( output.contains( "" ) ); + } @DisplayName( "It can test the Select component with a query binding" ) @Test @@ -99,16 +97,12 @@ public void testSelectComponentQuery() { ); // @formatter:on String output = variables.getAsString( result ); - System.out.println( "------------------------------------" ); - System.out.println( output ); - System.out.println( "------------------------------------" ); assertTrue( output.contains( "" ) ); assertTrue( output.contains( "action=\"index.cfm\" method=\"post\"" ) ); assertTrue( output.contains( "" ) ); } - @DisplayName( "It can test the Select component with a grouped binding" ) @Test public void testSelectComponentQueryGroup() { @@ -133,9 +127,6 @@ public void testSelectComponentQueryGroup() { ); // @formatter:on String output = variables.getAsString( result ); - System.out.println( "------------------------------------" ); - System.out.println( output ); - System.out.println( "------------------------------------" ); assertTrue( output.contains( "" ) ); assertTrue( output.contains( "action=\"index.cfm\" method=\"post\"" ) );