Skip to content

Commit

Permalink
Remove remaining features that are view tests for #show
Browse files Browse the repository at this point in the history
These features don’t interact with Whitehall
admin, they directly set up data then visit the
publications#show page to assert things.

This page is now being served by government
frontend so these feature can be removed.
  • Loading branch information
tuzz committed Aug 3, 2017
1 parent 40a72a8 commit 69ebea7
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 89 deletions.
5 changes: 0 additions & 5 deletions features/document-collections.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ Feature: Grouping documents into a collection
When I redraft the document collection and remove "May 2012 Update" from it
Then I can see in the admin that "May 2012 Update" does not appear

Scenario: Documents should link back to their collection
Given a published publication called "May 2012 Update" in the document collection "Monthly Updates"
When I visit the publication "May 2012 Update"
Then I should see links back to the collection

Scenario: Legacy document series urls are redirected to the new document collection urls
Given a published document collection "Rail statistics" exists
When I visit the old document series url "/government/organisations/government-department/series/rail-statistics"
Expand Down
9 changes: 0 additions & 9 deletions features/history-mode.feature

This file was deleted.

13 changes: 0 additions & 13 deletions features/preview-unpublished-editions.feature
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
Feature: Previewing unpublished editions

Scenario: Unpublished editions can be previewed
Given a draft publication "Beard Length Review" exists
And I am an editor
When I preview "Beard Length Review"
Then I should see the summary of the draft publication "Beard Length Review"

Scenario: Unpublished editions link to preview
Given I am an editor
When I draft a new publication "Test publication"
Then I should see a link to the preview version of the publication "Test publication"

@use_real_sso
Scenario: Unpublished editions are protected from visitors
Given a draft publication "Beard Length Review" exists
And I am a visitor
When I preview "Beard Length Review"
Then I should get a "404" error
5 changes: 0 additions & 5 deletions features/specialist-sectors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ Feature: Tagging content with specialist sectors
And there are some specialist sectors
When I start editing a draft document
Then I can tag it to some specialist sectors

Scenario: sectors are shown on tagged content
Given there is a document tagged to specialist sectors
When I view the document
Then I should see the specialist sub-sector and its parent sector
18 changes: 0 additions & 18 deletions features/step_definitions/document_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,24 +211,6 @@
assert page.has_css?(record_css_selector(edition), text: edition.title)
end

Then /^I should see in the preview that "([^"]*)" should be in the "([^"]*)" and "([^"]*)" topics$/ do |title, first_topic, second_topic|
visit_document_preview title
assert has_css?(".meta a", text: first_topic)
assert has_css?(".meta a", text: second_topic)
end

Then /^I should see in the preview that "([^"]*)" was produced by the "([^"]*)" and "([^"]*)" organisations$/ do |title, first_org, second_org|
visit_document_preview title
assert has_css?(".meta a", text: first_org)
assert has_css?(".meta a", text: second_org)
end

Then /^I should see in the preview that "([^"]*)" is associated with "([^"]*)" and "([^"]*)"$/ do |title, minister_1, minister_2|
visit_document_preview title
assert has_css?(".meta a", text: minister_1)
assert has_css?(".meta a", text: minister_2)
end

Then /^the publication should be related to "([^"]*)" and "([^"]*)" policies$/ do |related_policy_1, related_policy_2|
policies_titles = Publication.last.policies.map(&:title)

Expand Down
9 changes: 0 additions & 9 deletions features/step_definitions/history_mode_steps.rb

This file was deleted.

7 changes: 0 additions & 7 deletions features/step_definitions/publication_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@
add_external_attachment
end

Then /^I should see in the preview that "([^"]*)" is taken from the live data in "([^"]*)"$/ do |title, data_set_name|
publish(force: true)
click_on title
click_on "View on website"
assert has_css?(".meta a", text: data_set_name)
end

Then /^I should see a link to the PDF attachment$/ do
assert page.has_css?("a[href*='#{@attachment.filename}']")
end
Expand Down
9 changes: 0 additions & 9 deletions features/step_definitions/statistics_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,3 @@
click_on page.all('h3').first.text
end
end

Then(/^I should see the details for that statistics publication$/) do
assert page.has_content?(@statistics_publication.title)
assert page.has_content?(@statistics_publication.summary)
end

Then(/^I should see from the url that I am still in the statistics section of the site$/) do
assert page.current_path.include? statistics_path
end
6 changes: 0 additions & 6 deletions features/step_definitions/topical_event_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@
end
end

Then /^(#{THE_DOCUMENT}) shows it is related to the topical event "([^"]*)" on its public page$/ do |edition, topical_event_name|
topical_event = TopicalEvent.find_by!(name: topical_event_name)
visit public_document_path(edition)
assert page.has_css?(".meta a", text: topical_event.name)
end

When /^I feature the document "([^"]*)" for topical event "([^"]*)" with image "([^"]*)"$/ do |news_article_title, topical_event_name, image_filename|
topical_event = TopicalEvent.find_by!(name: topical_event_name)
visit admin_topical_event_classification_featurings_path(topical_event)
Expand Down
1 change: 0 additions & 1 deletion features/topical_events.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Scenario: Associating a publication with a topical event
When I draft a new publication "A speech" relating it to topical event "An Event"
And I force publish the publication "A speech"
Then I should see the publication "A speech" in the publications section of the topical event "An Event"
And the publication "A speech" shows it is related to the topical event "An Event" on its public page

Scenario: Associating a consultation with a topical event
Given a topical event called "An Event" with description "A topical event"
Expand Down
7 changes: 0 additions & 7 deletions features/viewing-statistics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,3 @@ Feature: Viewing statistics
When I visit the statistics index page
And I filter the statistics by department and topic
Then I should only see statistics for the selected departments and topics

Scenario: Citizen views the details of statistics
Given there is a statistics publication
When I visit the statistics index page
And I click on the first statistics publication
Then I should see the details for that statistics publication
And I should see from the url that I am still in the statistics section of the site

0 comments on commit 69ebea7

Please sign in to comment.