flights_gui_tests 1.6.7 → 1.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 909061b3ab767091bd447d7dbcfc90180a06648e
4
- data.tar.gz: 70f45b13ea6430beb058c620f04bfdbb90831285
3
+ metadata.gz: 6a19865a82052d45e618ed22745392bb2ccb255a
4
+ data.tar.gz: 0ca98b494622109ebbe78d1f6bb1d5b73fec5371
5
5
  SHA512:
6
- metadata.gz: d2c60c52032aef66577ec8bda6c424942ed8e940c3bae3e0a96544bea53dfb7a10c9a3d824edee3ea4dd4a0b5f3c0a1c308bede4723e34891535e3356da1a07d
7
- data.tar.gz: e4504d2ceb0af3f6e3ece06b663a3eee578036b6ff196f898babb666223b9cd11ad9c340adee42af9309c033fd3640df9cc544db76df36a212620e0a69a824b8
6
+ metadata.gz: fc9874d6096238f934e491e551495763229c489d1050ac9422727ede2786e3212d097ebdd21e9282091cf535f2dbf634de26f1b031c028359ab7fa093b6085ce
7
+ data.tar.gz: c36d1315ecadf26084833a62b827d8bfb4fa8eb4202daa822ceff059cde39330c102325bcf7e549416aceeb74c23b1dd2e17ded9917dffa59e625039f76e141b
@@ -12,7 +12,7 @@ Entonces(/^(?:verifico|valido) que el mensaje de error en el cluster sea correct
12
12
  end
13
13
 
14
14
  Entonces(/^(?:verifico|valido) que ciudades iguales de error$/) do
15
- @path_landing = @page.url.match(/(.+)(vuelos-a|passagens\-aereas\-para)(.+)/)
15
+ @path_landing = @page.url.match(/(.+)(vuelos-a|passagens\-aereas\-para|flights-to)(.+)/)
16
16
  @page.ir(@path_landing[1].gsub(/\/...\/...\//,"/bue/bue/"))
17
17
  @page.simbolo_error_element.when_visible(timeout=10)
18
18
  @page.mensaje_element.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")
@@ -63,9 +63,11 @@ end
63
63
  Entonces(/^(?:verifico|valido) que si se pone un codigo de aeropuerto en vez de uno de cuidad, se redirige a la ciudad del aeropuerto$/) do
64
64
  @page.ir(@path_landing[1].gsub(/\/...\/...\//,"/ccs/eze/"))
65
65
  sleep(0.5)
66
- if AllPages.site=="BR"
66
+ if AllPages.lang=="pt"
67
67
  @page.url.strip.should equal(@path_landing[1].to_s.gsub(/\/...\/...\//,"/ccs/bue/")+@path_landing[2]+"-buenos+aires-saindo-de-caracas")
68
- else
68
+ elsif AllPages.lang=="en"
69
+ @page.url.strip.should equal(@path_landing[1].to_s.gsub(/\/...\/...\//,"/ccs/bue/")+@path_landing[2]+"-buenos+aires-from-caracas")
70
+ else
69
71
  @page.url.strip.should equal(@path_landing[1].to_s.gsub(/\/...\/...\//,"/ccs/bue/")+@path_landing[2]+"-buenos+aires-desde-caracas")
70
72
  end
71
73
  end
@@ -83,21 +85,21 @@ Entonces(/^(?:verifico|valido) que si la url tiene parametros, se deben conserva
83
85
  end
84
86
 
85
87
  Entonces(/^(?:verifico|valido) que la url para sem funcione correctamente con un ciudad con resultados sin seoPath$/) do
86
- match = @path_landing[1].match(/(.+)(vuelos|passagens-aereas)\/(...)\/(...)\//)
88
+ match = @path_landing[1].match(/(.+)(vuelos|passagens-aereas|flights)\/(...)\/(...)\//)
87
89
  @page.ir("#{match[1]}#{match[2]}/handler/#{match[3]}/#{match[4]}")
88
90
  sleep(0.5)
89
91
  @page.url.strip.should equal(@path_landing.to_s.strip.gsub(/\?(.+)/,''))
90
92
  end
91
93
 
92
94
  Entonces(/^(?:verifico|valido) que la url para sem funcione correctamente con un ciudad sin resultados sin seoPath$/) do
93
- match = @path_landing[1].match(/(.+)(vuelos|passagens-aereas)\/(...)\/(...)\//)
95
+ match = @path_landing[1].match(/(.+)(vuelos|passagens-aereas|flights)\/(...)\/(...)\//)
94
96
  @page.ir("#{match[1]}#{match[2]}/handler/#{match[3]}/KLP")
95
97
  sleep(0.5)
96
98
  @page.url.strip.should equal("#{match[1]}#{match[2].to_s.gsub(/\?(.+)/,'').strip}/")
97
99
  end
98
100
 
99
101
  Entonces(/^(?:verifico|valido) que la url de landing para el destino "(.*?)" no rompa$/) do |to_city|
100
- match = @path_landing[1].match(/(.+)(vuelos|passagens-aereas)\/(...)\/(...)\//)
102
+ match = @path_landing[1].match(/(.+)(vuelos|passagens-aereas|flights)\/(...)\/(...)\//)
101
103
  respond = HTTParty.get("#{match[1]}#{match[2]}/css/#{to_city}")
102
104
  respond.code.to_s.should match("200|404")
103
105
  end
@@ -32,7 +32,7 @@ Dado(/^con (?:fecha ida|fecha|salida|fecha salida) '(.*)' y (?:estadia|fecha vue
32
32
  end
33
33
 
34
34
  Cuando(/^(?:realizo|genero|ingreso) la busqueda$/) do
35
- if AllPages.lang=="en"
35
+ if AllPages.internacional
36
36
  @page.manage_data.set_header_json({"host"=>"www.us.despegar.com"})
37
37
  @page.ir("www.despegar.com/about")
38
38
  $browser.execute_script("javascript:void(document.cookie = 'x-locale=en-#{AllPages.site.upcase}; domain=despegar.com; Path=/')")
@@ -12,7 +12,7 @@ Cuando(/^(?:verifico|valido) que las datos de la pagina sean consistente a la bu
12
12
  (html/"span.search-info").inner_text.no_accents.downcase.should match(@page.manage_data.city_from_1.name_lang[AllPages.lang].downcase)
13
13
  (html/"span.search-info").inner_text.no_accents.downcase.should match(@page.manage_data.city_to_1.name_lang[AllPages.lang].downcase)
14
14
  (!(html/"div.ux-search").length.zero?).should be_true
15
- (!(html/"div#flights-alerts").length.zero?).should be_true if @page.tipo_de_busqueda=="roundtrip" and AllPages.lang!="en"
15
+ (!(html/"div#flights-alerts").length.zero?).should be_true if @page.tipo_de_busqueda=="roundtrip" and !AllPages.internacional
16
16
  (!(html/"div#inline-filters-VERTICAL_FILTERS-wrapper").length.zero?).should be_true
17
17
  end
18
18
  end
@@ -46,7 +46,7 @@ Entonces(/^recorro y (?:verifico|valido) cada itinerario$/) do
46
46
  $num = 0
47
47
  @page.itinerarios_elements.each do |itinerario|
48
48
  _itinerario = @page.cargar_itinerario(itinerario)
49
- @page.validar_millas(json,i) unless AllPages.lang=="en"
49
+ @page.validar_millas(json,i) unless AllPages.internacional
50
50
  @page.validar_mas_detalles(json,i,_itinerario)
51
51
  @page.validar_detalles_itinerario(i)
52
52
  @page.validar_popup_cuotas(i)
@@ -147,4 +147,12 @@ class AllPages
147
147
  end
148
148
  end
149
149
 
150
+ def self.internacional
151
+ if @@site.match(/IN|CN|PT/)
152
+ return true
153
+ else
154
+ return false
155
+ end
156
+ end
157
+
150
158
  end
@@ -1,3 +1,3 @@
1
1
  module FlightsGui
2
- VERSION = "1.6.7"
2
+ VERSION = "1.6.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flights_gui_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - lgonzalez