onlyoffice_documentserver_testing_framework 0.4.0 → 0.5.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: b2f0e384aaf5f05aaf133c491887d0fe18c3b4aff8764fb6a42b8ddabebd254e
4
- data.tar.gz: 56460aeb5843ec7a90253689900acd28872538de6fbcd1f2f7690aec17312fd2
3
+ metadata.gz: '022178399bd1d1d76f54e1ac969c4fc0772261bccf8164e3da2ea29e422fd78a'
4
+ data.tar.gz: 665670021caaa01e5f4da3b7c4640d2c587bd3ec998cd577d84f65cbdd5c8d9f
5
5
  SHA512:
6
- metadata.gz: 1572605a7eb60fed3af42504c9f417952ac40d903401227e95621e4832760044160e5d0cd1f6d9d888022347b46d038686f57d9c26d11c0cce594d9de1e734a3
7
- data.tar.gz: f18920028c97639400ecff72c1bb8d6e5fdda70871934e2940a9917f404a7f1de2cbcfa715a4a833ddb0e0b3edeef7bacef15aec1d05a660fc4e66ed0efa5a96
6
+ metadata.gz: 7ce4615d5561e6234d3e850b81b9733086f840929f6e5d42d000581a2aa001bfaf4ac4d38489085612991302329736b64540e087b04c1e2c662915ea36d0e6d8
7
+ data.tar.gz: 9c951e1ce667286a8362f4133ffd60da06255766a2a6b9d724ef497a84ab2f5218a0076b06ac183165f9c5ce2fa2b19bdee090180fa229d24b975594bf78e968
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'doc_editor_top_toolbar/top_toolbar_users'
4
+ require_relative 'doc_editor_top_toolbar/title_row'
4
5
 
5
6
  module OnlyofficeDocumentserverTestingFramework
6
7
  # Top Toolbar of Doc Editor
@@ -9,6 +10,11 @@ module OnlyofficeDocumentserverTestingFramework
9
10
  @instance = instance
10
11
  end
11
12
 
13
+ # @return [TitleRow] class for methods in title row
14
+ def title_row
15
+ @title_row ||= TitleRow.new(@instance)
16
+ end
17
+
12
18
  # @return [TopToolbarUsers] icon for top toolbar users
13
19
  def users
14
20
  @users ||= TopToolbarUsers.new(@instance)
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OnlyofficeDocumentserverTestingFramework
4
+ # Module for description of title row
5
+ # https://user-images.githubusercontent.com/668524/114713496-db20f900-9d39-11eb-8adc-8ed79a8e6c12.png
6
+ class TitleRow
7
+ include SeleniumWrapper
8
+
9
+ def initialize(instance)
10
+ @instance = instance
11
+ @xpath_document_name = '//*[(@id="rib-doc-name") or (@id="title-doc-name")]'
12
+ end
13
+
14
+ # @param [Boolean] with_extension be included
15
+ # @return [String] current document name
16
+ def document_name(with_extension: true)
17
+ doc_name = raw_document_name
18
+ doc_name.chop! if document_unsaved?(doc_name)
19
+ doc_name = File.basename(doc_name, '.*') unless with_extension
20
+ doc_name
21
+ end
22
+
23
+ # Check if current document unsaved
24
+ # @param [String] name of file
25
+ # @return [Boolean] result of check
26
+ def document_unsaved?(name = nil)
27
+ name[-1] == '*'
28
+ end
29
+
30
+ private
31
+
32
+ # @return [String] raw data from document name
33
+ def raw_document_name
34
+ text = selenium_functions(:get_text_by_js, @xpath_document_name)
35
+ OnlyofficeLoggerHelper.log("Get document name from header: #{text}")
36
+ text
37
+ end
38
+ end
39
+ 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.4.0'
7
+ STRING = '0.5.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: 0.4.0
4
+ version: 0.5.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: 2021-04-02 00:00:00.000000000 Z
12
+ date: 2021-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: onlyoffice_logger_helper
@@ -189,6 +189,7 @@ files:
189
189
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/common_editor/editor_windows.rb
190
190
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor.rb
191
191
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_top_toolbar.rb
192
+ - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_top_toolbar/title_row.rb
192
193
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_top_toolbar/top_toolbar_users.rb
193
194
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_windows.rb
194
195
  - lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_windows/txt_options.rb
@@ -225,14 +226,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
226
  requirements:
226
227
  - - ">="
227
228
  - !ruby/object:Gem::Version
228
- version: '2.4'
229
+ version: '2.5'
229
230
  required_rubygems_version: !ruby/object:Gem::Requirement
230
231
  requirements:
231
232
  - - ">="
232
233
  - !ruby/object:Gem::Version
233
234
  version: '0'
234
235
  requirements: []
235
- rubygems_version: 3.2.14
236
+ rubygems_version: 3.1.6
236
237
  signing_key:
237
238
  specification_version: 4
238
239
  summary: ONLYOFFICE DocumentServer testing framework