flights_gui_henry_tests 2.4.6 → 2.4.7

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
- MTkxMWUzMmYxYWE3ZWExMTUyZDlkYTk3MmMyMzg0YmQxYTI0ZmI5Yg==
4
+ YzI2YWExMzM2NDhlZTliNDQ2ZTBlYmFlYzc1NTIzZjgwMzNkOWIwMA==
5
5
  data.tar.gz: !binary |-
6
- MzBhYjgyYWZjMjc1NDE3ODg3MDcwZDAxMTY5YWViYzQyZmU1YjM0OA==
6
+ OTc4MGE3Yzg2MzIzMjIyYTMzNTU0OTljNTY0ODQ1MDA3NTYxMzhmMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWU3ODczNDcxNTMyZWYwN2ZmZmQ5ZjA2YjA3ZjgxYzgwYzNiNDg1MjEwOTk4
10
- M2ZjMTcyZGM2MDMzY2ExYjE1NDM5OGQ5MGYzNDc4OTYyNWMzNjU3NjE3OTJl
11
- MTA1Mzc5MjBjNmM3ZDg4MTA3MGYyYmMyMmVhNGI4ZWY5ZGM1OTQ=
9
+ MWUyNWZhYzc1MjEyZGFkY2JkYWVkNTk5NTA3ODE2YTBlZjUwNDg3MjY1Nzgw
10
+ M2RlM2FmNDQ5NDhlNDg2YTA3MzczOTFiNjkwMzhiZWZmYjg0NTdiNDUxMDE5
11
+ NDRhMjFiYTg0NjJiZjliM2VjY2RmMDI3ZWYyZTQ5NmY3ZDYyNDI=
12
12
  data.tar.gz: !binary |-
13
- NWM3ZTA1ZDQ4Yzg2NTIyOTliNWZhZDI0NjYyMjZlYjgzODU4NTU0ZDFhNWI0
14
- OTk4ODY5OTMxYjA1OWMxZmRlOWVjYTkxMDcwNmFhNDIyNTYwMjEwODA3MTZk
15
- ZGUyYjExNWY5YzFkNjgzY2JhNWQ2NmRiMzljNDk0YTM4MTNlNmY=
13
+ YTc5YmIyZDdiMzVhZmY4NDBiNzliMzFkODk4YTJmMzY5MjU4MDFhMmNmOGFj
14
+ NjIwNTFjNGI5NTM2NjExYjlkYmU0ODJjOGIwMGViNmNhZWUwYjZkNTYxNGFi
15
+ YzZiMmE4ODc0YjQ5MGQwOTg2ZGVkMzcyNzMyMjZiOTcyNTIwMmY=
@@ -1,7 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  Then /^completo el mail de contacto para forzar cambio de precio$/ do
3
- debugger
4
- price = (@itinerario["tarifas"]["total"] * 0.1).to_i
3
+ price = (@itinerario.tarifas["total"].valor * 0.1).to_i + 1
5
4
  container = BROWSER.fieldset(:id,'contact')
6
5
  container.text_field(:id,"contact-email").set("mockedbooking_priceDifference_#{price}_#{price}@despegar.com")
7
6
  container.text_field(:id,"contact-email-repeat").set("mockedbooking_priceDifference_#{price}_#{price}@despegar.com")
@@ -32,10 +32,10 @@ Then /^Verifico que se muestre correctamente el popup de la cobertura completa p
32
32
  popup = BROWSER.div(:id,'popup-upselling-coverage-template')
33
33
  popup.div(:class,'coverage').should visible("Contenido del popup")
34
34
  popup.text.should match_sensitive("ASSIST CARD")
35
- popup.div(:class,'coverage').ul(:class,'list codes').should visible("Contenido del popup Codigos")
36
- popup.div(:class,'coverage').ul(:class,'list descriptions').should visible("Contenido del popup Descripcion")
37
- popup.div(:class,'coverage').ul(:class,'list values').should visible("Contenido del popup Values")
38
- popup.div(:class,'coverage').ul(:class,'list values').li(:class,/row odd/).text.strip.should match(destino.match("MIA") ? 'U\$S' : "€")
35
+ popup.div(:class,'coverage').span(:class,'upselling-coverage-cell upselling-coverage-code').should visible("Contenido del popup Codigos")
36
+ popup.div(:class,'coverage').span(:class,'upselling-coverage-cell upselling-coverage-title').should visible("Contenido del popup Descripcion")
37
+ popup.div(:class,'coverage').span(:class,'upselling-coverage-cell upselling-coverage-value').should visible("Contenido del popup Values")
38
+ popup.div(:class,'coverage').div(:class,/odd/).span(:class,'upselling-coverage-cell upselling-coverage-value').text.strip.should match(destino.match("MIA") ? 'U\$S' : "€")
39
39
  popup.div(:class,'coverage').text.should_not is_empty
40
40
  BROWSER.div(:class,'popup-upselling-coverage').span(:class,'popup-close-button popup-close').click
41
41
  Watir::Wait.until(timeout = 20){!popup.div(:class,'coverage').present?}
@@ -1,5 +1,63 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  class LandingCluster < ResultsCluster
3
+
4
+ def load_data_from(div_datos)
5
+ @idas = Array.new
6
+ (div_datos/"li.itinerary").each do |div_datos_ida|
7
+ duracion = (div_datos_ida/"li.time").inner_text.strip
8
+ origen = (div_datos/"span.city-departure").first.inner_text.gsub(/,/,'').strip.no_accents
9
+ destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
10
+ origen_iata = (div_datos/"a")[0].inner_text.strip
11
+ destino_iata = (div_datos/"a")[1].inner_text.strip
12
+ fecha = (div_datos_ida/"li.date").first.inner_text.strip.no_accents
13
+ escala = (div_datos_ida/"li.stops/a").inner_text.strip.empty? ? "Sin escalas" : (div_datos_ida/"li.stops/a").inner_text.to_i
14
+ aerolinea = Array.new
15
+ i = 0
16
+ (div_datos_ida/"li.airlinesShort//img").each do |aer|
17
+ aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
18
+ i = i + 1
19
+ end
20
+ (div_datos_ida/"li.airlines//img").each do |aer|
21
+ aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
22
+ i = i + 1
23
+ end
24
+ hou_sal_ida = Time.parse((div_datos_ida/"li.leave span.hour").inner_text.strip)
25
+ hou_lle_ida = Time.parse((div_datos_ida/"li.arrive span.hour").inner_text.strip)
26
+ @idas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida,duracion)
27
+ end
28
+ @nro_vuelo_ida = 0
29
+ @ida = @idas[@nro_vuelo_ida]
30
+
31
+ end
32
+ def load_data_to(div_datos)
33
+
34
+ @vueltas = Array.new
35
+ (div_datos/"li.itinerary").each do |div_datos_vuelta|
36
+ duracion = (div_datos_vuelta/"li.time").inner_text.strip
37
+ origen = (div_datos/"span.city-departure").first.inner_text.gsub(/,/,'').strip.no_accents
38
+ destino= (div_datos/"span.city-arrival").first.inner_text.gsub(/,/,'').strip.no_accents
39
+ origen_iata = (div_datos/"a")[0].inner_text.strip
40
+ destino_iata = (div_datos/"a")[1].inner_text.strip
41
+ fecha = (div_datos_vuelta/"li.date").last.inner_text.strip.no_accents
42
+ escala = (div_datos_vuelta/"li.stops/a").inner_text.strip.empty? ? "Sin escalas" : (div_datos_vuelta/"li.stops/a").inner_text.to_i
43
+ aerolinea = Array.new
44
+ i = 0
45
+ (div_datos_vuelta/"li.airlinesShort//img").each do |aer|
46
+ aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
47
+ i = i + 1
48
+ end
49
+ (div_datos_vuelta/"li.airlines//img").each do |aer|
50
+ aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
51
+ i = i + 1
52
+ end
53
+ hou_sal_ida = Time.parse((div_datos_vuelta/"li.leave span.hour").inner_text.strip)
54
+ hou_lle_ida = Time.parse((div_datos_vuelta/"li.arrive span.hour").inner_text.strip)
55
+ @vueltas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida,duracion)
56
+ end
57
+ @nro_vuelo_vuelta = 0
58
+ @vuelta = @vueltas[@nro_vuelo_vuelta]
59
+
60
+ end
3
61
 
4
62
  def load_prices(p_html)
5
63
 
@@ -15,7 +15,7 @@
15
15
 
16
16
  gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
17
17
 
18
- gem.version = '2.4.6' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
18
+ gem.version = '2.4.7' #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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flights_gui_henry_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.6
4
+ version: 2.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - lgonzalez,lsimean