You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
592 B
28 lines
592 B
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe Demo::Component, type: :view_component do
|
|
let(:options) { {} }
|
|
let(:component) { Demo::Component.new(**options) }
|
|
|
|
subject { page }
|
|
|
|
describe 'previews' do
|
|
it 'renders' do
|
|
render_preview(:default)
|
|
|
|
is_expected.to have_css 'div'
|
|
is_expected.to have_css 'p'
|
|
is_expected.to have_css 'button'
|
|
end
|
|
|
|
context 'with missing translations' do
|
|
it 'does not crash' do
|
|
render_preview(:with_missing_translation)
|
|
|
|
is_expected.to have_text 'Missing'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|