{"action":"created","comment":{"url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/comments/26301479","id":26301479,"diff_hunk":"@@ -0,0 +1,111 @@\n+RSpec.feature 'Consumer filters by pension pot size' do\n+  let(:landing_page) { LandingPage.new }\n+  let(:results_page) { ResultsPage.new }\n+\n+  let(:latitude) { rand(51.428473..55.856191) }\n+  let(:longitude) { rand(-4.247082..-0.943616) }\n+\n+  scenario 'Consumer selects the pension pot size filter' do\n+    with_elastic_search! do\n+      given_i_am_on_the_rad_landing_page\n+      and_firms_with_advisers_were_previously_indexed\n+      and_i_indicate_that_i_need_help_with_my_pension_pot\n+      and_i_see_the_default_option_is_i_dont_know_or_wish_to_say\n+      and_i_select_an_applicable_pot_size_band_from_the_available_options\n+      when_i_submit_a_valid_postcode_search_with_the_selected_pot_size_band\n+      then_i_am_shown_firms_that_can_advise_on_my_chosen_investment_pot_size\n+    end\n+  end\n+\n+  scenario 'Consumer I don\\'t know / Don\\'t wish to say' do\n+    with_elastic_search! do\n+      given_i_am_on_the_rad_landing_page\n+      and_firms_with_advisers_were_previously_indexed\n+      and_i_indicate_that_i_need_help_with_my_pension_pot\n+      and_i_see_the_default_option_is_i_dont_know_or_wish_to_say\n+      and_i_indicate_that_i_dont_know_the_size_of_my_pension_pot\n+      when_i_submit_a_valid_postcode_search_with_the_selected_pot_size_band\n+      then_i_am_shown_firms_that_can_advise_on_pension_pots\n+    end\n+  end\n+\n+  scenario 'Consumer selects the pension transfer option' do\n+    with_elastic_search! do\n+      given_i_am_on_the_rad_landing_page\n+      and_firms_with_advisers_were_previously_indexed\n+      and_i_indicate_that_i_need_help_with_my_pension_pot\n+      and_i_see_the_default_option_is_i_dont_know_or_wish_to_say\n+      and_i_indicate_that_i_dont_know_the_size_of_my_pension_pot\n+      and_i_indicate_that_i_would_like_transfer_my_pension\n+      when_i_submit_a_valid_postcode_search_with_the_selected_pot_size_band\n+      then_i_am_shown_firms_that_can_assist_with_pension_transfers\n+    end\n+  end\n+\n+  def given_i_am_on_the_rad_landing_page\n+    @investment_sizes = create_list(:investment_size, 5)\n+    landing_page.load\n+  end\n+\n+  def and_firms_with_advisers_were_previously_indexed\n+    with_fresh_index! do\n+      @small_pot_size_firm = create(:firm_with_no_business_split, other_percent: 100, investment_sizes: @investment_sizes.values_at(0, 1))\n+      create_list(:adviser, 1, firm: @small_pot_size_firm, latitude: latitude, longitude: longitude)\n+\n+      @pot_transfers_firm = create(:firm_with_no_business_split, pension_transfer_percent: 100, investment_sizes: @investment_sizes.values_at(4))\n+      create_list(:adviser, 2, firm: @pot_transfers_firm, latitude: latitude, longitude: longitude)\n+\n+      @large_pot_size_firm = create(:firm_with_no_business_split, other_percent: 100, investment_sizes: @investment_sizes.values_at(2, 3))\n+      create_list(:adviser, 3, firm: @large_pot_size_firm, latitude: latitude, longitude: longitude)\n+    end\n+  end\n+\n+  def and_i_indicate_that_i_need_help_with_my_pension_pot\n+    landing_page.in_person.pension_pot.set true\n+  end\n+\n+  def and_i_see_the_default_option_is_i_dont_know_or_wish_to_say\n+    expect(landing_page.in_person.pension_pot_size.value).to eql(SearchFormFilters::ANY_SIZE_VALUE)\n+  end\n+\n+  def and_i_select_an_applicable_pot_size_band_from_the_available_options\n+    landing_page.in_person.pension_pot_size.select @small_pot_size_firm.investment_sizes.sample.name\n+  end\n+\n+  def and_i_indicate_that_i_dont_know_the_size_of_my_pension_pot\n+    landing_page.in_person.pension_pot_size.select I18n.t('search_filter.pension_pot.any_size_option')\n+  end\n+\n+  def and_i_indicate_that_i_would_like_transfer_my_pension\n+    landing_page.in_person.pension_pot_transfer.set true\n+  end\n+\n+  def when_i_submit_a_valid_postcode_search_with_the_selected_pot_size_band\n+    landing_page.in_person.tap do |section|\n+      section.postcode.set 'RG2 9FL'\n+      section.search.click\n+    end\n+  end\n+\n+  def then_i_am_shown_firms_that_can_advise_on_my_chosen_investment_pot_size\n+    expect(results_page).to be_displayed\n+    expect(results_page).to have_firms count: 1\n+    expect(results_page.firm_names).to include(@small_pot_size_firm.registered_name)\n+  end\n+\n+  def then_i_am_shown_firms_that_can_advise_on_pension_pots\n+    expect(results_page).to be_displayed\n+    expect(results_page).to have_firms count: 3","path":"spec/features/consumer_filters_by_investment_size_spec.rb","position":98,"original_position":98,"commit_id":"be02fd7bc4d37085097152ed9c3af36a5e13d2af","original_commit_id":"be02fd7bc4d37085097152ed9c3af36a5e13d2af","user":{"login":"esbel","id":106796,"avatar_url":"https://avatars.githubusercontent.com/u/106796?v=3","gravatar_id":"","url":"https://api.github.com/users/esbel","html_url":"https://github.com/esbel","followers_url":"https://api.github.com/users/esbel/followers","following_url":"https://api.github.com/users/esbel/following{/other_user}","gists_url":"https://api.github.com/users/esbel/gists{/gist_id}","starred_url":"https://api.github.com/users/esbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esbel/subscriptions","organizations_url":"https://api.github.com/users/esbel/orgs","repos_url":"https://api.github.com/users/esbel/repos","events_url":"https://api.github.com/users/esbel/events{/privacy}","received_events_url":"https://api.github.com/users/esbel/received_events","type":"User","site_admin":false},"body":"as above","created_at":"2015-03-12T13:44:04Z","updated_at":"2015-03-12T13:44:04Z","html_url":"https://github.com/moneyadviceservice/rad_consumer/pull/35#discussion_r26301479","pull_request_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/comments/26301479"},"html":{"href":"https://github.com/moneyadviceservice/rad_consumer/pull/35#discussion_r26301479"},"pull_request":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35","id":30573365,"html_url":"https://github.com/moneyadviceservice/rad_consumer/pull/35","diff_url":"https://github.com/moneyadviceservice/rad_consumer/pull/35.diff","patch_url":"https://github.com/moneyadviceservice/rad_consumer/pull/35.patch","issue_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/35","number":35,"state":"open","locked":false,"title":"5838 Pension Pot Size Filter","user":{"login":"lshepstone","id":1371053,"avatar_url":"https://avatars.githubusercontent.com/u/1371053?v=3","gravatar_id":"","url":"https://api.github.com/users/lshepstone","html_url":"https://github.com/lshepstone","followers_url":"https://api.github.com/users/lshepstone/followers","following_url":"https://api.github.com/users/lshepstone/following{/other_user}","gists_url":"https://api.github.com/users/lshepstone/gists{/gist_id}","starred_url":"https://api.github.com/users/lshepstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lshepstone/subscriptions","organizations_url":"https://api.github.com/users/lshepstone/orgs","repos_url":"https://api.github.com/users/lshepstone/repos","events_url":"https://api.github.com/users/lshepstone/events{/privacy}","received_events_url":"https://api.github.com/users/lshepstone/received_events","type":"User","site_admin":false},"body":"As a result of the separate remote search form being introduced, this story was held up for a bit - we've since split the \"online / phone\" scenarios for this to another story, so that @amansinghb can move ahead with this piece at least.\r\n\r\nThis means that the search form filters mixin here is only temporary, and with the next story I'll address merging the forms together (I know how I will approach this already).\r\n\r\nThoughts, @benlovell @esbel?","created_at":"2015-03-05T16:46:22Z","updated_at":"2015-03-12T13:44:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15dd2b577b1f8f5bb3c10c87dab9b2697be1ad9d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35/commits","review_comments_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35/comments","review_comment_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/35/comments","statuses_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/statuses/be02fd7bc4d37085097152ed9c3af36a5e13d2af","head":{"label":"moneyadviceservice:5838-investment-size-filter","ref":"5838-investment-size-filter","sha":"be02fd7bc4d37085097152ed9c3af36a5e13d2af","user":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"repo":{"id":30410520,"name":"rad_consumer","full_name":"moneyadviceservice/rad_consumer","owner":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moneyadviceservice/rad_consumer","description":"Consumer search for the Retirement Adviser Directory","fork":false,"url":"https://api.github.com/repos/moneyadviceservice/rad_consumer","forks_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/forks","keys_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/teams","hooks_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/hooks","issue_events_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/events{/number}","events_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/events","assignees_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/assignees{/user}","branches_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/branches{/branch}","tags_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/tags","blobs_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/statuses/{sha}","languages_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/languages","stargazers_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/stargazers","contributors_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/contributors","subscribers_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/subscribers","subscription_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/subscription","commits_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/comments{/number}","contents_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/contents/{+path}","compare_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/merges","archive_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/downloads","issues_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues{/number}","pulls_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls{/number}","milestones_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/milestones{/number}","notifications_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/labels{/name}","releases_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/releases{/id}","created_at":"2015-02-06T12:08:20Z","updated_at":"2015-03-12T11:12:53Z","pushed_at":"2015-03-12T13:30:52Z","git_url":"git://github.com/moneyadviceservice/rad_consumer.git","ssh_url":"git@github.com:moneyadviceservice/rad_consumer.git","clone_url":"https://github.com/moneyadviceservice/rad_consumer.git","svn_url":"https://github.com/moneyadviceservice/rad_consumer","homepage":null,"size":1796,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"moneyadviceservice:master","ref":"master","sha":"7cb90fdfb96cc4781a02806da9379c1aac7e8184","user":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"repo":{"id":30410520,"name":"rad_consumer","full_name":"moneyadviceservice/rad_consumer","owner":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moneyadviceservice/rad_consumer","description":"Consumer search for the Retirement Adviser Directory","fork":false,"url":"https://api.github.com/repos/moneyadviceservice/rad_consumer","forks_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/forks","keys_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/teams","hooks_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/hooks","issue_events_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/events{/number}","events_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/events","assignees_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/assignees{/user}","branches_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/branches{/branch}","tags_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/tags","blobs_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/statuses/{sha}","languages_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/languages","stargazers_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/stargazers","contributors_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/contributors","subscribers_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/subscribers","subscription_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/subscription","commits_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/comments{/number}","contents_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/contents/{+path}","compare_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/merges","archive_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/downloads","issues_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues{/number}","pulls_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls{/number}","milestones_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/milestones{/number}","notifications_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/labels{/name}","releases_url":"https://api.github.com/repos/moneyadviceservice/rad_consumer/releases{/id}","created_at":"2015-02-06T12:08:20Z","updated_at":"2015-03-12T11:12:53Z","pushed_at":"2015-03-12T13:30:52Z","git_url":"git://github.com/moneyadviceservice/rad_consumer.git","ssh_url":"git@github.com:moneyadviceservice/rad_consumer.git","clone_url":"https://github.com/moneyadviceservice/rad_consumer.git","svn_url":"https://github.com/moneyadviceservice/rad_consumer","homepage":null,"size":1796,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35"},"html":{"href":"https://github.com/moneyadviceservice/rad_consumer/pull/35"},"issue":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/35"},"comments":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/moneyadviceservice/rad_consumer/statuses/be02fd7bc4d37085097152ed9c3af36a5e13d2af"}}}}