Skip to content
Open
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
12 changes: 9 additions & 3 deletions features/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ Feature: Login Feature
Given I open the "https://www.saucedemo.com/" page

Scenario: Validate the login page title
# TODO: Fix this failing scenario
Then I should see the title "Labs Swag"
# TODO: Fix this failing scenario - fixed
Then I should see the title "Swag Labs"

Scenario: Validate login error message
Then I will login as 'locked_out_user'
# TODO: Add a step to validate the error message received
# TODO: Add a step to validate the error message received - fixed
Then I should see the login error "Epic sadface: Sorry, this user has been locked out."

#Extend the testing coverage
Scenario: Validate successful login redirects to inventory page
Then I will login as 'standard_user'
Then I should be on the inventory page
13 changes: 11 additions & 2 deletions features/product.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Feature: Product Feature
Then I will login as 'standard_user'
# TODO: Sort the items by <sort>
# TODO: Validate all 6 items are sorted correctly by price
Examples:

Then I sort the product list by price option "<sort>"
Then the product prices should be sorted in "<order>" order


# TODO: extend the datatable to paramterize this test
| sort |
#| sort |

Examples:
| sort | order |
| Price (low to high) | asc |
| Price (high to low) | desc |
19 changes: 18 additions & 1 deletion features/purchase.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,21 @@ Feature: Purchase Feature
# TODO: Fill in the First Name, Last Name, and Zip/Postal Code
# TODO: Select Continue
# TODO: Select Finish
# TODO: Validate the text 'Thank you for your order!'
# TODO: Validate the text 'Thank you for your order!'

Then I open the shopping cart
Then I proceed to checkout
Then I enter checkout information: first name "Senia", last name "Chap", postal code "28212"
Then I continue to the checkout overview
Then I complete the purchase
Then I should see the order confirmation message "Thank you for your order!"


#Extend the testing coverage
Scenario: Validate checkout error when customer info is missing
Then I will login as 'standard_user'
Then I will add the backpack to the cart
Then I open the shopping cart
Then I proceed to checkout
Then I continue to the checkout overview
Then I should see the checkout error message "Error: First Name is required"
2 changes: 1 addition & 1 deletion hooks/globalHooks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { After, Before, setDefaultTimeout } from "@cucumber/cucumber";
import { closeBrowser, initializeBrowser, initializePage } from "../playwrightUtilities";

setDefaultTimeout(15000);
setDefaultTimeout(30_000);

Before( async () => {
await initializeBrowser();
Expand Down
Loading
Loading