diff --git a/tests/e2e/helpdesk/cases/conftest.py b/tests/e2e/helpdesk/cases/conftest.py index 97f54ee1..6cd45895 100644 --- a/tests/e2e/helpdesk/cases/conftest.py +++ b/tests/e2e/helpdesk/cases/conftest.py @@ -7,16 +7,14 @@ def invalid_case_id(): @pytest.fixture -def case_factory(short_uuid): +def case_factory(short_uuid, created_queue): def factory( title: str = "E2E Created Helpdesk Case", description: str = "E2E Created Helpdesk Case Description", ): return { - "title": f"{title} {short_uuid}", - "description": description, - "priority": "Low", - "type": "General", + "queue": {"id": created_queue.id}, + "chat": {"lastMessage": {"content": "E2E testing!!!"}}, } return factory diff --git a/tests/e2e/helpdesk/cases/test_async_cases.py b/tests/e2e/helpdesk/cases/test_async_cases.py index 4e44f3dd..dd51a39f 100644 --- a/tests/e2e/helpdesk/cases/test_async_cases.py +++ b/tests/e2e/helpdesk/cases/test_async_cases.py @@ -31,14 +31,14 @@ def test_create_case(async_created_case): assert result is not None -@pytest.mark.skip(reason="Unskip after MPT-19124 completed") async def test_update_case(async_mpt_ops, async_created_case, short_uuid): - update_data = {"description": f"e2e update {short_uuid}"} + assert async_created_case.to_dict().get("awaiting") is False + update_data = {"awaiting": True} result = await async_mpt_ops.helpdesk.cases.update(async_created_case.id, update_data) assert result.id == async_created_case.id - assert result.to_dict().get("description") == update_data["description"] + assert result.to_dict().get("awaiting") is True @pytest.mark.skip(reason="Unskip after MPT-19124 completed") @@ -48,15 +48,12 @@ async def test_process_case(async_mpt_ops, async_created_case): assert result is not None -@pytest.mark.skip(reason="Unskip after MPT-19124 completed") -async def test_query_case(async_mpt_ops, async_created_case): - processed_case = await async_mpt_ops.helpdesk.cases.process(async_created_case.id) - +async def test_query_case(async_mpt_ops, async_created_case, short_uuid): result = await async_mpt_ops.helpdesk.cases.query( - processed_case.id, {"queryPrompt": "Could you provide more details?"} + async_created_case.id, {"queryPrompt": f"e2e update {short_uuid}"} ) - assert result is not None + assert result.to_dict().get("queryPrompt") == f"e2e update {short_uuid}" @pytest.mark.skip(reason="Unskip after MPT-19124 completed") diff --git a/tests/e2e/helpdesk/cases/test_sync_cases.py b/tests/e2e/helpdesk/cases/test_sync_cases.py index 3679a6cd..098cc136 100644 --- a/tests/e2e/helpdesk/cases/test_sync_cases.py +++ b/tests/e2e/helpdesk/cases/test_sync_cases.py @@ -31,14 +31,14 @@ def test_create_case(created_case): assert result is not None -@pytest.mark.skip(reason="Unskip after MPT-19124 completed") def test_update_case(mpt_ops, created_case, short_uuid): - update_data = {"description": f"e2e update {short_uuid}"} + assert created_case.to_dict().get("awaiting") is False + update_data = {"awaiting": True} result = mpt_ops.helpdesk.cases.update(created_case.id, update_data) assert result.id == created_case.id - assert result.to_dict().get("description") == update_data["description"] + assert result.to_dict().get("awaiting") is True @pytest.mark.skip(reason="Unskip after MPT-19124 completed") @@ -48,15 +48,12 @@ def test_process_case(mpt_ops, created_case): assert result is not None -@pytest.mark.skip(reason="Unskip after MPT-19124 completed") -def test_query_case(mpt_ops, created_case): - processed_case = mpt_ops.helpdesk.cases.process(created_case.id) - +def test_query_case(mpt_ops, created_case, short_uuid): result = mpt_ops.helpdesk.cases.query( - processed_case.id, {"queryPrompt": "Could you provide more details?"} + created_case.id, {"queryPrompt": f"e2e update {short_uuid}"} ) - assert result is not None + assert result.to_dict().get("queryPrompt") == f"e2e update {short_uuid}" @pytest.mark.skip(reason="Unskip after MPT-19124 completed") diff --git a/tests/e2e/helpdesk/queues/conftest.py b/tests/e2e/helpdesk/conftest.py similarity index 100% rename from tests/e2e/helpdesk/queues/conftest.py rename to tests/e2e/helpdesk/conftest.py