Examples of JavaScriptPreviewPage


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

        setAuthType(AuthType.AUTO_DETECT);
    }
   
    @Test
    public void testGetAllBlogComments() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse("GetAllBlogComments returned no results", jsonList.isEmpty());
    }
View Full Code Here

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

    public void testUpdateForumError() {
        addSnippetParam("ForumService.forumUuid", "Foo");
        addSnippetParam("ForumService.forumTitle", "Foo");
        addSnippetParam("ForumService.forumContent", "Foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(404, json.getInt("code"));
        Assert.assertEquals("CLFRV0008E: Error, unable to find object with uuid: Foo", json.getString("message"));
    }
View Full Code Here

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

        setAuthType(AuthType.AUTO_DETECT);
    }
   
    @Test
    public void testGetAllBlogPosts() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse("GetAllBlogPosts returned no results", jsonList.isEmpty());
    }
View Full Code Here

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

      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
     
      addSnippetParam("ForumService.topicUuid", forumTopic.getTopicUuid());
     
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        assertForumReplyProperties(json);
    }
View Full Code Here

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

        setAuthType(AuthType.AUTO_DETECT);
    }

    @Test
    public void testGetMyForums() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse(jsonList.isEmpty());
        for (int i=0; i<jsonList.size(); i++) {
            JsonJavaObject json = (JsonJavaObject)jsonList.get(i);
            assertForumGetters(json);
        }
View Full Code Here

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

   
    static final String SNIPPET_ID = "Social_Profiles_SmartCloud_API_ProfileFeedJsonDataHandler";

    @Test
    public void testProfileFeedJsonDataHandler() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertEquals(2, jsonList.size());
      JsonJavaObject json0 = (JsonJavaObject)jsonList.get(0);
      JsonJavaObject json1 = (JsonJavaObject)jsonList.get(1);
     
      Assert.assertEquals("na.collabserv.com:contact:966797", json0.getString("entityId"));
View Full Code Here

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

      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
      ForumReply forumReply = createForumReply(forumTopic, title, title);
        addSnippetParam("ForumService.replyUuid", forumReply.getReplyUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertNull("Unexpected error detected on page", json.getString("code"));
        Assert.assertEquals(forumReply.getReplyUuid(), json.getString("replyUuid"));
       
        forumReply = getForumReply(forumReply.getTopicUuid(), false);
        Assert.assertNull("Deleted forum topic is still available", forumReply);
View Full Code Here

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

   
    @Test
    public void testDeleteForumReplyError() {
      addSnippetParam("ForumService.replyUuid", "Foo");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(404, json.getInt("code"));
        Assert.assertEquals("No existing forum found. Please contact your system administrator.", json.getString("message"));
    }
View Full Code Here

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

    @Test
    public void testDeleteForumReplyInvalidArg() {
        setAuthType(AuthType.NONE);
      addSnippetParam("ForumService.replyUuid", "");
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        Assert.assertEquals(400, json.getInt("code"));
        Assert.assertEquals("Invalid argument, expected replyUuid.", json.getString("message"));
    }
View Full Code Here

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

        setAuthType(AuthType.AUTO_DETECT);
    }
   
    @Test
    public void testGetBlogPosts() {
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        List jsonList = previewPage.getJsonList();
        Assert.assertFalse("GetBlogPosts returned no results", jsonList.isEmpty());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.