Seam SVN: r13244 - in branches/enterprise/JBPAPP_4_3_FP01/src: test/integration/src/org/jboss/seam/test/integration and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-06-18 08:45:50 -0400 (Fri, 18 Jun 2010)
New Revision: 13244
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/contexts/ServerConversationContext.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java
Log:
JBPAPP-4492 - fixed integration tests with old hack
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/contexts/ServerConversationContext.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/contexts/ServerConversationContext.java 2010-06-18 12:20:30 UTC (rev 13243)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/contexts/ServerConversationContext.java 2010-06-18 12:45:50 UTC (rev 13244)
@@ -18,6 +18,7 @@
import org.jboss.seam.Seam;
import org.jboss.seam.core.Events;
import org.jboss.seam.core.Manager;
+import org.jboss.seam.persistence.PersistenceContexts;
/**
* A conversation context is a logical context that lasts longer than
@@ -288,23 +289,18 @@
session.remove(getKey(name));
}
removals.clear();
+ // TODO this is a hack! We should find a more elegant way of handling
+ // new objects being added to additions during the following for-loop
+ PersistenceContexts.instance();
+
//add new objects
- while (!additions.isEmpty())
- {
- // Copy the additions entries to a temporary variable, then
- // clear additions - during passivation, further attributes may
- // be set in the conversation context so we need to re-iterate
- // through this process until all additions are passivated
- Set<Map.Entry<String,Object>> entries = new HashSet<Map.Entry<String,Object>>(additions.entrySet());
- additions.clear();
-
- for (Map.Entry<String, Object> entry: entries)
- {
- Object attribute = entry.getValue();
- passivate(attribute);
- session.put(getKey(entry.getKey()), attribute);
- }
+ for (Map.Entry<String, Object> entry: additions.entrySet()) {
+ Object attribute = entry.getValue();
+
+ passivate(attribute);
+ session.put(getKey(entry.getKey()), attribute);
}
+ additions.clear();
}
else
{
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java 2010-06-18 12:20:30 UTC (rev 13243)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/integration/src/org/jboss/seam/test/integration/EntityPassivationTest.java 2010-06-18 12:45:50 UTC (rev 13244)
@@ -1,5 +1,6 @@
package org.jboss.seam.test.integration;
+import java.io.Serializable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -95,7 +96,7 @@
@Name("entitytest.someComponent")
@Scope(ScopeType.CONVERSATION)
@AutoCreate
- public static class SomeComponent {
+ public static class SomeComponent implements Serializable{
@In EntityManager entityManager;
15 years, 6 months
Seam SVN: r13243 - branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2010-06-18 08:20:30 -0400 (Fri, 18 Jun 2010)
New Revision: 13243
Modified:
branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/SecurityTest.java
Log:
Comment out testcase for JBSEAM-4542
Modified: branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/SecurityTest.java
===================================================================
--- branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/SecurityTest.java 2010-06-18 11:04:43 UTC (rev 13242)
+++ branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/SecurityTest.java 2010-06-18 12:20:30 UTC (rev 13243)
@@ -184,7 +184,7 @@
}.run();
}
- @Test
+ // @Test
// JBPAPP-3713
public void synchronizationsLookup() throws Exception
{
15 years, 6 months
Seam SVN: r13242 - branches/enterprise/JBPAPP_5_0/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-06-18 07:04:43 -0400 (Fri, 18 Jun 2010)
New Revision: 13242
Modified:
branches/enterprise/JBPAPP_5_0/build/root.pom.xml
Log:
cleared repository infos, don't duplicate this if it is in settings.xml
Modified: branches/enterprise/JBPAPP_5_0/build/root.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2010-06-18 11:02:39 UTC (rev 13241)
+++ branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2010-06-18 11:04:43 UTC (rev 13242)
@@ -8,42 +8,18 @@
<version>@seam.version@</version>
<name>JBoss Seam</name>
<packaging>pom</packaging>
- <pluginRepositories>
- <pluginRepository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
- <pluginRepository>
- <snapshots />
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>http://snapshots.jboss.org/maven2</url>
- </pluginRepository>
- <pluginRepository>
- <id>maven_eap5</id>
- <name>EAP5 Central Repository</name>
- <url>http://repository.jboss.org/maven2-brew</url>
- </pluginRepository>
- </pluginRepositories>
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <snapshots />
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>http://snapshots.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>maven_eap5</id>
- <name>EAP5 Central Repository</name>
- <url>http://repository.jboss.org/maven2-brew</url>
- </repository>
- </repositories>
+<!-- <pluginRepositories>-->
+<!-- <pluginRepository>-->
+<!-- <id>repository.jboss.org</id>-->
+<!-- <name>JBoss Repository</name>-->
+<!-- <url>http://repository.jboss.org/maven2</url>-->
+<!-- </pluginRepository>-->
+<!-- <pluginRepository>-->
+<!-- <id>maven_eap5</id>-->
+<!-- <name>EAP5 Central Repository</name>-->
+<!-- <url>http://repository.jboss.org/maven2-brew</url>-->
+<!-- </pluginRepository>-->
+<!-- </pluginRepositories>-->
<!-- Externalize some version numbers here -->
<properties>
15 years, 6 months
Seam SVN: r13241 - branches/enterprise/JBPAPP_5_0/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-06-18 07:02:39 -0400 (Fri, 18 Jun 2010)
New Revision: 13241
Modified:
branches/enterprise/JBPAPP_5_0/build/resteasy.pom.xml
Log:
fixed testng dependency - we use jdk15 jar
Modified: branches/enterprise/JBPAPP_5_0/build/resteasy.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/resteasy.pom.xml 2010-06-18 10:05:08 UTC (rev 13240)
+++ branches/enterprise/JBPAPP_5_0/build/resteasy.pom.xml 2010-06-18 11:02:39 UTC (rev 13241)
@@ -69,6 +69,7 @@
<artifactId>testng</artifactId>
<version>${version.testng}</version>
<scope>test</scope>
+ <classifier>jdk15</classifier>
<exclusions>
<exclusion>
<groupId>junit</groupId>
15 years, 6 months
Seam SVN: r13240 - in branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking: src/org/jboss/seam/example/nestedbooking/test/selenium and 1 other directory.
by seam-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-06-18 06:05:08 -0400 (Fri, 18 Jun 2010)
New Revision: 13240
Added:
branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
Modified:
branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/jboss5.xml
branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
Log:
JBPAPP-4500, backport of functional test for nested booking - nested conversations
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/jboss5.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/jboss5.xml 2010-06-18 08:28:41 UTC (rev 13239)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/jboss5.xml 2010-06-18 10:05:08 UTC (rev 13240)
@@ -28,7 +28,9 @@
<class
name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
<class
- name="org.jboss.seam.example.nestedbooking.test.selenium.NestedSimpleBookingTest"></class>
+ name="org.jboss.seam.example.nestedbooking.test.selenium.NestedSimpleBookingTest" />
+ <class
+ name="org.jboss.seam.example.nestedbooking.test.selenium.NestedConversationTest" />
</classes>
</test>
</suite>
\ No newline at end of file
Added: branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 10:05:08 UTC (rev 13240)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.nestedbooking.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.fail;
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.jboss.seam.example.common.test.selenium.SeamSelenium;
+import org.jboss.seam.example.common.test.booking.selenium.SeleniumBookingTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * This class tests only nested conversations.
+ *
+ * @author mgencur
+ */
+public class NestedConversationTest extends SeamSeleniumTest
+{
+
+ protected final int timeout = 5000;
+ protected final String CREDIT_CARD = "0123456789012345";
+ protected final String CREDIT_CARD_NAME = "visa";
+
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ }
+
+ @AfterMethod
+ public void tearDown()
+ {
+ super.tearDown();
+ }
+
+ @Test
+ public void nestedConversationTest()
+ {
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ pause(timeout);
+ browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "0");
+ pause(timeout);
+ browser.selectWindow("0");
+ login("demo", "demo");
+ SeleniumBookingTest t = new SeleniumBookingTest();
+ t.enterSearchQuery("W Hotel");
+ browser.click(getProperty("SEARCH_RESULT_TABLE_SECOND_ROW_LINK"));
+ pause(timeout);
+
+ //open the url in a second window
+ String url = browser.getLocation();
+ browser.openWindow(url, "1");
+
+ //go next to confirm button in browser 1
+ browser.selectWindow("0");
+ browser.clickAndWait(getProperty("BOOKING_BOOK"));
+ browser.clickAndWait(getProperty("SELECT_ROOM_BUTTON"));
+ browser.clickAndWait(getProperty("SELECT_WONDERFUL_ROOM"));
+ browser.type(getProperty("PAYMENT_CREDIT_CARD"), CREDIT_CARD);
+ browser.type(getProperty("PAYMENT_CREDIT_CARD_NAME"), CREDIT_CARD_NAME);
+ browser.click(getProperty("PAYMENT_PROCEED"));
+
+ //go next to confirm button in browser 2
+ browser.selectWindow("1");
+ browser.clickAndWait(getProperty("BOOKING_BOOK"));
+ browser.clickAndWait(getProperty("SELECT_ROOM_BUTTON"));
+ browser.clickAndWait(getProperty("SELECT_FANTASTIC_ROOM"));
+ browser.type(getProperty("PAYMENT_CREDIT_CARD"), CREDIT_CARD);
+ browser.type(getProperty("PAYMENT_CREDIT_CARD_NAME"), CREDIT_CARD_NAME);
+ browser.click(getProperty("PAYMENT_PROCEED"));
+
+ //confirm in browser 1 (WONDERFUL room should be selected)
+ browser.selectWindow("0");
+ browser.clickAndWait(getProperty("CONFIRM_CONFIRM"));
+
+ assertTrue(browser.isTextPresent("$450.00") && browser.isTextPresent("Wonderful Room"));
+ assertFalse(browser.isTextPresent("$1,000.00") || browser.isTextPresent("Fantastic Suite"));
+ }
+
+ public void login(String username, String password)
+ {
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("LOGIN_USERNAME_FIELD"), username);
+ browser.type(getProperty("LOGIN_PASSWORD_FIELD"), password);
+ browser.click(getProperty("LOGIN_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ private void pause(int millis)
+ {
+ try
+ {
+ Thread.sleep(millis);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+}
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties 2010-06-18 08:28:41 UTC (rev 13239)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties 2010-06-18 10:05:08 UTC (rev 13240)
@@ -39,6 +39,7 @@
NO_HOTELS_FOUND id=NoHotelsFoundMessage
SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+SEARCH_RESULT_TABLE_SECOND_ROW_LINK id=hotels:1:viewHotel
BOOKING_BOOK id=hotel:bookHotel
BOOKING_CANCEL id=hotel:cancel
BOOKING_SELECT_ROOM id=booking:room_preference
@@ -84,4 +85,8 @@
WORKSPACE_VIEW_TEXT View hotel: {0}
WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
-SPINNER id\=main\:SpinnerGif
\ No newline at end of file
+SPINNER id\=main\:SpinnerGif
+SELECT_ROOM_BUTTON id=booking:room_preference
+SELECT_WONDERFUL_ROOM id=room_selections_form:rooms:0:selectRoomPreference
+SELECT_FANTASTIC_ROOM id=room_selections_form:rooms:2:selectRoomPreference
+
15 years, 6 months
Seam SVN: r13239 - branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium.
by seam-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-06-18 04:28:41 -0400 (Fri, 18 Jun 2010)
New Revision: 13239
Modified:
branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
Log:
JBSEAM-4645, minor additions
Modified: branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 08:11:40 UTC (rev 13238)
+++ branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 08:28:41 UTC (rev 13239)
@@ -32,7 +32,7 @@
import org.testng.annotations.Test;
/**
- * This class alters behaviour of SimpleBookingTest to test nested conversations
+ * This class tests only nested conversations
*
* @author mgencur
*/
@@ -60,8 +60,6 @@
{
browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
pause(timeout);
- //browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "0");
- //pause(timeout);
browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "0");
pause(timeout);
browser.selectWindow("0");
15 years, 6 months
Seam SVN: r13238 - in branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking: src/org/jboss/seam/example/nestedbooking/test/selenium and 1 other directory.
by seam-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-06-18 04:11:40 -0400 (Fri, 18 Jun 2010)
New Revision: 13238
Added:
branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
Modified:
branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/jboss5.xml
branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
Log:
JBSEAM-4645, functional test for nested conversations of NestedBooking example
Modified: branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/jboss5.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/jboss5.xml 2010-06-18 06:14:19 UTC (rev 13237)
+++ branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/jboss5.xml 2010-06-18 08:11:40 UTC (rev 13238)
@@ -28,7 +28,9 @@
<class
name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
<class
- name="org.jboss.seam.example.nestedbooking.test.selenium.NestedSimpleBookingTest"></class>
+ name="org.jboss.seam.example.nestedbooking.test.selenium.NestedSimpleBookingTest" />
+ <class
+ name="org.jboss.seam.example.nestedbooking.test.selenium.NestedConversationTest" />
</classes>
</test>
</suite>
\ No newline at end of file
Added: branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java (rev 0)
+++ branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 08:11:40 UTC (rev 13238)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.nestedbooking.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.fail;
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.jboss.seam.example.common.test.selenium.SeamSelenium;
+import org.jboss.seam.example.common.test.booking.selenium.SeleniumBookingTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * This class alters behaviour of SimpleBookingTest to test nested conversations
+ *
+ * @author mgencur
+ */
+public class NestedConversationTest extends SeamSeleniumTest
+{
+
+ protected final int timeout = 5000;
+ protected final String CREDIT_CARD = "0123456789012345";
+ protected final String CREDIT_CARD_NAME = "visa";
+
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ }
+
+ @AfterMethod
+ public void tearDown()
+ {
+ super.tearDown();
+ }
+
+ @Test
+ public void nestedConversationTest()
+ {
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ pause(timeout);
+ //browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "0");
+ //pause(timeout);
+ browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "0");
+ pause(timeout);
+ browser.selectWindow("0");
+ login("demo", "demo");
+ SeleniumBookingTest t = new SeleniumBookingTest();
+ t.enterSearchQuery("W Hotel");
+ browser.click(getProperty("SEARCH_RESULT_TABLE_SECOND_ROW_LINK"));
+ pause(timeout);
+
+ //open the url in a second window
+ String url = browser.getLocation();
+ browser.openWindow(url, "1");
+
+ //go next to confirm button in browser 1
+ browser.selectWindow("0");
+ browser.clickAndWait(getProperty("BOOKING_BOOK"));
+ browser.clickAndWait(getProperty("SELECT_ROOM_BUTTON"));
+ browser.clickAndWait(getProperty("SELECT_WONDERFUL_ROOM"));
+ browser.type(getProperty("PAYMENT_CREDIT_CARD"), CREDIT_CARD);
+ browser.type(getProperty("PAYMENT_CREDIT_CARD_NAME"), CREDIT_CARD_NAME);
+ browser.click(getProperty("PAYMENT_PROCEED"));
+
+ //go next to confirm button in browser 2
+ browser.selectWindow("1");
+ browser.clickAndWait(getProperty("BOOKING_BOOK"));
+ browser.clickAndWait(getProperty("SELECT_ROOM_BUTTON"));
+ browser.clickAndWait(getProperty("SELECT_FANTASTIC_ROOM"));
+ browser.type(getProperty("PAYMENT_CREDIT_CARD"), CREDIT_CARD);
+ browser.type(getProperty("PAYMENT_CREDIT_CARD_NAME"), CREDIT_CARD_NAME);
+ browser.click(getProperty("PAYMENT_PROCEED"));
+
+ //confirm in browser 1 (WONDERFUL room should be selected)
+ browser.selectWindow("0");
+ browser.clickAndWait(getProperty("CONFIRM_CONFIRM"));
+
+ assertTrue(browser.isTextPresent("$450.00") && browser.isTextPresent("Wonderful Room"));
+ assertFalse(browser.isTextPresent("$1,000.00") || browser.isTextPresent("Fantastic Suite"));
+ }
+
+ public void login(String username, String password)
+ {
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("LOGIN_USERNAME_FIELD"), username);
+ browser.type(getProperty("LOGIN_PASSWORD_FIELD"), password);
+ browser.click(getProperty("LOGIN_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ private void pause(int millis)
+ {
+ try
+ {
+ Thread.sleep(millis);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+}
Modified: branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties 2010-06-18 06:14:19 UTC (rev 13237)
+++ branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties 2010-06-18 08:11:40 UTC (rev 13238)
@@ -39,6 +39,7 @@
NO_HOTELS_FOUND id=NoHotelsFoundMessage
SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+SEARCH_RESULT_TABLE_SECOND_ROW_LINK id=hotels:1:viewHotel
BOOKING_BOOK id=hotel:bookHotel
BOOKING_CANCEL id=hotel:cancel
BOOKING_SELECT_ROOM id=booking:room_preference
@@ -84,4 +85,8 @@
WORKSPACE_VIEW_TEXT View hotel: {0}
WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
-SPINNER id\=main\:SpinnerGif
\ No newline at end of file
+SPINNER id\=main\:SpinnerGif
+SELECT_ROOM_BUTTON id=booking:room_preference
+SELECT_WONDERFUL_ROOM id=room_selections_form:rooms:0:selectRoomPreference
+SELECT_FANTASTIC_ROOM id=room_selections_form:rooms:2:selectRoomPreference
+
15 years, 6 months
Seam SVN: r13237 - modules/xml/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-06-18 02:14:19 -0400 (Fri, 18 Jun 2010)
New Revision: 13237
Modified:
modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml
Log:
update seam xml docs
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-06-18 03:10:26 UTC (rev 13236)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-06-18 06:14:19 UTC (rev 13237)
@@ -69,7 +69,7 @@
<para>The namespaces are searched in the order they are specified in the xml
document.</para>
- <programlisting role="xml">
+ <programlisting role="XML">
<![CDATA[
<test:ProducerQualifier>
<s:Qualifier/>
@@ -80,7 +80,7 @@
<para>The first entry in the file defines a new qualifier. <literal>ProducerQualifier</literal>
is an annotation in the package <literal>org.jboss.seam.xml.test.injection</literal>.</para>
- <programlisting>
+ <programlisting role="XML">
<![CDATA[
<test:ProducerBean someOtherField="45" >
<test:someField>
@@ -109,7 +109,7 @@
<para>Child elements of fields, methods and classes that resolve to Annotation types are considered to be annotations on the corresponding element,
so the corresponding Java declaration for the XML above would be:</para>
- <programlisting><![CDATA[
+ <programlisting role="JAVA"><![CDATA[
public class ProducerBean {
@Produces
@ProducerQualifier
@@ -120,7 +120,7 @@
}
]]></programlisting>
- <programlisting><![CDATA[
+ <programlisting role="JAVA"><![CDATA[
<test:ReceiverBean>
<test:value>
<test:ProducerQualifier/>
@@ -320,7 +320,7 @@
</beans>
]]>
</programlisting>
-<programlisting role="java" >
+<programlisting role="JAVA" >
<![CDATA[
public class MethodBean {
@@ -356,7 +356,7 @@
the parameter. </para>
<para>The corresponding Java declaration for the XML above would be:</para>
- <programlisting role="java">
+ <programlisting role="JAVA">
<![CDATA[
public class MethodBean {
@@ -374,7 +374,7 @@
</programlisting>
<para>Array parameters can be represented using the <literal><s:array></literal> element,
with a child element to represent the type of the array. E.g.</para>
- <programlisting role="java">
+ <programlisting role="JAVA">
int method(MethodValueBean[] param);
</programlisting>
<para>could be configured via xml using the following:</para>
@@ -393,7 +393,7 @@
<title>Overriding the type of an injection point</title>
<para>It is possible to limit which bean types are availible to inject int a given injection point:</para>
- <programlisting role="java">
+ <programlisting role="JAVA">
<![CDATA[
public class SomeBean
{
@@ -401,7 +401,7 @@
}
]]>
</programlisting>
-<programlisting role="xml">
+<programlisting role="XML">
<![CDATA[
<test:SomeBean>
<test:someField>
@@ -421,7 +421,7 @@
<section>
<title>Annotation Members</title>
<para>It is possible to set the value of annotation members using attributes in xml. For example:</para>
- <programlisting role="java" >
+ <programlisting role="JAVA" >
<![CDATA[
public @interface OtherQualifier {
String value1();
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml 2010-06-18 03:10:26 UTC (rev 13236)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml 2010-06-18 06:14:19 UTC (rev 13237)
@@ -26,7 +26,7 @@
so <literal>seam-beans.xml</literal> is provided as an alternative. </para>
<para>Let's start with a simple example. Say we have the following class that represents a report:</para>
- <programlisting role="java"><![CDATA[
+ <programlisting role="JAVA"><![CDATA[
public class Report
{
String filename;
@@ -38,7 +38,7 @@
}
]]></programlisting>
<para>And the following support classes:</para>
- <programlisting role="java">
+ <programlisting role="JAVA">
<![CDATA[
public interface Datasource
{
15 years, 6 months
Seam SVN: r13236 - in examples/trunk/booking-simplified/src/main: webapp/WEB-INF and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-06-17 23:10:26 -0400 (Thu, 17 Jun 2010)
New Revision: 13236
Added:
examples/trunk/booking-simplified/src/main/resources/META-INF/seam-beans.xml
Removed:
examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml
Log:
seam-beans.xml now resides in the correct (for now) place.
Copied: examples/trunk/booking-simplified/src/main/resources/META-INF/seam-beans.xml (from rev 13235, examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml)
===================================================================
--- examples/trunk/booking-simplified/src/main/resources/META-INF/seam-beans.xml (rev 0)
+++ examples/trunk/booking-simplified/src/main/resources/META-INF/seam-beans.xml 2010-06-18 03:10:26 UTC (rev 13236)
@@ -0,0 +1,36 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:lc="urn:java:org.jboss.seam.international.locale"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://docs.jboss.org/cdi/beans_1_0.xsd">
+
+ <lc:DefaultLocaleProducer>
+ <s:specializes />
+ <lc:defaultLocaleKey>
+ <s:value>de_DE</s:value>
+ </lc:defaultLocaleKey>
+ </lc:DefaultLocaleProducer>
+</beans>
\ No newline at end of file
Deleted: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml 2010-06-18 02:53:28 UTC (rev 13235)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml 2010-06-18 03:10:26 UTC (rev 13236)
@@ -1,34 +0,0 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:lc="urn:java:org.jboss.seam.international.locale"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://docs.jboss.org/cdi/beans_1_0.xsd">
-
- <lc:DefaultLocaleProducer>
- <s:extends />
- <lc:defaultLocaleKey>DE</lc:defaultLocaleKey>
- </lc:DefaultLocaleProducer>
-</beans>
\ No newline at end of file
15 years, 6 months
Seam SVN: r13235 - in examples/trunk/booking-simplified/src/main: java/org/jboss/seam/examples/booking/security and 3 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-06-17 22:53:28 -0400 (Thu, 17 Jun 2010)
New Revision: 13235
Added:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/international/
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/international/status/
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/international/status/Bundles.java
examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml
Modified:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java
examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml
Log:
Modified: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java 2010-06-17 23:25:45 UTC (rev 13234)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/security/Authenticator.java 2010-06-18 02:53:28 UTC (rev 13235)
@@ -23,6 +23,7 @@
import javax.ejb.Stateless;
import javax.enterprise.event.Event;
+import javax.enterprise.inject.Instance;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@@ -43,7 +44,7 @@
public class Authenticator
{
@Inject
- private Logger log;
+ private Instance<Logger> log;
@PersistenceContext
private EntityManager em;
@@ -60,7 +61,7 @@
public boolean authenticate()
{
- log.info("Logging in " + credentials.getUsername());
+ log.get().info("Logging in " + credentials.getUsername());
if ((credentials.getUsername() == null) || (credentials.getPassword() == null))
{
messages.info(new DefaultBundleKey("identity.loginFailed"));
Added: examples/trunk/booking-simplified/src/main/java/org/jboss/seam/international/status/Bundles.java
===================================================================
--- examples/trunk/booking-simplified/src/main/java/org/jboss/seam/international/status/Bundles.java (rev 0)
+++ examples/trunk/booking-simplified/src/main/java/org/jboss/seam/international/status/Bundles.java 2010-06-18 02:53:28 UTC (rev 13235)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.international.status;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+/**
+ * Maintains a global map of {@link ResourceBundle} objects.
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+@Named
+@ApplicationScoped
+public class Bundles implements Map<String, ResourceBundle>, Serializable
+{
+ private static final long serialVersionUID = 1207758648760266247L;
+
+ private final Map<String, ResourceBundle> bundles = new ConcurrentHashMap<String, ResourceBundle>();
+
+ @Inject
+ private Instance<Locale> locale;
+
+ public void clear()
+ {
+ bundles.clear();
+ }
+
+ public boolean containsKey(final Object key)
+ {
+ return bundles.containsKey(key);
+ }
+
+ public boolean containsValue(final Object value)
+ {
+ return bundles.containsValue(value);
+ }
+
+ public Set<java.util.Map.Entry<String, ResourceBundle>> entrySet()
+ {
+ return bundles.entrySet();
+ }
+
+ public ResourceBundle get(final Object key)
+ {
+ Locale loc = locale.get();
+ String lookup = key.toString() + loc.toString();
+ if (!containsKey(lookup))
+ {
+ ResourceBundle bundle = ResourceBundle.getBundle(key.toString(), loc);
+ bundles.put(lookup, bundle);
+ }
+ return bundles.get(lookup);
+ }
+
+ public boolean isEmpty()
+ {
+ return bundles.isEmpty();
+ }
+
+ public Set<String> keySet()
+ {
+ return keySet();
+ }
+
+ public ResourceBundle put(final String key, final ResourceBundle value)
+ {
+ return put(key, value);
+ }
+
+ public void putAll(final Map<? extends String, ? extends ResourceBundle> m)
+ {
+ bundles.putAll(m);
+ }
+
+ public ResourceBundle remove(final Object key)
+ {
+ return bundles.remove(key);
+ }
+
+ public int size()
+ {
+ return bundles.size();
+ }
+
+ public Collection<ResourceBundle> values()
+ {
+ return bundles.values();
+ }
+}
\ No newline at end of file
Modified: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml 2010-06-17 23:25:45 UTC (rev 13234)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml 2010-06-18 02:53:28 UTC (rev 13235)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:i18n="urn:java:org.jboss.seam.international.locale"
xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
<interceptors>
<class>org.jboss.seam.faces.context.conversation.ConversationBoundaryInterceptor</class>
@@ -11,6 +10,5 @@
<alternatives>
<class>org.jboss.seam.examples.booking.bootstrap.ApplicationInitializer</class>
</alternatives>
- <!-- not being set -->
- <i18n:DefaultLocaleProducer defaultLocaleKey="en"/>
+
</beans>
Added: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml (rev 0)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/seam-beans.xml 2010-06-18 02:53:28 UTC (rev 13235)
@@ -0,0 +1,34 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:lc="urn:java:org.jboss.seam.international.locale"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://docs.jboss.org/cdi/beans_1_0.xsd">
+
+ <lc:DefaultLocaleProducer>
+ <s:extends />
+ <lc:defaultLocaleKey>DE</lc:defaultLocaleKey>
+ </lc:DefaultLocaleProducer>
+</beans>
\ No newline at end of file
15 years, 6 months