- Timestamp:
- May 30, 2011, 12:55:02 PM (13 years ago)
- Location:
- branches/features/purchaseOrders/test/functional
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/purchaseOrders/test/functional/GebReportingSpecBase.groovy
r949 r952 36 36 else loginButton.click(HomePage) 37 37 } 38 39 void logout() { 40 if(logoutButton) 41 logoutButton.click() 42 } 43 38 44 } -
branches/features/purchaseOrders/test/functional/LoginSpec.groovy
r951 r952 14 14 then: 15 15 at LoginPage 16 verifyLoggedOut() 16 17 } 17 18 … … 22 23 then: 23 24 at HomePage 25 verifyLoggedIn() 24 26 } 25 27 26 28 def "When we logout, we go to the logout page"() { 27 29 when: 28 logout .click()30 logout() 29 31 30 32 then: 31 33 at LogoutPage 34 verifyLoggedOut() 32 35 verifyLogoutMessage() 33 36 } … … 40 43 then: 41 44 at LoginPage 45 verifyLoggedOut() 42 46 verifyLoginFailureMessage() 47 48 cleanup: 49 logout() 43 50 44 51 where: … … 59 66 'admin' | 'pas*' // Star Wildcard in pattern. 60 67 'admin' | 'pas%' // Percentage Wildcard in pattern. 68 'admin' | 'pas.' // Dot Wildcard in pattern. 69 61 70 'bogus' | 'pass' /* Bogus Username. */ 62 71 '' | 'pass' // None … … 71 80 '*' | 'pass' // Star Wildcard. 72 81 '%' | 'pass' // Percentage Wildcard. 73 '.' | 'pass' 82 '.' | 'pass' // Dot Wildcard. 74 83 'admi*' | 'pass' // Star Wildcard in pattern. 75 84 'admi%' | 'pass' // Percentage Wildcard in pattern. 85 'admi.' | 'pass' // Dot Wildcard in pattern. 76 86 } 77 87 -
branches/features/purchaseOrders/test/functional/gnumims/functional/pages/GrailsPage.groovy
r947 r952 39 39 controllerName { pageId.split('\\.')[0] } 40 40 actionName { pageId.split('\\.')[1] } 41 logoutButton(to:LogoutPage, required: false) { $("a[class=logoutButton]") } 42 message { $("div.body div.message").text() } 43 } 44 45 def verifyLoggedIn() { 46 assert logoutButton 47 return true 48 49 } 50 51 def verifyLoggedOut() { 52 assert !logoutButton 53 return true 54 41 55 } 42 56 -
branches/features/purchaseOrders/test/functional/gnumims/functional/pages/HomePage.groovy
r947 r952 6 6 7 7 static content = { 8 message { $("div.body div.message").text() }9 logout(to:LogoutPage) { $("a[class=logoutButton]") }10 8 } 11 9 } -
branches/features/purchaseOrders/test/functional/gnumims/functional/pages/LoginPage.groovy
r948 r952 13 13 14 14 def verifyLoginFailureMessage() { 15 assert message.contains("wrong username/password .")15 assert message.contains("wrong username/password") 16 16 return true 17 17 }
Note: See TracChangeset
for help on using the changeset viewer.