flights_gui_tests 1.8.9 → 1.9.0
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 +4 -4
- data/features/step_definitions/checkout/form_steps.rb +4 -0
- data/features/step_definitions/thanks/thanks_steps.rb +44 -34
- data/features/support/modules/checkout/new_checkout/tarjeta.rb +1 -1
- data/features/support/version.rb +1 -1
- data/features/tests/checkout/book_ok.feature +0 -1
- data/features/tests/checkout/cupones.feature +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9f36a6e7c68a750e3e34c36adf70ac8dde5b4c7
|
|
4
|
+
data.tar.gz: 4734fdcb5bf64402f344e265c4f9ca0078f9a172
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff5d20db75bfd5cf55e5ff0b0c3f756e5094e69bfa2a92090bea0d18c5b7acf99c9dd1b7dedaac88586bcb2bc54c37ea555e6eed10cf7448d4792c6617f89cf7
|
|
7
|
+
data.tar.gz: 82591eaa30702c5eed981d157ffe3e0925d72a1f3e92b05d66abe4656161153691aebc1c7569b81f3e54e4f4c22b5233c64c961e8b86615adf87b38744360975
|
|
@@ -8,6 +8,10 @@ end
|
|
|
8
8
|
Y(/^cargo los datos de la tarjeta de debito$/) do
|
|
9
9
|
@page.cargar_datos_tarjeta
|
|
10
10
|
@page.radios_opciones_pago_elements[0].set
|
|
11
|
+
if AllPages.site.upcase.match("PE")
|
|
12
|
+
@page.tarjeta_element.select_value("1_DEBIT_VD_INB")
|
|
13
|
+
@page.numero_tarjeta_element.set("4213551234567896")
|
|
14
|
+
end
|
|
11
15
|
end
|
|
12
16
|
Y(/^cargo los datos de la tarjeta en el nuevo formulario$/) do
|
|
13
17
|
@page.cargar_datos_tarjeta_nuevo_formulario
|
|
@@ -58,7 +58,7 @@ Entonces(/^(?:verifico|valido) el popup de asistencia al viajero$/) do
|
|
|
58
58
|
end
|
|
59
59
|
rescue Watir::Wait::TimeoutError
|
|
60
60
|
@page.overlay_asistencia_al_viajero_element.should_not visible
|
|
61
|
-
end
|
|
61
|
+
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
Y(/^(?:verifico|valido) los datos de la reserva enviados a fenix$/) do
|
|
@@ -72,44 +72,54 @@ Y(/^(?:verifico|valido) los datos de la reserva enviados a fenix$/) do
|
|
|
72
72
|
json_data[0]["active_payment_method_dto"]["payment_method_credit_card"]["card_type"].should equal("CREDIT")
|
|
73
73
|
json_data[0]["charge"]["total_dto"]["total"].to_f.round.should be_within(2).of(@monto_total)
|
|
74
74
|
json_data[0]["charge"]["adult_tkt_charges"]["passangers_quantity"].to_i.should equal(@page.manage_data.adt)
|
|
75
|
-
json_data[0]["charge"]["child_tkt_charges"]["passangers_quantity"].to_i.should equal(@page.manage_data.cnn)
|
|
76
|
-
json_data[0]["charge"]["infant_tkt_charges"]["passangers_quantity"].to_i.should equal(@page.manage_data.inf)
|
|
75
|
+
json_data[0]["charge"]["child_tkt_charges"]["passangers_quantity"].to_i.should equal(@page.manage_data.cnn) if @page.manage_data.cnn > 0
|
|
76
|
+
json_data[0]["charge"]["infant_tkt_charges"]["passangers_quantity"].to_i.should equal(@page.manage_data.inf) if @page.manage_data.inf > 0
|
|
77
77
|
json_data[0]["country_code"].should equal(AllPages.site)
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
Y(/^cancelo la reserva en el proveedor$/) do
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
if $ENV.match("beta|produccion")
|
|
83
|
+
#proveedor
|
|
84
|
+
get = HTTParty.get("http://10.2.7.6/roma/transactions/#{@id_reserva}?with=FLIGHTS",:headers=>{"User-Agent"=>"Mozilla\/5.0"})
|
|
85
|
+
pnr = get["flights"][0]["pnr"]
|
|
86
|
+
provider = get["flights"][0]["vendor"]["code"]
|
|
87
|
+
begin
|
|
88
|
+
respond_cancel = HTTParty.get("http://10.2.7.6/flights-dbs/service/airItineraryCancel/cancel/#{AllPages.site}/0/0/#{provider}/#{pnr}/Booking-cancelling-from-chas-flight-tests-automation")
|
|
89
|
+
rescue Errno::ETIMEDOUT
|
|
90
|
+
puts "http://10.2.7.6/flights-dbs/service/airItineraryCancel/cancel/#{AllPages.site}/0/0/#{provider}/#{pnr}/Booking-cancelling-from-chas-flight-tests-automation"
|
|
91
|
+
pending "No se pudo cancelar en el proveedor"
|
|
92
|
+
end
|
|
93
|
+
unless respond_cancel["data"]["cancelled"]
|
|
94
|
+
puts "http://10.2.7.6/flights-dbs/service/airItineraryCancel/cancel/#{AllPages.site}/0/0/#{provider}/#{pnr}/Booking-cancelling-from-chas-flight-tests-automation"
|
|
95
|
+
puts "No se pudo cancelar en el proveedor"
|
|
96
|
+
respond_cancel["data"]["cancelled"].should be_true
|
|
97
|
+
end
|
|
89
98
|
end
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
Y(/^seteo la reserva como cancelada en roma$/) do
|
|
102
|
+
if $ENV.match("beta|produccion")
|
|
103
|
+
#roma
|
|
104
|
+
headers = Hash.new
|
|
105
|
+
headers["Content-Type"] = "application/json"
|
|
106
|
+
headers["X-UOW"] = "test"
|
|
107
|
+
headers["X-Client"] = "test"
|
|
108
|
+
body = {"status"=>"CANCELLED","reason"=>"Reserva de prueba"}
|
|
109
|
+
begin
|
|
110
|
+
uri = URI.parse "http://10.2.7.6/roma/transactions/#{@id_reserva}"
|
|
111
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
112
|
+
http.read_timeout = 30
|
|
113
|
+
req = Net::HTTP::Patch.new(uri.request_uri, headers)
|
|
114
|
+
req.body = body.to_json
|
|
115
|
+
respond_roma = http.request(req)
|
|
116
|
+
rescue Errno::ETIMEDOUT
|
|
117
|
+
pending "No se pudo cancelar en roma"
|
|
118
|
+
end
|
|
119
|
+
unless respond_roma.code.to_i==200
|
|
120
|
+
puts "No se pudo cancelar en roma"
|
|
121
|
+
respond_roma.code.to_i.should equal(200)
|
|
122
|
+
end
|
|
123
|
+
respond_roma.body.should match(@id_reserva)
|
|
93
124
|
end
|
|
94
|
-
#roma
|
|
95
|
-
headers = Hash.new
|
|
96
|
-
headers["Content-Type"] = "application/json"
|
|
97
|
-
headers["X-UOW"] = "test"
|
|
98
|
-
headers["X-Client"] = "test"
|
|
99
|
-
body = {"status"=>"CANCELLED","reason"=>"Reserva de prueba"}
|
|
100
|
-
begin
|
|
101
|
-
uri = URI.parse "http://10.2.7.6/roma/transactions/#{@id_reserva}"
|
|
102
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
|
103
|
-
http.read_timeout = 30
|
|
104
|
-
req = Net::HTTP::Patch.new(uri.request_uri, headers)
|
|
105
|
-
req.body = body.to_json
|
|
106
|
-
respond_roma = http.request(req)
|
|
107
|
-
rescue Errno::ETIMEDOUT
|
|
108
|
-
pending "No se pudo cancelar en roma"
|
|
109
|
-
end
|
|
110
|
-
unless respond_roma.code.to_i==200
|
|
111
|
-
puts "No se pudo cancelar en roma"
|
|
112
|
-
respond_roma.code.to_i.should equal(200)
|
|
113
|
-
end
|
|
114
|
-
respond_roma.body.should match(@id_reserva)
|
|
115
125
|
end
|
|
@@ -229,7 +229,7 @@ module NewCheckout
|
|
|
229
229
|
valor_restantes = (doc/"span.all-installments/span.currency/span.amount").inner_text.gsub(/\./,'').to_i
|
|
230
230
|
cant_restantes = (doc/"span.all-installments").inner_text.gsub(/\./,'').match(/\+ (\d+)/)[1].to_i
|
|
231
231
|
(inicial + (cant_restantes * valor_restantes)).should be_within(3).of(total_2)
|
|
232
|
-
total_1.should
|
|
232
|
+
total_1.should be_within(3).of(total_2)
|
|
233
233
|
else
|
|
234
234
|
total_1.should equal(total_2)
|
|
235
235
|
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: 1.
|
|
4
|
+
version: 1.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- lgonzalez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: henry-container
|