onlyoffice_documentserver_testing_framework 0.5.0 → 0.6.1

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: '022178399bd1d1d76f54e1ac969c4fc0772261bccf8164e3da2ea29e422fd78a'
4
- data.tar.gz: 665670021caaa01e5f4da3b7c4640d2c587bd3ec998cd577d84f65cbdd5c8d9f
3
+ metadata.gz: 6f573f10ee5036a1d265e3c051459152c43200cc0bc643ad9aae0c7162db64cf
4
+ data.tar.gz: cc40c35e2ee03a1c426b705085f953b10e134f11ed587a0ce816b1de2197d893
5
5
  SHA512:
6
- metadata.gz: 7ce4615d5561e6234d3e850b81b9733086f840929f6e5d42d000581a2aa001bfaf4ac4d38489085612991302329736b64540e087b04c1e2c662915ea36d0e6d8
7
- data.tar.gz: 9c951e1ce667286a8362f4133ffd60da06255766a2a6b9d724ef497a84ab2f5218a0076b06ac183165f9c5ce2fa2b19bdee090180fa229d24b975594bf78e968
6
+ metadata.gz: 528d56b800931558849f0144d4bb76107ce9e147b0cd86627d3ad2298f8c3a5b48fdf32542945ef7041ae61029c492db0664e3539e77cf08c225e9d32bb72570
7
+ data.tar.gz: e3c003b6d70aa8fe17f8c7b18360a75771a9a661d0e12afb4b0bbd48929dcea2e9d4c851438a164938efea10f2a0283bc2fa8d6d922f0844936bac8f3a803a70
@@ -209,7 +209,7 @@ class DocTestSiteFunctions
209
209
 
210
210
  # @return [Nothing]
211
211
  def go_to_healthcheck
212
- @instance.webdriver.open("#{@instance.user_data.portal}/healthcheck")
212
+ @instance.webdriver.open("#{@instance.user_data.portal}healthcheck")
213
213
  end
214
214
 
215
215
  # @return [HealthcheckPage] page of healthcheck
@@ -235,8 +235,8 @@ class DocTestSiteFunctions
235
235
  'doc_test_site_languages_before_6_2.list'
236
236
  end
237
237
  File.readlines("#{File.expand_path('..', __dir__)}"\
238
- '/test_instance_docs/doc_test_site_functions/'\
239
- "#{file}")
238
+ '/test_instance_docs/doc_test_site_functions/'\
239
+ "#{file}")
240
240
  .map(&:strip)
241
241
  end
242
242
  end
@@ -17,9 +17,11 @@ module OnlyofficeDocumentserverTestingFramework
17
17
  @xpath_iframe_count = 1
18
18
  # Don't mixup iframe with help
19
19
  @xpath_iframe = '//iframe[not(contains(@src, "/help/")) and '\
20
- 'not(contains(@id, "fileFrame"))]'
20
+ 'not(contains(@id, "fileFrame"))]'
21
21
  @alert_dialog_xpath = '//div[@role="alertdialog"]'
22
22
  @alert_dialog_span_xpath = "#{@alert_dialog_xpath}/div/div/div/span"
23
+ @xpath_window_modal = "//div[contains(@class, 'asc-window modal')]"
24
+ @xpath_anonymous_user_name_input = '//div[@id="id-dlg-username-caption"]'
23
25
  end
24
26
 
25
27
  # @return [Boolean] check if loader present
@@ -38,7 +40,7 @@ module OnlyofficeDocumentserverTestingFramework
38
40
  loader5 = @instance.selenium.element_visible?('//*[@id="loading-mask"]')
39
41
  loader6 = @instance.selenium.element_visible?('//*[@class="modals-mask"]')
40
42
  loader7 = @instance.selenium.element_visible?('//*[@class="asc-loadmask"]')
41
- loader8 = @instance.selenium.element_visible?(@xpath_window_modal)
43
+ loader8 = loading_blocking_modal_dialog?
42
44
  mobile_loader = wait_for_mobile_loading if main_frame_mobile_element_visible?
43
45
  @instance.selenium.select_top_frame
44
46
  loading = loader1 || loader2 || loader3 ||
@@ -57,6 +59,7 @@ module OnlyofficeDocumentserverTestingFramework
57
59
  def wait_for_mobile_loading
58
60
  @instance.selenium.element_visible?('//*[contains(@class,"modal-preloader")]') ||
59
61
  @instance.selenium.element_visible?('//*[contains(@class,"loader-page")]') ||
62
+ @instance.selenium.element_visible?('//div[contains(@class, "dialog-preloader")]') ||
60
63
  @instance.selenium.get_element('//*[contains(@class,"iScrollVerticalScrollbar")]').nil?
61
64
  end
62
65
 
@@ -77,6 +80,8 @@ module OnlyofficeDocumentserverTestingFramework
77
80
 
78
81
  # Wait for operation with round status in canvas editor
79
82
  # @param [Integer] timeout_in_seconds count of seconds to wait
83
+ # @param [Hash] options additional options
84
+ # @option options [Integer] :additional_wait additional after file open. 0 by default
80
85
  def wait_for_operation_with_round_status_canvas(timeout_in_seconds = 300, options = {})
81
86
  result = true
82
87
  OnlyofficeLoggerHelper.log('Start waiting for Round Status')
@@ -88,8 +93,8 @@ module OnlyofficeDocumentserverTestingFramework
88
93
  sleep(1)
89
94
  current_wait_time += 1
90
95
  OnlyofficeLoggerHelper.log('Waiting for Round Status for '\
91
- "#{current_wait_time} of "\
92
- "#{timeout_in_seconds} timeout")
96
+ "#{current_wait_time} of "\
97
+ "#{timeout_in_seconds} timeout")
93
98
  @instance.doc_editor.windows.txt_options.txt_options = 'Unicode (UTF-8)'
94
99
  @instance.spreadsheet_editor.windows.csv_option.csv_options = options
95
100
 
@@ -130,6 +135,7 @@ module OnlyofficeDocumentserverTestingFramework
130
135
  @instance.selenium.execute_javascript('window.onbeforeunload = null') # OFF POPUP WINDOW
131
136
  @instance.selenium.select_top_frame
132
137
  add_error_handler
138
+ sleep(options.fetch(:additional_wait, 0))
133
139
  result
134
140
  end
135
141
 
@@ -202,5 +208,13 @@ module OnlyofficeDocumentserverTestingFramework
202
208
  @instance.selenium.webdriver_error "Unknown editor type for url: #{url}"
203
209
  end
204
210
  end
211
+
212
+ # @return [True, False] is there is loading blocking modals dialog
213
+ def loading_blocking_modal_dialog?
214
+ return false unless @instance.selenium.element_visible?(@xpath_window_modal)
215
+ return false if @instance.selenium.element_visible?(@xpath_anonymous_user_name_input)
216
+
217
+ true
218
+ end
205
219
  end
206
220
  end
@@ -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 = '0.5.0'
7
+ STRING = '0.6.1'
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: 0.5.0
4
+ version: 0.6.1
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: 2021-04-15 00:00:00.000000000 Z
12
+ date: 2021-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: onlyoffice_logger_helper
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
- rubygems_version: 3.1.6
236
+ rubygems_version: 3.2.22
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: ONLYOFFICE DocumentServer testing framework