ds-gui-automation 0.1.21 → 0.1.22
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.
@@ -8,7 +8,7 @@ end
|
|
8
8
|
|
9
9
|
Then(/^I should see the result clusters for the specified provider$/) do
|
10
10
|
|
11
|
-
|
11
|
+
DestinationServicesGUI::Results.filter_by_product_type(PRODUCT_TYPE)
|
12
12
|
|
13
13
|
DestinationServicesGUI::Results.wait_for_modal
|
14
14
|
|
@@ -19,6 +19,7 @@ Then(/^I should see the result clusters for the specified provider$/) do
|
|
19
19
|
(DestinationServicesGUI::Results.get_results_by_provider_code(PROVIDER_ID, IS_MODULAR).size > 0).should be_true
|
20
20
|
|
21
21
|
puts @browser.url
|
22
|
+
|
22
23
|
end
|
23
24
|
|
24
25
|
Then(/^I should see the results page with the search result$/) do
|
@@ -42,5 +43,4 @@ Then(/^I should see the results page with the search result$/) do
|
|
42
43
|
# results_quantity = @browser.div(:class, 'ux-common-results-title').text.split.first.to_i
|
43
44
|
# @browser.div(:class, 'cp-pager ng-isolate-scope').should be_visible if results_quantity > 20
|
44
45
|
|
45
|
-
|
46
46
|
end
|
data/features/support/env.rb
CHANGED
@@ -34,11 +34,13 @@ if !params['destination'].is_a? String
|
|
34
34
|
params['destination'] = params['destination'].nil? ? params['destination'] : params['destination'].to_a.shuffle.first
|
35
35
|
end
|
36
36
|
|
37
|
+
PRODUCT_TYPE = params['productType']
|
38
|
+
CATEGORY = params['category']
|
37
39
|
TO_CITY = params['destination'] || %W{BUE ORL CUN MIA NYC LAS}.shuffle.first
|
38
40
|
# FROM_CITY = params['from_city'] || get_origin_based_on_environment(ENVIRONMENT)
|
39
41
|
ON_MONTH = params['search_month'] || (Time.now + 2629743).strftime('%Y-%m')
|
40
42
|
WITH_DISTRIBUTION = params['distribution'] || rand(1..3).to_s
|
41
|
-
PROVIDER = params['provider']
|
43
|
+
PROVIDER = params['provider']
|
42
44
|
BETA = params['beta']
|
43
45
|
BETA_FRONT = params['beta_front']
|
44
46
|
BETA_COOKIES = params['cookies'] || 'settings'
|
data/lib/ds/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require_relative './commons.rb'
|
2
4
|
|
3
5
|
module Results
|
@@ -95,4 +97,32 @@ module Results
|
|
95
97
|
end
|
96
98
|
|
97
99
|
|
100
|
+
def filter_by_product_type(productType = 'TOUR')
|
101
|
+
|
102
|
+
filter_by_higher_amount if productType.eql?('TOUR')
|
103
|
+
|
104
|
+
filter_by_category('Parques temáticos') if productType.eql?('TICKET')
|
105
|
+
|
106
|
+
filter_by_category('Traslados') if productType.eql?('TRANSFER')
|
107
|
+
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
def filter_by_category(category)
|
112
|
+
|
113
|
+
category_filter = browser.div(:class, 'ux-common-filter-body ng-scope').lis.reject { | categories | !categories.span(:class, 'ng-binding').text.eql?(category)}
|
114
|
+
|
115
|
+
category_filter.first.click ## TODO agregar raise si el size de filtros es > 1
|
116
|
+
|
117
|
+
wait_for_modal
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
def filter_by_higher_amount
|
122
|
+
|
123
|
+
browser.div(:class, 'ux-common-filter-body ng-scope').lis[1].click
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
|
98
128
|
end
|