StrictDoc Documentation
tests/end2end/screens/project_index/import_document_from_reqif/import_document_default_import/test_case.py
Source file coverage
Path:
tests/end2end/screens/project_index/import_document_from_reqif/import_document_default_import/test_case.py
Lines:
42
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-72, scope=file)
3
"""
4
 
5
import os
6
 
7
from tests.end2end.e2e_case import E2ECase
8
from tests.end2end.end2end_test_setup import End2EndTestSetup
9
from tests.end2end.helpers.screens.project_index.form_import_reqif import (
10
    Form_ImportReqIF,
11
)
12
from tests.end2end.helpers.screens.project_index.screen_project_index import (
13
    Screen_ProjectIndex,
14
)
15
from tests.end2end.server import SDocTestServer
16
 
17
path_to_this_test_file_folder = os.path.dirname(os.path.abspath(__file__))
18
path_to_reqif_sample = os.path.join(
19
    path_to_this_test_file_folder, "sample.reqif"
20
)
21
 
22
 
23
class Test(E2ECase):
24
    def test(self):
25
        test_setup = End2EndTestSetup(path_to_test_file=__file__)
26
 
27
        with SDocTestServer(
28
            input_path=test_setup.path_to_sandbox
29
        ) as test_server:
30
            self.open(test_server.get_host_and_port())
31
 
32
            screen_project_index = Screen_ProjectIndex(self)
33
            screen_project_index.assert_on_screen()
34
            screen_project_index.assert_empty_tree()
35
 
36
            form_import: Form_ImportReqIF = (
37
                screen_project_index.do_open_modal_import_reqif()
38
            )
39
            form_import.do_choose_file(path_to_reqif_sample)
40
            form_import.do_form_submit()
41
 
42
        assert test_setup.compare_sandbox_and_expected_output()