(core) forward more kinds of edits to a virtual table

Summary:
Some edits to virtual tables (such as webhook lists) happen
via a route that was not yet handled. Actually Cyprien (the
original author) had handled this case but it got removed
because I didn't know what it was for :-). This brings back
support for edits by this route.

Test Plan: added a test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3924
This commit is contained in:
Paul Fitzpatrick
2023-06-15 16:12:19 -04:00
parent d88f79bc5e
commit 7d3b4b49d5
3 changed files with 34 additions and 6 deletions

View File

@@ -249,6 +249,21 @@ describe('WebhookPage', function () {
await driver.close();
await driver.switchTo().window(ownerTab);
});
/**
* Checks that a particular route to modifying cells in a virtual table
* is in place (previously it was not).
*/
it('can paste into a cell without clicking into it', async function() {
await openWebhookPage();
await setField(1, 'Name', '1234');
await gu.waitForServer();
await gu.sendKeys(await gu.copyKey());
await gu.getDetailCell({col: 'Memo', rowNum: 1}).click();
await gu.sendKeys(await gu.pasteKey());
await gu.waitForServer();
assert.equal(await getField(1, 'Memo'), '1234');
});
});
async function setField(rowNum: number, col: string, text: string) {