Skip to content

Commit

Permalink
it "shows ellipsis button on assigned posts"
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPrigorshnev committed Mar 6, 2024
1 parent cb69061 commit 556700f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions spec/system/assigned_post_popup_menu_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
let(:post_popup_menu) { PageObjects::PopupMenus::Post.new }
let(:assign_modal) { PageObjects::Modals::Assign.new }

fab!(:user)
fab!(:admin)
fab!(:topic)
fab!(:post) { Fabricate(:post, topic: topic) }
fab!(:second_post) { Fabricate(:post, topic: topic) }
# fab!(:staff_user) { Fabricate(:user, groups: [Group[:staff]]) }
fab!(:second_post_assignment) { Fabricate(:post_assignment, assigned_to: user, post: second_post) }


before do
SiteSetting.assign_enabled = true
Expand All @@ -18,7 +20,7 @@

it "shows ellipsis button on assigned posts" do
visit "/t/#{topic.id}"
expect(topic_page).to have_ellipsis_button_on_post(second_post.id)
expect(topic_page).to have_ellipsis_button_on_post(2)
end

it "unassigns the post" do
Expand Down
5 changes: 2 additions & 3 deletions spec/system/page_objects/pages/topic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ def has_assigned?(args)
has_assignment_action?(action: "assigned", **args)
end

def has_ellipsis_button_on_post?(args)
puts "((((()))))"
true
def has_ellipsis_button_on_post?(post_number)
page.has_selector?("article#post_#{post_number} p.assigned-to")
end

def has_unassigned?(args)
Expand Down

0 comments on commit 556700f

Please sign in to comment.