|
1 | 1 | component extends="coldbox.system.testing.BaseTestCase" {
|
2 | 2 |
|
| 3 | + function beforeAll() { |
| 4 | + super.beforeAll(); |
| 5 | + // delete any files in models/tmp folder |
| 6 | + local.tempFolder = expandPath( "../../../models/tmp" ); |
| 7 | + if ( directoryExists( local.tempFolder ) ) { |
| 8 | + directoryDelete( local.tempFolder, true ); |
| 9 | + } |
| 10 | + directoryCreate( local.tempFolder ); |
| 11 | + } |
| 12 | + |
3 | 13 | // Lifecycle methods and BDD suites as before...
|
4 | 14 | function run(testResults, testBox) {
|
5 | 15 |
|
@@ -129,18 +139,23 @@ component extends="coldbox.system.testing.BaseTestCase" {
|
129 | 139 | expect( parsing.snapshot.data.stringBooleanValue ).toBeTrue();
|
130 | 140 | });
|
131 | 141 |
|
132 |
| - it( "should render with a renderIt method", function() { |
133 |
| - var result = CBWIREController.wire( "test.should_render_with_a_renderIt_method" ); |
134 |
| - expect( result ).toInclude( "<p>I rendered from renderIT</p>" ); |
| 142 | + it( "should render with a onRender method", function() { |
| 143 | + var result = CBWIREController.wire( "test.should_render_with_a_onRender_method" ); |
| 144 | + expect( result ).toInclude( "<p>I rendered from onRender</p>" ); |
| 145 | + } ); |
| 146 | + |
| 147 | + it( "should render with renderIt for backwards compatibility", function() { |
| 148 | + var result = CBWIREController.wire( "test.should_render_with_renderIt_for_backwards_compatibility" ); |
| 149 | + expect( result ).toInclude( "I rendered from renderIt" ); |
135 | 150 | } );
|
136 | 151 |
|
137 | 152 | it("should implicitly render a view template", function() {
|
138 | 153 | var result = CBWIREController.wire( "test.should_implicitly_render_a_view_template" );
|
139 | 154 | expect( result ).toInclude( "<p>Implicitly rendered</p>" );
|
140 | 155 | } );
|
141 | 156 |
|
142 |
| - it( "should support passing params into a renderIt method", function() { |
143 |
| - var result = CBWIREController.wire( "test.should_support_passing_params_into_a_renderIt_method" ); |
| 157 | + it( "should support passing params into a onRender method", function() { |
| 158 | + var result = CBWIREController.wire( "test.should_support_passing_params_into_a_onRender_method" ); |
144 | 159 | expect( result ).toInclude( "<p>Passed in: 5</p>" );
|
145 | 160 | } );
|
146 | 161 |
|
@@ -178,9 +193,12 @@ component extends="coldbox.system.testing.BaseTestCase" {
|
178 | 193 | expect( result ).toInclude( "<p>Result: Hello World!</p>" );
|
179 | 194 | } );
|
180 | 195 |
|
181 |
| - it( "should support deep nesting with correct count of children", function() { |
| 196 | + xit( "should support deep nesting with correct count of children", function() { |
182 | 197 | var result = CBWIREController.wire( "test.should_support_deep_nesting" );
|
183 | 198 | var parent = parseRendering( result, 1 );
|
| 199 | + writeDump( result ); |
| 200 | + writeDump( parent ); |
| 201 | + abort; |
184 | 202 | var child1 = parseRendering( result, 2 );
|
185 | 203 | var child2 = parseRendering( result, 3 );
|
186 | 204 | expect( parent.snapshot.memo.children.count() ).toBe( 2 );
|
|
0 commit comments