package hu.virgo.selenium.framework.navigation;

import hu.virgo.selenium.framework.JUnitTestTemplate;
import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.Matchers.greaterThan;
import static org.junit.Assert.assertThat;

public class NavigationTimingTest extends JUnitTestTemplate {

    private NavigationTiming navTiming;

    @Before
    public void openAPage() {
        driver.get(context.sut.getBaseUrl());
        navTiming = new NavigationTiming(driver);
    }

    @Test
    public void testResponseEndedInMillis() throws Exception {
        assertThat(navTiming.responseEndedInMillis(), greaterThan(0L));
    }

    @Test
    public void testDomCompletedInMillis() throws Exception {
        assertThat(navTiming.domCompletedInMillis(), greaterThan(100L));
    }

    @Test
    public void testCompletePageLoadTimeInMillis1() throws Exception {
        assertThat(navTiming.completePageLoadTimeInMillis(), greaterThan(100L));
    }

    @Test
    public void relativeValues() {
        long responseEnded = navTiming.responseEndedInMillis();
        long domCompletes = navTiming.domCompletedInMillis();
        long completed = navTiming.completePageLoadTimeInMillis();

        assertThat(completed, greaterThan(responseEnded));
        assertThat(completed, greaterThan(domCompletes));
    }
}

@@ -53,103 +53,49 @@
 ort 
-hu.virgo.selenium.framework.JUnitTestTemplate;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A
+static org.hamcrest.Matchers.greaterThan;
 %0Aimp
@@ -130,32 +130,41 @@
 hers.greaterThan
+OrEqualTo
 ;%0Aimport static 
@@ -191,16 +191,119 @@
 ertThat;
+%0Aimport hu.virgo.selenium.framework.JUnitTestTemplate;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;
 %0A%0Apublic
@@ -1357,16 +1357,25 @@
 aterThan
+OrEqualTo
 (domComp

replace greaterThan with greaterThanOrEqualTo