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

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


    public void testUpdateForumReplyError() {
        addSnippetParam("ForumService.replyUuid", "Foo");
        addSnippetParam("ForumService.replyTitle", "Foo");
        addSnippetParam("ForumService.replyContent", "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: forum for post Foo not found", json.getString("message"));
    }
View Full Code Here


    public void testGetForumTopic() {
      String title = createForumTopicName();
      ForumTopic forumTopic = createForumTopic(forum, title, title);
        addSnippetParam("ForumService.topicUuid", forumTopic.getTopicUuid());
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        assertForumTopicValid(forumTopic, (JsonJavaObject)json);
    }
View Full Code Here

   
    @Test
    public void testGetForumTopicError() {
        addSnippetParam("ForumService.topicUuid", "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

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

        addSnippetParam("ForumService.forumUuid", forum.getForumUuid());
       
        Forum aforum = getForum(forum.getForumUuid());
        Assert.assertNotNull(aforum);
       
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
        assertForumValid(forum, (JsonJavaObject)json);
    }
View Full Code Here

   
    @Test
    public void testGetForumError() {
        addSnippetParam("ForumService.forumUuid", "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

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

    @Test
    public void testGetWikiPageEmpty() {
      addSnippetParam("WikiService.wikiLabel", "");
      addSnippetParam("WikiService.pageLabel", "");
     
        JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
        JsonJavaObject json = previewPage.getJson();
    }
View Full Code Here

    @Test
    public void testGetPeople() {
        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 testGetMyResultsByTag() {
        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

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.