onlyoffice_documentserver_testing_framework 2.12.0 → 2.14.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: 2e3bf6bd9f394d852e203b95428089f45d1f4c0c4943a4a985ed9344e80eee98
4
- data.tar.gz: b4f3282860c6a2a41b7cc71cf2474077fe9b32867013d994bd4a9d63ac36a049
3
+ metadata.gz: 461ac114a5d0cd1a595cd929458fc802644f6fe9c1d4a058a18e246f6ed915a3
4
+ data.tar.gz: 4426ce9593888e5186269b277acd216f6ab7ab4d7b83431eace8f1471a279e1a
5
5
  SHA512:
6
- metadata.gz: f21ce4720de8c66ffa5bc1d0cf10a9c438a59b0a8b284e0cd34f22349a0297250818848f2e530ec25a50509c31e9ad9b8553e25a96ceff74a78815068c2cc5c2
7
- data.tar.gz: 6271bfc95ff0a81e9ed3587fadc7cd68dd7b9c82bab892b5a9642af3df9dcaab449148e41f3839f164b55215040a85dbed17ee9830c68914e2431c62649b62ef
6
+ metadata.gz: 5f4257687f15794b8acac255bea478c8092b38eac1f7b6518a588a55ef3db70779cdd7accb3b5370112ec3dd9427f194f09ad2c409d86029b61fedb50274e33b
7
+ data.tar.gz: 3d00850bacb8199b773feed6a12a6b45117693fd511da23eb2287e68ebd711f6f40ab82a5a4f60b3944285745baa219c8b922104218b9efcf5c5fde378ebd8c6
@@ -0,0 +1,39 @@
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
39
+ Test Language
@@ -152,7 +152,8 @@ class DocTestSiteFunctions
152
152
  def current_document_storage_url
153
153
  page_source = @instance.selenium.page_source
154
154
  url_line = page_source.scan(/"?url"?: ".*$/).first
155
- url_line.delete('"').gsub('url: ', '').chop
155
+ pretty_url = url_line.delete('"').gsub('url: ', '').chop
156
+ pretty_url.gsub(/&useraddress=.*/, '')
156
157
  end
157
158
 
158
159
  # @return [True, False] is on file list page now?
@@ -224,8 +225,10 @@ class DocTestSiteFunctions
224
225
 
225
226
  # @param [DocumentServerVersion] version of server
226
227
  # @return [Array<String>] list of supported languages
227
- def self.supported_languages(version = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 1, 0))
228
- file = if version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 2)
228
+ def self.supported_languages(version = OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 3, 0))
229
+ file = if version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 3)
230
+ 'doc_test_site_languages_after_7_3.list'
231
+ elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 2)
229
232
  'doc_test_site_languages_after_7_2.list'
230
233
  elsif version >= OnlyofficeDocumentserverTestingFramework::DocumentServerVersion.new(7, 1)
231
234
  'doc_test_site_languages_after_7_1.list'
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OnlyofficeDocumentserverTestingFramework
4
+ # Helper to handle files with external links
5
+ module UpdateLinksHelper
6
+ # @return [String] xpath of update links message
7
+ def update_links_message_xpath
8
+ '//span[contains(text(), "This workbook contains links to one or more external sources")]'
9
+ end
10
+
11
+ # @return [String] xpath of update button
12
+ def xpath_update_button
13
+ "#{update_links_message_xpath}/../../../..//button[@result='ok']"
14
+ end
15
+
16
+ # @return [String] xpath of don't update button
17
+ def xpath_do_not_update_button
18
+ "#{update_links_message_xpath}/../../../..//button[@result='cancel']"
19
+ end
20
+
21
+ # Handle update links dialog
22
+ def handle_update_links_message(to_update)
23
+ return unless @instance.selenium.element_visible?(update_links_message_xpath)
24
+
25
+ if to_update
26
+ @instance.selenium.click_on_locator(xpath_update_button)
27
+ else
28
+ @instance.selenium.click_on_locator(xpath_do_not_update_button)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -3,6 +3,7 @@
3
3
  require_relative 'management/loader_helper'
4
4
  require_relative 'management/manager_messages_checker'
5
5
  require_relative 'management/password_protected_helper'
6
+ require_relative 'management/update_links_helper'
6
7
  module OnlyofficeDocumentserverTestingFramework
7
8
  # Class for management main methods
8
9
  class Management
@@ -10,6 +11,7 @@ module OnlyofficeDocumentserverTestingFramework
10
11
  include ManagerMessagesChecker
11
12
  include LoaderHelper
12
13
  include PasswordProtectedHelper
14
+ include UpdateLinksHelper
13
15
 
14
16
  # @return [Integer] count of iframes to go into
15
17
  attr_accessor :xpath_iframe_count
@@ -17,6 +19,8 @@ module OnlyofficeDocumentserverTestingFramework
17
19
  attr_accessor :xpath_iframe
18
20
  # Set file password
19
21
  attr_accessor :password
22
+ # Set if should update links
23
+ attr_accessor :to_update
20
24
 
21
25
  def initialize(instance)
22
26
  @instance = instance
@@ -28,6 +32,7 @@ module OnlyofficeDocumentserverTestingFramework
28
32
  @alert_dialog_span_xpath = "#{@alert_dialog_xpath}/div/div/div/span"
29
33
  @xpath_window_modal = "//div[contains(@class, 'asc-window modal')]"
30
34
  @xpath_anonymous_user_name_input = '//div[@id="id-dlg-username-caption"]'
35
+ @to_update = false
31
36
  end
32
37
 
33
38
  # @return [Boolean] check if loader present
@@ -105,6 +110,7 @@ module OnlyofficeDocumentserverTestingFramework
105
110
  @instance.spreadsheet_editor.windows.csv_option.csv_options = options
106
111
 
107
112
  check_2_5_version_error
113
+ handle_update_links_message(to_update)
108
114
  handle_error
109
115
 
110
116
  # Close 'Select Encoding' dialog if present
@@ -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.12.0'
7
+ STRING = '2.14.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.12.0
4
+ version: 2.14.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-08-21 00:00:00.000000000 Z
12
+ date: 2023-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: onlyoffice_logger_helper
@@ -212,12 +212,14 @@ files:
212
212
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_6_2.list
213
213
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_1.list
214
214
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_2.list
215
+ - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_after_7_3.list
215
216
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/languages_list/doc_test_site_languages_before_6_2.list
216
217
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/integration_example_api.rb
217
218
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management.rb
218
219
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/loader_helper.rb
219
220
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/manager_messages_checker.rb
220
221
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/password_protected_helper.rb
222
+ - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/update_links_helper.rb
221
223
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/presentation_editor.rb
222
224
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/spreadsheet_editor.rb
223
225
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/spreadsheet_editor/spreadsheet_windows.rb
@@ -248,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
250
  - !ruby/object:Gem::Version
249
251
  version: '0'
250
252
  requirements: []
251
- rubygems_version: 3.3.20
253
+ rubygems_version: 3.4.7
252
254
  signing_key:
253
255
  specification_version: 4
254
256
  summary: ONLYOFFICE DocumentServer testing framework