mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Overhaul nodes-testing setup - Part 2 (no-changelog) (#14873)
This commit is contained in:
committed by
GitHub
parent
897338bd24
commit
91069f057e
@@ -0,0 +1,8 @@
|
||||
export const credentials = {
|
||||
microsoftExcelOAuth2Api: {
|
||||
scope: 'openid',
|
||||
oauthTokenData: {
|
||||
access_token: 'token',
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, table => addTable', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.post(
|
||||
@@ -23,5 +25,5 @@ describe('Test MicrosoftExcelV2, table => addTable', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/table/addTable.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, table => append', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -24,5 +26,5 @@ describe('Test MicrosoftExcelV2, table => append', () => {
|
||||
.reply(200);
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/table/append.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, table => convertToRange', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.post(
|
||||
@@ -19,5 +21,5 @@ describe('Test MicrosoftExcelV2, table => convertToRange', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/table/convertToRange.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, table => deleteTable', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.delete(
|
||||
@@ -10,5 +12,5 @@ describe('Test MicrosoftExcelV2, table => deleteTable', () => {
|
||||
.reply(200);
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/table/deleteTable.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, table => getColumns', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -21,5 +23,5 @@ describe('Test MicrosoftExcelV2, table => getColumns', () => {
|
||||
.reply(200, { value: [] });
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/table/getColumns.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, table => getRows', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -30,5 +32,5 @@ describe('Test MicrosoftExcelV2, table => getRows', () => {
|
||||
.reply(200, { value: [] });
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/table/getRows.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, table => lookup', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -38,5 +40,5 @@ describe('Test MicrosoftExcelV2, table => lookup', () => {
|
||||
.reply(200, { value: [] });
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/table/lookup.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, workbook => addWorksheet', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.post('/drive/items/01FUWX3BQ4ATCOZNR265GLA6IJEZDQUE4I/workbook/createSession', {
|
||||
@@ -22,5 +24,5 @@ describe('Test MicrosoftExcelV2, workbook => addWorksheet', () => {
|
||||
.reply(200);
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/workbook/addWorksheet.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,11 +2,13 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, workbook => deleteWorkbook', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.delete('/drive/items/01FUWX3BXJLISGF2CFWBGYPHXFCXPXOJUK')
|
||||
.reply(200);
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/workbook/deleteWorkbook.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, workbook => getAll', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get("/drive/root/search(q='.xlsx')?%24select=name&%24top=2")
|
||||
@@ -19,5 +21,5 @@ describe('Test MicrosoftExcelV2, workbook => getAll', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/workbook/getAll.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, worksheet => append', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -38,5 +40,5 @@ describe('Test MicrosoftExcelV2, worksheet => append', () => {
|
||||
.reply(200, { values: [[4, 'Don', 37, 'data 44']] });
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/worksheet/append.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, worksheet => clear', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.post(
|
||||
@@ -13,5 +15,5 @@ describe('Test MicrosoftExcelV2, worksheet => clear', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/worksheet/clear.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, worksheet => deleteWorksheet', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.delete(
|
||||
@@ -12,5 +14,5 @@ describe('Test MicrosoftExcelV2, worksheet => deleteWorksheet', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/worksheet/deleteWorksheet.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, worksheet => getAll', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -25,5 +27,5 @@ describe('Test MicrosoftExcelV2, worksheet => getAll', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/worksheet/getAll.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, worksheet => readRows', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -27,5 +29,5 @@ describe('Test MicrosoftExcelV2, worksheet => readRows', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/worksheet/readRows.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, worksheet => update', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -52,5 +54,5 @@ describe('Test MicrosoftExcelV2, worksheet => update', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/worksheet/update.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
@@ -2,6 +2,8 @@ import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
import { credentials } from '../../../credentials';
|
||||
|
||||
describe('Test MicrosoftExcelV2, worksheet => upsert', () => {
|
||||
nock('https://graph.microsoft.com/v1.0/me')
|
||||
.get(
|
||||
@@ -54,5 +56,5 @@ describe('Test MicrosoftExcelV2, worksheet => upsert', () => {
|
||||
});
|
||||
|
||||
const workflows = ['nodes/Microsoft/Excel/test/v2/node/worksheet/upsert.workflow.json'];
|
||||
testWorkflows(workflows);
|
||||
testWorkflows(workflows, credentials);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user