Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Tapestry 5.6.3 and fix selenium tests #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>GOT5</name>
<url>https://github.com/got5</url>
</organization>
</organization>
<issueManagement>
<system>Github</system>
<url>http://github.com/got5</url>
<url>https://github.com/got5</url>
</issueManagement>
<scm>
<connection>scm:git:[email protected]:got5/tapestry5-jquery.git</connection>
Expand Down Expand Up @@ -81,7 +81,7 @@
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<artifactId>selenium-support</artifactId>
<version>${selenium-version}</version>
<scope>test</scope>
<exclusions>
Expand All @@ -97,9 +97,19 @@
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<artifactId>selenium-leg-rc</artifactId>
<version>${selenium-version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>jetty-websocket</artifactId>
<groupId>org.eclipse.jetty</groupId>
</exclusion>
<exclusion>
<artifactId>javax.servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down Expand Up @@ -147,8 +157,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>8</source>
<target>8</target>
<optimize>true</optimize>
</configuration>
</plugin>
Expand Down Expand Up @@ -274,7 +284,7 @@
<junitArtifactName>none:none</junitArtifactName>
<testNGArtifactName>org.testng:testng</testNGArtifactName>
<suiteXmlFiles>
<suiteXmlFile>target/test-classes/testng.xml</suiteXmlFile>
<suiteXmlFile>target/test-classes/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<excludes>
<exclude>**/*.groovy</exclude>
Expand All @@ -285,8 +295,8 @@
</configuration>
</execution>
</executions>
</plugin>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -344,7 +354,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugin>
</plugins>
</reporting>
<repositories>
Expand All @@ -356,7 +366,7 @@
<id>central</id>
<name>Maven Repository</name>
<layout>default</layout>
<url>http://central.maven.org/maven2/</url>
<url>https://repo1.maven.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
Expand All @@ -365,12 +375,12 @@
<pluginRepositories>
<pluginRepository>
<id>maven</id>
<url>http://central.maven.org/maven2/</url>
<url>https://repo1.maven.org/maven2/</url>
</pluginRepository>
<pluginRepository>
<id>spring-maven-release</id>
<name>Spring Maven Release Repository</name>
<url>http://maven.springframework.org/release</url>
<url>https://maven.springframework.org/release</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
Expand Down Expand Up @@ -432,8 +442,8 @@
</profiles>
<properties>
<spock-version>0.6-groovy-1.8</spock-version>
<tapestry-release-version>5.4.1</tapestry-release-version>
<selenium-version>2.35.0</selenium-version>
<tapestry-release-version>5.6.3</tapestry-release-version>
<selenium-version>3.12.0</selenium-version>
<browserStartCommand>*googlechrome</browserStartCommand>
<sourceDirectory>src/main/java</sourceDirectory>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class CustomDatepicker {

@Inject
@Symbol(JQuerySymbolConstants.SUPPRESS_PROTOTYPE)
private Boolean supressPrototype;
private Boolean suppressPrototype;

@Inject
private ThreadLocale locale;
Expand All @@ -85,7 +85,7 @@ public class CustomDatepicker {
* change the JSON option of the jQuery datepicker widget
*/
void afterRender() {
if (supressPrototype) {
if (suppressPrototype) {
/*
* If the selector parameter is not bound, we will use the clientId
* of the component using the mixin
Expand All @@ -101,7 +101,7 @@ void afterRender() {

JSONObject temp = widgetParams.paramsForWidget(this.getClass().getSimpleName().toLowerCase());
if(temp != null){
defaultParamsObject = temp;
defaultParamsObject = temp.copy();
}

defaultParamsObject.put("dateFormat", toJQueryUIDateFormat());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
@UsesMappedConfiguration(value = JSONObject.class)
public interface WidgetParams {

public abstract JSONObject paramsForWidget(String widget);
JSONObject paramsForWidget(String widget);

}
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/modules/tjq/PageScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define([ "t5/core/dom", "t5/core/zone", "t5/core/events", "tjq/vendor/components

this.disable = true;
scroller.addClass("scrollExtend-loading");
if (activeZone.length != 0) {
if (activeZone.length !== 0) {
this.disable = true;

activeZone.trigger(events.zone.refresh, {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/got5/tapestry5/jquery/AccordionTest.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.got5.tapestry5.jquery;

import org.apache.tapestry5.test.SeleniumTestCase;
import org.got5.tapestry5.jquery.test.SeleniumTestCase2;
import org.testng.annotations.Test;

import com.thoughtworks.selenium.Wait;

public class AccordionTest extends SeleniumTestCase{
public class AccordionTest extends SeleniumTestCase2{

@Test
public void testAccordion()
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/got5/tapestry5/jquery/AjaxFormLoopTest.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.got5.tapestry5.jquery;

import org.apache.tapestry5.test.SeleniumTestCase;
import org.got5.tapestry5.jquery.test.SeleniumTestCase2;
import org.testng.annotations.Test;

import com.thoughtworks.selenium.Wait;

public class AjaxFormLoopTest extends SeleniumTestCase{
public class AjaxFormLoopTest extends SeleniumTestCase2{

@Test
public void testAjaxFormLoop(){
Expand Down
16 changes: 7 additions & 9 deletions src/test/java/org/got5/tapestry5/jquery/AutocompleteTest.java
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
package org.got5.tapestry5.jquery;

import org.apache.tapestry5.test.SeleniumTestCase;
import org.testng.annotations.Test;

import com.thoughtworks.selenium.Wait;
import org.got5.tapestry5.jquery.test.SeleniumTestCase2;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.Test;

public class AutocompleteTest extends SeleniumTestCase{
public class AutocompleteTest extends SeleniumTestCase2{

@Test
public void testAutoComplete()
{
open("/ext/jqueryautocomplete");
waitForPageToLoad();

focus("identifier=foo");
type("identifier=foo", "abcdeff");
keyDown("identifier=foo", "e");
keyUp("identifier=foo", "e");
fireEvent("identifier=foo", "keydown");
focus("id=foo");
type("id=foo", "abcdeff");
new Actions(webDriver).sendKeys("e").perform();

new Wait()
{
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/got5/tapestry5/jquery/BindTest.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.got5.tapestry5.jquery;

import org.apache.tapestry5.test.SeleniumTestCase;
import org.got5.tapestry5.jquery.test.SeleniumTestCase2;
import org.testng.annotations.Test;

import com.thoughtworks.selenium.Wait;

public class BindTest extends SeleniumTestCase{
public class BindTest extends SeleniumTestCase2{

@Test
public void testBind(){
Expand All @@ -31,7 +31,7 @@ public boolean until()
}
}.wait("element not found", JQueryTestConstants.TIMEOUT);

assertEquals(getText("identifier=clickZone"), "click OK");
assertEquals(getText("id=clickZone"), "click OK");
}

}
4 changes: 2 additions & 2 deletions src/test/java/org/got5/tapestry5/jquery/ButtonTest.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.got5.tapestry5.jquery;

import org.apache.tapestry5.test.SeleniumTestCase;
import org.got5.tapestry5.jquery.test.SeleniumTestCase2;
import org.testng.annotations.Test;

import com.thoughtworks.selenium.Wait;

public class ButtonTest extends SeleniumTestCase{
public class ButtonTest extends SeleniumTestCase2{
@Test
public void testButtonMixin(){

Expand Down
Loading