Skip to content
Open

Tp2 #21

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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<!-- cucumber options -->
<cucumber.stepsDefinitions>--glue / </cucumber.stepsDefinitions>
<cucumber.hooks>--glue com/crowdar/bdd/cukes/hooks</cucumber.hooks>
<cucumber.tags>@Smoke</cucumber.tags>
<cucumber.tags>@Busqueda</cucumber.tags>
<pretty.plugin>--plugin pretty</pretty.plugin>
<cucumber.report>--plugin lippia.web.reporters.CucumberReporter:</cucumber.report>
<test-manager.report>--plugin lippia.web.reporters.TestManagerReporter:</test-manager.report>
Expand Down
11 changes: 3 additions & 8 deletions src/main/java/lippia/web/steps/GoogleSearchSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,19 @@

public class GoogleSearchSteps extends PageSteps {

@Given("^The client is on google page$")
@Given("^El cliente se encuentra en el buscador$")
public void home() {
GoogleHomeService.navegarWeb();
}

@Given("^The client isn't on google page$")
public void isNotHome() {
GoogleHomeService.navegarWeb();
throw new RuntimeException("the client is not on google page");
}

@When("^The client search for word (.*)$")
@When("^El cliente hace la (.*)$")
public void search(String criteria) {
GoogleHomeService.enterSearchCriteria(criteria);
GoogleHomeService.clickSearchButton();
}

@Then("The client verify that results are shown properly")
@Then("El cliente puede ver su busqueda")
public void statVerification() {
GoogleSearchResultService.verifyResults();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/webdrivermanager.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
wdm.targetPath=~/.m2/repository/webdriver
#wdm.chromeDriverVersion=117.0.5938.88 // unncomment this line to set specific version of chrome Driver
wdm.chromeDriverVersion=117.0.5938.92
wdm.forceCache=true
wdm.override=false
wdm.useMirror=false
Expand Down
33 changes: 12 additions & 21 deletions src/test/resources/web/features/googleSearch.feature
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
Feature: As a potential client i need to search in google to find a web site
@Busqueda
Feature: El cliente quiere hacer uns busqueda en el buscador de google

@Smoke
Scenario: The client search by "crowdar"
Given The client is on google page
When The client search for word crowdar
Then The client verify that results are shown properly
Scenario Outline: El cliente necesita hacer una busqueda
Given El cliente se encuentra en el buscador
When El cliente hace la <Busqueda>
Then El cliente puede ver su busqueda

@Smoke
Scenario: The client search by "Automation"
Given The client is on google page
When The client search for word Automation
Then The client verify that results are shown properly
Examples:
| Busqueda |
| Crowdar Academy |
| Calidad |
| Software |
| Testing |

@Smoke
Scenario: The client search by "Docker"
Given The client is on google page
When The client search for word Docker
Then The client verify that results are shown properly

@Smoke
Scenario: The client search by "Lippia"
Given The client isn't on google page
When The client search for word Lippia
Then The client verify that results are shown properly