functional的package名不能自动识别,css名叫quickstart不能很好自动改名等小问题
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<link type="image/x-icon" href="${ctx}/static/images/favicon.ico" rel="shortcut icon">
|
||||
<link href="${ctx}/static/bootstrap/2.1.1/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/jquery-validation/1.10.0/validate.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/styles/quickstart.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/styles/main.css" type="text/css" rel="stylesheet" />
|
||||
<script src="${ctx}/static/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="${ctx}/static/jquery-validation/1.10.0/jquery.validate.min.js" type="text/javascript"></script>
|
||||
<script src="${ctx}/static/jquery-validation/1.10.0/messages_bs_zh.js" type="text/javascript"></script>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
echo [PreRequirment] Download yuicompressor-2.4.7.jar from http://yuilibrary.com/downloads/yuicompressor and put it here.
|
||||
|
||||
cd %~dp0
|
||||
java -jar yuicompressor-2.4.7.jar -o ..\src\main\webapp\static\styles\showcase.min.css ..\src\main\webapp\static\styles\showcase.css
|
||||
java -jar yuicompressor-2.4.7.jar -o ..\src\main\webapp\static\styles\main.min.css ..\src\main\webapp\static\styles\main.css
|
||||
|
||||
pause
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<link type="image/x-icon" href="${ctx}/static/images/favicon.ico" rel="shortcut icon">
|
||||
<link href="${ctx}/static/bootstrap/2.1.1/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/styles/showcase.min.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${ctx}/static/styles/main.min.css" type="text/css" rel="stylesheet" />
|
||||
<script src="${ctx}/static/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
|
||||
|
||||
<sitemesh:head />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springside</groupId>
|
||||
<artifactId>springside-project</artifactId>
|
||||
@@ -39,7 +38,7 @@
|
||||
<modules>
|
||||
<module>modules</module>
|
||||
<module>examples</module>
|
||||
</modules>
|
||||
</modules>
|
||||
|
||||
<ciManagement>
|
||||
<system>Jenkins</system>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
a. create a archetype.properties, the content is
|
||||
|
||||
package=org.springside.examples.quickstart
|
||||
projectName=QuickStart
|
||||
tablePrefix=ss_
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
@echo off
|
||||
|
||||
echo [INFO] Generating project in ./generate dir
|
||||
|
||||
cd generate
|
||||
call mvn archetype:generate -DarchetypeCatalog=local
|
||||
pause
|
||||
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
|
||||
call mvn clean install
|
||||
pause
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>QuickStart示例:<sitemesh:title/></title>
|
||||
<title>${projectName}示例:<sitemesh:title/></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta http-equiv="Cache-Control" content="no-store" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
@@ -19,7 +19,7 @@
|
||||
<link type="image/x-icon" href="${symbol_dollar}{ctx}/static/images/favicon.ico" rel="shortcut icon">
|
||||
<link href="${symbol_dollar}{ctx}/static/bootstrap/2.1.1/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${symbol_dollar}{ctx}/static/jquery-validation/1.10.0/validate.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${symbol_dollar}{ctx}/static/styles/${artifactId}.css" type="text/css" rel="stylesheet" />
|
||||
<link href="${symbol_dollar}{ctx}/static/styles/main.css" type="text/css" rel="stylesheet" />
|
||||
<script src="${symbol_dollar}{ctx}/static/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="${symbol_dollar}{ctx}/static/jquery-validation/1.10.0/jquery.validate.min.js" type="text/javascript"></script>
|
||||
<script src="${symbol_dollar}{ctx}/static/jquery-validation/1.10.0/messages_bs_zh.js" type="text/javascript"></script>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<c:set var="ctx" value="${symbol_dollar}{pageContext.request.contextPath}"/>
|
||||
<div id="header">
|
||||
<div id="title">
|
||||
<h1>QuickStart示例<small>--TodoList应用演示</small>
|
||||
<h1>${projectName}示例<small>--TodoList应用演示</small>
|
||||
<shiro:user>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="${symbol_pound}">
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
version="2.5">
|
||||
<display-name>QuickStart</display-name>
|
||||
<display-name>${artifactId}</display-name>
|
||||
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
|
||||
+2
-2
@@ -49,12 +49,12 @@ public class BaseSeleniumTestCase extends BaseFunctionalTestCase {
|
||||
protected static void loginAsUserIfNecessary() {
|
||||
s.open("/task");
|
||||
|
||||
if ("QuickStart示例:登录页".equals(s.getTitle())) {
|
||||
if ("${projectName}示例:登录页".equals(s.getTitle())) {
|
||||
s.type(By.name("username"), "user");
|
||||
s.type(By.name("password"), "user");
|
||||
s.check(By.name("rememberMe"));
|
||||
s.click(By.id("submit_btn"));
|
||||
assertEquals("QuickStart示例:任务管理", s.getTitle());
|
||||
assertEquals("${projectName}示例:任务管理", s.getTitle());
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,14 +24,14 @@ public class RegisterFT extends BaseSeleniumTestCase {
|
||||
s.click(By.id("submit_btn"));
|
||||
|
||||
//跳转到登录页
|
||||
assertEquals("QuickStart示例:登录页", s.getTitle());
|
||||
assertEquals("${projectName}示例:登录页", s.getTitle());
|
||||
assertEquals("user2", s.getValue(By.name("username")));
|
||||
|
||||
s.type(By.name("password"), "user2");
|
||||
s.click(By.id("submit_btn"));
|
||||
|
||||
//登陆成功
|
||||
assertEquals("QuickStart示例:任务管理", s.getTitle());
|
||||
assertEquals("${projectName}示例:任务管理", s.getTitle());
|
||||
|
||||
//退出用户
|
||||
s.open("/logout");
|
||||
+3
-3
@@ -23,11 +23,11 @@ public class SecurityFT extends BaseSeleniumTestCase {
|
||||
public void anonymousUserAccessSystem() {
|
||||
//访问退出登录页面,退出之前的登录
|
||||
s.open("/logout");
|
||||
assertEquals("QuickStart示例:登录页", s.getTitle());
|
||||
assertEquals("${projectName}示例:登录页", s.getTitle());
|
||||
|
||||
//访问任意页面会跳转到登录界面
|
||||
s.open("/task");
|
||||
assertEquals("QuickStart示例:登录页", s.getTitle());
|
||||
assertEquals("${projectName}示例:登录页", s.getTitle());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ public class SecurityFT extends BaseSeleniumTestCase {
|
||||
s.check(By.name("rememberMe"));
|
||||
s.click(By.id("submit_btn"));
|
||||
|
||||
assertEquals("QuickStart示例:登录页", s.getTitle());
|
||||
assertEquals("${projectName}示例:登录页", s.getTitle());
|
||||
assertTrue(s.isTextPresent("登录失败,请重试."));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user