*{ You can use plain selenium command using the selenium tag }* #{fixture delete:'all', load:'functional/test-data.yml' /} #{selenium 'check signup page'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) assertNotTitle('Application error') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'missing full name'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) clickAndWait('signup') assertTextPresent('Full Name is required') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'very short user name'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.fullName','ab') clickAndWait('signup') assertTextPresent('Minimum size is 3') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'very long user name'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.fullName','somethinglargerthansixtycharacters somethinglargerthansixtycharacters somethinglargerthansixtycharacters') clickAndWait('signup') assertTextPresent('Maximum size is 60') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'missing password'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) clickAndWait('signup') assertTextPresent('Password is required') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'very short password'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.password','ab') clickAndWait('signup') assertTextPresent('Minimum size is 5') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'very long password'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.password','somethinglargerthantwentycharacters') clickAndWait('signup') assertTextPresent('Maximum size is 20') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'invalid password'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.password','$ecretc@de') clickAndWait('signup') assertTextPresent('Password can only contain alphabets or numbers') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'missing email address'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) clickAndWait('signup') assertTextPresent('Email address is required') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'invalid email'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.email','invalidemail.com') clickAndWait('signup') assertTextPresent('Invalid email address') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'existing user'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.fullName', 'Rahul Jain') type('user.email','rahulj51@gmail.com') type('user.password','something') clickAndWait('signup') assertTextPresent('User rahulj51@gmail.com already exists') assertTitle('PayMePayYou - Signup') #{/selenium} #{selenium 'valid signup'} clearSession() // Open the home page, and check that no error occured open('/signup') waitForPageToLoad(1000) type('user.fullName', 'Dorian Gray') type('user.email','dorain@ow.com') type('user.password','picture') clickAndWait('signup') assertTextPresent('Congratulations!') assertTitle('PayMePayYou - Signup Success') #{/selenium}