Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4 from retest/feature/update-tests
Browse files Browse the repository at this point in the history
Update project
  • Loading branch information
lemoncurry authored Apr 16, 2020
2 parents 3fb198f + 9e3c776 commit ca6ce2e
Show file tree
Hide file tree
Showing 57 changed files with 420,583 additions and 313,580 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: main

on:
push:
pull_request:

jobs:
build_and_test:
name: Build and test project
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and test project
env:
RECHECK_API_KEY: ${{ secrets.RECHECK_API_KEY }}
run: mvn -B clean verify







57 changes: 46 additions & 11 deletions .retest/recheck.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# Ignore visible attributes:
attribute=absolute-outline
attribute=outline
attribute=style

# Ignore non-visible attributes:
attribute=class
Expand All @@ -23,32 +24,66 @@ attribute-regex=data-.*
attribute=jsdata
attribute=jsaction
attribute=cd_frame_id_
attribute-regex=margin-.*
attribute-regex=border-.*-width
attribute-regex=border-.*-style
attribute=line-height
attribute=quotes
matcher: type=meta, attribute-regex=.*

# Ignore pixel diffs up to 5 pixels:
pixel-diff=5.0

matcher: type=div, pixel-diff=20.0

# Ignore all meta elements
matcher: type=meta, attribute-regex: .*
matcher: type=section, attribute: opacity
matcher: type=section, attribute: transform
matcher: type=section, attribute=opacity
matcher: type=section, attribute=transform

# Ignore iframes
matcher: type=iframe, attribute=name
matcher: type=iframe, attribute=src
matcher: xpath=html[1]/body[1]/div[3]/iframe[1]
matcher: xpath=html[1]/body[1]/main[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/iframe[1]
matcher: xpath=html[1]/body[1]/main[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/section[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[4]/div[1]/div[1]/iframe[1]
matcher: xpath=html[1]/body[1]/main[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/section[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/iframe[1]
matcher: xpath=html[1]/body[1]/main[1]/section[2]/div[1]/div[1]/div[2]/iframe[1]
matcher: xpath=html[1]/body[1]/div[2]/div[1]/div[1]/article[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/iframe[1]/html[1]/body[1]/div[2]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[5]/div[1]/div[1]
matcher: xpath=html[1]/body[1]/div[2]/div[1]/div[1]/article[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/iframe[1]/html[1]/body[1]/div[2]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[5]/div[1]/div[2]
matcher: xpath=html[1]/body[1]/div[4]/div[2]/iframe[1]/html[1]/body[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]
matcher: xpath=html[1]/body[1]/div[4]/div[2]/iframe[1]/html[1]/body[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/textnode[1]

# Ignore generated attributes of login dashboard
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/ul[1]/li[1]/a[1], attribute: href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/ul[1]/li[2]/a[1], attribute: href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/ul[1]/li[3]/a[1], attribute: href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/form[1], attribute: action
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/form[1]/div[3]/div[2]/span[1]/a[1], attribute: href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/span[1]/a[1], attribute: href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/ul[1]/li[1]/a[1], attribute=href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/ul[1]/li[2]/a[1], attribute=href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/ul[1]/li[3]/a[1], attribute=href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/form[1], attribute=action
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/form[1]/div[3]/div[2]/span[1]/a[1], attribute=href
matcher: xpath=html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/span[1]/a[1], attribute=href

# Ignore changing attributes
matcher: xpath=html[1]/body[1]/main[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/section[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[4]/div[1]/div[1], attribute: id
matcher: xpath=html[1]/body[1]/footer[1]/div[2], attribute: transform
matcher: xpath=html[1]/body[1]/footer[1]/div[2], attribute: opacity
matcher: xpath=html[1]/body[1]/main[1]/section[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/section[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[4]/div[1]/div[1], attribute=id
matcher: xpath=html[1]/body[1]/footer[1]/div[2], attribute=transform
matcher: xpath=html[1]/body[1]/footer[1]/div[2], attribute=opacity

# Ignore changing player uid, hbstform
matcher: retestid=player_uid_6825
matcher: retestid=player_uid_6715
matcher: retestid=player_uid_2586
matcher: retestid=player_uid_7540
matcher: retestid=player_uid_2891
matcher: retestid=hbsptform158696
matcher: retestid=hbsptform158696-1

# Ignore changes in hubspotmessages
matcher: retestid=hubspotmessages

# Ignore recaptcha
matcher: id=target
matcher: retestid=bicycles
matcher: retestid=click_verify


# Ignore background color diffs
matecher: recheckid=div-10, attribute=background-color
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dependency>
<groupId>de.retest</groupId>
<artifactId>recheck-web</artifactId>
<version>1.6.0-beta.2</version>
<version>1.10.3</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -74,4 +74,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
3 changes: 1 addition & 2 deletions src/test/java/de/retest/recheck/RetestWebpageTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.retest.recheck;

import static de.retest.recheck.util.TestUtils.getChromeOptions;
import static de.retest.recheck.util.TestUtils.getRecheckOptions;
import static de.retest.recheck.util.TestUtils.getTestName;

import org.junit.jupiter.api.AfterAll;
Expand All @@ -20,7 +19,7 @@ class RetestWebpageTest {
static void setup() {
driver = new ChromeDriver( getChromeOptions() );

re = new RecheckImpl( getRecheckOptions() );
re = new RecheckImpl();
}

@ParameterizedTest
Expand Down
6 changes: 0 additions & 6 deletions src/test/java/de/retest/recheck/util/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ public static ChromeOptions getChromeOptions() {
"--window-size=1200,800" );
}

public static RecheckOptions getRecheckOptions() {
return RecheckOptions.builder() //
.enableReportUpload() //
.build();
}

public static String getTestName( final String link ) {
return link.substring( link.indexOf( "//" ) + 2 ).replaceAll( "[\\/\\-]", "." );
}
Expand Down
9 changes: 7 additions & 2 deletions src/test/java/de/retest/recheck/util/WebPageFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,23 @@ public static Stream<String> getLinks() {
"https://retest.de", //
"https://retest.de/devtesters", //
"https://retest.de/managers", //
"https://retest.de/enterprise-solution/", //
"https://retest.de/product-overview", //
"https://retest.de/recheck-web-chrome-extension", //
"https://retest.de/recheck-open-source", //
"https://retest.de/recheck-web-open-source/", //
"https://retest.de/rehub", //
"https://retest.de/review", //
"https://retest.de/request-demo", //
"https://retest.de/ai-based-test-generation/", //
"https://retest.de/demo-req/", //
"https://retest.de/faqs", //
"https://retest.de/supported-os-devices/", //
"https://retest.de/cross-browser-testing/", //
"https://retest.de/about-us", //
"https://retest.de/team", //
"https://retest.de/jobs", //
"https://retest.de/news", //
"https://retest.de/contact-us", //
"https://retest.de/blog/", //
"https://assets.retest.org/releases/review.html", //
"https://retest.de/feature-unbreakable-selenium", //
"http://garkbit.prod.cloud.retest.org/dashboard" //
Expand Down
Loading

0 comments on commit ca6ce2e

Please sign in to comment.