mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: redirects to browse after removing last followed (#22563)
Prior to this change you might end up in a loop where removing a channel would redirect you to this channel and as we auto-follow opened direct message channels, you could never unfollow this last direct message channel.
This commit is contained in:
@ -27,11 +27,17 @@ module PageObjects
|
||||
end
|
||||
|
||||
def open_channel(channel)
|
||||
find(".sidebar-section-link[href='/chat/c/#{channel.slug}/#{channel.id}']").click
|
||||
find(".sidebar-section-link.channel-#{channel.id}").click
|
||||
end
|
||||
|
||||
def remove_channel(channel)
|
||||
selector = ".sidebar-section-link.channel-#{channel.id}"
|
||||
find(selector).hover
|
||||
find(selector + " .sidebar-section-hover-button").click
|
||||
end
|
||||
|
||||
def find_channel(channel)
|
||||
find(".sidebar-section-link[href='/chat/c/#{channel.slug}/#{channel.id}']")
|
||||
find(".sidebar-section-link.channel-#{channel.id}")
|
||||
self
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user