flights_gui_tests 2.3.13 → 2.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da5fda11d5f867d8f98b3c40408f5d9885d8e7b6
4
- data.tar.gz: 22738c738fef89bfbb87261b06f5cafcb79b18e7
3
+ metadata.gz: 58667ee443415090054e4b4cbf2e96c5808a7500
4
+ data.tar.gz: 8b3ba03f1ae91de617659dceeaebb3607a22f5ec
5
5
  SHA512:
6
- metadata.gz: 5ee017472f17c078eee9d95dda18bdc30150c48cdd37b695891dedb4f9c8a4e375476440b61e8c16b29863ceaafbde3001aedca1c8728d1b0b410bcc1341c6f4
7
- data.tar.gz: ff1b9f38c9f86a09adb9e0718eed3a474a22bf6ec1091c094e52ba620b8154574a99fe6ce2558bba239d6ff3add0411c4d63c13cb977e124136eedc12ff9705a
6
+ metadata.gz: a27ce6e306fb4680105df0da343a6f192da79e81fbebcdcb482f895239a5f7485d59775f5ebe4ccc18ddd5583629c5c1416326bcbf58174370aab07484bd4c03
7
+ data.tar.gz: ddeb832eef52aabdf54937b0b391c1b0b4143e7d1e93ab31c34767331a05db245b628710ded90fc29e03171f5489a97ce8fddcecafa5a8bf847823ed00247e41
@@ -8,8 +8,8 @@ class Price
8
8
  attr_accessor :value, :currency
9
9
 
10
10
  def initialize(precio, costos=nil, item=nil)
11
- @currency = (precio.empty?) ? '$' : (precio.gsub(/\-|\.|\d/,'').upstrip == 'BSF' ? "Bs.F." : precio.gsub(/\-|\.|\d| /,'').upstrip )
12
- @value = (precio.empty?) ? 0 : precio.match(/([^\s]+)\s+([^\s]+)/i)[2].strip.gsub(/\./,'').to_i
11
+ @currency = (precio.empty?) ? '$' : (precio.gsub(/\-|\.|\d|\,/,'').upstrip == 'BSF' ? "Bs.F." : precio.gsub(/\-|\.|\d|\,| /,'').upstrip )
12
+ @value = (precio.empty?) ? 0 : precio.match(/([^\s]+)\s+([^\s]+)/i)[2].strip.gsub(/\.|\,/,'').to_i
13
13
  end
14
14
 
15
15
  def moneda
@@ -221,9 +221,9 @@ module NewCheckout
221
221
  def validar_cuota_sin_intereses(total_1,total_2)
222
222
  if medio_de_pago_seleccionado_element.div(:class,"installments-price").present?
223
223
  doc = Hpricot.parse(medio_de_pago_seleccionado_element.div(:class,"installments-price").html)
224
- inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
225
- valor_restantes = (doc/"span.all-installments/span.currency/span.amount").inner_text.gsub(/\./,'').to_i
226
- cant_restantes = (doc/"span.all-installments").inner_text.gsub(/\./,'').match(/\+ (\d+)/)[1].to_i
224
+ inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(/\.|\,/,'').match(/(\d+)$/)[1].to_i
225
+ valor_restantes = (doc/"span.all-installments/span.currency/span.amount").inner_text.gsub(/\.|\,/,'').to_i
226
+ cant_restantes = (doc/"span.all-installments").inner_text.gsub(/\.|\,/,'').match(/\+ (\d+)/)[1].to_i
227
227
  (inicial + (cant_restantes * valor_restantes)).should be_within(3).of(total_2)
228
228
  total_1.should be_within(3).of(total_2)
229
229
  else
@@ -235,10 +235,10 @@ module NewCheckout
235
235
  if medio_de_subpago_seleccionado_element.present?
236
236
  doc = Hpricot.parse(medio_de_subpago_seleccionado_element.html)
237
237
  unless (doc/"span.interest").inner_text.empty?
238
- costo_financiero = (doc/"span.interest").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
239
- inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
238
+ costo_financiero = (doc/"span.interest").inner_text.downstrip.gsub(/\.|\,/,'').match(/(\d+)$/)[1].to_i
239
+ inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(/\.|\,/,'').match(/(\d+)$/)[1].to_i
240
240
  cant_restantes = (doc/"span.all-installments").inner_text.downstrip.gsub(/\./,'').match(/\+ (\d{1,2})/)[1].to_i
241
- valor_restantes = (doc/"span.all-installments/span.price/span.currency/span.amount").inner_text.gsub(/\./,'').to_i
241
+ valor_restantes = (doc/"span.all-installments/span.price/span.currency/span.amount").inner_text.gsub(/\.|\,/,'').to_i
242
242
  (inicial + (cant_restantes * valor_restantes)).should be_within(2).of(total_2)
243
243
  costo_financiero.should equal(total_2 - total_1)
244
244
  end
@@ -262,7 +262,7 @@ module NewCheckout
262
262
  if desglose_de_cuotas_element.present?
263
263
  doc = Hpricot.parse(desglose_de_cuotas_element.html)
264
264
  inicial = (doc/"span.first-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
265
- valor_restantes = (doc/"span.others-price").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
265
+ valor_restantes = (doc/"span.others-price").inner_text.downstrip.gsub(/\.|\,/,'').match(/(\d+)$/)[1].to_i
266
266
  cant_restantes = (doc/"span.others-quantity").inner_text.to_i
267
267
  (inicial + (cant_restantes * valor_restantes)).should be_within(3).of(total_desglose)
268
268
  end
@@ -1,3 +1,3 @@
1
1
  module FlightsGui
2
- VERSION = "2.3.13"
2
+ VERSION = "2.3.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flights_gui_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.13
4
+ version: 2.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - lgonzalez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2015-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: henry-container