Permalink
Browse files

Test Fixes - portal/controlpanel/organizations

  • Loading branch information...
1 parent c31377d commit dab14d8d1f51bddcba50e5f2dbdb7137e820f1d1 @kenduenwald kenduenwald committed with brianchandotcom Apr 25, 2012
@@ -3,12 +3,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
- <title>Test Suite</title>
+ <title>AddOrganizationNameNullTests</title>
</head>
<body>
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
-<tr><td><b>Test Suite</b></td></tr>
-<tr><td><a href="AddOrganizationTest.html">AddOrganizationTest</a></td></tr>
+<tr><td><b>AddOrganizationNameNullTests</b></td></tr>
<tr><td><a href="AddOrganizationNameNullTest.html">AddOrganizationNameNullTest</a></td></tr>
<tr><td><a href="TearDownTest.html">TearDownTest</a></td></tr>
</tbody></table>
@@ -25,7 +25,6 @@
public class AddOrganizationNameNullTests extends BaseTestSuite {
public static Test suite() {
TestSuite testSuite = new TestSuite();
- testSuite.addTestSuite(AddOrganizationTest.class);
testSuite.addTestSuite(AddOrganizationNameNullTest.class);
testSuite.addTestSuite(TearDownTest.class);
@@ -1,108 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>AddOrganizationTest</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">AddOrganizationTest</td></tr>
-</thead><tbody>
-<tr>
- <td>open</td>
- <td>/web/guest/home/</td>
- <td></td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>//li[@id='_145_mySites']/a/span</td>
- <td>Go to</td>
-</tr>
-<tr>
- <td>mouseOver</td>
- <td>//li[@id='_145_mySites']/a/span</td>
- <td>Go to</td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>link=Control Panel</td>
- <td>Control Panel</td>
-</tr>
-<tr>
- <td>clickAtAndWait</td>
- <td>link=Control Panel</td>
- <td>Control Panel</td>
-</tr>
-<tr>
- <td>clickAtAndWait</td>
- <td>link=Users and Organizations</td>
- <td>Users and Organizations</td>
-</tr>
-<tr>
- <td>clickAt</td>
- <td>link=Add</td>
- <td>Add</td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>//div[@class='lfr-component lfr-menu-list']/ul/li[2]/a</td>
- <td>Regular Organization</td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>//div[@class='lfr-component lfr-menu-list']/ul/li[2]/a</td>
- <td>Regular Organization</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>//div[@class='lfr-component lfr-menu-list']/ul/li[2]/a</td>
- <td>Regular Organization</td>
-</tr>
-<tr>
- <td>type</td>
- <td>//input[@id='_125_name']</td>
- <td>Selenium</td>
-</tr>
-<tr>
- <td>select</td>
- <td>//select[@id='_125_type']</td>
- <td>label=Regular Organization</td>
-</tr>
-<tr>
- <td>clickAtAndWait</td>
- <td>//input[@value='Save']</td>
- <td>Save</td>
-</tr>
-<tr>
- <td>waitForVisible</td>
- <td>//div[@class='portlet-msg-success']</td>
- <td>Your request completed successfully.</td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>//div[@class='portlet-msg-success']</td>
- <td>Your request completed successfully.</td>
-</tr>
-<tr>
- <td>clickAtAndWait</td>
- <td>link=View All</td>
- <td>View All</td>
-</tr>
-<tr>
- <td>type</td>
- <td>//input[@name='_125_keywords']</td>
- <td>Selenium</td>
-</tr>
-<tr>
- <td>clickAtAndWait</td>
- <td>//input[@value='Search']</td>
- <td>Search</td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>//a[2]/strong</td>
- <td>Selenium</td>
-</tr>
-</tbody></table>
-</body>
-</html>
@@ -1,121 +0,0 @@
-/**
- * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
- *
- * This library 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 library 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.
- */
-
-package com.liferay.portalweb.portal.controlpanel.organizations.organization.addorganizationnamenull;
-
-import com.liferay.portalweb.portal.BaseTestCase;
-import com.liferay.portalweb.portal.util.RuntimeVariables;
-
-/**
- * @author Brian Wing Shun Chan
- */
-public class AddOrganizationTest extends BaseTestCase {
- public void testAddOrganization() throws Exception {
- selenium.open("/web/guest/home/");
- loadRequiredJavaScriptModules();
- assertEquals(RuntimeVariables.replace("Go to"),
- selenium.getText("//li[@id='_145_mySites']/a/span"));
- selenium.mouseOver("//li[@id='_145_mySites']/a/span");
-
- for (int second = 0;; second++) {
- if (second >= 90) {
- fail("timeout");
- }
-
- try {
- if (selenium.isVisible("link=Control Panel")) {
- break;
- }
- }
- catch (Exception e) {
- }
-
- Thread.sleep(1000);
- }
-
- selenium.clickAt("link=Control Panel",
- RuntimeVariables.replace("Control Panel"));
- selenium.waitForPageToLoad("30000");
- loadRequiredJavaScriptModules();
- selenium.clickAt("link=Users and Organizations",
- RuntimeVariables.replace("Users and Organizations"));
- selenium.waitForPageToLoad("30000");
- loadRequiredJavaScriptModules();
- selenium.clickAt("link=Add", RuntimeVariables.replace("Add"));
-
- for (int second = 0;; second++) {
- if (second >= 90) {
- fail("timeout");
- }
-
- try {
- if (selenium.isVisible(
- "//div[@class='lfr-component lfr-menu-list']/ul/li[2]/a")) {
- break;
- }
- }
- catch (Exception e) {
- }
-
- Thread.sleep(1000);
- }
-
- assertEquals(RuntimeVariables.replace("Regular Organization"),
- selenium.getText(
- "//div[@class='lfr-component lfr-menu-list']/ul/li[2]/a"));
- selenium.click(RuntimeVariables.replace(
- "//div[@class='lfr-component lfr-menu-list']/ul/li[2]/a"));
- selenium.waitForPageToLoad("30000");
- loadRequiredJavaScriptModules();
- selenium.type("//input[@id='_125_name']",
- RuntimeVariables.replace("Selenium"));
- selenium.select("//select[@id='_125_type']",
- RuntimeVariables.replace("label=Regular Organization"));
- selenium.clickAt("//input[@value='Save']",
- RuntimeVariables.replace("Save"));
- selenium.waitForPageToLoad("30000");
- loadRequiredJavaScriptModules();
-
- for (int second = 0;; second++) {
- if (second >= 90) {
- fail("timeout");
- }
-
- try {
- if (selenium.isVisible("//div[@class='portlet-msg-success']")) {
- break;
- }
- }
- catch (Exception e) {
- }
-
- Thread.sleep(1000);
- }
-
- assertEquals(RuntimeVariables.replace(
- "Your request completed successfully."),
- selenium.getText("//div[@class='portlet-msg-success']"));
- selenium.clickAt("link=View All", RuntimeVariables.replace("View All"));
- selenium.waitForPageToLoad("30000");
- loadRequiredJavaScriptModules();
- selenium.type("//input[@name='_125_keywords']",
- RuntimeVariables.replace("Selenium"));
- selenium.clickAt("//input[@value='Search']",
- RuntimeVariables.replace("Search"));
- selenium.waitForPageToLoad("30000");
- loadRequiredJavaScriptModules();
- assertEquals(RuntimeVariables.replace("Selenium"),
- selenium.getText("//a[2]/strong"));
- }
-}

0 comments on commit dab14d8

Please sign in to comment.