flights_gui_henry_tests 2.4.4 → 2.4.5

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
- MmQ1NTZiMzAxZWYwNmRhODY2YzRlYTIxMDAzNzY4ZjZkZTJmYTRmNQ==
4
+ ODNhZDg5MjRiYzExODU2YTRlZjlmMWZkNWFiZDlhMDcyMTMzZTc4Yw==
5
5
  data.tar.gz: !binary |-
6
- ZWQyNzQ3OWE4NDQ0NTJlNGJhYjM4ZDI0ZjMyMzIxY2RiYzg5YTI5MA==
6
+ NTc0NWJmZjY3YTUwZjQxMjEwODY3NTlmZDQ2YmM3MGRkZDc1OWMyMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWFiNjVjMzQyZjlmNzM0OWRhMTVhOWM2ZDNjOTA3ODM5MGE0ODZhNmI4MzAx
10
- OGU1Y2M1NjQyOWU4NmY3ZDU4Mjc2NjE1NmZkYWVhNjVjYTkwMmMwYjQ1MDE4
11
- YjQzYzliYjc4MThjMDA0NGM3OWYwYzFmNzExODVmNWQxZDljNWE=
9
+ NmU0NTEzZDJjM2E1MTlkNjkyZDQwMjJhNjhkYmI5YmQzYWRiYTcxNGQ3OGU0
10
+ MGQ4ODJiNGU4N2VkOTgwZTdjMjIwZDNmMjA2ZTBjNDlkMjIwNmJkYzM3M2Y1
11
+ MTdhNDk3ZmRiYmViYWUxZDM2ZTE2YTM2ODNmNTAwNTIxNzFhZTQ=
12
12
  data.tar.gz: !binary |-
13
- NjJiNmUwOTg2NjdkYTU1MDEwNjhjMDk0YWJhNjIyM2RlOGM2MjYyN2NhODIz
14
- ZjY0YTZlMjMwOTJlZjhhNjljMTM2NjBkNTg0YWQzOTZiNGExMjM2YWMyNzI5
15
- YTQwZTcxNjJiMjIwNzU2N2QxNTE1MmY0Y2YxNWQ2YTU5MTBmZWQ=
13
+ YWQ0NTU1MTBkZjcyMjNlMGFkMDIzOThjOTFhZjA0MGE1YTQ3YzQwN2U4MWMx
14
+ NmUxZmRjNDg2M2U4ZDI5MzcyMjJlMDhmZDA4MzhlYTZlZWE5MTNiZDIxMjk2
15
+ NzY0Y2ZlYWNhNjEwMTQxN2ZhMWEwOTlmMzBkMWE3NmZlMGQxMGE=
@@ -115,6 +115,7 @@ end
115
115
 
116
116
  #Se verifica la existencia de otra fecha con precio y se levantan las fechas
117
117
  And /^Verifico que exista otra fecha con precio en la matriz de precios$/ do
118
+ debugger
118
119
  doc = Hpricot.parse(BROWSER.div(:id,'price-suggestion-matrix').html)
119
120
  if (doc/"li.price-suggestion-matrix-price-CHEAPEST").first
120
121
  option="price-suggestion-matrix-price-CHEAPEST"
@@ -125,7 +126,7 @@ And /^Verifico que exista otra fecha con precio en la matriz de precios$/ do
125
126
  @new_outbound = Date.parse((doc/"li.#{option}").first.attributes["data-outbounddate"])
126
127
  @new_inbound = Date.parse((doc/"li.#{option}").first.attributes["data-inbounddate"])
127
128
  @price = Price.new((doc/"li.#{option} span[@class='price-currency #{currency($SITE)} '] span.currency").first.inner_text+" "+(doc/"li.#{option} span[@class='price-currency #{currency($SITE)} '] span.amount").first.inner_text)
128
- BROWSER.div(:id,'price-suggestion-matrix').li(:class,"price-suggestion-matrix-cell price-suggestion-matrix-price #{option}").click
129
+ BROWSER.div(:id,'price-suggestion-matrix').li(:class,"price-suggestion-matrix-cell price-suggestion-matrix-price price-suggestion-matrix-price-VALID #{option}").click
129
130
  @search.set_new_date(@new_outbound,@new_inbound)
130
131
  end
131
132
 
@@ -3,7 +3,7 @@ And /^Verifico que ciudades iguales de error$/ do
3
3
  @path_landing = BROWSER.url.match(/(.+)(vuelos-a|passagens\-aereas\-para)(.+)/)
4
4
  BROWSER.goto(@path_landing[1].gsub(/\/...\/...\//,"/bue/bue/"))
5
5
  Watir::Wait.until(timeout = 10){BROWSER.div(:class,'messages').span(:class,'commonSprite warningSymbol').present?}
6
- BROWSER.div(:class,'messages').text.should match("The destination city is the same as the city of origin|La ciudad de destino es la misma que la ciudad de origen|A cidade de destino .{1,2} a mesma que a cidade de origem")
6
+ BROWSER.div(:class,'messages').text.should match("The destination city is the same as the departure city|La ciudad de destino es la misma que la ciudad de origen|A cidade de destino .{1,2} a mesma que a cidade de origem")
7
7
  end
8
8
 
9
9
  And /^Verifico que fechas iguales no de error$/ do
@@ -22,7 +22,7 @@ end
22
22
  And /^Verifico que la ciudad "(.*)" de error$/ do |text|
23
23
  BROWSER.goto(@path_landing[1].gsub(/\/...\/...\//,"/bue/xxx/"))
24
24
  Watir::Wait.until(timeout = 10){BROWSER.div(:class,'messages').span(:class,'commonSprite warningSymbol').present?}
25
- BROWSER.div(:class,'messages').text.should match("We could not understand the city you want to fly|No hemos podido interpretar la ciudad a la que quiere volar|N.{1,2}o encontramos a cidade solicitada")
25
+ BROWSER.div(:class,'messages').text.should match("We couldnt understand the city you want to fly|No hemos podido interpretar la ciudad a la que quiere volar|N.{1,2}o encontramos a cidade solicitada")
26
26
  end
27
27
 
28
28
  And /^Verifico que dias de permanencia negativo de error$/ do
@@ -345,8 +345,8 @@ And /^Verifico que el mensaje de error en el cluster sea correcto$/ do
345
345
  index = nil
346
346
  cluster=clusters.each_with_index do |cluster,i|
347
347
  if (cluster.idas.length>1 or cluster.vueltas.length>1)
348
- BROWSER.link(:class=>"buy btn-buy flights-button",:index=>i).click
349
- BROWSER.div(:class=>"cluster",:index=>i).li(:class=>'item error-message',:index=>((cluster.idas.length>1) ? 0 : 1)).text.no_accents.should match("Please choose a (return|departure) flight|Por favor, seleccione un vuelo de|Por favor, selecione um voo de")
348
+ BROWSER.div(:class=>"cluster",:index=>i).link(:class,"buy btn-buy flights-button").click
349
+ BROWSER.div(:class=>"cluster",:index=>i).li(:class=>'item error-message',:index=>((cluster.idas.length>1) ? 0 : 1)).text.no_accents.should match("Choose a (return|departure) flight|Por favor, seleccione un vuelo de|Por favor, selecione um voo de")
350
350
  end
351
351
  end
352
352
  end
@@ -3,7 +3,11 @@ When /^Elijo un itinerario y paso a checkout$/ do
3
3
  json = @search.get_results_search_service
4
4
  @item_json = json['result']['data']['items'][0]
5
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?
6
+ if BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].span(:class,'tickets-left-text').present?
7
+ @ultimos_lugares = BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].span(:class,'tickets-left-text').text.strip.no_accents.match(/(\d)/) ? BROWSER.div(:id,'clusters').divs(:class,'cluster')[0].span(:class,'tickets-left-text').text.strip.no_accents.match(/(\d)/)[0].to_i : 1
8
+ else
9
+ @ultimos_lugares = nil
10
+ end
7
11
  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
12
  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?
9
13
  begin
@@ -28,7 +28,7 @@ class ResultsCluster
28
28
  destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
29
29
  origen_iata = (div_datos/"a")[0].inner_text.strip
30
30
  destino_iata = (div_datos/"a")[1].inner_text.strip
31
- fecha = (div_datos/"span.date").first.inner_text.strip.no_accents
31
+ fecha = (div_datos/"span.date").first.empty? ? (div_datos/"span.date").first.inner_text.strip.no_accents : (div_datos_ida/"li.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
@@ -57,7 +57,7 @@ class ResultsCluster
57
57
  destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
58
58
  origen_iata = (div_datos/"a")[0].inner_text.strip
59
59
  destino_iata = (div_datos/"a")[1].inner_text.strip
60
- fecha = (div_datos/"span.date").last.inner_text.strip.no_accents
60
+ fecha = (div_datos/"span.date").last.empty? ? (div_datos/"span.date").last.inner_text.strip.no_accents : (div_datos_vuelta/"li.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
@@ -33,8 +33,8 @@ Característica: matrix.price
33
33
  Y Verifico la correcta disposicion de la matriz de precios
34
34
  Y Verifico las fechas de la matriz de precios
35
35
 
36
- @ar
36
+ @br
37
37
  @roundtrip
38
38
  Ejemplos:
39
39
  |pais|tipo|cabotage|
40
- |AR |roundtrip|true|
40
+ |BR |roundtrip|true|
@@ -15,7 +15,7 @@
15
15
 
16
16
  gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
17
17
 
18
- gem.version = '2.4.4' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
18
+ gem.version = '2.4.5' #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.4.4
4
+ version: 2.4.5
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-27 00:00:00.000000000 Z
11
+ date: 2014-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: henry-container