continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsm...@apache.org
Subject svn commit: r752530 [2/2] - in /continuum/trunk/continuum-webapp-test: ./ src/test/resources/ src/test/testng/ src/test/testng/config/ src/test/testng/org/ src/test/testng/org/apache/ src/test/testng/org/apache/continuum/ src/test/testng/org/apache/con...
Date Wed, 11 Mar 2009 17:12:07 GMT
Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java?rev=752530&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
Wed Mar 11 17:12:06 2009
@@ -0,0 +1,600 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.
+ */
+
+import org.testng.annotations.Test;
+
+/**
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "notifier" }, dependsOnMethods = { "testAddMavenTwoProject" } )
+public class NotifierTest
+    extends AbstractContinuumTest
+{
+    public void testAddValidMailProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MAIL_NOTIFIER_ADDRESS, true
);
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMailProjectNotifier" } )
+    public void testEditValidMailProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String newMail = "newmail@mail.com";
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MAIL_NOTIFIER_ADDRESS, newMail,
true );
+        editMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, newMail, MAIL_NOTIFIER_ADDRESS,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMailProjectNotifier" } )
+    public void testEditInvalidMailProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MAIL_NOTIFIER_ADDRESS, "invalid_email_add",
false );
+    }
+
+    public void testAddInvalidMailProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "invalid_email_add", false
);
+    }
+
+    public void testAddValidMailGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addMailNotifier( TEST_PROJ_GRP_NAME, null, MAIL_NOTIFIER_ADDRESS, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMailGroupNotifier" } )
+    public void testEditValidMailGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String newMail = "newmail@mail.com";
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editMailNotifier( TEST_PROJ_GRP_NAME, null, MAIL_NOTIFIER_ADDRESS, newMail, true
);
+        editMailNotifier( TEST_PROJ_GRP_NAME, null, newMail, MAIL_NOTIFIER_ADDRESS, true
);
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMailGroupNotifier" } )
+    public void testEditInvalidMailGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editMailNotifier( TEST_PROJ_GRP_NAME, null, MAIL_NOTIFIER_ADDRESS, "invalid_email_add",
false );
+    }
+
+    public void testAddInvalidMailGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addMailNotifier( TEST_PROJ_GRP_NAME, null, "invalid_email_add", false );
+    }
+
+    public void testAddValidIrcProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidIrcProjectNotifier" } )
+    public void testEditValidIrcProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String newHost = "new.test.com";
+        String newChannel = "new_test_channel";
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL,
newHost,
+                         newChannel, true );
+        editIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, newHost, newChannel, IRC_NOTIFIER_HOST,
+                         IRC_NOTIFIER_CHANNEL, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidIrcProjectNotifier" } )
+    public void testEditInvalidIrcProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL,
"", "", false );
+    }
+
+    public void testAddInvalidIrcProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", false );
+    }
+
+    public void testAddValidIrcGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addIrcNotifier( TEST_PROJ_GRP_NAME, null, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidIrcGroupNotifier" } )
+    public void testEditValidIrcGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String newHost = "new.test.com";
+        String newChannel = "new_test_channel";
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editIrcNotifier( TEST_PROJ_GRP_NAME, null, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL,
newHost, newChannel, true );
+        editIrcNotifier( TEST_PROJ_GRP_NAME, null, newHost, newChannel, IRC_NOTIFIER_HOST,
IRC_NOTIFIER_CHANNEL, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidIrcGroupNotifier" } )
+    public void testEditInvalidIrcGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editIrcNotifier( TEST_PROJ_GRP_NAME, null, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL,
"", "", false );
+    }
+
+    public void testAddInvalidIrcGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addIrcNotifier( TEST_PROJ_GRP_NAME, null, "", "", false );
+    }
+
+    public void testAddValidJabberProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
+                           JABBER_NOTIFIER_PASSWORD, JABBER_NOTIFIER_ADDRESS, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidJabberProjectNotifier" } )
+    public void testEditValidJabberProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String newHost = "new_test";
+        String newLogin = "new_test_login";
+        String newPassword = "new_password";
+        String newAddress = "new.test@mail.com";
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
+                            JABBER_NOTIFIER_ADDRESS, newHost, newLogin, newPassword, newAddress,
true );
+        editJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, newHost, newLogin, newAddress,
JABBER_NOTIFIER_HOST,
+                            JABBER_NOTIFIER_LOGIN, JABBER_NOTIFIER_PASSWORD, JABBER_NOTIFIER_ADDRESS,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidJabberProjectNotifier" } )
+    public void testEditInvalidJabberProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
+                            JABBER_NOTIFIER_ADDRESS, "", "", "", "", false );
+    }
+
+    public void testAddInvalidJabberProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", "", "", false );
+    }
+
+    public void testAddValidJabberGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addJabberNotifier( TEST_PROJ_GRP_NAME, null, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
+                           JABBER_NOTIFIER_PASSWORD, JABBER_NOTIFIER_ADDRESS, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidJabberGroupNotifier" } )
+    public void testEditValidJabberGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String newHost = "new_test";
+        String newLogin = "new_test_login";
+        String newPassword = "new_password";
+        String newAddress = "new.test@mail.com";
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editJabberNotifier( TEST_PROJ_GRP_NAME, null, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
+                            JABBER_NOTIFIER_ADDRESS, newHost, newLogin, newPassword, newAddress,
true );
+        editJabberNotifier( TEST_PROJ_GRP_NAME, null, newHost, newLogin, newAddress, JABBER_NOTIFIER_HOST,
+                            JABBER_NOTIFIER_LOGIN, JABBER_NOTIFIER_PASSWORD, JABBER_NOTIFIER_ADDRESS,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidJabberGroupNotifier" } )
+    public void testEditInvalidJabberGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editJabberNotifier( TEST_PROJ_GRP_NAME, null, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
+                            JABBER_NOTIFIER_ADDRESS, "", "", "", "", false );
+    }
+
+    public void testAddInvalidJabberGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addJabberNotifier( TEST_PROJ_GRP_NAME, null, "", "", "", "", false );
+    }
+
+    public void testAddValidMsnProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_PASSWORD,
+                        MSN_NOTIFIER_ADDRESS, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMsnProjectNotifier" } )
+    public void testEditValidMsnProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        String newLogin = "new_test_login";
+        String newPassword = "new_password";
+        String newAddress = "new.test@mail.com";
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_ADDRESS,
newLogin,
+                         newPassword, newAddress, true );
+        editMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, newLogin, newAddress, MSN_NOTIFIER_LOGIN,
+                         MSN_NOTIFIER_PASSWORD, MSN_NOTIFIER_ADDRESS, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMsnProjectNotifier" } )
+    public void testEditInvalidMsnProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_ADDRESS,
"", "", "",
+                         false );
+    }
+
+    public void testAddInvalidMsnProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", "", false );
+    }
+
+    public void testAddValidMsnGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addMsnNotifier( TEST_PROJ_GRP_NAME, null, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_PASSWORD,
MSN_NOTIFIER_ADDRESS, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMsnGroupNotifier" } )
+    public void testEditValidMsnGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        String newLogin = "new_test_login";
+        String newPassword = "new_password";
+        String newAddress = "new.test@mail.com";
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editMsnNotifier( TEST_PROJ_GRP_NAME, null, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_ADDRESS,
newLogin, newPassword,
+                         newAddress, true );
+        editMsnNotifier( TEST_PROJ_GRP_NAME, null, newLogin, newAddress, MSN_NOTIFIER_LOGIN,
MSN_NOTIFIER_PASSWORD,
+                         MSN_NOTIFIER_ADDRESS, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidMsnGroupNotifier" } )
+    public void testEditInvalidMsnGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editMsnNotifier( TEST_PROJ_GRP_NAME, null, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_ADDRESS,
"", "", "", false );
+    }
+
+    public void testAddInvalidMsnGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addMsnNotifier( TEST_PROJ_GRP_NAME, null, "", "", "", false );
+    }
+
+    public void testAddValidWagonProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addWagonNotifierPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, WAGON_NOTIFIER_URL, WAGON_SERVER_ID,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidWagonProjectNotifier" } )
+    public void testEditValidWagonProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String newId = "newId";
+        String newUrl = WAGON_NOTIFIER_URL;
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editWagonNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, WAGON_NOTIFIER_URL, WAGON_SERVER_ID,
newUrl, newId,
+                           true );
+        editWagonNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, newUrl, newId, WAGON_NOTIFIER_URL,
WAGON_SERVER_ID,
+                           true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidWagonProjectNotifier" } )
+    public void testEditInvalidWagonProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        editWagonNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, WAGON_NOTIFIER_URL, WAGON_SERVER_ID,
"", "", false );
+    }
+
+    public void testAddInvalidWagonProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        addWagonNotifierPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", false );
+    }
+
+    public void testAddValidWagonGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addWagonNotifierPage( TEST_PROJ_GRP_NAME, null, WAGON_NOTIFIER_URL, WAGON_SERVER_ID,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidWagonGroupNotifier" } )
+    public void testEditValidWagonGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String newId = "newId";
+        String newUrl = WAGON_NOTIFIER_URL;
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editWagonNotifier( TEST_PROJ_GRP_NAME, null, WAGON_NOTIFIER_URL, WAGON_SERVER_ID,
newUrl, newId, true );
+        editWagonNotifier( TEST_PROJ_GRP_NAME, null, newUrl, newId, WAGON_NOTIFIER_URL, WAGON_SERVER_ID,
true );
+    }
+
+    @Test( dependsOnMethods = { "testAddValidWagonGroupNotifier" } )
+    public void testEditInvalidWagonGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        editWagonNotifier( TEST_PROJ_GRP_NAME, null, WAGON_NOTIFIER_URL, WAGON_SERVER_ID,
"", "", false );
+    }
+
+    public void testAddInvalidWagonGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        addWagonNotifierPage( TEST_PROJ_GRP_NAME, null, "", "", false );
+    }
+
+    @Test( dependsOnMethods = { "testEditValidMailGroupNotifier", "testEditInvalidMailGroupNotifier"
} )
+    public void testDeleteGroupNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+        clickLinkWithXPath( "(//a[contains(@href,'deleteProjectGroupNotifier') and contains(@href,'mail')])//img"
);
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
+    }
+
+    @Test( dependsOnMethods = { "testEditValidMailProjectNotifier", "testEditInvalidMailProjectNotifier"
} )
+    public void testDeleteProjectNotifier()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
+        // Delete
+        clickLinkWithXPath( "(//a[contains(@href,'deleteProjectNotifier') and contains(@href,'mail')])//img"
);
+        assertProjectInformationPage();
+    }
+}

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java?rev=752530&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
Wed Mar 11 17:12:06 2009
@@ -0,0 +1,146 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.
+ */
+
+import org.testng.annotations.Test;
+
+/**
+ * Based on ProjectGroupTest of Emmanuel Venisse test.
+ *
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "projectGroup" }, dependsOnMethods = { "testWithCorrectUsernamePassword"
} )
+public class ProjectGroupTest
+    extends AbstractContinuumTest
+{
+
+    public void testAddProjectGroup()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+
+        addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION,
true);
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+    }
+
+    public void testAddProjectGroup2()
+        throws Exception
+    {
+        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+
+        addProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION,
true);
+        showProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION);
+    }
+
+    @Test( dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup"
} )
+    public void testMoveProject()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String DEFAULT_PROJ_GRP_NAME = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String DEFAULT_PROJ_GRP_ID = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String DEFAULT_PROJ_GRP_DESCRIPTION = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
+
+        // move the project of the test project group to the default project group
+        moveProjectToProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION,
+                                   DEFAULT_PROJ_GRP_NAME );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        assertTextNotPresent( "Member Projects" );
+        showProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION
);
+        assertTextPresent( "Member Projects" );
+        // Restore project to test test project group
+        moveProjectToProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION,
+                                   TEST_PROJ_GRP_NAME );
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        assertTextPresent( "Member Projects" );
+        showProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION
);
+        assertTextNotPresent( "Member Projects" );
+    }
+
+    public void testAddProjectGroupWithEmptyString()
+        throws Exception
+    {
+        addProjectGroup( "", "", "", false);
+        assertTextPresent( "Project Group Name is required." );
+        assertTextPresent( "Project Group ID is required." );
+    }
+
+    public void testAddProjectGroupWithWhitespaceString()
+        throws Exception
+    {
+        addProjectGroup( " ", " ", " ", false);
+        assertTextPresent( "Project Group Name cannot contain spaces only." );
+        assertTextPresent( "Project Group ID cannot contain spaces only." );
+    }
+
+    @Test( dependsOnMethods = { "testAddProjectGroup2" } )
+    public void testEditProjectGroupWithValidValues()
+        throws Exception
+    {
+        final String sNewProjectName = "New Project Group Name";
+        final String sNewProjectDescription = "New Project Group Description";
+
+        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+
+        editProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION,
sNewProjectName,
+                          sNewProjectDescription );
+        assertProjectGroupSummaryPage( sNewProjectName, TEST2_PROJ_GRP_ID, sNewProjectDescription
);
+
+        editProjectGroup( sNewProjectName, TEST2_PROJ_GRP_ID, sNewProjectDescription, TEST2_PROJ_GRP_NAME,
TEST2_PROJ_GRP_DESCRIPTION);
+        assertProjectGroupSummaryPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION
);
+    }
+
+    @Test( dependsOnMethods = { "testAddProjectGroup2" } )
+    public void testEditProjectGroupWithInvalidValues()
+        throws Exception
+    {
+
+        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+
+        // TODO: BUG: Operations Result is a blank page
+        //editProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION,
"",
+        //                  TEST2_PROJ_GRP_DESCRIPTION + "_2" );
+        //assertTextPresent( "Project Group Name required." );
+    }
+
+    @Test( dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup"
} )
+    public void testProjectGroupAllBuildSuccess()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+
+        buildProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+        clickButtonWithValue( "Release" );
+        assertReleaseSuccess();
+    }
+}

Added: continuum/trunk/continuum-webapp-test/testng-pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/testng-pom.xml?rev=752530&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/testng-pom.xml (added)
+++ continuum/trunk/continuum-webapp-test/testng-pom.xml Wed Mar 11 17:12:06 2009
@@ -0,0 +1,122 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.continuum</groupId>
+    <artifactId>continuum</artifactId>
+    <version>1.3.2-SNAPSHOT</version>
+  </parent>
+  <artifactId>continuum-webapp-test</artifactId>
+  <name>Continuum Webapp Test</name>
+  <packaging>pom</packaging>
+
+  <build>
+    <testSourceDirectory>src/test/testng</testSourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <verbose>true</verbose>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>testCompile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>testResources</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>selenium-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>start-server</goal>
+            </goals>
+            <configuration>
+              <background>true</background>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <suiteXmlFiles>
+            <suiteXmlFile>src/test/testng/config/testng.xml</suiteXmlFile>
+          </suiteXmlFiles>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-tests</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.8</version>
+      <scope>test</scope>
+      <classifier>jdk15</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.openqa.selenium.client-drivers</groupId>
+      <artifactId>selenium-java-client-driver</artifactId>
+      <version>0.9.2</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <!-- dependencies below are for code in src/test/it -->
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.openqa.selenium.server</groupId>
+      <artifactId>selenium-server</artifactId>
+      <version>0.9.2</version>
+    </dependency>
+  </dependencies>
+</project>



Mime
View raw message