From caa1acdd0deccd4b50cb22cb41bdc33589cf4a9b Mon Sep 17 00:00:00 2001 From: Spoffy <4805393+Spoffy@users.noreply.github.com> Date: Fri, 7 Jun 2024 20:07:25 +0100 Subject: [PATCH] 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. --- test/nbrowser/DropdownConditionEditor.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/nbrowser/DropdownConditionEditor.ts b/test/nbrowser/DropdownConditionEditor.ts index cdab44ab..e8ce7ac7 100644 --- a/test/nbrowser/DropdownConditionEditor.ts +++ b/test/nbrowser/DropdownConditionEditor.ts @@ -30,8 +30,13 @@ describe('DropdownConditionEditor', function () { '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 () => { + // 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()); assert.deepEqual(completions, [ '$\nName\n ',