mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Add show more button to long post queued reviewables (#23075)
This commit is contained in:
@@ -8,7 +8,7 @@ describe "Reviewables", type: :system do
|
||||
|
||||
before { sign_in(admin) }
|
||||
|
||||
describe "when there is a reviewable with a long post" do
|
||||
describe "when there is a flagged post reviewable with a long post" do
|
||||
fab!(:long_reviewable) { Fabricate(:reviewable_flagged_post, target: long_post) }
|
||||
|
||||
it "should show a button to expand/collapse the post content" do
|
||||
@@ -22,7 +22,7 @@ describe "Reviewables", type: :system do
|
||||
end
|
||||
end
|
||||
|
||||
describe "when there is a reviewable with a short post" do
|
||||
describe "when there is a flagged post reviewable with a short post" do
|
||||
fab!(:short_reviewable) { Fabricate(:reviewable_flagged_post) }
|
||||
|
||||
it "should not show a button to expand/collapse the post content" do
|
||||
@@ -32,6 +32,30 @@ describe "Reviewables", type: :system do
|
||||
end
|
||||
end
|
||||
|
||||
describe "when there is a queued post reviewable with a short post" do
|
||||
fab!(:short_queued_reviewable) { Fabricate(:reviewable_queued_post) }
|
||||
|
||||
it "should not show a button to expand/collapse the post content" do
|
||||
visit("/review")
|
||||
expect(review_page).to have_no_post_body_collapsed
|
||||
expect(review_page).to have_no_post_body_toggle
|
||||
end
|
||||
end
|
||||
|
||||
describe "when there is a queued post reviewable with a long post" do
|
||||
fab!(:long_queued_reviewable) { Fabricate(:reviewable_queued_long_post) }
|
||||
|
||||
it "should show a button to expand/collapse the post content" do
|
||||
visit("/review")
|
||||
expect(review_page).to have_post_body_collapsed
|
||||
expect(review_page).to have_post_body_toggle
|
||||
review_page.click_post_body_toggle
|
||||
expect(review_page).to have_no_post_body_collapsed
|
||||
review_page.click_post_body_toggle
|
||||
expect(review_page).to have_post_body_collapsed
|
||||
end
|
||||
end
|
||||
|
||||
context "when performing a review action from the show route" do
|
||||
context "with a ReviewableQueuedPost" do
|
||||
fab!(:queued_post_reviewable) { Fabricate(:reviewable_queued_post) }
|
||||
|
||||
Reference in New Issue
Block a user