Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
ISAICP-6590: Fix behat tests according new infrastructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
saidatom committed Aug 31, 2021
1 parent 3fce8db commit 73e35c8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests/features/contact_form/submit_contact_form.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Feature: Submit the contact form

# There should be a link to the contact form in the footer.
Given I am not logged in
When I visit "/?destination=/collections"
When I visit "/?destination=collections"
And I click "Contact Joinup Support" in the "Footer" region
Then I am on "/contact?destination=/collections"
Then the url should match "/contact?destination=collections"
And I should see the heading "Contact"
And the "Category" select should contain the following options:
| - Select a value - |
Expand All @@ -29,9 +29,9 @@ Feature: Submit the contact form
# The honeypot field that needs to be empty on submission.
Then the following fields should be present "user_homepage"
And I should see the text "Submissions of this form are processed by a contractor of the European Commission."
And I am on the homepage
And I should be on the homepage

Then I click "Contact Joinup Support" in the "Footer" region
When I click "Contact Joinup Support" in the "Footer" region
When I am on "/contact?destination=/homepage"
And I fill in the following:
| First name | Oswine |
Expand Down
42 changes: 39 additions & 3 deletions tests/features/support/support_menu.feature
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,53 @@ Feature:
When I am on the homepage
Then I should see the link "Take a tour"
And I should see the link "Contact support"
And the response should contain "<a href=\"/contact?destination=/homepage\" class=\"support-menu__link\" data-drupal-link-system-path=\"contact\">Contact support</a>"
Then I click "Contact support"
And I fill in the following:
| First name | Rufus |
| Last name | Modric |
| Organisation | The Deaf-Mute Society |
| E-mail address | oswine@example.ca |
| Category | other |
| Subject | Mobile reader accessibility |
| Message | Dear sir, madam, ... |
# We need to wait 5 seconds for the spam protection time limit to pass.
And I wait for the spam protection time limit to pass
And I press "Submit"
Then I should be on the homepage

When I go to "/collections"
Then I should not see the link "Take a tour"
But I should see the link "Contact support"
And the response should contain "<a href=\"/contact?destination=/collections\" class=\"support-menu__link\" data-drupal-link-system-path=\"contact\">Contact support</a>"
Then I click "Contact support"
And I fill in the following:
| First name | Oswine |
| Last name | Wulfric |
| Organisation | The Deaf-Mute Society |
| E-mail address | oswine@example.za |
| Category | other |
| Subject | Screen reader accessibility |
| Message | Dear sir, madam, ... |
# We need to wait 5 seconds for the spam protection time limit to pass.
And I wait for the spam protection time limit to pass
And I press "Submit"
Then I am on "/collections"

When I go to "/keep-up-to-date"
Then I should see the link "Take a tour"
And I should see the link "Contact support"
And the response should contain "<a href=\"/contact?destination=/keep-up-to-date\" class=\"support-menu__link\" data-drupal-link-system-path=\"contact\">Contact support</a>"
Then I click "Contact support"
And I fill in the following:
| First name | Roscof |
| Last name | Vulvric |
| Organisation | The Deaf-Mute Society |
| E-mail address | roswine@example.za |
| Category | other |
| Subject | Screen reader disponibility |
| Message | Dear sir, madam, ... |
# We need to wait 5 seconds for the spam protection time limit to pass.
And I wait for the spam protection time limit to pass
And I press "Submit"
Then I am on "/keep-up-to-date"

When I go to the homepage of the "Hotel California" collection
Then I should see the link "Take a tour"
Expand Down

0 comments on commit 73e35c8

Please sign in to comment.