Skip to content

Commit

Permalink
specify explicit chromedriver version (titusfortner/webdrivers#180) -…
Browse files Browse the repository at this point in the history
… not sure why this just started happening - chrome upgrade?
  • Loading branch information
armandofox committed Aug 3, 2023
1 parent 05a988f commit c95cf44
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/views/valid_vouchers/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
%label.col-form-label{:for=>:valid_voucher_max_sales_for_type} Max sales for type
= number_field_tag 'valid_voucher_max_sales_for_type', (@valid_voucher.max_sales_for_type unless @valid_voucher.max_sales_for_type == ValidVoucher::INFINITE), :name => 'valid_voucher[max_sales_for_type]', :class => 'form-control col-md-2'

.form-group.form-row
.col-md-5.text-right
= popup_help_for :valid_voucher_min_sales_per_txn
%label.col-form-label{:for=>:valid_voucher_min_sales_per_txn} Min purchase per transaction
= number_field_tag 'valid_voucher_min_sales_per_txn', @valid_voucher.min_sales_per_txn, :name => 'valid_voucher[min_sales_per_txn]', :class => 'form-control col-md-2'

.form-group.form-row
.col-md-5.text-right
= popup_help_for :valid_voucher_max_sales_per_txn
%label.col-form-label{:for=>:valid_voucher_max_sales_per_txn} Max purchase per transaction
= number_field_tag 'valid_voucher_max_sales_per_txn', (@valid_voucher.max_sales_per_txn unless @valid_voucher.max_sales_per_txn == ValidVoucher::INFINITE), :name => 'valid_voucher[max_sales_per_txn]', :class => 'form-control col-md-2'

.form-group.form-row
.col-md-5.text-right
= popup_help_for :valid_voucher_promo_code
Expand Down
26 changes: 26 additions & 0 deletions app/views/valid_vouchers/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,32 @@
%label.px-1.col-form-label{:for => 'preserve_promo_code'} Keep as-is on existing redemptions
= popup_help_for 'keep_existing_redemptions_as_is'

#adjust-min-sales-per-txn
.form-group.form-row.pb-0.mb-0
.col-md-5.text-right
= popup_help_for :valid_voucher_min_sales_per_txn
%label.col-form-label{:for=>:valid_voucher_min_sales_per_txn} Min purchase per transaction
= number_field_tag 'valid_voucher_min_sales_per_txn', '', :name => 'valid_voucher[min_sales_per_txn]', :class => 'form-control col-md-2'

.form-group.form-row.pt-0.mt-0.border-bottom
.form-check.form-check-inline.col-md-5.offset-md-5
= check_box_tag 'preserve[min_sales_per_txn]', 1, true
%label.px-1.col-form-label{:for => 'preserve_min_sales_per_txn'} Keep as-is on existing redemptions
= popup_help_for 'keep_existing_redemptions_as_is'

#adjust-max-sales-per-txn
.form-group.form-row.pb-0.mb-0
.col-md-5.text-right
= popup_help_for :valid_voucher_max_sales_per_txn
%label.col-form-label{:for=>:valid_voucher_max_sales_per_txn} Max purchase per transaction
= number_field_tag 'valid_voucher_max_sales_per_txn', '', :name => 'valid_voucher[max_sales_per_txn]', :class => 'form-control col-md-2'

.form-group.form-row.pt-0.mt-0.border-bottom
.form-check.form-check-inline.col-md-5.offset-md-5
= check_box_tag 'preserve[max_sales_per_txn]', 1, true
%label.px-1.col-form-label{:for => 'preserve_max_sales_per_txn'} Keep as-is on existing redemptions
= popup_help_for 'keep_existing_redemptions_as_is'

#adjust-start-sales
.form-group.form-row.pb-0.mb-0
.col-md-5.text-right
Expand Down
1 change: 1 addition & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
Capybara.default_selector = :css
Capybara.server = :webrick
Capybara.register_driver :selenium do |app|
Webdrivers::Chromedriver.required_version = '114.0.5735.90'
options = Selenium::WebDriver::Chrome::Options.new(
args: %w[--headless --no-sandbox --disable-gpu --window-size=1024,1024]
)
Expand Down

0 comments on commit c95cf44

Please sign in to comment.