booth 0.1.2 → 0.1.4
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/booth/testing/support/assert_partial.rb +9 -1
- data/lib/booth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34400e194c390ebc499e5baee0bbb6962922f72e7560aafd9a17a392b924f1eb
|
|
4
|
+
data.tar.gz: ceba7e10908f6665458196811773db8cba7fd6d33569292871ad7fd2633c824b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49b06f0eaf22fdb2b6d5d3982d73c67e370703cc4855e159cc9d03ced9d322bd5966806e88202f4806aadac225e58327aa1864b6a0eb32e7fa5038ab3b7d50d5
|
|
7
|
+
data.tar.gz: 591f62bdfd36c7856b7e23c05671b898bcae5437fb914d0c739377865ba6845ec1aa9c6a63bab905dc107927522a16775c678ea505b61d6ade2bb5060cce8fff
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# main
|
|
2
2
|
|
|
3
|
+
# 0.1.4
|
|
4
|
+
|
|
5
|
+
- `AssertPartial` screenshots now include the current domain in the filename
|
|
6
|
+
|
|
7
|
+
# 0.1.3
|
|
8
|
+
|
|
9
|
+
- Fix `AssertPartial` screenshot path missing a `.png` extension (breaks with playwright-ruby-client >= 1.62.0, which validates the mime type)
|
|
10
|
+
|
|
3
11
|
# 0.1.2
|
|
4
12
|
|
|
5
13
|
- Idempodent impersonation (now respecting unique DB constraints)
|
|
@@ -54,11 +54,19 @@ module Booth
|
|
|
54
54
|
# Because doing this manually is very hard (would have to play through every scenario).
|
|
55
55
|
def take_screenshot
|
|
56
56
|
screenshot_dir.mkpath
|
|
57
|
-
path = screenshot_dir.join(
|
|
57
|
+
path = screenshot_dir.join("#{screenshot_filename}.png")
|
|
58
58
|
page.save_screenshot(path.to_s) # rubocop:disable Lint/Debugger
|
|
59
59
|
log { "Screenshot saved to `#{path}`" }
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
def screenshot_filename
|
|
63
|
+
[namespace, domain, controller, step].compact.join('_').gsub(/[^a-zA-Z0-9._-]/, '_')
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def domain
|
|
67
|
+
::URI.parse(Capybara.app_host).host if Capybara.app_host
|
|
68
|
+
end
|
|
69
|
+
|
|
62
70
|
def screenshot_dir
|
|
63
71
|
::Rails.root.join('tmp/booth')
|
|
64
72
|
end
|
data/lib/booth/version.rb
CHANGED