From 17f795ebca4d1de48fff80bf9fc169ff9e0a4dec Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Fri, 23 Dec 2016 15:40:04 +0100 Subject: [PATCH 01/17] added Travis CI configuration file --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..e169dce82 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: java +jdk: + - oraclejdk8 +script: "mvn verify" + From 247285d8cc290011e0f70b4fe3ef74ed360eb770 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Fri, 23 Dec 2016 16:42:31 +0100 Subject: [PATCH 02/17] added module struts2-jquery-plugin-tests --- pom.xml | 1 + struts2-jquery-plugin-tests/pom.xml | 162 ++++++++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 21 +++ 3 files changed, 184 insertions(+) create mode 100644 struts2-jquery-plugin-tests/pom.xml create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/web.xml diff --git a/pom.xml b/pom.xml index 136d2e978..8b5e8c836 100644 --- a/pom.xml +++ b/pom.xml @@ -92,6 +92,7 @@ struts2-jquery-grid-showcase struts2-jquery-mobile-showcase struts2-jquery-archetypes + struts2-jquery-plugin-tests diff --git a/struts2-jquery-plugin-tests/pom.xml b/struts2-jquery-plugin-tests/pom.xml new file mode 100644 index 000000000..724577338 --- /dev/null +++ b/struts2-jquery-plugin-tests/pom.xml @@ -0,0 +1,162 @@ + + + 4.0.0 + + com.jgeppert.struts2.jquery + struts2-jquery + 4.0.2-SNAPSHOT + + struts2-jquery-plugin-tests + tests for the struts2-jquery-plugin + war + + + https://github.com/struts-community-plugins/struts2-jquery/struts2-jquery-plugin-tests/ + + + + + 8.1.16.v20140903 + 2.19.1 + + 4.12 + 3.0.1 + 2.23 + + + + + + org.mortbay.jetty + jetty-maven-plugin + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + + + + org.mortbay.jetty + jetty-maven-plugin + ${jetty-maven-plugin.version} + + CTRL+C + 8999 + 10 + + + + org.eclipse.jetty + jetty-jsp + ${jetty-maven-plugin.version} + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + + + + integration-test + verify + + + + + + + + + + + org.apache.struts + struts2-convention-plugin + + + + com.jgeppert.struts2.jquery + struts2-jquery-plugin + + + + junit + junit + + + + org.seleniumhq.selenium + selenium-server + + + + org.seleniumhq.selenium + htmlunit-driver + + + + + + + org.apache.struts + struts2-convention-plugin + ${struts2.version} + + + + com.jgeppert.struts2.jquery + struts2-jquery-plugin + ${project.version} + + + + junit + junit + ${junit.version} + test + + + + org.seleniumhq.selenium + selenium-server + ${selenium.version} + test + + + + org.seleniumhq.selenium + htmlunit-driver + ${htmlunit-driver.version} + test + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/web.xml b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 000000000..6be2aa192 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,21 @@ + + + + Struts jQuery Plugin - Tests + + + struts2 + org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter + + + + struts2 + /* + + + + COOKIE + + + + From dcf1b3f28e450ec895e3632244c4b6e3482d6a06 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Fri, 23 Dec 2016 16:48:30 +0100 Subject: [PATCH 03/17] added property for reporting encoding --- struts2-jquery-plugin-tests/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/struts2-jquery-plugin-tests/pom.xml b/struts2-jquery-plugin-tests/pom.xml index 724577338..b1623ee4d 100644 --- a/struts2-jquery-plugin-tests/pom.xml +++ b/struts2-jquery-plugin-tests/pom.xml @@ -16,6 +16,7 @@ + UTF-8 8.1.16.v20140903 2.19.1 From 128e53db1511964c4071d02b636b2c71766dc9c5 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Fri, 23 Dec 2016 18:04:04 +0100 Subject: [PATCH 04/17] added test for a simple ajax link --- struts2-jquery-plugin-tests/pom.xml | 26 ++++----- .../WEB-INF/content/ajax/simple-text.jsp | 1 + .../content/includes/a/simple-ajax-link.jsp | 10 ++++ .../content/loadatonce/a/simple-ajax-link.jsp | 12 +++++ .../loadfromgoogle/a/simple-ajax-link.jsp | 12 +++++ .../content/regular/a/simple-ajax-link.jsp | 12 +++++ .../uncompressed/a/simple-ajax-link.jsp | 12 +++++ .../com/jgeppert/struts2/jquery/a/ATagIT.java | 53 +++++++++++++++++++ .../jquery/selenium/JQueryIdleCondition.java | 18 +++++++ 9 files changed, 143 insertions(+), 13 deletions(-) create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp create mode 100644 struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java create mode 100644 struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/selenium/JQueryIdleCondition.java diff --git a/struts2-jquery-plugin-tests/pom.xml b/struts2-jquery-plugin-tests/pom.xml index b1623ee4d..7181a2dc3 100644 --- a/struts2-jquery-plugin-tests/pom.xml +++ b/struts2-jquery-plugin-tests/pom.xml @@ -17,13 +17,13 @@ UTF-8 - + 8.1.16.v20140903 2.19.1 - - 4.12 - 3.0.1 - 2.23 + + 4.12 + 3.0.1 + 2.23 @@ -44,11 +44,11 @@ org.mortbay.jetty jetty-maven-plugin - ${jetty-maven-plugin.version} + ${jetty-maven-plugin.version} CTRL+C 8999 - 10 + 10 @@ -82,7 +82,7 @@ org.apache.maven.plugins maven-failsafe-plugin - ${maven-failsafe-plugin.version} + ${maven-failsafe-plugin.version} @@ -93,7 +93,7 @@ - + @@ -101,12 +101,12 @@ org.apache.struts struts2-convention-plugin - + com.jgeppert.struts2.jquery struts2-jquery-plugin - + junit junit @@ -140,7 +140,7 @@ junit junit - ${junit.version} + ${junit.version} test @@ -154,7 +154,7 @@ org.seleniumhq.selenium htmlunit-driver - ${htmlunit-driver.version} + ${htmlunit-driver.version} test diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp new file mode 100644 index 000000000..2df9b9dc1 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp @@ -0,0 +1 @@ +This is simple text from an ajax call. diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp new file mode 100644 index 000000000..2e5158904 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp @@ -0,0 +1,10 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + +
Click on the link bellow.
+ + Run AJAX action + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp new file mode 100644 index 000000000..2bb943c00 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp new file mode 100644 index 000000000..9fdeb4bd1 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp new file mode 100644 index 000000000..63802fdf8 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp new file mode 100644 index 000000000..3d8f6cd94 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java new file mode 100644 index 000000000..c07cdbbd2 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java @@ -0,0 +1,53 @@ +package com.jgeppert.struts2.jquery.a; + +import com.jgeppert.struts2.jquery.selenium.JQueryIdleCondition; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; +import org.openqa.selenium.support.ui.WebDriverWait; + +@RunWith(Parameterized.class) +public class ATagIT { + @Parameterized.Parameters + public static Collection data() { + return Arrays.asList(new Object[][] { + { "http://localhost:8080/regular" }, + { "http://localhost:8080/uncompressed" }, + { "http://localhost:8080/loadatonce" }, + { "http://localhost:8080/loadfromgoogle" } + }); + } + + private static JQueryIdleCondition jQueryIdle = new JQueryIdleCondition(); + + private String baseUrl; + + public ATagIT(final String baseUrl) { + this.baseUrl = baseUrl; + } + + @Test + public void testSimpleAjaxPageLink() throws Exception{ + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/a/simple-ajax-link.action"); + Assert.assertEquals("Click on the link bellow.", driver.findElement(By.id("result")).getText()); + driver.findElement(By.id("ajaxlink")).click(); + + wait.until(jQueryIdle); + + Assert.assertEquals("This is simple text from an ajax call.", driver.findElement(By.id("result")).getText()); + } +} + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/selenium/JQueryIdleCondition.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/selenium/JQueryIdleCondition.java new file mode 100644 index 000000000..f8791bdeb --- /dev/null +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/selenium/JQueryIdleCondition.java @@ -0,0 +1,18 @@ +package com.jgeppert.struts2.jquery.selenium; + +import org.openqa.selenium.support.ui.ExpectedCondition; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.WebDriver; + +public class JQueryIdleCondition implements ExpectedCondition{ + + @Override + public Boolean apply(final WebDriver driver) { + try { + return ((Long)((JavascriptExecutor)driver).executeScript("return jQuery.active") == 0); + } catch (final Exception e) { + return true; + } + } + +} From 9b7c52fa73c5a0a5f0687897971db009c1a475e7 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Sat, 24 Dec 2016 17:03:56 +0100 Subject: [PATCH 05/17] added .gitignore file and ignored target folder --- struts2-jquery-plugin-tests/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 struts2-jquery-plugin-tests/.gitignore diff --git a/struts2-jquery-plugin-tests/.gitignore b/struts2-jquery-plugin-tests/.gitignore new file mode 100644 index 000000000..eb5a316cb --- /dev/null +++ b/struts2-jquery-plugin-tests/.gitignore @@ -0,0 +1 @@ +target From 862622b93c61896aab7d15e604dfb3ea2528861a Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Sat, 24 Dec 2016 17:37:32 +0100 Subject: [PATCH 06/17] added test for ajax link with multiple targets --- .../content/includes/a/multiple-targets.jsp | 11 ++++++ .../content/loadatonce/a/multiple-targets.jsp | 12 ++++++ .../loadfromgoogle/a/multiple-targets.jsp | 12 ++++++ .../content/regular/a/multiple-targets.jsp | 12 ++++++ .../uncompressed/a/multiple-targets.jsp | 12 ++++++ .../com/jgeppert/struts2/jquery/a/ATagIT.java | 38 +++++++++++++++---- 6 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp new file mode 100644 index 000000000..0b7ca651b --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp @@ -0,0 +1,11 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + +
Div 1
+
Div 2
+ + Run AJAX action + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp new file mode 100644 index 000000000..ecbed4cdd --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp new file mode 100644 index 000000000..72a2411b0 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp new file mode 100644 index 000000000..65c5ca523 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp new file mode 100644 index 000000000..3ddde8274 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java index c07cdbbd2..81738e535 100644 --- a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java @@ -22,15 +22,15 @@ public class ATagIT { public static Collection data() { return Arrays.asList(new Object[][] { { "http://localhost:8080/regular" }, - { "http://localhost:8080/uncompressed" }, - { "http://localhost:8080/loadatonce" }, - { "http://localhost:8080/loadfromgoogle" } + { "http://localhost:8080/uncompressed" }, + { "http://localhost:8080/loadatonce" }, + { "http://localhost:8080/loadfromgoogle" } }); } private static JQueryIdleCondition jQueryIdle = new JQueryIdleCondition(); - private String baseUrl; + private String baseUrl; public ATagIT(final String baseUrl) { this.baseUrl = baseUrl; @@ -42,12 +42,36 @@ public void testSimpleAjaxPageLink() throws Exception{ WebDriverWait wait = new WebDriverWait(driver, 30); driver.get(baseUrl + "/a/simple-ajax-link.action"); - Assert.assertEquals("Click on the link bellow.", driver.findElement(By.id("result")).getText()); - driver.findElement(By.id("ajaxlink")).click(); + WebElement resultDiv = driver.findElement(By.id("result")); + WebElement ajaxlink = driver.findElement(By.id("ajaxlink")); + + Assert.assertEquals("Click on the link bellow.", resultDiv.getText()); + ajaxlink.click(); wait.until(jQueryIdle); - Assert.assertEquals("This is simple text from an ajax call.", driver.findElement(By.id("result")).getText()); + Assert.assertEquals("This is simple text from an ajax call.", resultDiv.getText()); + } + + @Test + public void testMultipleTargets() { + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/a/multiple-targets.action"); + WebElement div1 = driver.findElement(By.id("div1")); + WebElement div2 = driver.findElement(By.id("div2")); + WebElement ajaxLink = driver.findElement(By.id("ajaxlink")); + + Assert.assertEquals("Div 1", div1.getText()); + Assert.assertEquals("Div 2", div2.getText()); + + ajaxLink.click(); + + wait.until(jQueryIdle); + + Assert.assertEquals("This is simple text from an ajax call.", div1.getText()); + Assert.assertEquals("This is simple text from an ajax call.", div2.getText()); } } From 48a01136212359baf8fe0a73bdb1cb45caf9f523 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Sun, 25 Dec 2016 10:57:23 +0100 Subject: [PATCH 07/17] added test for sj:a form submit --- struts2-jquery-plugin-tests/pom.xml | 13 +++++++ .../jgeppert/jquery/actions/EchoAction.java | 13 +++++++ .../src/main/webapp/WEB-INF/content/echo.jsp | 2 + .../content/includes/a/form-submit.jsp | 13 +++++++ .../content/loadatonce/a/form-submit.jsp | 12 ++++++ .../content/loadfromgoogle/a/form-submit.jsp | 12 ++++++ .../WEB-INF/content/regular/a/form-submit.jsp | 12 ++++++ .../content/uncompressed/a/form-submit.jsp | 12 ++++++ .../{struts2 => }/jquery/a/ATagIT.java | 37 +++++++++++++++++-- .../jquery/selenium/JQueryIdleCondition.java | 0 10 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/echo.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp rename struts2-jquery-plugin-tests/src/test/java/com/jgeppert/{struts2 => }/jquery/a/ATagIT.java (64%) rename struts2-jquery-plugin-tests/src/test/java/com/jgeppert/{struts2 => }/jquery/selenium/JQueryIdleCondition.java (100%) diff --git a/struts2-jquery-plugin-tests/pom.xml b/struts2-jquery-plugin-tests/pom.xml index 7181a2dc3..99954d7c1 100644 --- a/struts2-jquery-plugin-tests/pom.xml +++ b/struts2-jquery-plugin-tests/pom.xml @@ -24,6 +24,7 @@ 4.12 3.0.1 2.23 + 1.16.2
@@ -121,6 +122,10 @@ org.seleniumhq.selenium htmlunit-driver + + org.projectlombok + lombok + @@ -157,6 +162,14 @@ ${htmlunit-driver.version} test + + + org.projectlombok + lombok + ${lombok.version} + provided + + diff --git a/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java b/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java new file mode 100644 index 000000000..6102abe13 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java @@ -0,0 +1,13 @@ +package com.jgeppert.jquery.actions; + +import com.opensymphony.xwork2.ActionSupport; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class EchoAction extends ActionSupport { + private String echo; + private boolean escape = true; +} diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/echo.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/echo.jsp new file mode 100644 index 000000000..f598c6ee5 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/echo.jsp @@ -0,0 +1,2 @@ +<%@ taglib prefix="s" uri="/struts-tags"%> +

Echo :

diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp new file mode 100644 index 000000000..08e9ee1c9 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp @@ -0,0 +1,13 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + +
formResult div
+ + + Echo + + + + Submit form + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp new file mode 100644 index 000000000..4abdfc85d --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp new file mode 100644 index 000000000..938b44811 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp new file mode 100644 index 000000000..977ca37f4 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp new file mode 100644 index 000000000..0383f361e --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java similarity index 64% rename from struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java rename to struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java index 81738e535..05fbb24ae 100644 --- a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/a/ATagIT.java +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java @@ -28,7 +28,7 @@ public static Collection data() { }); } - private static JQueryIdleCondition jQueryIdle = new JQueryIdleCondition(); + private static final JQueryIdleCondition JQUERY_IDLE = new JQueryIdleCondition(); private String baseUrl; @@ -37,7 +37,7 @@ public ATagIT(final String baseUrl) { } @Test - public void testSimpleAjaxPageLink() throws Exception{ + public void testSimpleAjaxPageLink() { WebDriver driver = new HtmlUnitDriver(true); WebDriverWait wait = new WebDriverWait(driver, 30); @@ -48,7 +48,7 @@ public void testSimpleAjaxPageLink() throws Exception{ Assert.assertEquals("Click on the link bellow.", resultDiv.getText()); ajaxlink.click(); - wait.until(jQueryIdle); + wait.until(JQUERY_IDLE); Assert.assertEquals("This is simple text from an ajax call.", resultDiv.getText()); } @@ -68,10 +68,39 @@ public void testMultipleTargets() { ajaxLink.click(); - wait.until(jQueryIdle); + wait.until(JQUERY_IDLE); Assert.assertEquals("This is simple text from an ajax call.", div1.getText()); Assert.assertEquals("This is simple text from an ajax call.", div2.getText()); } + + @Test + public void testFormSubmit() { + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/a/form-submit.action"); + WebElement formResult = driver.findElement(By.id("formResult")); + WebElement echoInput = driver.findElement(By.id("echo")); + WebElement ajaxFormLink = driver.findElement(By.id("ajaxformlink")); + + Assert.assertEquals("formResult div", formResult.getText()); + Assert.assertEquals("something to echo", echoInput.getAttribute("value")); + + ajaxFormLink.click(); + + wait.until(JQUERY_IDLE); + + Assert.assertEquals("Echo : something to echo", formResult.getText()); + Assert.assertEquals("", echoInput.getAttribute("value")); + + echoInput.sendKeys("userinput to echo"); + ajaxFormLink.click(); + + wait.until(JQUERY_IDLE); + + Assert.assertEquals("Echo : userinput to echo", formResult.getText()); + Assert.assertEquals("", echoInput.getAttribute("value")); + } } diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/selenium/JQueryIdleCondition.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java similarity index 100% rename from struts2-jquery-plugin-tests/src/test/java/com/jgeppert/struts2/jquery/selenium/JQueryIdleCondition.java rename to struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java From d30480ce16671a2937c000707ea0c1d8ab2e89ad Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Sun, 25 Dec 2016 18:38:01 +0100 Subject: [PATCH 08/17] added test for sj:a with events --- .../WEB-INF/content/includes/a/events.jsp | 20 +++++++++++ .../WEB-INF/content/loadatonce/a/events.jsp | 12 +++++++ .../content/loadfromgoogle/a/events.jsp | 12 +++++++ .../WEB-INF/content/regular/a/events.jsp | 12 +++++++ .../WEB-INF/content/uncompressed/a/events.jsp | 12 +++++++ .../java/com/jgeppert/jquery/a/ATagIT.java | 34 +++++++++++++++++++ 6 files changed, 102 insertions(+) create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp new file mode 100644 index 000000000..0ce8deb76 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp @@ -0,0 +1,20 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + +
result div
+ + Run AJAX action + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp new file mode 100644 index 000000000..9186126b6 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp new file mode 100644 index 000000000..b2ba3de57 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp new file mode 100644 index 000000000..3ac2374fa --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp new file mode 100644 index 000000000..b311aa33b --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java index 05fbb24ae..3e6fa6ec5 100644 --- a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java @@ -10,10 +10,12 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; +import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.WebDriver; import org.openqa.selenium.htmlunit.HtmlUnitDriver; +import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; @RunWith(Parameterized.class) @@ -102,5 +104,37 @@ public void testFormSubmit() { Assert.assertEquals("Echo : userinput to echo", formResult.getText()); Assert.assertEquals("", echoInput.getAttribute("value")); } + + @Test + public void testEvents() { + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/a/events.action"); + WebElement result = driver.findElement(By.id("result")); + WebElement ajaxLink = driver.findElement(By.id("ajaxlink")); + + Assert.assertEquals("result div", result.getText()); + + ajaxLink.click(); + + wait.until(JQUERY_IDLE); + wait.until(ExpectedConditions.alertIsPresent()); + Alert alert = driver.switchTo().alert(); + + Assert.assertEquals("ajax link clicked", alert.getText()); + + alert.accept(); + + wait.until(JQUERY_IDLE); + wait.until(ExpectedConditions.alertIsPresent()); + alert = driver.switchTo().alert(); + + Assert.assertEquals("ajax link complete", alert.getText()); + + alert.accept(); + + Assert.assertEquals("This is simple text from an ajax call.", result.getText()); + } } From aa88b0e35e576c78eb63b342fc60d9406fc7fb0f Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Mon, 26 Dec 2016 20:22:01 +0100 Subject: [PATCH 09/17] added test for sj:a with json results --- struts2-jquery-plugin-tests/pom.xml | 11 ++++++++ .../actions/ajax/LettersJsonAction.java | 25 +++++++++++++++++++ .../content/includes/a/json-result.jsp | 20 +++++++++++++++ .../content/loadatonce/a/json-result.jsp | 12 +++++++++ .../content/loadfromgoogle/a/json-result.jsp | 12 +++++++++ .../WEB-INF/content/regular/a/json-result.jsp | 12 +++++++++ .../content/uncompressed/a/json-result.jsp | 12 +++++++++ .../java/com/jgeppert/jquery/a/ATagIT.java | 23 +++++++++++++++++ 8 files changed, 127 insertions(+) create mode 100644 struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp diff --git a/struts2-jquery-plugin-tests/pom.xml b/struts2-jquery-plugin-tests/pom.xml index 99954d7c1..5a1aad6de 100644 --- a/struts2-jquery-plugin-tests/pom.xml +++ b/struts2-jquery-plugin-tests/pom.xml @@ -108,6 +108,11 @@ struts2-jquery-plugin + + org.apache.struts + struts2-json-plugin + + junit junit @@ -142,6 +147,12 @@ ${project.version} + + org.apache.struts + struts2-json-plugin + ${struts2.version} + + junit junit diff --git a/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java b/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java new file mode 100644 index 000000000..2adfab9c1 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java @@ -0,0 +1,25 @@ +package com.jgeppert.jquery.actions.ajax; + +import com.opensymphony.xwork2.ActionSupport; + +import org.apache.struts2.convention.annotation.Action; +import org.apache.struts2.convention.annotation.ParentPackage; +import org.apache.struts2.convention.annotation.Result; + +@ParentPackage("json-default") +@Action(value="/ajax/letters", results = {@Result(type="json", name="success", params= {"root", "letters"})}) +public class LettersJsonAction extends ActionSupport { + private static final char[] LETTERS; + + static { + LETTERS = new char[26]; + for (int i = 0; i < 26; i++) { + LETTERS[i] = (char)('a' + (char)i); + } + } + + public char[] getLetters() { + return LETTERS; + } +} + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp new file mode 100644 index 000000000..8957dcafb --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp @@ -0,0 +1,20 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + +
result div
+ + Run AJAX action + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp new file mode 100644 index 000000000..8fc76c6fd --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp new file mode 100644 index 000000000..e1800f16b --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp new file mode 100644 index 000000000..d73ffc6e5 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp new file mode 100644 index 000000000..42fc5b633 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java index 3e6fa6ec5..2c2d2f7f9 100644 --- a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java @@ -4,6 +4,7 @@ import java.util.Arrays; import java.util.Collection; +import java.util.List; import org.junit.Assert; import org.junit.Test; @@ -136,5 +137,27 @@ public void testEvents() { Assert.assertEquals("This is simple text from an ajax call.", result.getText()); } + + @Test + public void testJsonResult() { + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/a/json-result.action"); + WebElement result = driver.findElement(By.id("result")); + WebElement ajaxJsonLink = driver.findElement(By.id("ajaxjsonlink")); + + Assert.assertEquals("result div", result.getText()); + + ajaxJsonLink.click(); + wait.until(JQUERY_IDLE); + + WebElement lettersList = result.findElement(By.id("lettersList")); + List listItems = lettersList.findElements(By.tagName("li")); + + Assert.assertEquals(26, listItems.size()); + Assert.assertEquals("a", listItems.get(0).getText()); + Assert.assertEquals("z", listItems.get(25).getText()); + } } From 42650d3b15cf4c72fd87d9fd399b40e7fe4985ad Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Tue, 27 Dec 2016 21:03:07 +0100 Subject: [PATCH 10/17] added test for simple sj:div ajax div --- .../WEB-INF/content/includes/div/ajax-div.jsp | 6 ++ .../content/loadatonce/div/ajax-div.jsp | 12 ++++ .../content/loadfromgoogle/div/ajax-div.jsp | 12 ++++ .../WEB-INF/content/regular/div/ajax-div.jsp | 12 ++++ .../content/uncompressed/div/ajax-div.jsp | 12 ++++ .../com/jgeppert/jquery/div/DivTagIT.java | 55 +++++++++++++++++++ 6 files changed, 109 insertions(+) create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp create mode 100644 struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp new file mode 100644 index 000000000..8d74cc4f4 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp @@ -0,0 +1,6 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp new file mode 100644 index 000000000..3457ddadb --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp new file mode 100644 index 000000000..42eb64165 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp new file mode 100644 index 000000000..7c104fc9d --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp new file mode 100644 index 000000000..742cb56a0 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java new file mode 100644 index 000000000..6e2a9ff4c --- /dev/null +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java @@ -0,0 +1,55 @@ +package com.jgeppert.struts2.jquery.div; + +import com.jgeppert.struts2.jquery.selenium.JQueryIdleCondition; + +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import org.openqa.selenium.Alert; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; + +@RunWith(Parameterized.class) +public class DivTagIT { + @Parameterized.Parameters + public static Collection data() { + return Arrays.asList(new Object[][] { + { "http://localhost:8080/regular" }, + { "http://localhost:8080/uncompressed" }, + { "http://localhost:8080/loadatonce" }, + { "http://localhost:8080/loadfromgoogle" } + }); + } + + private static final JQueryIdleCondition JQUERY_IDLE = new JQueryIdleCondition(); + + private String baseUrl; + + public DivTagIT(final String baseUrl) { + this.baseUrl = baseUrl; + } + + @Test + public void testAjaxDiv() { + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/div/ajax-div.action"); + WebElement ajaxDiv = driver.findElement(By.id("ajaxdiv")); + + wait.until(JQUERY_IDLE); + + Assert.assertEquals("This is simple text from an ajax call.", ajaxDiv.getText()); + } +} + From b19b144d0369af2ddb14b5840d857917a600acd4 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Tue, 27 Dec 2016 21:40:26 +0100 Subject: [PATCH 11/17] added test for sj:div with events --- .../WEB-INF/content/includes/div/events.jsp | 16 +++++++++++ .../WEB-INF/content/loadatonce/div/events.jsp | 12 +++++++++ .../content/loadfromgoogle/div/events.jsp | 12 +++++++++ .../WEB-INF/content/regular/div/events.jsp | 12 +++++++++ .../content/uncompressed/div/events.jsp | 12 +++++++++ .../com/jgeppert/jquery/div/DivTagIT.java | 27 +++++++++++++++++++ 6 files changed, 91 insertions(+) create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp new file mode 100644 index 000000000..71328c049 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp @@ -0,0 +1,16 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp new file mode 100644 index 000000000..e9d70d1bf --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp new file mode 100644 index 000000000..5a12390d1 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp new file mode 100644 index 000000000..d4cab2bcd --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp new file mode 100644 index 000000000..7187009cf --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java index 6e2a9ff4c..97a6b9a42 100644 --- a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java @@ -51,5 +51,32 @@ public void testAjaxDiv() { Assert.assertEquals("This is simple text from an ajax call.", ajaxDiv.getText()); } + + @Test + public void testEvents() { + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/div/events.action"); + WebElement ajaxDiv = driver.findElement(By.id("ajaxdiv")); + + wait.until(JQUERY_IDLE); + wait.until(ExpectedConditions.alertIsPresent()); + Alert alert = driver.switchTo().alert(); + + Assert.assertEquals("Before div", alert.getText()); + + alert.accept(); + + wait.until(JQUERY_IDLE); + wait.until(ExpectedConditions.alertIsPresent()); + alert = driver.switchTo().alert(); + + Assert.assertEquals("Complete div", alert.getText()); + + alert.accept(); + + Assert.assertEquals("This is simple text from an ajax call.", ajaxDiv.getText()); + } } From 1c3f764f8e48248c4c06b8d5ecf7dcc1f45047e7 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Wed, 28 Dec 2016 19:46:39 +0100 Subject: [PATCH 12/17] added test for sj:div with listenTopics --- .../content/includes/div/listen-topics.jsp | 8 ++++++++ .../content/loadatonce/div/listen-topics.jsp | 12 ++++++++++++ .../loadfromgoogle/div/listen-topics.jsp | 12 ++++++++++++ .../content/regular/div/listen-topics.jsp | 12 ++++++++++++ .../content/uncompressed/div/listen-topics.jsp | 12 ++++++++++++ .../java/com/jgeppert/jquery/div/DivTagIT.java | 17 +++++++++++++++++ 6 files changed, 73 insertions(+) create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp create mode 100644 struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp new file mode 100644 index 000000000..74ad6377f --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp @@ -0,0 +1,8 @@ +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + +ajax div + +Click me! diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp new file mode 100644 index 000000000..2565cffe7 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp new file mode 100644 index 000000000..86506f1fb --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp new file mode 100644 index 000000000..837735a85 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp new file mode 100644 index 000000000..0b77443b4 --- /dev/null +++ b/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp @@ -0,0 +1,12 @@ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + + + + + + + + + diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java index 97a6b9a42..67fa833cb 100644 --- a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java +++ b/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java @@ -78,5 +78,22 @@ public void testEvents() { Assert.assertEquals("This is simple text from an ajax call.", ajaxDiv.getText()); } + + @Test + public void testListenTopics() { + WebDriver driver = new HtmlUnitDriver(true); + WebDriverWait wait = new WebDriverWait(driver, 30); + + driver.get(baseUrl + "/div/listen-topics.action"); + WebElement ajaxDiv = driver.findElement(By.id("ajaxdiv")); + WebElement topicsLink = driver.findElement(By.id("topicslink")); + + Assert.assertEquals("ajax div", ajaxDiv.getText()); + + topicsLink.click(); + wait.until(JQUERY_IDLE); + + Assert.assertEquals("This is simple text from an ajax call.", ajaxDiv.getText()); + } } From 3385c72a25518a6e1afab7eb5a14a7f142d35d7e Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Thu, 29 Dec 2016 18:26:23 +0100 Subject: [PATCH 13/17] renamed module struts2-jquery-plugin-tests to struts2-jquery-integration-tests --- pom.xml | 2 +- .../.gitignore | 0 .../pom.xml | 2 +- .../src/main/java/com/jgeppert/jquery/actions/EchoAction.java | 0 .../com/jgeppert/jquery/actions/ajax/LettersJsonAction.java | 0 .../src/main/webapp/WEB-INF/content/ajax/simple-text.jsp | 0 .../src/main/webapp/WEB-INF/content/echo.jsp | 0 .../src/main/webapp/WEB-INF/content/includes/a/events.jsp | 0 .../src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp | 0 .../src/main/webapp/WEB-INF/content/includes/a/json-result.jsp | 0 .../main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp | 0 .../main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp | 0 .../src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp | 0 .../src/main/webapp/WEB-INF/content/includes/div/events.jsp | 0 .../main/webapp/WEB-INF/content/includes/div/listen-topics.jsp | 0 .../src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp | 0 .../main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp | 0 .../main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp | 0 .../webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp | 0 .../webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp | 0 .../src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp | 0 .../src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp | 0 .../webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp | 0 .../src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp | 0 .../webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp | 0 .../webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp | 0 .../WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp | 0 .../WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp | 0 .../main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp | 0 .../main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp | 0 .../webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp | 0 .../src/main/webapp/WEB-INF/content/regular/a/events.jsp | 0 .../src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp | 0 .../src/main/webapp/WEB-INF/content/regular/a/json-result.jsp | 0 .../main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp | 0 .../main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp | 0 .../src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp | 0 .../src/main/webapp/WEB-INF/content/regular/div/events.jsp | 0 .../main/webapp/WEB-INF/content/regular/div/listen-topics.jsp | 0 .../src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp | 0 .../main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp | 0 .../main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp | 0 .../webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp | 0 .../webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp | 0 .../main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp | 0 .../src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp | 0 .../webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../src/test/java/com/jgeppert/jquery/a/ATagIT.java | 0 .../src/test/java/com/jgeppert/jquery/div/DivTagIT.java | 0 .../java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java | 0 51 files changed, 2 insertions(+), 2 deletions(-) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/.gitignore (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/pom.xml (99%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/java/com/jgeppert/jquery/actions/EchoAction.java (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/echo.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/a/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/div/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/a/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/div/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/main/webapp/WEB-INF/web.xml (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/test/java/com/jgeppert/jquery/a/ATagIT.java (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/test/java/com/jgeppert/jquery/div/DivTagIT.java (100%) rename {struts2-jquery-plugin-tests => struts2-jquery-integration-tests}/src/test/java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java (100%) diff --git a/pom.xml b/pom.xml index 8b5e8c836..0be8d8a49 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ struts2-jquery-grid-showcase struts2-jquery-mobile-showcase struts2-jquery-archetypes - struts2-jquery-plugin-tests + struts2-jquery-integration-tests diff --git a/struts2-jquery-plugin-tests/.gitignore b/struts2-jquery-integration-tests/.gitignore similarity index 100% rename from struts2-jquery-plugin-tests/.gitignore rename to struts2-jquery-integration-tests/.gitignore diff --git a/struts2-jquery-plugin-tests/pom.xml b/struts2-jquery-integration-tests/pom.xml similarity index 99% rename from struts2-jquery-plugin-tests/pom.xml rename to struts2-jquery-integration-tests/pom.xml index 5a1aad6de..5aa0f0ed3 100644 --- a/struts2-jquery-plugin-tests/pom.xml +++ b/struts2-jquery-integration-tests/pom.xml @@ -7,7 +7,7 @@ struts2-jquery 4.0.2-SNAPSHOT - struts2-jquery-plugin-tests + struts2-jquery-integration-tests tests for the struts2-jquery-plugin war diff --git a/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java b/struts2-jquery-integration-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java similarity index 100% rename from struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java rename to struts2-jquery-integration-tests/src/main/java/com/jgeppert/jquery/actions/EchoAction.java diff --git a/struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java b/struts2-jquery-integration-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java similarity index 100% rename from struts2-jquery-plugin-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java rename to struts2-jquery-integration-tests/src/main/java/com/jgeppert/jquery/actions/ajax/LettersJsonAction.java diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/ajax/simple-text.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/echo.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/echo.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/echo.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/echo.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/form-submit.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/json-result.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/multiple-targets.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/a/simple-ajax-link.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/div/ajax-div.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/div/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/includes/div/listen-topics.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/form-submit.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/json-result.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/multiple-targets.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/a/simple-ajax-link.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/div/ajax-div.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/div/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadatonce/div/listen-topics.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/form-submit.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/json-result.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/multiple-targets.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/a/simple-ajax-link.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/ajax-div.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/loadfromgoogle/div/listen-topics.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/form-submit.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/json-result.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/multiple-targets.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/a/simple-ajax-link.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/div/ajax-div.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/div/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/regular/div/listen-topics.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/form-submit.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/json-result.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/multiple-targets.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/a/simple-ajax-link.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/div/ajax-div.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/div/events.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/content/uncompressed/div/listen-topics.jsp diff --git a/struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/web.xml b/struts2-jquery-integration-tests/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from struts2-jquery-plugin-tests/src/main/webapp/WEB-INF/web.xml rename to struts2-jquery-integration-tests/src/main/webapp/WEB-INF/web.xml diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java b/struts2-jquery-integration-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java similarity index 100% rename from struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java rename to struts2-jquery-integration-tests/src/test/java/com/jgeppert/jquery/a/ATagIT.java diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java b/struts2-jquery-integration-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java similarity index 100% rename from struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java rename to struts2-jquery-integration-tests/src/test/java/com/jgeppert/jquery/div/DivTagIT.java diff --git a/struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java b/struts2-jquery-integration-tests/src/test/java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java similarity index 100% rename from struts2-jquery-plugin-tests/src/test/java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java rename to struts2-jquery-integration-tests/src/test/java/com/jgeppert/jquery/selenium/JQueryIdleCondition.java From 3bc96b1797e11b0a532258caf11b5c67baf2829c Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Thu, 29 Dec 2016 18:54:43 +0100 Subject: [PATCH 14/17] added Travis badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d44ef3107..8c2410dbb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Struts2 jQuery Plugin +[![Build Status](https://travis-ci.org/struts-community-plugins/struts2-jquery.svg?branch=master)](https://travis-ci.org/struts-community-plugins/struts2-jquery) + A Plugin for the popular java web framework struts2 to provide ajax functionality and UI Widgets based on the jQuery javascript framework. #### [Download] (https://oss.sonatype.org/content/groups/staging/com/jgeppert/struts2/jquery/) From 0044589d8da2343aa85ac8bde324ff4a350f977b Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Sat, 31 Dec 2016 08:03:37 +0100 Subject: [PATCH 15/17] switched monitored branch in the README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c2410dbb..dbd115fae 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Struts2 jQuery Plugin - -[![Build Status](https://travis-ci.org/struts-community-plugins/struts2-jquery.svg?branch=master)](https://travis-ci.org/struts-community-plugins/struts2-jquery) +## Build status: +* Branch `release/4.0.2`: [![Build Status](https://travis-ci.org/struts-community-plugins/struts2-jquery.svg?branch=release%2F4.0.2)](https://travis-ci.org/struts-community-plugins/struts2-jquery) A Plugin for the popular java web framework struts2 to provide ajax functionality and UI Widgets based on the jQuery javascript framework. From 2c576afd1bf4ec91df6b353da1f03c6df5ca15f8 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Sun, 8 Jan 2017 13:43:11 +0100 Subject: [PATCH 16/17] added Travis-CI status for branch release/4.0.3 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4256ba159..dfc975d7a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Struts2 jQuery Plugin ## Build status: +* Branch `release/4.0.3`: [![Build Status](https://travis-ci.org/struts-community-plugins/struts2-jquery.svg?branch=release%2F4.0.3)](https://travis-ci.org/struts-community-plugins/struts2-jquery) * Branch `release/4.0.2`: [![Build Status](https://travis-ci.org/struts-community-plugins/struts2-jquery.svg?branch=release%2F4.0.2)](https://travis-ci.org/struts-community-plugins/struts2-jquery) A Plugin for the popular java web framework struts2 to provide ajax functionality and UI Widgets based on the jQuery javascript framework. From 6bf7aa6ef43124c0e1746ce1b5d5545c1a41d104 Mon Sep 17 00:00:00 2001 From: Stefaan Dutry Date: Sun, 8 Jan 2017 13:59:06 +0100 Subject: [PATCH 17/17] update version to 4.0.3-SNAPSHOT --- pom.xml | 5 ++--- struts2-jquery-archetypes/pom.xml | 5 ++--- .../struts2-jquery-archetype-base/pom.xml | 5 ++--- .../struts2-jquery-archetype-mobile/pom.xml | 5 ++--- .../struts2-jquery-bootstrap-archetype-grid/pom.xml | 5 ++--- struts2-jquery-chart-plugin/pom.xml | 5 ++--- struts2-jquery-datatables-plugin/pom.xml | 5 ++--- struts2-jquery-grid-plugin/pom.xml | 5 ++--- struts2-jquery-grid-showcase/pom.xml | 5 ++--- struts2-jquery-integration-tests/pom.xml | 5 ++--- struts2-jquery-mobile-plugin/pom.xml | 5 ++--- struts2-jquery-mobile-showcase/pom.xml | 5 ++--- struts2-jquery-plugin/pom.xml | 5 ++--- struts2-jquery-richtext-plugin/pom.xml | 5 ++--- struts2-jquery-showcase/pom.xml | 5 ++--- struts2-jquery-tree-plugin/pom.xml | 5 ++--- 16 files changed, 32 insertions(+), 48 deletions(-) diff --git a/pom.xml b/pom.xml index 634f6640f..b2cb4bba2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,9 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT Struts 2 jQuery Plugin Parent Module pom https://github.com/struts-community-plugins/struts2-jquery diff --git a/struts2-jquery-archetypes/pom.xml b/struts2-jquery-archetypes/pom.xml index 92740e2f3..7c774da8d 100644 --- a/struts2-jquery-archetypes/pom.xml +++ b/struts2-jquery-archetypes/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT com.jgeppert.struts2.jquery struts2-jquery-archetypes diff --git a/struts2-jquery-archetypes/struts2-jquery-archetype-base/pom.xml b/struts2-jquery-archetypes/struts2-jquery-archetype-base/pom.xml index f11633ce1..4cff56515 100644 --- a/struts2-jquery-archetypes/struts2-jquery-archetype-base/pom.xml +++ b/struts2-jquery-archetypes/struts2-jquery-archetype-base/pom.xml @@ -1,9 +1,8 @@ - + com.jgeppert.struts2.jquery struts2-jquery-archetypes - 4.0.2 + 4.0.3-SNAPSHOT 4.0.0 diff --git a/struts2-jquery-archetypes/struts2-jquery-archetype-mobile/pom.xml b/struts2-jquery-archetypes/struts2-jquery-archetype-mobile/pom.xml index 7e8ff6908..255046123 100644 --- a/struts2-jquery-archetypes/struts2-jquery-archetype-mobile/pom.xml +++ b/struts2-jquery-archetypes/struts2-jquery-archetype-mobile/pom.xml @@ -1,9 +1,8 @@ - + com.jgeppert.struts2.jquery struts2-jquery-archetypes - 4.0.2 + 4.0.3-SNAPSHOT 4.0.0 diff --git a/struts2-jquery-archetypes/struts2-jquery-bootstrap-archetype-grid/pom.xml b/struts2-jquery-archetypes/struts2-jquery-bootstrap-archetype-grid/pom.xml index 9dd63c7fa..5efc6668a 100644 --- a/struts2-jquery-archetypes/struts2-jquery-bootstrap-archetype-grid/pom.xml +++ b/struts2-jquery-archetypes/struts2-jquery-bootstrap-archetype-grid/pom.xml @@ -1,9 +1,8 @@ - + com.jgeppert.struts2.jquery struts2-jquery-archetypes - 4.0.2 + 4.0.3-SNAPSHOT 4.0.0 diff --git a/struts2-jquery-chart-plugin/pom.xml b/struts2-jquery-chart-plugin/pom.xml index c9dfd37af..1d0b6e545 100644 --- a/struts2-jquery-chart-plugin/pom.xml +++ b/struts2-jquery-chart-plugin/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-chart-plugin Struts 2 jQuery Chart Plugin diff --git a/struts2-jquery-datatables-plugin/pom.xml b/struts2-jquery-datatables-plugin/pom.xml index 64f19ee4a..352dd9dce 100644 --- a/struts2-jquery-datatables-plugin/pom.xml +++ b/struts2-jquery-datatables-plugin/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-datatables-plugin Struts 2 jQuery DataTables Plugin diff --git a/struts2-jquery-grid-plugin/pom.xml b/struts2-jquery-grid-plugin/pom.xml index fc70ef1d1..82d3d5910 100644 --- a/struts2-jquery-grid-plugin/pom.xml +++ b/struts2-jquery-grid-plugin/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-grid-plugin Struts 2 jQuery Grid Plugin diff --git a/struts2-jquery-grid-showcase/pom.xml b/struts2-jquery-grid-showcase/pom.xml index c32c5e271..3a044e131 100644 --- a/struts2-jquery-grid-showcase/pom.xml +++ b/struts2-jquery-grid-showcase/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-grid-showcase Struts 2 jQuery Grid Showcase diff --git a/struts2-jquery-integration-tests/pom.xml b/struts2-jquery-integration-tests/pom.xml index 5aa0f0ed3..f6a416fe3 100644 --- a/struts2-jquery-integration-tests/pom.xml +++ b/struts2-jquery-integration-tests/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2-SNAPSHOT + 4.0.3-SNAPSHOT struts2-jquery-integration-tests tests for the struts2-jquery-plugin diff --git a/struts2-jquery-mobile-plugin/pom.xml b/struts2-jquery-mobile-plugin/pom.xml index 39a41fb5b..1f9e533c7 100644 --- a/struts2-jquery-mobile-plugin/pom.xml +++ b/struts2-jquery-mobile-plugin/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-mobile-plugin Struts 2 jQuery Mobile Plugin diff --git a/struts2-jquery-mobile-showcase/pom.xml b/struts2-jquery-mobile-showcase/pom.xml index 1477e7fe0..4116d92c2 100755 --- a/struts2-jquery-mobile-showcase/pom.xml +++ b/struts2-jquery-mobile-showcase/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-mobile-showcase Struts 2 jQuery Mobile Showcase diff --git a/struts2-jquery-plugin/pom.xml b/struts2-jquery-plugin/pom.xml index 0e8d08cc7..cd224ee75 100644 --- a/struts2-jquery-plugin/pom.xml +++ b/struts2-jquery-plugin/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-plugin Struts 2 jQuery Plugin diff --git a/struts2-jquery-richtext-plugin/pom.xml b/struts2-jquery-richtext-plugin/pom.xml index 71e5642b9..1f2e791eb 100644 --- a/struts2-jquery-richtext-plugin/pom.xml +++ b/struts2-jquery-richtext-plugin/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-richtext-plugin Struts 2 jQuery Richtext Plugin diff --git a/struts2-jquery-showcase/pom.xml b/struts2-jquery-showcase/pom.xml index 87e1fb718..d32c6cefc 100644 --- a/struts2-jquery-showcase/pom.xml +++ b/struts2-jquery-showcase/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-showcase Struts 2 jQuery Showcase diff --git a/struts2-jquery-tree-plugin/pom.xml b/struts2-jquery-tree-plugin/pom.xml index 9a5678de4..6b19b95be 100755 --- a/struts2-jquery-tree-plugin/pom.xml +++ b/struts2-jquery-tree-plugin/pom.xml @@ -1,11 +1,10 @@ - + 4.0.0 com.jgeppert.struts2.jquery struts2-jquery - 4.0.2 + 4.0.3-SNAPSHOT struts2-jquery-tree-plugin Struts 2 jQuery Tree Plugin