fix(Google Sheets Node): RMC should correctly map columns if data location set in options (#13116)

Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
This commit is contained in:
Michael Kret
2025-02-10 11:30:33 +02:00
committed by GitHub
parent da837feb26
commit 5d05f7f436
4 changed files with 157 additions and 5 deletions

View File

@@ -458,6 +458,27 @@ describe('Test Google Sheets, checkForSchemaChanges', () => {
] as ResourceMapperField[]),
).toThrow("Column names were updated after the node's setup");
});
it('should filter out empty columns without throwing an error', async () => {
const node: INode = {
id: '1',
name: 'Google Sheets',
typeVersion: 4.4,
type: 'n8n-nodes-base.googleSheets',
position: [60, 760],
parameters: {
operation: 'append',
},
};
expect(() =>
checkForSchemaChanges(node, ['', '', 'id', 'name', 'data'], [
{ id: 'id' },
{ id: 'name' },
{ id: 'data' },
] as ResourceMapperField[]),
).not.toThrow();
});
});
describe('Test Google Sheets, getSpreadsheetId', () => {