flights_gui_tests 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/features/data/promos.csv +30 -0
- data/features/step_definitions/checkout/compra_duplicada_steps.rb +1 -1
- data/features/step_definitions/checkout/load_steps.rb +3 -3
- data/features/step_definitions/checkout/upselling_steps.rb +3 -8
- data/features/step_definitions/landing/load_steps.rb +1 -1
- data/features/step_definitions/page_steps.rb +32 -1
- data/features/support/env.rb +7 -2
- data/features/support/pages/all_pages.rb +1 -1
- data/features/support/pages/checkout/checkout_page/new_checkout_page.rb +59 -0
- data/features/support/pages/checkout/checkout_page/old_checkout_page.rb +53 -0
- data/features/support/pages/checkout/checkout_page.rb +2 -46
- data/features/tests/checkout/price_jump.feature +1 -0
- data/features/tests/checkout/seguros.feature +1 -1
- data/features/tests/results/busquedas_promo.feature +0 -0
- data/flights_gui_tests.gemspec +1 -1
- metadata +5 -3
- data/features/support/pages/checkout/new_checkout_page.rb +0 -124
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26a12fd7833d6259432f125d207ef08430064f28
|
4
|
+
data.tar.gz: 3858160948321e9c48a0d9d99dc71f28b71887db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f664c555009b7e6fe19df1564b2dc1ebf349ad071a9288bb3ce048795b114e2aaf5ff16d3d76b882380e307717c2850384ac41ebb414df758cc817de4f94653
|
7
|
+
data.tar.gz: 801baba3cb858bacc42071827039072b6fad6df31206af68a7eeef8e2f9c7f61d4385c12f0e9ced2655b5059dd5d7d9b85816608a039bd15a28fbc7bfcf95cc4
|
@@ -0,0 +1,30 @@
|
|
1
|
+
sao;ssa;2015-01-01;60
|
2
|
+
sao;lon;2015-01-01;60
|
3
|
+
sao;lis;2015-01-01;60
|
4
|
+
sao;mad;2015-01-01;60
|
5
|
+
sao;bcn;2015-01-01;60
|
6
|
+
sao;mil;2015-01-01;60
|
7
|
+
sao;ams;2015-01-01;60
|
8
|
+
sao;orl;2015-01-01;60
|
9
|
+
sao;bue;2015-01-01;60
|
10
|
+
sao;bkk;2015-01-01;60
|
11
|
+
sao;mia;2015-01-01;60
|
12
|
+
bhz;mia;2015-01-01;60
|
13
|
+
bsb;lon;2015-01-01;60
|
14
|
+
bsb;lis;2015-01-01;60
|
15
|
+
bsb;mad;2015-01-01;60
|
16
|
+
bsb;bcn;2015-01-01;60
|
17
|
+
bsb;mil;2015-01-01;60
|
18
|
+
bsb;ams;2015-01-01;60
|
19
|
+
rec;ssa;2015-01-01;60
|
20
|
+
for;rec;2015-01-01;60
|
21
|
+
ssa;rio;2015-01-01;60
|
22
|
+
rio;bsb;2015-01-01;60
|
23
|
+
rio;rec;2015-01-01;60
|
24
|
+
rio;ams;2015-01-01;60
|
25
|
+
rio;mil;2015-01-01;60
|
26
|
+
rio;lon;2015-01-01;60
|
27
|
+
rio;mad;2015-01-01;60
|
28
|
+
rio;bcn;2015-01-01;60
|
29
|
+
rio;lis;2015-01-01;60
|
30
|
+
rio;mia;2015-01-01;60
|
@@ -5,7 +5,7 @@ Entonces(/^vuelvo a la pagina de resultados original$/) do
|
|
5
5
|
end
|
6
6
|
|
7
7
|
Cuando(/^(?:verifico|valido) que se muestre el popup de compra duplicada$/) do
|
8
|
-
@page = Checkout::
|
8
|
+
@page = Checkout::OldCheckoutPage.new($browser)
|
9
9
|
@page.popup_compra_duplicada_element.when_visible(timeout=60)
|
10
10
|
@page.popup_compra_duplicada_element.should visible("popup de compras duplicadas")
|
11
11
|
@page.opcion_si_compra_duplicada_element.should visible("boton yes")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
Cuando(/^ingreso a la pagina de checkout de agencia para una busqueda '(.*?)' del tipo '(.*?)'$/) do |tipo, cabotaje|
|
3
|
-
@page = Checkout::
|
3
|
+
@page = Checkout::OldCheckoutPage.new($browser)
|
4
4
|
@page.cargar_url(tipo,$ENV,cabotaje)
|
5
5
|
begin
|
6
6
|
@page.url_busqueda
|
@@ -11,7 +11,7 @@ Cuando(/^ingreso a la pagina de checkout de agencia para una busqueda '(.*?)' de
|
|
11
11
|
end
|
12
12
|
|
13
13
|
Cuando(/^ingreso a un checkout directo para una busqueda '(.*?)' del tipo '(.*?)'$/) do |tipo, cabotaje|
|
14
|
-
@page = Checkout::
|
14
|
+
@page = Checkout::OldCheckoutPage.new($browser)
|
15
15
|
@page.cargar_url(tipo,$ENV,cabotaje)
|
16
16
|
begin
|
17
17
|
@page.url_busqueda
|
@@ -25,7 +25,7 @@ Cuando(/^espero que termine de cargar la pagina de checkout$/) do
|
|
25
25
|
if @nuevo_checkout
|
26
26
|
@page = Checkout::NewCheckoutPage.new($browser)
|
27
27
|
else
|
28
|
-
@page = Checkout::
|
28
|
+
@page = Checkout::OldCheckoutPage.new($browser)
|
29
29
|
end
|
30
30
|
@page.popup_transicion_inicial_element.when_not_visible(timeout=120)
|
31
31
|
@page.pasajeros_element.when_visible(timeout=120)
|
@@ -4,17 +4,14 @@ Entonces(/^existe la opcion de cobertura$/) do
|
|
4
4
|
end
|
5
5
|
|
6
6
|
Y(/^elijo "(.*)" si quiero cobertura$/) do |option|
|
7
|
-
@page.
|
7
|
+
@page.opcion_seguros((option=="chequear") ? true : false)
|
8
8
|
@page.carga_element.when_not_visible(timeout=60)
|
9
9
|
sleep(1)
|
10
10
|
end
|
11
11
|
|
12
12
|
Entonces(/^(?:verifico|valido) que se muestre correctamente la caja de seguro sin chequear$/) do
|
13
|
-
@page.cobertura_element.should visible("caja de seguros")
|
14
|
-
@page.opcion_seguros_element.should visible("checkbox en la caja de seguro")
|
15
|
-
@page.cobertura_element.should visible("link de cobertura en la caja de seguro")
|
16
13
|
@page.desprotegido_element.should visible("texto de no estoy protegido en la caja de seguro")
|
17
|
-
@page.desprotegido_element.text.should match("No estoy protegido")
|
14
|
+
@page.desprotegido_element.text.should match("No estoy protegido|Viaja sin asistencia")
|
18
15
|
end
|
19
16
|
|
20
17
|
Entonces(/^(?:verifico|valido) que el precio del seguro no se muestre en el desglose$/) do
|
@@ -22,11 +19,9 @@ Entonces(/^(?:verifico|valido) que el precio del seguro no se muestre en el desg
|
|
22
19
|
end
|
23
20
|
|
24
21
|
Entonces(/^(?:verifico|valido) que se muestre correctamente la caja de seguro chequeada$/) do
|
25
|
-
@page.cobertura_element.should visible("caja de seguros")
|
26
|
-
@page.opcion_seguros_element.should visible("checkbox en la caja de seguro")
|
27
22
|
@page.cobertura_element.should visible("link de cobertura en la caja de seguro")
|
28
23
|
@page.protegido_element.should visible("texto de estoy protegido en la caja de seguro")
|
29
|
-
@page.protegido_element.text.should match("Estoy protegido")
|
24
|
+
@page.protegido_element.text.should match("Estoy protegido|Viaja asegurado")
|
30
25
|
end
|
31
26
|
|
32
27
|
Entonces(/^(?:verifico|valido) que el precio del seguro se muestre correctamente en el desglose$/) do
|
@@ -32,7 +32,7 @@ end
|
|
32
32
|
|
33
33
|
Y(/^(?:verifico|valido) la pagina donde ingresa$/) do
|
34
34
|
@page_results = Results::SearchPage.new($browser)
|
35
|
-
@page_checkout = Checkout::
|
35
|
+
@page_checkout = Checkout::OldCheckoutPage.new($browser)
|
36
36
|
puts " URL: #{@page.url}"
|
37
37
|
Watir::Wait.until(timeout = 300){@page_results.carga_element.present? or @page_results.itinerario_element.present? or @page_checkout.pasajeros_element.present? or @page_checkout.notificacion_warning_element.present?}
|
38
38
|
if @page_checkout.pasajeros_element.present? or @page_checkout.notificacion_warning_element.present?
|
@@ -19,4 +19,35 @@ end
|
|
19
19
|
|
20
20
|
Entonces(/^es ida y vuelta$/) do
|
21
21
|
@page.manage_data.description.should equal("roundtrip")
|
22
|
-
end
|
22
|
+
end
|
23
|
+
|
24
|
+
Cuando(/^realizo las busquedas para promos$/) do
|
25
|
+
dia = Date.today
|
26
|
+
puts dia.strftime("%d%m%y")
|
27
|
+
file=File.open("features/data/promos.csv")
|
28
|
+
file.each_line do |line|
|
29
|
+
data=line.split(';')
|
30
|
+
puts data
|
31
|
+
data[3].to_i.times do |i|
|
32
|
+
aux = Date.parse(data[2])
|
33
|
+
date = aux + i
|
34
|
+
url_rt = "http://www.decolar.com/shop/flights/results/roundtrip/#{data[0]}/#{data[1]}/#{date}/#{date+8}/1/0/0"
|
35
|
+
url_ow = "http://www.decolar.com/shop/flights/results/oneway/#{data[0]}/#{data[1]}/#{date}/1/0/0"
|
36
|
+
rt = "http://www.decolar.com/shop/flights/data/search/roundtrip/#{data[0]}/#{data[1]}/#{date}/#{date+8}/1/0/0/TOTALFARE/ASCENDING/NA/NA/NA/NA/NA?hashForData=#{Digest::MD5.hexdigest(url_rt+'despegar')}"
|
37
|
+
ow = "http://www.decolar.com/shop/flights/data/search/oneway/#{data[0]}/#{data[1]}/#{date}/1/0/0/TOTALFARE/ASCENDING/NA/NA/NA/NA?hashForData=#{Digest::MD5.hexdigest(url_ow+'despegar')}"
|
38
|
+
begin
|
39
|
+
get_rt = HTTParty.get(rt,:headers => {"X-UOW" => "ROBOT_ALERTA_PRCIO","referer"=>url_rt})
|
40
|
+
puts rt
|
41
|
+
rescue Errno::ECONNRESET,Timeout::Error
|
42
|
+
puts "fail: #{rt}"
|
43
|
+
end
|
44
|
+
begin
|
45
|
+
get_ow = HTTParty.get(ow,:headers => {"X-UOW" => "ROBOT_ALERTA_PRCIO","referer"=>url_ow})
|
46
|
+
puts ow
|
47
|
+
rescue Errno::ECONNRESET,Timeout::Error
|
48
|
+
puts "fail: #{ow}"
|
49
|
+
end
|
50
|
+
sleep(3)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/features/support/env.rb
CHANGED
@@ -55,7 +55,8 @@ require_relative 'pages/results/desambiguation_airports_page'
|
|
55
55
|
require_relative 'pages/results/desambiguation_city_page'
|
56
56
|
require_relative 'pages/results/search_page'
|
57
57
|
require_relative 'pages/checkout/checkout_page'
|
58
|
-
require_relative 'pages/checkout/
|
58
|
+
require_relative 'pages/checkout/checkout_page/old_checkout_page'
|
59
|
+
require_relative 'pages/checkout/checkout_page/new_checkout_page'
|
59
60
|
require_relative 'pages/checkout/popup_results_page'
|
60
61
|
require_relative 'pages/thanks/thanks_page'
|
61
62
|
require_relative 'pages/landing/search_page'
|
@@ -66,7 +67,11 @@ require_relative 'matchers'
|
|
66
67
|
require_relative 'hooks'
|
67
68
|
|
68
69
|
# carga de parametros globales
|
69
|
-
|
70
|
+
if Henry::Environment.params.empty?
|
71
|
+
$HENRY_PARAMS = ENV
|
72
|
+
else
|
73
|
+
$HENRY_PARAMS = Henry::Environment.params
|
74
|
+
end
|
70
75
|
$ENV = $HENRY_PARAMS['env']
|
71
76
|
|
72
77
|
$date = Dater::Resolver.new("%Y-%m-%d","es")
|
@@ -85,7 +85,7 @@ class AllPages
|
|
85
85
|
when 'RESULTS' then "results-f-gui=beta"
|
86
86
|
when 'CHECKOUT' then "chkf-app=beta"
|
87
87
|
when 'LANDING' then "landing-f-gui=beta"
|
88
|
-
when 'FSM' then "fsm-
|
88
|
+
when 'FSM' then "fsm-search=beta|fsm-retrieve=beta|fsm-cheapest=beta"
|
89
89
|
when 'CHAS' then "chas-flight=beta"
|
90
90
|
when 'DEBASE' then "flights-dbs-new=flights-dbs-new-b"
|
91
91
|
when 'PRISM' then "prism=beta"
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Checkout
|
3
|
+
class NewCheckoutPage < CheckoutPage
|
4
|
+
|
5
|
+
div(:seccion_preguntas_riesgo,:css=>"#form .radio-group")
|
6
|
+
div(:opcion_no_deposito,:css=>"#confirm-payment-popup .flights-button-no")
|
7
|
+
div(:opcion_si_deposito,:css=>"#confirm-payment-popup .flights-button-yes")
|
8
|
+
div(:notificacion_error,:class=>"notification-box error-box")
|
9
|
+
div(:notificacion_warning,:class=>"notification-box warn-box")
|
10
|
+
div(:notificacion_warning_ux,:class=>"ux-common-message ux-common-message-warning ")
|
11
|
+
div(:mensaje_error_ux,:class=>"ux-common-message ux-common-message-error ")
|
12
|
+
div(:notificacion_error_ux,:class=>"ux-common-error")
|
13
|
+
div(:boton_si_cambio_precio,:class=>"button-yes")
|
14
|
+
div(:agencia_afiliada,:id=>"agency")
|
15
|
+
div(:cobertura,:id=>'upselling')
|
16
|
+
div(:cobertura_deshabilitada,:class=>"upselling upselling-disabled")
|
17
|
+
div(:itinerario,:id=>"detail")
|
18
|
+
div(:cupon_error,:id=>"coupon-error")
|
19
|
+
div(:cupon_exito,:id=>"voucher-success")
|
20
|
+
div(:clientes_felices,:id=>"happy-clients")
|
21
|
+
div(:link_price_jump,:css=>"#popup-price-difference .popup-link")
|
22
|
+
div(:mensaje_cancelacion,:id=>"cancellation-advice")
|
23
|
+
div(:mensaje_cancelacion_en_el_dia,:id=>"last-minute-advice")
|
24
|
+
div(:mensaje_error_emision_last_minute,:class=>"ux-common-message ux-common-message-error ")
|
25
|
+
div(:protegido,:css=>"#upselling-success")
|
26
|
+
div(:desprotegido,:css=>"#upselling-warning")
|
27
|
+
|
28
|
+
radio_button(:opcion_no_seguro, :id=>"upselling-radios-1")
|
29
|
+
radio_button(:opcion_si_seguro, :id=>"upselling-radios-0")
|
30
|
+
|
31
|
+
checkbox(:condiciones_de_compra,:id=>"read-agreement")
|
32
|
+
checkbox(:cupones,:id=>"vouchers")
|
33
|
+
|
34
|
+
span(:elegir_otro_vuelo,:class=>"choose-another")
|
35
|
+
span(:error_datos,:class=>"error-message")
|
36
|
+
span(:carga,:css=>".loading .img")
|
37
|
+
span(:precio_seguro,:css=>"#upselling .col7 .details-title")
|
38
|
+
|
39
|
+
text_field(:cupon_email,:id=>"voucher-email")
|
40
|
+
text_field(:cupon_voucher,:id=>"voucher-code-0")
|
41
|
+
|
42
|
+
li(:precio_seguro_desglose,:class=>"item destination_service_insurance")
|
43
|
+
|
44
|
+
p(:id_reserva_compra_duplicada,:css=>"#popup-duplicated-transaction .paragraph")
|
45
|
+
|
46
|
+
def datos_itinerario()
|
47
|
+
return NewCheckout::Cluster.new(tipo_de_busqueda,Hpricot.parse(itinerario_element.html))
|
48
|
+
end
|
49
|
+
|
50
|
+
def opcion_seguros(opcion)
|
51
|
+
if opcion
|
52
|
+
opcion_si_seguro_element.set
|
53
|
+
else
|
54
|
+
opcion_no_seguro_element.set
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Checkout
|
3
|
+
class OldCheckoutPage < CheckoutPage
|
4
|
+
|
5
|
+
div(:seccion_preguntas_riesgo,:css=>"#form .radio-group")
|
6
|
+
div(:opcion_no_deposito,:css=>"#confirm-payment-popup .flights-button-no")
|
7
|
+
div(:opcion_si_deposito,:css=>"#confirm-payment-popup .flights-button-yes")
|
8
|
+
div(:notificacion_error,:class=>"notification-box error-box")
|
9
|
+
div(:notificacion_warning,:class=>"notification-box warn-box")
|
10
|
+
div(:notificacion_warning_ux,:class=>"ux-common-message ux-common-message-warning ")
|
11
|
+
div(:mensaje_error_ux,:class=>"ux-common-message ux-common-message-error ")
|
12
|
+
div(:notificacion_error_ux,:class=>"ux-common-error")
|
13
|
+
div(:boton_si_cambio_precio,:class=>"button-yes")
|
14
|
+
div(:agencia_afiliada,:id=>"agency")
|
15
|
+
div(:cobertura,:id=>'upselling')
|
16
|
+
div(:cobertura_deshabilitada,:class=>"upselling upselling-disabled")
|
17
|
+
div(:itinerario,:id=>"detail")
|
18
|
+
div(:cupon_error,:id=>"coupon-error")
|
19
|
+
div(:cupon_exito,:id=>"voucher-success")
|
20
|
+
div(:clientes_felices,:id=>"happy-clients")
|
21
|
+
div(:link_price_jump,:css=>"#popup-price-difference .popup-link")
|
22
|
+
div(:mensaje_cancelacion,:id=>"cancellation-advice")
|
23
|
+
div(:mensaje_cancelacion_en_el_dia,:id=>"last-minute-advice")
|
24
|
+
div(:mensaje_error_emision_last_minute,:class=>"ux-common-message ux-common-message-error ")
|
25
|
+
link(:link_mensaje_error_emision_last_minute,:css=>".ux-common-message-error a")
|
26
|
+
|
27
|
+
checkbox(:opcion_seguros,:id=>"upselling-checkbox")
|
28
|
+
checkbox(:condiciones_de_compra,:id=>"read-agreement")
|
29
|
+
checkbox(:cupones,:id=>"vouchers")
|
30
|
+
|
31
|
+
span(:elegir_otro_vuelo,:class=>"choose-another")
|
32
|
+
span(:error_datos,:class=>"error-message")
|
33
|
+
span(:carga,:css=>".loading .img")
|
34
|
+
span(:protegido,:css=>".protected")
|
35
|
+
span(:desprotegido,:css=>".unprotected")
|
36
|
+
span(:precio_seguro,:css=>"#upselling .description .bold")
|
37
|
+
|
38
|
+
text_field(:cupon_email,:id=>"voucher-email")
|
39
|
+
text_field(:cupon_voucher,:id=>"voucher-code-0")
|
40
|
+
|
41
|
+
li(:precio_seguro_desglose,:class=>"item destination_service_insurance")
|
42
|
+
|
43
|
+
p(:id_reserva_compra_duplicada,:css=>"#popup-duplicated-transaction .paragraph")
|
44
|
+
|
45
|
+
def datos_itinerario()
|
46
|
+
return Checkout::Cluster.new(tipo_de_busqueda,Hpricot.parse(itinerario_element.html))
|
47
|
+
end
|
48
|
+
|
49
|
+
def opcion_seguros(opcion)
|
50
|
+
opcion_seguros_element.set(opcion)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -24,46 +24,6 @@ module Checkout
|
|
24
24
|
|
25
25
|
divs(:secciones_preguntas_riesgo,:class=>"item section radio-group group")
|
26
26
|
|
27
|
-
div(:seccion_preguntas_riesgo,:css=>"#form .radio-group")
|
28
|
-
div(:opcion_no_deposito,:css=>"#confirm-payment-popup .flights-button-no")
|
29
|
-
div(:opcion_si_deposito,:css=>"#confirm-payment-popup .flights-button-yes")
|
30
|
-
div(:notificacion_error,:class=>"notification-box error-box")
|
31
|
-
div(:notificacion_warning,:class=>"notification-box warn-box")
|
32
|
-
div(:notificacion_warning_ux,:class=>"ux-common-message ux-common-message-warning ")
|
33
|
-
div(:mensaje_error_ux,:class=>"ux-common-message ux-common-message-error ")
|
34
|
-
div(:notificacion_error_ux,:class=>"ux-common-error")
|
35
|
-
div(:boton_si_cambio_precio,:class=>"button-yes")
|
36
|
-
div(:agencia_afiliada,:id=>"agency")
|
37
|
-
div(:cobertura,:id=>'upselling')
|
38
|
-
div(:cobertura_deshabilitada,:class=>"upselling upselling-disabled")
|
39
|
-
div(:itinerario,:id=>"detail")
|
40
|
-
div(:cupon_error,:id=>"coupon-error")
|
41
|
-
div(:cupon_exito,:id=>"voucher-success")
|
42
|
-
div(:clientes_felices,:id=>"happy-clients")
|
43
|
-
div(:link_price_jump,:css=>"#popup-price-difference .popup-link")
|
44
|
-
div(:mensaje_cancelacion,:id=>"cancellation-advice")
|
45
|
-
div(:mensaje_cancelacion_en_el_dia,:id=>"last-minute-advice")
|
46
|
-
div(:mensaje_error_emision_last_minute,:class=>"ux-common-message ux-common-message-error ")
|
47
|
-
link(:link_mensaje_error_emision_last_minute,:css=>".ux-common-message-error a")
|
48
|
-
|
49
|
-
checkbox(:opcion_seguros,:id=>"upselling-checkbox")
|
50
|
-
checkbox(:condiciones_de_compra,:id=>"read-agreement")
|
51
|
-
checkbox(:cupones,:id=>"vouchers")
|
52
|
-
|
53
|
-
span(:elegir_otro_vuelo,:class=>"choose-another")
|
54
|
-
span(:error_datos,:class=>"error-message")
|
55
|
-
span(:carga,:css=>".loading .img")
|
56
|
-
span(:protegido,:css=>".protected")
|
57
|
-
span(:desprotegido,:css=>".unprotected")
|
58
|
-
span(:precio_seguro,:css=>"#upselling .description .bold")
|
59
|
-
|
60
|
-
text_field(:cupon_email,:id=>"voucher-email")
|
61
|
-
text_field(:cupon_voucher,:id=>"voucher-code-0")
|
62
|
-
|
63
|
-
li(:precio_seguro_desglose,:class=>"item destination_service_insurance")
|
64
|
-
|
65
|
-
p(:id_reserva_compra_duplicada,:css=>"#popup-duplicated-transaction .paragraph")
|
66
|
-
|
67
27
|
def cargar_url(tipo,ambiente,cabotaje="nil",params={})
|
68
28
|
super(tipo,ambiente,cabotaje,params)
|
69
29
|
end
|
@@ -73,8 +33,8 @@ module Checkout
|
|
73
33
|
end
|
74
34
|
|
75
35
|
def logo_aerolinea_en_matriz(index)
|
76
|
-
|
77
|
-
|
36
|
+
self.logos_aerolineas_elements[index].attribute("src").strip.downcase
|
37
|
+
end
|
78
38
|
|
79
39
|
def url_busqueda()
|
80
40
|
"#{self.manage_data.generate_url_checkout}#{@parametro_agencia}"
|
@@ -113,10 +73,6 @@ module Checkout
|
|
113
73
|
end
|
114
74
|
end
|
115
75
|
|
116
|
-
def datos_itinerario()
|
117
|
-
return Checkout::Cluster.new(tipo_de_busqueda,Hpricot.parse(itinerario_element.html))
|
118
|
-
end
|
119
|
-
|
120
76
|
def last_minute?
|
121
77
|
return (manage_data.date_from_1 - Date.today).to_i < 2
|
122
78
|
end
|
@@ -11,6 +11,7 @@ Característica: checkout.price_jump
|
|
11
11
|
Entonces verifico que la pagina no rompa
|
12
12
|
Cuando espero que termine de cargar la pagina de resultados
|
13
13
|
Entonces verifico que traiga resultados
|
14
|
+
Y cierro popups
|
14
15
|
Cuando elijo un itinerario y paso a checkout
|
15
16
|
Entonces verifico que la pagina no rompa
|
16
17
|
Y espero que termine de cargar la pagina de checkout
|
@@ -15,7 +15,7 @@ Característica: checkout.seguros
|
|
15
15
|
Entonces verifico que la pagina no rompa
|
16
16
|
Y espero que termine de cargar la pagina de checkout
|
17
17
|
Y verifico que ingrese al checkout
|
18
|
-
|
18
|
+
Entonces si el site es "AR", seteo el checkout a ingresar
|
19
19
|
Cuando existe la opcion de cobertura
|
20
20
|
Entonces elijo "no_chequear" si quiero cobertura
|
21
21
|
Entonces verifico que se muestre correctamente la caja de seguro sin chequear
|
File without changes
|
data/flights_gui_tests.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
|
15
15
|
gem.require_paths = ["lib"] # Usualmente es solo lib -> ["lib"]
|
16
16
|
|
17
|
-
gem.version = '0.6.
|
17
|
+
gem.version = '0.6.7' # La version se debe incrementar cada vez que se desea publicar una nueva version del test.
|
18
18
|
|
19
19
|
gem.add_dependency('henry-container', '>= 0.1.39')
|
20
20
|
gem.add_dependency('page-object')
|
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: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lgonzalez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- Gemfile
|
203
203
|
- features/data/host.yml
|
204
204
|
- features/data/miles.yml
|
205
|
+
- features/data/promos.csv
|
205
206
|
- features/data/sites.yml
|
206
207
|
- features/data/tag_microsoft.yml
|
207
208
|
- features/step_definitions/checkout/cash_payment_steps.rb
|
@@ -303,7 +304,8 @@ files:
|
|
303
304
|
- features/support/modules/results/wish_list.rb
|
304
305
|
- features/support/pages/all_pages.rb
|
305
306
|
- features/support/pages/checkout/checkout_page.rb
|
306
|
-
- features/support/pages/checkout/new_checkout_page.rb
|
307
|
+
- features/support/pages/checkout/checkout_page/new_checkout_page.rb
|
308
|
+
- features/support/pages/checkout/checkout_page/old_checkout_page.rb
|
307
309
|
- features/support/pages/checkout/popup_results_page.rb
|
308
310
|
- features/support/pages/flights_tracker/search_page.rb
|
309
311
|
- features/support/pages/landing/new_landing_page.rb
|
@@ -1,124 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
module Checkout
|
3
|
-
class NewCheckoutPage < AllPages
|
4
|
-
|
5
|
-
include Pages::Tags
|
6
|
-
include Pages::Cookies
|
7
|
-
include Checkout::Pasajeros
|
8
|
-
include Checkout::PopUp
|
9
|
-
include Checkout::Tarjeta
|
10
|
-
include Checkout::Reviews
|
11
|
-
include Checkout::Errores
|
12
|
-
include Checkout::FastCheckout
|
13
|
-
include Checkout::DatosDeFacturacion
|
14
|
-
include Checkout::InformacionDeContacto
|
15
|
-
|
16
|
-
element(:pasajeros,:fieldset,:id=>"passengers")
|
17
|
-
element(:checkout_id,:em,:class=>"checkout-id")
|
18
|
-
element(:checkout_id_cash,:span,:class=>"checkout-id")
|
19
|
-
|
20
|
-
link(:comprar,:id=>"submit")
|
21
|
-
link(:cupon_validar,:id=>"validate-voucher")
|
22
|
-
link(:link_cobertura,:class=>"coverage")
|
23
|
-
link(:enviar_preguntas_riesgo,:id=>"submit")
|
24
|
-
|
25
|
-
divs(:secciones_preguntas_riesgo,:class=>"item section radio-group group")
|
26
|
-
|
27
|
-
div(:seccion_preguntas_riesgo,:css=>"#form .radio-group")
|
28
|
-
div(:opcion_no_deposito,:css=>"#confirm-payment-popup .flights-button-no")
|
29
|
-
div(:opcion_si_deposito,:css=>"#confirm-payment-popup .flights-button-yes")
|
30
|
-
div(:notificacion_error,:class=>"notification-box error-box")
|
31
|
-
div(:notificacion_warning,:class=>"notification-box warn-box")
|
32
|
-
div(:notificacion_warning_ux,:class=>"ux-common-message ux-common-message-warning ")
|
33
|
-
div(:mensaje_error_ux,:class=>"ux-common-message ux-common-message-error ")
|
34
|
-
div(:notificacion_error_ux,:class=>"ux-common-error")
|
35
|
-
div(:boton_si_cambio_precio,:class=>"button-yes")
|
36
|
-
div(:agencia_afiliada,:id=>"agency")
|
37
|
-
div(:cobertura,:id=>'upselling')
|
38
|
-
div(:cobertura_deshabilitada,:class=>"upselling upselling-disabled")
|
39
|
-
div(:itinerario,:id=>"detail")
|
40
|
-
div(:cupon_error,:id=>"coupon-error")
|
41
|
-
div(:cupon_exito,:id=>"voucher-success")
|
42
|
-
div(:clientes_felices,:id=>"happy-clients")
|
43
|
-
div(:link_price_jump,:css=>"#popup-price-difference .popup-link")
|
44
|
-
div(:mensaje_cancelacion,:id=>"cancellation-advice")
|
45
|
-
div(:mensaje_cancelacion_en_el_dia,:id=>"last-minute-advice")
|
46
|
-
div(:mensaje_error_emision_last_minute,:class=>"ux-common-message ux-common-message-error ")
|
47
|
-
|
48
|
-
checkbox(:opcion_seguros,:id=>"upselling-checkbox")
|
49
|
-
checkbox(:condiciones_de_compra,:id=>"read-agreement")
|
50
|
-
checkbox(:cupones,:id=>"vouchers")
|
51
|
-
|
52
|
-
span(:elegir_otro_vuelo,:class=>"choose-another")
|
53
|
-
span(:error_datos,:class=>"error-message")
|
54
|
-
span(:carga,:css=>".loading .img")
|
55
|
-
span(:protegido,:css=>".protected")
|
56
|
-
span(:desprotegido,:css=>".unprotected")
|
57
|
-
span(:precio_seguro,:css=>"#upselling .description .bold")
|
58
|
-
|
59
|
-
text_field(:cupon_email,:id=>"voucher-email")
|
60
|
-
text_field(:cupon_voucher,:id=>"voucher-code-0")
|
61
|
-
|
62
|
-
li(:precio_seguro_desglose,:class=>"item destination_service_insurance")
|
63
|
-
|
64
|
-
p(:id_reserva_compra_duplicada,:css=>"#popup-duplicated-transaction .paragraph")
|
65
|
-
|
66
|
-
def cargar_url(tipo,ambiente,cabotaje="nil",params={})
|
67
|
-
super(tipo,ambiente,cabotaje,params)
|
68
|
-
end
|
69
|
-
|
70
|
-
def agregar_parametro_agencia(parametro_agencia)
|
71
|
-
@parametro_agencia = parametro_agencia
|
72
|
-
end
|
73
|
-
|
74
|
-
def logo_aerolinea_en_matriz(index)
|
75
|
-
self.logos_aerolineas_elements[index].attribute("src").strip.downcase
|
76
|
-
end
|
77
|
-
|
78
|
-
def url_busqueda()
|
79
|
-
"#{self.manage_data.generate_url_checkout}#{@parametro_agencia}"
|
80
|
-
end
|
81
|
-
|
82
|
-
def cargar_datos_pasajeros
|
83
|
-
@browser.execute_script("javascript:void($('.other-passenger-inputs').css('display','block'));")
|
84
|
-
self.cargar_adultos
|
85
|
-
self.cargar_ninos
|
86
|
-
self.cargar_bebes
|
87
|
-
end
|
88
|
-
|
89
|
-
def cargar_datos_CAC
|
90
|
-
@browser.execute_script("javascript:void(function(){ShowButtonCAC();})();")
|
91
|
-
opcion_cac_element.set
|
92
|
-
if documento_offline_element.present?
|
93
|
-
number = case @@site
|
94
|
-
when "CL" then "7028168-6"
|
95
|
-
when "BR" then "22233366638"
|
96
|
-
else "32456734"
|
97
|
-
end
|
98
|
-
documento_offline_element.set(number)
|
99
|
-
end
|
100
|
-
sexo_offline_element.select_value("MALE") if sexo_offline_element.present?
|
101
|
-
nombre_completo_contacto_element.set("Diego Qa Romero") if nombre_completo_contacto_element.present?
|
102
|
-
end
|
103
|
-
|
104
|
-
def aceptar_y_comprar
|
105
|
-
unless condiciones_de_compra_checked?
|
106
|
-
@browser.execute_script("javascript:void($('#read-agreement').click());")
|
107
|
-
end
|
108
|
-
begin
|
109
|
-
@browser.execute_script("javascript:void($('#submit').click());")
|
110
|
-
rescue Selenium::WebDriver::Error::UnknownError
|
111
|
-
comprar_element.click
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
def datos_itinerario()
|
116
|
-
return NewCheckout::Cluster.new(tipo_de_busqueda,Hpricot.parse(itinerario_element.html))
|
117
|
-
end
|
118
|
-
|
119
|
-
def last_minute?
|
120
|
-
return (manage_data.date_from_1 - Date.today).to_i < 2
|
121
|
-
end
|
122
|
-
|
123
|
-
end
|
124
|
-
end
|