archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Punzalan <epunza...@exist.com>
Subject Re: svn commit: r472367 [1/2] - in /maven/archiva/trunk/archiva-webapp-test: ./ src/ src/test/ src/test/it/ src/test/it/org/ src/test/it/org/apache/ src/test/it/org/apache/maven/ src/test/it/org/apache/maven/archiva/ src/test/it/org/apache/maven/archiva/we...
Date Wed, 08 Nov 2006 15:12:19 GMT
Thanks evenisse, I'll change what you've raised so far


^_^

Emmanuel Venisse wrote:
>> +    <dependency>
>> +      <groupId>org.openqa.selenium.client-drivers</groupId>
>> +      <artifactId>selenium-java-client-driver</artifactId>
>> +      <version>0.8.1</version>
>> +      <scope>test</scope>
>> +    </dependency>
>> +    <dependency>
>> +      <groupId>org.openqa.selenium.client-drivers</groupId>
>> +      <artifactId>selenium-java-client-driver</artifactId>
>> +      <version>0.8.1</version>
>> +      <scope>test</scope>
>> +    </dependency>
>> +    <dependency>
>> +      <groupId>org.openqa.selenium.server</groupId>
>> +      <artifactId>selenium-server</artifactId>
>> +      <version>0.8.1</version>
>> +      <scope>test</scope>
>> +    </dependency>
>
> These dependencies are already in maven-web-ui-tests
>
> [...]
>
>> +    protected String getInceptionYear()
>> +    {
>> +        return "2005";
>> +    }
>
> It should be 2006.
>
> [...]
>
>> +
>> +    //////////////////////////////////////
>> +    // Login
>> +    //////////////////////////////////////
>> +    public void assertLoginPage()
>> +    {
>> +        assertPage( "Maven Archiva :: Login Page" );
>> +        assertTextPresent( "Login" );
>> +        assertTextPresent( "Username" );
>> +        assertTextPresent( "Password" );
>> +        assertTextPresent( "Remember Me" );
>> +        assertFalse( isChecked( "rememberMe" ) );
>> +    }
>
> This method is already in AbstractSeleniumTestCase
>
> [...]
>
>> +    private void createUser( String username, String password )
>> +    {
>> +        Selenium sel = getSelenium();
>> +
>> +        sel.open( "/archiva/security/login.action" );
>> +        submitLoginPage( adminUsername, adminPassword );
>> +
>> +        sel.open( "/archiva/security/userlist.action" );
>> +        assertPage( "Maven Archiva :: [Admin] User List" );
>> +        assertTextNotPresent( username );
>> +        sel.open( "/archiva/security/usercreate!show.action" );
>> +        assertPage( "Maven Archiva :: [Admin] User Create" );
>> +        sel.type( "user.username", username );
>> +        sel.type( "user.fullName", username + " FullName" );
>> +        sel.type( "user.email", username + "@localhost.com" );
>> +        sel.type( "user.password", password );
>> +        sel.type( "user.confirmPassword", password );
>> +        sel.click( "//input[@type='submit' and @value='Create 
>> User']" );
>> +        waitPage();
>> +        assertPage( "Maven Archiva :: [Admin] User List" );
>> +        assertTextPresent( username );
>> +    }
>> +}
>
> I think it isn't a good idea to use sel.open() method. With it you 
> test that the url return a page but you don't test the link is present 
> in pages. I'd prefer you navigate from the home page to the page you 
> want with click on links like a user will do it generally.
>
> Emmanuel
>
>

Mime
View raw message