-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from VadimNastoyashchy/cucumber_support
Cucumber support
- Loading branch information
Showing
23 changed files
with
74 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/node_modules | ||
/package-lock.json | ||
/wdio-appium.log | ||
node_modules | ||
package-lock.json | ||
wdio-appium.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Feature: Swaglabs app Log In | ||
|
||
Scenario Outline: As a standard user, I can log into Swaglabs application | ||
|
||
Given I am on the login page | ||
When I login with <username> and <password> | ||
Then I redirected to the inventory page with title <title> | ||
|
||
Examples: | ||
| username | password | title | | ||
| standard_user | secret_sauce | PRODUCTS | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Given } from "@wdio/cucumber-framework"; | ||
import LoginPage from "../pageobjects/pages/LoginPage"; | ||
|
||
Given(/^I am on the login page/, async () => { | ||
await expect(await LoginPage.swaglabsImg).toBeDisplayed(); | ||
await expect(await LoginPage.logInButton).toBeDisplayed(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Then } from "@wdio/cucumber-framework"; | ||
import InventoryPage from "../pageobjects/pages/InventoryPage"; | ||
|
||
Then(/^I redirected to the inventory page with title (.*)$/, async (title) => { | ||
await expect(await InventoryPage.productsTitle.getText()).toEqual(title); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { When } from "@wdio/cucumber-framework"; | ||
import LoginPage from "../pageobjects/pages/LoginPage"; | ||
|
||
When(/^I login with (\w+) and (.+)$/, async (username, password) => { | ||
await LoginPage.logInWithCredentials(username, password); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.