Path:
tests/end2end/screens/project_index/create_document/_validation/create_document_validate_empty_document_title/test_case.py
Lines:
37
Non-empty lines:
30
Non-empty lines covered with requirements:
30 / 30 (100.0%)
Functions:
2
Functions covered by requirements:
2 / 2 (100.0%)
1
"""2
@relation(SDOC-SRS-107, scope=file)3
"""4
5
import os
6
7
from tests.end2end.e2e_case import E2ECase
8
from tests.end2end.helpers.screens.project_index.form_add_document import (
9
Form_AddDocument,
10
)11
from tests.end2end.helpers.screens.project_index.screen_project_index import (
12
Screen_ProjectIndex,
13
)14
from tests.end2end.server import SDocTestServer
15
16
path_to_this_test_file_folder = os.path.dirname(os.path.abspath(__file__))
17
18
19
class Test(E2ECase):
20
def test(self):
21
with SDocTestServer(
22
input_path=path_to_this_test_file_folder
23
) as test_server:
24
self.open(test_server.get_host_and_port())
25
26
screen_project_index = Screen_ProjectIndex(self)
27
screen_project_index.assert_on_screen()
28
screen_project_index.assert_empty_tree()
29
30
form_add_document: Form_AddDocument = (
31
screen_project_index.do_open_modal_form_add_document()
32
)33
form_add_document.do_fill_in_title("") # Empty document
34
form_add_document.do_fill_in_path("docs/document1.sdoc")
35
form_add_document.do_form_submit_and_catch_error(
36
"Document title must not be empty."37
)