Created
October 23, 2012 16:12
-
-
Save pbernet/3939758 to your computer and use it in GitHub Desktop.
MyGUITest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package xx.testcase.gui | |
import exception.LinkNotFoundException | |
import pageobjects.page._ | |
import xx.testpool.Users | |
import util.I18N | |
import xx.util.Utils | |
class MyGUITest extends GUISpecificationCARE { | |
step { | |
makeBoxLoginReady() | |
} | |
"Login as admin" in { | |
browser = Browser.openAndTest("http://10.1.2.127") | |
val loginPage = new LoginPage(browser) | |
loginPage.isAt must beTrue | |
loginPage.unableToLoginWith("blabla", "blabla") must beMatching(I18N.getOrEmpty("config.login.error.usernotfound")) | |
loginPage.unableToLoginWith("admin", "blabla") must beMatching(I18N.getOrEmpty("config.login.error.passwordfail")) | |
val configPage = loginPage.loginAs("admin", "xxx") | |
configPage.isAt must beTrue | |
configPage.doesShowArchiveSpaces must beTrue | |
} | |
"Change tokenpin back and forth" in { | |
val configPage = new ConfigPage(browser) | |
val tokenPage = configPage.toSettingsPage.toSystemPage.toTokenPage | |
tokenPage.isAt must beTrue | |
tokenPage.set("xxx", "yyy", "yyy") | |
tokenPage.submitAndGetOks must beMatching(I18N.getOrEmpty("config.tokenpin.persistsuccess")) | |
tokenPage.set("yyy", "xxx", "xxx") | |
tokenPage.submitAndGetOks must beMatching(I18N.getOrEmpty("config.tokenpin.persistsuccess")) | |
tokenPage.toLogout.isAt must beTrue | |
success | |
} | |
step { | |
close() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment