onlyoffice_documentserver_testing_framework 2.20.0 → 2.21.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59602e89c438205f7b009c07de9d51ac1528b5a169efbf88b5c8f9af2f375e43
4
- data.tar.gz: c95496c5f4b5bd7e021843a5a63e88ba7285c888761d382e675a6a95800f8f71
3
+ metadata.gz: 9fa1d76b39876830d6714743c55aa9349796885954ab6920a9280a84e719320e
4
+ data.tar.gz: 73e2bd4f63d6a8cc847726e81b4971f6511600f4ec1f969de3f75cab78222663
5
5
  SHA512:
6
- metadata.gz: 07eac94fddd853136ed51a8e515d263d98f3030b0393fa5eb41fc7709cbb6fb715224aaf595717c839033abd295011120303879b2a19d1249df8954bc7d8bf88
7
- data.tar.gz: 8c914dc1112f7eb8bb73ec18d99d2d53bb36cd61797c2be17480030dc206e45d0701fe73f973f35fc94f7eb4880dac6f514979e0354bbecc3797bc92d5f2d57f
6
+ metadata.gz: 513d827af5ce0552bbd8c01317191da5d010b86654e736739263cd0d270137e2f25d0805ac1b696645ef217332888fe9f0ac20f06b3be3b61e48acd604695f06
7
+ data.tar.gz: 3aa765988b5c6eaf8bb3bec7ee7df07e3e04f5174a808b4bb561926c96e550e633c4f86479ae9cd30653c4e216123af2e7ef3cec1be322d60847123b4633cf02
@@ -45,6 +45,8 @@ class DocTestSiteFileListEntry
45
45
 
46
46
  # @return [String] url on review mode
47
47
  def fetch_review_mode_url
48
+ return nil if editors_modes_empty?
49
+
48
50
  xpath_review = "#{@xpath_line}/td[#{@edit_modes_indexes[:review_mode]}]/a"
49
51
  return nil unless @instance.selenium.element_present?(xpath_review)
50
52
 
@@ -55,6 +57,8 @@ class DocTestSiteFileListEntry
55
57
 
56
58
  # @return [String] url on review mode
57
59
  def fetch_comment_mode_url
60
+ return nil if editors_modes_empty?
61
+
58
62
  xpath_comment = "#{@xpath_line}/td[#{@edit_modes_indexes[:comment_mode]}]/a"
59
63
  return nil unless @instance.selenium.element_present?(xpath_comment)
60
64
 
@@ -65,6 +69,8 @@ class DocTestSiteFileListEntry
65
69
 
66
70
  # @return [String] url on fill forms mode
67
71
  def fetch_fill_forms_mode_url
72
+ return nil if editors_modes_empty?
73
+
68
74
  xpath_comment = "#{@xpath_line}/td[#{@edit_modes_indexes[:fill_forms]}]/a"
69
75
  return nil unless @instance.selenium.element_present?(xpath_comment)
70
76
 
@@ -75,6 +81,8 @@ class DocTestSiteFileListEntry
75
81
 
76
82
  # @return [String] url on fill forms mode
77
83
  def fetch_only_fill_forms_mode_url
84
+ return nil if editors_modes_empty?
85
+
78
86
  link_xpath = "#{@xpath_line}/td[#{@edit_modes_indexes[:only_fill_forms]}]/a"
79
87
  return nil unless @instance.selenium.element_present?(link_xpath)
80
88
 
@@ -102,4 +110,11 @@ class DocTestSiteFileListEntry
102
110
  OnlyofficeLoggerHelper.log("Got embedded #{@xpath_line} url: #{url}")
103
111
  url
104
112
  end
113
+
114
+ # @return [True, False] if editors modes are empty
115
+ def editors_modes_empty?
116
+ empty = @instance.selenium.get_attribute("#{@xpath_line}/td[2]", 'class').include?('contentCellsEmpty')
117
+ OnlyofficeLoggerHelper.log("Editors modes empty?: #{empty}")
118
+ empty
119
+ end
105
120
  end
@@ -107,12 +107,20 @@ class DocTestSiteFunctions
107
107
  @instance.selenium.webdriver_error('File not finished for conversion for 100 seconds')
108
108
  end
109
109
 
110
+ # Checks if Loading editor scripts step of file upload is present
111
+ # @return [Nothing]
112
+ def final_loading_step_xpath
113
+ return @xpath_editor_scripts_step if @instance.selenium.element_visible?(@xpath_editor_scripts_step)
114
+
115
+ @xpath_conversion_step
116
+ end
117
+
110
118
  # Waits until scripts loads
111
119
  # @return [Nothing]
112
120
  def wait_loading_scripts
113
121
  100.times do |current_time|
114
122
  OnlyofficeLoggerHelper.log("Waiting for editors scripts load for #{current_time} seconds")
115
- return true if @instance.selenium.get_attribute(@xpath_editor_scripts_step, 'class').include?('done')
123
+ return true if @instance.selenium.get_attribute(final_loading_step_xpath, 'class').include?('done')
116
124
 
117
125
  sleep 1
118
126
  check_error
@@ -264,9 +272,9 @@ class DocTestSiteFunctions
264
272
  # @return [Hash] name with index
265
273
  def default_modes_indexes
266
274
  {
267
- comment_mode: 2,
268
- review_mode: 4,
269
- fill_forms: 6,
275
+ comment_mode: 4,
276
+ review_mode: 5,
277
+ fill_forms: 7,
270
278
  view_mode: 8,
271
279
  embedded: 10
272
280
  }
@@ -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.20.0'
7
+ STRING = '2.21.0'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlyoffice_documentserver_testing_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ONLYOFFICE
8
8
  - Pavel Lobashov
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-06 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: onlyoffice_logger_helper
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubygems_version: 3.6.3
125
+ rubygems_version: 3.6.9
126
126
  specification_version: 4
127
127
  summary: ONLYOFFICE DocumentServer testing framework
128
128
  test_files: []