playwright-ruby-client 0.6.5 → 0.6.6

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: 2c3d1d005addff01402de5290c11dbac3aaac9a49608b7d88b3f86dffac45090
4
- data.tar.gz: 3bde2b4a9f082fbdfb8b4577cfc6afadf19fe538e741b2bd4728ea942e3dd85b
3
+ metadata.gz: 9b548b6927a468b4a1209e9002cc7ca6f20bf0ad7ad4091510336ed610d338bb
4
+ data.tar.gz: d8f5e411d5ee99460e77d3d922608996cde6de1a2199ee0f6425c7e3a5eb9a7b
5
5
  SHA512:
6
- metadata.gz: 2a48cffd45f0ffd1a946c08d7ab920aac304812545271e7c250eae1bf0004d4c5be78688b04a513c5ec950b8e9d5c90c54f8e18c24e9e0856be8aa739c0e379b
7
- data.tar.gz: 9b75e4959d91687cc995453f9ae76fea2b62c4641f949b9c60a197c0d11ad70060405159180309bc874fa0945a40d97c07ff2aa8033eb0e60fc2d12fc5a781b1
6
+ metadata.gz: 645bd780e189153fabc25de3a58b490ae5fb919c8ed9b81f701c8bed0e910483be9cb2c901bda8f4619153bb18924240ae43841b197479665883567980ffd29c
7
+ data.tar.gz: 50af6ab226985f5bd7a7631fab3959c4215a6bae7d57d32c5cd9787f7d43a8ed2bbe599443a611a9eafd73e7e8dd74ace7783781a95d04357d5a9ff4c4e69313
@@ -4,4 +4,4 @@ sidebar_position: 10
4
4
 
5
5
  # WebSocket
6
6
 
7
- Not Implemented
7
+ The [WebSocket](./web_socket) class represents websocket connections in the page.
@@ -41,7 +41,7 @@ Capybara.default_max_wait_time = 15
41
41
 
42
42
  ### (Optional) Update default driver
43
43
 
44
- By default, Capybara driver is set to `:rack_test`, which works only with non-JS contents. If your Rails application has many JavaScript contents, it is recommended to change the default driver to `:playwrite`.
44
+ By default, Capybara driver is set to `:rack_test`, which works only with non-JS contents. If your Rails application has many JavaScript contents, it is recommended to change the default driver to `:playwright`.
45
45
 
46
46
  ```rb
47
47
  Capybara.default_driver = :playwright
@@ -38,7 +38,7 @@
38
38
  * fulfill
39
39
  * request
40
40
 
41
- ## ~~WebSocket~~
41
+ ## WebSocket
42
42
 
43
43
  * ~~closed?~~
44
44
  * ~~url~~
@@ -0,0 +1,4 @@
1
+ module Playwright
2
+ define_channel_owner :WebSocket do
3
+ end
4
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '0.6.5'
4
+ VERSION = '0.6.6'
5
5
  COMPATIBLE_PLAYWRIGHT_VERSION = '1.12.0'
6
6
  end
@@ -26,5 +26,27 @@ module Playwright
26
26
  def wait_for_event(event, predicate: nil, timeout: nil)
27
27
  raise NotImplementedError.new('wait_for_event is not implemented yet.')
28
28
  end
29
+
30
+ # -- inherited from EventEmitter --
31
+ # @nodoc
32
+ def once(event, callback)
33
+ event_emitter_proxy.once(event, callback)
34
+ end
35
+
36
+ # -- inherited from EventEmitter --
37
+ # @nodoc
38
+ def on(event, callback)
39
+ event_emitter_proxy.on(event, callback)
40
+ end
41
+
42
+ # -- inherited from EventEmitter --
43
+ # @nodoc
44
+ def off(event, callback)
45
+ event_emitter_proxy.off(event, callback)
46
+ end
47
+
48
+ private def event_emitter_proxy
49
+ @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
50
+ end
29
51
  end
30
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playwright-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-10 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -272,6 +272,7 @@ files:
272
272
  - lib/playwright/channel_owners/route.rb
273
273
  - lib/playwright/channel_owners/selectors.rb
274
274
  - lib/playwright/channel_owners/stream.rb
275
+ - lib/playwright/channel_owners/web_socket.rb
275
276
  - lib/playwright/channel_owners/worker.rb
276
277
  - lib/playwright/connection.rb
277
278
  - lib/playwright/download.rb