Skip to content

Commit 433bd9f

Browse files
committed
Ignore region from snapshot
1 parent 7b59cce commit 433bd9f

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,24 @@
248248
</plugins>
249249
</build>
250250
</profile>
251+
<profile>
252+
<id>percy-ignore</id>
253+
<build>
254+
<plugins>
255+
<plugin>
256+
<groupId>org.apache.maven.plugins</groupId>
257+
<artifactId>maven-surefire-plugin</artifactId>
258+
<configuration>
259+
<includes>
260+
<include>
261+
com.browserstack.test.suites.login.IgnoreRegionVisualTest
262+
</include>
263+
</includes>
264+
</configuration>
265+
</plugin>
266+
</plugins>
267+
</build>
268+
</profile>
251269
<profile>
252270
<id>bstack-local</id>
253271
<build>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.browserstack.test.suites.login;
2+
3+
import com.browserstack.test.suites.TestBase;
4+
import org.openqa.selenium.By;
5+
import org.openqa.selenium.JavascriptExecutor;
6+
import org.openqa.selenium.Keys;
7+
import org.openqa.selenium.support.ui.ExpectedConditions;
8+
import org.testng.Assert;
9+
import org.testng.annotations.Test;
10+
11+
public class IgnoreRegionVisualTest extends TestBase {
12+
13+
private boolean changeCSS = false;
14+
15+
@Test
16+
public void ignoreLogo() {
17+
JavascriptExecutor ex = ((JavascriptExecutor) getDriver());
18+
String percyCSS = ".Navbar_logo__26S5Y {visibility: hidden}";
19+
20+
percy.snapshot("Check Homepage with ignored logo", null, 1024, false, percyCSS);
21+
}
22+
23+
}

0 commit comments

Comments
 (0)