flights_gui_tests 2.2.2 → 2.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34911c2e6735706ad5f7e69a2362be102a97ccd6
4
- data.tar.gz: f3f9a0ba58f5922e30fc830123d1238d7e4ddfa4
3
+ metadata.gz: bb3236ea6eae5c464cacf87faa5b215638d84db2
4
+ data.tar.gz: 9d8a8f9561fb033a4fcecd05d796614dd865b113
5
5
  SHA512:
6
- metadata.gz: ed9a13e587bf1068db66d612cd2868b1d33b0d60d1658977c283c122def6913166ab7121fb211bfd025869b486e47b970e7542783e5bbec9ead3ab3ea576364d
7
- data.tar.gz: eff0ba8937bf6b6eea809cc3c04bc519fad5af647d120b6b465bb4094def01bb06bf1873656e7a3c4b4a97c3766c13bf37bcbf204c8f903201dcfc5ab9b4ac6e
6
+ metadata.gz: 0130ad6be89e443f14ed5ec789a865c7f3e0027d69abb6af2e9bcfb8e868cb3df64be78e49afc783da26f6eea72c3fcc419d66200262db2143b4635efd40e4ec
7
+ data.tar.gz: d6de8e19aec367a6f998c4fa26edc4d1bb3984b25ff32bb947f710c5ebbd4a4154595f01197a75fb339a963df2180cf64e635cf544c656715905368d8acd0911
@@ -35,6 +35,7 @@ Y(/^(?:verifico|valido) los valores del desglose en gracias contra los del check
35
35
  @itinerario_checkout.tarifas['total'].should equal(@itinerario_gracias.tarifas['total'])
36
36
  end
37
37
  end
38
+ @itinerario_gracias.ida.should equal(@itinerario_checkout.ida)
38
39
  end
39
40
 
40
41
  Entonces(/^(?:verifico|valido) los datos del vuelo comprado$/) do
@@ -24,8 +24,12 @@ class DataCluster
24
24
  def ==(other)
25
25
  eq = true
26
26
  self.attributes.each do |attrb|
27
- if other
28
- eq = false if self.send(attrb) != other.send(attrb)
27
+ if other and other.send(attrb)
28
+ if attrb.to_s!="aerolinea"
29
+ eq = false if self.send(attrb) != other.send(attrb)
30
+ else
31
+ eq = false unless self.send(attrb).include?(other.send(attrb).first)
32
+ end
29
33
  end
30
34
  end
31
35
  eq
@@ -10,19 +10,19 @@ module Thanks
10
10
  end
11
11
 
12
12
  def roundtrip(html)
13
- @idas = cargar_tramos((html/"li.itinerary"))
13
+ @idas = cargar_tramos((html/"ul.cluster"))
14
14
  @ida = @idas.first
15
- @vueltas = cargar_tramos((html/"li.itinerary"))
16
- @vuelta = @vueltas.first
15
+ @vueltas = cargar_tramos((html/"ul.cluster"))
16
+ @vuelta = @vueltas.last
17
17
  end
18
18
 
19
19
  def oneway(html)
20
- @idas = cargar_tramos((html/"li.itinerary"))
20
+ @idas = cargar_tramos((html/"ul.cluster"))
21
21
  @ida = @idas.first
22
22
  end
23
23
 
24
24
  def multipledestinations(html)
25
- data = (html/"li.itinerary")
25
+ data = (html/"ul.cluster")
26
26
  @idas = cargar_tramos(data.first)
27
27
  @ida = @idas.first
28
28
  @vueltas = @idas
@@ -31,21 +31,21 @@ module Thanks
31
31
 
32
32
  def cargar_tramos(lista_tramos)
33
33
  tramos = Array.new
34
- (lista_tramos/"ul.itinerary-info").each{ |segmento| tramos << cargar_tramo((lista_tramos/"div.header"),segmento)}
34
+ (lista_tramos/"li.itinerary").each{ |segmento| tramos << cargar_tramo(segmento)}
35
35
  return tramos
36
36
  end
37
37
 
38
- def cargar_tramo(info_ruta,segmento)
39
- aerolineas = (segmento/"li.airlines img").collect{|aerolinea| aerolinea.attributes['src'].match(/(..).png/)[1].upcase}
40
- return DataCluster.new( (info_ruta/"span.departure span.city").inner_text.strip.no_accents.gsub(/,/,''), #nombre ciudad salida
41
- (info_ruta/"span.arrival span.city").inner_text.strip.no_accents.gsub(/,/,''), #nombre ciudad llegada
42
- (info_ruta/"span.date").inner_text.strip, #fecha
38
+ def cargar_tramo(segmento)
39
+ aerolineas = (segmento/"li.airline img").collect{|aerolinea| aerolinea.attributes['src'].match(/(..).png/)[1].upcase}
40
+ return DataCluster.new( (segmento/"span.departure span.city").first.inner_text.strip.no_accents.gsub(/,/,''), #nombre ciudad salida
41
+ (segmento/"span.arrival span.city").first.inner_text.strip.no_accents.gsub(/,/,''), #nombre ciudad llegada
42
+ (segmento/"span.date").inner_text.strip, #fecha
43
43
  aerolineas, #aerolineas
44
44
  escala_to_i((segmento/"span.stops-text").inner_text.strip), #escalas
45
- (info_ruta/"a.airport").first.inner_text.strip.no_accents, #iata ciudad salida
46
- (info_ruta/"a.airport").last.inner_text.strip.no_accents, #iata ciudad llegada
47
- Time.parse((segmento/"span.hour").first.inner_text.strip), #horario salida
48
- Time.parse((segmento/"span.hour").last.inner_text.strip), #horario llegada
45
+ (segmento/"span.departure a.airport").first.inner_text.strip.no_accents, #iata ciudad salida
46
+ (segmento/"span.arrival a.airport").first.inner_text.strip.no_accents, #iata ciudad llegada
47
+ (segmento/"span.hour").first.inner_text.strip, #horario salida
48
+ (segmento/"span.hour").last.inner_text.strip, #horario llegada
49
49
  (segmento/"li.duration").inner_text.strip #duracion
50
50
  )
51
51
  end
@@ -1,3 +1,3 @@
1
1
  module FlightsGui
2
- VERSION = "2.2.2"
2
+ VERSION = "2.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flights_gui_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - lgonzalez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-01 00:00:00.000000000 Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: henry-container