Path:
tests/end2end/screens/document/delete_node/_SECTION/_validation/delete_section_that_has_incoming_LINKs/test_case.py
Lines:
44
Non-empty lines:
33
Non-empty lines covered with requirements:
33 / 33 (100.0%)
Functions:
2
Functions covered by requirements:
2 / 2 (100.0%)
1
"""2
@relation(SDOC-SRS-162, scope=file)3
"""4
5
from tests.end2end.e2e_case import E2ECase
6
from tests.end2end.end2end_test_setup import End2EndTestSetup
7
from tests.end2end.helpers.components.confirm import Confirm
8
from tests.end2end.helpers.screens.project_index.screen_project_index import (
9
Screen_ProjectIndex,
10
)11
from tests.end2end.server import SDocTestServer
12
13
14
class Test(E2ECase):
15
def test(self):
16
test_setup = End2EndTestSetup(path_to_test_file=__file__)
17
18
with SDocTestServer(
19
input_path=test_setup.path_to_sandbox
20
) as test_server:
21
self.open(test_server.get_host_and_port())
22
23
screen_project_index = Screen_ProjectIndex(self)
24
25
screen_project_index.assert_on_screen()
26
screen_project_index.assert_contains_document("Document 1")
27
28
screen_document = screen_project_index.do_click_on_first_document()
29
30
screen_document.assert_on_screen_document()
31
screen_document.assert_text("See the section")
32
screen_document.assert_text("Referenced section")
33
34
section = screen_document.get_node(2)
35
section.assert_requirement_title("Referenced section")
36
section.do_delete_node(proceed_with_confirm=False)
37
38
screen_document.assert_text(
39
"Cannot remove node '1. Referenced section' with incoming LINKs from: "40
"'REQUIREMENT with no title/UID' -> 'SDOC_UG_CONTACT'."41
)42
Confirm(self).assert_confirm_action_disabled()
43
44
assert test_setup.compare_sandbox_and_expected_output()