Changeset 947 for branches/features/purchaseOrders/test/functional/gnumims
- Timestamp:
- May 29, 2011, 10:52:16 AM (14 years ago)
- Location:
- branches/features/purchaseOrders/test/functional/gnumims/functional/pages
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/purchaseOrders/test/functional/gnumims/functional/pages/HomePage.groovy
r925 r947 1 1 package gnumims.functional.pages 2 2 3 import geb.Page 4 5 class HomePage extends Page { 6 static url = "appCore/start" 7 8 static at = { $("div#menu li.navigation_active").text() == "Home" } 3 class HomePage extends GrailsPage { 4 static controller = "appCore" 5 static action = "start" 9 6 10 7 static content = { 11 8 message { $("div.body div.message").text() } 12 logout(to:Log inPage) { $("a[class=logoutButton]") }9 logout(to:LogoutPage) { $("a[class=logoutButton]") } 13 10 } 14 11 } -
branches/features/purchaseOrders/test/functional/gnumims/functional/pages/LoginPage.groovy
r938 r947 1 1 package gnumims.functional.pages 2 2 3 import geb.Page 4 5 class LoginPage extends Page { 6 static url = "login/auth" 7 8 static at = {$("h1").text() == "Welcome to gnuMims please log in"} 3 class LoginPage extends GrailsPage { 4 static controller = "login" 5 static action = "auth" 9 6 10 7 static content = { 11 login { $('#loginForm input[value=Login]') }8 login(to:HomePage) { $('#loginForm input[value=Login]') } 12 9 form { $("#loginForm") } 13 10 password { $("input[name=j_password]").value() } 11 message { $("div.login_message").text() } 12 } 13 14 def verifyLoginFailureMessage() { 15 assert message.contains("wrong username/password.") 16 return true 14 17 } 15 18 }
Note: See TracChangeset
for help on using the changeset viewer.