Skip to content

Commit

Permalink
Skip validating outer element for now as it's just waaay to slow caus…
Browse files Browse the repository at this point in the history
…ing 10 second + load times for some wires.
  • Loading branch information
grantcopley committed Jun 5, 2024
1 parent fd85251 commit b5e652f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions models/Component.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,8 @@ component output="true" {
* @throws ApplicationException When the HTML does not meet the single outer element criteria.
*/
function _validateSingleOuterElement( trimmedHtml ) {
return; // Skip until we can find a much faster way to validate a single outer element.

// Define void elements
local.voidTags = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"];

Expand Down
10 changes: 5 additions & 5 deletions test-harness/tests/specs/CBWIRESpec.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ component extends="coldbox.system.testing.BaseTestCase" {
}).toThrow();
});

it("should throw an error for HTML without a single outer element", function() {
xit("should throw an error for HTML without a single outer element", function() {
expect(function() {
testComponent._render( testComponent.template( "wires.testing.multipleouterelements" ) );
}).toThrow("Template has more than one outer element, or is missing an end tag </element>.");
Expand Down Expand Up @@ -541,7 +541,7 @@ component extends="coldbox.system.testing.BaseTestCase" {
it( "should dispatch an event without params", function() {
var payload = incomingRequest(
memo = {
"name": "TestComponent",
"name": "test.should_dispatch_an_event_without_params",
"id": "Z1Ruz1tGMPXSfw7osBW2",
"children": []
},
Expand All @@ -568,7 +568,7 @@ component extends="coldbox.system.testing.BaseTestCase" {
it( "should dispatch an event with params", function() {
var payload = incomingRequest(
memo = {
"name": "TestComponent",
"name": "test.should_dispatch_an_event_with_params",
"id": "Z1Ruz1tGMPXSfw7osBW2",
"children": []
},
Expand Down Expand Up @@ -671,7 +671,7 @@ component extends="coldbox.system.testing.BaseTestCase" {
it( "should call onHydrate() if it exists", function() {
var payload = incomingRequest(
memo = {
"name": "OnHydrate",
"name": "test.should_call_onhydrate",
"id": "Z1Ruz1tGMPXSfw7osBW2",
"children": []
},
Expand All @@ -689,7 +689,7 @@ component extends="coldbox.system.testing.BaseTestCase" {
it( "should call onHydrate[Property] if it exists", function() {
var payload = incomingRequest(
memo = {
"name": "OnHydrate",
"name": "test.should_call_onhydrate",
"id": "Z1Ruz1tGMPXSfw7osBW2",
"children": []
},
Expand Down

0 comments on commit b5e652f

Please sign in to comment.