Use a switch to enable/disable homepage features

So it's consistent with the way we enable/disable other features.
This commit is contained in:
Javi Martín
2021-08-28 03:05:44 +02:00
parent fabe97e506
commit 7b8e892f9c
9 changed files with 26 additions and 30 deletions

View File

@@ -11,10 +11,18 @@ describe Admin::Settings::FeaturedSettingsFormComponent do
expect(page).to have_css "button[aria-labelledby='title_setting_#{setting.id}']"
end
it "includes an aria-describedby attribute" do
render_inline component
describe "aria-describedby attribute" do
it "is rendered by default" do
render_inline component
expect(page).to have_css "button[aria-describedby='description_setting_#{setting.id}']"
expect(page).to have_css "button[aria-describedby='description_setting_#{setting.id}']"
end
it "is not rendered when the describedby option is false" do
render_inline Admin::Settings::FeaturedSettingsFormComponent.new(setting, describedby: false)
expect(page).not_to have_css "[aria-describedby]"
end
end
describe "aria-pressed attribute" do