codemie-test-harness 0.1.171__py3-none-any.whl → 0.1.173__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of codemie-test-harness might be problematic. Click here for more details.
- codemie_test_harness/tests/assistant/test_assistants.py +40 -0
- codemie_test_harness/tests/llm/assistants/test_lite_llm.py +8 -1
- codemie_test_harness/tests/test_data/files/test_extended.docx +0 -0
- codemie_test_harness/tests/ui/_test_data/__init__.py +0 -0
- codemie_test_harness/tests/ui/_test_data/assistant_test_data.py +1037 -0
- codemie_test_harness/tests/ui/_test_data/integration_test_data.py +121 -0
- codemie_test_harness/tests/ui/assistants/test_create_assistant.py +1 -1
- codemie_test_harness/tests/ui/conftest.py +25 -0
- codemie_test_harness/tests/ui/integrations/__init__.py +0 -0
- codemie_test_harness/tests/ui/integrations/test_create_integration.py +320 -0
- codemie_test_harness/tests/ui/pageobject/assistants/create_assistant_page.py +0 -20
- codemie_test_harness/tests/ui/pageobject/base_page.py +19 -6
- codemie_test_harness/tests/ui/pageobject/components/integration_row.py +299 -0
- codemie_test_harness/tests/ui/pageobject/integrations/create_integration_page.py +772 -0
- codemie_test_harness/tests/ui/pageobject/integrations/integrations_page.py +434 -0
- codemie_test_harness/tests/utils/credentials_manager.py +16 -0
- {codemie_test_harness-0.1.171.dist-info → codemie_test_harness-0.1.173.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.171.dist-info → codemie_test_harness-0.1.173.dist-info}/RECORD +20 -12
- codemie_test_harness/tests/test_data/assistant_test_data.py +0 -596
- {codemie_test_harness-0.1.171.dist-info → codemie_test_harness-0.1.173.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.171.dist-info → codemie_test_harness-0.1.173.dist-info}/entry_points.txt +0 -0
|
@@ -16,6 +16,7 @@ from codemie_sdk.models.assistant import (
|
|
|
16
16
|
from codemie_test_harness.tests import TEST_USER, PROJECT, LANGFUSE_TRACES_ENABLED
|
|
17
17
|
from codemie_test_harness.tests.test_data.assistant_test_data import (
|
|
18
18
|
EXCEL_TOOL_TEST_DATA,
|
|
19
|
+
DOCX_TOOL_TEST_DATA,
|
|
19
20
|
)
|
|
20
21
|
from codemie_test_harness.tests.test_data.file_test_data import (
|
|
21
22
|
files_with_different_types_test_data,
|
|
@@ -432,3 +433,42 @@ def test_excel_tool_extended_functionality(
|
|
|
432
433
|
)
|
|
433
434
|
|
|
434
435
|
similarity_check.check_similarity(response, expected_response)
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
@pytest.mark.assistant
|
|
439
|
+
@pytest.mark.file
|
|
440
|
+
@pytest.mark.regression
|
|
441
|
+
@pytest.mark.smoke
|
|
442
|
+
@pytest.mark.parametrize("prompt,expected_response", DOCX_TOOL_TEST_DATA)
|
|
443
|
+
def test_docx_tool_extended_functionality(
|
|
444
|
+
assistant_utils, assistant, similarity_check, prompt, expected_response
|
|
445
|
+
):
|
|
446
|
+
"""
|
|
447
|
+
Test extended Docx tool functionality with various scenarios.
|
|
448
|
+
|
|
449
|
+
This test covers:
|
|
450
|
+
- Extract plain text using 'text' query
|
|
451
|
+
- Extract text with metadata using 'text_with_metadata' query
|
|
452
|
+
- Extract document structure using 'structure_only' query
|
|
453
|
+
- Extract tables using 'table_extraction' query
|
|
454
|
+
- Generate summary using 'summary' query
|
|
455
|
+
- Perform analysis with custom instructions using 'analyze' query
|
|
456
|
+
- Process specific pages '1-3' using pages parameter
|
|
457
|
+
- Process specific pages '1,5,10' using pages parameter
|
|
458
|
+
- Extract images using 'image_extraction' query
|
|
459
|
+
- Extract text with OCR from images using 'text_with_images' query
|
|
460
|
+
|
|
461
|
+
"""
|
|
462
|
+
assistant_instance = assistant()
|
|
463
|
+
|
|
464
|
+
uploaded_file = assistant_utils.upload_file_to_chat(
|
|
465
|
+
FILES_PATH / "test_extended.docx"
|
|
466
|
+
)
|
|
467
|
+
file_url = uploaded_file.get("file_url")
|
|
468
|
+
|
|
469
|
+
# Send the prompt with the uploaded file
|
|
470
|
+
response = assistant_utils.ask_assistant(
|
|
471
|
+
assistant_instance, prompt, file_urls=[file_url]
|
|
472
|
+
)
|
|
473
|
+
|
|
474
|
+
similarity_check.check_similarity(response, expected_response)
|
|
@@ -7,7 +7,10 @@ from codemie_test_harness.tests.test_data.llm_test_data import MODEL_RESPONSES
|
|
|
7
7
|
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
8
8
|
from codemie_test_harness.tests.utils.client_factory import get_client
|
|
9
9
|
from codemie_test_harness.tests.utils.constants import test_project_name
|
|
10
|
-
from codemie_test_harness.tests.utils.env_resolver import
|
|
10
|
+
from codemie_test_harness.tests.utils.env_resolver import (
|
|
11
|
+
get_environment,
|
|
12
|
+
EnvironmentResolver,
|
|
13
|
+
)
|
|
11
14
|
from codemie_test_harness.tests.utils.pytest_utils import check_mark
|
|
12
15
|
|
|
13
16
|
|
|
@@ -63,6 +66,10 @@ def pytest_generate_tests(metafunc):
|
|
|
63
66
|
@pytest.mark.assistant
|
|
64
67
|
@pytest.mark.lite_llm
|
|
65
68
|
@pytest.mark.regression
|
|
69
|
+
@pytest.mark.skipif(
|
|
70
|
+
EnvironmentResolver.is_sandbox(),
|
|
71
|
+
reason="Skipping this tests on sandbox environments",
|
|
72
|
+
)
|
|
66
73
|
def test_assistant_with_different_models_in_lite_llm(
|
|
67
74
|
llm_utils,
|
|
68
75
|
lite_llm_integration,
|
|
Binary file
|
|
File without changes
|