first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
|
||||
import nock from 'nock';
|
||||
|
||||
const API_RESPONSE = {
|
||||
object: 'page',
|
||||
id: '15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3',
|
||||
created_time: '2024-12-13T04:45:00.000Z',
|
||||
last_edited_time: '2024-12-13T04:45:00.000Z',
|
||||
created_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
last_edited_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
cover: null,
|
||||
icon: {
|
||||
type: 'emoji',
|
||||
emoji: '😗',
|
||||
},
|
||||
parent: {
|
||||
type: 'database_id',
|
||||
database_id: '138fb9cb-4cf0-804c-8663-d8ecdd5e692f',
|
||||
},
|
||||
archived: false,
|
||||
in_trash: false,
|
||||
properties: {
|
||||
Tags: {
|
||||
id: '%40~Tp',
|
||||
type: 'multi_select',
|
||||
multi_select: [],
|
||||
},
|
||||
Name: {
|
||||
id: 'title',
|
||||
type: 'title',
|
||||
title: [
|
||||
{
|
||||
type: 'text',
|
||||
text: {
|
||||
content: 'new name 1',
|
||||
link: null,
|
||||
},
|
||||
annotations: {
|
||||
bold: false,
|
||||
italic: false,
|
||||
strikethrough: false,
|
||||
underline: false,
|
||||
code: false,
|
||||
color: 'default',
|
||||
},
|
||||
plain_text: 'new name 1',
|
||||
href: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
url: 'https://www.notion.so/new-name-1-15bfb9cb4cf081c7aab4c5855b8cb6c3',
|
||||
public_url: null,
|
||||
request_id: '1416702d-daa8-4f8d-9be3-c55fe52486b5',
|
||||
};
|
||||
|
||||
describe('Test NotionV2, databasePage => create', () => {
|
||||
nock('https://api.notion.com')
|
||||
.get('/v1/databases/138fb9cb-4cf0-804c-8663-d8ecdd5e692f')
|
||||
.reply(200, {
|
||||
properties: {
|
||||
Tags: {
|
||||
id: '%40~Tp',
|
||||
name: 'Tags',
|
||||
type: 'multi_select',
|
||||
multi_select: {
|
||||
options: [],
|
||||
},
|
||||
},
|
||||
Name: {
|
||||
id: 'title',
|
||||
name: 'Name',
|
||||
type: 'title',
|
||||
title: {},
|
||||
},
|
||||
},
|
||||
})
|
||||
.post('/v1/pages', {
|
||||
parent: { database_id: '138fb9cb-4cf0-804c-8663-d8ecdd5e692f' },
|
||||
properties: { Name: { title: [{ text: { content: 'new name 1' } }] } },
|
||||
children: [
|
||||
{
|
||||
object: 'block',
|
||||
type: 'paragraph',
|
||||
paragraph: { text: [{ text: { content: 'new text' } }] },
|
||||
},
|
||||
{
|
||||
object: 'block',
|
||||
type: 'toggle',
|
||||
toggle: { text: [{ text: { content: 'new toggle' } }] },
|
||||
},
|
||||
],
|
||||
icon: { emoji: '😗' },
|
||||
})
|
||||
.reply(200, API_RESPONSE);
|
||||
|
||||
new NodeTestHarness().setupTests({
|
||||
workflowFiles: ['create.workflow.json'],
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"name": "tests notion",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "4260fdbd-e92f-4712-8114-38b85f8289ea",
|
||||
"name": "When clicking ‘Execute workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [820, 360]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "databasePage",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"value": "138fb9cb-4cf0-804c-8663-d8ecdd5e692f",
|
||||
"mode": "list",
|
||||
"cachedResultName": "TEST_DB",
|
||||
"cachedResultUrl": "https://www.notion.so/138fb9cb4cf0804c8663d8ecdd5e692f"
|
||||
},
|
||||
"title": "new page",
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Name|title",
|
||||
"title": "new name 1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"blockUi": {
|
||||
"blockValues": [
|
||||
{
|
||||
"textContent": "new text"
|
||||
},
|
||||
{
|
||||
"type": "toggle",
|
||||
"textContent": "new toggle"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"iconType": "emoji",
|
||||
"icon": "😗"
|
||||
}
|
||||
},
|
||||
"id": "5ab80e6a-c9c4-4cc5-9332-2fc7a3f8ae24",
|
||||
"name": "Notion",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"typeVersion": 2.2,
|
||||
"position": [1040, 360],
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "CiZXWkDmjiZzpcL1",
|
||||
"name": "Notion account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "a664f506-72a5-4e50-80b4-97ed2e6eb334",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"typeVersion": 1,
|
||||
"position": [1260, 360]
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"No Operation, do nothing": [
|
||||
{
|
||||
"json": {
|
||||
"id": "15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3",
|
||||
"name": "new name 1",
|
||||
"url": "https://www.notion.so/new-name-1-15bfb9cb4cf081c7aab4c5855b8cb6c3",
|
||||
"property_tags": [],
|
||||
"property_name": "new name 1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"When clicking ‘Execute workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Notion",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Notion": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "5f4f1112-c094-44b6-bc05-005b54190852",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "be251a83c052a9862eeac953816fbb1464f89dfbf79d7ac490a8e336a8cc8bfd"
|
||||
},
|
||||
"id": "Ucav6QC99JNMCkd3",
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
|
||||
import nock from 'nock';
|
||||
|
||||
const API_RESPONSE = {
|
||||
object: 'page',
|
||||
id: '15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3',
|
||||
created_time: '2024-12-13T04:45:00.000Z',
|
||||
last_edited_time: '2024-12-13T04:45:00.000Z',
|
||||
created_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
last_edited_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
cover: null,
|
||||
icon: {
|
||||
type: 'emoji',
|
||||
emoji: '😗',
|
||||
},
|
||||
parent: {
|
||||
type: 'database_id',
|
||||
database_id: '138fb9cb-4cf0-804c-8663-d8ecdd5e692f',
|
||||
},
|
||||
archived: false,
|
||||
in_trash: false,
|
||||
properties: {
|
||||
Tags: {
|
||||
id: '%40~Tp',
|
||||
type: 'multi_select',
|
||||
multi_select: [],
|
||||
},
|
||||
Name: {
|
||||
id: 'title',
|
||||
type: 'title',
|
||||
title: [
|
||||
{
|
||||
type: 'text',
|
||||
text: {
|
||||
content: 'new name 1',
|
||||
link: null,
|
||||
},
|
||||
annotations: {
|
||||
bold: false,
|
||||
italic: false,
|
||||
strikethrough: false,
|
||||
underline: false,
|
||||
code: false,
|
||||
color: 'default',
|
||||
},
|
||||
plain_text: 'new name 1',
|
||||
href: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
url: 'https://www.notion.so/new-name-1-15bfb9cb4cf081c7aab4c5855b8cb6c3',
|
||||
public_url: null,
|
||||
request_id: 'c01d3a3e-d9c3-4e48-8d73-077a8503c3ba',
|
||||
};
|
||||
|
||||
describe('Test NotionV2, databasePage => get', () => {
|
||||
nock('https://api.notion.com')
|
||||
.get('/v1/pages/15bfb9cb4cf081c7aab4c5855b8cb6c3')
|
||||
.reply(200, API_RESPONSE);
|
||||
|
||||
new NodeTestHarness().setupTests({
|
||||
workflowFiles: ['get.workflow.json'],
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"name": "tests notion",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "4260fdbd-e92f-4712-8114-38b85f8289ea",
|
||||
"name": "When clicking ‘Execute workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [820, 360]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "databasePage",
|
||||
"operation": "get",
|
||||
"pageId": {
|
||||
"__rl": true,
|
||||
"value": "https://www.notion.so/138fb9cb4cf0804c8663d8ecdd5e692f?v=7bcc03614eed4c95a9e6168c040e9c58&p=15bfb9cb4cf081c7aab4c5855b8cb6c3&pm=s",
|
||||
"mode": "url"
|
||||
}
|
||||
},
|
||||
"id": "5ab80e6a-c9c4-4cc5-9332-2fc7a3f8ae24",
|
||||
"name": "Notion",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"typeVersion": 2.2,
|
||||
"position": [1040, 360],
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "CiZXWkDmjiZzpcL1",
|
||||
"name": "Notion account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "a664f506-72a5-4e50-80b4-97ed2e6eb334",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"typeVersion": 1,
|
||||
"position": [1260, 360]
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"No Operation, do nothing": [
|
||||
{
|
||||
"json": {
|
||||
"id": "15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3",
|
||||
"name": "new name 1",
|
||||
"url": "https://www.notion.so/new-name-1-15bfb9cb4cf081c7aab4c5855b8cb6c3",
|
||||
"property_tags": [],
|
||||
"property_name": "new name 1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"When clicking ‘Execute workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Notion",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Notion": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "68afba7e-c066-458c-984b-c758ef92463c",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "be251a83c052a9862eeac953816fbb1464f89dfbf79d7ac490a8e336a8cc8bfd"
|
||||
},
|
||||
"id": "Ucav6QC99JNMCkd3",
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
|
||||
import nock from 'nock';
|
||||
|
||||
const API_RESPONSE = {
|
||||
results: [
|
||||
{
|
||||
object: 'page',
|
||||
id: '15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3',
|
||||
created_time: '2024-12-13T04:45:00.000Z',
|
||||
last_edited_time: '2024-12-13T04:45:00.000Z',
|
||||
created_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
last_edited_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
cover: null,
|
||||
icon: {
|
||||
type: 'emoji',
|
||||
emoji: '😗',
|
||||
},
|
||||
parent: {
|
||||
type: 'database_id',
|
||||
database_id: '138fb9cb-4cf0-804c-8663-d8ecdd5e692f',
|
||||
},
|
||||
archived: false,
|
||||
in_trash: false,
|
||||
properties: {
|
||||
Tags: {
|
||||
id: '%40~Tp',
|
||||
type: 'multi_select',
|
||||
multi_select: [],
|
||||
},
|
||||
Name: {
|
||||
id: 'title',
|
||||
type: 'title',
|
||||
title: [
|
||||
{
|
||||
type: 'text',
|
||||
text: {
|
||||
content: 'new name 1',
|
||||
link: null,
|
||||
},
|
||||
annotations: {
|
||||
bold: false,
|
||||
italic: false,
|
||||
strikethrough: false,
|
||||
underline: false,
|
||||
code: false,
|
||||
color: 'default',
|
||||
},
|
||||
plain_text: 'new name 1',
|
||||
href: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
url: 'https://www.notion.so/new-name-1-15bfb9cb4cf081c7aab4c5855b8cb6c3',
|
||||
public_url: null,
|
||||
},
|
||||
],
|
||||
has_more: false,
|
||||
};
|
||||
|
||||
describe('Test NotionV2, databasePage => getAll', () => {
|
||||
nock('https://api.notion.com')
|
||||
.post('/v1/databases/138fb9cb-4cf0-804c-8663-d8ecdd5e692f/query', {
|
||||
filter: { or: [{ property: 'Name', title: { contains: 'new' } }] },
|
||||
sorts: [{ direction: 'ascending', property: 'Name' }],
|
||||
})
|
||||
.reply(200, API_RESPONSE);
|
||||
|
||||
new NodeTestHarness().setupTests({
|
||||
workflowFiles: ['getAll.workflow.json'],
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"name": "tests notion",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "4260fdbd-e92f-4712-8114-38b85f8289ea",
|
||||
"name": "When clicking ‘Execute workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [820, 360]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "databasePage",
|
||||
"operation": "getAll",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"value": "138fb9cb-4cf0-804c-8663-d8ecdd5e692f",
|
||||
"mode": "list",
|
||||
"cachedResultName": "TEST_DB",
|
||||
"cachedResultUrl": "https://www.notion.so/138fb9cb4cf0804c8663d8ecdd5e692f"
|
||||
},
|
||||
"returnAll": true,
|
||||
"filterType": "manual",
|
||||
"filters": {
|
||||
"conditions": [
|
||||
{
|
||||
"key": "Name|title",
|
||||
"condition": "contains",
|
||||
"titleValue": "new"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"sort": {
|
||||
"sortValue": [
|
||||
{
|
||||
"key": "Name|title",
|
||||
"direction": "ascending"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "5ab80e6a-c9c4-4cc5-9332-2fc7a3f8ae24",
|
||||
"name": "Notion",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"typeVersion": 2.2,
|
||||
"position": [1040, 360],
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "CiZXWkDmjiZzpcL1",
|
||||
"name": "Notion account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "a664f506-72a5-4e50-80b4-97ed2e6eb334",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"typeVersion": 1,
|
||||
"position": [1260, 360]
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"No Operation, do nothing": [
|
||||
{
|
||||
"json": {
|
||||
"id": "15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3",
|
||||
"name": "new name 1",
|
||||
"url": "https://www.notion.so/new-name-1-15bfb9cb4cf081c7aab4c5855b8cb6c3",
|
||||
"property_tags": [],
|
||||
"property_name": "new name 1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"When clicking ‘Execute workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Notion",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Notion": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "c69706eb-f8e8-4fe0-b456-23e482743d1c",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "be251a83c052a9862eeac953816fbb1464f89dfbf79d7ac490a8e336a8cc8bfd"
|
||||
},
|
||||
"id": "Ucav6QC99JNMCkd3",
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
|
||||
import nock from 'nock';
|
||||
|
||||
const API_RESPONSE = {
|
||||
object: 'page',
|
||||
id: '15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3',
|
||||
created_time: '2024-12-13T04:45:00.000Z',
|
||||
last_edited_time: '2024-12-13T05:21:00.000Z',
|
||||
created_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
last_edited_by: {
|
||||
object: 'user',
|
||||
id: 'f215e49c-4677-40c0-9adc-87440d341324',
|
||||
},
|
||||
cover: null,
|
||||
icon: {
|
||||
type: 'emoji',
|
||||
emoji: '😗',
|
||||
},
|
||||
parent: {
|
||||
type: 'database_id',
|
||||
database_id: '138fb9cb-4cf0-804c-8663-d8ecdd5e692f',
|
||||
},
|
||||
archived: false,
|
||||
in_trash: false,
|
||||
properties: {
|
||||
Tags: {
|
||||
id: '%40~Tp',
|
||||
type: 'multi_select',
|
||||
multi_select: [],
|
||||
},
|
||||
Name: {
|
||||
id: 'title',
|
||||
type: 'title',
|
||||
title: [
|
||||
{
|
||||
type: 'text',
|
||||
text: {
|
||||
content: 'Updated Name',
|
||||
link: null,
|
||||
},
|
||||
annotations: {
|
||||
bold: false,
|
||||
italic: false,
|
||||
strikethrough: false,
|
||||
underline: false,
|
||||
code: false,
|
||||
color: 'default',
|
||||
},
|
||||
plain_text: 'Updated Name',
|
||||
href: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
url: 'https://www.notion.so/Updated-Name-15bfb9cb4cf081c7aab4c5855b8cb6c3',
|
||||
public_url: null,
|
||||
request_id: 'a4683091-f165-4f10-92b4-a629b8b1266e',
|
||||
};
|
||||
|
||||
describe('Test NotionV2, databasePage => update', () => {
|
||||
nock('https://api.notion.com')
|
||||
.patch('/v1/pages/15bfb9cb4cf081c7aab4c5855b8cb6c3', {
|
||||
properties: { Name: { title: [{ text: { content: 'Updated Name' } }] } },
|
||||
})
|
||||
.reply(200, API_RESPONSE);
|
||||
|
||||
new NodeTestHarness().setupTests({
|
||||
workflowFiles: ['update.workflow.json'],
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"name": "tests notion",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "4260fdbd-e92f-4712-8114-38b85f8289ea",
|
||||
"name": "When clicking ‘Execute workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [820, 360]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "databasePage",
|
||||
"operation": "update",
|
||||
"pageId": {
|
||||
"__rl": true,
|
||||
"value": "https://www.notion.so/new-name-1-15bfb9cb4cf081c7aab4c5855b8cb6c3",
|
||||
"mode": "url"
|
||||
},
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Name|title",
|
||||
"title": "Updated Name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "5ab80e6a-c9c4-4cc5-9332-2fc7a3f8ae24",
|
||||
"name": "Notion",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"typeVersion": 2.2,
|
||||
"position": [1040, 360],
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "CiZXWkDmjiZzpcL1",
|
||||
"name": "Notion account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "a664f506-72a5-4e50-80b4-97ed2e6eb334",
|
||||
"name": "No Operation, do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"typeVersion": 1,
|
||||
"position": [1260, 360]
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"No Operation, do nothing": [
|
||||
{
|
||||
"json": {
|
||||
"id": "15bfb9cb-4cf0-81c7-aab4-c5855b8cb6c3",
|
||||
"name": "Updated Name",
|
||||
"url": "https://www.notion.so/Updated-Name-15bfb9cb4cf081c7aab4c5855b8cb6c3",
|
||||
"property_tags": [],
|
||||
"property_name": "Updated Name"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"When clicking ‘Execute workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Notion",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Notion": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "No Operation, do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": false,
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "ab4a62f2-5d45-456a-ac7a-97cf84e78815",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "be251a83c052a9862eeac953816fbb1464f89dfbf79d7ac490a8e336a8cc8bfd"
|
||||
},
|
||||
"id": "Ucav6QC99JNMCkd3",
|
||||
"tags": []
|
||||
}
|
||||
Reference in New Issue
Block a user