mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Webhook trigger update by column (#832)
Add functionality to filter webhooks based on a column or columns.
This commit is contained in:
@@ -34,6 +34,7 @@ describe('WebhookOverflow', function () {
|
||||
enabled: true,
|
||||
name: 'test webhook',
|
||||
tableId: 'Table2',
|
||||
watchedColIds: []
|
||||
};
|
||||
await docApi.addWebhook(webhookDetails);
|
||||
await docApi.addWebhook(webhookDetails);
|
||||
|
||||
@@ -55,6 +55,7 @@ describe('WebhookPage', function () {
|
||||
'URL',
|
||||
'Table',
|
||||
'Ready Column',
|
||||
'Filter for changes in these columns (semicolon-separated ids)',
|
||||
'Webhook Id',
|
||||
'Enabled',
|
||||
'Status',
|
||||
@@ -80,15 +81,17 @@ describe('WebhookPage', function () {
|
||||
await gu.waitToPass(async () => {
|
||||
assert.equal(await getField(1, 'Webhook Id'), id);
|
||||
});
|
||||
// Now other fields like name and memo are persisted.
|
||||
// Now other fields like name, memo and watchColIds are persisted.
|
||||
await setField(1, 'Name', 'Test Webhook');
|
||||
await setField(1, 'Memo', 'Test Memo');
|
||||
await setField(1, 'Filter for changes in these columns (semicolon-separated ids)', 'A; B');
|
||||
await gu.waitForServer();
|
||||
await driver.navigate().refresh();
|
||||
await waitForWebhookPage();
|
||||
await gu.waitToPass(async () => {
|
||||
assert.equal(await getField(1, 'Name'), 'Test Webhook');
|
||||
assert.equal(await getField(1, 'Memo'), 'Test Memo');
|
||||
assert.equal(await getField(1, 'Filter for changes in these columns (semicolon-separated ids)'), 'A;B');
|
||||
});
|
||||
// Make sure the webhook is actually working.
|
||||
await docApi.addRows('Table1', {A: ['zig'], B: ['zag']});
|
||||
|
||||
Reference in New Issue
Block a user