Skip to content

Commit

Permalink
Merge pull request #315 from solidusio/elia/post-release-updates
Browse files Browse the repository at this point in the history
Ensure the order tabs are not collapsed into a drop down
  • Loading branch information
elia authored Oct 9, 2023
2 parents 90894c8 + a65376b commit 2573352
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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')
3 changes: 0 additions & 3 deletions bin/dummy-app
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions bin/rails-new
Original file line number Diff line number Diff line change
Expand Up @@ -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: $@"
Expand Down
10 changes: 9 additions & 1 deletion spec/support/solidus_stripe/backend_test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions spec/system/backend/solidus_stripe/orders/payments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2573352

Please sign in to comment.