Path:
tests/end2end/screens/document/view_document/_grammar_from_file/view_document_with_grammar_from_file/test_case.py
Lines:
42
Non-empty lines:
31
Non-empty lines covered with requirements:
31 / 31 (100.0%)
Functions:
2
Functions covered by requirements:
2 / 2 (100.0%)
1
"""2
@relation(SDOC-SRS-54, scope=file)3
"""4
5
import os
6
7
from tests.end2end.e2e_case import E2ECase
8
from tests.end2end.helpers.screens.document.form_edit_grammar_elements import (
9
Form_EditGrammarElements,
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
28
screen_project_index.assert_on_screen()
29
screen_project_index.assert_contains_document("Document 1")
30
31
screen_document = screen_project_index.do_click_on_first_document()
32
33
screen_document.assert_on_screen_document()
34
screen_document.assert_header_document_title("Document 1")
35
screen_document.assert_not_empty_document()
36
37
screen_document.assert_text("abcdef123456")
38
39
form_edit_grammar: Form_EditGrammarElements = (
40
screen_document.do_open_modal_form_edit_grammar()
41
)42
form_edit_grammar.assert_file_grammars_are_not_supported()