|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.it.user.LoginHelper
public class LoginHelper
Helps to manage the user session for a http client for testing. Use this in preference to
com.atlassian.confluence.AbstractConfluenceAcceptanceTest.logout()
.
Field Summary | |
---|---|
protected org.slf4j.Logger |
log
|
Constructor Summary | |
---|---|
LoginHelper()
|
|
LoginHelper(net.sourceforge.jwebunit.junit.WebTester webTester)
|
Method Summary | |
---|---|
java.lang.String |
getLoginButtonId()
HACK - temp method to get tests checking for login screen working. |
boolean |
isLoggedInAs(java.lang.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(java.lang.String username,
java.lang.String password,
boolean rememberMe)
Deprecated. since 4.2 Use logInFast(com.atlassian.confluence.it.User) , logInDecorated(com.atlassian.confluence.it.User) or logInViaForm(com.atlassian.confluence.it.User) . |
void |
logIn(java.lang.String username,
java.lang.String password,
boolean rememberMe)
Log in with a specific username and password plus options. |
void |
login(User user)
Deprecated. since 4.2 Use logInFast(com.atlassian.confluence.it.User) , logInDecorated(com.atlassian.confluence.it.User) or logInViaForm(com.atlassian.confluence.it.User) . |
void |
logInAs(java.lang.String username,
java.lang.String password)
Log in as the specified user, going to START_LOCATION . |
void |
logInAs(User user)
|
void |
logInAs(User user,
AbstractPageEntity abstractPageEntity)
|
void |
logInAsAtHomepage(java.lang.String username,
java.lang.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,
java.lang.String destination)
|
void |
logInViaForm(java.lang.String username,
java.lang.String password,
boolean rememberMe)
|
void |
logInViaForm(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final transient org.slf4j.Logger log
Constructor Detail |
---|
public LoginHelper()
public LoginHelper(net.sourceforge.jwebunit.junit.WebTester webTester)
Method Detail |
---|
public void logOutAndIn(User user)
user
- user to log inpublic void logOutAndStayAnonymous()
public void login(User user)
logInFast(com.atlassian.confluence.it.User)
, logInDecorated(com.atlassian.confluence.it.User)
or logInViaForm(com.atlassian.confluence.it.User)
.
public void login(java.lang.String username, java.lang.String password, boolean rememberMe)
logInFast(com.atlassian.confluence.it.User)
, logInDecorated(com.atlassian.confluence.it.User)
or logInViaForm(com.atlassian.confluence.it.User)
.
public void logIn(java.lang.String username, java.lang.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(java.lang.String username)
public boolean isLoggedInAs(User user)
public void logInViaForm(User user)
public void logInViaForm(java.lang.String username, java.lang.String password, boolean rememberMe)
public java.lang.String getLoginButtonId()
public void logInAs(java.lang.String username, java.lang.String password)
START_LOCATION
.
public void logInAs(User user)
public void logInAs(User user, AbstractPageEntity abstractPageEntity)
public void logInAsAtHomepage(User user)
public void logInAsAtHomepage(java.lang.String username, java.lang.String password)
public void logInToDestination(User user, java.lang.String destination)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |