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,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'],
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user