Package net.mindengine.galen.reports

Examples of net.mindengine.galen.reports.TestReport


            put("button-2", new MockedPageElement(0, 100, 200, 10));
        }}));
       
       
        TestValidationListener validationListener = new TestValidationListener();
        check.execute(new TestReport(), mockedBrowser, new GalenPageTest(), validationListener);
       
        Assert.assertEquals(
                "<o textfield>\n" +
                "<SpecHeight textfield>\n" +
                "</o textfield>\n" +
View Full Code Here


            put("button-2", new MockedInvisiblePageElement(0, 0, 100, 100));
        }}));

       
        TestValidationListener validationListener = new TestValidationListener();
        check.execute(new TestReport(), mockedBrowser, new GalenPageTest(), validationListener);
       
        Assert.assertEquals(
                "<o textfield>\n" +
                "<SpecHeight textfield>\n" +
                "</o textfield>\n" +
View Full Code Here

            put("button-2", new MockedInvisiblePageElement(0, 0, 100, 100));
        }}));

       
        TestValidationListener validationListener = new TestValidationListener();
        check.execute(new TestReport(), mockedBrowser, new GalenPageTest(), validationListener);
       
        Assert.assertEquals(
                "<o textfield>\n" +
                "<SpecHeight textfield>\n" +
                "</o textfield>\n" +
View Full Code Here

            put("button-2", new MockedInvisiblePageElement(0, 0, 100, 100));
        }}));

       
        TestValidationListener validationListener = new TestValidationListener();
        check.execute(new TestReport(), mockedBrowser, new GalenPageTest(), validationListener);
       
        Assert.assertEquals(
                "<o textfield>\n" +
                "<SpecHeight textfield>\n" +
                "</o textfield>\n" +
View Full Code Here

        WebDriver driver = new FirefoxDriver();
        Browser browser = new SeleniumBrowser(driver);
        browser.load(TEST_URL);
       
        GalenPageActionInjectJavascript action = new GalenPageActionInjectJavascript("/scripts/to-inject-1.js");
        action.execute(new TestReport(), browser, new GalenPageTest(), null);
       
        WebElement element = driver.findElement(By.xpath("//body/injected-tag"));
       
        assertThat("Inject tags text should be", element.getText(), is("Some injected content"));
        browser.quit();
View Full Code Here

        MockedBrowser browser = new MockedBrowser("", new Dimension(1024, 768));
       
        GalenPageActionCookie action = new GalenPageActionCookie();
       
        action.setCookies(Arrays.asList("cookieName1=cookieValue1; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/", "cookieName2=cookieValue2; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/"));
        action.execute(new TestReport(), browser, new GalenPageTest(), null);
       
        List<String> recordedActions = browser.getRecordedActions();
       
        assertThat(recordedActions, contains("executeJavascript\ndocument.cookie=\"cookieName1=cookieValue1; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/\";" +
                                                            "document.cookie=\"cookieName2=cookieValue2; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/\";",
View Full Code Here

       
        Browser browser = new SeleniumBrowser(driver);
        browser.load(TEST_URL);
        browser.changeWindowSize(new Dimension(400, 800));
       
        action.execute(new TestReport(), browser, new GalenPageTest(), validationListener);
       
        driver.quit();
       
        assertThat("Invokations should be", validationListener.getInvokations(), is("<o header>\n" +
                "<SpecHeight header>\n" +
View Full Code Here

   
        Browser browser = new SeleniumBrowser(driver);
        browser.load(TEST_URL);
        browser.changeWindowSize(new Dimension(400, 800));
       
        action.execute(new TestReport(), browser, new GalenPageTest(), validationListener);
        driver.quit();
       
        assertThat("Invokations should be", validationListener.getInvokations(), is("<o header>\n" +
                "<SpecHeight header>\n" +
                "<e><msg>\"header\" height is 140px which is not in range of 150 to 170px</msg></e>\n" +
View Full Code Here

        System.getProperties().remove("login.link") ;
        GalenPageActionProperties action = new GalenPageActionProperties();
        action.setFiles(Arrays.asList(findResource("/properties/homepage-en.properties"), findResource("/properties/loginpage-en.properties")));
       
       
        action.execute(new TestReport(), NO_BROWSER, new GalenPageTest(), NO_LISTENER);
       
        assertThat("System property page.title should be", TestSession.current().getProperties().get("page.title"), Matchers.is("Home page"));
        assertThat("System property page.download.caption should be", TestSession.current().getProperties().get("page.download.caption"), Matchers.is("Take it!"));
        assertThat("System property login.link should be", TestSession.current().getProperties().get("login.link"), Matchers.is("Sign in"));
       
View Full Code Here

    @Test(expectedExceptions=FileNotFoundException.class,
            expectedExceptionsMessageRegExp="File does not exist: some-unexistent-file.properties")
    public void shouldGiveError_whenFile_isNotFound() throws Exception {
        GalenPageActionProperties action = new GalenPageActionProperties();
        action.setFiles(Arrays.asList("some-unexistent-file.properties"));
        action.execute(new TestReport(), NO_BROWSER, new GalenPageTest(), NO_LISTENER);
    }
View Full Code Here

TOP

Related Classes of net.mindengine.galen.reports.TestReport

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.