onlyoffice_documentserver_testing_framework 2.2.1 → 2.4.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: 36dbc0fe0c71ba6c46646fe89ce746a204c0ed709fd8ae41c9e838a589891fe1
4
- data.tar.gz: 30ed604f753f3ba08cb439316d58889e75ab08aef0dcfc7e0aed61a9d455c5cd
3
+ metadata.gz: 0b525df2659aee80684bdc7a0e424670f5887cdf6f749573d728c9bfd51af594
4
+ data.tar.gz: b5bcae69c6dc94e756fb67a6a7d7c34856175d5504db657ead0432b7a1119c0d
5
5
  SHA512:
6
- metadata.gz: 53a1944e52d3eacdb27fa3fa6efbe7577e8cab07a6b848326ec41dae4f413caa9bdc5febbb323a419ac2ccc15b52bd1e7870c5e1b0f6e37aba3ab7fe1e7a20e9
7
- data.tar.gz: 87889c2899bb3889056b2fc509e527c51aa2b22a2098d3afd7083729cda2323f88d1bdcf1494899608a982df4169fb4a5879b71d6d3c311bb40d11363bd8f379
6
+ metadata.gz: '06901f36d44cf9fdc6417b29c4ef3fa09a07add337ea1c053a41f8b31cf9c872b00193785cf1735b2626479e448079aee5312d1317b78e49075e490ae853df87'
7
+ data.tar.gz: 5bbdd65c7d0ab130af39eb5d9f587c92d1b76f49cce0daa2b07205b079ac266a9ff60af853a6b41381659ee3fa83918cdd1b534b8302edc5bc2c88be853e5102
@@ -4,9 +4,11 @@ module OnlyofficeDocumentserverTestingFramework
4
4
  # Module for Reopen file related methods
5
5
  module FileReopenHelper
6
6
  # Perform reopen after autosave
7
- def reopen_after_autosave
7
+ # @param [Integer] timeout for wait for file to build
8
+ # @return [Boolean] result of opening
9
+ def reopen_after_autosave(timeout: 30)
8
10
  url = @instance.selenium.get_url
9
- leave_file_and_build_it
11
+ leave_file_and_build_it(timeout: timeout)
10
12
  @instance.webdriver.open(url)
11
13
  @instance.management.wait_for_operation_with_round_status_canvas
12
14
  end
@@ -14,13 +16,15 @@ module OnlyofficeDocumentserverTestingFramework
14
16
  private
15
17
 
16
18
  # Leave current opened file and wait until it's builder
19
+ # @param [Integer] timeout for wait for file to build
17
20
  # @return [nil]
18
- def leave_file_and_build_it
21
+ def leave_file_and_build_it(timeout: 30)
19
22
  file_name = @instance.management.document_name
20
23
  size_before = @instance.integration_example_api.file_data(file_name)['pureContentLength'].to_i
21
24
  @instance.go_to_base_url
22
- @instance.webdriver.wait_until do
23
- @instance.integration_example_api.file_data(file_name)['pureContentLength'].to_i != size_before
25
+ @instance.webdriver.wait_until(timeout, "File `#{file_name}` is built") do
26
+ file_data = @instance.integration_example_api.file_data(file_name)
27
+ !file_data.nil? && file_data['pureContentLength'].to_i != size_before
24
28
  end
25
29
  OnlyofficeLoggerHelper.log("File: `#{file_name}` was built after editing")
26
30
  end
@@ -6,9 +6,12 @@ require 'net/http'
6
6
  module OnlyofficeDocumentserverTestingFramework
7
7
  # Class for working with integration example api
8
8
  class IntegrationExampleApi
9
- def initialize(instance)
9
+ # @return [String] url of api endpoint
10
+ attr_reader :api_endpoint
11
+
12
+ def initialize(instance, api_endpoint: "#{instance.doc_server_base_url}/example")
10
13
  @instance = instance
11
- @api_endpoint = "#{@instance.doc_server_base_url}/example"
14
+ @api_endpoint = api_endpoint
12
15
  end
13
16
 
14
17
  # @return [Array<Hash>] list of file on example
@@ -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.2.1'
7
+ STRING = '2.4.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: 2.2.1
4
+ version: 2.4.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: 2022-02-13 00:00:00.000000000 Z
12
+ date: 2022-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: onlyoffice_logger_helper