Attempts to make DropdownConditionEditor tests less flaky (#1026)

Attempts to fix "DropdownConditionEditor in choice columns creates
dropdown conditions", and adds comments to inform future investigators.
This commit is contained in:
Spoffy 2024-06-07 20:07:25 +01:00 committed by GitHub
parent c3e23ca81e
commit caa1acdd0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,8 +30,13 @@ describe('DropdownConditionEditor', function () {
're\nc\n.Supervisor\n ', 're\nc\n.Supervisor\n ',
]); ]);
}); });
await gu.sendKeysSlowly(['hoice not in $']); await gu.sendKeysSlowly(['hoice not in ']);
// Attempts to reduce test flakiness by delaying input of $. Not guaranteed to do anything.
await driver.sleep(100);
await gu.sendKeys('$');
await gu.waitToPass(async () => { await gu.waitToPass(async () => {
// This test is sometimes flaky here. It will consistently return the wrong value, usually an array of
// empty strings. The running theory is it's an issue in Ace editor.
const completions = await driver.findAll('.ace_autocomplete .ace_line', el => el.getText()); const completions = await driver.findAll('.ace_autocomplete .ace_line', el => el.getText());
assert.deepEqual(completions, [ assert.deepEqual(completions, [
'$\nName\n ', '$\nName\n ',