onlyoffice_documentserver_testing_framework 2.16.0 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bf7d415e031f6817060ee6a9202ad373cd6ffc5119217ce32c66b83146021fa
4
- data.tar.gz: 236b54da21d8f0b069f8d0a5b86987f17dbd79863426dd045b4a678d09f31966
3
+ metadata.gz: e11e6253bb6183d4692d3875cc8ed202d8379eaf939d0e44b40f58dab133c1be
4
+ data.tar.gz: 8fa6f12250268d00938c57730be9a363764e72caae47c30f47493ad4ec159add
5
5
  SHA512:
6
- metadata.gz: 22ebba3b0d811b98c0070d65f5bae685023d625cbd95ede2089080b9bb299c06ea8c1de2e7f01d86fa978bf85e2957f907c0b62fac50f0f9b1f040de6c68dc9a
7
- data.tar.gz: 1f2bf0eb3578982b52d3dfd63143c9341466d4d128f68179bbebd92c08543f9a7cc0ab7a9bb3de2661f5f03e70d19c7afe2c5e3f8c6507fc0a6ae254c725dcaa
6
+ metadata.gz: 91cc76f6c6b89b9e5bbd78562205e2d8eb5e1dd5285fc8b035081a6e125b6ac01b468f6df298d25edeef899d61f2808bc7e3d38bf9858560d47f52033243b106
7
+ data.tar.gz: ccce7eafb744394b1f420a408656b4eea79d20552c1beeea64c5f883c7b1b2d1d49462ba1aa2e9d742df2652fb4125ab9330a2559d70b86aae945beaea80134d
@@ -47,10 +47,27 @@ module OnlyofficeDocumentserverTestingFramework
47
47
  # rubocop disable to not change interface of public method
48
48
  # rubocop:disable Style/OptionalBooleanParameter
49
49
  def open(to_open = true)
50
- return if to_open == active?
50
+ click if to_open != active?
51
+ close_tooltips
52
+ end
51
53
 
52
- click
54
+ # Close tooltips
55
+ # @return [Nothing]
56
+ def close_tooltips
57
+ click_on_button(close_tooltip_xpath) while visible?(tooltip_xpath)
53
58
  end
54
59
  # rubocop:enable Style/OptionalBooleanParameter
60
+
61
+ private
62
+
63
+ # @return [String] xpath to tooltip
64
+ def tooltip_xpath
65
+ "//div[contains(@class, 'synch-tip-root')]"
66
+ end
67
+
68
+ # @return [String] xpath to close button in tooltip
69
+ def close_tooltip_xpath
70
+ "#{tooltip_xpath}//div[@class = 'close']"
71
+ end
55
72
  end
56
73
  end
@@ -0,0 +1,44 @@
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
+ English (United Kingdom)
15
+ Finnish
16
+ French
17
+ Galego
18
+ German
19
+ Greek
20
+ Hungarian
21
+ Indonesian
22
+ Italian
23
+ Japanese
24
+ Korean
25
+ Lao
26
+ Latvian
27
+ Malay (Malaysia)
28
+ Norwegian
29
+ Polish
30
+ Portuguese (Brazil)
31
+ Portuguese (Portugal)
32
+ Romanian
33
+ Russian
34
+ Serbian (Cyrillic)
35
+ Serbian (Latin)
36
+ Sinhala (Sri Lanka)
37
+ Slovak
38
+ Slovenian
39
+ Spanish
40
+ Swedish
41
+ Turkish
42
+ Ukrainian
43
+ Vietnamese
44
+ Test Language
@@ -0,0 +1,45 @@
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
+ English (United Kingdom)
15
+ Finnish
16
+ French
17
+ Galego
18
+ German
19
+ Greek
20
+ Hebrew (Israel)
21
+ Hungarian
22
+ Indonesian
23
+ Italian
24
+ Japanese
25
+ Korean
26
+ Lao
27
+ Latvian
28
+ Malay (Malaysia)
29
+ Norwegian
30
+ Polish
31
+ Portuguese (Brazil)
32
+ Portuguese (Portugal)
33
+ Romanian
34
+ Russian
35
+ Serbian (Cyrillic)
36
+ Serbian (Latin)
37
+ Sinhala (Sri Lanka)
38
+ Slovak
39
+ Slovenian
40
+ Spanish
41
+ Swedish
42
+ Turkish
43
+ Ukrainian
44
+ Vietnamese
45
+ Test Language
@@ -173,11 +173,10 @@ class DocTestSiteFunctions
173
173
 
174
174
  # @return [DocTestFileLIst] get file list
175
175
  def uploaded_file_list
176
- file_list = []
177
- (0...uploaded_file_count).each do |current_file_number|
178
- file_list << DocTestSiteFileListEntry.new(@instance,
179
- "#{@xpath_file_entry}[#{current_file_number + 1}]",
180
- @edit_modes_indexes)
176
+ file_list = (0...uploaded_file_count).map do |current_file_number|
177
+ DocTestSiteFileListEntry.new(@instance,
178
+ "#{@xpath_file_entry}[#{current_file_number + 1}]",
179
+ @edit_modes_indexes)
181
180
  end
182
181
  DocTestFileList.new(file_list)
183
182
  end
@@ -230,22 +229,28 @@ class DocTestSiteFunctions
230
229
 
231
230
  # @param [DocumentServerVersion] version of server
232
231
  # @return [Array<String>] list of supported languages
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)
237
- 'doc_test_site_languages_after_7_4.list'
238
- elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 3)
239
- 'doc_test_site_languages_after_7_3.list'
240
- elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 2)
241
- 'doc_test_site_languages_after_7_2.list'
242
- elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 1)
243
- 'doc_test_site_languages_after_7_1.list'
244
- elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(6, 2)
245
- 'doc_test_site_languages_after_6_2.list'
246
- else
247
- 'doc_test_site_languages_before_6_2.list'
248
- end
232
+ def self.supported_languages(version = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(8, 2, 0))
233
+ version_class = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion
234
+ version_mappings = [
235
+ [version_class.new(8, 2), 'doc_test_site_languages_after_8_2.list'],
236
+ [version_class.new(8, 1), 'doc_test_site_languages_after_8_1.list'],
237
+ [version_class.new(8, 0), 'doc_test_site_languages_after_8_0.list'],
238
+ [version_class.new(7, 4), 'doc_test_site_languages_after_7_4.list'],
239
+ [version_class.new(7, 3), 'doc_test_site_languages_after_7_3.list'],
240
+ [version_class.new(7, 2), 'doc_test_site_languages_after_7_2.list'],
241
+ [version_class.new(7, 1), 'doc_test_site_languages_after_7_1.list'],
242
+ [version_class.new(6, 2), 'doc_test_site_languages_after_6_2.list']
243
+ ]
244
+
245
+ file = 'doc_test_site_languages_before_6_2.list'
246
+
247
+ version_mappings.each do |ver, file_name|
248
+ if version >= ver
249
+ file = file_name
250
+ break
251
+ end
252
+ end
253
+
249
254
  File.readlines("#{File.expand_path('..', __dir__)}" \
250
255
  '/test_instance_docs/doc_test_site_functions/' \
251
256
  "languages_list/#{file}")
@@ -32,6 +32,10 @@ module OnlyofficeDocumentserverTestingFramework
32
32
  .gsub('px', '').to_i.positive?
33
33
 
34
34
  error = selenium_functions(:get_text, "#{alert_xpath}/div[2]/div[1]/div[2]/span").tr("\n", ' ')
35
+ if error.include?('There are one or more circular references')
36
+ click_on_button("#{@alert_dialog_xpath}//button[@result='ok']")
37
+ return nil
38
+ end
35
39
  "Server Error: #{error}"
36
40
  end
37
41
 
@@ -6,7 +6,7 @@ module OnlyofficeDocumentserverTestingFramework
6
6
  include SeleniumWrapper
7
7
 
8
8
  def initialize(instance)
9
- super(instance)
9
+ super
10
10
  @xpath_codepage_selector = '//*[contains(text(), "CSV")]/../..//div[@id="id-codepages-combo"]'
11
11
  end
12
12
 
@@ -4,6 +4,6 @@ module OnlyofficeDocumentserverTestingFramework
4
4
  # Module to hold version of Gem
5
5
  module Version
6
6
  # [String] version of gem
7
- STRING = '2.16.0'
7
+ STRING = '2.18.0'
8
8
  end
9
9
  end
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.16.0
4
+ version: 2.18.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: 2024-02-21 00:00:00.000000000 Z
12
+ date: 2024-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: onlyoffice_logger_helper
@@ -83,6 +83,8 @@ files:
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
85
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_8_0.list
86
+ - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_8_1.list
87
+ - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_8_2.list
86
88
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_before_6_2.list
87
89
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/password_protected_conversion_helper.rb
88
90
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/integration_example_api.rb
@@ -121,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
123
  - !ruby/object:Gem::Version
122
124
  version: '0'
123
125
  requirements: []
124
- rubygems_version: 3.5.6
126
+ rubygems_version: 3.5.22
125
127
  signing_key:
126
128
  specification_version: 4
127
129
  summary: ONLYOFFICE DocumentServer testing framework