discourse/spec/system/admin_customize_themes_default_grid_spec.rb
Penar Musaraj 493f44018c
UX: Improve layout of install theme modal (#39808)
A couple of small improvements to the install theme flow: 

- when only the core themes are installed, show a third card in the
theme grid that triggers the install modal
- use a grid with screenshots for the theme install modal

<img width="2190" height="1605" alt="image"
src="https://github.com/user-attachments/assets/7d3068bd-512d-4394-b298-9b3e6df3069b"
/>
<img width="2666" height="2642" alt="image"
src="https://github.com/user-attachments/assets/66f84e5a-199e-477f-be2a-80d0ee9337aa"
/>
2026-05-06 17:43:20 -04:00

24 lines
790 B
Ruby

# frozen_string_literal: true
describe "Admin Customize Themes default grid" do
fab!(:admin)
fab!(:foundation_theme) { Theme.foundation_theme }
fab!(:horizon_theme) { Theme.horizon_theme }
let(:config_area) { PageObjects::Pages::AdminCustomizeThemesConfigArea.new }
before { sign_in(admin) }
it "shows an install themes CTA when only the default themes are installed" do
config_area.visit
expect(config_area).to have_themes(["Foundation", "Horizon", "Install more themes"])
expect(config_area).to have_theme_cards(count: 3)
expect(config_area).to have_install_more_themes_card
install_modal = config_area.click_install_more_themes
expect(install_modal).to be_open
expect(install_modal.popular_options.first).to have_text("Graceful")
end
end