mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-12 01:02:39 +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": [
|
||||
{
|
||||
"id": "fake-folder-projects",
|
||||
"name": "Projects",
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"modifiedTime": "2025-01-15T10:00:00.000Z",
|
||||
"createdTime": "2024-12-01T08:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-folder-archive",
|
||||
"name": "Archive",
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"modifiedTime": "2024-11-20T14:30:00.000Z",
|
||||
"createdTime": "2024-09-10T12:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-readme",
|
||||
"name": "README.md",
|
||||
"mimeType": "text/markdown",
|
||||
"modifiedTime": "2025-02-01T09:15:00.000Z",
|
||||
"createdTime": "2025-01-30T16:20:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-canary",
|
||||
"name": "e2e-canary.txt",
|
||||
"mimeType": "text/plain",
|
||||
"modifiedTime": "2025-02-10T11:00:00.000Z",
|
||||
"createdTime": "2025-02-10T11:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-budget",
|
||||
"name": "Q1-Budget.csv",
|
||||
"mimeType": "text/csv",
|
||||
"modifiedTime": "2025-01-25T13:45:00.000Z",
|
||||
"createdTime": "2025-01-25T13:45:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-shortcut-canary",
|
||||
"name": "Shortcut to Canary",
|
||||
"mimeType": "application/vnd.google-apps.shortcut",
|
||||
"modifiedTime": "2025-02-10T12:00:00.000Z",
|
||||
"createdTime": "2025-02-10T12:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-trashed",
|
||||
"name": "trashed-e2e-note.txt",
|
||||
"mimeType": "text/plain",
|
||||
"modifiedTime": "2025-02-11T09:00:00.000Z",
|
||||
"createdTime": "2025-02-11T09:00:00.000Z",
|
||||
"trashed": true
|
||||
}
|
||||
],
|
||||
"fake-folder-projects": [
|
||||
{
|
||||
"id": "fake-file-roadmap",
|
||||
"name": "2025-Roadmap.md",
|
||||
"mimeType": "text/markdown",
|
||||
"modifiedTime": "2025-02-12T08:30:00.000Z",
|
||||
"createdTime": "2025-01-05T10:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
"root": [
|
||||
{
|
||||
"id": "fake-folder-projects",
|
||||
"name": "Projects",
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"modifiedTime": "2025-01-15T10:00:00.000Z",
|
||||
"createdTime": "2024-12-01T08:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-folder-archive",
|
||||
"name": "Archive",
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"modifiedTime": "2024-11-20T14:30:00.000Z",
|
||||
"createdTime": "2024-09-10T12:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-readme",
|
||||
"name": "README.md",
|
||||
"mimeType": "text/markdown",
|
||||
"modifiedTime": "2025-02-01T09:15:00.000Z",
|
||||
"createdTime": "2025-01-30T16:20:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-canary",
|
||||
"name": "e2e-canary.txt",
|
||||
"mimeType": "text/plain",
|
||||
"modifiedTime": "2025-02-10T11:00:00.000Z",
|
||||
"createdTime": "2025-02-10T11:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-pdf-native",
|
||||
"name": "e2e-canary.pdf",
|
||||
"mimeType": "application/pdf",
|
||||
"size": 735,
|
||||
"modifiedTime": "2025-02-10T11:05:00.000Z",
|
||||
"createdTime": "2025-02-10T11:05:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-pdf-composio",
|
||||
"name": "e2e-composio-canary.pdf",
|
||||
"mimeType": "application/pdf",
|
||||
"size": 748,
|
||||
"modifiedTime": "2025-02-10T11:10:00.000Z",
|
||||
"createdTime": "2025-02-10T11:10:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-budget",
|
||||
"name": "Q1-Budget.csv",
|
||||
"mimeType": "text/csv",
|
||||
"modifiedTime": "2025-01-25T13:45:00.000Z",
|
||||
"createdTime": "2025-01-25T13:45:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-shortcut-canary",
|
||||
"name": "Shortcut to Canary",
|
||||
"mimeType": "application/vnd.google-apps.shortcut",
|
||||
"modifiedTime": "2025-02-10T12:00:00.000Z",
|
||||
"createdTime": "2025-02-10T12:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "fake-file-trashed",
|
||||
"name": "trashed-e2e-note.txt",
|
||||
"mimeType": "text/plain",
|
||||
"modifiedTime": "2025-02-11T09:00:00.000Z",
|
||||
"createdTime": "2025-02-11T09:00:00.000Z",
|
||||
"trashed": true
|
||||
}
|
||||
],
|
||||
"fake-folder-projects": [
|
||||
{
|
||||
"id": "fake-file-roadmap",
|
||||
"name": "2025-Roadmap.md",
|
||||
"mimeType": "text/markdown",
|
||||
"modifiedTime": "2025-02-12T08:30:00.000Z",
|
||||
"createdTime": "2025-01-05T10:00:00.000Z"
|
||||
}
|
||||
],
|
||||
"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",
|
||||
"id": "id:fake-dropbox-canary",
|
||||
"name": "e2e-dropbox-canary.txt",
|
||||
"path_lower": "/e2e-dropbox-canary.txt",
|
||||
"path_display": "/e2e-dropbox-canary.txt",
|
||||
"size": 152,
|
||||
"is_downloadable": true,
|
||||
"server_modified": "2026-05-08T00:00:00Z",
|
||||
"client_modified": "2026-05-08T00:00:00Z",
|
||||
"content_hash": "fake-dropbox-hash-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."
|
||||
}
|
||||
"": [
|
||||
{
|
||||
".tag": "file",
|
||||
"id": "id:fake-dropbox-canary",
|
||||
"name": "e2e-dropbox-canary.txt",
|
||||
"path_lower": "/e2e-dropbox-canary.txt",
|
||||
"path_display": "/e2e-dropbox-canary.txt",
|
||||
"size": 152,
|
||||
"is_downloadable": true,
|
||||
"server_modified": "2026-05-08T00:00:00Z",
|
||||
"client_modified": "2026-05-08T00:00:00Z",
|
||||
"content_hash": "fake-dropbox-hash-001"
|
||||
},
|
||||
{
|
||||
".tag": "file",
|
||||
"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": [
|
||||
{
|
||||
"id": "fake-onedrive-folder-projects",
|
||||
"name": "Projects",
|
||||
"size": 0,
|
||||
"folder": {
|
||||
"childCount": 1
|
||||
},
|
||||
"parentReference": {
|
||||
"id": "root",
|
||||
"path": "/drive/root:"
|
||||
},
|
||||
"createdDateTime": "2025-02-01T08:00:00Z",
|
||||
"lastModifiedDateTime": "2025-02-10T10:00:00Z",
|
||||
"webUrl": "https://onedrive.example/fake/projects"
|
||||
},
|
||||
{
|
||||
"id": "fake-onedrive-canary",
|
||||
"name": "e2e-onedrive-canary.txt",
|
||||
"size": 164,
|
||||
"file": {
|
||||
"mimeType": "text/plain",
|
||||
"hashes": {
|
||||
"quickXorHash": "fake-onedrive-canary-qxh"
|
||||
}
|
||||
},
|
||||
"parentReference": {
|
||||
"id": "root",
|
||||
"path": "/drive/root:"
|
||||
},
|
||||
"createdDateTime": "2025-02-10T11:00:00Z",
|
||||
"lastModifiedDateTime": "2025-02-10T11:00:00Z",
|
||||
"webUrl": "https://onedrive.example/fake/e2e-onedrive-canary.txt"
|
||||
}
|
||||
],
|
||||
"fake-onedrive-folder-projects": [
|
||||
{
|
||||
"id": "fake-onedrive-roadmap",
|
||||
"name": "OneDrive Roadmap.md",
|
||||
"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"
|
||||
}
|
||||
"root": [
|
||||
{
|
||||
"id": "fake-onedrive-folder-projects",
|
||||
"name": "Projects",
|
||||
"size": 0,
|
||||
"folder": {
|
||||
"childCount": 1
|
||||
},
|
||||
"parentReference": {
|
||||
"id": "root",
|
||||
"path": "/drive/root:"
|
||||
},
|
||||
"createdDateTime": "2025-02-01T08:00:00Z",
|
||||
"lastModifiedDateTime": "2025-02-10T10:00:00Z",
|
||||
"webUrl": "https://onedrive.example/fake/projects"
|
||||
},
|
||||
{
|
||||
"id": "fake-onedrive-canary",
|
||||
"name": "e2e-onedrive-canary.txt",
|
||||
"size": 164,
|
||||
"file": {
|
||||
"mimeType": "text/plain",
|
||||
"hashes": {
|
||||
"quickXorHash": "fake-onedrive-canary-qxh"
|
||||
}
|
||||
},
|
||||
"parentReference": {
|
||||
"id": "root",
|
||||
"path": "/drive/root:"
|
||||
},
|
||||
"createdDateTime": "2025-02-10T11:00:00Z",
|
||||
"lastModifiedDateTime": "2025-02-10T11:00:00Z",
|
||||
"webUrl": "https://onedrive.example/fake/e2e-onedrive-canary.txt"
|
||||
},
|
||||
{
|
||||
"id": "fake-onedrive-pdf-canary",
|
||||
"name": "e2e-onedrive-canary.pdf",
|
||||
"size": 730,
|
||||
"file": {
|
||||
"mimeType": "application/pdf",
|
||||
"hashes": {
|
||||
"quickXorHash": "fake-onedrive-pdf-canary-qxh"
|
||||
}
|
||||
},
|
||||
"parentReference": {
|
||||
"id": "root",
|
||||
"path": "/drive/root:"
|
||||
},
|
||||
"createdDateTime": "2025-02-10T11:05:00Z",
|
||||
"lastModifiedDateTime": "2025-02-10T11:05:00Z",
|
||||
"webUrl": "https://onedrive.example/fake/e2e-onedrive-canary.pdf"
|
||||
}
|
||||
],
|
||||
"fake-onedrive-folder-projects": [
|
||||
{
|
||||
"id": "fake-onedrive-roadmap",
|
||||
"name": "OneDrive Roadmap.md",
|
||||
"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