booth 0.0.6 → 0.0.8

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: 3ec33d897b1f9072ecfdc730fb0abed29e7e5aca9635d32f142d734bcd217d66
4
- data.tar.gz: '097f5698c175a5c4a40f256be260eda49f44d3c23386a9a56cf4d372b17b857e'
3
+ metadata.gz: c779268526f086dc6da451ea8cd36969525d8db694fa94a4d6e9c81a1b7b7e0b
4
+ data.tar.gz: 1382ff82844424fe05b32d57faea6a76975eb986cfb4eb35dad81ef8e50a2068
5
5
  SHA512:
6
- metadata.gz: addafe7edd3d6ccf8f2e97b1f02551f921b4f299325cf26e05b13b89d79bdf31568998dadbf2f0dd3ce20c83c2a90ef619ada45d9d23e56c6ae646f4d1fac89b
7
- data.tar.gz: cb55e6e0c2f5d8dc4528b90dab891e2928dc280ccb381f9cac5f54f208c4dc801f4465eaf18073c6ab0d667e14724ca370eb8bfde39aa6a2f055443767d5034b
6
+ metadata.gz: 744a4c6084155c5e6d36c1aaf0a389d373511988d31312befb5418f309bbc1a3a142efff2d6beedd90307a1ffa1b9ad6c59abb174b7c6ef5630f35fd6a79b606
7
+ data.tar.gz: f2fb21ae84bd0c98c4293a22dda5d7f4a5dd0484745b4e750be1fbeda029308791b0413ae2f16de506ce7986d757935d626da2be426038919a2502d30dcdb99e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # main
2
2
 
3
+ # 0.0.7
4
+
5
+ - Ensure authenticators#provide_icon_dark is always defined
6
+
3
7
  # 0.0.6
4
8
 
5
9
  - More robust test helper partial matching
@@ -27,10 +27,18 @@ module Booth
27
27
  end
28
28
 
29
29
  def provider_attributes
30
- return {} unless aaguid
30
+ unless aaguid
31
+ return { provider_name: nil,
32
+ provider_icon_dark: nil,
33
+ provider_icon_light: nil }
34
+ end
31
35
 
32
36
  provider = ::Booth::Core::Webauth::Provider.find(aaguid)
33
- return {} unless provider
37
+ unless provider
38
+ return { provider_name: nil,
39
+ provider_icon_dark: nil,
40
+ provider_icon_light: nil }
41
+ end
34
42
 
35
43
  { provider_name: provider.name,
36
44
  provider_icon_dark: provider.icon_dark,
@@ -33,6 +33,7 @@ module Booth
33
33
 
34
34
  log { "The expected view `#{partial}` was rendered." }
35
35
  self.class.asserted_partials << partial
36
+ take_screenshot
36
37
  return
37
38
  end
38
39
  end
@@ -46,6 +47,21 @@ module Booth
46
47
  def partial
47
48
  "#{namespace}/#{controller}/#{step}"
48
49
  end
50
+
51
+ private
52
+
53
+ # For manual visual inspection of all partial (e.g. CSS glitches).
54
+ # Because doing this manually is very hard (would have to play through every scenario).
55
+ def take_screenshot
56
+ screenshot_dir.mkpath
57
+ path = screenshot_dir.join(::ActiveStorage::Filename.new(partial).sanitized)
58
+ page.save_screenshot(path.to_s) # rubocop:disable Lint/Debugger
59
+ log { "Screenshot saved to `#{path}`" }
60
+ end
61
+
62
+ def screenshot_dir
63
+ ::Rails.root.join('tmp/booth')
64
+ end
49
65
  end
50
66
  end
51
67
  end
data/lib/booth/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Booth
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.8'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - halo