flights_gui_tests 2.3.34 → 2.3.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/step_definitions/checkout/verifications_steps.rb +4 -3
- data/features/step_definitions/results/multipleoneway_steps.rb +12 -2
- data/features/support/classes/clusters.rb +1 -0
- data/features/support/classes/thanks/multipleoneway_cluster.rb +49 -0
- data/features/support/modules/checkout/new_checkout/multipleoneway.rb +3 -0
- data/features/support/modules/checkout/new_checkout/pasajeros.rb +3 -3
- data/features/support/pages/checkout/checkout_page/new_checkout_page.rb +1 -0
- data/features/support/pages/thanks/thanks_page/new_thanks_page.rb +1 -1
- data/features/support/version.rb +1 -1
- data/features/tests/results/multipleoneway.feature +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02a59375cc236df5947b49ecce9769bda58c97cb
|
4
|
+
data.tar.gz: a64be0f107157b78fad329677a6f6f94aabbf6c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb5936fcbc0759101eaea9da249cc23df7757494f853041dd8d7514120eda613115effdf41312923fc837facf03607417b459d46d7c4ddd8de2dd495de3fe55e
|
7
|
+
data.tar.gz: 34c2cb6f5fe2f864c5dc708dc0777ab410b31ae6860b92195c9ddb7632f61929c486ada83bbd1c3b65492eacc18152de6163c0705c1d0eba1b05356abe78c5a2
|
@@ -69,22 +69,23 @@ Y(/^(?:verifico|valido) que los datos cargados sean mostrados correctamente al l
|
|
69
69
|
doc = Hpricot.parse(@page.html)
|
70
70
|
data = ["A","B","C","D","E","F","G","H","I","J","k"]
|
71
71
|
index = 0
|
72
|
+
RUTS = ["24434735-5","21225723-0","24030075-3","12474266-8","23669926-9","22016676-7","7028168-6","22439590-6","19124113-4","22522720-9","19854797-2","20313663-3"]
|
72
73
|
@page.manage_data.adt.times do |adulto|
|
73
74
|
(doc/"div.ticket-left li.passenger span.names span.first-name span.value")[index].inner_text.should equal("Diego QA#{data[index]}")
|
74
75
|
(doc/"div.ticket-left li.passenger span.names span.last-name span.value")[index].inner_text.should equal("Romero#{data[index]}")
|
75
|
-
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal("3245673#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
76
|
+
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal(AllPages.site=="CL" ? RUTS[index] : "3245673#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
76
77
|
index += 1
|
77
78
|
end
|
78
79
|
@page.manage_data.cnn.times do |nino|
|
79
80
|
(doc/"div.ticket-left li.passenger span.names span.first-name span.value")[index].inner_text.should equal("Martin QA#{data[index]}")
|
80
81
|
(doc/"div.ticket-left li.passenger span.names span.last-name span.value")[index].inner_text.should equal("Diez jr#{data[index]}")
|
81
|
-
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal("4245663#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
82
|
+
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal(AllPages.site=="CL" ? RUTS[index] : "4245663#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
82
83
|
index += 1
|
83
84
|
end
|
84
85
|
@page.manage_data.inf.times do |bebe|
|
85
86
|
(doc/"div.ticket-left li.passenger span.names span.first-name span.value")[index].inner_text.should equal("Maribel QA#{data[index]}")
|
86
87
|
(doc/"div.ticket-left li.passenger span.names span.last-name span.value")[index].inner_text.should equal("Dias Herr jrb#{data[index]}")
|
87
|
-
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal("4249966#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
88
|
+
(doc/"div.ticket-left li.passenger span.document span.document-number")[index].inner_text.should equal(AllPages.site=="CL" ? RUTS[index] : "4249966#{index}") if (doc/"div.ticket-left li.passenger span.document span.document-number")[index]
|
88
89
|
index += 1
|
89
90
|
end
|
90
91
|
if @page.tipo_de_busqueda!="multipledestinations"
|
@@ -73,14 +73,24 @@ end
|
|
73
73
|
|
74
74
|
Entonces(/^valido que se muestre en la caja de ida$/) do
|
75
75
|
@page.caja_ida_seleccionada_element.when_visible(timeout=5)
|
76
|
-
@page.carga_fecha_ida_separada_element.when_not_visible(timeout=
|
76
|
+
@page.carga_fecha_ida_separada_element.when_not_visible(timeout=30)
|
77
77
|
end
|
78
78
|
|
79
79
|
Entonces(/^valido que se muestre en la caja de vuelta$/) do
|
80
80
|
@page.caja_vuelta_seleccionada_element.when_visible(timeout=5)
|
81
|
-
@page.carga_fecha_ida_separada_element.when_not_visible(timeout=
|
81
|
+
@page.carga_fecha_ida_separada_element.when_not_visible(timeout=30)
|
82
82
|
end
|
83
83
|
|
84
84
|
Entonces(/^paso al checkout$/) do
|
85
85
|
@page.boton_comprar_element.click
|
86
|
+
end
|
87
|
+
|
88
|
+
Entonces(/^verifico si no fallan los dos tramos elegidos$/) do
|
89
|
+
if @page.multipleoneway_popup_error_element.present?
|
90
|
+
pending("fallaron los dos tramos al querer comprar")
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
Entonces(/^verifico si falla algun tramo elegido$/) do
|
95
|
+
|
86
96
|
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
module Thanks
|
3
|
+
class MultipleonewayCluster < Thanks::Cluster
|
4
|
+
attr_accessor :ida, :vuelta, :tarifas, :idas, :vueltas
|
5
|
+
|
6
|
+
def cargar_precios(html)
|
7
|
+
@tarifas = Hash.new
|
8
|
+
|
9
|
+
@tarifas["ida"] = cargar_precio_tramo((html/"div.fare-detail-wrappers div.fare-detail-wrapper").first)
|
10
|
+
@tarifas["vuelta"]= cargar_precio_tramo((html/"div.fare-detail-wrappers div.fare-detail-wrapper").last)
|
11
|
+
|
12
|
+
@tarifas['total'] = (html/"span#total-price").first ? Price.new((html/"span#total-price").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
13
|
+
end
|
14
|
+
|
15
|
+
def cargar_precio_tramo(html)
|
16
|
+
tarifa_tramo = Hash.new
|
17
|
+
tarifa_tramo['adt'] = Price.new((html/"li.adult_fare span.price-currency").first.inner_text.strip.gsub(',','.'))
|
18
|
+
tarifa_tramo['cnn'] = (html/"li.child_fare").first ? Price.new((html/"li.child_fare span.price-currency").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
19
|
+
tarifa_tramo['inf'] = (html/"li.infant_fare").first ? Price.new((html/"li.infant_fare span.price-currency").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
20
|
+
tarifa_tramo['tasas'] = (html/"li.taxes").first ? Price.new((html/"li.taxes span.price-currency").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
21
|
+
tarifa_tramo['cargos'] = (html/"li.charges").first ? Price.new((html/"li.charges span.price-currency").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
22
|
+
tarifa_tramo['afip'] = (html/"li.tax_afip").first ? Price.new((html/"li.tax_afip span.price-currency").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
23
|
+
tarifa_tramo['encargos'] = (html/"li.service_taxes").first ? Price.new((html/"li.service_taxes span.price-currency").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
24
|
+
tarifa_tramo['seguros'] = (html/"li.destination_service_insurance").first ? Price.new((html/"li.destination_service_insurance span.price-currency").first.inner_text.strip.gsub(',','.')) : Price.new("$ 0",true)
|
25
|
+
tarifa_tramo['descuento'] = (html/"li.payment_discount").first ? Price.new((html/"li.payment_discount span.price-currency span.currency").first.inner_text.strip.gsub(',','.')+" "+((html/"li.payment_discount span.price-currency span.amount").first.inner_text.strip.gsub(/\D/,'').to_i*-1).to_s) : Price.new("$ 0",true)
|
26
|
+
return tarifa_tramo
|
27
|
+
end
|
28
|
+
|
29
|
+
def validar_suma_desgloce(linea = "total|tarifa_adulto|tarifa_adulto_dolar")
|
30
|
+
sumaTarifas = 0
|
31
|
+
|
32
|
+
@tarifas["ida"].each_pair do |key,tarifa|
|
33
|
+
if key !~ /#{linea}/
|
34
|
+
sumaTarifas += tarifa.valor
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@tarifas["vuelta"].each_pair do |key,tarifa|
|
39
|
+
if key !~ /#{linea}/
|
40
|
+
sumaTarifas += tarifa.valor
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
return sumaTarifas.to_i
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -59,12 +59,12 @@ module NewCheckout
|
|
59
59
|
documento_elements[@index].set "4245663#{@index}" if documento_elements[@index]
|
60
60
|
else
|
61
61
|
tipo_documento_elements[@index].select_value("PASSPORT") if tipo_documento_elements[@index]
|
62
|
-
documento_elements[@index].set "
|
62
|
+
documento_elements[@index].set "4245663#{@index}" if documento_elements[@index]
|
63
63
|
end
|
64
64
|
sexo_elements[@index].select_value("MALE") if sexo_elements[@index]
|
65
65
|
dia_nacimiento_elements[@index_menores].select(@index+1)
|
66
66
|
mes_nacimiento_elements[@index_menores].select(3)
|
67
|
-
ano_nacimiento_elements[@index_menores].select_value("
|
67
|
+
ano_nacimiento_elements[@index_menores].select_value("2011")
|
68
68
|
@index += 1
|
69
69
|
@index_menores += 1
|
70
70
|
end
|
@@ -82,7 +82,7 @@ module NewCheckout
|
|
82
82
|
documento_elements[@index].set "4249966#{@index}" if documento_elements[@index]
|
83
83
|
else
|
84
84
|
tipo_documento_elements[@index].select_value("PASSPORT") if tipo_documento_elements[@index]
|
85
|
-
documento_elements[@index].set "
|
85
|
+
documento_elements[@index].set "4249966#{@index}" if documento_elements[@index]
|
86
86
|
end
|
87
87
|
sexo_elements[@index].select_value("MALE") if sexo_elements[@index]
|
88
88
|
dia_nacimiento_elements[@index_menores].select(@index+1)
|
@@ -10,6 +10,7 @@ module Checkout
|
|
10
10
|
include NewCheckout::FastCheckout
|
11
11
|
include NewCheckout::DatosDeFacturacion
|
12
12
|
include NewCheckout::InformacionDeContacto
|
13
|
+
include NewCheckout::Multipleoneway
|
13
14
|
|
14
15
|
div(:seccion_preguntas_riesgo,:css=>"#form .radio-group")
|
15
16
|
div(:opcion_no_deposito,:css=>"#confirm-payment-popup .flights-button-no")
|
@@ -35,7 +35,7 @@ module Thanks
|
|
35
35
|
|
36
36
|
def datos_itinerario()
|
37
37
|
if cluster_doble_element.present?
|
38
|
-
return
|
38
|
+
return Thanks::MultipleonewayCluster.new(tipo_de_busqueda,Hpricot.parse(desglose_gracias_element.html))
|
39
39
|
else
|
40
40
|
return Thanks::Cluster.new(tipo_de_busqueda,Hpricot.parse(desglose_gracias_element.html))
|
41
41
|
end
|
data/features/support/version.rb
CHANGED
@@ -44,6 +44,7 @@ Característica: results.multipleoneway
|
|
44
44
|
Y verifico que los datos cargados sean mostrados correctamente al lado del boton comprar
|
45
45
|
Cuando acepto y compro
|
46
46
|
Entonces espero que termine el pedido de compra
|
47
|
+
Entonces verifico si no fallan los dos tramos elegidos
|
47
48
|
Y verifico si no trae errores
|
48
49
|
Entonces si aparece el popup de no disponibilidad, elijo un itinerario para checkout de nuevas formas de pago del popup de no disponibilidad
|
49
50
|
Entonces espero que termine de cargar la pagina de gracias
|
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.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lgonzalez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|
@@ -310,6 +310,7 @@ files:
|
|
310
310
|
- features/support/classes/results/old_details_cluster.rb
|
311
311
|
- features/support/classes/string.rb
|
312
312
|
- features/support/classes/thanks/cluster.rb
|
313
|
+
- features/support/classes/thanks/multipleoneway_cluster.rb
|
313
314
|
- features/support/env.rb
|
314
315
|
- features/support/hooks.rb
|
315
316
|
- features/support/matchers.rb
|