DEV: Update custom array implementations for Ember 5 compatibility (#24435)

In the long term we should aim to modernize these places, but for now this change will make them compatible with Ember 5.x (while maintaining compatibility with Ember 3.28)
This commit is contained in:
David Taylor
2023-11-20 13:26:46 +00:00
committed by GitHub
parent ba61ea17b6
commit 18461e38cf
4 changed files with 38 additions and 10 deletions

View File

@ -48,4 +48,25 @@ describe "Topic page", type: :system do
expect(".codeblock-button-wrapper").to be_present
end
end
context "with a gap" do
before do
post2 = Fabricate(:post, topic: topic, cooked: "post2")
post3 = Fabricate(:post, topic: topic, cooked: "post3")
post4 = Fabricate(:post, topic: topic, cooked: "post4")
PostDestroyer.new(Discourse.system_user, post2).destroy
PostDestroyer.new(Discourse.system_user, post3).destroy
sign_in Fabricate(:admin)
end
it "displays the gap to admins, and alows them to expand it" do
visit "/t/#{topic.slug}/#{topic.id}"
expect(page).to have_css(".topic-post", count: 2)
find(".post-stream .gap").click()
expect(page).to have_css(".topic-post", count: 4)
end
end
end