Class BaseApplinkFuncTest

java.lang.Object
com.atlassian.jira.functest.framework.BaseJiraFuncTest
com.atlassian.jira.webtests.ztests.applinks.BaseApplinkFuncTest
Direct Known Subclasses:
BaseConfluenceApplinkFuncTest, BaseJiraApplinkFuncTest

public abstract class BaseApplinkFuncTest extends BaseJiraFuncTest
  • Field Details

  • Constructor Details

    • BaseApplinkFuncTest

      public BaseApplinkFuncTest()
  • Method Details

    • getRemoteBaseUrl

      public abstract String getRemoteBaseUrl()
    • getApplicationLinkType

      public abstract String getApplicationLinkType()
    • getRemoteTester

      public abstract net.sourceforge.jwebunit.WebTester getRemoteTester()
    • getRemoteNavigation

      public abstract Navigation getRemoteNavigation()
    • getAuthQueryString

      public static String getAuthQueryString()
    • getAuthQueryString

      public static String getAuthQueryString(String querySign)
    • 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

      public String getApplinkIdByRemoteUrl(String baseUrl, String remoteUrl) throws IOException
      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

      public String authorizeOauthApplink(String applinkId, boolean isLocalInstance)
    • assertApplinkExists

      public void assertApplinkExists(String baseUrl, String applinkId, String expectedName, String expectedRpcUrl, boolean expectedPrimary) throws IOException, org.json.JSONException
      Throws:
      IOException
      org.json.JSONException
    • assertApplinkNotExists

      public void assertApplinkNotExists(String baseUrl, String applinkId) throws IOException, org.json.JSONException
      Throws:
      IOException
      org.json.JSONException
    • assertApplinkExistsInWebCallById

      public void assertApplinkExistsInWebCallById(String baseUrl, String applinkId) throws IOException, org.json.JSONException
      Throws:
      IOException
      org.json.JSONException
    • assertApplinkStatus

      public void assertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated) throws IOException, org.json.JSONException
      Throws:
      IOException
      org.json.JSONException
    • assertApplinkStatus

      public org.json.JSONObject assertApplinkStatus(String baseUrl, String applinkId, boolean isImpersonated, boolean isWorking, boolean isRemoteApplinkAvailable) throws IOException, org.json.JSONException
      Throws:
      IOException
      org.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:
      IOException
      org.json.JSONException
    • assertDeprecatedStatus

      public void assertDeprecatedStatus(org.json.JSONObject applinkStatus)
    • assertErrorStatus

      public void assertErrorStatus(org.json.JSONObject applinkStatus, String expectedReason)
    • setApplinkTrustedMode

      public void setApplinkTrustedMode(String baseUrl, String applinkId, boolean enable) throws IOException, URISyntaxException
      Throws:
      IOException
      URISyntaxException
    • deleteAllAppLinks

      public void deleteAllAppLinks(String baseUrl) throws IOException
      Throws:
      IOException
    • deleteApplink

      public void deleteApplink(String baseUrl, String applinkId) throws IOException
      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

      public String assertJiraAuthorizedAppAndReturnToken(String authorizedAppUrl) throws SAXException
      Throws:
      SAXException
    • revokeAuthorizedApplication

      public void revokeAuthorizedApplication(String baseUrl, String token) throws IOException
      Throws:
      IOException
    • testCanViewAndRevokeAuthorizedApplicationsOnUserProfile

      protected void testCanViewAndRevokeAuthorizedApplicationsOnUserProfile(String applinkTitle, boolean revokeByApplinkRemoval) throws Exception
      Throws:
      Exception
    • testCanViewApplinksInAppSwitcher

      protected void testCanViewApplinksInAppSwitcher(String remoteAppTitle) throws Exception
      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