From e158d62495da629c2329b11303df35aa01bd23b7 Mon Sep 17 00:00:00 2001 From: Will Baker Date: Thu, 30 Jan 2025 11:55:13 -0500 Subject: [PATCH] sources-*: fix a few failing tests Fixes a test with source-notion that failed for predictable and obvious reasons. Also updates a few test snapshots so they'll pass CI. --- .../snapshots__capture__capture.stdout.json | 1 + .../snapshots__capture__capture.stdout.json | 6 +- source-notion/tests/test_source.py | 2 +- .../snapshots__capture__capture.stdout.json | 70 ++++++++++--------- 4 files changed, 41 insertions(+), 38 deletions(-) diff --git a/source-front/tests/snapshots/snapshots__capture__capture.stdout.json b/source-front/tests/snapshots/snapshots__capture__capture.stdout.json index f04fd580eb..5f04b3d1bb 100644 --- a/source-front/tests/snapshots/snapshots__capture__capture.stdout.json +++ b/source-front/tests/snapshots/snapshots__capture__capture.stdout.json @@ -104,6 +104,7 @@ "is_available": true, "is_blocked": false, "last_name": "Bair", + "type": "user", "username": "alexb" } ], diff --git a/source-jira-native/tests/snapshots/snapshots__capture__capture.stdout.json b/source-jira-native/tests/snapshots/snapshots__capture__capture.stdout.json index 4e1136469d..89dac17989 100644 --- a/source-jira-native/tests/snapshots/snapshots__capture__capture.stdout.json +++ b/source-jira-native/tests/snapshots/snapshots__capture__capture.stdout.json @@ -416,7 +416,7 @@ { "_meta": { "op": "u", - "row_id": 68, + "row_id": 65, "uuid": "DocUUIDPlaceholder-329Bb50aa48EAa9ef" }, "clauseNames": [], @@ -452,7 +452,7 @@ { "_meta": { "op": "u", - "row_id": 31, + "row_id": 28, "uuid": "DocUUIDPlaceholder-329Bb50aa48EAa9ef" }, "description": "Default configuration scheme generated by Jira", @@ -469,7 +469,7 @@ { "_meta": { "op": "u", - "row_id": 15, + "row_id": 12, "uuid": "DocUUIDPlaceholder-329Bb50aa48EAa9ef" }, "contextId": "10104", diff --git a/source-notion/tests/test_source.py b/source-notion/tests/test_source.py index 2fd5122a8f..20425210e6 100644 --- a/source-notion/tests/test_source.py +++ b/source-notion/tests/test_source.py @@ -76,7 +76,7 @@ def test_get_authenticator(config, expected_token): ({}, None), ({"start_date": "2021-01-01T00:00:00.000Z"}, None), ({"start_date": "2021-99-99T79:89:99.123Z"}, "The provided start date is not a valid date. Please check the format and try again."), - ({"start_date": "2025-01-25T00:00:00.000Z"}, "The start date cannot be greater than the current date."), + ({"start_date": "2035-01-25T00:00:00.000Z"}, "The start date cannot be greater than the current date."), ], ) def test_validate_start_date(config, expected_return): diff --git a/source-zendesk-support/tests/snapshots/snapshots__capture__capture.stdout.json b/source-zendesk-support/tests/snapshots/snapshots__capture__capture.stdout.json index b2a2d9defd..55437fd2fe 100644 --- a/source-zendesk-support/tests/snapshots/snapshots__capture__capture.stdout.json +++ b/source-zendesk-support/tests/snapshots/snapshots__capture__capture.stdout.json @@ -305,96 +305,97 @@ "uuid": "DocUUIDPlaceholder-329Bb50aa48EAa9ef" }, "author_id": 28835702984212, - "created_at": "2024-07-26T15:42:05Z", + "created_at": "2024-07-26T15:42:08Z", "events": [ { "attachments": [], - "audit_id": 28835719459732, - "author_id": 28835719437332, - "body": "Can I still cancel my order?", - "html_body": "
Can I still cancel my order?
", - "id": 28835719459860, - "plain_body": "Can I still cancel my order?", + "audit_id": 28835719670036, + "author_id": 28835751103252, + "body": "Hi there! Looks like I jumped the gun and, uh-oh, put the wrong delivery address on my order. I need to fix this fast but I\u2019m not sure how to go about it.\nCan you help me change the delivery address for my order? Or can I do it on the website? Also, is there a deadline for when I can make this change?\n\nThanks for your help!\n\nIngrid Van Dijk", + "html_body": "
Hi there! Looks like I jumped the gun and, uh-oh, put the wrong delivery address on my order. I need to fix this fast but I\u2019m not sure how to go about it.
Can you help me change the delivery address for my order? Or can I do it on the website? Also, is there a deadline for when I can make this change?

Thanks for your help!

Ingrid Van Dijk
", + "id": 28835719670164, + "plain_body": "Hi there! Looks like I jumped the gun and, uh-oh, put the wrong delivery address on my order. I need to fix this fast but I\u2019m not sure how to go about it.\nCan you help me change the delivery address for my order? Or can I do it on the website? Also, is there a deadline for when I can make this change?\n\nThanks for your help!\n\nIngrid Van Dijk", "public": true, "type": "Comment" }, + { + "field_name": "requester_id", + "id": 28835719670292, + "type": "Create", + "value": "28835751103252" + }, { "field_name": "priority", - "id": 28835719459988, + "id": 28835719670420, "type": "Create", - "value": "urgent" + "value": "normal" }, { "field_name": "subject", - "id": 28835719460116, + "id": 28835719670548, "type": "Create", - "value": "SAMPLE TICKET: Cancel order" + "value": "SAMPLE TICKET: New delivery address" }, { "field_name": "tags", - "id": 28835719460244, + "id": 28835719670676, "type": "Create", "value": [ - "order", + "change_address", + "delivery", "sample_ticket" ] }, - { - "field_name": "28835767646868", - "id": 28835719460372, - "type": "Create", - "value": "order" - }, { "field_name": "type", - "id": 28835719460500, + "id": 28835719670804, "type": "Create", "value": null }, { "field_name": "status", - "id": 28835719460628, + "id": 28835719670932, "type": "Create", "value": "open" }, { "field_name": "assignee_id", - "id": 28835719460756, + "id": 28835719671060, "type": "Create", "value": "28835702984212" }, { "field_name": "group_id", - "id": 28835719460884, + "id": 28835719671188, "type": "Create", "value": "28835740822676" }, + { + "field_name": "28835767646868", + "id": 28835719671316, + "type": "Create", + "value": "delivery" + }, { "field_name": "brand_id", - "id": 28835719461012, + "id": 28835719671444, "type": "Create", "value": "28835714705684" }, { "field_name": "ticket_form_id", - "id": 28835719461140, + "id": 28835719671572, "type": "Create", "value": "28835740693908" }, { "field_name": "custom_status_id", - "id": 28835719461268, + "id": 28835719671700, "type": "Create", "value": "28835714727188" - }, - { - "field_name": "requester_id", - "id": 28835719461396, - "type": "Create", - "value": "28835719437332" } ], - "id": 28835719459732, + "id": 28835719670036, "metadata": { "custom": {}, "system": { @@ -405,7 +406,7 @@ "longitude": -119.7257 } }, - "ticket_id": 12, + "ticket_id": 17, "via": { "channel": "sample_ticket", "source": { @@ -813,6 +814,7 @@ "manage_group_memberships": false, "manage_groups": false, "manage_macro_content_suggestions": false, + "manage_malicious_attachments": false, "manage_organization_fields": false, "manage_organizations": false, "manage_roles": "none",