Skip to content

[Visualization] Visual testing scenarios #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ Feature: Demo
Given Main page is opened
When I open Contact us page
Then Contact us page is opened
When I fill contact form using following data:
| Name | Peter Parker |
| Company | Aquality Automation |
| Phone | +44 208 816 7320 |
| Comment | I'd like to contact you! |
And I accept Privacy and Cookies Policy
And I click Send button
When I save Contact us page dump
And I fill contact form using following data:
| Name | Peter Parker |
| Company | Aquality Automation |
| Phone | +44 208 816 7320 |
| Comment | I'd like to contact you! |
And I accept Privacy and Cookies Policy
And I click Send button
Then Notification about empty fields is present
And Contact us page dump is different

@demo
Scenario Outline: ScenarioContext demo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,14 @@ public void checkEmptyFieldWarning() {
assertTrue(contactUsPage.isEmailValidationMessagePresent(),
"Email validation message should be displayed");
}

@When("I save Contact us page dump")
public void saveContactUsPageDump() {
contactUsPage.dump().save();
}

@Then("Contact us page dump is different")
public void contactUsPageDumpIsDifferent() {
assertTrue(contactUsPage.dump().compare() > 0, "The form dump should differ");
}
}
8 changes: 8 additions & 0 deletions aquality-selenium-template/src/main/resources/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,13 @@
},
"elementCache": {
"isEnabled": false
},
"visualization": {
"imageExtension": "png",
"maxFullFileNameLength": 255,
"defaultThreshold": 0.012,
"comparisonWidth": 16,
"comparisonHeight": 16,
"pathToDumps": "./src/test/resources/visualDumps/"
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium</artifactId>
<version>3.2.1</version>
<version>4.0.0</version>
</dependency>

<dependency>
Expand Down