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 +4 -4
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions/doc_test_file_list/doc_test_site_file_list_entry.rb +15 -0
- data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions.rb +12 -4
- data/lib/onlyoffice_documentserver_testing_framework/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fa1d76b39876830d6714743c55aa9349796885954ab6920a9280a84e719320e
|
4
|
+
data.tar.gz: 73e2bd4f63d6a8cc847726e81b4971f6511600f4ec1f969de3f75cab78222663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_test_site_functions.rb
CHANGED
@@ -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(
|
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:
|
268
|
-
review_mode:
|
269
|
-
fill_forms:
|
275
|
+
comment_mode: 4,
|
276
|
+
review_mode: 5,
|
277
|
+
fill_forms: 7,
|
270
278
|
view_mode: 8,
|
271
279
|
embedded: 10
|
272
280
|
}
|
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.
|
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:
|
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.
|
125
|
+
rubygems_version: 3.6.9
|
126
126
|
specification_version: 4
|
127
127
|
summary: ONLYOFFICE DocumentServer testing framework
|
128
128
|
test_files: []
|