flights_gui_tests 1.8.9 → 1.9.0

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: beb9b5a68f1fb7644df1bd1af26826920e40b667
4
- data.tar.gz: 68c9195f9fbd7534b9c7d740c34e9809def2971e
3
+ metadata.gz: b9f36a6e7c68a750e3e34c36adf70ac8dde5b4c7
4
+ data.tar.gz: 4734fdcb5bf64402f344e265c4f9ca0078f9a172
5
5
  SHA512:
6
- metadata.gz: 508a5f996ba8da4ede2ef10d5c264ee148548c4780084869eda04aa3d2fd5da1a892efddf655755fd85ea46a7b1440000c82ea953592a5145d1759077cf5addd
7
- data.tar.gz: 4c3944a70de62bf9928d5b1a5ed23a1e4012dfac6f034e7482dcfc387fefadb16187bb585294e0be5b26b1d1f61b6c8435989687bb8d12451ac4547eb5fde66c
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
- #proveedor
83
- get = HTTParty.get("http://10.2.7.6/roma/transactions/#{@id_reserva}?with=FLIGHTS",:headers=>{"User-Agent"=>"Mozilla\/5.0"})
84
- pnr = get["flights"][0]["pnr"]
85
- begin
86
- 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")
87
- rescue Errno::ETIMEDOUT
88
- pending "No se pudo cancelar en el proveedor"
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
- unless respond_cancel["data"]["cancelled"]
91
- puts "No se pudo cancelar en el proveedor"
92
- respond_cancel["data"]["cancelled"].should be_true
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 equal(total_2)
232
+ total_1.should be_within(3).of(total_2)
233
233
  else
234
234
  total_1.should equal(total_2)
235
235
  end
@@ -1,3 +1,3 @@
1
1
  module FlightsGui
2
- VERSION = "1.8.9"
2
+ VERSION = "1.9.0"
3
3
  end
@@ -40,7 +40,6 @@ Característica: checkout.book_ok
40
40
  Y verifico el tag de datalayer
41
41
  Y verifico el pixel de Efrontier
42
42
  Y verifico los datos de la reserva enviados a fenix
43
- Y cancelo la reserva en el proveedor
44
43
 
45
44
  @pt
46
45
  @roundtrip
@@ -33,6 +33,7 @@ Característica: checkout.cupones
33
33
  Y verifico el popup de asistencia al viajero
34
34
  Y verifico el tag de datalayer
35
35
  Y cancelo la reserva en el proveedor
36
+ Y seteo la reserva como cancelada en roma
36
37
 
37
38
  @ar
38
39
  Ejemplos:
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.8.9
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-22 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: henry-container