Moved BindingGenerator from gen html project. It makes more sense here.
This commit is contained in:
@@ -81,4 +81,11 @@ final class HRWTests: XCTestCase {
|
||||
let htmlRoot = rootNodes[2]
|
||||
print(htmlRoot.toString())
|
||||
}
|
||||
|
||||
func testBindingGenerator() throws {
|
||||
IHtmlNodeContainerUtility.sharedInstance.defaultBaseDir = "/Users/isaacpaul/Projects/swift-projects/HRW/Tests/HRWTests"
|
||||
let idk = try Example()
|
||||
print(idk.error_container.renderAttributes())
|
||||
idk.rootNode.accept_charset = nil
|
||||
}
|
||||
}
|
||||
|
||||
48
Tests/HRWTests/TestFolder/example.html
Normal file
48
Tests/HRWTests/TestFolder/example.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<form action="/user/change_password"
|
||||
method="POST"
|
||||
enctype="application/x-www-form-urlencoded">
|
||||
<fieldset>
|
||||
<h2>Change Password:</h2>
|
||||
|
||||
<label class="password-label">
|
||||
Current Password
|
||||
<input type="password"
|
||||
name="password_current"
|
||||
class="password-input"
|
||||
required
|
||||
minlength="8"
|
||||
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
|
||||
title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters">
|
||||
</label>
|
||||
|
||||
<label class="password-label">
|
||||
New Password:
|
||||
<input type="password"
|
||||
name="password"
|
||||
class="password-input"
|
||||
required
|
||||
minlength="8"
|
||||
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
|
||||
title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters">
|
||||
</label>
|
||||
|
||||
<label class="password-label">
|
||||
Re-enter New Password:
|
||||
<input type="password"
|
||||
name="password_confirmation"
|
||||
class="password-input"
|
||||
required
|
||||
minlength="8"
|
||||
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
|
||||
title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters">
|
||||
</label>
|
||||
|
||||
<label id="error_container" style="display:none">
|
||||
Error:
|
||||
<br>
|
||||
<span id="span_error"></span>
|
||||
</label>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
Reference in New Issue
Block a user