(core) updates from grist-core

This commit is contained in:
Paul Fitzpatrick
2024-05-13 09:06:59 -04:00
7 changed files with 40 additions and 20 deletions

View File

@@ -157,11 +157,11 @@ describe('DropdownConditionEditor', function () {
'choice\n.Supervisor\n '
]);
});
await gu.sendKeys('.Role == "Supervisor" and $Role != "Supervisor"', Key.ENTER);
await gu.sendKeys('.Role == "Supervisor" and $Role != "Supervisor" and $id != 2', Key.ENTER);
await gu.waitForServer();
assert.equal(
await driver.find('.test-field-dropdown-condition .ace_line').getAttribute('textContent'),
'choice.Role == "Supervisor" and $Role != "Supervisor"\n'
'choice.Role == "Supervisor" and $Role != "Supervisor" and $id != 2\n'
);
// Check that autocomplete values are filtered.
@@ -171,6 +171,23 @@ describe('DropdownConditionEditor', function () {
'Marie Ziyad',
]);
await gu.sendKeys(Key.ESCAPE);
// Should be no options on row 2 because of $id != 2 part of condition.
await gu.getCell(2, 2).click();
await gu.sendKeys(Key.ENTER);
assert.deepEqual(await driver.findAll('.test-autocomplete li', (el) => el.getText()), [
]);
await gu.sendKeys(Key.ESCAPE);
// Row 3 should be like row 1.
await gu.getCell(2, 3).click();
await gu.sendKeys(Key.ENTER);
assert.deepEqual(await driver.findAll('.test-autocomplete li', (el) => el.getText()), [
'Pavan Madilyn',
'Marie Ziyad',
]);
await gu.sendKeys(Key.ESCAPE);
await gu.getCell(2, 4).click();
await gu.sendKeys(Key.ENTER);
assert.isEmpty(await driver.findAll('.test-autocomplete li', (el) => el.getText()));
@@ -187,7 +204,7 @@ describe('DropdownConditionEditor', function () {
await gu.setType('Reference List', {apply: true});
assert.equal(
await driver.find('.test-field-dropdown-condition .ace_line').getAttribute('textContent'),
'choice.Role == "Supervisor" and $Role != "Supervisor"\n'
'choice.Role == "Supervisor" and $Role != "Supervisor" and $id != 2\n'
);
await gu.getCell(2, 4).click();
await gu.sendKeys(Key.ENTER);