Skip to content

Commit

Permalink
Merge pull request #164 from MarcusT96/test/users
Browse files Browse the repository at this point in the history
Test/users
  • Loading branch information
TommyJX authored May 16, 2024
2 parents 5282a27 + 1b37143 commit e53539c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cypress/specs/contactUs.feature
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
19 changes: 19 additions & 0 deletions Cypress/specs/step_definitions/contactUs.js
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();
});

0 comments on commit e53539c

Please sign in to comment.