flights_gui_tests 1.3.5 → 1.3.6

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: 7f2c4688f377e6c00bb4406f2674c18df8e8e9ff
4
- data.tar.gz: 485714588596f59b7c8ab107ad14008d0792ac75
3
+ metadata.gz: b19cc9c021789f870ee6ebb43c333283acef4372
4
+ data.tar.gz: 9f383a1d19590350ad2615cf9ec56df7c5721cd5
5
5
  SHA512:
6
- metadata.gz: 2d01c411d13e31839432f229b2ee6956af576d3e80357077839e28d71f7f88a75ab6321cea58ef35d19e34ba577ef3887199368b0cd048beb49601b11cd82599
7
- data.tar.gz: d92a0c2c4e0ed1e5844e22a8315b6f1a727e0a3212ca53a542f54bad7ddda54bfff40bd4bf061fedaa906a50dfae66b21f188bbfa0a02dd4134dc598c9f29a90
6
+ metadata.gz: dc5ad3a7a0278dafbb7aef77cfe3a35c047332136e37431f1a13af49f86e58c99ef340b26c32c28cc43149fa2e90a7942f7e2c77391ec7c26630291de116804e
7
+ data.tar.gz: 654bddceffb44a786feffdfd396e73f5a409d20bade82e55d70f8b0366d37dec31849b7b87a5fe722573703af9bd7abd6a776ac5f0eb3b85ec0ae6c7b37ed447
@@ -0,0 +1,21 @@
1
+ #encoding: utf-8
2
+ Y(/^cargo los datos de ingresos brutos$/) do
3
+ @page.cargar_datos_ingresos_brutos
4
+ end
5
+
6
+ Y(/^verifico los costos de ingresos brutos mostrados en el desglose$/) do
7
+ @itinerario_checkout = @page.datos_itinerario
8
+ @page.aviso_ingresos_brutos_element.when_visible(timeout=10)
9
+ @page.aviso_ingresos_brutos_element.text.strip.no_accents.should match('Por su condicion fiscal, su compra se encuentra sujeta a una percepcion de Ingresos Brutos de Provincia de Buenos Aires del 3,5\%, cargo que podra descontar como pago a cuenta de su impuesto mensual. Se adicionaron \$.{1,3} al total de su compra.')
10
+ @valores_ingresos_brutos = {}
11
+ @valores_ingresos_brutos["IIBB"] = @page.valor_ingresos_brutos_element.text.to_i.zero? ? Price.new("$ 0") : Price.new(@page.valor_desglose_ingresos_brutos_element.text)
12
+ @valores_ingresos_brutos["total"] = Price.new(@page.valor_desglose_total_element.text)
13
+ end
14
+
15
+ Y(/^verifico que se muestren los costos de ingresos brutos mostrados en el desglose$/) do
16
+ @page.ver_desglose_gracias_element.should visible("Link para popup de detalle de vuelo")
17
+ @page.ver_desglose_gracias_element.click
18
+ @page.popup_desglose_gracias_element.when_visible(timeout=20)
19
+ @valores_ingresos_brutos["IIBB"].should equal(Price.new(@page.valor_desglose_ingresos_brutos_element.text)) unless @valores_ingresos_brutos["IIBB"].valor.zero?
20
+ @valores_ingresos_brutos["total"].valor.should equal(@monto_total)
21
+ end
@@ -27,6 +27,7 @@ Cuando(/^espero que termine de cargar la pagina de checkout$/) do
27
27
  @page.pasajeros_element.when_visible(timeout=120)
28
28
  @page.cargar_valores_abtesting
29
29
  puts "URL: #{@page.browser.url}"
30
+ sleep(2)
30
31
  end
31
32
 
32
33
  Entonces(/^(?:verifico|valido) que ingrese al checkout$/) do
@@ -68,6 +68,7 @@ module NewCheckout
68
68
  @tarifas['cargos'] = (html/"li.charges").first ? Price.new((html/"li.charges span.price-currency").first.inner_text.strip) : Price.new("$ 0",true)
69
69
  @tarifas['afip'] = (html/"li.tax_afip").first ? Price.new((html/"li.tax_afip span.price-currency").first.inner_text.strip) : Price.new("$ 0",true)
70
70
  @tarifas['encargos'] = (html/"li.service_taxes").first ? Price.new((html/"li.service_taxes span.price-currency").first.inner_text.strip) : Price.new("$ 0",true)
71
+ @tarifas['seguros'] = (html/"li.destination_service_insurance").first ? Price.new((html/"li.destination_service_insurance span.price-currency").first.inner_text.strip) : Price.new("$ 0",true)
71
72
  @tarifas['total'] = (html/"li.total span.price-currency").first ? Price.new((html/"li.total span.price-currency").first.inner_text.strip) : Price.new("$ 0",true)
72
73
  end
73
74
 
@@ -62,5 +62,9 @@ class Price
62
62
  def empty?
63
63
  self.zero?
64
64
  end
65
+
66
+ def ==(other)
67
+ return ((self.value == other.value) and (self.currency == other.currency))
68
+ end
65
69
 
66
70
  end
@@ -28,51 +28,80 @@ module NewCheckout
28
28
  link(:buscar_codigo_postal,:class=>"search-postal-code")
29
29
 
30
30
  def cargar_datos_facturacion
31
- if AllPages.site=="AR"
32
- option = ["FINAL","INSCR","EXENT","MONOTRIBUTO"][rand(4)]
33
- situacion_fiscal_element.select_value(option)
34
- #lleno los campos requeridos
35
- cuil_element.set("30643063936")
36
- nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
37
- provincia_facturacion_element.select_value("C")
38
- set_autocomplete("ciudad_facturacion_custom","buenos ")
39
- calle_facturacion_element.set("corrientes")
40
- codigo_postal_facturacion_element.set("7111")
41
- numero_facturacion_element.set("123")
42
- piso_facturacion_element.set("1")
43
- departamento_facturacion_element.set("1")
44
- elsif AllPages.site=="BR"
45
- # option = ["CPF","CNPJ"][rand(2)]
46
- # situacion_fiscal_element.select_value(option)
47
- # #lleno los campos requeridos
48
- # option=="CPF" ? cuil_element.set("22233366638") : cuil_element.set("54651716001150")
49
- # nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
50
- # provincia_facturacion_element.select_value("AC")
51
- # municipal_facturacion_element.set("municipal") if municipal_facturacion_element.present?
52
- # set_autocomplete("ciudad_facturacion_custom","rio ")
53
- # calle_facturacion_element.set("corrientes")
54
- # barrio_facturacion_element.set("san jose")
55
- # codigo_postal_facturacion_element.set("7111")
56
- # numero_facturacion_element.set("123")
57
- # piso_facturacion_element.set("1")
58
- # departamento_facturacion_element.set("1")
59
- else
60
- check_invoice_check if invoice_check?
61
- cuil_element.set("33344455561") if cuil_element.present?
62
- nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
63
- provincia_facturacion_element.select(provincia_facturacion_options[2]) if provincia_facturacion_element.present?
64
- ciudad_facturacion_element.set("Rosario") if ciudad_facturacion_element.present?
65
- ciudad_facturacion_custom_element.set("Rosario") if ciudad_facturacion_custom_element.present?
66
- calle_facturacion_element.set("corrientes") if calle_facturacion_element.present?
67
- if AllPages.site=="MX"
68
- otro_estado_facturacion_element.set("Chiapas") if otro_estado_facturacion_element.present?
69
- codigo_postal_facturacion_element.set("7111") if codigo_postal_facturacion_element.present?
70
- numero_facturacion_element.set("123") if numero_facturacion_element.present?
71
- piso_facturacion_element.set("1") if piso_facturacion_element.present?
72
- departamento_facturacion_element.set("1") if departamento_facturacion_element.present?
73
- end
74
- end
31
+ eval "cargar_datos_facturacion_#{AllPages.site.downcase}"
75
32
  end
33
+
34
+ def cargar_datos_facturacion_ar
35
+ option = ["FINAL","INSCR","EXENT","MONOTRIBUTO"][rand(4)]
36
+ situacion_fiscal_element.select_value(option)
37
+ #lleno los campos requeridos
38
+ cuil_element.set("30643063936")
39
+ nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
40
+ provincia_facturacion_element.select_value("C")
41
+ set_autocomplete("ciudad_facturacion_custom","buenos ")
42
+ calle_facturacion_element.set("corrientes")
43
+ codigo_postal_facturacion_element.set("7111")
44
+ numero_facturacion_element.set("123")
45
+ piso_facturacion_element.set("1")
46
+ departamento_facturacion_element.set("1")
47
+ end
48
+
49
+ def cargar_datos_facturacion_br
50
+ # option = ["CPF","CNPJ"][rand(2)]
51
+ # situacion_fiscal_element.select_value(option)
52
+ # #lleno los campos requeridos
53
+ # option=="CPF" ? cuil_element.set("22233366638") : cuil_element.set("54651716001150")
54
+ # nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
55
+ # provincia_facturacion_element.select_value("AC")
56
+ # municipal_facturacion_element.set("municipal") if municipal_facturacion_element.present?
57
+ # set_autocomplete("ciudad_facturacion_custom","rio ")
58
+ # calle_facturacion_element.set("corrientes")
59
+ # barrio_facturacion_element.set("san jose")
60
+ # codigo_postal_facturacion_element.set("7111")
61
+ # numero_facturacion_element.set("123")
62
+ # piso_facturacion_element.set("1")
63
+ # departamento_facturacion_element.set("1")
64
+ end
65
+
66
+ def cargar_datos_facturacion_pe
67
+ check_invoice_check if invoice_check?
68
+ cuil_element.set("33344455561") if cuil_element.present?
69
+ nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
70
+ provincia_facturacion_element.select(provincia_facturacion_options[2]) if provincia_facturacion_element.present?
71
+ ciudad_facturacion_element.set("Rosario") if ciudad_facturacion_element.present?
72
+ ciudad_facturacion_custom_element.set("Rosario") if ciudad_facturacion_custom_element.present?
73
+ calle_facturacion_element.set("corrientes") if calle_facturacion_element.present?
74
+ end
75
+
76
+ def cargar_datos_facturacion_mx
77
+ check_invoice_check if invoice_check?
78
+ cuil_element.set("33344455561") if cuil_element.present?
79
+ nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
80
+ provincia_facturacion_element.select(provincia_facturacion_options[2]) if provincia_facturacion_element.present?
81
+ ciudad_facturacion_element.set("Rosario") if ciudad_facturacion_element.present?
82
+ ciudad_facturacion_custom_element.set("Rosario") if ciudad_facturacion_custom_element.present?
83
+ calle_facturacion_element.set("corrientes") if calle_facturacion_element.present?
84
+ otro_estado_facturacion_element.set("Chiapas") if otro_estado_facturacion_element.present?
85
+ codigo_postal_facturacion_element.set("7111") if codigo_postal_facturacion_element.present?
86
+ numero_facturacion_element.set("123") if numero_facturacion_element.present?
87
+ piso_facturacion_element.set("1") if piso_facturacion_element.present?
88
+ departamento_facturacion_element.set("1") if departamento_facturacion_element.present?
89
+ end
90
+
91
+ def cargar_datos_ingresos_brutos
92
+ option = ["INSCR","EXENT","MONOTRIBUTO"][rand(3)]
93
+ situacion_fiscal_element.select_value(option)
94
+ #lleno los campos requeridos
95
+ nombre_facturacion_element.set("diego qa romero") if nombre_facturacion_element.present?
96
+ provincia_facturacion_element.select_value("B")
97
+ set_autocomplete("ciudad_facturacion_custom","mar del ")
98
+ cuil_element.set("34684633319")
99
+ calle_facturacion_element.set("corrientes")
100
+ codigo_postal_facturacion_element.set("7111")
101
+ numero_facturacion_element.set("123")
102
+ piso_facturacion_element.set("1")
103
+ departamento_facturacion_element.set("1")
104
+ end
76
105
 
77
106
  end
78
107
  end
@@ -240,7 +240,7 @@ module NewCheckout
240
240
  inicial = (doc/"span.first-installment").inner_text.downstrip.gsub(/\./,'').match(/(\d+)$/)[1].to_i
241
241
  cant_restantes = (doc/"span.all-installments").inner_text.downstrip.gsub(/\./,'').match(/\+ (\d{1,2})/)[1].to_i
242
242
  valor_restantes = (doc/"span.all-installments/span.price/span.currency/span.amount").inner_text.gsub(/\./,'').to_i
243
- ((total_2 - (inicial + (cant_restantes * valor_restantes))).abs <= 2).should be_true
243
+ (inicial + (cant_restantes * valor_restantes)).should be_within(2).of(total_2)
244
244
  costo_financiero.should equal(total_2 - total_1)
245
245
  end
246
246
  end
@@ -34,6 +34,7 @@ module Checkout
34
34
  link(:link_mensaje_error_emision_last_minute,:css=>".ux-common-message-error a")
35
35
  div(:protegido,:css=>"#upselling-success")
36
36
  div(:desprotegido,:css=>"#upselling-warning")
37
+ div(:aviso_ingresos_brutos,:id=>"local-taxes-advice")
37
38
 
38
39
  radio_button(:opcion_no_seguro, :id=>"upselling-radios-1")
39
40
  radio_button(:opcion_si_seguro, :id=>"upselling-radios-0")
@@ -45,6 +46,9 @@ module Checkout
45
46
  span(:error_datos,:class=>"error-message")
46
47
  span(:carga,:css=>".loading .img")
47
48
  span(:precio_seguro,:css=>"#upselling .col7 .details-title .amount")
49
+ span(:valor_desglose_ingresos_brutos,:css=>".local_taxes .price-currency")
50
+ span(:valor_ingresos_brutos,:css=>"#local-taxes-advice .bold .amount")
51
+ span(:valor_desglose_total,:css=>".total .price-currency")
48
52
 
49
53
  text_field(:cupon_email,:id=>"voucher-email")
50
54
  text_field(:cupon_voucher,:id=>"voucher-code-0")
@@ -25,7 +25,8 @@ module Thanks
25
25
  span(:cerrar_popup_desglose_gracias,:css=>"#popup-booking-details .popup-close-button")
26
26
  span(:id_cro_pago_online,:class=>"thanks-reservation-homebanking-ticket-numbers")
27
27
  span(:precio_pago_online,:class=>"thanks-reservation-homebanking-price")
28
-
28
+ span(:valor_desglose_ingresos_brutos,:css=>".local_taxes .price-currency")
29
+ span(:valor_desglose_total,:css=>".total .price-currency")
29
30
  spans(:pasos_deposito,:class=>"thanks-reservation-info-data")
30
31
 
31
32
  link(:imprimir_datos_deposito,:id=>"thanks-reservation-cash-print")
@@ -1,3 +1,3 @@
1
1
  module FlightsGui
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6"
3
3
  end
@@ -19,7 +19,7 @@ Característica: checkout.book_ok
19
19
  Y valido los valores del desglose del checkout
20
20
  Y valido que no se muestre la leyenda de seguro gratis en el desglose
21
21
  #Y verifico el pixel de Efrontier
22
- Y verifico el pixel de trackeame en checkout
22
+ #Y verifico el pixel de trackeame en checkout
23
23
  Y si el site es "AR", verifico el tag de remarketing de facebook
24
24
  Entonces verifico que los precios de las cuotas se muestran correctamente
25
25
  Y verifico que se muestren la caja de clientes felices
@@ -218,9 +218,10 @@ Característica: checkout.book_ok
218
218
  Cuando espero que termine de cargar la pagina de resultados
219
219
  Entonces verifico que traiga resultados
220
220
  Cuando elijo un itinerario y paso a checkout
221
- Cuando espero que termine de cargar la pagina de checkout
222
- Entonces verifico que ingrese al checkout
223
- Y verifico que la pagina no rompa
221
+ Entonces verifico que la pagina no rompa
222
+ Y espero que termine de cargar la pagina de checkout
223
+ Y verifico que ingrese al checkout
224
+ Entonces si existe la opcion de cobertura, elijo "no_chequear" si quiero cobertura
224
225
  Entonces valido los valores del desglose del checkout
225
226
  #Y verifico el pixel de Efrontier
226
227
  #Y verifico el pixel de trackeame en checkout
@@ -80,6 +80,7 @@ Característica: checkout.fast_checkout
80
80
  Entonces verifico que la pagina no rompa
81
81
  Y espero que termine de cargar la pagina de checkout
82
82
  Y verifico que ingrese al checkout
83
+ Entonces si existe la opcion de cobertura, elijo "no_chequear" si quiero cobertura
83
84
  Cuando me logueo como usuario "bookingvuelos@despegar.com" y pass "despegar"
84
85
  Cuando verifico que ingrese al checkout
85
86
  Entonces verifico que se haya logueado correctamente
@@ -0,0 +1,39 @@
1
+ #language: es
2
+ @checkout
3
+ Característica: checkout.ingresos_brutos
4
+ Se verifica la correcta carga y funcionamiento de la pagina de checkout, se cargan los datos correctos y se realiza la compra
5
+
6
+ @ingresos_brutos
7
+ Esquema del escenario: Se verifica que se pueda realizar una compra correctamente usando el cargo de ingresos brutos.
8
+ Dado como un usuario de '<pais>'
9
+ * ingreso una busqueda '<tipo>' del tipo '<cabotage>'
10
+ Cuando realizo la busqueda
11
+ Entonces verifico que la pagina no rompa
12
+ Cuando espero que termine de cargar la pagina de resultados
13
+ Entonces verifico que traiga resultados
14
+ Y cierro popups
15
+ Cuando elijo un itinerario y paso a checkout
16
+ Entonces verifico que la pagina no rompa
17
+ Y espero que termine de cargar la pagina de checkout
18
+ Y verifico que ingrese al checkout
19
+ Entonces cargo los pasajeros
20
+ Y cargo los datos de la tarjeta
21
+ Y cargo los datos de ingresos brutos
22
+ Entonces verifico los costos de ingresos brutos mostrados en el desglose
23
+ Y cargo los datos de contacto
24
+ Cuando acepto y compro
25
+ Entonces espero que termine el pedido de compra
26
+ Y verifico si no trae errores
27
+ Entonces si aparece el popup de no disponibilidad, elijo un itinerario del popup de no disponibilidad
28
+ Entonces espero que termine de cargar la pagina de gracias
29
+ Y verifico que ingrese a la pagina de gracias
30
+ Y verifico el popup de asistencia al viajero
31
+ Y verifico los datos del vuelo comprado
32
+ Y verifico que se muestren los costos de ingresos brutos mostrados en el desglose
33
+
34
+ @ar
35
+ Ejemplos:
36
+ |pais|tipo|cabotage|
37
+ |AR |roundtrip|nil|
38
+ |AR |oneway|true|
39
+ |AR |multipledestinations|nil|
@@ -12567,6 +12567,35 @@ tasks:
12567
12567
  recipients:
12568
12568
  - estebanldh@gmail.com
12569
12569
  - nsimean@despegar.com
12570
+ - name: checkout.ingresos_brutos
12571
+ class_name: Henry::Task::CucumberTask
12572
+ options:
12573
+ tags:
12574
+ - checkout
12575
+ - ingresos_brutos
12576
+ expand: true
12577
+ no-source: true
12578
+ reports:
12579
+ - format: html
12580
+ name: ${DATE}_${TASK_NAME}.html
12581
+ recipients:
12582
+ - estebanldh@gmail.com
12583
+ - nsimean@despegar.com
12584
+ - name: checkout.ingresos_brutos.ar
12585
+ class_name: Henry::Task::CucumberTask
12586
+ options:
12587
+ tags:
12588
+ - checkout
12589
+ - ingresos_brutos
12590
+ - ar
12591
+ expand: true
12592
+ no-source: true
12593
+ reports:
12594
+ - format: html
12595
+ name: ${DATE}_${TASK_NAME}.html
12596
+ recipients:
12597
+ - estebanldh@gmail.com
12598
+ - nsimean@despegar.com
12570
12599
  - name: checkout.providers
12571
12600
  class_name: Henry::Task::CucumberTask
12572
12601
  options:
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.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - lgonzalez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: henry-container
@@ -255,6 +255,7 @@ files:
255
255
  - features/step_definitions/checkout/error_messages_steps.rb
256
256
  - features/step_definitions/checkout/fast_checkout_steps.rb
257
257
  - features/step_definitions/checkout/form_steps.rb
258
+ - features/step_definitions/checkout/ingresos_brutos.rb
258
259
  - features/step_definitions/checkout/last_minutes_steps.rb
259
260
  - features/step_definitions/checkout/load_steps.rb
260
261
  - features/step_definitions/checkout/price_jump_steps.rb
@@ -367,6 +368,7 @@ files:
367
368
  - features/tests/checkout/cupones.feature
368
369
  - features/tests/checkout/error_messages.feature
369
370
  - features/tests/checkout/fast_checkout.feature
371
+ - features/tests/checkout/ingresos_brutos.feature
370
372
  - features/tests/checkout/last_minute.feature
371
373
  - features/tests/checkout/low_cost.feature
372
374
  - features/tests/checkout/online_payment.feature