Package com.ibm.sbt.automation.core.test.pageobjects

Examples of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage


  static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_GetProfileByGUID";

  @Test
  public void testGetProfileByGUID() throws SBTServiceException {
    JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
    JsonJavaObject json = previewPage.getJson();
    Assert.assertFalse("Get Profile  returned no results", json.isEmpty());
  }
View Full Code Here


  static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_GetContactsByIndex";

  @Test
  public void testGetContactsByIndex() {
    JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
    List json = previewPage.getJsonList();
    Assert.assertFalse("Get Profile  returned no results", json.isEmpty());
  }
View Full Code Here

    static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_GetMyProfile";

    @Test
    public void testGetMyProfile() throws SBTServiceException {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertFalse("Get Profile  returned no results", json.isEmpty());
    }
View Full Code Here

        Assert.assertFalse("Get Profile  returned no results", json.isEmpty());
    }

    @Test
    public void testOrgIdRegression() throws SBTServiceException {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertFalse("Get Profile  returned no results", json.isEmpty());
        String orgId = json.getString("getOrgId");
        Assert.assertFalse(Integer.valueOf(orgId) == 0);
    }
View Full Code Here

   
    static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_ProfileEntryJsonDataHandler";

    @Test
    public void testProfileEntryJsonDataHandler() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
       
        Assert.assertEquals("na.collabserv.com:user:20547574", json.getString("entityId"));
       
        Assert.assertEquals("Sales Executive", json.getString("title"));
        Assert.assertEquals("https://apps.na.collabserv.com/contacts/profiles/view/20547574", json.getString("profileUrl"));
View Full Code Here

  static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_GetConnections";

  @Test
  public void testGetConnections() {
    JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
    List jsonList = previewPage.getJsonList();
    Assert.assertFalse("Get Profile  returned no results", jsonList.isEmpty());
  }
View Full Code Here

  static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_GetContactByGUID";

  @Test
  public void testGetContactByGUID() {
    JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
    JsonJavaObject json = previewPage.getJson();
    Assert.assertFalse("Get Profile  returned no results", json.isEmpty());
  }
View Full Code Here

 
    @Test
    public void testUpdateTagsUsingEmail() {   
      addSnippetParam("sample.email1", getProperty("sample.email1"));
      addSnippetParam("sample.email2", getProperty("sample.email2"));
      JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);      
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse("Create tags returned no results", jsonList.isEmpty());
        for (int i=0; i<jsonList.size(); i++) {
            JsonJavaObject json = (JsonJavaObject)jsonList.get(i);
            Assert.assertFalse("Created tags do not match the expected tag values", "testTag1".equals(json.getString("getTerm")) || "testTag2".equals(json.getString("getTerm")));          
        }
View Full Code Here

    @Test
    public void testUpdateTagsInvalidSourceUser() {   
      addSnippetParam("sample.email1", "");
      addSnippetParam("sample.email2", getProperty("sample.id2"));
           
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(400, json.getInt("code"));
    }
View Full Code Here

    @Test
    public void testUpdateTagsInvalidTargetUser() {   
      addSnippetParam("sample.email1", getProperty("sample.id1"));
      addSnippetParam("sample.email2", "");
           
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(400, json.getInt("code"));
    }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.