onlyoffice_documentserver_testing_framework 2.8.0 → 2.9.0
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 +4 -4
- data/lib/onlyoffice_documentserver_testing_framework/selenium_wrapper/selenium_wrapper_js_errors.rb +2 -2
- data/lib/onlyoffice_documentserver_testing_framework/selenium_wrapper.rb +0 -7
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_2.list +38 -0
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions.rb +14 -12
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/manager_messages_checker.rb +1 -1
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management.rb +7 -7
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs.rb +1 -1
- data/lib/onlyoffice_documentserver_testing_framework/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 549a8273d55e4763aa715b048a02dc05197975c408ba139fbfa0d6d5fbc4648c
|
4
|
+
data.tar.gz: 0fe5138abec4d65fefbe86f7c8380a38e2d6f24f0340211584435dc4252e06fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d398c768bf7fb178f3e1cc75beccc7a61d9185a1cf8bf62553b0847106cae488253bc152ec067d636703d284bea1afa7c1c1930c41521e6af055a7d50bbda5
|
7
|
+
data.tar.gz: 37185151d10cba09b75e7d369403c28be46771267a4d702a180d467723b3899f1e1d93307b530b5847e1f7f8ed1976e4d8b8713fd9b777b89a80e27f81577575
|
data/lib/onlyoffice_documentserver_testing_framework/selenium_wrapper/selenium_wrapper_js_errors.rb
CHANGED
@@ -6,8 +6,8 @@ module SeleniumWrapperJsErrors
|
|
6
6
|
def ignored_errors
|
7
7
|
return @ignored_errors if @ignored_errors
|
8
8
|
|
9
|
-
@ignored_errors = File.readlines("#{File.expand_path('..', __dir__)}"\
|
10
|
-
'/selenium_wrapper/selenium_wrapper_js_errors'\
|
9
|
+
@ignored_errors = File.readlines("#{File.expand_path('..', __dir__)}" \
|
10
|
+
'/selenium_wrapper/selenium_wrapper_js_errors' \
|
11
11
|
'/ignored_errors.list')
|
12
12
|
.map(&:strip)
|
13
13
|
end
|
@@ -116,13 +116,6 @@ module OnlyofficeDocumentserverTestingFramework
|
|
116
116
|
selenium_functions(:get_attribute, xpath, 'class').include?('disabled')
|
117
117
|
end
|
118
118
|
|
119
|
-
# Move to element
|
120
|
-
# @param xpath [String] xpath to move
|
121
|
-
# @return [nil]
|
122
|
-
def move_to_element(xpath)
|
123
|
-
selenium_functions :move_to_element_by_locator, xpath
|
124
|
-
end
|
125
|
-
|
126
119
|
# Remove element
|
127
120
|
# @param xpath [String] xpath to remove
|
128
121
|
# @return [nil]
|
@@ -0,0 +1,38 @@
|
|
1
|
+
English
|
2
|
+
Armenian
|
3
|
+
Azerbaijani
|
4
|
+
Basque
|
5
|
+
Belarusian
|
6
|
+
Bulgarian
|
7
|
+
Catalan
|
8
|
+
Chinese (People's Republic of China)
|
9
|
+
Chinese (Traditional, Taiwan)
|
10
|
+
Czech
|
11
|
+
Danish
|
12
|
+
Dutch
|
13
|
+
Finnish
|
14
|
+
French
|
15
|
+
Galego
|
16
|
+
German
|
17
|
+
Greek
|
18
|
+
Hungarian
|
19
|
+
Indonesian
|
20
|
+
Italian
|
21
|
+
Japanese
|
22
|
+
Korean
|
23
|
+
Latvian
|
24
|
+
Lao
|
25
|
+
Malay (Malaysia)
|
26
|
+
Norwegian
|
27
|
+
Polish
|
28
|
+
Portuguese (Brazil)
|
29
|
+
Portuguese (Portugal)
|
30
|
+
Romanian
|
31
|
+
Russian
|
32
|
+
Slovak
|
33
|
+
Slovenian
|
34
|
+
Spanish
|
35
|
+
Swedish
|
36
|
+
Turkish
|
37
|
+
Ukrainian
|
38
|
+
Vietnamese
|
data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions.rb
CHANGED
@@ -21,11 +21,11 @@ class DocTestSiteFunctions
|
|
21
21
|
@xpath_conversion_step = '//*[@id="step2"]'
|
22
22
|
@xpath_editor_scripts_step = '//*[@id="step3"]'
|
23
23
|
@xpath_file_entry = '//*[@class="stored-list"]//table/tbody/tr'
|
24
|
-
@xpath_create_doc = '//*[contains(@class, "try-editor document")]|'\
|
24
|
+
@xpath_create_doc = '//*[contains(@class, "try-editor document")]|' \
|
25
25
|
'//*[contains(@class, "try-editor word")]'
|
26
|
-
@xpath_create_workbook = '//*[contains(@class, "try-editor spreadsheet")]|'\
|
26
|
+
@xpath_create_workbook = '//*[contains(@class, "try-editor spreadsheet")]|' \
|
27
27
|
'//*[contains(@class, "try-editor cell")]'
|
28
|
-
@xpath_create_presentation = '//*[contains(@class, "try-editor presentation")]|'\
|
28
|
+
@xpath_create_presentation = '//*[contains(@class, "try-editor presentation")]|' \
|
29
29
|
'//*[contains(@class, "try-editor slide")]'
|
30
30
|
@edit_modes_indexes = edit_modes_indexes
|
31
31
|
end
|
@@ -57,7 +57,7 @@ class DocTestSiteFunctions
|
|
57
57
|
# Upload file to portal
|
58
58
|
# @param [String] file_path like as '/mnt/data_share/Files/DOCX/empty.docx'
|
59
59
|
def upload_file(file_path)
|
60
|
-
file_path_absolute = file_path.gsub('~',
|
60
|
+
file_path_absolute = file_path.gsub('~', Dir.home)
|
61
61
|
@instance.selenium.type_to_locator('//*[@id="fileupload"]', file_path_absolute, false, false, false, true)
|
62
62
|
wait_loading_file
|
63
63
|
wait_conversion
|
@@ -72,7 +72,7 @@ class DocTestSiteFunctions
|
|
72
72
|
|
73
73
|
return if error_message.empty?
|
74
74
|
|
75
|
-
@instance.selenium.webdriver_error('Error while uploading document. '\
|
75
|
+
@instance.selenium.webdriver_error('Error while uploading document. ' \
|
76
76
|
"Error message: #{error_message}")
|
77
77
|
end
|
78
78
|
|
@@ -224,16 +224,18 @@ class DocTestSiteFunctions
|
|
224
224
|
|
225
225
|
# @param [DocumentServerVersion] version of server
|
226
226
|
# @return [Array<String>] list of supported languages
|
227
|
-
def self.supported_languages(version = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(
|
228
|
-
file = if version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7,
|
227
|
+
def self.supported_languages(version = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 1, 0))
|
228
|
+
file = if version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 2)
|
229
|
+
'doc_test_site_languages_after_7_2.list'
|
230
|
+
elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 1)
|
229
231
|
'doc_test_site_languages_after_7_1.list'
|
230
232
|
elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(6, 2)
|
231
233
|
'doc_test_site_languages_after_6_2.list'
|
232
234
|
else
|
233
235
|
'doc_test_site_languages_before_6_2.list'
|
234
236
|
end
|
235
|
-
File.readlines("#{File.expand_path('..', __dir__)}"\
|
236
|
-
'/test_instance_docs/doc_test_site_functions/'\
|
237
|
+
File.readlines("#{File.expand_path('..', __dir__)}" \
|
238
|
+
'/test_instance_docs/doc_test_site_functions/' \
|
237
239
|
"languages_list/#{file}")
|
238
240
|
.map(&:strip)
|
239
241
|
end
|
@@ -244,9 +246,9 @@ class DocTestSiteFunctions
|
|
244
246
|
# @return [Hash] name with index
|
245
247
|
def default_modes_indexes
|
246
248
|
{
|
247
|
-
comment_mode:
|
248
|
-
review_mode:
|
249
|
-
fill_forms:
|
249
|
+
comment_mode: 2,
|
250
|
+
review_mode: 4,
|
251
|
+
fill_forms: 6,
|
250
252
|
view_mode: 8,
|
251
253
|
embedded: 10
|
252
254
|
}
|
@@ -14,7 +14,7 @@ module OnlyofficeDocumentserverTestingFramework
|
|
14
14
|
|
15
15
|
# @return [Boolean] is `File not found` message shown
|
16
16
|
def file_not_found_message?
|
17
|
-
message_xpath = '//div[contains(@class, "tooltip-inner") and '\
|
17
|
+
message_xpath = '//div[contains(@class, "tooltip-inner") and ' \
|
18
18
|
'contains(text(),"The required file was not found")]'
|
19
19
|
@instance.selenium.select_frame
|
20
20
|
error_on_loading = @instance.selenium.element_visible?(message_xpath)
|
@@ -22,7 +22,7 @@ module OnlyofficeDocumentserverTestingFramework
|
|
22
22
|
@instance = instance
|
23
23
|
@xpath_iframe_count = 1
|
24
24
|
# Don't mixup iframe with help
|
25
|
-
@xpath_iframe = '//iframe[not(contains(@src, "/help/")) and '\
|
25
|
+
@xpath_iframe = '//iframe[not(contains(@src, "/help/")) and ' \
|
26
26
|
'not(contains(@id, "fileFrame"))]'
|
27
27
|
@alert_dialog_xpath = '//div[@role="alertdialog"]'
|
28
28
|
@alert_dialog_span_xpath = "#{@alert_dialog_xpath}/div/div/div/span"
|
@@ -33,7 +33,7 @@ module OnlyofficeDocumentserverTestingFramework
|
|
33
33
|
# @return [Boolean] check if loader present
|
34
34
|
def loading_present?
|
35
35
|
if @instance.webdriver.alert_exists?
|
36
|
-
raise 'Service Unavailable. There is alert while loading docs: '\
|
36
|
+
raise 'Service Unavailable. There is alert while loading docs: ' \
|
37
37
|
"\"#{@instance.webdriver.alert_text}\""
|
38
38
|
end
|
39
39
|
|
@@ -76,7 +76,7 @@ module OnlyofficeDocumentserverTestingFramework
|
|
76
76
|
while timer < timeout && !loading_present?
|
77
77
|
sleep 1
|
78
78
|
timer += 1
|
79
|
-
OnlyofficeLoggerHelper.log('Waiting for start loading of documents. '\
|
79
|
+
OnlyofficeLoggerHelper.log('Waiting for start loading of documents. ' \
|
80
80
|
"Waiting for #{timer} seconds of #{timeout}")
|
81
81
|
end
|
82
82
|
return unless timer == timeout
|
@@ -98,8 +98,8 @@ module OnlyofficeDocumentserverTestingFramework
|
|
98
98
|
while loading_present?
|
99
99
|
sleep(1)
|
100
100
|
current_wait_time += 1
|
101
|
-
OnlyofficeLoggerHelper.log('Waiting for Round Status for '\
|
102
|
-
"#{current_wait_time} of "\
|
101
|
+
OnlyofficeLoggerHelper.log('Waiting for Round Status for ' \
|
102
|
+
"#{current_wait_time} of " \
|
103
103
|
"#{timeout_in_seconds} timeout")
|
104
104
|
@instance.doc_editor.windows.txt_options.txt_options = 'Unicode (UTF-8)'
|
105
105
|
@instance.spreadsheet_editor.windows.csv_option.csv_options = options
|
@@ -174,8 +174,8 @@ module OnlyofficeDocumentserverTestingFramework
|
|
174
174
|
# Add js code to handle JS errors
|
175
175
|
# @return [nil]
|
176
176
|
def add_error_handler
|
177
|
-
js_handler = 'window.jsErrors = [];'\
|
178
|
-
'window.onerror = function(errorMessage) '\
|
177
|
+
js_handler = 'window.jsErrors = [];' \
|
178
|
+
'window.onerror = function(errorMessage) ' \
|
179
179
|
'{window.jsErrors[window.jsErrors.length] = errorMessage;}'
|
180
180
|
@instance.selenium.select_frame @instance.management.xpath_iframe
|
181
181
|
@instance.selenium.execute_javascript(js_handler)
|
@@ -72,7 +72,7 @@ module OnlyofficeDocumentserverTestingFramework
|
|
72
72
|
def env_options
|
73
73
|
return @env_options if @env_options
|
74
74
|
|
75
|
-
raw_options = ENV
|
75
|
+
raw_options = ENV.fetch('ONLYOFFICE_DS_TESTING_OPTIONS', '{}')
|
76
76
|
@env_options = JSON.parse(raw_options)
|
77
77
|
@env_options['IgnoredJSErrors'] = [] unless @env_options['IgnoredJSErrors']
|
78
78
|
@env_options
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlyoffice_documentserver_testing_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ONLYOFFICE
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: onlyoffice_logger_helper
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/healthcheck_page.rb
|
206
206
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_6_2.list
|
207
207
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_1.list
|
208
|
+
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_2.list
|
208
209
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_before_6_2.list
|
209
210
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/integration_example_api.rb
|
210
211
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management.rb
|
@@ -241,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
242
|
- !ruby/object:Gem::Version
|
242
243
|
version: '0'
|
243
244
|
requirements: []
|
244
|
-
rubygems_version: 3.3.
|
245
|
+
rubygems_version: 3.3.19
|
245
246
|
signing_key:
|
246
247
|
specification_version: 4
|
247
248
|
summary: ONLYOFFICE DocumentServer testing framework
|