Skip to content

Commit

Permalink
full page visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
angiejones committed Jan 9, 2019
1 parent 954c7b4 commit cf093c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/test.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################
# MY APP #
################
site.url=https://the-internet.herokuapp.com/dynamic_content
site.url=https://the-internet.herokuapp.com/large

################
# SELENIUM #
Expand Down
10 changes: 10 additions & 0 deletions src/test/java/ScrollTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import base.BaseTests;
import org.junit.Test;

public class ScrollTests extends BaseTests {

@Test
public void testLargeDom() {
validateWindow();
}
}
4 changes: 2 additions & 2 deletions src/test/java/base/BaseTests.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package base;

import com.applitools.eyes.MatchLevel;
import com.applitools.eyes.selenium.Eyes;
import org.junit.AfterClass;
import org.junit.BeforeClass;
Expand All @@ -11,6 +10,7 @@
import java.io.FileInputStream;
import java.util.Properties;


public class BaseTests {

protected static WebDriver driver;
Expand Down Expand Up @@ -45,7 +45,7 @@ private static void initiateEyes(){

public void validateWindow(){
eyes.open(driver, "The Internet", Thread.currentThread().getStackTrace()[2].getMethodName());
eyes.setMatchLevel(MatchLevel.LAYOUT);
eyes.setForceFullPageScreenshot(true);
eyes.checkWindow();
eyes.close();
}
Expand Down

0 comments on commit cf093c2

Please sign in to comment.