flights_gui_henry_tests 2.0.5 → 2.0.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 +8 -8
- data/features/data/sites.yml +0 -1
- data/features/step_definitions/checkout/checkout_steps.rb +1 -1
- data/features/step_definitions/orders/orders.rb +0 -8
- data/features/step_definitions/search/flight_gui_steps.rb +4 -5
- data/features/support/lib/clusters/details/details_cluster.rb +1 -7
- data/features/support/lib/clusters/results_cluster.rb +4 -27
- data/features/support/lib/helpers/clusters.rb +1 -13
- data/features/tests/checkout/aij.feature +3 -3
- data/features/tests/search/orders.feature +0 -12
- data/flights_gui_henry_tests.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YTM4ZjE2MWVhNjk0ZjlmN2E1MzAwYjQ5OTFhYzVjZDE0OTE4NDcyNA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ODhjMTRlZDQ0YjU5ZDk5NDgwNDZiZTBmNGJjYjdjMmFlOWRhNzViZA==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
OTMxMDZkMzBjOWU5Y2UwMjg5ZjEyYTk0Y2IwMDdhMDI1MGRkOWUzOTgxYjk4
|
|
10
|
+
NWY2NjE4ZjI4MzVhMWE3NzU5ODkxN2UyYjE2NGZmOTZlZGUxMDlkYTk3NGEy
|
|
11
|
+
NTNlN2JjZTg4M2FiZDhiMzRmMDkzMDI2ZDc5OGZjMDkxNDE1YmI=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NWQ3ZmRiNTM3NDRlYzVmNDRmZDUxNjU5MDJmN2Q0N2UzODY5YjdkMTVhNGMz
|
|
14
|
+
MTJhN2MwYzE4MDY3OGY3OGNkODUwMTY1ZWM0ZTBjOGJkYTE4OTZiN2Q2NzI4
|
|
15
|
+
OGYzOWYyYmY2OGUxYzRiMzRhZTVlYTQ5N2Y5ZjVlY2JhNzRkNTk=
|
data/features/data/sites.yml
CHANGED
|
@@ -12,7 +12,6 @@ MX:
|
|
|
12
12
|
- {code: "MEX", airports: ["MEX", "TLC"], name: "Ciudad de Mexico|Cidade do Mexico"}
|
|
13
13
|
- {code: "GDL", airports: ["GDL"], name: "Guadalajara"}
|
|
14
14
|
- {code: "CUN", airports: ["CUN"], name: "Cancun"}
|
|
15
|
-
- {code: "MTY", airports: ["MTY"], name: "Monterrey"}
|
|
16
15
|
PE:
|
|
17
16
|
- {code: "LIM", airports: ["LIM"], name: "Lima"}
|
|
18
17
|
VE:
|
|
@@ -12,7 +12,7 @@ When /^verifico que los precios de las cuotas se muestran correctamente$/ do
|
|
|
12
12
|
total_2 = doc.inner_text.gsub(/\D/,'').to_i
|
|
13
13
|
unless radio.attribute_value("data-regular-expressions").nil?
|
|
14
14
|
keys = JSON.parse(radio.attribute_value("data-regular-expressions")).keys
|
|
15
|
-
if interes or keys.select{|key| key.match(/(.*)CREDIT(.*)null/)}.first
|
|
15
|
+
if interes or keys.select{|key| key.match(/(.*)CREDIT(.*)null/)}.first
|
|
16
16
|
validar_cuota_con_intereses(total_1,total_2)
|
|
17
17
|
else
|
|
18
18
|
case keys.first
|
|
@@ -64,12 +64,4 @@ Then /^Verifico ordenamiento TOTALFARE_DESCENDING$/ do
|
|
|
64
64
|
after.value.should is_greater_equal_than(cluster.tarifas['total'].value)
|
|
65
65
|
after = cluster.tarifas['total']
|
|
66
66
|
end
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
Then /^Verifico ordenamiento DURATION_ASCENDING$/ do
|
|
70
|
-
after = @clusters.first.duracion
|
|
71
|
-
@clusters.each do |cluster|
|
|
72
|
-
after.should_not is_greater_than(cluster.duracion)
|
|
73
|
-
after = cluster.duracion
|
|
74
|
-
end
|
|
75
67
|
end
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Then /^Verifico cada cluster "(.*)"$/ do |type|
|
|
3
3
|
json = @search.get_results_search_service
|
|
4
4
|
i=0
|
|
5
|
-
BROWSER.div(:id,'clusters').divs(:class,
|
|
5
|
+
BROWSER.div(:id,'clusters').divs(:class,'cluster flights-cluster oldCluster').each do |cluster|
|
|
6
6
|
itinerary = ResultsCluster.new(type,Hpricot.parse(cluster.html))
|
|
7
7
|
validate_cluster_miles(json,type,cluster,i)
|
|
8
8
|
validate_cluster_details(json,type,cluster,i,itinerary)
|
|
9
9
|
validate_itins_cluster_details(json,type,cluster,i)
|
|
10
10
|
validate_fare_detail(json,cluster,i)
|
|
11
11
|
validate_cluster_payments(cluster)
|
|
12
|
-
validate_cluster_bussines(cluster)
|
|
13
12
|
i += 1
|
|
14
13
|
break if i == 2
|
|
15
14
|
end
|
|
@@ -17,8 +16,7 @@ end
|
|
|
17
16
|
|
|
18
17
|
Then /^Verifico los cluster nuevos con encabezados$/ do
|
|
19
18
|
i=0
|
|
20
|
-
|
|
21
|
-
BROWSER.div(:id,'clusters').divs(:class,"cluster flights-cluster #{class_}Cluster").each do |cluster|
|
|
19
|
+
BROWSER.div(:id,'clusters').divs(:class,'cluster flights-cluster').each do |cluster|
|
|
22
20
|
validate_cluster_with_headers(@search.type,cluster,i) if cluster.li(:class,'itineraries-title').present?
|
|
23
21
|
end
|
|
24
22
|
end
|
|
@@ -37,6 +35,7 @@ When /^Elijo un itinerario y paso a checkout$/ do
|
|
|
37
35
|
end
|
|
38
36
|
|
|
39
37
|
When /^Elijo un itinerario con proveedor "(.*)" y paso a checkout$/ do |prov|
|
|
38
|
+
type = $SITE=="US" ? "new" : "old"
|
|
40
39
|
json = @search.get_results_search_service
|
|
41
40
|
i = 0
|
|
42
41
|
page = 1
|
|
@@ -47,7 +46,7 @@ When /^Elijo un itinerario con proveedor "(.*)" y paso a checkout$/ do |prov|
|
|
|
47
46
|
BROWSER.div(:class,'pagination').li(:class,'pagination-button next').click
|
|
48
47
|
step "Espero que termine de cargar"
|
|
49
48
|
end
|
|
50
|
-
BROWSER.div(:id,'clusters').divs(:class,"cluster").each do |cluster|
|
|
49
|
+
BROWSER.div(:id,'clusters').divs(:class,"cluster flights-cluster #{type}Cluster").each do |cluster|
|
|
51
50
|
if json['result']['data']['items'][i]['provider']==prov
|
|
52
51
|
@item_json = json['result']['data']['items'][i]
|
|
53
52
|
encontro = true
|
|
@@ -6,13 +6,7 @@ class DetailsCluster
|
|
|
6
6
|
@tramos = []
|
|
7
7
|
(p_html/"div.popup-container div.popup-content div.detail").each do |div|
|
|
8
8
|
tramo = Hash.new
|
|
9
|
-
|
|
10
|
-
tramo['bussines'] = nil
|
|
11
|
-
tramo['clase'] = (div/"div.segment span.class").first.inner_text.strip.no_accents
|
|
12
|
-
else
|
|
13
|
-
tramo['bussines'] = ((div/"div.segment span.not-economy-segments").first.inner_text.strip.no_accents == "Bussines")
|
|
14
|
-
tramo['clase'] = (div/"div.segment span.not-economy-segments").first.inner_text.strip.no_accents
|
|
15
|
-
end
|
|
9
|
+
tramo['clase'] = (div/"div.segment span.class").first.inner_text.strip.no_accents
|
|
16
10
|
tramo['ciudad_origen'] = (div/"li.departure span.location span.data").first.inner_text.strip.no_accents
|
|
17
11
|
tramo['fecha_origen'] = Date.parse_new_details((div/"li.departure span.date span.day").first.inner_text.strip.no_accents)
|
|
18
12
|
tramo['hora_origen'] = Time.parse((div/"li.departure span.date span.hour").first.inner_text.strip.no_accents)
|
|
@@ -40,8 +40,8 @@ class ResultsCluster
|
|
|
40
40
|
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
|
41
41
|
i = i + 1
|
|
42
42
|
end
|
|
43
|
-
hou_sal_ida = Time.parse((div_datos_ida/"li.leave
|
|
44
|
-
hou_lle_ida = Time.parse((div_datos_ida/"li.arrive
|
|
43
|
+
hou_sal_ida = Time.parse((div_datos_ida/"li.leave strong").inner_text.strip)
|
|
44
|
+
hou_lle_ida = Time.parse((div_datos_ida/"li.arrive strong").inner_text.strip)
|
|
45
45
|
@idas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida,duracion)
|
|
46
46
|
end
|
|
47
47
|
@nro_vuelo_ida = 0
|
|
@@ -69,8 +69,8 @@ class ResultsCluster
|
|
|
69
69
|
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
|
70
70
|
i = i + 1
|
|
71
71
|
end
|
|
72
|
-
hou_sal_ida = Time.parse((div_datos_vuelta/"li.leave
|
|
73
|
-
hou_lle_ida = Time.parse((div_datos_vuelta/"li.arrive
|
|
72
|
+
hou_sal_ida = Time.parse((div_datos_vuelta/"li.leave strong").inner_text.strip)
|
|
73
|
+
hou_lle_ida = Time.parse((div_datos_vuelta/"li.arrive strong").inner_text.strip)
|
|
74
74
|
@vueltas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida,duracion)
|
|
75
75
|
end
|
|
76
76
|
@nro_vuelo_vuelta = 0
|
|
@@ -142,27 +142,4 @@ class ResultsCluster
|
|
|
142
142
|
(vueltas + @idas.collect{|vuelta| vuelta.escalas}).sort
|
|
143
143
|
end
|
|
144
144
|
|
|
145
|
-
def duracion
|
|
146
|
-
menor_ida = menor_duracion(@idas.collect{|ida| ida.duracion})
|
|
147
|
-
menor_vuelta = @vueltas ? menor_duracion(@vueltas.collect{|ida| ida.duracion}) : 0
|
|
148
|
-
|
|
149
|
-
return menor_vuelta + menor_ida
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def menor_duracion(rutas)
|
|
153
|
-
totales = []
|
|
154
|
-
rutas.each do |custom|
|
|
155
|
-
if custom.match("^(.*)h (.*)m$")
|
|
156
|
-
total = custom.match("^(.*)h (.*)m$")[1].to_i * 60
|
|
157
|
-
total += custom.match("^(.*)h (.*)m$")[2].to_i
|
|
158
|
-
elsif custom.match("^(.*)h$")
|
|
159
|
-
total = custom.match("^(.*)h$")[1].to_i * 60
|
|
160
|
-
else
|
|
161
|
-
total = custom.match("^(.*)m$")[1].to_i
|
|
162
|
-
end
|
|
163
|
-
totales << total
|
|
164
|
-
end
|
|
165
|
-
return totales.sort.first
|
|
166
|
-
end
|
|
167
|
-
|
|
168
145
|
end
|
|
@@ -102,22 +102,10 @@ end
|
|
|
102
102
|
|
|
103
103
|
def validar_clase(cluster,route)
|
|
104
104
|
if cluster.tramos.select{|tramo| tramo['bussines'] }.empty?
|
|
105
|
-
|
|
106
|
-
route.span(:class,'ux-common-icon-rate-star').should_not visible("icono de bussines")
|
|
107
|
-
else
|
|
108
|
-
puts route.span(:class,'ux-common-icon-rate-star').present?
|
|
109
|
-
route.span(:class,'ux-common-icon-rate-star').should visible("icono de bussines")
|
|
105
|
+
route.span(:class,'ux-common-icon-rate-star').present?
|
|
110
106
|
end
|
|
111
107
|
end
|
|
112
108
|
|
|
113
|
-
def validate_cluster_bussines(cluster)
|
|
114
|
-
if cluster.div(:class,'not-economy-cluster-alert').present?
|
|
115
|
-
cluster.span(:class,'ux-common-icon-rate-star').should visible("icono de bussines")
|
|
116
|
-
else
|
|
117
|
-
cluster.span(:class,'ux-common-icon-rate-star').should_not visible("icono de bussines")
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
|
|
121
109
|
def recorrer_segmentos(route,cluster)
|
|
122
110
|
route.li(:class,'stops').a(:class,'text').click
|
|
123
111
|
Watir::Wait.until{BROWSER.div(:class,"flights-popup popup-detail").present?}
|
|
@@ -37,13 +37,13 @@ Característica: checkout.aij
|
|
|
37
37
|
Ejemplos:
|
|
38
38
|
|pais|tipo|cabotage|prov|from|to|date_from|date_to|
|
|
39
39
|
|US|roundtrip|true|AIJ|MEX|GDL|2014-02-28|2014-03-17|
|
|
40
|
-
|US|oneway|true|AIJ|MEX|
|
|
41
|
-
|US|roundtrip|true|AIJ|MEX|
|
|
40
|
+
|US|oneway|true|AIJ|MEX|GDL|2014-03-28|2014-04-17|
|
|
41
|
+
|US|roundtrip|true|AIJ|MEX|CUN|2014-03-01|2014-03-15|
|
|
42
42
|
|US|oneway|true|AIJ|MEX|CUN|2014-02-19|2014-02-27|
|
|
43
43
|
@mx
|
|
44
44
|
Ejemplos:
|
|
45
45
|
|pais|tipo|cabotage|prov|from|to|date_from|date_to|
|
|
46
|
-
|MX|roundtrip|true|AIJ|MEX|
|
|
46
|
+
|MX|roundtrip|true|AIJ|MEX|GDL|2014-02-28|2014-03-17|
|
|
47
47
|
|MX|oneway|true|AIJ|MEX|GDL|2014-03-28|2014-04-17|
|
|
48
48
|
|MX|roundtrip|true|AIJ|MEX|CUN|2014-03-01|2014-03-15|
|
|
49
49
|
|MX|oneway|true|AIJ|MEX|CUN|2014-02-19|2014-02-27|
|
|
@@ -19,70 +19,58 @@ Característica: search.orders
|
|
|
19
19
|
|pais|tipo|order|
|
|
20
20
|
|AR |roundtrip|STOPSCOUNT_ASCENDING|
|
|
21
21
|
|AR |oneway|TOTALFARE_ASCENDING|
|
|
22
|
-
|AR |roundtrip|DURATION_ASCENDING|
|
|
23
22
|
@br
|
|
24
23
|
Ejemplos:
|
|
25
24
|
|pais|tipo|order|
|
|
26
25
|
|BR |roundtrip|STOPSCOUNT_ASCENDING|
|
|
27
26
|
|BR |oneway|TOTALFARE_ASCENDING|
|
|
28
|
-
|BR |oneway|DURATION_ASCENDING|
|
|
29
27
|
@cl
|
|
30
28
|
Ejemplos:
|
|
31
29
|
|pais|tipo|order|
|
|
32
30
|
|CL |roundtrip|STOPSCOUNT_ASCENDING|
|
|
33
31
|
|CL |oneway|TOTALFARE_ASCENDING|
|
|
34
|
-
|CL |roundtrip|DURATION_ASCENDING|
|
|
35
32
|
@co
|
|
36
33
|
Ejemplos:
|
|
37
34
|
|pais|tipo|order|
|
|
38
35
|
|CO |roundtrip|STOPSCOUNT_ASCENDING|
|
|
39
36
|
|CO |oneway|TOTALFARE_ASCENDING|
|
|
40
|
-
|CO |oneway|DURATION_ASCENDING|
|
|
41
37
|
@cr
|
|
42
38
|
Ejemplos:
|
|
43
39
|
|pais|tipo|order|
|
|
44
40
|
|CR |roundtrip|STOPSCOUNT_ASCENDING|
|
|
45
41
|
|CR |oneway|TOTALFARE_ASCENDING|
|
|
46
|
-
|CR |roundtrip|DURATION_ASCENDING|
|
|
47
42
|
@pa
|
|
48
43
|
Ejemplos:
|
|
49
44
|
|pais|tipo|order|
|
|
50
45
|
|PA |roundtrip|STOPSCOUNT_ASCENDING|
|
|
51
46
|
|PA |oneway|TOTALFARE_ASCENDING|
|
|
52
|
-
|PA |oneway|DURATION_ASCENDING|
|
|
53
47
|
@ec
|
|
54
48
|
Ejemplos:
|
|
55
49
|
|pais|tipo|order|
|
|
56
50
|
|EC |roundtrip|STOPSCOUNT_ASCENDING|
|
|
57
51
|
|EC |oneway|TOTALFARE_ASCENDING|
|
|
58
|
-
|EC |roundtrip|DURATION_ASCENDING|
|
|
59
52
|
@mx
|
|
60
53
|
Ejemplos:
|
|
61
54
|
|pais|tipo|order|
|
|
62
55
|
|MX |roundtrip|STOPSCOUNT_ASCENDING|
|
|
63
56
|
|MX |oneway|TOTALFARE_ASCENDING|
|
|
64
|
-
|MX |oneway|DURATION_ASCENDING|
|
|
65
57
|
@pe
|
|
66
58
|
Ejemplos:
|
|
67
59
|
|pais|tipo|order|
|
|
68
60
|
|PE |roundtrip|STOPSCOUNT_ASCENDING|
|
|
69
61
|
|PE |oneway|TOTALFARE_ASCENDING|
|
|
70
|
-
|PE |roundtrip|DURATION_ASCENDING|
|
|
71
62
|
@uy
|
|
72
63
|
Ejemplos:
|
|
73
64
|
|pais|tipo|order|
|
|
74
65
|
|UY |roundtrip|STOPSCOUNT_ASCENDING|
|
|
75
66
|
|UY |oneway|TOTALFARE_ASCENDING|
|
|
76
|
-
|UY |oneway|DURATION_ASCENDING|
|
|
77
67
|
@us
|
|
78
68
|
Ejemplos:
|
|
79
69
|
|pais|tipo|order|
|
|
80
70
|
|US |roundtrip|STOPSCOUNT_ASCENDING|
|
|
81
71
|
|US |oneway|TOTALFARE_ASCENDING|
|
|
82
|
-
|US |roundtrip|DURATION_ASCENDING|
|
|
83
72
|
@ve
|
|
84
73
|
Ejemplos:
|
|
85
74
|
|pais|tipo|order|
|
|
86
75
|
|VE |roundtrip|STOPSCOUNT_ASCENDING|
|
|
87
76
|
|VE |oneway|TOTALFARE_ASCENDING|
|
|
88
|
-
|VE |oneway|DURATION_ASCENDING|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
|
|
17
17
|
|
|
18
|
-
gem.version = '2.0.
|
|
18
|
+
gem.version = '2.0.6' #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')
|
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.0.
|
|
4
|
+
version: 2.0.6
|
|
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-02-
|
|
11
|
+
date: 2014-02-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: henry-container
|