diff --git a/spec/system/assigned_post_popup_menu_spec.rb b/spec/system/assigned_post_popup_menu_spec.rb index b2fe9d84..7b0b3bf5 100644 --- a/spec/system/assigned_post_popup_menu_spec.rb +++ b/spec/system/assigned_post_popup_menu_spec.rb @@ -18,14 +18,15 @@ sign_in(admin) end - it "shows ellipsis button on assigned posts" do + it "shows the more button on assigned posts" do visit "/t/#{topic.id}" - expect(topic_page).to have_ellipsis_button_on_post(2) + expect(topic_page).to have_more_button_on_post(2) end it "unassigns the post" do visit "/t/#{topic.id}" - # post.click_ellipsis_button + topic_page.click_more_button_on_post(2) + expect(topic_page).to have_more_button_on_post(2) # post.click_unassign # expect(popup_menu).to be_closed # expect(post).to not_have_assigned diff --git a/spec/system/page_objects/pages/topic.rb b/spec/system/page_objects/pages/topic.rb index 9db58b19..6a021d4b 100644 --- a/spec/system/page_objects/pages/topic.rb +++ b/spec/system/page_objects/pages/topic.rb @@ -17,12 +17,16 @@ def click_edit_topic_assignment find("[data-value='reassign']").click end + def click_more_button_on_post(post_number) + find("article#post_#{post_number} p.assigned-to button.more-button").click + end + def has_assigned?(args) has_assignment_action?(action: "assigned", **args) end - def has_ellipsis_button_on_post?(post_number) - page.has_selector?("article#post_#{post_number} p.assigned-to") + def has_more_button_on_post?(post_number) + page.has_selector?("article#post_#{post_number} p.assigned-to button.more-button") end def has_unassigned?(args)