Update to Thymeleaf 3.0.2 and remove tiles

Spring 5 removed support for Tiles 2 and Thymeleaf does not support
Tiles 3 yet. This commit updates to Thymeleaf 3.0.2 and uses
Thymeleaf's build in layout support.

Issue gh-4080
This commit is contained in:
Rob Winch
2016-10-17 09:12:24 -05:00
parent c1e9140940
commit 5e35e37a2b
24 changed files with 180 additions and 362 deletions

View File

@@ -24,7 +24,7 @@ import geb.*
*/
class HomePage extends Page {
static url = ''
static at = { assert driver.title == 'Messages : View All'; true}
static at = { assert driver.title == 'SecureMail: View All'; true}
static content = {
user { $('p.navbar-text').text() }
logout { $('input', type: 'submit').click() }

View File

@@ -24,7 +24,7 @@ import geb.*
*/
class LoginPage extends Page {
static url = 'login'
static at = { assert driver.title == 'Please Login'; true}
static at = { assert driver.title == 'SecureMail: Please Login'; true}
static content = {
login(required:false) { user='user', password='password' ->
loginForm.username = user

View File

@@ -1,27 +1,24 @@
<html xmlns:th="http://www.thymeleaf.org" xmlns:tiles="http://www.thymeleaf.org">
<head>
<title tiles:fragment="title">Please Login</title>
</head>
<body>
<div tiles:fragment="content">
<form name="f" th:action="@{/login}" method="post">
<fieldset>
<legend>Please Login</legend>
<div th:if="${param.error}" class="alert alert-error">
Invalid username and password.
</div>
<div th:if="${param.logout}" class="alert alert-success">
You have been logged out.
</div>
<label for="username">Username</label>
<input type="text" id="username" name="username"/>
<label for="password">Password</label>
<input type="password" id="password" name="password"/>
<div class="form-actions">
<button type="submit" class="btn">Log in</button>
</div>
</fieldset>
</form>
</div>
</body>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="layout :: head(title=~{::title},links=~{})">
<title>Please Login</title>
</head>
<body th:include="layout :: body" th:with="content=~{::content}">
<div th:fragment="content">
<form name="f" th:action="@{/login}" method="post">
<fieldset>
<legend>Please Login</legend>
<div th:if="${param.error}" class="alert alert-error">Invalid
username and password.</div>
<div th:if="${param.logout}" class="alert alert-success">You
have been logged out.</div>
<label for="username">Username</label> <input type="text"
id="username" name="username" /> <label for="password">Password</label>
<input type="password" id="password" name="password" />
<div class="form-actions">
<button type="submit" class="btn">Log in</button>
</div>
</fieldset>
</form>
</div>
</body>
</html>