Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add E2E scenario for travel advice publisher #689

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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