Class BaseApplinkFuncTest
java.lang.Object
com.atlassian.jira.functest.framework.BaseJiraFuncTest
com.atlassian.jira.webtests.ztests.applinks.BaseApplinkFuncTest
- Direct Known Subclasses:
BaseConfluenceApplinkFuncTest,BaseJiraApplinkFuncTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected final org.apache.http.impl.client.CloseableHttpClientprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected final Stringprotected final org.slf4j.Loggerprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class com.atlassian.jira.functest.framework.BaseJiraFuncTest
assertions, backdoor, environmentData, initClass, navigation, tester, testRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertApplinkExists(String baseUrl, String applinkId, String expectedName, String expectedRpcUrl, boolean expectedPrimary) voidassertApplinkExistsInWebCallById(String baseUrl, String applinkId) voidassertApplinkNotExists(String baseUrl, String applinkId) voidassertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated) org.json.JSONObjectassertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated, boolean isWorking, boolean isRemoteApplinkAvailable) org.json.JSONObjectassertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated, boolean isWorking, boolean isRemoteApplinkAvailable, boolean isRemoteImpersonated) voidassertDeprecatedStatus(org.json.JSONObject applinkStatus) voidassertErrorStatus(org.json.JSONObject applinkStatus, String expectedReason) assertJiraAuthorizedAppAndReturnToken(String authorizedAppUrl) voidprotected voidassertStatusCode(org.apache.http.client.methods.HttpRequestBase request, org.apache.http.client.methods.CloseableHttpResponse response, int expectedStatusCode) voidauthorizeByHeader(org.apache.http.client.methods.HttpRequestBase request) authorizeOauthApplink(String applinkId, boolean isLocalInstance) createDummyApplink(String applinkName, String baseUrl, String rpcUrl) createDummyApplink(String applinkName, String baseUrl, String rpcUrl, String appType) createTwoWayOauth1AppLink(String applinkName, boolean isPrimary, boolean isImpersonated) createTwoWayOauth1AppLink(String applinkName, boolean isPrimary, boolean isImpersonated, boolean fromLocalInstance) voiddeleteAllAppLinks(String baseUrl) voiddeleteApplink(String baseUrl, String applinkId) abstract StringgetApplinkIdByRemoteUrl(String baseUrl, String remoteUrl) static Stringstatic StringgetAuthQueryString(String querySign) abstract Stringabstract Navigationabstract net.sourceforge.jwebunit.WebTesterprotected booleanisIssuePresentInJsonResults(String jsonString, String issueKey) voidrevokeAuthorizedApplication(String baseUrl, String token) voidsetApplinkTrustedMode(String baseUrl, String applinkId, boolean enable) protected voidtestCanViewAndRevokeAuthorizedApplicationsOnUserProfile(String applinkTitle, boolean revokeByApplinkRemoval) protected voidtestCanViewApplinksInAppSwitcher(String remoteAppTitle) voidvoidupdateApplinkOauthStatus(String baseUrl, String applinkId, boolean isImpersonated) Methods inherited from class com.atlassian.jira.functest.framework.BaseJiraFuncTest
getAssertions, getBackdoor, getEnvironmentData, getTester
-
Field Details
-
DEFAULT_APPLINK_PROPERTIES_FILENAME
- See Also:
-
APPLINKS_STATUS_ENDPOINT
- See Also:
-
APPLICATION_LINK_ENDPOINT
- See Also:
-
OS_USERNAME_PARAM_NAME
- See Also:
-
OS_PASSWORD_PARAM_NAME
- See Also:
-
DEPRECATED_ERROR_CATEGORY
- See Also:
-
CONFIG_ERROR_CATEGORY
- See Also:
-
REASON_NO_REMOTE_APPLINK
- See Also:
-
REASON_AUTH_LEVEL_MISMATCH
- See Also:
-
LOCAL_JIRA_TITLE
- See Also:
-
LOCAL_PROJECT_KEY
- See Also:
-
JIRA_AUTHORIZED_APPS_URL
- See Also:
-
NO_AUTHORIZED_APPS_MESSAGE
- See Also:
-
localBaseUrl
-
client
protected final org.apache.http.impl.client.CloseableHttpClient client -
logger
protected final org.slf4j.Logger logger
-
-
Constructor Details
-
BaseApplinkFuncTest
public BaseApplinkFuncTest()
-
-
Method Details
-
getRemoteBaseUrl
-
getApplicationLinkType
-
getRemoteTester
public abstract net.sourceforge.jwebunit.WebTester getRemoteTester() -
getAuthQueryString
-
getAuthQueryString
-
authorizeByHeader
public void authorizeByHeader(org.apache.http.client.methods.HttpRequestBase request) -
createTwoWayOauth1AppLink
public ApplinkIdPair createTwoWayOauth1AppLink(String applinkName, boolean isPrimary, boolean isImpersonated) throws IOException - Throws:
IOException
-
createTwoWayOauth1AppLink
public ApplinkIdPair createTwoWayOauth1AppLink(String applinkName, boolean isPrimary, boolean isImpersonated, boolean fromLocalInstance) throws IOException - Throws:
IOException
-
getApplinkIdByRemoteUrl
- Throws:
IOException
-
createDummyApplink
public String createDummyApplink(String applinkName, String baseUrl, String rpcUrl) throws IOException - Throws:
IOException
-
createDummyApplink
public String createDummyApplink(String applinkName, String baseUrl, String rpcUrl, String appType) throws IOException - Throws:
IOException
-
authorizeOauthApplink
-
assertApplinkExists
public void assertApplinkExists(String baseUrl, String applinkId, String expectedName, String expectedRpcUrl, boolean expectedPrimary) throws IOException, org.json.JSONException - Throws:
IOExceptionorg.json.JSONException
-
assertApplinkNotExists
public void assertApplinkNotExists(String baseUrl, String applinkId) throws IOException, org.json.JSONException - Throws:
IOExceptionorg.json.JSONException
-
assertApplinkExistsInWebCallById
public void assertApplinkExistsInWebCallById(String baseUrl, String applinkId) throws IOException, org.json.JSONException - Throws:
IOExceptionorg.json.JSONException
-
assertApplinkStatus
public void assertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated) throws IOException, org.json.JSONException - Throws:
IOExceptionorg.json.JSONException
-
assertApplinkStatus
public org.json.JSONObject assertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated, boolean isWorking, boolean isRemoteApplinkAvailable) throws IOException, org.json.JSONException - Throws:
IOExceptionorg.json.JSONException
-
assertApplinkStatus
public org.json.JSONObject assertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated, boolean isWorking, boolean isRemoteApplinkAvailable, boolean isRemoteImpersonated) throws IOException, org.json.JSONException - Throws:
IOExceptionorg.json.JSONException
-
assertDeprecatedStatus
public void assertDeprecatedStatus(org.json.JSONObject applinkStatus) -
assertErrorStatus
-
setApplinkTrustedMode
public void setApplinkTrustedMode(String baseUrl, String applinkId, boolean enable) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
deleteAllAppLinks
- Throws:
IOException
-
deleteApplink
- Throws:
IOException
-
updateApplink
public void updateApplink(String baseUrl, String applinkId, Map<String, String> changes) throws IOException- Throws:
IOException
-
updateApplinkOauthStatus
public void updateApplinkOauthStatus(String baseUrl, String applinkId, boolean isImpersonated) throws IOException - Throws:
IOException
-
assertNoAuthorizedApps
public void assertNoAuthorizedApps() -
assertJiraAuthorizedAppAndReturnToken
- Throws:
SAXException
-
revokeAuthorizedApplication
- Throws:
IOException
-
testCanViewAndRevokeAuthorizedApplicationsOnUserProfile
protected void testCanViewAndRevokeAuthorizedApplicationsOnUserProfile(String applinkTitle, boolean revokeByApplinkRemoval) throws Exception - Throws:
Exception
-
testCanViewApplinksInAppSwitcher
- Throws:
Exception
-
assertStatusCode
protected void assertStatusCode(org.apache.http.client.methods.HttpRequestBase request, org.apache.http.client.methods.CloseableHttpResponse response, int expectedStatusCode) -
isIssuePresentInJsonResults
protected boolean isIssuePresentInJsonResults(String jsonString, String issueKey) throws org.json.JSONException - Throws:
org.json.JSONException
-