public class LoginHelper extends Object
com.atlassian.confluence.AbstractConfluenceAcceptanceTest.logout()
.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
LoginHelper() |
LoginHelper(net.sourceforge.jwebunit.junit.WebTester webTester) |
Modifier and Type | Method and Description |
---|---|
String |
getLoginButtonId()
HACK - temp method to get tests checking for login screen working.
|
boolean |
isLoggedInAs(String username)
Returns true if logged in as the passed user.
|
boolean |
isLoggedInAs(User user)
Returns true if logged in as the passed user.
|
void |
login(String username,
String password,
boolean rememberMe)
|
void |
logIn(String username,
String password,
boolean rememberMe)
Log in with a specific username and password plus options.
|
void |
login(User user)
|
void |
logInAs(String username,
String password)
Log in as the specified user, going to
START_LOCATION . |
void |
logInAs(User user) |
void |
logInAs(User user,
AbstractPageEntity abstractPageEntity) |
void |
logInAsAtHomepage(String username,
String password)
Logs in and then goes straight to "/"
|
void |
logInAsAtHomepage(User user) |
void |
logInDecorated(User user) |
void |
logInFast(User user) |
void |
logInToDestination(User user,
String destination) |
void |
logInViaForm(String username,
String password,
boolean rememberMe) |
void |
logInViaForm(User user) |
void |
logInViaFormOnCurrentPage(String username,
String password,
boolean rememberMe) |
void |
logInViaFormOnCurrentPage(User user) |
void |
logout()
Log out to the super-fast test logout screen.
|
void |
logOutAndIn(User user)
Log out the current user and then log back in with the given user.
|
void |
logOutAndStayAnonymous()
Log out the current user and then begin a new session as the anonymous user.
|
void |
logOutFast()
Logs the current user out as quickly as possible.
|
void |
logOutSlowly()
Log out by clicking the Log Out link in the UI.
|
public LoginHelper()
public LoginHelper(net.sourceforge.jwebunit.junit.WebTester webTester)
public void logOutAndIn(User user)
user
- user to log inpublic void logOutAndStayAnonymous()
public void login(User user)
public void logIn(String username, String password, boolean rememberMe)
public void logInFast(User user)
public void logInDecorated(User user)
public void logout()
WebTester
by calling
WebTester.beginAt(String)
. You should use this method to log out most of the time, and also
to begin tests where Confluence is being used anonymously. But use logOutSlowly()
if you're testing
log-out functionality specifically.
Note, this method will only actually invalidate your user's existing session on the server if the functest plugin is installed.
logOutSlowly()
public void logOutFast()
WebTester.beginAt(String)
so you
can not use it to ensure the WebTester
is appropriately set up.public void logOutSlowly()
WebTester.beginAt(String)
so you can not use it to
ensure the WebTester
is appropriately set up.logout()
public boolean isLoggedInAs(String username)
public boolean isLoggedInAs(User user)
public void logInViaForm(User user)
public void logInViaFormOnCurrentPage(User user)
public void logInViaFormOnCurrentPage(String username, String password, boolean rememberMe)
public String getLoginButtonId()
public void logInAs(String username, String password)
START_LOCATION
.public void logInAs(User user)
public void logInAs(User user, AbstractPageEntity abstractPageEntity)
public void logInAsAtHomepage(User user)
public void logInAsAtHomepage(String username, String password)
Copyright © 2003–2016 Atlassian. All rights reserved.