Skip to content

Commit 49b6423

Browse files
DEV: Drop raw-hbs specs (#71)
In preparation for discourse/discourse#32081
1 parent d052ff2 commit 49b6423

File tree

1 file changed

+16
-40
lines changed

1 file changed

+16
-40
lines changed

spec/system/topic_thumbnails_spec.rb

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,32 @@
77

88
before { sign_in user }
99

10-
RSpec.shared_examples "topic thumbnails" do
11-
{
12-
"grid" => "grid",
13-
"minimal-grid" => "minimal",
14-
"list" => "list",
15-
"blog-style" => "blog-style-grid",
16-
}.each do |style, class_name|
17-
it "renders topic thumbnails in #{style} style" do
18-
theme.update_setting(:default_thumbnail_mode, style)
19-
theme.save!
20-
21-
visit "/latest"
22-
23-
expect(page).to have_css(".topic-list.topic-thumbnails-#{class_name}")
24-
expect(page).to have_css(".topic-list-thumbnail", count: 5)
25-
end
26-
end
27-
28-
it "renders topic thumbnails in masonry style" do
29-
theme.update_setting(:default_thumbnail_mode, "masonry")
10+
{
11+
"grid" => "grid",
12+
"minimal-grid" => "minimal",
13+
"list" => "list",
14+
"blog-style" => "blog-style-grid",
15+
}.each do |style, class_name|
16+
it "renders topic thumbnails in #{style} style" do
17+
theme.update_setting(:default_thumbnail_mode, style)
3018
theme.save!
3119

3220
visit "/latest"
3321

34-
expect(page).to have_css(".topic-list.topic-thumbnails-masonry")
22+
expect(page).to have_css(".topic-list.topic-thumbnails-#{class_name}")
3523
expect(page).to have_css(".topic-list-thumbnail", count: 5)
36-
37-
expect(page).to have_css(".topic-list-item.masonry-0")
3824
end
3925
end
4026

41-
context "with default raw-hbs topic list" do
42-
before { SiteSetting.glimmer_topic_list_mode = "disabled" }
43-
44-
it "is using legacy topic list" do
45-
visit "/latest"
46-
expect(page).to have_css(".topic-list.ember-view")
47-
end
48-
49-
it_behaves_like "topic thumbnails"
50-
end
27+
it "renders topic thumbnails in masonry style" do
28+
theme.update_setting(:default_thumbnail_mode, "masonry")
29+
theme.save!
5130

52-
context "with glimmer topic list" do
53-
before { SiteSetting.glimmer_topic_list_mode = "auto" }
31+
visit "/latest"
5432

55-
it "is using glimmer topic list" do
56-
visit "/latest"
57-
expect(page).to have_css(".topic-list:not(.ember-view)")
58-
end
33+
expect(page).to have_css(".topic-list.topic-thumbnails-masonry")
34+
expect(page).to have_css(".topic-list-thumbnail", count: 5)
5935

60-
it_behaves_like "topic thumbnails"
36+
expect(page).to have_css(".topic-list-item.masonry-0")
6137
end
6238
end

0 commit comments

Comments
 (0)