Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ STATEMENT: >>>
Hello world!
<<<

[SECTION]
[[SECTION]]
TITLE: First section

[/SECTION]
[[/SECTION]]

[DOCUMENT_FROM_FILE]
FILE: fragment.sdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[project]

section_behavior = "[[SECTION]]"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[project]

section_behavior = "[[SECTION]]"
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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")

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ STATEMENT: >>>
Requirement statement.
<<<

[SECTION]
[[SECTION]]
TITLE: Section title

[/SECTION]
[[/SECTION]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[project]

section_behavior = "[[SECTION]]"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[project]

section_behavior = "[[SECTION]]"
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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()
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[DOCUMENT]
TITLE: Document 1

[SECTION]
[[SECTION]]
TITLE: Section A

[/SECTION]
[[/SECTION]]

[SECTION]
[[SECTION]]
TITLE: Section B

[/SECTION]
[[/SECTION]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[project]

section_behavior = "[[SECTION]]"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[DOCUMENT]
TITLE: Document 1

[SECTION]
[[SECTION]]
TITLE: Section B

[/SECTION]
[[/SECTION]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[project]

section_behavior = "[[SECTION]]"
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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")
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading