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
|
@action
|
||||||
onSelect(id) {
|
async onSelect(id) {
|
||||||
|
await this.dMenu.close();
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case "update-category":
|
case "update-category":
|
||||||
this.showBulkTopicActionsModal(id, "change_category", {
|
this.showBulkTopicActionsModal(id, "change_category", {
|
||||||
|
@ -225,8 +227,6 @@ export default class BulkSelectTopicsDropdown extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dMenu.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
|
@ -11,11 +11,11 @@ module PageObjects
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_bulk_select_button?
|
def has_bulk_select_button?
|
||||||
page.has_css?("#{TOPIC_LIST_HEADER_SELECTOR} button.bulk-select")
|
page.has_css?(".bulk-select")
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_bulk_select_button
|
def click_bulk_select_button
|
||||||
find("#{TOPIC_LIST_HEADER_SELECTOR} button.bulk-select").click
|
find(".bulk-select").click
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_bulk_select_topics_dropdown?
|
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
|
expect(topic_bulk_actions_modal).to be_open
|
||||||
end
|
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
|
it "appends tags to selected topics" do
|
||||||
open_append_modal
|
open_append_modal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue