onlyoffice_documentserver_testing_framework 2.15.0 → 2.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_8_0.list +42 -0
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/password_protected_conversion_helper.rb +43 -0
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions.rb +9 -2
- data/lib/onlyoffice_documentserver_testing_framework/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bf7d415e031f6817060ee6a9202ad373cd6ffc5119217ce32c66b83146021fa
|
4
|
+
data.tar.gz: 236b54da21d8f0b069f8d0a5b86987f17dbd79863426dd045b4a678d09f31966
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22ebba3b0d811b98c0070d65f5bae685023d625cbd95ede2089080b9bb299c06ea8c1de2e7f01d86fa978bf85e2957f907c0b62fac50f0f9b1f040de6c68dc9a
|
7
|
+
data.tar.gz: 1f2bf0eb3578982b52d3dfd63143c9341466d4d128f68179bbebd92c08543f9a7cc0ab7a9bb3de2661f5f03e70d19c7afe2c5e3f8c6507fc0a6ae254c725dcaa
|
@@ -0,0 +1,42 @@
|
|
1
|
+
English
|
2
|
+
Arabic
|
3
|
+
Armenian
|
4
|
+
Azerbaijani
|
5
|
+
Basque
|
6
|
+
Belarusian
|
7
|
+
Bulgarian
|
8
|
+
Catalan
|
9
|
+
Chinese (Simplified)
|
10
|
+
Chinese (Traditional)
|
11
|
+
Czech
|
12
|
+
Danish
|
13
|
+
Dutch
|
14
|
+
Finnish
|
15
|
+
French
|
16
|
+
Galego
|
17
|
+
German
|
18
|
+
Greek
|
19
|
+
Hungarian
|
20
|
+
Indonesian
|
21
|
+
Italian
|
22
|
+
Japanese
|
23
|
+
Korean
|
24
|
+
Lao
|
25
|
+
Latvian
|
26
|
+
Malay (Malaysia)
|
27
|
+
Norwegian
|
28
|
+
Polish
|
29
|
+
Portuguese (Brazil)
|
30
|
+
Portuguese (Portugal)
|
31
|
+
Romanian
|
32
|
+
Russian
|
33
|
+
Serbian
|
34
|
+
Sinhala (Sri Lanka)
|
35
|
+
Slovak
|
36
|
+
Slovenian
|
37
|
+
Spanish
|
38
|
+
Swedish
|
39
|
+
Turkish
|
40
|
+
Ukrainian
|
41
|
+
Vietnamese
|
42
|
+
Test Language
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OnlyofficeDocumentserverTestingFramework
|
4
|
+
# Helper to handle password protected files on conversion step
|
5
|
+
module PasswordProtectedConversionHelper
|
6
|
+
# @return [String] xpath of password input
|
7
|
+
def xpath_input_password
|
8
|
+
'//input[@id="filePass"]'
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [String] xpath of enter button
|
12
|
+
def xpath_enter_password
|
13
|
+
'//div[@id="enterPass"]'
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [String] xpath of error message
|
17
|
+
def xpath_password_error
|
18
|
+
'//span[@class="errorPass"]'
|
19
|
+
end
|
20
|
+
|
21
|
+
# Waits until password is checked
|
22
|
+
# @return [Nothing]
|
23
|
+
def wait_to_check_password
|
24
|
+
@instance.webdriver.wait_until(5) do
|
25
|
+
!@instance.webdriver.get_attribute(@xpath_conversion_step, 'class').include?('current')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [Boolean] check if incorrect password warning is shown
|
30
|
+
def incorrect_password_shown?
|
31
|
+
@instance.selenium.element_visible?(xpath_password_error)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Handle password block
|
35
|
+
def handle_password_protection(password)
|
36
|
+
@instance.selenium.type_text(xpath_input_password, password)
|
37
|
+
@instance.selenium.click_on_locator(xpath_enter_password)
|
38
|
+
wait_to_check_password
|
39
|
+
@instance.webdriver.webdriver_error("Cannot open file with password: `#{password}`") if incorrect_password_shown?
|
40
|
+
OnlyofficeLoggerHelper.log('Entered password')
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions.rb
CHANGED
@@ -4,11 +4,13 @@ require_relative 'doc_test_site_functions/healthcheck_page'
|
|
4
4
|
require_relative 'doc_test_site_functions/doc_test_file_list'
|
5
5
|
require_relative 'doc_test_site_functions/doc_test_site_server_helper'
|
6
6
|
require_relative 'doc_test_site_functions/file_reopen_helper'
|
7
|
+
require_relative 'doc_test_site_functions/password_protected_conversion_helper'
|
7
8
|
# Class to work with test examples
|
8
9
|
class DocTestSiteFunctions
|
9
10
|
extend DocTestSiteServerHelper
|
10
11
|
include PageObject
|
11
12
|
include OnlyofficeDocumentserverTestingFramework::FileReopenHelper
|
13
|
+
include OnlyofficeDocumentserverTestingFramework::PasswordProtectedConversionHelper
|
12
14
|
|
13
15
|
select_list(:user_list, xpath: '//*[@id="user"]')
|
14
16
|
select_list(:language_list, xpath: '//*[@id="language"]')
|
@@ -96,6 +98,9 @@ class DocTestSiteFunctions
|
|
96
98
|
OnlyofficeLoggerHelper.log("Waiting for file conversion for #{current_time} seconds")
|
97
99
|
return true if @instance.selenium.get_attribute(@xpath_conversion_step, 'class').include?('done')
|
98
100
|
|
101
|
+
if @instance.selenium.element_visible?(xpath_input_password)
|
102
|
+
handle_password_protection(@instance.management.password)
|
103
|
+
end
|
99
104
|
sleep 1
|
100
105
|
check_error
|
101
106
|
end
|
@@ -225,8 +230,10 @@ class DocTestSiteFunctions
|
|
225
230
|
|
226
231
|
# @param [DocumentServerVersion] version of server
|
227
232
|
# @return [Array<String>] list of supported languages
|
228
|
-
def self.supported_languages(version = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(
|
229
|
-
file = if version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(
|
233
|
+
def self.supported_languages(version = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(8, 0, 0))
|
234
|
+
file = if version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(8, 0)
|
235
|
+
'doc_test_site_languages_after_8_0.list'
|
236
|
+
elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 4)
|
230
237
|
'doc_test_site_languages_after_7_4.list'
|
231
238
|
elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 3)
|
232
239
|
'doc_test_site_languages_after_7_3.list'
|
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.16.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:
|
12
|
+
date: 2024-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: onlyoffice_logger_helper
|
@@ -82,7 +82,9 @@ files:
|
|
82
82
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_2.list
|
83
83
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_3.list
|
84
84
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_4.list
|
85
|
+
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_8_0.list
|
85
86
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_before_6_2.list
|
87
|
+
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/password_protected_conversion_helper.rb
|
86
88
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/integration_example_api.rb
|
87
89
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management.rb
|
88
90
|
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/loader_helper.rb
|
@@ -119,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
121
|
- !ruby/object:Gem::Version
|
120
122
|
version: '0'
|
121
123
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.5.6
|
123
125
|
signing_key:
|
124
126
|
specification_version: 4
|
125
127
|
summary: ONLYOFFICE DocumentServer testing framework
|