flights_gui_tests 0.0.6 → 0.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8965ed1a6df272f6ffc9832e8e3377267292e6e8
|
4
|
+
data.tar.gz: a8d84aa849c8b6bd436075481f96338b677f1513
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69abfe9eb1b8a1b882ad847142a0ad0fbe08feb6b89387a4fa7bca0660a0941cfd5f6a36f0bfdabb9f7c99e54fcd5d11fd70f6db86e751d5fba6fff4be3bf2b1
|
7
|
+
data.tar.gz: a891f9a1c4df5e2c3384380e79a8e45d88ed00058b5305ba5d77ae0c5acc5775f866ba005da899055a675e293891dc58df2cd4a4cb1f3778c854835d6d2ecdec
|
@@ -40,6 +40,24 @@ Entonces(/^elijo un itinerario para reserva CAC del popup de no disponibilidad$/
|
|
40
40
|
step "si aparece el popup de no disponibilidad, elijo un itinerario para reserva CAC del popup de no disponibilidad"
|
41
41
|
end
|
42
42
|
|
43
|
+
Entonces(/^elijo un itinerario para fast checkout del popup de no disponibilidad$/) do
|
44
|
+
@popup_no_disponibilidad_page.sumar_aparicion
|
45
|
+
pending("La cantidad de compras supero las #{@popup_no_disponibilidad_page.apariciones} apariciones") if @popup_no_disponibilidad_page.apariciones > 4
|
46
|
+
@popup_no_disponibilidad_page.itinerario_element.when_visible(timeout=60)
|
47
|
+
@popup_no_disponibilidad_page.cargar_itinerarios
|
48
|
+
@itinerario_checkout = @popup_no_disponibilidad_page.elegir_itinerario(0)
|
49
|
+
step "verifico que ingrese al checkout"
|
50
|
+
step "verifico que la pagina no rompa"
|
51
|
+
step "cargo los pasajeros"
|
52
|
+
step "elijo una tarjeta ya guardada"
|
53
|
+
step "si el site es \"AR|MX|PE\", cargo los datos de facturacion"
|
54
|
+
step "cargo los datos de contacto"
|
55
|
+
step "acepto y compro"
|
56
|
+
step "espero que termine el pedido de compra"
|
57
|
+
step "verifico si no trae errores"
|
58
|
+
step "si aparece el popup de no disponibilidad, elijo un itinerario para fast checkout del popup de no disponibilidad"
|
59
|
+
end
|
60
|
+
|
43
61
|
Entonces(/^verifico los datos de agencia afiliada$/) do
|
44
62
|
@page.agencia_afiliada_element.should visible
|
45
63
|
@page.agencia_afiliada_element.text.should match("AG14073")
|
@@ -4,6 +4,7 @@ Cuando(/^me logueo como usuario "(.*?)" y pass "(.*?)"$/) do |arg1, arg2|
|
|
4
4
|
if @page.log_out_checkout_element.present?
|
5
5
|
@page.log_out_checkout_element.click
|
6
6
|
step "verifico que ingrese al checkout"
|
7
|
+
sleep(1)
|
7
8
|
end
|
8
9
|
@page.log_in_checkout_element.click
|
9
10
|
step "me logueo con usuario \"#{arg1}\" y pass \"#{arg2}\""
|
@@ -29,15 +30,16 @@ Entonces(/^verifico que se muestren las tarjetas guardadas$/) do
|
|
29
30
|
end
|
30
31
|
|
31
32
|
Entonces(/^elijo una tarjeta ya guardada$/) do
|
33
|
+
@page.browser.execute_script("javascript:void($('#stored-cards .display-cards').click())") if @page.mostrar_cartas_guardadas_element.text.no_accents.downcase.match("mas|mais|more")
|
32
34
|
if AllPages.site=="BR"
|
33
|
-
@page.browser.execute_script("javascript:void($('#stored-cards .display-cards').click())") if @page.mostrar_cartas_guardadas_element.text.no_accents.downcase.match("mas|mais|more")
|
34
35
|
ul = @page.container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/BR/)}.first
|
35
36
|
pending("no se encontro usuario de tarjeta para brasil") unless ul
|
36
37
|
ul.radio(:class,'radio').click
|
37
38
|
ul.text_fields[0].set("123")
|
38
39
|
else
|
39
|
-
@page.
|
40
|
-
|
40
|
+
ul = @page.container_tarjetas_elements.to_a.select{|ul| ul.li(:class,'item owner-name').text.match(/Diego QA Romero/)}.first
|
41
|
+
ul.radio(:class,'radio').click
|
42
|
+
ul.text_fields[0].set("123")
|
41
43
|
end
|
42
44
|
if @page.datos_tarjeta_guardada_element.present?
|
43
45
|
@page.ciudad_entrega_tarjeta_element.set("Ciudad") if @page.ciudad_entrega_tarjeta_element.present?
|
@@ -23,49 +23,47 @@ module Checkout
|
|
23
23
|
def load_data_from(div_datos)
|
24
24
|
@idas = Array.new
|
25
25
|
(div_datos/"div.segment").each do |div_datos_ida|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
def load_data_to(div_datos)
|
26
|
+
origen = (div_datos/"span.cities").first.inner_html.to_s.match("(.*)\<span class=\"separator\"\>\<\/span\>(.*)")[1].strip.no_accents
|
27
|
+
destino= (div_datos/"span.cities").last.inner_html.to_s.match("(.*)\<span class=\"separator\"\>\<\/span\>(.*)")[2].strip.no_accents
|
28
|
+
origen_iata = (div_datos/"li.outbound a")[0].inner_text.strip
|
29
|
+
destino_iata = (div_datos/"li.inbound a")[-1].inner_text.strip
|
30
|
+
fecha = (div_datos_ida/"li.outbound span.date")[0] ? (div_datos_ida/"li.outbound span.date")[0].inner_text.strip.no_accents : (div_datos_ida/"li.inbound span.date")[0].inner_text.strip.no_accents
|
31
|
+
escala = (div_datos/"span.stops a").inner_text.strip.empty? ? "Sin escalas" : (div_datos/"span.stops a").inner_text.to_i
|
32
|
+
aerolinea = Array.new
|
33
|
+
i = 0
|
34
|
+
(div_datos_ida/"span.airline-logo//img").each do |aer|
|
35
|
+
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
36
|
+
i = i + 1
|
37
|
+
end
|
38
|
+
hou_sal_ida = Time.parse((div_datos/"li.outbound").first.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)") ? (div_datos/"li.outbound").first.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents : (div_datos/"li.outbound").last.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents)
|
39
|
+
hou_lle_ida = Time.parse((div_datos/"li.outbound").last.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)") ? (div_datos/"li.outbound").last.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents : (div_datos/"li.outbound").first.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents)
|
40
|
+
@idas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida)
|
41
|
+
end
|
42
|
+
@nro_vuelo_ida = 0
|
43
|
+
@ida = @idas[@nro_vuelo_ida]
|
44
|
+
end
|
45
|
+
def load_data_to(div_datos)
|
47
46
|
@vueltas = Array.new
|
48
47
|
(div_datos/"div.segment").each do |div_datos_vuelta|
|
49
48
|
origen = (div_datos/"span.cities").first.inner_html.to_s.match("(.*)\<span class=\"separator\"\>\<\/span\>(.*)")[1].strip.no_accents
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
49
|
+
destino= (div_datos/"span.cities").last.inner_html.to_s.match("(.*)\<span class=\"separator\"\>\<\/span\>(.*)")[2].strip.no_accents
|
50
|
+
origen_iata = (div_datos/"li.outbound a")[0].inner_text.strip
|
51
|
+
destino_iata = (div_datos/"li.inbound a")[-1].inner_text.strip
|
52
|
+
fecha = (div_datos_vuelta/"li.outbound span.date")[0] ? (div_datos_vuelta/"li.outbound span.date")[0].inner_text.strip.no_accents : (div_datos_vuelta/"li.inbound span.date")[0].inner_text.strip.no_accents
|
53
|
+
escala = (div_datos/"span.stops a").inner_text.strip.empty? ? "Sin escalas" : (div_datos/"span.stops a").inner_text.to_i
|
54
|
+
aerolinea = Array.new
|
55
|
+
i = 0
|
56
|
+
(div_datos_vuelta/"span.airline-logo//img").each do |aer|
|
57
|
+
aerolinea << aer.attributes['src'].match(/(..).png/)[1].upcase
|
58
|
+
i = i + 1
|
59
|
+
end
|
60
|
+
hou_sal_ida = Time.parse((div_datos/"li.outbound").first.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)") ? (div_datos/"li.outbound").first.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents : (div_datos/"li.outbound").last.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents)
|
61
|
+
hou_lle_ida = Time.parse((div_datos/"li.outbound").last.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)") ? (div_datos/"li.outbound").last.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents : (div_datos/"li.outbound").first.inner_html.to_s.match("(.*)\<\/span\>(.*)hs(.*)\<a(.*)")[2].strip.no_accents)
|
62
|
+
@vueltas << DataCluster.new(origen,destino,fecha, aerolinea, escala_to_i(escala),origen_iata,destino_iata,hou_sal_ida,hou_lle_ida)
|
64
63
|
end
|
65
64
|
@nro_vuelo_vuelta = 0
|
66
65
|
@vuelta = @vueltas[@nro_vuelo_vuelta]
|
67
|
-
|
68
|
-
end
|
66
|
+
end
|
69
67
|
def load_prices(p_html)
|
70
68
|
|
71
69
|
@tarifas = Hash.new
|
data/flights_gui_tests.gemspec
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
|
17
17
|
|
18
|
-
gem.version = '0.0.
|
18
|
+
gem.version = '0.0.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('page-object')
|
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: 0.0.
|
4
|
+
version: 0.0.7
|
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-08-
|
11
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: henry-container
|