diff --git a/package.json b/package.json index 0bd021d..f641c72 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "1.0.0", "main": "index.js", "scripts": { - "lunaapp": "cucumber-js --config=config/cucumber.js" + "lunaapp": "cucumber-js --config=config/cucumber.js", + "lunaapp:tag": "cucumber-js --config=config/cucumber.js --tags " }, "keywords": [], "author": "", diff --git a/src/test/features/MenSection.feature b/src/test/features/MenSection.feature deleted file mode 100644 index 44ed2c4..0000000 --- a/src/test/features/MenSection.feature +++ /dev/null @@ -1,17 +0,0 @@ -@MenSection - -Feature: Verify that the user is able to login into an already registered account. - - User wants to see some times. - - Background: User is landed on the webpage. - Given The user lands at the webpage. - - Scenario: User shops for Men Jackets. - When The user clicks on the "
" section. - And The user clicks on "" option. - Then The products are shown. - - Examples: - | Section | Attire | - | Men | Tanks | \ No newline at end of file diff --git a/src/test/features/UserShopping.feature b/src/test/features/UserShopping.feature new file mode 100644 index 0000000..d040722 --- /dev/null +++ b/src/test/features/UserShopping.feature @@ -0,0 +1,26 @@ +@UserShopping + +Feature: Verify that the user is able to purchase some item. + + User wants to buy something. + + Background: User is landed on the webpage. + Given The user lands at the webpage. + + Scenario: User shops for Men Jackets. + When The user clicks on the "
" section. + And The user clicks on "" option. + Then The products are shown. + + Examples: + | Section | Attire | + | Men | Tees | + + Scenario: User shops for Women Jackets. + When The user clicks on the "
" section. + And The user clicks on "" option. + Then The products are shown. + + Examples: + | Section | Attire | + | Women | Bras & Tanks | \ No newline at end of file diff --git a/src/test/pages/MenSection.ts b/src/test/pages/UserShopping.ts similarity index 97% rename from src/test/pages/MenSection.ts rename to src/test/pages/UserShopping.ts index acb9621..be4db64 100644 --- a/src/test/pages/MenSection.ts +++ b/src/test/pages/UserShopping.ts @@ -1,5 +1,5 @@ import { pageFixture } from "../hooks/pageFixture"; -import * as menSectionPage from "../../../src/test/resources/menSectionPage.json" +import * as menSectionPage from "../resources/menSectionPage.json" import { PageElement } from "../resources/interfaces/iPageElement"; import { Page, expect } from "@playwright/test"; diff --git a/src/test/steps/menSection.ts b/src/test/steps/userShopping.ts similarity index 91% rename from src/test/steps/menSection.ts rename to src/test/steps/userShopping.ts index c32e6ea..54e73a1 100644 --- a/src/test/steps/menSection.ts +++ b/src/test/steps/userShopping.ts @@ -1,5 +1,5 @@ import { When, Then, setDefaultTimeout } from "@cucumber/cucumber"; -import { MenSection } from "../pages/MenSection"; +import { MenSection } from "../pages/UserShopping"; import { pageFixture } from "../hooks/pageFixture"; setDefaultTimeout(60000);