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

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


    @Test
    public void testGetResultsByTag() {
      addSnippetParam("sample.searchTag", "dubh");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        for (int i=0; i<jsonList.size(); i++) {
          assertResultValid((JsonJavaObject)jsonList.get(i));
        }
    }
View Full Code Here


    @Test
    public void testGetMyPeople() {
        addSnippetParam("sample.searchQuery", "Frank");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        for (int i=0; i<jsonList.size(); i++) {
          assertFacetValueValid((JsonJavaObject)jsonList.get(i));
        }
    }
View Full Code Here

    @Test
    public void testGetResults() {
        addSnippetParam("sample.searchQuery", "Test");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        for (int i=0; i<jsonList.size(); i++) {
          assertResultValid((JsonJavaObject)jsonList.get(i), true, false);
        }
    }
View Full Code Here

    @Test
    public void testGetMyResults() {
        addSnippetParam("sample.searchQuery", "Test");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        for (int i=0; i<jsonList.size(); i++) {
          assertResultValid((JsonJavaObject)jsonList.get(i), true);
        }
    }
View Full Code Here

    deleteActivity(activity.getActivityUuid());
  }
 
  @Test
  public void testGetActivityMembers() {
    JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
     List jsonList = previewPage.getJsonList();
       Assert.assertFalse("No members for activity ", jsonList.isEmpty());
  }
View Full Code Here

    static final String SNIPPET_ID = "Social_Profiles_API_GetCachedProfile";

    @Test
    public void testCachedProfile() {
      addSnippetParam("sample.email1", TestEnvironment.getCurrentUserEmail());
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertEquals(20, jsonList.size());
        for (int i=0; i<20; i++) {
            JsonJavaObject json = (JsonJavaObject)jsonList.get(i);
            Assert.assertTrue(json.getInt("profileLoaded") > 0);
        }
View Full Code Here

    @Test
    public void testGetProfile() {

        addSnippetParam("sample.email1", getProperty("sample.userId1"));
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(getProperty("sample.email1"), json.getString("getEmail"));
    }
View Full Code Here

    @Test
    public void testDeleteCommunity() {
        addSnippetParam("CommunityService.communityUuid2", community.getCommunityUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        Assert.assertEquals(community.getCommunityUuid(), json.getString("communityUuid"));
       
        // community has already been deleted
        community = null;
View Full Code Here

   
    @Test
    public void testConfirmDeleteCommunity() {
        addSnippetParam("CommunityService.communityUuid2", community.getCommunityUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        Assert.assertEquals(community.getCommunityUuid(), json.getString("communityUuid"));
       
        community = getCommunity(community.getCommunityUuid(), false);
        if (community != null) {
View Full Code Here

   
    @Test
    public void testDeleteCommunityError() {
        addSnippetParam("CommunityService.communityUuid2", "Foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(404, json.getInt("code"));
        Assert.assertEquals("The referenced community does not exist.", json.getString("message"));
    }
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.