-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44a04af
commit a11b5fa
Showing
2 changed files
with
26 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Feature: Contact Us | ||
|
||
Scenario: Navigate to Contact Us page and send a message | ||
Given I am on the homepage | ||
When I click on Contact Us | ||
Then I can fill in my name, email and message | ||
Then I can submit my message |
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,19 @@ | ||
import { Given, When, Then } from "@badeball/cypress-cucumber-preprocessor"; | ||
|
||
When('I click on Contact Us', () => { | ||
cy.get(':nth-child(4) > a').click(); | ||
}); | ||
|
||
Then('I should be on the Contact Us page', () => { | ||
cy.url().should('include', '/contact'); | ||
}); | ||
|
||
Then('I can fill in my name, email and message', () => { | ||
cy.get('#name').type('Testköpare'); | ||
cy.get('#email').type('[email protected]'); | ||
cy.get('#message').type('This is a test message'); | ||
}); | ||
|
||
Then('I can submit my message', () => { | ||
cy.get('form > button').click(); | ||
}); |