-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert js test into cucumber for cypress
- Loading branch information
1 parent
afe187b
commit 4982786
Showing
4 changed files
with
20 additions
and
12 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,4 +1,5 @@ | ||
{ | ||
"projectId": "websiteone-fe", | ||
"baseUrl": "http://localhost:8082" | ||
"baseUrl": "http://localhost:8082", | ||
"ignoreTestFiles": "*_steps.js" | ||
} |
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,13 @@ | ||
import { Then, Given } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Then(`I should see {string}`, (textToFind) => { | ||
cy.contains(textToFind) | ||
}) | ||
|
||
Given(`I am at the {string} page`, (pageName) => { | ||
if(pageName === "Home") { | ||
cy.visit('/') | ||
} else { | ||
cy.fail('unknown page \'' + pageName + '\'') | ||
} | ||
}) |
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,5 @@ | ||
Feature: Journey test | ||
|
||
Scenario: Access the website | ||
Given I am at the "Home" page | ||
Then I should see "Scrums" |
This file was deleted.
Oops, something went wrong.