flights_gui_henry_tests 2.1.8 → 2.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDE5M2Q5NjFiYmE0MjcxYjZkZmVhOTE5MmUwYmNhMjJlODZjNzlmZQ==
4
+ N2E2ZmExM2VmZjAxY2Y1YTcxZDJlY2UxZjAyN2I4ZDFlZjMwMjNlYQ==
5
5
  data.tar.gz: !binary |-
6
- MDZjMDU3M2M0NDUxYzdmYzM3NzlkMDBhNTQwMTRhZjcyNGE4OTJjYw==
6
+ Yzg1MTcxNDBmMjBjNDJjYzkxOGUzZWIwZGY0OGI2ZWIzYjFkN2NmNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmEzYTYzZWRkNWJhYjA3YjllOWYyODExZjU2ZTFjNjM0M2U5NTU1YTcyOTQ1
10
- MWRmNWQ1YjM4MGE2NDIwNWQwODRhNTg2OWU0MWRkY2EzNzI1ZjI5YjIwODRh
11
- YzJkZDc1NzE3ODk0MzVjOWRkYjAzMzcxMjMwM2NjOGJjYmNiNTQ=
9
+ MDdhYWMzNzkxMTBhOWMyNTViNTZlNTVlMTdlNDU5ZTQzN2YyNDFmMjIxNmU1
10
+ NjdiZmRlYTNjZjQzZjE5ZTEzODZmNWYwNDM0YTI3OTMzZWQwNGMzOTcxZTc1
11
+ ZDdiN2MyNTY4ZDE5YTA0ZWFlMzMxYTEzYjRmYzJmZDViMWU3NWI=
12
12
  data.tar.gz: !binary |-
13
- ZmIzYWI4NmVmMTExNzE1MDk0ZjgxM2Y1OWE3NmNjOGUwYWVkYjdkYTM5ZDc3
14
- ZThjNGZmN2ViNWI4ZjM0ODI3ODY1OTI0Y2JkYjkxZTEwZTNkYmFmNDg2ZTdl
15
- ZTc0ZTNlMGNkM2Q0MzY0MjkyMWU1MGE4ZWMzNzBlNzE2MWNmY2U=
13
+ NDBmY2EwZDI3NTQwOWIzZTBmNDRjOGM3NGUwMDJhMDUxN2I2NzJmZDJhOGVm
14
+ ZDFhMGM0NTNlNGVlZGY2MTUyNWE0OGQyN2QyZDJkOTliODcxMDAzOThjM2Yx
15
+ YzFmNmViZTAxZjliZWZmMGFhNDFlZTM2MDU0MmFkNDcwMjNmNzA=
@@ -276,6 +276,7 @@ end
276
276
  And /^Verifico las nacionalidades de los pasajeros$/ do
277
277
  if $SITE=~/AR|VE/
278
278
  container = BROWSER.fieldset(:id,'passengers')
279
+ container.text_field(:id,"passenger-first-name-0").focus
279
280
  container.select_list(:id,'nationality-0').select_value($SITE)
280
281
  container.span(:id,'nationality-0-invalid_custom_nationality').should_not visible("error en la nacionalidad")
281
282
  container.select_list(:id,'nationality-0').select_value("BR")
@@ -2,7 +2,8 @@
2
2
  Then /^Elijo una aerolinea a aplicar$/ do
3
3
  doc = Hpricot.parse(BROWSER.html)
4
4
  options = (doc/"div.ux-flights-filter-airlines")[0]
5
- options = (options/"ul.items label").reject{|option| option.attributes["class"].match(/selected|disabled/)}
5
+ options = (options/"ul.items label").reject{|option| option.attributes["class"].match(/selected|disabled|enabled/)}
6
+ puts options
6
7
  @airline = options[rand(options.length)]
7
8
  @total = (@airline/"span.total").inner_text.strip.to_i
8
9
  end
@@ -2,13 +2,14 @@
2
2
  Then /^Elijo un aeropuerto (outbound|inbound) a aplicar$/ do |_class|
3
3
  doc = Hpricot.parse(BROWSER.html)
4
4
  if _class == 'outbound'
5
- _clase = 'origin'
6
- else
7
- _clase = 'destiny'
8
- end
9
- options = (doc/"div.ux-flights-filter-#{_clase}airports//label").reject{|option| option.attributes["class"].match(/selected|disabled/)}
10
- @airport = options[rand(options.length)]
11
- @total = (@airport/"span.total").inner_text.strip.to_i
5
+ _clase = 'origin'
6
+ else
7
+ _clase = 'destiny'
8
+ end
9
+ options = (doc/"div.ux-flights-filter-#{_clase}airports//label").reject{|option| option.attributes["class"].match(/selected|disabled/) or option.attributes["for"].match(/unique-airport/)}
10
+ puts options
11
+ @airport = options[rand(options.length)]
12
+ @total = (@airport/"span.total").inner_text.strip.to_i
12
13
  end
13
14
 
14
15
  When /^Filtro por aeropuerto$/ do
@@ -68,19 +68,9 @@ end
68
68
  Then /^Verifico que se muestre la matriz de precios$/ do
69
69
  value = get_abtesting("priceSuggestionMatrixAlertType")
70
70
  puts value
71
- if value < 30
72
- puts value.to_s + " 1"
73
- BROWSER.div(:id,'ux-common-message ux-common-message-success price-suggestion-matrix-alert').should_not visible("cartel verde de mejor oferta en +/- 3 dias")
74
- BROWSER.div(:class,'ux-common-overlay ux-common-overlay-top-center ux-common-overlay-popover popup-price-suggestion-matrix-alert').should_not visible("popup de mejor oferta en +/- 3 dias")
75
- elsif BROWSER.div(:id,'ux-common-message ux-common-message-success price-suggestion-matrix-alert').present?
76
- (value > 29 and value < 65).should be_true
77
- BROWSER.div(:id,'price-suggestion-matrix').should visible
78
- puts value.to_s + " 2"
79
- elsif BROWSER.div(:class,'ux-common-overlay ux-common-overlay-top-center ux-common-overlay-popover popup-price-suggestion-matrix-alert').present?
80
- (value >64).should be_true
71
+ if BROWSER.div(:class,'ux-common-overlay ux-common-overlay-top-center ux-common-overlay-popover popup-price-suggestion-matrix-alert').present?
81
72
  BROWSER.div(:class,'ux-common-overlay ux-common-overlay-top-center ux-common-overlay-popover popup-price-suggestion-matrix-alert').click
82
73
  sleep(2)
83
- puts value.to_s + " 3"
84
74
  end
85
75
  if BROWSER.div(:class,'flights-tab-header flights-tab-priceSuggestionMatrix ').present?
86
76
  BROWSER.div(:class,'flights-tab-header flights-tab-priceSuggestionMatrix ').click
@@ -2,7 +2,7 @@
2
2
  And /^Verifico las nuevas urls de vuelos a destino por aerolinea$/ do
3
3
  doc = Hpricot.parse(BROWSER.html)
4
4
  options = (doc/"div.ux-flights-filter-airlines")[0]
5
- options = (options/"ul.items label").reject{|option| option.attributes["class"].match(/selected|disabled/)}
5
+ options = (options/"ul.items label").reject{|option| option.attributes["class"].match(/selected|disabled|enabled/)}
6
6
  @airline = options[rand(options.length)]
7
7
  code = (@airline/"img").first.attributes['src'].match(/\/(..)\.png/)[1].strip
8
8
  @arrival = BROWSER.url.match(/#{@search.host()}\/(vuelos|passagens-aereas|flights)\/(\D{3})\/(\D{3})\/(vuelos|passagens-aereas)-(a|para)-(.+)-(desde|saindo-de)-(.+)/)[3]
@@ -19,7 +19,7 @@ end
19
19
 
20
20
  And /^Verifico las nuevas urls de vuelos a destino por aeropuerto de llegada$/ do
21
21
  doc = Hpricot.parse(BROWSER.html)
22
- options = (doc/"div.ux-flights-filter-destinyairports label").reject{|option| option.attributes["class"].match(/selected|disabled/)}
22
+ options = (doc/"div.ux-flights-filter-destinyairports label").reject{|option| option.attributes["class"].match(/selected|disabled/) or option.attributes["for"].match(/unique-airport/)}
23
23
  @airport = options[rand(options.length)]
24
24
  BROWSER.goto(@search.generate_url_landing_arrival_airport((@airport/"input").first.attributes['value']))
25
25
  end
@@ -37,7 +37,7 @@ end
37
37
 
38
38
  And /^Verifico las nuevas urls de vuelos a destino por aeropuerto de salida$/ do
39
39
  doc = Hpricot.parse(BROWSER.html)
40
- options = (doc/"div.ux-flights-filter-originairports label").reject{|option| option.attributes["class"].match(/selected|disabled/)}
40
+ options = (doc/"div.ux-flights-filter-originairports label").reject{|option| option.attributes["class"].match(/selected|disabled/) or option.attributes["for"].match(/unique-airport/)}
41
41
  @airport = options[rand(options.length)]
42
42
  BROWSER.goto(@search.generate_url_landing_origin_airport((@airport/"input").first.attributes['value'],@arrival))
43
43
  end
@@ -49,14 +49,14 @@ And /^Verifico el segundo tag de google en (resultado|home) de (landing|fgui|che
49
49
  tmp['google_conversion_label'].should match("(.+)")
50
50
  if product=="landing"
51
51
  match = BROWSER.url.match(/\/(...)\/(...)\//)
52
- tmp['google_custom_params'].should match("{ CustomA: '#{$SITE}',CustomB: 'D',CustomC: '6',CustomD: '1',CustomE: '#{match[1].upcase}',CustomF: '#{match[2].upcase}'}")
52
+ tmp['google_custom_params'].should match("{ CustomA: '#{$SITE}',CustomB: 'D',CustomCD: '6-1',CustomE: '#{match[1].upcase}',CustomF: '#{match[2].upcase}'}")
53
53
  elsif product=="fgui"
54
54
  if @search.description == "oneway"
55
55
  match = BROWSER.url.match(/\/(...)\/(...)\/(....\-..\-..)\//)
56
- tmp['google_custom_params'].should match("{ CustomA: '#{$SITE}',CustomB: 'D',CustomC: '2',CustomD: '1',CustomE: '#{match[1].upcase}',CustomF: '#{match[2].upcase}',CustomH: '.',CustomI: '.',CustomJ: '#{match[3].upcase}'}")
56
+ tmp['google_custom_params'].should match("{ CustomA: '#{$SITE}',CustomB: 'D',CustomCD: '2-1',CustomE: '#{match[1].upcase}',CustomF: '#{match[2].upcase}',CustomH: '.',CustomI: '.',CustomJ: '#{match[3].upcase}'}")
57
57
  elsif @search.description == "roundtrip"
58
58
  match = BROWSER.url.match(/\/(...)\/(...)\/(....\-..\-..)\/(....\-..\-..)/)
59
- tmp['google_custom_params'].should match("{ CustomA: '#{$SITE}',CustomB: 'D',CustomC: '2',CustomD: '1',CustomE: '#{match[1].upcase}',CustomF: '#{match[2].upcase}',CustomH: '.',CustomI: '.',CustomJ: '#{match[3].upcase}',CustomK: '#{match[4].upcase}'}")
59
+ tmp['google_custom_params'].should match("{ CustomA: '#{$SITE}',CustomB: 'D',CustomCD: '2-1',CustomE: '#{match[1].upcase}',CustomF: '#{match[2].upcase}',CustomH: '.',CustomI: '.',CustomJ: '#{match[3].upcase}',CustomK: '#{match[4].upcase}'}")
60
60
  end
61
61
  else
62
62
  if @search.description == "oneWay"
@@ -35,19 +35,19 @@ 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
- if pais=="BR"
39
- BROWSER.select_list(:id,'orderby').value.should match("FARE_ASCENDING")
40
- elsif pais != "MX"
41
- BROWSER.select_list(:id,'orderby').value.should match("TOTALFARE_ASCENDING")
38
+ unless pais =="MX"
39
+ if pais=="BR"
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")
42
50
  end
43
- options.should include?("FARE_ASCENDING")
44
- options.should include?("STOPSCOUNT_ASCENDING")
45
- options.should include?("TOTALFARE_ASCENDING")
46
- options.should include?("DURATION_ASCENDING")
47
- options.should include?("PERSONAL_ASCENDING")
48
- options.should_not include?("FARE_DESCENDING")
49
- options.should_not include?("STOPSCOUNT_DESCENDING")
50
- options.should_not include?("TOTALFARE_DESCENDING")
51
51
  end
52
52
 
53
53
  Then /^Valido el sorting de landing en "(.*)"$/ do |pais|
@@ -15,7 +15,7 @@
15
15
 
16
16
  gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
17
17
 
18
- gem.version = '2.1.8' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
18
+ gem.version = '2.1.9' #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.8
4
+ version: 2.1.9
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-27 00:00:00.000000000 Z
11
+ date: 2014-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: henry-container