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_API_GetColleaguesConnectionEntries";

    @Test
    public void testGetColleagues() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertTrue(jsonList.size() > 0);
    }
View Full Code Here


    }

    @Test
    @Ignore
    public void testGetSubCommunities() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        //TODO create sub communities
        //List jsonList = previewPage.getJsonList();
        //Assert.assertFalse("Get sub communities returned no communities", jsonList.isEmpty());
    }
View Full Code Here

   
    static final String SNIPPET_ID = "Social_Profiles_API_GetColleagues";

    @Test
    public void testGetColleagues() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertTrue(jsonList.size() > 0);
    }
View Full Code Here

   
    static final String SNIPPET_ID = "Social_Profiles_API_Search";

    @Test
    public void testSearch() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertTrue(jsonList.size() > 0);
    }
View Full Code Here

    @Test
    public void testGetCommunity() {
        addSnippetParam("CommunityService.communityUuid", community.getCommunityUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        assertCommunityValid((JsonJavaObject)jsonList.get(0));
        Assert.assertEquals(community.getCommunityUuid(), ((JsonJavaObject)jsonList.get(1)).getString("entityId"));
    }
View Full Code Here

   
    static final String SNIPPET_ID = "Social_Profiles_API_CreateProfile";
       
    @Test
    public void testCreateProfileWithMissingInputs() {             
      JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();       
        Assert.assertEquals(400, json.getInt("code"));
        Assert.assertEquals("Invalid argument, profile with valid userid or email must be specified.", json.getString("message"));
    }
View Full Code Here

   
    @Test
    public void testGetCommunityError() {
        addSnippetParam("CommunityService.communityUuid", "Foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        JsonJavaObject json = (JsonJavaObject)jsonList.get(0);
        Assert.assertEquals(404, json.getInt("code"));
        Assert.assertEquals("The community which this resource or page is associated with does not exist.", json.getString("message"));
    }
View Full Code Here

   
    @Test
    public void testGetCommunityInvalidArg() {
        addSnippetParam("CommunityService.communityUuid", "");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        JsonJavaObject json = (JsonJavaObject)jsonList.get(0);
        Assert.assertEquals(400, json.getInt("code"));
        Assert.assertEquals("Invalid argument, expected communityUuid.", json.getString("message"));
    }
View Full Code Here

  static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_GetContacts";

  @Test
  public void testGetContacts() {
    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_TestNumberJsonDataHandler";

    @Test
    public void testProfileEntryJsonDataHandler() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
       
        Assert.assertEquals(123, json.getInt("number"));
        Assert.assertEquals(12.12, json.getDouble("decimalNumber"),0.01);
        Assert.assertEquals(234, json.getInt("stringNumber"));
        Assert.assertEquals(4, json.getInt("array"));
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.