continue work on selenium test with id rather than label

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1138210 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-06-21 22:13:49 +00:00
parent 1666960349
commit 8095a5ff97
8 changed files with 21 additions and 15 deletions

View File

@ -154,7 +154,7 @@ public abstract class AbstractUpdatePolicy
if ( !localFile.exists() )
{
// No file means it's ok.
log.debug( "OK to update " + getUpdateMode() + ", local file does not exist." );
log.debug( "OK to update {}, local file does not exist.", getUpdateMode() );
return;
}

View File

@ -434,12 +434,15 @@ public abstract class AbstractArchivaTest
public void assertFindArtifactPage()
{
assertPage( "Apache Archiva \\ Find Artifact" );
assertTextPresent( "Find Artifact" );
assertTextPresent( "Search for:" );
assertTextPresent( "Checksum:" );
assertElementPresent( "q" );
assertButtonWithValuePresent( "Search" );
//assertPage( "Apache Archiva \\ Find Artifact" );
assertElementPresent( "searchBox" );
//assertTextPresent( "Find Artifact" );
//assertTextPresent( "Search for:" );
//assertTextPresent( "Checksum:" );
assertElementPresent( "quickSearchValue" );
assertElementPresent( "searchHint" );
//assertButtonWithValuePresent( "Search" );
assertElementPresent( "quickSearchSubmit" );
}
// Appearance
@ -490,14 +493,18 @@ public abstract class AbstractArchivaTest
"Upload Artifact,Group Id*:,Artifact Id*:,Version*:,Packaging*:,Classifier:,Generate Maven 2 POM,Artifact File*:,POM File:,Repository Id:";
String[] arrayArtifact = artifact.split( "," );
for ( String arrayartifact : arrayArtifact )
{
assertTextPresent( arrayartifact );
}
String artifactElements =
"upload_groupId,upload_artifactId,upload_version,upload_packaging,upload_classifier,upload_generatePom,upload_artifact,upload_pom,upload_repositoryId,upload_0";
"upload_groupId,upload_artifactId,upload_version,upload_packaging,upload_classifier,upload_generatePom,upload_artifact,upload_pom,upload_repositoryId,uploadSubmit";
String[] arrayArtifactElements = artifactElements.split( "," );
for ( String artifactelements : arrayArtifactElements )
{
assertElementPresent( artifactelements );
}
}
public void addArtifact( String groupId, String artifactId, String version, String packaging,
String artifactFilePath, String repositoryId )

View File

@ -52,8 +52,7 @@ public abstract class AbstractSearchTest
{
goToSearchPage();
getSelenium().type( "dom=document.forms[1].elements[0]", artifactId );
//clickButtonWithValue( "Search" );
setFieldValue( "quickSearchValue", artifactId );
clickButtonWithLocator( "quickSearchSubmit" );
}

View File

@ -169,7 +169,7 @@
<props>
<prop key="org.quartz.scheduler.instanceName">scheduler1</prop>
<prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
<prop key="org.quartz.threadPool.threadCount">1</prop>
<prop key="org.quartz.threadPool.threadCount">2</prop>
<prop key="org.quartz.threadPool.threadPriority">4</prop>
<prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
</props>

View File

@ -226,7 +226,7 @@
<td><s:checkbox name="scanAll" value="scanAll"/>Process All Artifacts</td>
</tr>
<tr>
<td><s:submit value="Scan Repository Now"/></td>
<td><s:submit value="Scan Repository Now" id="scanRepoNow%{#attr.repository.id}"/></td>
</tr>
</table>
</s:form>

View File

@ -80,7 +80,7 @@
<div id="topSearchBox">
<s:form method="get" action="quickSearch" namespace="/" validate="true">
<s:form method="get" action="quickSearch" namespace="/" validate="true" id="quickSearchBoxForm">
<s:textfield id="quickSearchBox" label="Search for" size="30" name="q"/>
</s:form>
</div>

View File

@ -95,7 +95,7 @@
<c:url var="iconCreateUrl" value="/images/icons/create.png" />
<s:form method="get" id="quickSearch" action="quickSearch" validate="true">
<s:textfield label="Search for" size="50" name="q"/>
<s:textfield label="Search for" size="50" name="q" id="quickSearchValue"/>
<s:hidden name="completeQueryString" value="%{completeQueryString}"/>
<s:submit value="Search" id="quickSearchSubmit"/>
</s:form>

View File

@ -115,7 +115,7 @@
<s:submit label="Go!"/>
</s:form>
<script type="text/javascript">
document.getElementById("quickSearch_q").focus();
document.getElementById("quickSearchValue").focus();
</script>
</c:if>