playwright-ruby-client 1.15.beta3 → 1.15.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '028909fb1fc1321105a1172d46c02ccafbb071e5e630b5c5b616a9e76a695a91'
4
- data.tar.gz: cadf29fb85714aac062c481b0c677709dc620141af57b0641d065a379210e93b
3
+ metadata.gz: 713f6bab2d64c7b9315e680ea5c94946ed2108763534959d586ca841a249a5a3
4
+ data.tar.gz: 2cd01a6413698de9d0c414153846282516ebabc5e386e8ece152523277e3da2f
5
5
  SHA512:
6
- metadata.gz: efe23218fd7aa8a5eee431af6fac5046420b222f67e196cd46cf44127bafe6a4db88f3ae56f71b1fe74d874fd385f1600009335e59be9c2a5bbca0ad4eacd13a
7
- data.tar.gz: d0c78be5d3f3c662cd4b68bbbbf5624ce9febdf4be39740812f26573f14e68c5111fef7777b7ae2a5839c1723d3d20b91d680a2d691c791afcec01efe3630de2
6
+ metadata.gz: d8dc6824ec2d34c1659f242e42b221c6ed8278b85cd931912c1610ee82a1cf89a71771a21949c30eeea436183c05cdafa745e0c9decc7d2e676406f4c5c24397
7
+ data.tar.gz: f138cd13891e77502ee9c7643720b120216be1757cb089c5e1b4e2c42e43ac037f23fb2341023cc1109a94530787b712cb57853209b61862ad6a426a69308554
@@ -0,0 +1,10 @@
1
+ ---
2
+ sidebar_position: 10
3
+ ---
4
+
5
+ # FetchRequest
6
+
7
+ This API is used for Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare
8
+ environment or the service to your e2e test. When used on [Page](./page) or a [BrowserContext](./browser_context), this API will automatically use
9
+ the cookies from the corresponding [BrowserContext](./browser_context). This means that if you log in using this API, your e2e test will be
10
+ logged in and vice versa.
@@ -48,6 +48,13 @@
48
48
  * fulfill
49
49
  * request
50
50
 
51
+ ## FetchRequest
52
+
53
+ * ~~dispose~~
54
+ * ~~fetch~~
55
+ * ~~get~~
56
+ * ~~post~~
57
+
51
58
  ## WebSocket
52
59
 
53
60
  * closed?
@@ -0,0 +1,4 @@
1
+ module Playwright
2
+ define_channel_owner :FetchRequest do
3
+ end
4
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.15.beta3'
4
+ VERSION = '1.15.0'
5
5
  COMPATIBLE_PLAYWRIGHT_VERSION = '1.15.0'
6
6
  end
@@ -0,0 +1,74 @@
1
+ module Playwright
2
+ # This API is used for Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare
3
+ # environment or the service to your e2e test. When used on `Page` or a `BrowserContext`, this API will automatically use
4
+ # the cookies from the corresponding `BrowserContext`. This means that if you log in using this API, your e2e test will be
5
+ # logged in and vice versa.
6
+ class FetchRequest < PlaywrightApi
7
+
8
+ # All responses received through [`method: FetchRequest.fetch`], [`method: FetchRequest.get`],
9
+ # [`method: FetchRequest.post`] and other methods are stored in the memory, so that you can later call
10
+ # [`method: FetchResponse.body`]. This method discards all stored responses, and makes [`method: FetchResponse.body`]
11
+ # throw "Response disposed" error.
12
+ def dispose
13
+ raise NotImplementedError.new('dispose is not implemented yet.')
14
+ end
15
+
16
+ # Sends HTTP(S) fetch and returns its response. The method will populate fetch cookies from the context and update context
17
+ # cookies from the response. The method will automatically follow redirects.
18
+ def fetch(
19
+ urlOrRequest,
20
+ data: nil,
21
+ failOnStatusCode: nil,
22
+ headers: nil,
23
+ method: nil,
24
+ params: nil,
25
+ timeout: nil)
26
+ raise NotImplementedError.new('fetch is not implemented yet.')
27
+ end
28
+
29
+ # Sends HTTP(S) GET request and returns its response. The method will populate fetch cookies from the context and update
30
+ # context cookies from the response. The method will automatically follow redirects.
31
+ def get(
32
+ urlOrRequest,
33
+ failOnStatusCode: nil,
34
+ headers: nil,
35
+ params: nil,
36
+ timeout: nil)
37
+ raise NotImplementedError.new('get is not implemented yet.')
38
+ end
39
+
40
+ # Sends HTTP(S) fetch and returns its response. The method will populate fetch cookies from the context and update context
41
+ # cookies from the response. The method will automatically follow redirects.
42
+ def post(
43
+ urlOrRequest,
44
+ data: nil,
45
+ failOnStatusCode: nil,
46
+ headers: nil,
47
+ params: nil,
48
+ timeout: nil)
49
+ raise NotImplementedError.new('post is not implemented yet.')
50
+ end
51
+
52
+ # -- inherited from EventEmitter --
53
+ # @nodoc
54
+ def off(event, callback)
55
+ event_emitter_proxy.off(event, callback)
56
+ end
57
+
58
+ # -- inherited from EventEmitter --
59
+ # @nodoc
60
+ def once(event, callback)
61
+ event_emitter_proxy.once(event, callback)
62
+ end
63
+
64
+ # -- inherited from EventEmitter --
65
+ # @nodoc
66
+ def on(event, callback)
67
+ event_emitter_proxy.on(event, callback)
68
+ end
69
+
70
+ private def event_emitter_proxy
71
+ @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
72
+ end
73
+ end
74
+ 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: 1.15.beta3
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -224,6 +224,7 @@ files:
224
224
  - documentation/docs/api/experimental/android_input.md
225
225
  - documentation/docs/api/experimental/android_socket.md
226
226
  - documentation/docs/api/experimental/android_web_view.md
227
+ - documentation/docs/api/fetch_request.md
227
228
  - documentation/docs/api/file_chooser.md
228
229
  - documentation/docs/api/frame.md
229
230
  - documentation/docs/api/js_handle.md
@@ -287,6 +288,7 @@ files:
287
288
  - lib/playwright/channel_owners/dialog.rb
288
289
  - lib/playwright/channel_owners/electron.rb
289
290
  - lib/playwright/channel_owners/element_handle.rb
291
+ - lib/playwright/channel_owners/fetch_request.rb
290
292
  - lib/playwright/channel_owners/frame.rb
291
293
  - lib/playwright/channel_owners/js_handle.rb
292
294
  - lib/playwright/channel_owners/page.rb
@@ -343,6 +345,7 @@ files:
343
345
  - lib/playwright_api/dialog.rb
344
346
  - lib/playwright_api/download.rb
345
347
  - lib/playwright_api/element_handle.rb
348
+ - lib/playwright_api/fetch_request.rb
346
349
  - lib/playwright_api/file_chooser.rb
347
350
  - lib/playwright_api/frame.rb
348
351
  - lib/playwright_api/js_handle.rb
@@ -375,9 +378,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
375
378
  version: '2.4'
376
379
  required_rubygems_version: !ruby/object:Gem::Requirement
377
380
  requirements:
378
- - - ">"
381
+ - - ">="
379
382
  - !ruby/object:Gem::Version
380
- version: 1.3.1
383
+ version: '0'
381
384
  requirements: []
382
385
  rubygems_version: 3.2.22
383
386
  signing_key: