org.itracker.selenium
Class ForgotPasswordTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.itracker.AbstractDependencyInjectionTest
                              extended by org.itracker.selenium.AbstractSeleniumTestCase
                                  extended by org.itracker.selenium.ForgotPasswordTest
All Implemented Interfaces:
junit.framework.Test

public class ForgotPasswordTest
extends AbstractSeleniumTestCase

Verifies the ability retrieve/reset forgotten password.

Author:
Andrey Sergievskiy

Field Summary
 
Fields inherited from class org.itracker.selenium.AbstractSeleniumTestCase
applicationHost, applicationPath, applicationPort, SE_TIMEOUT, selenium, SMTP_PORT, smtpServer
 
Fields inherited from class org.itracker.AbstractDependencyInjectionTest
classLoader, dataSet
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
 
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests
applicationContext
 
Fields inherited from class org.springframework.test.ConditionalTestCase
logger
 
Constructor Summary
ForgotPasswordTest()
           
 
Method Summary
protected  String[] getConfigLocations()
           
protected  String[] getDataSetFiles()
          must make sure, that the order is correct, so no constraints will be violated.
 void testIfBothRequired()
          1.
 void testIfLastNameRequired()
          1.
 void testIfLoginRequired()
          1.
 void testRetrievingForgottenPassword()
          1.
 
Methods inherited from class org.itracker.selenium.AbstractSeleniumTestCase
closeSession
 
Methods inherited from class org.itracker.AbstractDependencyInjectionTest
callSetup, callTeardown, getDataSource, getSessionFactoryBean, onSetUp, onTearDown, resetConfiguration, setDataSource, setSessionFactoryBean
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty
 
Methods inherited from class org.springframework.test.ConditionalTestCase
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBare
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForgotPasswordTest

public ForgotPasswordTest()
Method Detail

testIfBothRequired

public void testIfBothRequired()
                        throws Exception
1. Go to the Login Page. 2. Leave all input fields (login and password) empty. 3. Click Login button. 4. Wait for page reload. 5. Check that "Login is required" and "Last Name is required" message appeared.

Throws:
Exception

testIfLoginRequired

public void testIfLoginRequired()
                         throws Exception
1. Go to the Login Page. 2. Type something into Last Name input field but leave Login empty. 3. Click Login button. 4. Wait for page reload. 5. Check that "Login is required" message has appeared.

Throws:
Exception

testIfLastNameRequired

public void testIfLastNameRequired()
                            throws Exception
1. Go to the Login Page. 2. Type something into Login input field but leave Last Name empty. 3. Click Login button. 4. Wait for page reload. 5. Check that "Last Name is required" message has appeared.

Throws:
Exception

testRetrievingForgottenPassword

public void testRetrievingForgottenPassword()
                                     throws Exception
1. Go to the Login Page. 2. Click "Forgot Password" link. 3. Wait for page reload. 4. Type valid login into Login input field. 5. Type valid last name into Last Name input field. 6. Click "Submit" button. 7. Wait for page reload. 8. Check that you was forwarded back to the Login Page. 9. Obtain email message from locally started mail server. 10. Extract a new password from there. 11. Redo a usual login procedure with a new password and make sure you can authorize to the system with it.

Throws:
Exception

getDataSetFiles

protected String[] getDataSetFiles()
Description copied from class: AbstractDependencyInjectionTest
must make sure, that the order is correct, so no constraints will be violated.

Specified by:
getDataSetFiles in class AbstractDependencyInjectionTest
Returns:

getConfigLocations

protected String[] getConfigLocations()
Overrides:
getConfigLocations in class org.springframework.test.AbstractSingleSpringContextTests


Copyright © 2002-2012 itracker. All Rights Reserved.