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

Ensure the order tabs are not collapsed into a drop down #315

Merged
merged 5 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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