StrictDoc Documentation
tests/end2end/screens/project_index/export_tree_to_reqif/basic_reqif_export/test_case.py
Source file coverage
Path:
tests/end2end/screens/project_index/export_tree_to_reqif/basic_reqif_export/test_case.py
Lines:
46
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
import shutil
7
import sys
8
 
9
from tests.end2end.conftest import DOWNLOADED_FILES_PATH, test_environment
10
from tests.end2end.e2e_case import E2ECase
11
from tests.end2end.end2end_test_setup import End2EndTestSetup
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_expected_downloaded_file = os.path.join(
18
    DOWNLOADED_FILES_PATH, "export.reqif"
19
)
20
 
21
 
22
class Test(E2ECase):
23
    def test(self):
24
        shutil.rmtree(DOWNLOADED_FILES_PATH, ignore_errors=True)
25
 
26
        test_setup = End2EndTestSetup(path_to_test_file=__file__)
27
 
28
        with SDocTestServer(
29
            input_path=test_setup.path_to_sandbox
30
        ) as test_server:
31
            self.open(test_server.get_host_and_port())
32
 
33
            screen_project_index = Screen_ProjectIndex(self)
34
            screen_project_index.assert_on_screen()
35
 
36
            screen_project_index.do_export_reqif()
37
 
38
            # FIXME: does not work on Linux CI
39
            if sys.platform.startswith("linux"):
40
                return
41
 
42
            self.sleep(test_environment.download_file_timeout_seconds)
43
 
44
            assert os.path.exists(path_to_expected_downloaded_file)
45
 
46
        assert test_setup.compare_sandbox_and_expected_output()