mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -06:00
FIX: ensures bulk-select is correctly working on mobile (#27290)
Prior to this fix we were opening a modal before closing the `DMenu` modal, given `DModal` expects only one modal at a time it was closing the latest modal and instantly closing the one we just opened.
This commit is contained in:
parent
62b1b69e82
commit
510c022131
@ -167,7 +167,9 @@ export default class BulkSelectTopicsDropdown extends Component {
|
||||
}
|
||||
|
||||
@action
|
||||
onSelect(id) {
|
||||
async onSelect(id) {
|
||||
await this.dMenu.close();
|
||||
|
||||
switch (id) {
|
||||
case "update-category":
|
||||
this.showBulkTopicActionsModal(id, "change_category", {
|
||||
@ -225,8 +227,6 @@ export default class BulkSelectTopicsDropdown extends Component {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.dMenu.close();
|
||||
}
|
||||
|
||||
@action
|
||||
|
@ -11,11 +11,11 @@ module PageObjects
|
||||
end
|
||||
|
||||
def has_bulk_select_button?
|
||||
page.has_css?("#{TOPIC_LIST_HEADER_SELECTOR} button.bulk-select")
|
||||
page.has_css?(".bulk-select")
|
||||
end
|
||||
|
||||
def click_bulk_select_button
|
||||
find("#{TOPIC_LIST_HEADER_SELECTOR} button.bulk-select").click
|
||||
find(".bulk-select").click
|
||||
end
|
||||
|
||||
def has_bulk_select_topics_dropdown?
|
||||
|
@ -35,6 +35,14 @@ describe "Topic bulk select", type: :system do
|
||||
expect(topic_bulk_actions_modal).to be_open
|
||||
end
|
||||
|
||||
context "when in mobile", mobile: true do
|
||||
it "is working" do
|
||||
# behavior is already tested on desktop, we simply ensure
|
||||
# the general workflow is working on mobile
|
||||
open_append_modal
|
||||
end
|
||||
end
|
||||
|
||||
it "appends tags to selected topics" do
|
||||
open_append_modal
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user