onlyoffice_documentserver_testing_framework 0.6.2 → 0.6.6

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: fb63f18a3eec041fefe76e812fa820d7f81c484f02f06c296ac761e0caa61a9a
4
- data.tar.gz: 467c6e4bf7781e94812a5d86d9f6730daeab106a9d8de91ebfa43e074964fe90
3
+ metadata.gz: 7fedf14ca83765c816e8b9b609c657ab74fb182e7f00e6032805eed8de5d264c
4
+ data.tar.gz: 2203414b85d3d8550534c2ac67bad47c3bd6b4bbaac29f7ff5bedfe046131beb
5
5
  SHA512:
6
- metadata.gz: 9b912745a36bdfc27309c3949de66a63eea69db2cbb7a7167a32981c14c4500c5e6c8d0e5ab4190fac3308cdd1fcc78f466da25e5b3b338a9a298dc38a3c7135
7
- data.tar.gz: 20531f3a13eb0dd2bb1e5a4923109d07ddcb4a84ff3d1b69f984838e0d2556f3c3b3808120333d968fb2fba62b1531f7016deeee1b2be9215fcf144941d8fa09
6
+ metadata.gz: d98594cc62ce1de5a5b80b424a79d41ca07e06716c86b3a5225ee5b7c321509417e10b23b2c359deca32c59994d8b73cb791cb4013626ff7f5f46574fcfad9ff
7
+ data.tar.gz: 2d6605bf01ebe42f0a2c2926d5944f79cb9e66f80adc304a7e69c60e48225898da61282505ad744783e751bcfca2f31d9e9a9acf1dfa08599dba35850f11646e
@@ -44,7 +44,7 @@ class DocTestSiteFileListEntry
44
44
 
45
45
  # @return [String] url on review mode
46
46
  def fetch_review_mode_url
47
- xpath_review = "#{@xpath_line}/td[4]/a"
47
+ xpath_review = "#{@xpath_line}/td[#{mode_indexes[:review_mode]}]/a"
48
48
  return nil unless @instance.selenium.element_present?(xpath_review)
49
49
 
50
50
  url = @instance.selenium.get_attribute(xpath_review, 'href')
@@ -54,7 +54,7 @@ class DocTestSiteFileListEntry
54
54
 
55
55
  # @return [String] url on review mode
56
56
  def fetch_comment_mode_url
57
- xpath_comment = "#{@xpath_line}/td[5]/a"
57
+ xpath_comment = "#{@xpath_line}/td[#{mode_indexes[:comment_mode]}]/a"
58
58
  return nil unless @instance.selenium.element_present?(xpath_comment)
59
59
 
60
60
  url = @instance.selenium.get_attribute(xpath_comment, 'href')
@@ -64,7 +64,7 @@ class DocTestSiteFileListEntry
64
64
 
65
65
  # @return [String] url on fill forms mode
66
66
  def fetch_fill_forms_mode_url
67
- xpath_comment = "#{@xpath_line}/td[6]/a"
67
+ xpath_comment = "#{@xpath_line}/td[#{mode_indexes[:fill_forms]}]/a"
68
68
  return nil unless @instance.selenium.element_present?(xpath_comment)
69
69
 
70
70
  url = @instance.selenium.get_attribute(xpath_comment, 'href')
@@ -74,7 +74,7 @@ class DocTestSiteFileListEntry
74
74
 
75
75
  # @return [String] url on fill forms mode
76
76
  def fetch_only_fill_forms_mode_url
77
- link_xpath = "#{@xpath_line}/td[7]/a"
77
+ link_xpath = "#{@xpath_line}/td[#{mode_indexes[:only_fill_forms]}]/a"
78
78
  return nil unless @instance.selenium.element_present?(link_xpath)
79
79
 
80
80
  url = @instance.selenium.get_attribute(link_xpath, 'href')
@@ -84,7 +84,7 @@ class DocTestSiteFileListEntry
84
84
 
85
85
  # @return [String] url on viewer mode
86
86
  def fetch_view_mode_url
87
- xpath_comments = "#{@xpath_line}/td[8]/a"
87
+ xpath_comments = "#{@xpath_line}/td[#{mode_indexes[:view_mode]}]/a"
88
88
  return nil unless @instance.selenium.element_present?(xpath_comments)
89
89
 
90
90
  url = @instance.selenium.get_attribute(xpath_comments, 'href')
@@ -94,8 +94,23 @@ class DocTestSiteFileListEntry
94
94
 
95
95
  # @return [String] url on embedded file
96
96
  def fetch_embedded_url
97
- url = @instance.selenium.get_attribute("#{@xpath_line}/td[10]/a", 'href')
97
+ url = @instance.selenium.get_attribute("#{@xpath_line}/td[#{mode_indexes[:embedded]}]/a", 'href')
98
98
  OnlyofficeLoggerHelper.log("Got embedded #{@xpath_line} url: #{url}")
99
99
  url
100
100
  end
101
+
102
+ private
103
+
104
+ # Indexes of different modes
105
+ # @return [Hash] name with index
106
+ def mode_indexes
107
+ {
108
+ comment_mode: 4,
109
+ review_mode: 5,
110
+ fill_forms: 6,
111
+ only_fill_forms: 7,
112
+ view_mode: 8,
113
+ embedded: 10
114
+ }
115
+ end
101
116
  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.6.2'
7
+ STRING = '0.6.6'
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.6.2
4
+ version: 0.6.6
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-08-27 00:00:00.000000000 Z
12
+ date: 2021-10-23 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.2.26
236
+ rubygems_version: 3.2.29
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: ONLYOFFICE DocumentServer testing framework