diff --git a/Rakefile b/Rakefile index 2a475154..3b0b9d78 100644 --- a/Rakefile +++ b/Rakefile @@ -8,3 +8,7 @@ task :default do sh 'bin/rspec' end end + +require 'rake/clean' +CLOBBER.include('tmp/cache/rails-new') +CLOBBER.include('dummy-app') diff --git a/bin/dummy-app b/bin/dummy-app index 7875086a..76b14a6e 100755 --- a/bin/dummy-app +++ b/bin/dummy-app @@ -22,8 +22,5 @@ echo "gem 'simplecov', '~> 0.22', require: false" >> Gemfile echo "gem 'simplecov-cobertura', require: false" >> Gemfile unbundled bundle install -unbundled bundle add solidus --github solidusio/solidus --branch "${SOLIDUS_BRANCH:-main}" --version '> 0.a' -unbundled bundle exec rake db:drop db:create -unbundled bundle exec rails generate solidus:install --auto-accept --payment-method=none --no-seed --no-sample "$@" unbundled bundle add $extension_name --path .. unbundled bundle exec rails generate $extension_name:install --migrate --load-seeds=false --specs=all diff --git a/bin/rails-new b/bin/rails-new index 0581bb55..bbdd4634 100755 --- a/bin/rails-new +++ b/bin/rails-new @@ -11,6 +11,8 @@ rails_version=`bundle exec ruby -rrails/version -e'puts Rails.version'` solidus_version=`bundle exec ruby -rspree/core/version -e'puts Spree::VERSION'` cache_path="tmp/cache/rails-new/${app_name}-${rails_version}-${solidus_version}-${ruby_version}.zip" +test $CI && cache_path="" # Disable caching on CI + # Stay away from the bundler env of the containing extension. function unbundled { echo "~~> Running: $@" diff --git a/spec/support/solidus_stripe/backend_test_helper.rb b/spec/support/solidus_stripe/backend_test_helper.rb index e4b85cd2..f11054bc 100644 --- a/spec/support/solidus_stripe/backend_test_helper.rb +++ b/spec/support/solidus_stripe/backend_test_helper.rb @@ -70,7 +70,14 @@ def visit_payments_page def visit_payment_page(payment) visit_payments_page - click_on payment.number + click_on_payment(payment) + end + + def click_on_payment(payment) + payment_number_link = find_link(payment.number) + page.current_window.resize_to(1200, 800) + scroll_to payment_number_link + payment_number_link.click end # Action helper methods for performing operations on payments @@ -110,6 +117,7 @@ def create_order_with_existing_payment_source def complete_order_with_existing_payment_source visit_payments_page click_on "Continue" + page.current_window.resize_to(1200, 800) click_on "Confirm" click_on "Complete Order" end diff --git a/spec/system/backend/solidus_stripe/orders/payments_spec.rb b/spec/system/backend/solidus_stripe/orders/payments_spec.rb index 4c7f5058..deb5d0ad 100644 --- a/spec/system/backend/solidus_stripe/orders/payments_spec.rb +++ b/spec/system/backend/solidus_stripe/orders/payments_spec.rb @@ -13,8 +13,12 @@ it 'navigates to the payments page' do payment = create_authorized_payment visit_payments_page - - click_on 'Payments' + within('[data-hook="admin_order_tabs"]') do + payments_link = find_link('Payments') + scroll_to payments_link + page.current_window.resize_to(1200, 800) + payments_link.click + end expect(page).to have_content(payment.number) end