Return-Path: X-Original-To: apmail-continuum-commits-archive@www.apache.org Delivered-To: apmail-continuum-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B68DD41F for ; Mon, 8 Oct 2012 08:16:12 +0000 (UTC) Received: (qmail 9692 invoked by uid 500); 8 Oct 2012 08:16:12 -0000 Delivered-To: apmail-continuum-commits-archive@continuum.apache.org Received: (qmail 9602 invoked by uid 500); 8 Oct 2012 08:16:10 -0000 Mailing-List: contact commits-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list commits@continuum.apache.org Received: (qmail 9575 invoked by uid 99); 8 Oct 2012 08:16:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 08:16:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 08:16:07 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6299123888E3 for ; Mon, 8 Oct 2012 08:15:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1395466 - in /continuum/trunk: continuum-webapp-test/src/test/resources/ continuum-webapp-test/src/test/testng/config/ continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ continuum-webapp/src/main/webapp/WEB-INF/jsp/ Date: Mon, 08 Oct 2012 08:15:18 -0000 To: commits@continuum.apache.org From: brett@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121008081518.6299123888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: brett Date: Mon Oct 8 08:15:17 2012 New Revision: 1395466 URL: http://svn.apache.org/viewvc?rev=1395466&view=rev Log: [CONTINUUM-2675] correct error when deleting build results Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildResultTest.java Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=1395466&r1=1395465&r2=1395466&view=diff ============================================================================== --- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original) +++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Mon Oct 8 08:15:17 2012 @@ -222,6 +222,12 @@ BUILD_DEFINITION_DESCRIPTION=Maven Build BUILD_QUEUE_NAME=name_build_queue QUEUE_SCHEDULE_NAME=queue_schedule +# Build result tests + +BUILD_RESULT_PROJECT_GROUP_NAME=Build Result Test Project Group +BUILD_RESULT_PROJECT_GROUP_ID=org.apache.continuum.examples.buildresult +BUILD_RESULT_PROJECT_GROUP_DESCRIPTION=Test project group for the build result project group tests + ##### DEFAULT_PROJ_GRP_NAME=Default Project Group Modified: continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml?rev=1395466&r1=1395465&r2=1395466&view=diff ============================================================================== --- continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml (original) +++ continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml Mon Oct 8 08:15:17 2012 @@ -65,6 +65,7 @@ + Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildResultTest.java URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildResultTest.java?rev=1395466&view=auto ============================================================================== --- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildResultTest.java (added) +++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildResultTest.java Mon Oct 8 08:15:17 2012 @@ -0,0 +1,81 @@ +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.apache.continuum.web.test.parent.AbstractAdminTest; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +@Test( groups = { "buildResult" } ) +public class BuildResultTest + extends AbstractAdminTest +{ + private String projectGroupName; + + private String projectGroupId; + + private String projectGroupDescription; + + private String projectName; + + @BeforeClass + public void createProject() + { + projectGroupName = getProperty( "BUILD_RESULT_PROJECT_GROUP_NAME" ); + projectGroupId = getProperty( "BUILD_RESULT_PROJECT_GROUP_ID" ); + projectGroupDescription = getProperty( "BUILD_RESULT_PROJECT_GROUP_DESCRIPTION" ); + + projectName = getProperty( "MAVEN2_POM_PROJECT_NAME" ); + String projectPomUrl = getProperty( "MAVEN2_POM_URL" ); + String pomUsername = getProperty( "MAVEN2_POM_USERNAME" ); + String pomPassword = getProperty( "MAVEN2_POM_PASSWORD" ); + + loginAsAdmin(); + addProjectGroup( projectGroupName, projectGroupId, projectGroupDescription, true, false ); + clickLinkWithText( projectGroupName ); + if ( !isLinkPresent( projectName ) ) + { + addMavenTwoProject( projectPomUrl, pomUsername, pomPassword, projectGroupName, true ); + } + } + + public void testDeleteBuildResult() + { + buildProjectGroup( projectGroupName, projectGroupId, projectGroupDescription, projectName, true ); + + // go to build results page + clickAndWait( "css=img[title='Build History']" ); + + assertPage( "Continuum - Build results" ); + assertElementPresent( "css=tbody.tableBody tr" ); + + assertElementPresent( "selectedBuildResults_selector" ); + getSelenium().click( "selectedBuildResults_selector" ); + clickButtonWithValue( "Delete" ); + + assertPage( "Continuum - Delete Build Results" ); + + clickButtonWithValue( "Delete" ); + + assertPage( "Continuum - Build results" ); + assertElementNotPresent( "css=tbody.tableBody tr" ); + } + +} Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp?rev=1395466&r1=1395465&r2=1395466&view=diff ============================================================================== --- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp (original) +++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp Mon Oct 8 08:15:17 2012 @@ -52,6 +52,8 @@
+ + - - " onclick="document.forms.buildResultsForm.submit();" />