Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export/html, server: fix edge case when dropping a req on another req #1234

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions strictdoc/server/routers/main_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,14 @@ async def move_node(request: Request):
)
current_parent_node = moved_node.parent

# Currently UI allows a child-like drag-and-drop on a requirement node.
# In that case, we make it add a node **after** the target requirement
# node (not as its child because that's not possible).
if whereto == NodeCreationOrder.CHILD and isinstance(
target_node, Requirement
):
whereto = NodeCreationOrder.AFTER

if whereto == NodeCreationOrder.CHILD:
# Disconnect the moved_node from its parent.
current_parent_node.section_contents.remove(moved_node)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from seleniumbase import BaseCase

from tests.end2end.e2e_case import E2ECase
from tests.end2end.end2end_test_setup import End2EndTestSetup
from tests.end2end.helpers.components.viewtype_selector import ViewType_Selector
from tests.end2end.helpers.screens.project_index.screen_project_index import (
Expand All @@ -8,7 +7,7 @@
from tests.end2end.server import SDocTestServer


class Test_UC60_T01_document_has_no_content(BaseCase):
class Test(E2ECase):
def test(self):
test_setup = End2EndTestSetup(path_to_test_file=__file__)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from seleniumbase import BaseCase

from tests.end2end.e2e_case import E2ECase
from tests.end2end.end2end_test_setup import End2EndTestSetup
from tests.end2end.helpers.components.viewtype_selector import ViewType_Selector
from tests.end2end.helpers.screens.project_index.screen_project_index import (
Expand All @@ -8,7 +7,7 @@
from tests.end2end.server import SDocTestServer


class Test_UC60_T02_document_has_content(BaseCase):
class Test(E2ECase):
def test(self):
test_setup = End2EndTestSetup(path_to_test_file=__file__)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from seleniumbase import BaseCase

from tests.end2end.e2e_case import E2ECase
from tests.end2end.end2end_test_setup import End2EndTestSetup
from tests.end2end.helpers.components.viewtype_selector import ViewType_Selector
from tests.end2end.helpers.screens.project_index.screen_project_index import (
Expand All @@ -8,7 +7,7 @@
from tests.end2end.server import SDocTestServer


class Test_UC30_T01_document_has_no_content(BaseCase):
class Test(E2ECase):
def test(self):
test_setup = End2EndTestSetup(path_to_test_file=__file__)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from seleniumbase import BaseCase

from tests.end2end.e2e_case import E2ECase
from tests.end2end.end2end_test_setup import End2EndTestSetup
from tests.end2end.helpers.components.viewtype_selector import ViewType_Selector
from tests.end2end.helpers.screens.project_index.screen_project_index import (
Expand All @@ -8,7 +7,7 @@
from tests.end2end.server import SDocTestServer


class Test_UC30_T02_document_has_content(BaseCase):
class Test(E2ECase):
def test(self):
test_setup = End2EndTestSetup(path_to_test_file=__file__)

Expand Down
Loading