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

Delete take part’s frontend parts #2441

Merged
merged 3 commits into from
Jan 27, 2016
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion app/assets/stylesheets/frontend/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
@import "views/_world_locations.scss";
@import "views/_worldwide_organisations.scss";
@import "views/_worldwide_priorities.scss";
@import "views/_take-part-pages.scss";
@import "views/_topical-events.scss";
@import "views/corporate_information_pages/show.scss";
@import "views/publications/_index.scss";
Expand Down
53 changes: 0 additions & 53 deletions app/assets/stylesheets/frontend/views/_take-part-pages.scss

This file was deleted.

7 changes: 0 additions & 7 deletions app/controllers/take_part_pages_controller.rb

This file was deleted.

34 changes: 0 additions & 34 deletions app/views/take_part_pages/show.html.erb

This file was deleted.

5 changes: 5 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ def external_redirect(path_prefix, target)
scope '/get-involved' do
root to: 'home#get_involved', as: :get_involved, via: :get
get 'take-part' => redirect('/get-involved#take-part')

# Controller removed. Whitehall frontend no longer serves these
# pages however the route is needed to generate path and url
# helper methods.
# TODO: Remove when take part page paths can be otherwise generated
get 'take-part/:id', to: 'take_part_pages#show', as: 'take_part_page'
end

Expand Down
14 changes: 0 additions & 14 deletions features/step_definitions/take_part_pages_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@
end
end

Then /^I can click through to read all about my new page$/ do
find('a', text: @the_new_take_part_page.title).click

assert page.has_css?('h1', text: @the_new_take_part_page.title)
assert page.has_css?('.description', text: @the_new_take_part_page.summary)
assert page.has_css?('.body .govspeak', text: @the_new_take_part_page.body)
assert page.has_css?("img[src='#{@the_new_take_part_page.image_url(:s300)}']")
end

When /^I remove one of the take part pages because it's not something we want to promote$/ do
visit admin_get_involved_path
click_on 'Take part pages'
Expand All @@ -74,9 +65,4 @@
assert page.has_no_css?('article h3', text: removed_page.title)
end
end

@the_removed_pages.each do |removed_page|
visit take_part_page_path(removed_page)
assert_equal 404, page.status_code
end
end
5 changes: 2 additions & 3 deletions features/take-part-pages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ Feature: Administering take part pages
image: image

They can be reordered so the /get-involved index lists them in a pleasing manner

Background:
Given I am a GDS editor

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scenario: When creating a take part page and reordering the list, the /get-involved shows the new one and my ordering
Given there are some take part pages for the get involved section
When I create a new take part page called "Fund raising in Novembeard"
And I reorder the take part pages to highlight my new page
Then I see the take part pages in my specified order including the new page on the frontend get involved section
And I can click through to read all about my new page

@allow-rescue
Scenario: I can remove a take part page and it no longer displays them on /get-involved
Expand Down
14 changes: 0 additions & 14 deletions test/functional/take_part_pages_controller_test.rb

This file was deleted.