From 489feb4e019448d9b7b427c0c3ebdecdd53cc494 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 1 Jun 2016 14:40:56 +1000 Subject: [PATCH] Longer default page size for feature specs --- spec/features/admin/order_cycles_spec.rb | 12 ------------ spec/spec_helper.rb | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/spec/features/admin/order_cycles_spec.rb b/spec/features/admin/order_cycles_spec.rb index 2733aeaeaf..1fa85f06e7 100644 --- a/spec/features/admin/order_cycles_spec.rb +++ b/spec/features/admin/order_cycles_spec.rb @@ -229,9 +229,6 @@ feature %q{ page.should have_field 'order_cycle_outgoing_exchange_1_pickup_time', with: 'time 1' page.should have_field 'order_cycle_outgoing_exchange_1_pickup_instructions', with: 'instructions 1' - # Make the whole page visible - page.driver.resize(1280, 3600) - # And the distributors should have products page.all('table.exchanges tbody tr.distributor').each_with_index do |row, i| row.find('td.products').click @@ -276,9 +273,6 @@ feature %q{ scenario "updating an order cycle", js: true do - # Make the page long enough to avoid the save bar overlaying the form - page.driver.resize(1280, 3600) - # Given an order cycle with all the settings oc = create(:order_cycle) initial_variants = oc.variants.sort_by &:id @@ -655,9 +649,6 @@ feature %q{ end scenario "editing an order cycle" do - # Make the page long enough to avoid the save bar overlaying the form - page.driver.resize(1280, 3600) - oc = create(:simple_order_cycle, { suppliers: [supplier_managed, supplier_permitted, supplier_unmanaged], coordinator: distributor_managed, distributors: [distributor_managed, distributor_permitted, distributor_unmanaged], name: 'Order Cycle 1' } ) visit edit_admin_order_cycle_path(oc) @@ -927,9 +918,6 @@ feature %q{ end scenario "updating an order cycle" do - # Make the page long enough to avoid the save bar overlaying the form - page.driver.resize(1280, 3600) - # Given an order cycle with pickup time and instructions fee1 = create(:enterprise_fee, name: 'my fee', enterprise: enterprise) fee2 = create(:enterprise_fee, name: 'that fee', enterprise: enterprise) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a477ad31e1..f4c5b73fac 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -35,7 +35,7 @@ require 'capybara/poltergeist' Capybara.javascript_driver = :poltergeist Capybara.register_driver :poltergeist do |app| - options = {phantomjs_options: ['--load-images=no'], window_size: [1280, 800], timeout: 2.minutes} + options = {phantomjs_options: ['--load-images=no'], window_size: [1280, 3600], timeout: 2.minutes} # Extend poltergeist's timeout to allow ample time to use pry in browser thread #options.merge! {timeout: 5.minutes} # Enable the remote inspector: Use page.driver.debug to open a remote debugger in chrome