flights_gui_tests 2.3.13 → 2.3.14
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58667ee443415090054e4b4cbf2e96c5808a7500
|
4
|
+
data.tar.gz: 8b3ba03f1ae91de617659dceeaebb3607a22f5ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
12
|
-
@value = (precio.empty?) ? 0 : precio.match(/([^\s]+)\s+([^\s]+)/i)[2].strip.gsub(
|
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(
|
225
|
-
valor_restantes = (doc/"span.all-installments/span.currency/span.amount").inner_text.gsub(
|
226
|
-
cant_restantes = (doc/"span.all-installments").inner_text.gsub(
|
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(
|
239
|
-
inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(
|
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(
|
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(
|
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
|
data/features/support/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|