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
Empty file added check-selector.js
Empty file.
15 changes: 13 additions & 2 deletions cucumber.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
// cucumber.js
module.exports = {
default: `--require-module ts-node/register --require './steps/**/*.ts' --require './hooks/**/*.ts --format @cucumber/pretty-formatter`
};
default: {
requireModule: ['ts-node/register'],
require: [
'./steps/**/*.ts',
'./hooks/**/*.ts'
],
format: ['@cucumber/pretty-formatter']
}
};


//default: '--require-module ts-node/register --require "./steps/**/*.ts" --require ./hooks/**/*.ts --format @cucumber/pretty-formatter'
7 changes: 4 additions & 3 deletions features/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Feature: Login Feature

Scenario: Validate the login page title
# TODO: Fix this failing scenario
Then I should see the title "Labs Swag"
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
When I will login as 'locked_out_user'
Then I should see the error message "Epic sadface: Sorry, this user has been locked out."
And I should not be logged in
14 changes: 8 additions & 6 deletions features/product.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ Feature: Product Feature
Given I open the "https://www.saucedemo.com/" page

# Create a datatable to validate the Price (high to low) and Price (low to high) sort options (top-right) using a Scenario Outline
Scenario Outline: Validate product sort by price <sort>
Then I will login as 'standard_user'
# TODO: Sort the items by <sort>
# TODO: Validate all 6 items are sorted correctly by price
Scenario Outline: Validate product sort by price <sort>
Then I will login as 'standard_user'
Then I sort the items by "<sort>"
Then I should see all items sorted by price "<sort>"

Examples:
# TODO: extend the datatable to paramterize this test
| sort |
| sort |
| Price (low to high) |
| Price (high to low) |
12 changes: 6 additions & 6 deletions features/purchase.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Feature: Purchase Feature
Scenario: Validate successful purchase text
Then I will login as 'standard_user'
Then I will add the backpack to the cart
# TODO: Select the cart (top-right)
# TODO: Select Checkout
# 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!'
Then I select the cart
Then I select checkout
Then I fill in the checkout information
Then I select continue
Then I select finish
Then I should see the purchase confirmation "Thank you for your order!"
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(60000);

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