diff --git a/CucumberTests/src/test/java/RunTest.java b/CucumberTests/src/test/java/RunTest.java index fcbc954..7614dc3 100644 --- a/CucumberTests/src/test/java/RunTest.java +++ b/CucumberTests/src/test/java/RunTest.java @@ -8,14 +8,16 @@ import stepdefs.Preconditions; @RunWith(Cucumber.class) @CucumberOptions( - features = {"src/test/resource/searchProduct.feature", - "src/test/resource/priceAlarms.feature"} + features = {"src/test/resource/searchProduct.feature", + "src/test/resource/priceAlarms.feature", + "src/test/resource/favoriteShopList.feature", + "src/test/resource/manageVendor.feature"} ) public class RunTest { @BeforeClass public static void setup() { - Preconditions.driver= new FirefoxDriver(); + Preconditions.driver = new FirefoxDriver(); } @AfterClass diff --git a/CucumberTests/src/test/java/stepdefs/FavoriteShopList.java b/CucumberTests/src/test/java/stepdefs/FavoriteShopList.java new file mode 100644 index 0000000..fa94b68 --- /dev/null +++ b/CucumberTests/src/test/java/stepdefs/FavoriteShopList.java @@ -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 { + } +} diff --git a/CucumberTests/src/test/java/stepdefs/ManageVendor.java b/CucumberTests/src/test/java/stepdefs/ManageVendor.java new file mode 100644 index 0000000..5ad254f --- /dev/null +++ b/CucumberTests/src/test/java/stepdefs/ManageVendor.java @@ -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 { + } +} diff --git a/CucumberTests/src/test/resource/favoriteShopList.feature b/CucumberTests/src/test/resource/favoriteShopList.feature new file mode 100644 index 0000000..079e781 --- /dev/null +++ b/CucumberTests/src/test/resource/favoriteShopList.feature @@ -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 diff --git a/CucumberTests/src/test/resource/manageVendor.feature b/CucumberTests/src/test/resource/manageVendor.feature new file mode 100644 index 0000000..b63d647 --- /dev/null +++ b/CucumberTests/src/test/resource/manageVendor.feature @@ -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