flights_gui_henry_tests 2.1.7 → 2.1.8
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 +2 -0
- data/features/step_definitions/checkout/checkout_steps.rb +1 -1
- data/features/step_definitions/others/tag_steps.rb +0 -4
- data/features/step_definitions/results/devtools_steps.rb +10 -0
- data/features/step_definitions/results/itineraries_steps.rb +43 -0
- data/features/step_definitions/search/flight_gui_steps.rb +17 -36
- data/features/support/env.rb +1 -0
- data/features/support/lib/services/results.rb +18 -18
- data/features/tests/checkout/low_cost.feature +1 -1
- data/features/tests/landing/landing_sort.feature +1 -5
- data/features/tests/search/itineraries.feature +2 -1
- data/features/tests/search/searches.feature +1 -0
- data/flights_gui_henry_tests.gemspec +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MDE5M2Q5NjFiYmE0MjcxYjZkZmVhOTE5MmUwYmNhMjJlODZjNzlmZQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MDZjMDU3M2M0NDUxYzdmYzM3NzlkMDBhNTQwMTRhZjcyNGE4OTJjYw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NmEzYTYzZWRkNWJhYjA3YjllOWYyODExZjU2ZTFjNjM0M2U5NTU1YTcyOTQ1
|
|
10
|
+
MWRmNWQ1YjM4MGE2NDIwNWQwODRhNTg2OWU0MWRkY2EzNzI1ZjI5YjIwODRh
|
|
11
|
+
YzJkZDc1NzE3ODk0MzVjOWRkYjAzMzcxMjMwM2NjOGJjYmNiNTQ=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZmIzYWI4NmVmMTExNzE1MDk0ZjgxM2Y1OWE3NmNjOGUwYWVkYjdkYTM5ZDc3
|
|
14
|
+
ZThjNGZmN2ViNWI4ZjM0ODI3ODY1OTI0Y2JkYjkxZTEwZTNkYmFmNDg2ZTdl
|
|
15
|
+
ZTc0ZTNlMGNkM2Q0MzY0MjkyMWU1MGE4ZWMzNzBlNzE2MWNmY2U=
|
data/features/data/sites.yml
CHANGED
|
@@ -8,6 +8,8 @@ BR:
|
|
|
8
8
|
- {code: "SAO", airports: ["SAO", "GRU", "CGH", "VCP", "CPQ"], name: "San Pablo|Sao Paulo"}
|
|
9
9
|
- {code: "RIO", airports: ["RIO", "SDU", "GIG"], name: "Rio de Janeiro"}
|
|
10
10
|
- {code: "FLN", airports: ["FLN"], name: "Florianopolis"}
|
|
11
|
+
- {code: "POA", airports: ["POA"], name: "Porto Alegre"}
|
|
12
|
+
- {code: "REC", airports: ["REC"], name: "Recife"}
|
|
11
13
|
MX:
|
|
12
14
|
- {code: "MEX", airports: ["MEX", "TLC"], name: "Ciudad de Mexico|Cidade do Mexico"}
|
|
13
15
|
- {code: "GDL", airports: ["GDL"], name: "Guadalajara"}
|
|
@@ -194,7 +194,7 @@ When /^Verifico que se muestre el banner de cancelacion$/ do
|
|
|
194
194
|
BROWSER.div(:id,'cancellation-advice').should visible("banner de cancelacion")
|
|
195
195
|
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,0).text.strip.should equal("¡Compre tranquilo!")
|
|
196
196
|
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,1).text.no_accents.strip.should equal("Si necesita cancelar su compra puede hacerlo gratis desde Mi Despegar hasta las 22 hs. del dia de hoy.")
|
|
197
|
-
elsif $SITE=="BR" and value <
|
|
197
|
+
elsif $SITE=="BR" and value < 0 and provider=="GDS"
|
|
198
198
|
BROWSER.div(:id,'cancellation-advice').should visible("banner de cancelacion")
|
|
199
199
|
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,0).text.strip.should equal("Compre tranquilo! Cancele no mesmo dia sem custo*!")
|
|
200
200
|
BROWSER.div(:id,'cancellation-advice').div(:class,'ux-common-message-content').p(:index,1).text.no_accents.strip.should equal("* Caso necessite cancelar sua compra, voce podera cancelar sem nenhum custo desde MeuDecolar ate as 20 hrs do mesmo dia da compra.")
|
|
@@ -34,10 +34,6 @@ Then /^Verifico que se muestre en el codigo fuente$/ do
|
|
|
34
34
|
@temp[0]["Tag"].match(tag.first.attributes['src']).should be_true
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
Then /^el site es "(.*)"$/ do |sites|
|
|
38
|
-
$SITE.should match(sites)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
37
|
And /^Verifico el segundo tag de google en (resultado|home) de (landing|fgui|checkout)$/ do |page,product|
|
|
42
38
|
doc = Hpricot.parse(BROWSER.html)
|
|
43
39
|
tag_script = (doc/"script[@type='text/javascript']").select{|script| script.inner_text.match(/google_custom_params/)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
When /^Mostrar devtools$/ do
|
|
3
|
+
BROWSER.execute_script("javascript:(function(){mcReqJs.load({'projectId': 'flights','modules': ['core-flights/devtools'],'callback':function(devtools){devtools.init();}});})();")
|
|
4
|
+
@devtool=BROWSER.div(:id,'devtools')
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
Then /^Elijo opcion "(.*)" para dry run$/ do |value|
|
|
8
|
+
@devtool.select_list(:id,'dryrun-select').select_value(value)
|
|
9
|
+
@devtool.span(:id,'dryrun-go').click
|
|
10
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
Then /^Verifico cada cluster "(.*)"$/ do |type|
|
|
3
|
+
order = BROWSER.select_list(:id,'orderby').present? ? BROWSER.select_list(:id,'orderby').value.match("(.*)_ASCENDING")[1] : nil
|
|
4
|
+
puts order
|
|
5
|
+
json = @search.get_results_search_service(order)
|
|
6
|
+
i=0
|
|
7
|
+
BROWSER.div(:id,'clusters').divs(:class,"cluster").each do |cluster|
|
|
8
|
+
itinerary = ResultsCluster.new(type,Hpricot.parse(cluster.html))
|
|
9
|
+
validate_cluster_miles(json,type,cluster,i)
|
|
10
|
+
validate_cluster_details(json,type,cluster,i,itinerary)
|
|
11
|
+
validate_itins_cluster_details(json,type,cluster,i)
|
|
12
|
+
validate_fare_detail(json,cluster,i)
|
|
13
|
+
validate_cluster_payments(cluster)
|
|
14
|
+
validate_cluster_bussines(cluster)
|
|
15
|
+
i += 1
|
|
16
|
+
break if i == 2
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
Then /^Verifico los cluster nuevos con encabezados$/ do
|
|
21
|
+
i=0
|
|
22
|
+
class_ = $SITE.match("AR|BR") ? "new" : "old"
|
|
23
|
+
BROWSER.div(:id,'clusters').divs(:class,"cluster flights-cluster #{class_}Cluster").each do |cluster|
|
|
24
|
+
validate_cluster_with_headers(@search.type,cluster,i) if cluster.li(:class,'itineraries-title').present?
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
Then /^Verifico el ordenamiento premium economy$/ do
|
|
29
|
+
value=get_abtesting("defaultSortingStrategy")
|
|
30
|
+
itin=BROWSER.div(:id,'clusters').divs(:class,"cluster")[2]
|
|
31
|
+
if value.to_i > 60 and BROWSER.div(:id,'clusters').div(:class,'cluster newCluster not-economy-cluster').present?
|
|
32
|
+
puts itin.class_name
|
|
33
|
+
itin.class_name.should equal("cluster newCluster not-economy-cluster")
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
Then /^el site no es "(.*)"$/ do |sites|
|
|
38
|
+
$SITE.should_not match(sites)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
Then /^el site es "(.*)"$/ do |sites|
|
|
42
|
+
$SITE.should match(sites)
|
|
43
|
+
end
|
|
@@ -1,28 +1,4 @@
|
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
|
2
|
-
Then /^Verifico cada cluster "(.*)"$/ do |type|
|
|
3
|
-
json = @search.get_results_search_service
|
|
4
|
-
i=0
|
|
5
|
-
BROWSER.div(:id,'clusters').divs(:class,"cluster").each do |cluster|
|
|
6
|
-
itinerary = ResultsCluster.new(type,Hpricot.parse(cluster.html))
|
|
7
|
-
validate_cluster_miles(json,type,cluster,i)
|
|
8
|
-
validate_cluster_details(json,type,cluster,i,itinerary)
|
|
9
|
-
validate_itins_cluster_details(json,type,cluster,i)
|
|
10
|
-
validate_fare_detail(json,cluster,i)
|
|
11
|
-
validate_cluster_payments(cluster)
|
|
12
|
-
validate_cluster_bussines(cluster)
|
|
13
|
-
i += 1
|
|
14
|
-
break if i == 2
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
Then /^Verifico los cluster nuevos con encabezados$/ do
|
|
19
|
-
i=0
|
|
20
|
-
class_ = $SITE.match("AR|BR") ? "new" : "old"
|
|
21
|
-
BROWSER.div(:id,'clusters').divs(:class,"cluster flights-cluster #{class_}Cluster").each do |cluster|
|
|
22
|
-
validate_cluster_with_headers(@search.type,cluster,i) if cluster.li(:class,'itineraries-title').present?
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
2
|
When /^Elijo un itinerario y paso a checkout$/ do
|
|
27
3
|
json = @search.get_results_search_service
|
|
28
4
|
@item_json = json['result']['data']['items'][0]
|
|
@@ -46,17 +22,21 @@ When /^Elijo un itinerario con proveedor "(.*)" y paso a checkout$/ do |prov|
|
|
|
46
22
|
begin
|
|
47
23
|
puts @search.generate_url_results_search_paginate_service(page,json['result']['data']['metadata']['ticket']['hash'])
|
|
48
24
|
rescue
|
|
49
|
-
puts
|
|
25
|
+
puts "rompio"
|
|
50
26
|
end
|
|
51
27
|
json = @search.paginate(page)
|
|
52
28
|
BROWSER.div(:class,'pagination').li(:class,'pagination-button next').click
|
|
53
29
|
step "Espero que termine de cargar"
|
|
54
30
|
end
|
|
55
31
|
BROWSER.div(:id,'clusters').divs(:class,"cluster").each do |cluster|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
32
|
+
begin
|
|
33
|
+
if json['result']['data']['items'][i]['provider']==prov
|
|
34
|
+
@item_json = json['result']['data']['items'][i]
|
|
35
|
+
encontro = true
|
|
36
|
+
break
|
|
37
|
+
end
|
|
38
|
+
rescue
|
|
39
|
+
puts json['result']['data']['items']
|
|
60
40
|
end
|
|
61
41
|
i += 1
|
|
62
42
|
end
|
|
@@ -79,13 +59,14 @@ When /^Elijo un itinerario con proveedor "(.*)" y paso a checkout$/ do |prov|
|
|
|
79
59
|
end
|
|
80
60
|
|
|
81
61
|
Then /^Verifico que ingrese al checkout$/ do
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
end
|
|
62
|
+
BROWSER.div(:id,'popup-cross-sell-row').should_not visible("popup de cross selling")
|
|
63
|
+
# if BROWSER.div(:id,'popup-cross-sell-row').present?
|
|
64
|
+
# begin
|
|
65
|
+
# BROWSER.div(:id,'popup-cross-sell-row').link(:class,"checkout-button").click
|
|
66
|
+
# rescue Timeout::Error
|
|
67
|
+
# puts "Timeout"
|
|
68
|
+
# end
|
|
69
|
+
# end
|
|
89
70
|
step "Verifico que la pagina no rompa"
|
|
90
71
|
Watir::Wait.until(timeout = 300){BROWSER.fieldset(:id,'passengers').div(:class,'passenger background').present? or BROWSER.div(:class,'notification-box warn-box').present?}
|
|
91
72
|
BROWSER.fieldset(:id,'passengers').div(:class,'passenger background').should visible("Formulario del check out")
|
data/features/support/env.rb
CHANGED
|
@@ -40,6 +40,7 @@ def add_cookie(type)
|
|
|
40
40
|
when 'LANDING' then "landing-f-gui=beta"
|
|
41
41
|
when 'FSM' then "fsm-rest=beta"
|
|
42
42
|
when 'CHAS' then "chas-flight=beta"
|
|
43
|
+
when 'DEBASE' then "flights-dbs-new=flights-dbs-new-b"
|
|
43
44
|
else "landing-f-gui=beta|results-f-gui=beta|chkf-app=beta"
|
|
44
45
|
end
|
|
45
46
|
end
|
|
@@ -11,46 +11,46 @@ module Services
|
|
|
11
11
|
@json_no_referer = eval "get_json_#{type}_no_referer(browser)"
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def get_json_roundtrip(url)
|
|
14
|
+
def get_json_roundtrip(url,type="TOTALFARE")
|
|
15
15
|
begin
|
|
16
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
16
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA/NA?hashForData=#{digest_md5(url)}",:headers => {"referer" => url})
|
|
17
17
|
rescue Errno::ECONNRESET,Timeout::Error
|
|
18
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
18
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA/NA?hashForData=#{digest_md5(url)}",:headers => {"referer" => url})
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
|
-
def get_json_oneway(url)
|
|
21
|
+
def get_json_oneway(url,type="TOTALFARE")
|
|
22
22
|
begin
|
|
23
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
23
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA?hashForData=#{digest_md5(url)}",:headers => {"referer" => url})
|
|
24
24
|
rescue Errno::ECONNRESET,Timeout::Error
|
|
25
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
25
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA?hashForData=#{digest_md5(url)}",:headers => {"referer" => url})
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
|
-
def get_json_multipledestinations(url)
|
|
28
|
+
def get_json_multipledestinations(url,type="TOTALFARE")
|
|
29
29
|
begin
|
|
30
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
30
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING?hashForData=#{digest_md5(url)}",:headers => {"referer" => url})
|
|
31
31
|
rescue Errno::ECONNRESET,Timeout::Error
|
|
32
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
32
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING?hashForData=#{digest_md5(url)}",:headers => {"referer" => url})
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
|
-
def get_json_roundtrip_no_referer(url)
|
|
35
|
+
def get_json_roundtrip_no_referer(url,type="TOTALFARE")
|
|
36
36
|
begin
|
|
37
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
37
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA/NA")
|
|
38
38
|
rescue Errno::ECONNRESET,Timeout::Error
|
|
39
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
39
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA/NA")
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
|
-
def get_json_oneway_no_referer(url)
|
|
42
|
+
def get_json_oneway_no_referer(url,type="TOTALFARE")
|
|
43
43
|
begin
|
|
44
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
44
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA")
|
|
45
45
|
rescue Errno::ECONNRESET,Timeout::Error
|
|
46
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
46
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING/NA/NA/NA/NA")
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
|
-
def get_json_multipledestinations_no_referer(url)
|
|
49
|
+
def get_json_multipledestinations_no_referer(url,type="TOTALFARE")
|
|
50
50
|
begin
|
|
51
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
51
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING")
|
|
52
52
|
rescue Errno::ECONNRESET,Timeout::Error
|
|
53
|
-
HTTParty.get(url.gsub(/results/,"data/search") + "/
|
|
53
|
+
HTTParty.get(url.gsub(/results/,"data/search") + "/#{type}/ASCENDING")
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -5,11 +5,7 @@ Característica: landing.sort
|
|
|
5
5
|
|
|
6
6
|
@sort
|
|
7
7
|
Esquema del escenario: Ingresar a resultados, filtro por un precio, verificar que se muestre correctamente y sea el fare que se debe aplicar
|
|
8
|
-
Cuando
|
|
9
|
-
Entonces Verifico que la pagina no rompa
|
|
10
|
-
Cuando Espero que termine de cargar la home de landing
|
|
11
|
-
Cuando Elijo un link para pasar a los resultados de landing
|
|
12
|
-
Cuando Ingreso a resultados de landing
|
|
8
|
+
Cuando Genero resultados de landing en "<pais>"
|
|
13
9
|
Entonces Verifico que la pagina no rompa
|
|
14
10
|
Entonces Verifico que traiga resultados de landings
|
|
15
11
|
Cuando Elijo el tipo de vuelo "<tipo>"
|
|
@@ -8,7 +8,8 @@ Característica: search.itineraries
|
|
|
8
8
|
Cuando Ingreso a la pagina de resultados en "<pais>" para una busqueda "<tipo>" del tipo "<cabotage>"
|
|
9
9
|
Cuando Espero que termine de cargar
|
|
10
10
|
Entonces Verifico que traiga resultados
|
|
11
|
-
Cuando
|
|
11
|
+
Cuando Si el site es "MX", Verifico el ordenamiento premium economy
|
|
12
|
+
Cuando Si el site no es "MX", Ordeno por "TOTALFARE_ASCENDING"
|
|
12
13
|
Cuando Espero que termine de cargar
|
|
13
14
|
Entonces Verifico cada cluster "<tipo>"
|
|
14
15
|
|
|
@@ -30,6 +30,7 @@ Característica: search.searches
|
|
|
30
30
|
Cuando Verifico que ingrese al checkout
|
|
31
31
|
Entonces Verifico que la pagina no rompa
|
|
32
32
|
Y Verifico si se muestran los beneficios en checkout
|
|
33
|
+
#Y Mostrar devtools
|
|
33
34
|
#Y Verifico que se muestren la caja de clientes felices
|
|
34
35
|
|
|
35
36
|
@ar
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
|
|
17
17
|
|
|
18
|
-
gem.version = '2.1.
|
|
18
|
+
gem.version = '2.1.8' #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.1.
|
|
4
|
+
version: 2.1.8
|
|
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-03-
|
|
11
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: henry-container
|
|
@@ -180,7 +180,9 @@ files:
|
|
|
180
180
|
- features/support/env.rb
|
|
181
181
|
- features/support/matchers.rb
|
|
182
182
|
- features/support/redefinitions.rb
|
|
183
|
+
- features/step_definitions/results/devtools_steps.rb
|
|
183
184
|
- features/step_definitions/results/search_steps.rb
|
|
185
|
+
- features/step_definitions/results/itineraries_steps.rb
|
|
184
186
|
- features/step_definitions/results/results_steps.rb
|
|
185
187
|
- features/step_definitions/results/load_steps.rb
|
|
186
188
|
- features/step_definitions/search/miles_step.rb
|