Package code.satyagraha.gfm.viewer.bots.ProjectBot

Examples of code.satyagraha.gfm.viewer.bots.ProjectBot.ProjectFileBot


        LOGGER.info("");
       
        assertThat(MarkdownViewBot.isPresent(), is(false));

        ProjectBot project1 = ProjectBot.createSimpleProject();
        ProjectFileBot fileBot1 = project1.newFile("file1.md");
        EditorBot.findByName("file1.md").close();

        fileBot1.showInGfmView();
        SWTUtils.sleep(2000);

        assertThat(MarkdownViewBot.isPresent(), is(true));
        MarkdownViewBot markdownViewBot = MarkdownViewBot.findById();
        assertThat(markdownViewBot.getTitle(), is("file1"));
View Full Code Here


        LOGGER.info("");
       
        assertThat(MarkdownViewBot.isPresent(), is(false));

        ProjectBot project = ProjectBot.createSimpleProject();
        ProjectFileBot fileBot = project.newFile("file1.md");
        EditorBot editorBot = EditorBot.findByName("file1.md");

        String textMd = "sample text, timestamp: " + System.currentTimeMillis() + ".";
        editorBot.typeText(textMd + "\r");
        editorBot.save();
        editorBot.close();

        File fileMd = fileBot.toFile();
        File fileHt = new File(fileMd.getParentFile(), ".file1.md.html");
        assertThat(fileHt.exists(), is(false));

        fileBot.generateMarkdownPreview();
        SWTUtils.sleep(2000);
        assertThat("not found: " + fileHt, fileHt.exists(), is(true));

        String textHt = IOUtils.toString(new FileInputStream(fileHt));
        assertThat(textHt, containsString(textMd));
View Full Code Here

        assertThat(MarkdownViewBot.isPresent(), is(false));
        MarkdownViewBot markdownViewBot = MarkdownViewBot.open();
        assertThat(MarkdownViewBot.isPresent(), is(true));

        ProjectBot project = ProjectBot.createSimpleProject();
        ProjectFileBot fileBot = project.newFile("file1.md");
        EditorBot editorBot = EditorBot.findByName("file1.md");

        String textMd = "sample text, timestamp: " + System.currentTimeMillis() + ".";
        editorBot.typeText(textMd + "\r");
        editorBot.save();
        SWTUtils.sleep(2000);
        assertThat(markdownViewBot.getTitle(), is("file1"));

        File fileMd = fileBot.toFile();
        File fileHt = new File(fileMd.getParentFile(), ".file1.md.html");
        assertThat("not found: " + fileHt, fileHt.exists(), is(true));

        String textHt = IOUtils.toString(new FileInputStream(fileHt));
        assertThat(textHt, containsString(textMd));
View Full Code Here

        SWTBotToolbarButton onlineButton = markdownViewBot.getOnlineButton();
        SWTBotToolbarButton reloadButton = markdownViewBot.getReloadButton();

        ProjectBot project = ProjectBot.createSimpleProject();
        ProjectFileBot fileBot = project.newFile("file1.md");
        EditorBot editorBot = EditorBot.findByName("file1.md");

        String textMd1 = "sample text 1, timestamp: " + System.currentTimeMillis() + ".";
        editorBot.typeText(textMd1 + "\r");
        editorBot.save();

        onlineButton.click(); // set offline

        String textMd2 = "sample text 2, timestamp: " + System.currentTimeMillis() + ".";
        editorBot.typeText(textMd2 + "\r");
        editorBot.save();
        SWTUtils.sleep(2000);

        File fileMd = fileBot.toFile();
        File fileHt = new File(fileMd.getParentFile(), ".file1.md.html");
        assertThat("not found: " + fileHt, fileHt.exists(), is(true));

        assertThat(markdownViewBot.getTitle(), is("*file1"));
        String textHt1 = IOUtils.toString(new FileInputStream(fileHt));
View Full Code Here

TOP

Related Classes of code.satyagraha.gfm.viewer.bots.ProjectBot.ProjectFileBot

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.