diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-08 21:13:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-08 21:13:15 +0300 |
commit | 3a563d7c1e15023f205d2a357e5d8a38a3b53ecc (patch) | |
tree | b7979f23104af9ed6d0ef077ce9964ba5d7ad65e /spec/components/pajamas | |
parent | dcc56fe601580b5d8f6c3da32550c6523f2baff3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/components/pajamas')
-rw-r--r-- | spec/components/pajamas/alert_component_spec.rb | 4 | ||||
-rw-r--r-- | spec/components/pajamas/avatar_component_spec.rb | 2 | ||||
-rw-r--r-- | spec/components/pajamas/banner_component_spec.rb | 10 | ||||
-rw-r--r-- | spec/components/pajamas/card_component_spec.rb | 12 | ||||
-rw-r--r-- | spec/components/pajamas/checkbox_component_spec.rb | 8 | ||||
-rw-r--r-- | spec/components/pajamas/checkbox_tag_component_spec.rb | 8 | ||||
-rw-r--r-- | spec/components/pajamas/radio_component_spec.rb | 8 |
7 files changed, 26 insertions, 26 deletions
diff --git a/spec/components/pajamas/alert_component_spec.rb b/spec/components/pajamas/alert_component_spec.rb index 4a90a9e0b88..8f02979357e 100644 --- a/spec/components/pajamas/alert_component_spec.rb +++ b/spec/components/pajamas/alert_component_spec.rb @@ -8,8 +8,8 @@ RSpec.describe Pajamas::AlertComponent, :aggregate_failures, type: :component do before do render_inline described_class.new do |c| - c.body { body } - c.actions { actions } + c.with_body { body } + c.with_actions { actions } end end diff --git a/spec/components/pajamas/avatar_component_spec.rb b/spec/components/pajamas/avatar_component_spec.rb index 3b4e4e49fc2..d59ef390fad 100644 --- a/spec/components/pajamas/avatar_component_spec.rb +++ b/spec/components/pajamas/avatar_component_spec.rb @@ -92,7 +92,7 @@ RSpec.describe Pajamas::AvatarComponent, type: :component do let(:record) { user } it "uses a gravatar" do - expect(rendered_component).to match /gravatar\.com/ + expect(rendered_content).to match /gravatar\.com/ end end end diff --git a/spec/components/pajamas/banner_component_spec.rb b/spec/components/pajamas/banner_component_spec.rb index 861b10c3f69..6b99b4c1d76 100644 --- a/spec/components/pajamas/banner_component_spec.rb +++ b/spec/components/pajamas/banner_component_spec.rb @@ -13,7 +13,7 @@ RSpec.describe Pajamas::BannerComponent, type: :component do describe 'basic usage' do before do render_inline(subject) do |c| - c.title { title } + c.with_title { title } content end end @@ -124,8 +124,8 @@ RSpec.describe Pajamas::BannerComponent, type: :component do context 'with illustration slot' do before do render_inline(subject) do |c| - c.title { title } - c.illustration { "<svg></svg>".html_safe } + c.with_title { title } + c.with_illustration { "<svg></svg>".html_safe } content end end @@ -147,8 +147,8 @@ RSpec.describe Pajamas::BannerComponent, type: :component do context 'with primary_action slot' do before do render_inline(subject) do |c| - c.title { title } - c.primary_action { "<a class='special' href='#'>Special</a>".html_safe } + c.with_title { title } + c.with_primary_action { "<a class='special' href='#'>Special</a>".html_safe } content end end diff --git a/spec/components/pajamas/card_component_spec.rb b/spec/components/pajamas/card_component_spec.rb index 38d23cfca9c..6328385754d 100644 --- a/spec/components/pajamas/card_component_spec.rb +++ b/spec/components/pajamas/card_component_spec.rb @@ -9,9 +9,9 @@ RSpec.describe Pajamas::CardComponent, :aggregate_failures, type: :component do context 'slots' do before do render_inline described_class.new do |c| - c.header { header } - c.body { body } - c.footer { footer } + c.with_header { header } + c.with_body { body } + c.with_footer { footer } end end @@ -51,9 +51,9 @@ RSpec.describe Pajamas::CardComponent, :aggregate_failures, type: :component do header_options: { class: '_header_class_', data: { testid: '_header_testid_' } }, body_options: { class: '_body_class_', data: { testid: '_body_testid_' } }, footer_options: { class: '_footer_class_', data: { testid: '_footer_testid_' } }) do |c| - c.header { header } - c.body { body } - c.footer { footer } + c.with_header { header } + c.with_body { body } + c.with_footer { footer } end end diff --git a/spec/components/pajamas/checkbox_component_spec.rb b/spec/components/pajamas/checkbox_component_spec.rb index 3d50509ef10..ea3ebe77811 100644 --- a/spec/components/pajamas/checkbox_component_spec.rb +++ b/spec/components/pajamas/checkbox_component_spec.rb @@ -76,7 +76,7 @@ RSpec.describe Pajamas::CheckboxComponent, :aggregate_failures, type: :component method: method ) ) do |c| - c.label { label } + c.with_label { label } end end end @@ -94,7 +94,7 @@ RSpec.describe Pajamas::CheckboxComponent, :aggregate_failures, type: :component label: label ) ) do |c| - c.help_text { help_text } + c.with_help_text { help_text } end end end @@ -112,8 +112,8 @@ RSpec.describe Pajamas::CheckboxComponent, :aggregate_failures, type: :component method: method ) ) do |c| - c.label { label } - c.help_text { help_text } + c.with_label { label } + c.with_help_text { help_text } end end end diff --git a/spec/components/pajamas/checkbox_tag_component_spec.rb b/spec/components/pajamas/checkbox_tag_component_spec.rb index bca7a6005d5..fb5f927469b 100644 --- a/spec/components/pajamas/checkbox_tag_component_spec.rb +++ b/spec/components/pajamas/checkbox_tag_component_spec.rb @@ -9,7 +9,7 @@ RSpec.describe Pajamas::CheckboxTagComponent, :aggregate_failures, type: :compon context 'with default options' do before do render_inline(described_class.new(name: name)) do |c| - c.label { label } + c.with_label { label } end end @@ -32,7 +32,7 @@ RSpec.describe Pajamas::CheckboxTagComponent, :aggregate_failures, type: :compon label_options: label_options ) ) do |c| - c.label { label } + c.with_label { label } end end @@ -48,8 +48,8 @@ RSpec.describe Pajamas::CheckboxTagComponent, :aggregate_failures, type: :compon context 'with `help_text` slot' do before do render_inline(described_class.new(name: name)) do |c| - c.label { label } - c.help_text { help_text } + c.with_label { label } + c.with_help_text { help_text } end end diff --git a/spec/components/pajamas/radio_component_spec.rb b/spec/components/pajamas/radio_component_spec.rb index 8df432746d0..5b12e7c2785 100644 --- a/spec/components/pajamas/radio_component_spec.rb +++ b/spec/components/pajamas/radio_component_spec.rb @@ -76,7 +76,7 @@ RSpec.describe Pajamas::RadioComponent, :aggregate_failures, type: :component do value: value ) ) do |c| - c.label { label } + c.with_label { label } end end end @@ -95,7 +95,7 @@ RSpec.describe Pajamas::RadioComponent, :aggregate_failures, type: :component do label: label ) ) do |c| - c.help_text { help_text } + c.with_help_text { help_text } end end end @@ -114,8 +114,8 @@ RSpec.describe Pajamas::RadioComponent, :aggregate_failures, type: :component do value: value ) ) do |c| - c.label { label } - c.help_text { help_text } + c.with_label { label } + c.with_help_text { help_text } end end end |