flights_gui_henry_tests 2.4.0 → 2.4.1
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 +8 -8
- data/features/data/miles.yml +17 -17
- data/features/step_definitions/checkout/thanks_steps.rb +1 -1
- data/features/step_definitions/filter/filters_airports_steps.rb +1 -1
- data/features/step_definitions/filter/matrix_steps.rb +17 -0
- data/features/step_definitions/orders/orders.rb +9 -8
- data/features/step_definitions/results/results_steps.rb +46 -0
- data/features/step_definitions/search/basefare_steps.rb +11 -12
- data/features/step_definitions/search/flight_gui_steps.rb +11 -5
- data/features/support/env.rb +2 -0
- data/features/support/lib/clusters/results_cluster.rb +10 -10
- data/features/support/lib/helpers/browser.rb +7 -2
- data/features/support/lib/helpers/clusters.rb +9 -9
- data/features/tests/checkout/providers.feature +32 -26
- data/features/tests/matrix/matrix_fare_chart.feature +1 -0
- data/features/tests/matrix/matrix_price.feature +3 -2
- data/features/tests/search/searches.feature +2 -0
- data/flights_gui_henry_tests.gemspec +2 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NGJmZWQ1Njk1YzA1MWVhOTY0ODJiMDM1MTQ1NDFiODY3MmZkYWVhMg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MDhhYWRhM2E5N2ZjNGIzZjU1NDBmM2VhMTAyZGVkYmY2NWU5NTRhZg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MGJlMjVhZDU4NmYyZjQwYzIxMmNmNDE3ZDRjYmY1Y2VlYTliMDlmMWY3ZThi
|
|
10
|
+
MjgwMzg2MzNmNTU2MmM2ZTQ2ZGU1MWY0NDU1ZjlkMzQxNjQ4Y2YyN2M0NTRj
|
|
11
|
+
MjNkZjFlZjY4YTJlYTk1NTYzZWJlZWJmMzVjYmU2ZjkxNmJiOTQ=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MWJlYmExOGM4ZGE5YmU1YzY3NDY2MGZmMWEwYmQ1YzRjYWNlZjMxNzk4YmIx
|
|
14
|
+
YWNkNTZkYjM0NjFlODE5MjU2YTA4ZTViY2VmZTFjZTUwZmRmZGM3OTA3Yjg1
|
|
15
|
+
MTI2YmIwMDE2NzkwOWZhMGJlYmEyM2MxMzQ4MDdhN2ZkZGY3ODE=
|
data/features/data/miles.yml
CHANGED
|
@@ -9,52 +9,52 @@ US:
|
|
|
9
9
|
CREDIT: credits
|
|
10
10
|
UA:
|
|
11
11
|
- with MileagePlus reward program
|
|
12
|
-
- You can earn unit
|
|
12
|
+
- You can earn MileagePlus unit
|
|
13
13
|
CM:
|
|
14
14
|
- with MileagePlus reward program
|
|
15
|
-
- You can earn unit
|
|
15
|
+
- You can earn MileagePlus unit
|
|
16
16
|
LA:
|
|
17
17
|
- with LANPASS reward program
|
|
18
|
-
- You can earn unit
|
|
18
|
+
- You can earn LANPasS unit
|
|
19
19
|
4M:
|
|
20
20
|
- with LANPASS reward program
|
|
21
|
-
- You can earn unit
|
|
21
|
+
- You can earn LANPass unit
|
|
22
22
|
XL:
|
|
23
23
|
- with LANPASS reward program
|
|
24
|
-
- You can earn unit
|
|
24
|
+
- You can earn LANPass unit
|
|
25
25
|
4C:
|
|
26
26
|
- with LANPASS reward program
|
|
27
|
-
- You can earn unit
|
|
27
|
+
- You can earn LANPass unit
|
|
28
28
|
LP:
|
|
29
29
|
- with LANPASS reward program
|
|
30
|
-
- You can earn unit
|
|
30
|
+
- You can earn LANPass unit
|
|
31
31
|
AA:
|
|
32
32
|
- with AAdvantage reward program
|
|
33
|
-
- You can earn unit
|
|
33
|
+
- You can earn AAdvantage unit
|
|
34
34
|
AR:
|
|
35
35
|
- with Aerolineas Plus reward program
|
|
36
|
-
- You can earn
|
|
36
|
+
- You can earn Aerolineas Plus unit
|
|
37
37
|
JJ:
|
|
38
|
-
- with
|
|
38
|
+
- with Fidelidade reward program
|
|
39
39
|
- You can earn unit Fidelidade
|
|
40
40
|
G3:
|
|
41
41
|
- with Smiles reward program
|
|
42
|
-
- You can earn unit
|
|
42
|
+
- You can earn Smiles unit
|
|
43
43
|
TP:
|
|
44
44
|
- with Victoria reward program
|
|
45
|
-
- You can earn unit
|
|
45
|
+
- You can earn Victoria unit
|
|
46
46
|
DL:
|
|
47
47
|
- with SkyMiles reward program
|
|
48
|
-
- You can earn unit
|
|
48
|
+
- You can earn SkyMiles unit
|
|
49
49
|
AM:
|
|
50
50
|
- with Club Premier reward program
|
|
51
51
|
- You can earn unit Club Premier
|
|
52
52
|
AC:
|
|
53
53
|
- with Altitude reward program
|
|
54
|
-
- You can earn unit
|
|
54
|
+
- You can earn Altitude unit
|
|
55
55
|
EK:
|
|
56
56
|
- with Skywards reward program
|
|
57
|
-
- You can earn unit
|
|
57
|
+
- You can earn Skywards unit
|
|
58
58
|
AV:
|
|
59
59
|
- with LifeMiles reward program
|
|
60
60
|
- You can earn unit LifeMiles
|
|
@@ -66,10 +66,10 @@ US:
|
|
|
66
66
|
- You can earn unit LifeMiles
|
|
67
67
|
AD:
|
|
68
68
|
- with TudoAzul reward program
|
|
69
|
-
- You can earn unit
|
|
69
|
+
- You can earn TudoAzul unit
|
|
70
70
|
O6:
|
|
71
71
|
- with Programa Amigo reward program
|
|
72
|
-
- You can earn
|
|
72
|
+
- You can earn Programa Amigo unit
|
|
73
73
|
BR:
|
|
74
74
|
text:
|
|
75
75
|
- Comprando estes voos voce acumula ate miles unit
|
|
@@ -73,7 +73,7 @@ And /^Verifico el link de mi despegar$/ do
|
|
|
73
73
|
BROWSER.div(:class,'ux-shared-checkout-thanks-ticket-cont').link(:title,"Meu Decolar").should visible
|
|
74
74
|
elsif $SITE=="US"
|
|
75
75
|
BROWSER.div(:class,'ux-shared-checkout-thanks-ticket-cont').text.no_accents.downcase.should match("if you have any questions, please login to")
|
|
76
|
-
BROWSER.div(:class,'ux-shared-checkout-thanks-ticket-cont').link(:title,"
|
|
76
|
+
BROWSER.div(:class,'ux-shared-checkout-thanks-ticket-cont').link(:title,"My Despegar").should visible
|
|
77
77
|
else
|
|
78
78
|
BROWSER.div(:class,'ux-shared-checkout-thanks-ticket-cont').text.no_accents.downcase.should match("ante cualquier consulta, ingrese a")
|
|
79
79
|
BROWSER.div(:class,'ux-shared-checkout-thanks-ticket-cont').link(:title,"Mi Despegar").should visible
|
|
@@ -17,7 +17,7 @@ end
|
|
|
17
17
|
|
|
18
18
|
And /^Verifico que la primer pagina muestre correctamente los filtros de aeropuertos (outbound|inbound)$/ do |_class|
|
|
19
19
|
doc = Hpricot.parse(BROWSER.html)
|
|
20
|
-
(@airport/"input").first.attributes["value"].strip.should equal((doc/"div#clusters div.cluster div.#{_class}
|
|
20
|
+
(@airport/"input").first.attributes["value"].strip.should equal((doc/"div#clusters div.cluster div.#{_class} span.airport a").first.inner_text.strip)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
Then /^Limpio el filtro de aeropuertos (outbound|inbound)$/ do |_class|
|
|
@@ -235,6 +235,23 @@ And /^Verificar que filtre por una celda de la matriz$/ do
|
|
|
235
235
|
step "Verifico que la matriz cumpla con el rango de fechas de la busqueda"
|
|
236
236
|
end
|
|
237
237
|
|
|
238
|
+
And /^Verifico el mensaje de aclaracion de precio de matriz de precios$/ do
|
|
239
|
+
text = case $SITE
|
|
240
|
+
when "US" then "Roundtrip fare per passenger. The displayed prices are the best found by users in the last days and they could be outdated."
|
|
241
|
+
when "BR" then "Preco da passagem ida e volta por pessoa. Os valores exibidos sao referentes aos encontrados por nossos usuarios nos ultimos dias e podem estar desatualizados."
|
|
242
|
+
else "Precio del pasaje ida y vuelta por persona. Los precios visualizados son los mejores encontrados por los usuarios en los ultimos días y podrian no estar actualizados."
|
|
243
|
+
end
|
|
244
|
+
BROWSER.div(:id,'price-suggestion-matrix').span(:class,'price-suggestion-description-text').text.strip.no_accents.should equal(text.strip.no_accents)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
And /^Verifico el mensaje de aclaracion de precio de matriz de tendencia de precios$/ do
|
|
248
|
+
text = case $SITE
|
|
249
|
+
when "US" then 'Prices per adult(.*). The displayed prices are the best found by users in the last days and they could be outdated.'
|
|
250
|
+
when "BR" then 'Precos por adulto(.*). Os valores exibidos sao referentes aos encontrados por nossos usuarios nos ultimos dias e podem estar desatualizados.'
|
|
251
|
+
else 'Precios por adulto(.*). Los precios visualizados son los mejores encontrados por los usuarios en los ultimos dias y podrian no estar actualizados.'
|
|
252
|
+
end
|
|
253
|
+
BROWSER.div(:id,'fare-chart').span(:class,'fare-chart-description-text').text.strip.no_accents.should match(text.strip.no_accents)
|
|
254
|
+
end
|
|
238
255
|
# And /^Verificar que filtre por una celda de la matriz$/ do
|
|
239
256
|
# i=0
|
|
240
257
|
# BROWSER.div(:class,'fare-chart-secondary').div(:class,'fare-chart-bars-container fare-chart-small').div(:class,'fare-chart-bars').click
|
|
@@ -4,14 +4,15 @@ Then /^Elijo ordenamiento "(.*)"$/ do |value|
|
|
|
4
4
|
BROWSER.select_list(:id,'orderby').select_value(value)
|
|
5
5
|
rescue Timeout::Error
|
|
6
6
|
stop_browser(BROWSER)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
end
|
|
8
|
+
# rescue Watir::Exception::NoValueFoundException
|
|
9
|
+
# puts "Elijo otro ordenamiento"
|
|
10
|
+
# begin
|
|
11
|
+
# BROWSER.select_list(:id,'orderby').select_value("FLIGHTCLASS_ASCENDING")
|
|
12
|
+
# rescue Timeout::Error
|
|
13
|
+
# stop_browser(BROWSER)
|
|
14
|
+
# end
|
|
15
|
+
# end
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
Then /^Levanto los datos de los clusters "(.*)"$/ do |type|
|
|
@@ -25,4 +25,50 @@ And /^Verifico si se muestran los beneficios en checkout$/ do
|
|
|
25
25
|
# BROWSER.div(:class,'benefit-alert').should_not visible("beneficios en checkout")
|
|
26
26
|
# end
|
|
27
27
|
BROWSER.div(:class,'benefit-alert').should_not visible("beneficios en resultados")
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
And /^Verifico el banner de ultimos lugares en checkout$/ do
|
|
31
|
+
if @ultimos_lugares
|
|
32
|
+
BROWSER.div(:class,'ux-common-message ux-common-message-info ').should visible("banner de pocos lugares")
|
|
33
|
+
BROWSER.div(:class,'ux-common-message ux-common-message-info ').text.strip.no_accents.match(/(\d)/)[1].to_i.should equal(@ultimos_lugares)
|
|
34
|
+
else
|
|
35
|
+
BROWSER.div(:class,'ux-common-message ux-common-message-info ').should_not visible("banner de pocos lugares")
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
And /^Verifico si es un destino HOT$/ do
|
|
40
|
+
json = @search.get_results_search_service
|
|
41
|
+
value = get_abtesting "bannerType"
|
|
42
|
+
seats_remaining = json['result']['data']['items'].reject{|itinerario| (itinerario["seatsRemaining"].nil? or (itinerario["seatsRemaining"].to_i > 6))}
|
|
43
|
+
porcentaje = ((seats_remaining.length * 100)/json['result']['data']['items'].length).to_i
|
|
44
|
+
if porcentaje >= 40 and porcentaje < 90
|
|
45
|
+
color = "LOW"
|
|
46
|
+
elsif porcentaje >= 90
|
|
47
|
+
color = "HIGH"
|
|
48
|
+
else
|
|
49
|
+
color = nil
|
|
50
|
+
end
|
|
51
|
+
mensaje_disponibilidad = "El destino buscado es muy solicitado en estas fechas y la disponibilidad es limitada. \¡Reserva ahora\!"
|
|
52
|
+
mensaje_precio = "El destino es muy solicitado en estas fechas y los precios estan subiendo. \¡Te recomendamos reservar lo antes posible\!"
|
|
53
|
+
if value > 33 and color
|
|
54
|
+
puts "((#{seats_remaining.length} * 100)/#{json['result']['data']['items'].length}).to_i"
|
|
55
|
+
puts seats_remaining
|
|
56
|
+
puts color
|
|
57
|
+
if BROWSER.div(:id,"banner-PRICE-#{color}").present?
|
|
58
|
+
(value < 67).should be_true
|
|
59
|
+
BROWSER.div(:id,"banner-AVAILABILITY-#{color}").should_not visible("mensaje de baja disponibilidad")
|
|
60
|
+
BROWSER.div(:id,"banner-PRICE-#{color}").text.strip.no_accents.should equal(mensaje_precio)
|
|
61
|
+
elsif BROWSER.div(:id,"banner-AVAILABILITY-#{color}").present?
|
|
62
|
+
(value > 66).should be_true
|
|
63
|
+
BROWSER.div(:id,"banner-PRICE-#{color}").should_not visible("mensaje de suba de precios")
|
|
64
|
+
BROWSER.div(:id,"banner-AVAILABILITY-#{color}").text.strip.no_accents.should equal(mensaje_disponibilidad)
|
|
65
|
+
else
|
|
66
|
+
nil.should be_true
|
|
67
|
+
end
|
|
68
|
+
else
|
|
69
|
+
BROWSER.div(:id,"banner-PRICE-HIGH").should_not visible("mensaje de suba de precio")
|
|
70
|
+
BROWSER.div(:id,"banner-PRICE-LOW").should_not visible("mensaje de suba de precio")
|
|
71
|
+
BROWSER.div(:id,"banner-AVAILABILITY-HIGH").should_not visible("mensaje de baja disponibilidad")
|
|
72
|
+
BROWSER.div(:id,"banner-AVAILABILITY-LOW").should_not visible("mensaje de baja disponibilidad")
|
|
73
|
+
end
|
|
28
74
|
end
|
|
@@ -35,19 +35,18 @@ end
|
|
|
35
35
|
Then /^Valido el sorting en "(.*)"$/ do |pais|
|
|
36
36
|
doc = Hpricot.parse(BROWSER.select_list(:id,'orderby').html)
|
|
37
37
|
options = (doc/"option").collect{|option| option.attributes['value']}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
BROWSER.select_list(:id,'orderby').value.should match("FARE_ASCENDING")
|
|
41
|
-
end
|
|
42
|
-
options.should include?("FARE_ASCENDING")
|
|
43
|
-
options.should include?("STOPSCOUNT_ASCENDING")
|
|
44
|
-
options.should include?("TOTALFARE_ASCENDING")
|
|
45
|
-
options.should include?("DURATION_ASCENDING")
|
|
46
|
-
options.should include?("PERSONAL_ASCENDING")
|
|
47
|
-
options.should_not include?("FARE_DESCENDING")
|
|
48
|
-
options.should_not include?("STOPSCOUNT_DESCENDING")
|
|
49
|
-
options.should_not include?("TOTALFARE_DESCENDING")
|
|
38
|
+
if pais=="BR"
|
|
39
|
+
BROWSER.select_list(:id,'orderby').value.should match("FARE_ASCENDING")
|
|
50
40
|
end
|
|
41
|
+
options.should include?("FARE_ASCENDING")
|
|
42
|
+
options.should include?("STOPSCOUNT_ASCENDING")
|
|
43
|
+
options.should include?("TOTALFARE_ASCENDING")
|
|
44
|
+
options.should include?("DURATION_ASCENDING")
|
|
45
|
+
options.should include?("PERSONAL_ASCENDING")
|
|
46
|
+
options.should_not include?("FLIGHTCLASS_ASCENDING")
|
|
47
|
+
options.should_not include?("FARE_DESCENDING")
|
|
48
|
+
options.should_not include?("STOPSCOUNT_DESCENDING")
|
|
49
|
+
options.should_not include?("TOTALFARE_DESCENDING")
|
|
51
50
|
end
|
|
52
51
|
|
|
53
52
|
Then /^Valido el sorting de landing en "(.*)"$/ do |pais|
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
|
2
2
|
When /^Elijo un itinerario y paso a checkout$/ do
|
|
3
3
|
json = @search.get_results_search_service
|
|
4
|
-
@item_json = json['result']['data']['items'][
|
|
5
|
-
@itinerario = ResultsCluster.new(@search.description,Hpricot.parse(BROWSER.div(:id,'clusters').divs(:class,'cluster')[
|
|
6
|
-
BROWSER.div(:id,'clusters').divs(:class,'cluster')[
|
|
7
|
-
BROWSER.div(:id,'clusters').divs(:class,'cluster')[
|
|
4
|
+
@item_json = json['result']['data']['items'][0]
|
|
5
|
+
@itinerario = ResultsCluster.new(@search.description,Hpricot.parse(BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].html))
|
|
6
|
+
@ultimos_lugares = BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].span(:class,'tickets-left-text').text.strip.no_accents.match(/(\d)/)[0].to_i if BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].span(:class,'tickets-left-text').present?
|
|
7
|
+
BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].radio(:id,'0-outbound-0').click if BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].radio(:id,'0-outbound-0').present?
|
|
8
|
+
BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].radio(:id,'0-inbound-0').click if BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].radio(:id,'0-inbound-0').present?
|
|
8
9
|
begin
|
|
9
|
-
BROWSER.div(:id,'clusters').divs(:class,'cluster')[
|
|
10
|
+
BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].link(:class,'buy btn-buy flights-button').click
|
|
10
11
|
rescue Timeout::Error
|
|
11
12
|
stop_browser(BROWSER)
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
|
|
16
|
+
When /^Seteo el proveedor "(.*)"$/ do |provider|
|
|
17
|
+
BROWSER.execute_script("javascript:void(document.cookie='XDESP-FDBS-PROVIDER=#{provider};path=/');")
|
|
18
|
+
BROWSER.refresh
|
|
19
|
+
end
|
|
20
|
+
|
|
15
21
|
When /^Elijo un itinerario con proveedor "(.*)" y paso a checkout$/ do |prov|
|
|
16
22
|
json = @search.get_results_search_service
|
|
17
23
|
i = 0
|
data/features/support/env.rb
CHANGED
|
@@ -10,6 +10,7 @@ require 'sanitize'
|
|
|
10
10
|
require 'uri'
|
|
11
11
|
require 'mock_search'
|
|
12
12
|
require 'henry/config'
|
|
13
|
+
require 'debugger'
|
|
13
14
|
|
|
14
15
|
$VERBOSE = nil
|
|
15
16
|
|
|
@@ -51,6 +52,7 @@ begin
|
|
|
51
52
|
$ENV = $henry_params['env'] || "produccion"
|
|
52
53
|
browser = $henry_params['browser']
|
|
53
54
|
COOKIE = add_cookie($henry_params['product'])
|
|
55
|
+
PROVIDER = $henry_params['provider']
|
|
54
56
|
rescue
|
|
55
57
|
$ENV = "produccion"
|
|
56
58
|
browser = "firefox"
|
|
@@ -24,11 +24,11 @@ class ResultsCluster
|
|
|
24
24
|
@idas = Array.new
|
|
25
25
|
(div_datos/"li.itinerary").each do |div_datos_ida|
|
|
26
26
|
duracion = (div_datos_ida/"li.time").inner_text.strip
|
|
27
|
-
origen = (div_datos/"
|
|
28
|
-
destino= (div_datos/"
|
|
29
|
-
origen_iata = (div_datos/"a")
|
|
30
|
-
destino_iata = (div_datos/"a")
|
|
31
|
-
fecha = (
|
|
27
|
+
origen = (div_datos/"span.city-departure").first.inner_text.gsub(/,/,'').strip.no_accents
|
|
28
|
+
destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
|
|
29
|
+
origen_iata = (div_datos/"a")[0].inner_text.strip
|
|
30
|
+
destino_iata = (div_datos/"a")[1].inner_text.strip
|
|
31
|
+
fecha = (div_datos/"span.date").first.inner_text.strip.no_accents
|
|
32
32
|
escala = (div_datos_ida/"li.stops/a").inner_text.strip.empty? ? "Sin escalas" : (div_datos_ida/"li.stops/a").inner_text.to_i
|
|
33
33
|
aerolinea = Array.new
|
|
34
34
|
i = 0
|
|
@@ -53,11 +53,11 @@ class ResultsCluster
|
|
|
53
53
|
@vueltas = Array.new
|
|
54
54
|
(div_datos/"li.itinerary").each do |div_datos_vuelta|
|
|
55
55
|
duracion = (div_datos_vuelta/"li.time").inner_text.strip
|
|
56
|
-
origen = (div_datos/"
|
|
57
|
-
destino= (div_datos/"
|
|
58
|
-
origen_iata = (div_datos/"a")
|
|
59
|
-
destino_iata = (div_datos/"a")
|
|
60
|
-
fecha = (
|
|
56
|
+
origen = (div_datos/"span.city-departure").first.inner_text.gsub(/,/,'').strip.no_accents
|
|
57
|
+
destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
|
|
58
|
+
origen_iata = (div_datos/"a")[0].inner_text.strip
|
|
59
|
+
destino_iata = (div_datos/"a")[1].inner_text.strip
|
|
60
|
+
fecha = (div_datos/"span.date").last.inner_text.strip.no_accents
|
|
61
61
|
escala = (div_datos_vuelta/"li.stops/a").inner_text.strip.empty? ? "Sin escalas" : (div_datos_vuelta/"li.stops/a").inner_text.to_i
|
|
62
62
|
aerolinea = Array.new
|
|
63
63
|
i = 0
|
|
@@ -15,9 +15,14 @@ def set_cookies(browser)
|
|
|
15
15
|
begin
|
|
16
16
|
browser.execute_script("javascript:void(document.cookie = 'X-UOW-CUSTOM=ROBOT-#{rand(1000)}; Path=/')")
|
|
17
17
|
#add_cookie("X-UOW-CUSTOM","ROBOT-#{rand(1000)}",{:path=>"/"})
|
|
18
|
-
if $ENV.upcase=="BETA"
|
|
18
|
+
if $ENV.upcase=="BETA" or PROVIDER
|
|
19
19
|
#add_cookie("X-Version-Override",COOKIE,{:path=>"/"})
|
|
20
|
-
|
|
20
|
+
if PROVIDER
|
|
21
|
+
browser.execute_script("javascript:void(document.cookie='XDESP-FDBS-PROVIDER=#{PROVIDER};path=/');")
|
|
22
|
+
end
|
|
23
|
+
if $ENV.upcase=="BETA"
|
|
24
|
+
browser.execute_script("javascript:void(document.cookie='X-Version-Override=#{COOKIE};domain=#{dominio};path=/');")
|
|
25
|
+
end
|
|
21
26
|
browser.refresh
|
|
22
27
|
end
|
|
23
28
|
rescue Timeout::Error
|
|
@@ -84,16 +84,16 @@ end
|
|
|
84
84
|
|
|
85
85
|
def validate_itins_cluster_details(json,type,cluster,i)
|
|
86
86
|
if type != "multipledestinations"
|
|
87
|
-
outbound = cluster.div(:class,'itineraries').div(:class,'sub-cluster outbound').
|
|
88
|
-
(@search.city_from_1.airports.include?(outbound.
|
|
89
|
-
(@search.city_to_1.airports.include?(outbound.
|
|
90
|
-
outbound.
|
|
91
|
-
outbound.
|
|
87
|
+
outbound = cluster.div(:class,'itineraries').div(:class,'sub-cluster outbound').div(:class,'item data')
|
|
88
|
+
(@search.city_from_1.airports.include?(outbound.spans(:class,'airport')[0].text)).should be_true
|
|
89
|
+
(@search.city_to_1.airports.include?(outbound.spans(:class,'airport')[1].text)).should be_true
|
|
90
|
+
outbound.span(:class,'city-departure').text.no_accents.downcase.gsub(",","").strip.should equal(@search.city_from_1.name($SITE).downcase) unless outbound.span(:class,'city-departure').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas")
|
|
91
|
+
outbound.span(:class,'city-arrival').text.no_accents.downcase.gsub(",","").strip.should equal(@search.city_to_1.name($SITE).downcase) unless outbound.span(:class,'city-arrival').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas")
|
|
92
92
|
if type == "roundtrip"
|
|
93
|
-
inbound = cluster.div(:class,'itineraries').div(:class,'sub-cluster inbound').
|
|
94
|
-
(@search.city_to_1.airports.include?(inbound.
|
|
95
|
-
(@search.city_from_1.airports.include?(inbound.
|
|
96
|
-
inbound.
|
|
93
|
+
inbound = cluster.div(:class,'itineraries').div(:class,'sub-cluster inbound').div(:class,'item data')
|
|
94
|
+
(@search.city_to_1.airports.include?(inbound.spans(:class,'airport')[0].text)).should be_true
|
|
95
|
+
(@search.city_from_1.airports.include?(inbound.spans(:class,'airport')[1].text)).should be_true
|
|
96
|
+
inbound.span(:class,'city-departure').text.no_accents.downcase.gsub(",","").strip.should equal(@search.city_to_1.name($SITE).downcase) unless inbound.span(:class,'city-departure').text.downcase.no_accents.gsub(",","").strip.match("toluca|campinas")
|
|
97
97
|
end
|
|
98
98
|
else
|
|
99
99
|
|
|
@@ -8,28 +8,34 @@ Característica: checkout.providers
|
|
|
8
8
|
Cuando Ingreso a la pagina de resultados en "<pais>" para una busqueda "<tipo>" con origen "<from>" y destino "<to>" de tipo "<cabotage>"
|
|
9
9
|
Cuando Espero que termine de cargar
|
|
10
10
|
Entonces Verifico que traiga resultados
|
|
11
|
-
Cuando
|
|
11
|
+
Cuando Seteo el proveedor "<prov>"
|
|
12
|
+
Cuando Espero que termine de cargar
|
|
13
|
+
Entonces Verifico que traiga resultados
|
|
14
|
+
Cuando Elijo un itinerario y paso a checkout
|
|
12
15
|
Cuando Verifico que ingrese al checkout
|
|
13
|
-
Y Verifico que se muestre el banner de cancelacion
|
|
16
|
+
#Y Verifico que se muestre el banner de cancelacion
|
|
17
|
+
Y Valido los valores del desglose del checkout
|
|
14
18
|
Y Verifico el pixel de Efrontier
|
|
15
19
|
Y Verifico el pixel de trackeame en checkout
|
|
16
20
|
Y Verifico el tag de remarketing de facebook
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
Entonces verifico que los precios de las cuotas se muestran correctamente
|
|
22
|
+
Y Verifico que se muestren la caja de clientes felices
|
|
23
|
+
Entonces Completo el formulario de pasajeros
|
|
24
|
+
Y Completo el formulario de tarjeta
|
|
25
|
+
Y Completo los datos de resolucion AFIP
|
|
26
|
+
Y Completo los datos de contacto
|
|
27
|
+
Y Si pide factura fiscal, Completo los campos de factura fiscal
|
|
28
|
+
Y Realizo la compra
|
|
29
|
+
Entonces Verifico que dirija a la pagina de gracias
|
|
30
|
+
Entonces Si el checkout me pide mas datos de tarjeta, lleno los datos de tarjeta adicionales
|
|
31
|
+
Entonces Si se muestra el popup de no disponibilidad, elijo otro vuelo
|
|
32
|
+
Entonces Si debo completar de vuelta el formulario, completo el formulario
|
|
33
|
+
Y Verifico que genere id cro
|
|
34
|
+
Y Si el site no es "PR", Verifico el pixel de trackeame en gracias
|
|
35
|
+
Y Verifico el pixel de Efrontier
|
|
36
|
+
Y Verifico el segundo tag de google en resultado de checkout
|
|
37
|
+
Y Verifico el link de mi despegar
|
|
38
|
+
Y Levanto los datos del vuelo
|
|
33
39
|
#Y Si cumple para pruebas en fenix, Levanto los datos del vuelo
|
|
34
40
|
#Cuando Si cumple para pruebas en fenix, Inicializo las pruebas en fenix
|
|
35
41
|
#Entonces Si cumple para pruebas en fenix, Verifico que las pruebas en fenix esten correctas
|
|
@@ -37,17 +43,17 @@ Característica: checkout.providers
|
|
|
37
43
|
@us
|
|
38
44
|
Ejemplos:
|
|
39
45
|
|pais|tipo|cabotage|prov|from|to|date_from|date_to|
|
|
40
|
-
|US|roundtrip|true|
|
|
41
|
-
|US|oneway|true|
|
|
42
|
-
|US|roundtrip|true|
|
|
43
|
-
|US|oneway|true|
|
|
46
|
+
|US|roundtrip|true|VOL|MEX|CUN|2014-06-28|2014-06-17|
|
|
47
|
+
|US|oneway|true|VOL|LAX|CUN|2014-06-28|2014-07-17|
|
|
48
|
+
|US|roundtrip|true|VOL|MEX|LAX|2014-06-01|2014-06-15|
|
|
49
|
+
|US|oneway|true|VOL|MEX|GDL|2014-06-19|2014-06-27|
|
|
44
50
|
@mx
|
|
45
51
|
Ejemplos:
|
|
46
52
|
|pais|tipo|cabotage|prov|from|to|date_from|date_to|
|
|
47
|
-
|MX|roundtrip|true|
|
|
48
|
-
|MX|oneway|true|
|
|
49
|
-
|MX|roundtrip|true|
|
|
50
|
-
|MX|oneway|true|
|
|
53
|
+
|MX|roundtrip|true|VOL|MEX|MTY|2014-02-28|2014-03-17|
|
|
54
|
+
|MX|oneway|true|VOL|MEX|GDL|2014-03-28|2014-04-17|
|
|
55
|
+
|MX|roundtrip|true|VOL|MEX|CUN|2014-03-01|2014-03-15|
|
|
56
|
+
|MX|oneway|true|VOL|MEX|CUN|2014-02-19|2014-02-27|
|
|
51
57
|
@br
|
|
52
58
|
Ejemplos:
|
|
53
59
|
|pais|tipo|cabotage|prov|from|to|
|
|
@@ -12,6 +12,7 @@ Característica: matrix.fare_chart
|
|
|
12
12
|
Y Refresco la pagina
|
|
13
13
|
Cuando Espero que termine de cargar
|
|
14
14
|
Y Ingreso a la matriz de tendencia de precios
|
|
15
|
+
Y Verifico el mensaje de aclaracion de precio de matriz de tendencia de precios
|
|
15
16
|
Y Verifico el l&f de la matriz de tendencia de precios
|
|
16
17
|
Y Verifico que la matriz cumpla con el rango de fechas de la busqueda
|
|
17
18
|
Y Verificar que los datos mostrados en la matriz sean correctos
|
|
@@ -11,6 +11,7 @@ Característica: matrix.price
|
|
|
11
11
|
Y Si no se muestra la matriz de precios, Realizo las busquedas para recargar la matriz
|
|
12
12
|
Cuando Espero que termine de cargar
|
|
13
13
|
Entonces Verifico que se muestre la matriz de precios
|
|
14
|
+
Y Verifico el mensaje de aclaracion de precio de matriz de precios
|
|
14
15
|
Y Verifico la correcta disposicion de la matriz de precios
|
|
15
16
|
Y Verifico las fechas de la matriz de precios
|
|
16
17
|
Y Verifico que la fechas buscadas sea la central en la matriz de precios
|
|
@@ -32,8 +33,8 @@ Característica: matrix.price
|
|
|
32
33
|
Y Verifico la correcta disposicion de la matriz de precios
|
|
33
34
|
Y Verifico las fechas de la matriz de precios
|
|
34
35
|
|
|
35
|
-
@
|
|
36
|
+
@ar
|
|
36
37
|
@roundtrip
|
|
37
38
|
Ejemplos:
|
|
38
39
|
|pais|tipo|cabotage|
|
|
39
|
-
|
|
|
40
|
+
|AR |roundtrip|true|
|
|
@@ -14,6 +14,7 @@ Característica: search.searches
|
|
|
14
14
|
Entonces Verifico que traiga resultados
|
|
15
15
|
Cuando Si el site es "AR|BR", Levanto los tag que deben mostrarse segun la ciudad buscada para una busqueda "<tipo>"
|
|
16
16
|
Entonces Si el site es "AR|BR", Verifico que se muestre en el codigo fuente
|
|
17
|
+
Y Si el site es "AR", Verifico si es un destino HOT
|
|
17
18
|
Y Verifico si se muestran los beneficios en resultados
|
|
18
19
|
Y Verifico el primer tag de google en resultado de fgui
|
|
19
20
|
Y Verifico el segundo tag de google en resultado de fgui
|
|
@@ -30,6 +31,7 @@ Característica: search.searches
|
|
|
30
31
|
Cuando Verifico que ingrese al checkout
|
|
31
32
|
Entonces Verifico que la pagina no rompa
|
|
32
33
|
Y Verifico si se muestran los beneficios en checkout
|
|
34
|
+
Y Verifico el banner de ultimos lugares en checkout
|
|
33
35
|
#Y Mostrar devtools
|
|
34
36
|
#Y Verifico que se muestren la caja de clientes felices
|
|
35
37
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
|
|
17
17
|
|
|
18
|
-
gem.version = '2.4.
|
|
18
|
+
gem.version = '2.4.1' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
|
|
19
19
|
|
|
20
20
|
gem.add_dependency('henry-container', '>= 0.1.39')
|
|
21
21
|
gem.add_dependency('watir-webdriver')
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
gem.add_dependency('sixarm_ruby_unaccent')
|
|
27
27
|
gem.add_dependency('sanitize')
|
|
28
28
|
gem.add_dependency('mock_search')
|
|
29
|
+
gem.add_dependency('debugger')
|
|
29
30
|
|
|
30
31
|
gem.add_development_dependency('geminabox')
|
|
31
32
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flights_gui_henry_tests
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- lgonzalez,lsimean
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-05-
|
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: henry-container
|
|
@@ -136,6 +136,20 @@ dependencies:
|
|
|
136
136
|
- - ! '>='
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: debugger
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ! '>='
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0'
|
|
146
|
+
type: :runtime
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ! '>='
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
139
153
|
- !ruby/object:Gem::Dependency
|
|
140
154
|
name: geminabox
|
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|