From 7cdf102c123840d85e76474346facbc2b6343fd4 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 14:25:15 +0200 Subject: [PATCH 01/10] chore(tests/end2end): create_section_after_requirement: remove legacy Section --- .../expected_output/document.sdoc | 8 ---- .../input/document.sdoc | 2 - .../test_case.py | 46 ------------------- .../expected_output/document.sdoc | 4 +- .../expected_output/strictdoc.toml | 3 ++ .../input/strictdoc.toml | 3 ++ .../test_case.py | 14 +++--- 7 files changed, 15 insertions(+), 65 deletions(-) delete mode 100644 tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/expected_output/document.sdoc delete mode 100644 tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/input/document.sdoc delete mode 100644 tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/test_case.py create mode 100644 tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/create_section/create_section_after_requirement/input/strictdoc.toml diff --git a/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/expected_output/document.sdoc b/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/expected_output/document.sdoc deleted file mode 100644 index fd9c00914..000000000 --- a/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/expected_output/document.sdoc +++ /dev/null @@ -1,8 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 - -[SECTION] -UID: SECTION-UID -TITLE: First title - -[/SECTION] diff --git a/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/input/document.sdoc b/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/input/document.sdoc deleted file mode 100644 index 111cdb118..000000000 --- a/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/input/document.sdoc +++ /dev/null @@ -1,2 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 diff --git a/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/test_case.py b/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/test_case.py deleted file mode 100644 index 4ea543084..000000000 --- a/tests/end2end/screens/document/create_section/create_first_section_DEPRECATED/test_case.py +++ /dev/null @@ -1,46 +0,0 @@ -from tests.end2end.e2e_case import E2ECase -from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, -) -from tests.end2end.helpers.screens.project_index.screen_project_index import ( - Screen_ProjectIndex, -) -from tests.end2end.server import SDocTestServer - - -class Test(E2ECase): - def test(self): - test_setup = End2EndTestSetup(path_to_test_file=__file__) - - # Run server. - with SDocTestServer( - input_path=test_setup.path_to_sandbox - ) as test_server: - self.open(test_server.get_host_and_port()) - - screen_project_index = Screen_ProjectIndex(self) - - screen_project_index.assert_on_screen() - screen_project_index.assert_contains_document("Document 1") - - screen_document = screen_project_index.do_click_on_first_document() - - screen_document.assert_on_screen_document() - screen_document.assert_header_document_title("Document 1") - - root_node = screen_document.get_root_node() - root_node_menu = root_node.do_open_node_menu() - form_edit_section: Form_EditSection = ( - root_node_menu.do_node_add_section_first() - ) - - form_edit_section.do_fill_in_uid("SECTION-UID") - form_edit_section.do_fill_in_title("First title") - form_edit_section.do_form_submit() - - section = screen_document.get_section() - section.assert_section_title("First title", "1") - screen_document.assert_toc_contains("First title") - - assert test_setup.compare_sandbox_and_expected_output() diff --git a/tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/document.sdoc b/tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/document.sdoc index ffb4cbe89..238f688c5 100644 --- a/tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/document.sdoc +++ b/tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/document.sdoc @@ -7,7 +7,7 @@ STATEMENT: >>> Requirement statement. <<< -[SECTION] +[[SECTION]] TITLE: Section title -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/strictdoc.toml b/tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/create_section/create_section_after_requirement/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/create_section/create_section_after_requirement/input/strictdoc.toml b/tests/end2end/screens/document/create_section/create_section_after_requirement/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/create_section/create_section_after_requirement/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/create_section/create_section_after_requirement/test_case.py b/tests/end2end/screens/document/create_section/create_section_after_requirement/test_case.py index 46261c76f..3ba664bb1 100644 --- a/tests/end2end/screens/document/create_section/create_section_after_requirement/test_case.py +++ b/tests/end2end/screens/document/create_section/create_section_after_requirement/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -37,15 +37,15 @@ def test(self): node_menu = requirement.do_open_node_menu() - form_edit_section: Form_EditSection = ( - node_menu.do_node_add_section_below() + form_edit_section: Form_EditRequirement = ( + node_menu.do_node_add_element_below("SECTION") ) - form_edit_section.do_fill_in_title("Section title") + form_edit_section.do_fill_in("TITLE", "Section title") form_edit_section.do_form_submit() - section = screen_document.get_section() + section = screen_document.get_node(2) - section.assert_section_title("Section title", "2") + section.assert_requirement_title("Section title", "2") screen_document.assert_toc_contains("Section title") assert test_setup.compare_sandbox_and_expected_output() From 5eb850cbb4b6d69e863554e9b3d7ba32178560e9 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 14:39:35 +0200 Subject: [PATCH 02/10] chore(tests/end2end): create_section_before_section: remove legacy Section --- .../expected_output/document.sdoc | 8 +++---- .../expected_output/strictdoc.toml | 3 +++ .../input/document.sdoc | 4 ++-- .../input/strictdoc.toml | 3 +++ .../test_case.py | 23 +++++++++---------- 5 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 tests/end2end/screens/document/create_section/create_section_before_section/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/create_section/create_section_before_section/input/strictdoc.toml diff --git a/tests/end2end/screens/document/create_section/create_section_before_section/expected_output/document.sdoc b/tests/end2end/screens/document/create_section/create_section_before_section/expected_output/document.sdoc index dc0a8f551..a6b91d209 100644 --- a/tests/end2end/screens/document/create_section/create_section_before_section/expected_output/document.sdoc +++ b/tests/end2end/screens/document/create_section/create_section_before_section/expected_output/document.sdoc @@ -1,12 +1,12 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: Section A -[/SECTION] +[[/SECTION]] -[SECTION] +[[SECTION]] TITLE: Section B -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/create_section/create_section_before_section/expected_output/strictdoc.toml b/tests/end2end/screens/document/create_section/create_section_before_section/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/create_section/create_section_before_section/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/create_section/create_section_before_section/input/document.sdoc b/tests/end2end/screens/document/create_section/create_section_before_section/input/document.sdoc index bcab0f46d..7b42acccd 100644 --- a/tests/end2end/screens/document/create_section/create_section_before_section/input/document.sdoc +++ b/tests/end2end/screens/document/create_section/create_section_before_section/input/document.sdoc @@ -1,7 +1,7 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: Section B -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/create_section/create_section_before_section/input/strictdoc.toml b/tests/end2end/screens/document/create_section/create_section_before_section/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/create_section/create_section_before_section/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/create_section/create_section_before_section/test_case.py b/tests/end2end/screens/document/create_section/create_section_before_section/test_case.py index ea5126d63..7efac6d58 100644 --- a/tests/end2end/screens/document/create_section/create_section_before_section/test_case.py +++ b/tests/end2end/screens/document/create_section/create_section_before_section/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -31,25 +31,24 @@ def test(self): # In the first place now is the single section section_old existing_node_number = 1 - section_old = screen_document.get_section(existing_node_number) - section_old.assert_section_title("Section B", "1") + section_old = screen_document.get_node(existing_node_number) + section_old.assert_requirement_title("Section B", "1") section_old_menu = section_old.do_open_node_menu() - form_edit_section: Form_EditSection = ( - section_old_menu.do_node_add_section_above() + form_edit_section: Form_EditRequirement = ( + section_old_menu.do_node_add_element_above("SECTION") ) - - form_edit_section.do_fill_in_title("Section A") + form_edit_section.do_fill_in("TITLE", "Section A") form_edit_section.do_form_submit() # In the first place now is the new section - section_new = screen_document.get_section(existing_node_number) - section_new.assert_section_title("Section A", "1") + section_new = screen_document.get_node(existing_node_number) + section_new.assert_requirement_title("Section A", "1") # The old section shifted to second place - section_old = screen_document.get_section(existing_node_number + 1) - section_old.assert_section_title("Section B", "2") + section_old = screen_document.get_node(existing_node_number + 1) + section_old.assert_requirement_title("Section B", "2") screen_document.assert_toc_contains("Section A") screen_document.assert_toc_contains("Section B") From 623d8cb8560a5c1f1cd7374b5dbe005a5c2c1aa7 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 14:40:58 +0200 Subject: [PATCH 03/10] chore(tests/end2end): remove deprecated tests with legacy Section --- .../expected_output/document.sdoc | 47 ------------------- .../input/document.sdoc | 47 ------------------- .../test_case.py | 37 --------------- .../expected_output/document.sdoc | 8 ---- .../input/document.sdoc | 7 --- .../test_case.py | 42 ----------------- .../expected_output/document.sdoc | 14 ------ .../input/document.sdoc | 13 ----- .../test_case.py | 38 --------------- 9 files changed, 253 deletions(-) delete mode 100644 tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/expected_output/document.sdoc delete mode 100644 tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/input/document.sdoc delete mode 100644 tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/test_case.py delete mode 100644 tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/expected_output/document.sdoc delete mode 100644 tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/input/document.sdoc delete mode 100644 tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/test_case.py delete mode 100644 tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/expected_output/document.sdoc delete mode 100644 tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/input/document.sdoc delete mode 100644 tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/test_case.py diff --git a/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/expected_output/document.sdoc b/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/expected_output/document.sdoc deleted file mode 100644 index 992783f73..000000000 --- a/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/expected_output/document.sdoc +++ /dev/null @@ -1,47 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 - -[TEXT] -STATEMENT: >>> -Hello world! -<<< - -[SECTION] -TITLE: Section title #2 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[SECTION] -TITLE: Section title #1 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[/SECTION] - -[SECTION] -TITLE: Section title #2.1 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[/SECTION] - -[SECTION] -TITLE: Section title #2.2 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[/SECTION] - -[/SECTION] diff --git a/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/input/document.sdoc b/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/input/document.sdoc deleted file mode 100644 index 96774e161..000000000 --- a/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/input/document.sdoc +++ /dev/null @@ -1,47 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 - -[TEXT] -STATEMENT: >>> -Hello world! -<<< - -[SECTION] -TITLE: Section title #1 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[/SECTION] - -[SECTION] -TITLE: Section title #2 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[SECTION] -TITLE: Section title #2.1 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[/SECTION] - -[SECTION] -TITLE: Section title #2.2 - -[TEXT] -STATEMENT: >>> -NOT_RELEVANT -<<< - -[/SECTION] - -[/SECTION] diff --git a/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/test_case.py b/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/test_case.py deleted file mode 100644 index 9a562172d..000000000 --- a/tests/end2end/screens/document/move_node/move_node_basic_moving_DEPRECATED/test_case.py +++ /dev/null @@ -1,37 +0,0 @@ -from tests.end2end.e2e_case import E2ECase -from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.screen_document import ( - Screen_Document, -) -from tests.end2end.helpers.screens.project_index.screen_project_index import ( - Screen_ProjectIndex, -) -from tests.end2end.server import SDocTestServer - - -class Test(E2ECase): - def test(self): - test_setup = End2EndTestSetup(path_to_test_file=__file__) - - with SDocTestServer( - input_path=test_setup.path_to_sandbox - ) as test_server: - self.open(test_server.get_host_and_port()) - - screen_project_index = Screen_ProjectIndex(self) - - screen_project_index.assert_on_screen() - screen_project_index.assert_contains_document("Document 1") - - screen_document: Screen_Document = ( - screen_project_index.do_click_on_first_document() - ) - - screen_document.assert_on_screen_document() - screen_document.assert_header_document_title("Document 1") - - screen_document.assert_text("Hello world!") - - screen_document.do_drag_first_toc_node_to_the_second() - - assert test_setup.compare_sandbox_and_expected_output() diff --git a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/expected_output/document.sdoc deleted file mode 100644 index 539f855ad..000000000 --- a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/expected_output/document.sdoc +++ /dev/null @@ -1,8 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 - -[SECTION] -UID: SECTION-D-First-section -TITLE: Modified title - -[/SECTION] diff --git a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/input/document.sdoc b/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/input/document.sdoc deleted file mode 100644 index 8a9781cf3..000000000 --- a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/input/document.sdoc +++ /dev/null @@ -1,7 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 - -[SECTION] -TITLE: First section - -[/SECTION] diff --git a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/test_case.py b/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/test_case.py deleted file mode 100644 index 8c2b896d3..000000000 --- a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_DEPRECATED/test_case.py +++ /dev/null @@ -1,42 +0,0 @@ -from tests.end2end.e2e_case import E2ECase -from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, -) -from tests.end2end.helpers.screens.project_index.screen_project_index import ( - Screen_ProjectIndex, -) -from tests.end2end.server import SDocTestServer - - -class Test(E2ECase): - def test(self): - test_setup = End2EndTestSetup(path_to_test_file=__file__) - - with SDocTestServer( - input_path=test_setup.path_to_sandbox - ) as test_server: - self.open(test_server.get_host_and_port()) - - screen_project_index = Screen_ProjectIndex(self) - - screen_project_index.assert_on_screen() - screen_project_index.assert_contains_document("Document 1") - - screen_document = screen_project_index.do_click_on_first_document() - - screen_document.assert_on_screen_document() - screen_document.assert_header_document_title("Document 1") - - section = screen_document.get_section() - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() - ) - form_edit_section.do_reset_uid_field() - form_edit_section.do_fill_in_title("Modified title") - form_edit_section.do_form_submit() - - section.assert_section_title("Modified title", "1") - screen_document.assert_toc_contains("Modified title") - - assert test_setup.compare_sandbox_and_expected_output() diff --git a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/expected_output/document.sdoc deleted file mode 100644 index d6d4c2d05..000000000 --- a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/expected_output/document.sdoc +++ /dev/null @@ -1,14 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 - -[SECTION] -UID: SECTION-D-First-section -TITLE: First section - -[/SECTION] - -[SECTION] -UID: SECTION-D-First-section-2 -TITLE: First section - -[/SECTION] diff --git a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/input/document.sdoc b/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/input/document.sdoc deleted file mode 100644 index be512fa76..000000000 --- a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/input/document.sdoc +++ /dev/null @@ -1,13 +0,0 @@ -[DOCUMENT] -TITLE: Document 1 - -[SECTION] -UID: SECTION-D-First-section -TITLE: First section - -[/SECTION] - -[SECTION] -TITLE: First section - -[/SECTION] diff --git a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/test_case.py b/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/test_case.py deleted file mode 100644 index bf47a7781..000000000 --- a/tests/end2end/screens/document/update_section/_autouid/update_node_section_generate_auto_uid_duplicate_section_title_DEPRECATED/test_case.py +++ /dev/null @@ -1,38 +0,0 @@ -from tests.end2end.e2e_case import E2ECase -from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, -) -from tests.end2end.helpers.screens.project_index.screen_project_index import ( - Screen_ProjectIndex, -) -from tests.end2end.server import SDocTestServer - - -class Test(E2ECase): - def test(self): - test_setup = End2EndTestSetup(path_to_test_file=__file__) - - with SDocTestServer( - input_path=test_setup.path_to_sandbox - ) as test_server: - self.open(test_server.get_host_and_port()) - - screen_project_index = Screen_ProjectIndex(self) - - screen_project_index.assert_on_screen() - screen_project_index.assert_contains_document("Document 1") - - screen_document = screen_project_index.do_click_on_first_document() - - screen_document.assert_on_screen_document() - screen_document.assert_header_document_title("Document 1") - - section = screen_document.get_section(2) - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() - ) - form_edit_section.do_reset_uid_field() - form_edit_section.do_form_submit() - - assert test_setup.compare_sandbox_and_expected_output() From 846161e453a8d1841a2f66c76b7f75b64e204662 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 14:46:15 +0200 Subject: [PATCH 04/10] chore(tests/end2end): update_section_update_uid: remove legacy Section --- .../expected_output/document.sdoc | 4 ++-- .../expected_output/strictdoc.toml | 3 +++ .../update_section_update_uid/input/document.sdoc | 4 ++-- .../update_section_update_uid/input/strictdoc.toml | 3 +++ .../update_section_update_uid/test_case.py | 12 ++++++------ 5 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/update_section/update_section_update_uid/input/strictdoc.toml diff --git a/tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/document.sdoc index 024a505a2..56b5b8812 100644 --- a/tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/document.sdoc @@ -6,7 +6,7 @@ STATEMENT: >>> Hello world! <<< -[SECTION] +[[SECTION]] UID: Section-UID-After TITLE: First section @@ -15,4 +15,4 @@ STATEMENT: >>> This is a free text of this section. <<< -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_update_uid/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_update_uid/input/document.sdoc b/tests/end2end/screens/document/update_section/update_section_update_uid/input/document.sdoc index 3394a5b2a..cf9703845 100644 --- a/tests/end2end/screens/document/update_section/update_section_update_uid/input/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_update_uid/input/document.sdoc @@ -6,7 +6,7 @@ STATEMENT: >>> Hello world! <<< -[SECTION] +[[SECTION]] UID: Section-UID-Before TITLE: First section @@ -15,4 +15,4 @@ STATEMENT: >>> This is a free text of this section. <<< -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_update_uid/input/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_update_uid/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_update_uid/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_update_uid/test_case.py b/tests/end2end/screens/document/update_section/update_section_update_uid/test_case.py index bc262cbdf..644e7f656 100644 --- a/tests/end2end/screens/document/update_section/update_section_update_uid/test_case.py +++ b/tests/end2end/screens/document/update_section/update_section_update_uid/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -30,11 +30,11 @@ def test(self): screen_document.assert_text("Hello world!") - section = screen_document.get_section() - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() + section = screen_document.get_node(2) + form_edit_section: Form_EditRequirement = ( + section.do_open_form_edit_requirement() ) - form_edit_section.do_fill_in_uid("Section-UID-After") + form_edit_section.do_fill_in("UID", "Section-UID-After") form_edit_section.do_form_submit() screen_document.assert_text("Section-UID-After") From f4adce2c39f528e3f6d5c9e5a6d90720f22d3435 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 14:49:11 +0200 Subject: [PATCH 05/10] chore(tests/end2end): update_section_nominal_fields_editing: remove legacy Section --- .../expected_output/document.sdoc | 4 ++-- .../expected_output/strictdoc.toml | 3 +++ .../input/document.sdoc | 4 ++-- .../input/strictdoc.toml | 3 +++ .../test_case.py | 16 ++++++++-------- 5 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/strictdoc.toml diff --git a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/document.sdoc index f87267e22..dee72b21e 100644 --- a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/document.sdoc @@ -1,8 +1,8 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] UID: SECTION-UID TITLE: Modified title -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/document.sdoc b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/document.sdoc index 8a9781cf3..44c2f670c 100644 --- a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/document.sdoc @@ -1,7 +1,7 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/test_case.py b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/test_case.py index 935cb1a8b..9206be510 100644 --- a/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/test_case.py +++ b/tests/end2end/screens/document/update_section/update_section_nominal_fields_editing/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -28,15 +28,15 @@ def test(self): screen_document.assert_on_screen_document() screen_document.assert_header_document_title("Document 1") - section = screen_document.get_section() - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() + section = screen_document.get_node(1) + form_edit_section: Form_EditRequirement = ( + section.do_open_form_edit_requirement() ) - form_edit_section.do_fill_in_uid("SECTION-UID") - form_edit_section.do_fill_in_title("Modified title") + form_edit_section.do_fill_in("UID", "SECTION-UID") + form_edit_section.do_fill_in("TITLE", "Modified title") form_edit_section.do_form_submit() - section.assert_section_title("Modified title", "1") + section.assert_requirement_title("Modified title", "1") screen_document.assert_toc_contains("Modified title") assert test_setup.compare_sandbox_and_expected_output() From 18843b0d5e642a8d2e1d625d6a5d60584a8f549b Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 15:17:24 +0200 Subject: [PATCH 06/10] chore(tests/end2end): update_included_document_create_section_above: remove legacy Section --- .../expected_output/document.sdoc | 4 ++-- .../expected_output/strictdoc.toml | 3 +++ .../input/strictdoc.toml | 3 +++ .../test_case.py | 15 ++++++++------- 4 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/input/strictdoc.toml diff --git a/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/document.sdoc b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/document.sdoc index 1f16d56ab..7a7ce70d2 100644 --- a/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/document.sdoc +++ b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/document.sdoc @@ -6,10 +6,10 @@ STATEMENT: >>> Hello world! <<< -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] [DOCUMENT_FROM_FILE] FILE: fragment.sdoc diff --git a/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/strictdoc.toml b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/input/strictdoc.toml b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/test_case.py b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/test_case.py index 8e79bea45..846175346 100644 --- a/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/test_case.py +++ b/tests/end2end/screens/document/_cross_cutting/included_documents/_outside_fragment/update_included_document_create_section_above/test_case.py @@ -1,9 +1,10 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup from tests.end2end.helpers.components.node.add_node_menu import AddNode_Menu +from tests.end2end.helpers.components.node.requirement import Requirement from tests.end2end.helpers.components.node.section import Section -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -35,16 +36,16 @@ def test(self): section: Section = screen_document.get_section(node_order=1) section_menu: AddNode_Menu = section.do_open_node_menu() - form_edit_section: Form_EditSection = ( - section_menu.do_node_add_section_above() + form_edit_section: Form_EditRequirement = ( + section_menu.do_node_add_element_above("SECTION") ) - form_edit_section.do_fill_in_title("First section") + form_edit_section.do_fill_in("TITLE", "First section") form_edit_section.do_form_submit() - section: Section = screen_document.get_section(1) + section: Requirement = screen_document.get_node(2) - section.assert_section_title("First section") + section.assert_requirement_title("First section") screen_document.assert_toc_contains("First section") From b6c0844712eb8db674749c8406cd8dd899b64341 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 15:20:11 +0200 Subject: [PATCH 07/10] chore(tests/end2end): update_section_cancel_edit_section: remove legacy Section --- .../expected_output/document.sdoc | 4 ++-- .../expected_output/strictdoc.toml | 3 +++ .../input/document.sdoc | 4 ++-- .../input/strictdoc.toml | 3 +++ .../update_section_cancel_edit_section/test_case.py | 10 +++++----- 5 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/strictdoc.toml diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/document.sdoc index 8a9781cf3..44c2f670c 100644 --- a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/document.sdoc @@ -1,7 +1,7 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/document.sdoc b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/document.sdoc index 8a9781cf3..44c2f670c 100644 --- a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/document.sdoc @@ -1,7 +1,7 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/test_case.py b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/test_case.py index 9e7f9c50c..6f9454d31 100644 --- a/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/test_case.py +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_section/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -28,9 +28,9 @@ def test(self): screen_document.assert_on_screen_document() screen_document.assert_header_document_title("Document 1") - section = screen_document.get_section() - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() + section = screen_document.get_node(1) + form_edit_section: Form_EditRequirement = ( + section.do_open_form_edit_requirement() ) form_edit_section.do_form_cancel() From f0613a60e334fd9c13dd55ccc792b5f569d5bc75 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 15:22:58 +0200 Subject: [PATCH 08/10] chore(tests/end2end): update_section_cancel_edit_nested_section: remove legacy Section --- .../expected_output/document.sdoc | 8 ++++---- .../expected_output/strictdoc.toml | 3 +++ .../input/document.sdoc | 8 ++++---- .../input/strictdoc.toml | 3 +++ .../test_case.py | 10 +++++----- 5 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/strictdoc.toml diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/document.sdoc index 66ec21287..2dc57f8e3 100644 --- a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/document.sdoc @@ -1,12 +1,12 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: Section 1 -[SECTION] +[[SECTION]] TITLE: Section 1.1 -[/SECTION] +[[/SECTION]] -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/document.sdoc b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/document.sdoc index 66ec21287..2dc57f8e3 100644 --- a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/document.sdoc +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/document.sdoc @@ -1,12 +1,12 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: Section 1 -[SECTION] +[[SECTION]] TITLE: Section 1.1 -[/SECTION] +[[/SECTION]] -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/strictdoc.toml b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/test_case.py b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/test_case.py index 26815349c..96a3db10f 100644 --- a/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/test_case.py +++ b/tests/end2end/screens/document/update_section/update_section_cancel_edit_nested_section/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -28,9 +28,9 @@ def test(self): screen_document.assert_on_screen_document() screen_document.assert_header_document_title("Document 1") - section = screen_document.get_section(2) - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() + section = screen_document.get_node(2) + form_edit_section: Form_EditRequirement = ( + section.do_open_form_edit_requirement() ) form_edit_section.do_form_cancel() From 78e389be4ea340f40dd03f13a6e6da50af665fa6 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 15:36:47 +0200 Subject: [PATCH 09/10] chore(tests/end2end): update_section_with_empty_title: remove legacy Section --- .../expected_output/document.sdoc | 4 ++-- .../expected_output/strictdoc.toml | 3 +++ .../input/document.sdoc | 4 ++-- .../input/strictdoc.toml | 3 +++ .../update_section_with_empty_title/test_case.py | 12 ++++++------ 5 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/strictdoc.toml diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/document.sdoc index 8a9781cf3..44c2f670c 100644 --- a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/document.sdoc +++ b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/document.sdoc @@ -1,7 +1,7 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/strictdoc.toml b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/document.sdoc b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/document.sdoc index 8a9781cf3..44c2f670c 100644 --- a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/document.sdoc +++ b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/document.sdoc @@ -1,7 +1,7 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/strictdoc.toml b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/test_case.py b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/test_case.py index 97acef256..841d8e862 100644 --- a/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/test_case.py +++ b/tests/end2end/screens/document/update_section/_validation/update_section_with_empty_title/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -28,15 +28,15 @@ def test(self): screen_document.assert_on_screen_document() screen_document.assert_header_document_title("Document 1") - section = screen_document.get_section() + section = screen_document.get_node(1) - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() + form_edit_section: Form_EditRequirement = ( + section.do_open_form_edit_requirement() ) form_edit_section.do_clear_field("TITLE") form_edit_section.do_form_submit_and_catch_error( - "Section title must not be empty." + "Node's TITLE must not be empty." ) assert test_setup.compare_sandbox_and_expected_output() From 3e1e341d0bdd8ce9f391a72a358684f736766316 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sun, 28 Sep 2025 15:40:26 +0200 Subject: [PATCH 10/10] chore(tests/end2end): update_section_create_uid_that_already_exists: remove legacy Section --- .../expected_output/document.sdoc | 8 ++++---- .../expected_output/strictdoc.toml | 3 +++ .../input/document.sdoc | 8 ++++---- .../input/strictdoc.toml | 3 +++ .../test_case.py | 18 +++++++++--------- 5 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/strictdoc.toml create mode 100644 tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/strictdoc.toml diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/document.sdoc b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/document.sdoc index 695b93ed8..e1a0fecfe 100644 --- a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/document.sdoc +++ b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/document.sdoc @@ -1,13 +1,13 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] -[SECTION] +[[SECTION]] UID: Existing-Section-UID TITLE: Second section -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/strictdoc.toml b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/expected_output/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/document.sdoc b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/document.sdoc index 695b93ed8..e1a0fecfe 100644 --- a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/document.sdoc +++ b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/document.sdoc @@ -1,13 +1,13 @@ [DOCUMENT] TITLE: Document 1 -[SECTION] +[[SECTION]] TITLE: First section -[/SECTION] +[[/SECTION]] -[SECTION] +[[SECTION]] UID: Existing-Section-UID TITLE: Second section -[/SECTION] +[[/SECTION]] diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/strictdoc.toml b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/strictdoc.toml new file mode 100644 index 000000000..190f5866a --- /dev/null +++ b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/input/strictdoc.toml @@ -0,0 +1,3 @@ +[project] + +section_behavior = "[[SECTION]]" diff --git a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/test_case.py b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/test_case.py index 885609d5a..4d975f108 100644 --- a/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/test_case.py +++ b/tests/end2end/screens/document/update_section/_validation/update_section_create_uid_that_already_exists/test_case.py @@ -1,7 +1,7 @@ from tests.end2end.e2e_case import E2ECase from tests.end2end.end2end_test_setup import End2EndTestSetup -from tests.end2end.helpers.screens.document.form_edit_section import ( - Form_EditSection, +from tests.end2end.helpers.screens.document.form_edit_requirement import ( + Form_EditRequirement, ) from tests.end2end.helpers.screens.project_index.screen_project_index import ( Screen_ProjectIndex, @@ -28,15 +28,15 @@ def test(self): screen_document.assert_on_screen_document() screen_document.assert_header_document_title("Document 1") - section = screen_document.get_section() - form_edit_section: Form_EditSection = ( - section.do_open_form_edit_section() + section = screen_document.get_node(1) + form_edit_section: Form_EditRequirement = ( + section.do_open_form_edit_requirement() ) - form_edit_section.do_fill_in_uid("Existing-Section-UID") + form_edit_section.do_fill_in("UID", "Existing-Section-UID") form_edit_section.do_form_submit_and_catch_error( - "UID uniqueness validation error: " - "There is already an existing node with this UID: " - "2. Second section." + "The chosen UID must be unique. " + "Another node with this UID already exists: " + "'Existing-Section-UID'." ) assert test_setup.compare_sandbox_and_expected_output()