mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-11-10 00:23:58 +00:00
BETTERZON-147, BETTERZON-148: Adding feature files (#89)
This commit is contained in:
parent
ce92abdb40
commit
d83fcdf693
|
@ -8,14 +8,16 @@ import stepdefs.Preconditions;
|
||||||
|
|
||||||
@RunWith(Cucumber.class)
|
@RunWith(Cucumber.class)
|
||||||
@CucumberOptions(
|
@CucumberOptions(
|
||||||
features = {"src/test/resource/searchProduct.feature",
|
features = {"src/test/resource/searchProduct.feature",
|
||||||
"src/test/resource/priceAlarms.feature"}
|
"src/test/resource/priceAlarms.feature",
|
||||||
|
"src/test/resource/favoriteShopList.feature",
|
||||||
|
"src/test/resource/manageVendor.feature"}
|
||||||
)
|
)
|
||||||
|
|
||||||
public class RunTest {
|
public class RunTest {
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
Preconditions.driver= new FirefoxDriver();
|
Preconditions.driver = new FirefoxDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
|
|
27
CucumberTests/src/test/java/stepdefs/FavoriteShopList.java
Normal file
27
CucumberTests/src/test/java/stepdefs/FavoriteShopList.java
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
package stepdefs;
|
||||||
|
|
||||||
|
import io.cucumber.java.en.Given;
|
||||||
|
import io.cucumber.java.en.Then;
|
||||||
|
import io.cucumber.java.en.When;
|
||||||
|
|
||||||
|
public class FavoriteShopList {
|
||||||
|
@Given("^the user has at least (\\d+) favorite shop$")
|
||||||
|
public void the_user_has_at_least_favorite_shop(int arg1) throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@When("^the user clicks on favorite shops$")
|
||||||
|
public void the_user_clicks_on_favorite_shops() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Then("^he should see his favorite shops list$")
|
||||||
|
public void he_Should_see_his_favorite_shops_list() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@When("^he clicks on delete a favorite shop entry$")
|
||||||
|
public void he_clicks_on_delete_a_favorite_shop_enty() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Then("^the favorite shop entry should be deleted$")
|
||||||
|
public void the_favorite_shop_entry_should_be_deleted() throws Exception {
|
||||||
|
}
|
||||||
|
}
|
31
CucumberTests/src/test/java/stepdefs/ManageVendor.java
Normal file
31
CucumberTests/src/test/java/stepdefs/ManageVendor.java
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
package stepdefs;
|
||||||
|
|
||||||
|
import io.cucumber.java.en.Given;
|
||||||
|
import io.cucumber.java.en.Then;
|
||||||
|
import io.cucumber.java.en.When;
|
||||||
|
|
||||||
|
public class ManageVendor {
|
||||||
|
@Given("^the user is logged in as vendor manager$")
|
||||||
|
public void the_user_is_logged_in_as_vendor_manager() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@When("^the user opens the shop managing page$")
|
||||||
|
public void the_user_opens_the_shop_managing_page() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@When("^the user clicks on deactivate a listing$")
|
||||||
|
public void the_user_clicks_on_deactivate_a_listing() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Then("^the listing should be deactivated$")
|
||||||
|
public void the_listing_should_be_deactivated() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@When("^the user clicks on deactivate the shop$")
|
||||||
|
public void the_user_clicks_on_deactivate_the_shop() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Then("^the shop and all related listings should be deactivated$")
|
||||||
|
public void the_shop_and_all_related_listings_should_be_deactivated() throws Exception {
|
||||||
|
}
|
||||||
|
}
|
20
CucumberTests/src/test/resource/favoriteShopList.feature
Normal file
20
CucumberTests/src/test/resource/favoriteShopList.feature
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
Feature: Favorite Shop List
|
||||||
|
|
||||||
|
Scenario: Access Favorite Shop List
|
||||||
|
Given the user is on the landing page
|
||||||
|
And the user is logged in
|
||||||
|
And the user has at least 1 favorite shop
|
||||||
|
When the user clicks on the profile icon
|
||||||
|
Then the profile details popup should open
|
||||||
|
When the user clicks on favorite shops
|
||||||
|
Then he should see his favorite shops list
|
||||||
|
|
||||||
|
Scenario: Remove Favorite Shop Entry
|
||||||
|
Given the user is on the landing page
|
||||||
|
And the user is logged in
|
||||||
|
And the user has at least 1 favorite shop
|
||||||
|
When the user clicks on the profile icon
|
||||||
|
Then the profile details popup should open
|
||||||
|
When the user clicks on favorite shops
|
||||||
|
And he clicks on delete a favorite shop entry
|
||||||
|
Then the favorite shop entry should be deleted
|
15
CucumberTests/src/test/resource/manageVendor.feature
Normal file
15
CucumberTests/src/test/resource/manageVendor.feature
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
Feature: Manage Vendor Shop
|
||||||
|
|
||||||
|
Scenario: Deactivate Product Listing
|
||||||
|
Given the user is on the landing page
|
||||||
|
And the user is logged in as vendor manager
|
||||||
|
When the user opens the shop managing page
|
||||||
|
And the user clicks on deactivate a listing
|
||||||
|
Then the listing should be deactivated
|
||||||
|
|
||||||
|
Scenario: Deactivate Shop Completely
|
||||||
|
Given the user is on the landing page
|
||||||
|
And the user is logged in as vendor manager
|
||||||
|
When the user opens the shop managing page
|
||||||
|
And the user clicks on deactivate the shop
|
||||||
|
Then the shop and all related listings should be deactivated
|
Loading…
Reference in New Issue
Block a user