Repository: openmeetings
Updated Branches:
  refs/heads/master a771f1eb1 -> ac077c5f5


[OPENMEETINGS-1714] more issues are fixed


Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo
Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/ac077c5f
Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/ac077c5f
Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/ac077c5f

Branch: refs/heads/master
Commit: ac077c5f555bd7ac553aa843d521f0b68e73ed70
Parents: a771f1e
Author: Maxim Solodovnik <[email protected]>
Authored: Sun Oct 1 15:47:21 2017 +0700
Committer: Maxim Solodovnik <[email protected]>
Committed: Sun Oct 1 15:47:21 2017 +0700

----------------------------------------------------------------------
 .../openmeetings/test/NonJenkinsTests.java      |  23 ++
 .../openmeetings/util/NonJenkinsTests.java      |  23 --
 openmeetings-web/pom.xml                        |   4 +-
 .../selenium/AbstractTestDefaults.java          | 229 -------------------
 .../openmeetings/selenium/HeavyTests.java       |  23 --
 .../openmeetings/selenium/SeleniumTests.java    |  23 --
 .../openmeetings/selenium/SeleniumUtils.java    | 229 -------------------
 .../openmeetings/selenium/TestSignUp.java       | 128 -----------
 .../apache/openmeetings/test/HeavyTests.java    |  23 ++
 .../test/selenium/AbstractTestDefaults.java     | 229 +++++++++++++++++++
 .../test/selenium/SeleniumTests.java            |  23 ++
 .../test/selenium/SeleniumUtils.java            | 229 +++++++++++++++++++
 .../openmeetings/test/selenium/TestSignUp.java  | 128 +++++++++++
 .../apache/openmeetings/user/TestUserGroup.java |   2 +-
 .../webservice/TestFileService.java             |   2 +-
 15 files changed, 659 insertions(+), 659 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-util/src/test/java/org/apache/openmeetings/test/NonJenkinsTests.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-util/src/test/java/org/apache/openmeetings/test/NonJenkinsTests.java
 
b/openmeetings-util/src/test/java/org/apache/openmeetings/test/NonJenkinsTests.java
new file mode 100644
index 0000000..350e96b
--- /dev/null
+++ 
b/openmeetings-util/src/test/java/org/apache/openmeetings/test/NonJenkinsTests.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.test;
+
+public @interface NonJenkinsTests {
+
+}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-util/src/test/java/org/apache/openmeetings/util/NonJenkinsTests.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-util/src/test/java/org/apache/openmeetings/util/NonJenkinsTests.java
 
b/openmeetings-util/src/test/java/org/apache/openmeetings/util/NonJenkinsTests.java
deleted file mode 100644
index 16d8aa9..0000000
--- 
a/openmeetings-util/src/test/java/org/apache/openmeetings/util/NonJenkinsTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License") +  you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.openmeetings.util;
-
-public @interface NonJenkinsTests {
-
-}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/pom.xml
----------------------------------------------------------------------
diff --git a/openmeetings-web/pom.xml b/openmeetings-web/pom.xml
index 5088983..08a4050 100644
--- a/openmeetings-web/pom.xml
+++ b/openmeetings-web/pom.xml
@@ -76,7 +76,7 @@
                                                
<artifactId>maven-surefire-plugin</artifactId>
                                                <inherited>true</inherited>
                                                <configuration>
-                                                       
<excludedGroups>org.apache.openmeetings.test.selenium.SeleniumTests,org.apache.openmeetings.test.selenium.HeavyTests,org.apache.openmeetings.util.NonJenkinsTests</excludedGroups>
+                                                       
<excludedGroups>org.apache.openmeetings.test.selenium.SeleniumTests,org.apache.openmeetings.test.HeavyTests,org.apache.openmeetings.test.NonJenkinsTests</excludedGroups>
                                                </configuration>
                                        </plugin>
                                </plugins>
@@ -418,7 +418,7 @@
                                <inherited>true</inherited>
                                <configuration>
                                        
<workingDirectory>${project.build.directory}</workingDirectory>
-                                       
<excludedGroups>org.apache.openmeetings.test.selenium.SeleniumTests,org.apache.openmeetings.test.selenium.HeavyTests</excludedGroups>
+                                       
<excludedGroups>org.apache.openmeetings.test.selenium.SeleniumTests,org.apache.openmeetings.test.HeavyTests</excludedGroups>
                                        <systemPropertyVariables>
                                                
<om.home>${project.build.directory}/test-root</om.home>
                                                
<languages.home>${project.build.directory}/test-root/languages</languages.home>

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/AbstractTestDefaults.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/AbstractTestDefaults.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/AbstractTestDefaults.java
deleted file mode 100644
index af854f4..0000000
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/AbstractTestDefaults.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License") +  you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.openmeetings.selenium;
-
-import java.util.List;
-
-import org.apache.openmeetings.AbstractSpringTest;
-import org.apache.openmeetings.db.dao.label.LabelDao;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.experimental.categories.Category;
-import org.openqa.selenium.Keys;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.firefox.FirefoxOptions;
-import org.openqa.selenium.firefox.FirefoxProfile;
-
-@Category(SeleniumTests.class)
-public abstract class AbstractTestDefaults extends AbstractSpringTest {
-       public WebDriver driver = null;
-
-       private String BASE_URL = "http://localhost:5080/openmeetings";;
-       private String username = "swagner";
-       private String userpass = "qweqwe";
-       private String groupName = "seleniumtest";
-       private String email = "[email protected]";
-       private String locale = "en-us";
-
-
-       public String getBASE_URL() {
-               return BASE_URL;
-       }
-
-       public String getUsername() {
-               return username;
-       }
-
-       public String getUserpass() {
-               return userpass;
-       }
-
-       public String getGroupName() {
-               return groupName;
-       }
-
-       public String getEmail() {
-               return email;
-       }
-
-       public Long getLanguageId() {
-               return 1L;
-       }
-
-       public String getLocale() {
-               return locale;
-       }
-
-       // setting this to false can be handy if you run the test from inside
-       // Eclipse, the browser will not shut down after the test so you can 
start
-       // to diagnose the test issue
-       public boolean doTearDownAfterTest = false;
-
-       public String getString(String key) {
-               return LabelDao.getString(key, getLanguageId());
-       }
-
-       /**
-        * Make method overwrite possible to have custom behavior in tests
-        *
-        * @return
-        */
-       public boolean getDoTearDownAfterTest() {
-               return doTearDownAfterTest;
-       }
-
-       @Before
-       public void setUp() {
-               FirefoxProfile profile = new FirefoxProfile();
-               profile.setPreference("intl.accept_languages", getLocale());
-               driver = new FirefoxDriver(new 
FirefoxOptions().setProfile(profile));
-       }
-
-       /**
-        * This test is a basic test to verify the default loader mechanism 
works
-        * it is not intend to be a part of any sub test
-        *
-        * @throws Exception
-        */
-       //@Test
-       public void smokeTest() throws Exception {
-               try {
-                       driver.get(getBASE_URL());
-
-                       testIsInstalledAndDoInstallation();
-
-                       SeleniumUtils.inputText(driver, "login", getUsername());
-                       SeleniumUtils.inputText(driver, "pass", getUserpass());
-
-                       WebElement signInButton = 
SeleniumUtils.findElement(driver,
-                                       "//button[span[contains(text(), 'Sign 
in')]]", true, true);
-                       signInButton.click();
-
-                       SeleniumUtils.elementExists(driver,
-                                       "//h3[contains(text(), 'Help and 
support')]", true);
-               } catch (Exception e) {
-                       
SeleniumUtils.makeScreenShot(this.getClass().getSimpleName(), e,
-                                       driver);
-                       throw e;
-               }
-       }
-
-       /**
-        * Throws exception in case that test fails, so it is important to not 
catch
-        * that exception but really let the test fail!
-        *
-        * @throws Exception
-        */
-       protected void testIsInstalledAndDoInstallation() throws Exception {
-
-               WebElement wicketExtensionsWizardHeaderTitle = SeleniumUtils
-                               .findElement(driver, 
"wicketExtensionsWizardHeaderTitle", false, true);
-               if (wicketExtensionsWizardHeaderTitle == null) {
-                       return;
-               }
-               if (wicketExtensionsWizardHeaderTitle.getText()
-                               .contains("Installation")) {
-                       System.out.println("Do Installation");
-                       doInstallation();
-               }
-
-       }
-
-       private void doInstallation() throws Exception {
-               Thread.sleep(3000L);
-
-               List<WebElement> buttons_next = 
SeleniumUtils.findElements(driver,
-                               "buttons:next", true);
-
-               buttons_next.get(1).sendKeys(Keys.RETURN);
-
-               Thread.sleep(1000L);
-
-               SeleniumUtils.inputText(driver, "view:cfg.username", 
getUsername());
-               SeleniumUtils.inputText(driver, "view:cfg.password", 
getUserpass());
-               SeleniumUtils.inputText(driver, "view:cfg.email", getEmail());
-               SeleniumUtils.inputText(driver, "view:cfg.group", 
getGroupName());
-
-               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
-
-               buttons_next.get(1).sendKeys(Keys.RETURN);
-
-               Thread.sleep(1000L);
-
-               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
-
-               buttons_next.get(1).sendKeys(Keys.RETURN);
-
-               Thread.sleep(1000L);
-
-               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
-
-               buttons_next.get(1).sendKeys(Keys.RETURN);
-
-               Thread.sleep(1000L);
-
-               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
-
-               buttons_next.get(1).sendKeys(Keys.RETURN);
-
-               Thread.sleep(2000L);
-
-               List<WebElement> elements = SeleniumUtils.findElements(driver,
-                               "buttons:finish", true);
-
-               elements.get(1).sendKeys(Keys.RETURN);
-
-               long maxMilliSecondsWait = 120000;
-
-               while (maxMilliSecondsWait > 0) {
-
-                       // check if installation is complete by searching for 
the link on
-                       // the success page
-                       WebElement enterApplicationLink = 
SeleniumUtils.findElement(driver,
-                                       "//a[contains(@href,'install')]", 
false, true);
-
-                       if (enterApplicationLink == null) {
-                               System.out
-                                               .println("Installation running 
- wait 3 more seconds and check again");
-
-                               Thread.sleep(3000L);
-                               maxMilliSecondsWait -= 3000;
-                       } else {
-                               maxMilliSecondsWait = 0;
-
-                               enterApplicationLink.click();
-
-                               return;
-                       }
-               }
-
-               throw new Exception("Timeout during installation");
-       }
-
-       @After
-       public void tearDown() {
-               if (getDoTearDownAfterTest()) {
-                       driver.close();
-                       driver.quit();
-               }
-       }
-
-}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/HeavyTests.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/HeavyTests.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/HeavyTests.java
deleted file mode 100644
index a1eaca6..0000000
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/HeavyTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License") +  you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.openmeetings.selenium;
-
-public @interface HeavyTests {
-
-}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumTests.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumTests.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumTests.java
deleted file mode 100644
index 5b4351c..0000000
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License") +  you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.openmeetings.selenium;
-
-public @interface SeleniumTests {
-
-}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumUtils.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumUtils.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumUtils.java
deleted file mode 100644
index 8b860a8..0000000
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/SeleniumUtils.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License") +  you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.openmeetings.selenium;
-
-import static 
org.apache.openmeetings.util.OpenmeetingsVariables.getWebAppRootKey;
-
-import java.io.File;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.commons.io.FileUtils;
-import org.openqa.selenium.By;
-import org.openqa.selenium.OutputType;
-import org.openqa.selenium.TakesScreenshot;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.red5.logging.Red5LoggerFactory;
-import org.slf4j.Logger;
-
-public class SeleniumUtils {
-       private static final Logger log = 
Red5LoggerFactory.getLogger(SeleniumUtils.class, getWebAppRootKey());
-       // we need to retry some actions because our web site is dynamic
-       static int numberOfRetries = 10;
-
-       // we need to sleep to make sure Ajax could complete whatever it does
-       static long defaultSleepInterval = 1000;
-
-       public static void inputText(WebDriver driver, String search,
-                       String inputText) throws Exception {
-               WebElement element = SeleniumUtils.findElement(driver, search, 
true, true);
-
-               //clear text before adding input
-               element.clear();
-
-               // Would make send to check if this element is really an input 
text
-               element.sendKeys(inputText);
-       }
-
-       public static void click(WebDriver driver, String search) throws 
Exception {
-               WebElement element = SeleniumUtils.findElement(driver, search, 
true, true);
-               element.click();
-       }
-
-       /**
-        *
-        * @param driver
-        * @param search
-        * @param throwException
-        *            under some circumstance you do't want to exit the test 
here
-        * @return
-        * @throws Exception
-        */
-       public static List<WebElement> findElements(WebDriver driver, String 
search,
-                       boolean throwException) throws Exception {
-               for (int i = 0; i < numberOfRetries; i++) {
-                       List<WebElement> elements = _findElement(driver, 
search);
-                       if (elements != null) {
-                               return elements;
-                       }
-
-                       Thread.sleep(defaultSleepInterval);
-               }
-
-               if (throwException) {
-                       throw new Exception("Could not find element with 
specified path "
-                                       + search);
-               }
-
-               return null;
-       }
-
-       /**
-        *
-        * @param driver
-        * @param search
-        * @param throwException
-        *            under some circumstance you do't want to exit the test 
here
-        * @param onlyReturnVisisbleElement TODO
-        * @return
-        * @throws Exception
-        */
-       public static WebElement findElement(WebDriver driver, String search,
-                       boolean throwException, boolean 
onlyReturnVisisbleElement) throws Exception {
-               for (int i = 0; i < numberOfRetries; i++) {
-                       List<WebElement> elements = _findElement(driver, 
search);
-                       if (elements != null) {
-
-                               if (!onlyReturnVisisbleElement) {
-                                       return elements.get(0);
-                               }
-
-                               for (WebElement element : elements) {
-                                       if (element.isDisplayed()) {
-                                               return element;
-                                       }
-                               }
-
-                       }
-
-                       Thread.sleep(defaultSleepInterval);
-               }
-
-               if (throwException) {
-                       throw new Exception("Could not find element with 
specified path "
-                                       + search);
-               }
-
-               return null;
-       }
-
-       private static By[] _getSearchArray(String search) {
-               //If xpath we have to use it, if xpath is used with 
By.className(...) there will be an exception
-               if (search.startsWith("//")) {
-                       return new By[] { By.xpath(search) };
-               } else {
-                       return new By[] { By.id(search), By.name(search), 
By.className(search),
-                                       By.tagName(search), By.xpath(search) };
-               }
-       }
-
-       private static List<WebElement> _findElement(WebDriver driver, String 
search) {
-               for (By by : _getSearchArray(search)) {
-                       try {
-                               List<WebElement> elements = 
driver.findElements(by);
-                               if (elements != null && elements.size() > 0) {
-                                       return elements;
-                               }
-                       } catch (Exception e) {
-                               // Do not show any warnings
-                       }
-               }
-               return null;
-       }
-
-       public static void elementExists(WebDriver driver, String search,
-                       boolean shouldExist) throws Exception {
-               Thread.sleep(defaultSleepInterval);
-
-               boolean doesExist = !shouldExist;
-
-               for (int i = 0; i < numberOfRetries; i++) {
-                       doesExist = checkExists(driver, search);
-                       if (doesExist == shouldExist) {
-                               break;
-                       }
-
-                       Thread.sleep(defaultSleepInterval);
-               }
-
-               if (doesExist != shouldExist) {
-                       if (shouldExist) {
-                               throw new Exception("Element could not be 
found: " + search);
-                       } else {
-                               throw new Exception("Unexpected Element was 
found: " + search);
-                       }
-               }
-       }
-
-       private static boolean checkExists(WebDriver driver, String search) {
-               for (By by : _getSearchArray(search)) {
-                       try {
-                               List<WebElement> element = 
driver.findElements(by);
-                               if (element.size() > 0) {
-                                       return true;
-                               }
-                       } catch (Exception e) {
-                               // Do not show any warnings
-                       }
-               }
-               return false;
-       }
-
-       public static void makeScreenShot(String testName, Exception e,
-                       WebDriver driver) {
-               try {
-                       DateFormat df = new 
SimpleDateFormat("MM-dd-yyyy_HH-mm-ss");
-                       String fileName = e.getMessage().replace(" ", "_");
-                       fileName = fileName.replaceAll("(\r\n|\n)", "");
-                       fileName = fileName.replaceAll("/", "");
-
-                       if (fileName.length() > 100) {
-                               fileName = fileName.substring(0, 100);
-                       }
-
-                       fileName = fileName + "_" + df.format(new Date()) + 
".png";
-                       File screenShotFile = ((TakesScreenshot) driver)
-                                       .getScreenshotAs(OutputType.FILE);
-
-                       String path = "." + File.separatorChar + "build"
-                                       + File.separatorChar + "screenshots" + 
File.separatorChar
-                                       + testName;
-
-                       File screenshotFolder = new File(path);
-                       if (!screenshotFolder.exists()) {
-                               screenshotFolder.mkdirs();
-                       }
-
-                       System.out.println("screenshot copy from: "
-                                       + screenShotFile.getAbsolutePath());
-                       System.out.println("Length Filename: " + 
fileName.length()
-                                       + " - Writing screenshot to: " + path + 
File.separatorChar
-                                       + fileName);
-
-                       FileUtils.moveFile(screenShotFile, new File(path
-                                       + File.separatorChar + fileName));
-               } catch (Exception err) {
-                       log.error("Error", err);
-               }
-
-       }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/TestSignUp.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/TestSignUp.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/TestSignUp.java
deleted file mode 100644
index 4ee6d17..0000000
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/selenium/TestSignUp.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License") +  you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.openmeetings.selenium;
-
-import java.util.Date;
-
-import org.junit.Test;
-import org.openqa.selenium.Alert;
-import org.openqa.selenium.WebElement;
-
-import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
-
-public class TestSignUp extends AbstractTestDefaults {
-       String pass = "pass";
-
-       @Override
-       public boolean getDoTearDownAfterTest() {
-               return false;
-       }
-
-       @Test
-       public void testSignUp() throws Exception {
-               try {
-                       driver.get(getBASE_URL());
-
-                       String currentRandomCounter = "" + ((new 
Date().getTime())/1000);
-                       String userName = "seba" + currentRandomCounter;
-                       String email = "hans." + currentRandomCounter + 
"@openmeetings.apache.org";
-
-                       super.testIsInstalledAndDoInstallation();
-
-                       WebElement signUpButton = 
SeleniumUtils.findElement(driver,
-                                       "//button[span[contains(text(), '" + 
getString("123") + "')]]", true, true);
-                       signUpButton.click();
-
-                       // ##################################
-                       // Test validation message for passwords to be identical
-                       // ##################################
-                       doSignUp("Hans","Muster", userName, "pw", "pw2", email);
-
-                       //Find Error label-id 232 "Please enter two identical 
passwords"
-                       SeleniumUtils.findElement(driver, 
"//span[@class='feedbackPanelERROR'][contains(text(), '" + getString("232") + 
"')]", true, true);
-
-                       // ##################################
-                       // Sign up with user and sign in
-                       // ##################################
-                       doSignUp("Hans","Muster", userName, pass, pass, email);
-
-                       //Check for popup with success message and email to 
check
-                       SeleniumUtils.findElement(driver, 
"//span[contains(text(), '" + getString("warn.notverified") + "')]", true, 
true);
-
-                       //click button to close popup
-                       WebElement signUpSucessPopUpOkButton = 
SeleniumUtils.findElement(driver,
-                                       "//button[span[contains(text(), '" + 
DialogButtons.OK.toString() + "')]]", true, true);
-                       signUpSucessPopUpOkButton.click();
-
-                       //Login with user
-                       SeleniumUtils.inputText(driver, "login", userName);
-                       SeleniumUtils.inputText(driver, "pass", pass);
-
-                       //click labelid 112 "Sign In"
-                       WebElement signInButton = 
SeleniumUtils.findElement(driver,
-                                       "//button[span[contains(text(), '" + 
getString("112") + "')]]", true, true);
-                       signInButton.click();
-
-                       // check for some text in dashbaord, labelid 281, "Help 
and support"
-                       SeleniumUtils.elementExists(driver,
-                                       "//h3[contains(text(), '" + 
getString("281") + "')]", true);
-
-                       //sign out
-                       WebElement signOutLink = 
SeleniumUtils.findElement(driver,
-                                       "//a[contains(text(), '" + 
getString("310") + "')]", true, true);
-                       signOutLink.click();
-
-                       Alert alert = driver.switchTo().alert();
-                       alert.accept();
-
-                       // ##################################
-                       // Sign up with same user and email and check duplicate 
messages
-                       // ##################################
-
-                       signUpButton = SeleniumUtils.findElement(driver,
-                                       "//button[span[contains(text(), '" + 
getString("123") + "')]]", true, true);
-                       signUpButton.click();
-
-                       doSignUp("Hans","Muster", userName, pass, pass, email);
-
-                       SeleniumUtils.findElement(driver, 
"//span[@class='feedbackPanelERROR'][contains(text(), '" + 
getString("error.login.inuse") + "')]", true, true);
-
-                       SeleniumUtils.findElement(driver, 
"//span[@class='feedbackPanelERROR'][contains(text(), '" + 
getString("error.email.inuse") + "')]", true, true);
-               } catch (Exception e) {
-                       
SeleniumUtils.makeScreenShot(this.getClass().getSimpleName(), e,
-                                       driver);
-                       throw e;
-               }
-       }
-
-       private void doSignUp(String firstName, String lastName, String login, 
String password,
-                                       String confirmPassword, String email) 
throws Exception {
-
-               SeleniumUtils.inputText(driver, "firstName", firstName);
-               SeleniumUtils.inputText(driver, "lastName", lastName);
-               SeleniumUtils.inputText(driver, "//input[@name='login']", 
login);
-               SeleniumUtils.inputText(driver, "password", password);
-               SeleniumUtils.inputText(driver, "confirmPassword", 
confirmPassword);
-               SeleniumUtils.inputText(driver, "email", email);
-
-               WebElement submitButton = SeleniumUtils.findElement(driver,
-                               "//button[span[contains(text(), 'Register')]]", 
true, true);
-               submitButton.click();
-       }
-}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/test/HeavyTests.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/test/HeavyTests.java 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/HeavyTests.java
new file mode 100644
index 0000000..ccd81dc
--- /dev/null
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/HeavyTests.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.test;
+
+public @interface HeavyTests {
+
+}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/AbstractTestDefaults.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/AbstractTestDefaults.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/AbstractTestDefaults.java
new file mode 100644
index 0000000..57e7f83
--- /dev/null
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/AbstractTestDefaults.java
@@ -0,0 +1,229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.test.selenium;
+
+import java.util.List;
+
+import org.apache.openmeetings.AbstractSpringTest;
+import org.apache.openmeetings.db.dao.label.LabelDao;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.experimental.categories.Category;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.firefox.FirefoxOptions;
+import org.openqa.selenium.firefox.FirefoxProfile;
+
+@Category(SeleniumTests.class)
+public abstract class AbstractTestDefaults extends AbstractSpringTest {
+       public WebDriver driver = null;
+
+       private String BASE_URL = "http://localhost:5080/openmeetings";;
+       private String username = "swagner";
+       private String userpass = "qweqwe";
+       private String groupName = "seleniumtest";
+       private String email = "[email protected]";
+       private String locale = "en-us";
+
+
+       public String getBASE_URL() {
+               return BASE_URL;
+       }
+
+       public String getUsername() {
+               return username;
+       }
+
+       public String getUserpass() {
+               return userpass;
+       }
+
+       public String getGroupName() {
+               return groupName;
+       }
+
+       public String getEmail() {
+               return email;
+       }
+
+       public Long getLanguageId() {
+               return 1L;
+       }
+
+       public String getLocale() {
+               return locale;
+       }
+
+       // setting this to false can be handy if you run the test from inside
+       // Eclipse, the browser will not shut down after the test so you can 
start
+       // to diagnose the test issue
+       public boolean doTearDownAfterTest = false;
+
+       public String getString(String key) {
+               return LabelDao.getString(key, getLanguageId());
+       }
+
+       /**
+        * Make method overwrite possible to have custom behavior in tests
+        *
+        * @return
+        */
+       public boolean getDoTearDownAfterTest() {
+               return doTearDownAfterTest;
+       }
+
+       @Before
+       public void setUp() {
+               FirefoxProfile profile = new FirefoxProfile();
+               profile.setPreference("intl.accept_languages", getLocale());
+               driver = new FirefoxDriver(new 
FirefoxOptions().setProfile(profile));
+       }
+
+       /**
+        * This test is a basic test to verify the default loader mechanism 
works
+        * it is not intend to be a part of any sub test
+        *
+        * @throws Exception
+        */
+       //@Test
+       public void smokeTest() throws Exception {
+               try {
+                       driver.get(getBASE_URL());
+
+                       testIsInstalledAndDoInstallation();
+
+                       SeleniumUtils.inputText(driver, "login", getUsername());
+                       SeleniumUtils.inputText(driver, "pass", getUserpass());
+
+                       WebElement signInButton = 
SeleniumUtils.findElement(driver,
+                                       "//button[span[contains(text(), 'Sign 
in')]]", true, true);
+                       signInButton.click();
+
+                       SeleniumUtils.elementExists(driver,
+                                       "//h3[contains(text(), 'Help and 
support')]", true);
+               } catch (Exception e) {
+                       
SeleniumUtils.makeScreenShot(this.getClass().getSimpleName(), e,
+                                       driver);
+                       throw e;
+               }
+       }
+
+       /**
+        * Throws exception in case that test fails, so it is important to not 
catch
+        * that exception but really let the test fail!
+        *
+        * @throws Exception
+        */
+       protected void testIsInstalledAndDoInstallation() throws Exception {
+
+               WebElement wicketExtensionsWizardHeaderTitle = SeleniumUtils
+                               .findElement(driver, 
"wicketExtensionsWizardHeaderTitle", false, true);
+               if (wicketExtensionsWizardHeaderTitle == null) {
+                       return;
+               }
+               if (wicketExtensionsWizardHeaderTitle.getText()
+                               .contains("Installation")) {
+                       System.out.println("Do Installation");
+                       doInstallation();
+               }
+
+       }
+
+       private void doInstallation() throws Exception {
+               Thread.sleep(3000L);
+
+               List<WebElement> buttons_next = 
SeleniumUtils.findElements(driver,
+                               "buttons:next", true);
+
+               buttons_next.get(1).sendKeys(Keys.RETURN);
+
+               Thread.sleep(1000L);
+
+               SeleniumUtils.inputText(driver, "view:cfg.username", 
getUsername());
+               SeleniumUtils.inputText(driver, "view:cfg.password", 
getUserpass());
+               SeleniumUtils.inputText(driver, "view:cfg.email", getEmail());
+               SeleniumUtils.inputText(driver, "view:cfg.group", 
getGroupName());
+
+               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
+
+               buttons_next.get(1).sendKeys(Keys.RETURN);
+
+               Thread.sleep(1000L);
+
+               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
+
+               buttons_next.get(1).sendKeys(Keys.RETURN);
+
+               Thread.sleep(1000L);
+
+               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
+
+               buttons_next.get(1).sendKeys(Keys.RETURN);
+
+               Thread.sleep(1000L);
+
+               buttons_next = SeleniumUtils.findElements(driver, 
"buttons:next", true);
+
+               buttons_next.get(1).sendKeys(Keys.RETURN);
+
+               Thread.sleep(2000L);
+
+               List<WebElement> elements = SeleniumUtils.findElements(driver,
+                               "buttons:finish", true);
+
+               elements.get(1).sendKeys(Keys.RETURN);
+
+               long maxMilliSecondsWait = 120000;
+
+               while (maxMilliSecondsWait > 0) {
+
+                       // check if installation is complete by searching for 
the link on
+                       // the success page
+                       WebElement enterApplicationLink = 
SeleniumUtils.findElement(driver,
+                                       "//a[contains(@href,'install')]", 
false, true);
+
+                       if (enterApplicationLink == null) {
+                               System.out
+                                               .println("Installation running 
- wait 3 more seconds and check again");
+
+                               Thread.sleep(3000L);
+                               maxMilliSecondsWait -= 3000;
+                       } else {
+                               maxMilliSecondsWait = 0;
+
+                               enterApplicationLink.click();
+
+                               return;
+                       }
+               }
+
+               throw new Exception("Timeout during installation");
+       }
+
+       @After
+       public void tearDown() {
+               if (getDoTearDownAfterTest()) {
+                       driver.close();
+                       driver.quit();
+               }
+       }
+
+}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumTests.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumTests.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumTests.java
new file mode 100644
index 0000000..5272d26
--- /dev/null
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumTests.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.test.selenium;
+
+public @interface SeleniumTests {
+
+}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumUtils.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumUtils.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumUtils.java
new file mode 100644
index 0000000..1344fa1
--- /dev/null
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/SeleniumUtils.java
@@ -0,0 +1,229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.test.selenium;
+
+import static 
org.apache.openmeetings.util.OpenmeetingsVariables.getWebAppRootKey;
+
+import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.openqa.selenium.By;
+import org.openqa.selenium.OutputType;
+import org.openqa.selenium.TakesScreenshot;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
+
+public class SeleniumUtils {
+       private static final Logger log = 
Red5LoggerFactory.getLogger(SeleniumUtils.class, getWebAppRootKey());
+       // we need to retry some actions because our web site is dynamic
+       static int numberOfRetries = 10;
+
+       // we need to sleep to make sure Ajax could complete whatever it does
+       static long defaultSleepInterval = 1000;
+
+       public static void inputText(WebDriver driver, String search,
+                       String inputText) throws Exception {
+               WebElement element = SeleniumUtils.findElement(driver, search, 
true, true);
+
+               //clear text before adding input
+               element.clear();
+
+               // Would make send to check if this element is really an input 
text
+               element.sendKeys(inputText);
+       }
+
+       public static void click(WebDriver driver, String search) throws 
Exception {
+               WebElement element = SeleniumUtils.findElement(driver, search, 
true, true);
+               element.click();
+       }
+
+       /**
+        *
+        * @param driver
+        * @param search
+        * @param throwException
+        *            under some circumstance you do't want to exit the test 
here
+        * @return
+        * @throws Exception
+        */
+       public static List<WebElement> findElements(WebDriver driver, String 
search,
+                       boolean throwException) throws Exception {
+               for (int i = 0; i < numberOfRetries; i++) {
+                       List<WebElement> elements = _findElement(driver, 
search);
+                       if (elements != null) {
+                               return elements;
+                       }
+
+                       Thread.sleep(defaultSleepInterval);
+               }
+
+               if (throwException) {
+                       throw new Exception("Could not find element with 
specified path "
+                                       + search);
+               }
+
+               return null;
+       }
+
+       /**
+        *
+        * @param driver
+        * @param search
+        * @param throwException
+        *            under some circumstance you do't want to exit the test 
here
+        * @param onlyReturnVisisbleElement TODO
+        * @return
+        * @throws Exception
+        */
+       public static WebElement findElement(WebDriver driver, String search,
+                       boolean throwException, boolean 
onlyReturnVisisbleElement) throws Exception {
+               for (int i = 0; i < numberOfRetries; i++) {
+                       List<WebElement> elements = _findElement(driver, 
search);
+                       if (elements != null) {
+
+                               if (!onlyReturnVisisbleElement) {
+                                       return elements.get(0);
+                               }
+
+                               for (WebElement element : elements) {
+                                       if (element.isDisplayed()) {
+                                               return element;
+                                       }
+                               }
+
+                       }
+
+                       Thread.sleep(defaultSleepInterval);
+               }
+
+               if (throwException) {
+                       throw new Exception("Could not find element with 
specified path "
+                                       + search);
+               }
+
+               return null;
+       }
+
+       private static By[] _getSearchArray(String search) {
+               //If xpath we have to use it, if xpath is used with 
By.className(...) there will be an exception
+               if (search.startsWith("//")) {
+                       return new By[] { By.xpath(search) };
+               } else {
+                       return new By[] { By.id(search), By.name(search), 
By.className(search),
+                                       By.tagName(search), By.xpath(search) };
+               }
+       }
+
+       private static List<WebElement> _findElement(WebDriver driver, String 
search) {
+               for (By by : _getSearchArray(search)) {
+                       try {
+                               List<WebElement> elements = 
driver.findElements(by);
+                               if (elements != null && elements.size() > 0) {
+                                       return elements;
+                               }
+                       } catch (Exception e) {
+                               // Do not show any warnings
+                       }
+               }
+               return null;
+       }
+
+       public static void elementExists(WebDriver driver, String search,
+                       boolean shouldExist) throws Exception {
+               Thread.sleep(defaultSleepInterval);
+
+               boolean doesExist = !shouldExist;
+
+               for (int i = 0; i < numberOfRetries; i++) {
+                       doesExist = checkExists(driver, search);
+                       if (doesExist == shouldExist) {
+                               break;
+                       }
+
+                       Thread.sleep(defaultSleepInterval);
+               }
+
+               if (doesExist != shouldExist) {
+                       if (shouldExist) {
+                               throw new Exception("Element could not be 
found: " + search);
+                       } else {
+                               throw new Exception("Unexpected Element was 
found: " + search);
+                       }
+               }
+       }
+
+       private static boolean checkExists(WebDriver driver, String search) {
+               for (By by : _getSearchArray(search)) {
+                       try {
+                               List<WebElement> element = 
driver.findElements(by);
+                               if (element.size() > 0) {
+                                       return true;
+                               }
+                       } catch (Exception e) {
+                               // Do not show any warnings
+                       }
+               }
+               return false;
+       }
+
+       public static void makeScreenShot(String testName, Exception e,
+                       WebDriver driver) {
+               try {
+                       DateFormat df = new 
SimpleDateFormat("MM-dd-yyyy_HH-mm-ss");
+                       String fileName = e.getMessage().replace(" ", "_");
+                       fileName = fileName.replaceAll("(\r\n|\n)", "");
+                       fileName = fileName.replaceAll("/", "");
+
+                       if (fileName.length() > 100) {
+                               fileName = fileName.substring(0, 100);
+                       }
+
+                       fileName = fileName + "_" + df.format(new Date()) + 
".png";
+                       File screenShotFile = ((TakesScreenshot) driver)
+                                       .getScreenshotAs(OutputType.FILE);
+
+                       String path = "." + File.separatorChar + "build"
+                                       + File.separatorChar + "screenshots" + 
File.separatorChar
+                                       + testName;
+
+                       File screenshotFolder = new File(path);
+                       if (!screenshotFolder.exists()) {
+                               screenshotFolder.mkdirs();
+                       }
+
+                       System.out.println("screenshot copy from: "
+                                       + screenShotFile.getAbsolutePath());
+                       System.out.println("Length Filename: " + 
fileName.length()
+                                       + " - Writing screenshot to: " + path + 
File.separatorChar
+                                       + fileName);
+
+                       FileUtils.moveFile(screenShotFile, new File(path
+                                       + File.separatorChar + fileName));
+               } catch (Exception err) {
+                       log.error("Error", err);
+               }
+
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/TestSignUp.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/TestSignUp.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/TestSignUp.java
new file mode 100644
index 0000000..0716d81
--- /dev/null
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/test/selenium/TestSignUp.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.test.selenium;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openqa.selenium.Alert;
+import org.openqa.selenium.WebElement;
+
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
+
+public class TestSignUp extends AbstractTestDefaults {
+       String pass = "pass";
+
+       @Override
+       public boolean getDoTearDownAfterTest() {
+               return false;
+       }
+
+       @Test
+       public void testSignUp() throws Exception {
+               try {
+                       driver.get(getBASE_URL());
+
+                       String currentRandomCounter = "" + ((new 
Date().getTime())/1000);
+                       String userName = "seba" + currentRandomCounter;
+                       String email = "hans." + currentRandomCounter + 
"@openmeetings.apache.org";
+
+                       super.testIsInstalledAndDoInstallation();
+
+                       WebElement signUpButton = 
SeleniumUtils.findElement(driver,
+                                       "//button[span[contains(text(), '" + 
getString("123") + "')]]", true, true);
+                       signUpButton.click();
+
+                       // ##################################
+                       // Test validation message for passwords to be identical
+                       // ##################################
+                       doSignUp("Hans","Muster", userName, "pw", "pw2", email);
+
+                       //Find Error label-id 232 "Please enter two identical 
passwords"
+                       SeleniumUtils.findElement(driver, 
"//span[@class='feedbackPanelERROR'][contains(text(), '" + getString("232") + 
"')]", true, true);
+
+                       // ##################################
+                       // Sign up with user and sign in
+                       // ##################################
+                       doSignUp("Hans","Muster", userName, pass, pass, email);
+
+                       //Check for popup with success message and email to 
check
+                       SeleniumUtils.findElement(driver, 
"//span[contains(text(), '" + getString("warn.notverified") + "')]", true, 
true);
+
+                       //click button to close popup
+                       WebElement signUpSucessPopUpOkButton = 
SeleniumUtils.findElement(driver,
+                                       "//button[span[contains(text(), '" + 
DialogButtons.OK.toString() + "')]]", true, true);
+                       signUpSucessPopUpOkButton.click();
+
+                       //Login with user
+                       SeleniumUtils.inputText(driver, "login", userName);
+                       SeleniumUtils.inputText(driver, "pass", pass);
+
+                       //click labelid 112 "Sign In"
+                       WebElement signInButton = 
SeleniumUtils.findElement(driver,
+                                       "//button[span[contains(text(), '" + 
getString("112") + "')]]", true, true);
+                       signInButton.click();
+
+                       // check for some text in dashbaord, labelid 281, "Help 
and support"
+                       SeleniumUtils.elementExists(driver,
+                                       "//h3[contains(text(), '" + 
getString("281") + "')]", true);
+
+                       //sign out
+                       WebElement signOutLink = 
SeleniumUtils.findElement(driver,
+                                       "//a[contains(text(), '" + 
getString("310") + "')]", true, true);
+                       signOutLink.click();
+
+                       Alert alert = driver.switchTo().alert();
+                       alert.accept();
+
+                       // ##################################
+                       // Sign up with same user and email and check duplicate 
messages
+                       // ##################################
+
+                       signUpButton = SeleniumUtils.findElement(driver,
+                                       "//button[span[contains(text(), '" + 
getString("123") + "')]]", true, true);
+                       signUpButton.click();
+
+                       doSignUp("Hans","Muster", userName, pass, pass, email);
+
+                       SeleniumUtils.findElement(driver, 
"//span[@class='feedbackPanelERROR'][contains(text(), '" + 
getString("error.login.inuse") + "')]", true, true);
+
+                       SeleniumUtils.findElement(driver, 
"//span[@class='feedbackPanelERROR'][contains(text(), '" + 
getString("error.email.inuse") + "')]", true, true);
+               } catch (Exception e) {
+                       
SeleniumUtils.makeScreenShot(this.getClass().getSimpleName(), e,
+                                       driver);
+                       throw e;
+               }
+       }
+
+       private void doSignUp(String firstName, String lastName, String login, 
String password,
+                                       String confirmPassword, String email) 
throws Exception {
+
+               SeleniumUtils.inputText(driver, "firstName", firstName);
+               SeleniumUtils.inputText(driver, "lastName", lastName);
+               SeleniumUtils.inputText(driver, "//input[@name='login']", 
login);
+               SeleniumUtils.inputText(driver, "password", password);
+               SeleniumUtils.inputText(driver, "confirmPassword", 
confirmPassword);
+               SeleniumUtils.inputText(driver, "email", email);
+
+               WebElement submitButton = SeleniumUtils.findElement(driver,
+                               "//button[span[contains(text(), 'Register')]]", 
true, true);
+               submitButton.click();
+       }
+}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/user/TestUserGroup.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/user/TestUserGroup.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/user/TestUserGroup.java
index 1892e13..82bdd36 100644
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/user/TestUserGroup.java
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/user/TestUserGroup.java
@@ -32,7 +32,7 @@ import org.apache.openmeetings.db.dao.user.UserDao;
 import org.apache.openmeetings.db.entity.user.Group;
 import org.apache.openmeetings.db.entity.user.GroupUser;
 import org.apache.openmeetings.db.entity.user.User;
-import org.apache.openmeetings.selenium.HeavyTests;
+import org.apache.openmeetings.test.HeavyTests;
 import org.apache.openmeetings.util.OmException;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/ac077c5f/openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java
index c662950..0e10173 100644
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java
@@ -32,7 +32,7 @@ import org.apache.openmeetings.db.dto.basic.ServiceResult;
 import org.apache.openmeetings.db.dto.file.FileExplorerObject;
 import org.apache.openmeetings.db.dto.file.FileItemDTO;
 import org.apache.openmeetings.db.entity.file.BaseFileItem;
-import org.apache.openmeetings.util.NonJenkinsTests;
+import org.apache.openmeetings.test.NonJenkinsTests;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 

Reply via email to