playwright-runner 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/README.md +1 -1
- data/lib/playwrightrunner/version.rb +1 -1
- data/lib/playwrightrunner.rb +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96731975daab3c59ab001fb663aadfdd3cdc79b79af624f24823fd886624908e
|
4
|
+
data.tar.gz: 61b9e76b66eab8488d5569988726cee661c0fc9e2ad4549fe8fe3faf49c0c688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 470deb264f7e15c05ced9c9021e4e0efad66f5b2e36f797f75a69a21f7fc5ff938899e1499aa4bf1709f61ef51ae442835d8d230ec4818d230596021e2e311c2
|
7
|
+
data.tar.gz: a75b6871098d4954b84579a9059141e92daea649cfaf30ee68fd6bfe47fd1f2707fa583a3ec7162a2fd7b80e52af94afebc980e8d8aa3b0f2efc200c44030514
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
data/lib/playwrightrunner.rb
CHANGED
@@ -24,9 +24,20 @@ module PlaywrightRunner
|
|
24
24
|
Dir.glob(File.join(src, '*.html')).each do |entry|
|
25
25
|
id = File.basename(entry).sub('.html', '')
|
26
26
|
page.goto("file:///#{File.absolute_path(entry)}")
|
27
|
-
page.locator('svg').
|
27
|
+
page.locator('svg').wait_for(state: 'visible')
|
28
|
+
sleep(1)
|
29
|
+
1.upto(4) do
|
30
|
+
bounds = page.locator('svg').bounding_box
|
31
|
+
|
32
|
+
unless bounds
|
33
|
+
sleep(1)
|
34
|
+
next
|
35
|
+
end
|
36
|
+
|
37
|
+
page.pdf(path: File.join(dest, '__PLAYWRIGHT_TMP__.pdf'))
|
38
|
+
break
|
39
|
+
end
|
28
40
|
|
29
|
-
page.pdf(path: File.join(dest, '__PLAYWRIGHT_TMP__.pdf'))
|
30
41
|
Open3.capture2e(config[:pdfcrop_path],
|
31
42
|
File.join(dest, '__PLAYWRIGHT_TMP__.pdf'),
|
32
43
|
File.join(dest, "#{id}.pdf"))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playwright-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenshi Muto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: playwright-ruby-client
|