mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-12 17:22:38 +02:00
test(e2e): wire PDF metadata into connector fixture JSONs
This commit is contained in:
parent
fc32ab0cf3
commit
ad226853e5
3 changed files with 209 additions and 153 deletions
|
|
@ -1,79 +1,99 @@
|
||||||
{
|
{
|
||||||
"root": [
|
"root": [
|
||||||
{
|
{
|
||||||
"id": "fake-folder-projects",
|
"id": "fake-folder-projects",
|
||||||
"name": "Projects",
|
"name": "Projects",
|
||||||
"mimeType": "application/vnd.google-apps.folder",
|
"mimeType": "application/vnd.google-apps.folder",
|
||||||
"modifiedTime": "2025-01-15T10:00:00.000Z",
|
"modifiedTime": "2025-01-15T10:00:00.000Z",
|
||||||
"createdTime": "2024-12-01T08:00:00.000Z"
|
"createdTime": "2024-12-01T08:00:00.000Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "fake-folder-archive",
|
"id": "fake-folder-archive",
|
||||||
"name": "Archive",
|
"name": "Archive",
|
||||||
"mimeType": "application/vnd.google-apps.folder",
|
"mimeType": "application/vnd.google-apps.folder",
|
||||||
"modifiedTime": "2024-11-20T14:30:00.000Z",
|
"modifiedTime": "2024-11-20T14:30:00.000Z",
|
||||||
"createdTime": "2024-09-10T12:00:00.000Z"
|
"createdTime": "2024-09-10T12:00:00.000Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "fake-file-readme",
|
"id": "fake-file-readme",
|
||||||
"name": "README.md",
|
"name": "README.md",
|
||||||
"mimeType": "text/markdown",
|
"mimeType": "text/markdown",
|
||||||
"modifiedTime": "2025-02-01T09:15:00.000Z",
|
"modifiedTime": "2025-02-01T09:15:00.000Z",
|
||||||
"createdTime": "2025-01-30T16:20:00.000Z"
|
"createdTime": "2025-01-30T16:20:00.000Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "fake-file-canary",
|
"id": "fake-file-canary",
|
||||||
"name": "e2e-canary.txt",
|
"name": "e2e-canary.txt",
|
||||||
"mimeType": "text/plain",
|
"mimeType": "text/plain",
|
||||||
"modifiedTime": "2025-02-10T11:00:00.000Z",
|
"modifiedTime": "2025-02-10T11:00:00.000Z",
|
||||||
"createdTime": "2025-02-10T11:00:00.000Z"
|
"createdTime": "2025-02-10T11:00:00.000Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "fake-file-budget",
|
"id": "fake-file-pdf-native",
|
||||||
"name": "Q1-Budget.csv",
|
"name": "e2e-canary.pdf",
|
||||||
"mimeType": "text/csv",
|
"mimeType": "application/pdf",
|
||||||
"modifiedTime": "2025-01-25T13:45:00.000Z",
|
"size": 735,
|
||||||
"createdTime": "2025-01-25T13:45:00.000Z"
|
"modifiedTime": "2025-02-10T11:05:00.000Z",
|
||||||
},
|
"createdTime": "2025-02-10T11:05:00.000Z"
|
||||||
{
|
},
|
||||||
"id": "fake-shortcut-canary",
|
{
|
||||||
"name": "Shortcut to Canary",
|
"id": "fake-file-pdf-composio",
|
||||||
"mimeType": "application/vnd.google-apps.shortcut",
|
"name": "e2e-composio-canary.pdf",
|
||||||
"modifiedTime": "2025-02-10T12:00:00.000Z",
|
"mimeType": "application/pdf",
|
||||||
"createdTime": "2025-02-10T12:00:00.000Z"
|
"size": 748,
|
||||||
},
|
"modifiedTime": "2025-02-10T11:10:00.000Z",
|
||||||
{
|
"createdTime": "2025-02-10T11:10:00.000Z"
|
||||||
"id": "fake-file-trashed",
|
},
|
||||||
"name": "trashed-e2e-note.txt",
|
{
|
||||||
"mimeType": "text/plain",
|
"id": "fake-file-budget",
|
||||||
"modifiedTime": "2025-02-11T09:00:00.000Z",
|
"name": "Q1-Budget.csv",
|
||||||
"createdTime": "2025-02-11T09:00:00.000Z",
|
"mimeType": "text/csv",
|
||||||
"trashed": true
|
"modifiedTime": "2025-01-25T13:45:00.000Z",
|
||||||
}
|
"createdTime": "2025-01-25T13:45:00.000Z"
|
||||||
],
|
},
|
||||||
"fake-folder-projects": [
|
{
|
||||||
{
|
"id": "fake-shortcut-canary",
|
||||||
"id": "fake-file-roadmap",
|
"name": "Shortcut to Canary",
|
||||||
"name": "2025-Roadmap.md",
|
"mimeType": "application/vnd.google-apps.shortcut",
|
||||||
"mimeType": "text/markdown",
|
"modifiedTime": "2025-02-10T12:00:00.000Z",
|
||||||
"modifiedTime": "2025-02-12T08:30:00.000Z",
|
"createdTime": "2025-02-10T12:00:00.000Z"
|
||||||
"createdTime": "2025-01-05T10:00:00.000Z"
|
},
|
||||||
}
|
{
|
||||||
],
|
"id": "fake-file-trashed",
|
||||||
"fake-folder-archive": [
|
"name": "trashed-e2e-note.txt",
|
||||||
{
|
"mimeType": "text/plain",
|
||||||
"id": "fake-file-old-notes",
|
"modifiedTime": "2025-02-11T09:00:00.000Z",
|
||||||
"name": "old-meeting-notes.txt",
|
"createdTime": "2025-02-11T09:00:00.000Z",
|
||||||
"mimeType": "text/plain",
|
"trashed": true
|
||||||
"modifiedTime": "2024-08-15T15:00:00.000Z",
|
}
|
||||||
"createdTime": "2024-08-15T15:00:00.000Z"
|
],
|
||||||
}
|
"fake-folder-projects": [
|
||||||
],
|
{
|
||||||
"_file_contents": {
|
"id": "fake-file-roadmap",
|
||||||
"fake-file-readme": "# E2E Fake Drive\n\nThis README is served by the strict Composio fake. SURFSENSE_E2E_README_MARKER",
|
"name": "2025-Roadmap.md",
|
||||||
"fake-file-canary": "Canary token for E2E tests: SURFSENSE_E2E_CANARY_TOKEN_DRIVE_001\nThis file's content is asserted by indexing.spec.ts to confirm the indexing pipeline ran end-to-end.",
|
"mimeType": "text/markdown",
|
||||||
"fake-file-budget": "Quarter,Revenue,Expenses\nQ1,100000,75000\nSURFSENSE_E2E_BUDGET_MARKER,2025,test",
|
"modifiedTime": "2025-02-12T08:30:00.000Z",
|
||||||
"fake-file-roadmap": "# 2025 Roadmap\n\n- E2E Drive indexing\n- Composio Gmail/Calendar SURFSENSE_E2E_ROADMAP_MARKER",
|
"createdTime": "2025-01-05T10:00:00.000Z"
|
||||||
"fake-file-old-notes": "Old meeting notes archived in 2024. SURFSENSE_E2E_ARCHIVE_MARKER"
|
}
|
||||||
}
|
],
|
||||||
|
"fake-folder-archive": [
|
||||||
|
{
|
||||||
|
"id": "fake-file-old-notes",
|
||||||
|
"name": "old-meeting-notes.txt",
|
||||||
|
"mimeType": "text/plain",
|
||||||
|
"modifiedTime": "2024-08-15T15:00:00.000Z",
|
||||||
|
"createdTime": "2024-08-15T15:00:00.000Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_file_contents": {
|
||||||
|
"fake-file-readme": "# E2E Fake Drive\n\nThis README is served by the strict Composio fake. SURFSENSE_E2E_README_MARKER",
|
||||||
|
"fake-file-canary": "Canary token for E2E tests: SURFSENSE_E2E_CANARY_TOKEN_DRIVE_001\nThis file's content is asserted by indexing.spec.ts to confirm the indexing pipeline ran end-to-end.",
|
||||||
|
"fake-file-budget": "Quarter,Revenue,Expenses\nQ1,100000,75000\nSURFSENSE_E2E_BUDGET_MARKER,2025,test",
|
||||||
|
"fake-file-roadmap": "# 2025 Roadmap\n\n- E2E Drive indexing\n- Composio Gmail/Calendar SURFSENSE_E2E_ROADMAP_MARKER",
|
||||||
|
"fake-file-old-notes": "Old meeting notes archived in 2024. SURFSENSE_E2E_ARCHIVE_MARKER"
|
||||||
|
},
|
||||||
|
"_file_binary_paths": {
|
||||||
|
"fake-file-pdf-native": "binary/drive-canary.pdf",
|
||||||
|
"fake-file-pdf-composio": "binary/composio-drive-canary.pdf"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,34 @@
|
||||||
{
|
{
|
||||||
"": [
|
"": [
|
||||||
{
|
{
|
||||||
".tag": "file",
|
".tag": "file",
|
||||||
"id": "id:fake-dropbox-canary",
|
"id": "id:fake-dropbox-canary",
|
||||||
"name": "e2e-dropbox-canary.txt",
|
"name": "e2e-dropbox-canary.txt",
|
||||||
"path_lower": "/e2e-dropbox-canary.txt",
|
"path_lower": "/e2e-dropbox-canary.txt",
|
||||||
"path_display": "/e2e-dropbox-canary.txt",
|
"path_display": "/e2e-dropbox-canary.txt",
|
||||||
"size": 152,
|
"size": 152,
|
||||||
"is_downloadable": true,
|
"is_downloadable": true,
|
||||||
"server_modified": "2026-05-08T00:00:00Z",
|
"server_modified": "2026-05-08T00:00:00Z",
|
||||||
"client_modified": "2026-05-08T00:00:00Z",
|
"client_modified": "2026-05-08T00:00:00Z",
|
||||||
"content_hash": "fake-dropbox-hash-001"
|
"content_hash": "fake-dropbox-hash-001"
|
||||||
}
|
},
|
||||||
],
|
{
|
||||||
"_file_contents": {
|
".tag": "file",
|
||||||
"/e2e-dropbox-canary.txt": "Canary token for Dropbox E2E tests: SURFSENSE_E2E_CANARY_TOKEN_DROPBOX_001\nThis file proves the Dropbox indexing pipeline ran end-to-end."
|
"id": "id:fake-dropbox-pdf-canary",
|
||||||
}
|
"name": "e2e-dropbox-canary.pdf",
|
||||||
|
"path_lower": "/e2e-dropbox-canary.pdf",
|
||||||
|
"path_display": "/e2e-dropbox-canary.pdf",
|
||||||
|
"size": 727,
|
||||||
|
"is_downloadable": true,
|
||||||
|
"server_modified": "2026-05-08T00:05:00Z",
|
||||||
|
"client_modified": "2026-05-08T00:05:00Z",
|
||||||
|
"content_hash": "fake-dropbox-hash-pdf-001"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_file_contents": {
|
||||||
|
"/e2e-dropbox-canary.txt": "Canary token for Dropbox E2E tests: SURFSENSE_E2E_CANARY_TOKEN_DROPBOX_001\nThis file proves the Dropbox indexing pipeline ran end-to-end."
|
||||||
|
},
|
||||||
|
"_file_binary_paths": {
|
||||||
|
"/e2e-dropbox-canary.pdf": "binary/dropbox-canary.pdf"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,61 +1,82 @@
|
||||||
{
|
{
|
||||||
"root": [
|
"root": [
|
||||||
{
|
{
|
||||||
"id": "fake-onedrive-folder-projects",
|
"id": "fake-onedrive-folder-projects",
|
||||||
"name": "Projects",
|
"name": "Projects",
|
||||||
"size": 0,
|
"size": 0,
|
||||||
"folder": {
|
"folder": {
|
||||||
"childCount": 1
|
"childCount": 1
|
||||||
},
|
},
|
||||||
"parentReference": {
|
"parentReference": {
|
||||||
"id": "root",
|
"id": "root",
|
||||||
"path": "/drive/root:"
|
"path": "/drive/root:"
|
||||||
},
|
},
|
||||||
"createdDateTime": "2025-02-01T08:00:00Z",
|
"createdDateTime": "2025-02-01T08:00:00Z",
|
||||||
"lastModifiedDateTime": "2025-02-10T10:00:00Z",
|
"lastModifiedDateTime": "2025-02-10T10:00:00Z",
|
||||||
"webUrl": "https://onedrive.example/fake/projects"
|
"webUrl": "https://onedrive.example/fake/projects"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "fake-onedrive-canary",
|
"id": "fake-onedrive-canary",
|
||||||
"name": "e2e-onedrive-canary.txt",
|
"name": "e2e-onedrive-canary.txt",
|
||||||
"size": 164,
|
"size": 164,
|
||||||
"file": {
|
"file": {
|
||||||
"mimeType": "text/plain",
|
"mimeType": "text/plain",
|
||||||
"hashes": {
|
"hashes": {
|
||||||
"quickXorHash": "fake-onedrive-canary-qxh"
|
"quickXorHash": "fake-onedrive-canary-qxh"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parentReference": {
|
"parentReference": {
|
||||||
"id": "root",
|
"id": "root",
|
||||||
"path": "/drive/root:"
|
"path": "/drive/root:"
|
||||||
},
|
},
|
||||||
"createdDateTime": "2025-02-10T11:00:00Z",
|
"createdDateTime": "2025-02-10T11:00:00Z",
|
||||||
"lastModifiedDateTime": "2025-02-10T11:00:00Z",
|
"lastModifiedDateTime": "2025-02-10T11:00:00Z",
|
||||||
"webUrl": "https://onedrive.example/fake/e2e-onedrive-canary.txt"
|
"webUrl": "https://onedrive.example/fake/e2e-onedrive-canary.txt"
|
||||||
}
|
},
|
||||||
],
|
{
|
||||||
"fake-onedrive-folder-projects": [
|
"id": "fake-onedrive-pdf-canary",
|
||||||
{
|
"name": "e2e-onedrive-canary.pdf",
|
||||||
"id": "fake-onedrive-roadmap",
|
"size": 730,
|
||||||
"name": "OneDrive Roadmap.md",
|
"file": {
|
||||||
"size": 82,
|
"mimeType": "application/pdf",
|
||||||
"file": {
|
"hashes": {
|
||||||
"mimeType": "text/markdown",
|
"quickXorHash": "fake-onedrive-pdf-canary-qxh"
|
||||||
"hashes": {
|
}
|
||||||
"quickXorHash": "fake-onedrive-roadmap-qxh"
|
},
|
||||||
}
|
"parentReference": {
|
||||||
},
|
"id": "root",
|
||||||
"parentReference": {
|
"path": "/drive/root:"
|
||||||
"id": "fake-onedrive-folder-projects",
|
},
|
||||||
"path": "/drive/root:/Projects"
|
"createdDateTime": "2025-02-10T11:05:00Z",
|
||||||
},
|
"lastModifiedDateTime": "2025-02-10T11:05:00Z",
|
||||||
"createdDateTime": "2025-02-11T08:00:00Z",
|
"webUrl": "https://onedrive.example/fake/e2e-onedrive-canary.pdf"
|
||||||
"lastModifiedDateTime": "2025-02-12T08:30:00Z",
|
}
|
||||||
"webUrl": "https://onedrive.example/fake/projects/onedrive-roadmap.md"
|
],
|
||||||
}
|
"fake-onedrive-folder-projects": [
|
||||||
],
|
{
|
||||||
"_file_contents": {
|
"id": "fake-onedrive-roadmap",
|
||||||
"fake-onedrive-canary": "Canary token for OneDrive E2E tests: SURFSENSE_E2E_CANARY_TOKEN_ONEDRIVE_001\nThis file proves the OneDrive indexing pipeline ran end-to-end.",
|
"name": "OneDrive Roadmap.md",
|
||||||
"fake-onedrive-roadmap": "# OneDrive Roadmap\n\n- E2E OneDrive indexing\n- Deterministic Graph fake"
|
"size": 82,
|
||||||
}
|
"file": {
|
||||||
|
"mimeType": "text/markdown",
|
||||||
|
"hashes": {
|
||||||
|
"quickXorHash": "fake-onedrive-roadmap-qxh"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parentReference": {
|
||||||
|
"id": "fake-onedrive-folder-projects",
|
||||||
|
"path": "/drive/root:/Projects"
|
||||||
|
},
|
||||||
|
"createdDateTime": "2025-02-11T08:00:00Z",
|
||||||
|
"lastModifiedDateTime": "2025-02-12T08:30:00Z",
|
||||||
|
"webUrl": "https://onedrive.example/fake/projects/onedrive-roadmap.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_file_contents": {
|
||||||
|
"fake-onedrive-canary": "Canary token for OneDrive E2E tests: SURFSENSE_E2E_CANARY_TOKEN_ONEDRIVE_001\nThis file proves the OneDrive indexing pipeline ran end-to-end.",
|
||||||
|
"fake-onedrive-roadmap": "# OneDrive Roadmap\n\n- E2E OneDrive indexing\n- Deterministic Graph fake"
|
||||||
|
},
|
||||||
|
"_file_binary_paths": {
|
||||||
|
"fake-onedrive-pdf-canary": "binary/onedrive-canary.pdf"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue