FIX: reliably reorder link in custom sections (#24188)

Two changes were introduced:
1. Reorder links on sidebar section is removed. Clicking and holding the mouse for 250ms was unintuitive;
2. Fixed bugs when reorder is done in edit modal.
This commit is contained in:
Krzysztof Kotlarek
2023-11-02 08:46:45 +11:00
committed by GitHub
parent 1d96b0a99a
commit 1c395e1a01
11 changed files with 34 additions and 232 deletions

View File

@@ -178,9 +178,12 @@ describe "Custom sidebar sections", type: :system do
["Sidebar Tags", "Sidebar Categories", "Sidebar Latest"],
)
tags_link = find(".sidebar-section-link[data-link-name='Sidebar Tags']")
latest_link = find(".sidebar-section-link[data-link-name='Sidebar Latest']")
sidebar.edit_custom_section("My section")
tags_link = find(".draggable[data-link-name='Sidebar Tags']")
latest_link = find(".draggable[data-link-name='Sidebar Latest']")
tags_link.drag_to(latest_link, html5: true, delay: 0.4)
section_modal.save
expect(sidebar.primary_section_links("my-section")).to eq(
["Sidebar Categories", "Sidebar Tags", "Sidebar Latest"],