Skip to content

Commit

Permalink
Add E2E scenario for travel advice publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Thorner committed Jun 29, 2020
1 parent 4836559 commit b8e9cf6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions features/foreign_travel_advice.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,13 @@ Feature: Foreign Travel Advice
Scenario: Check country feed contains the correct website root
When I visit "/foreign-travel-advice/ireland.atom"
Then the XML ID is formed from the correct URL

@notproduction
Scenario: Publishing travel advice
When I go to the "travel-advice-publisher" landing page
And I try to login as a user
And I go to the "travel-advice-publisher" landing page
Then I should see "GOV.UK Travel Advice Publisher"
When I publish a new travel advice edition
And I visit "/foreign-travel-advice/afghanistan"
Then I should see the updated travel advice
12 changes: 12 additions & 0 deletions features/step_definitions/foreign_travel_advice_steps.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
When "I publish a new travel advice edition" do
step 'I click on the link "Afghanistan"'
step 'I click on the button "Create new edition"'
choose "edition_update_type_minor"
fill_in "edition_summary", with: "Smokey test"
step 'I click on the button "Save & Publish"'
end

Then "I should see the updated travel advice" do
step 'I visit "/foreign-travel-advice/afghanistan"'
step 'I should see "Smokey test"'
end

0 comments on commit b8e9cf6

Please sign in to comment.