From 632a2b00c5d7b0adbf99d1a2562aeacdfda6d3ac Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Mon, 13 May 2024 17:18:29 -0400 Subject: [PATCH] wait for text to appear --- test/nbrowser/Boot.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/nbrowser/Boot.ts b/test/nbrowser/Boot.ts index 0529e749..25e5b788 100644 --- a/test/nbrowser/Boot.ts +++ b/test/nbrowser/Boot.ts @@ -16,9 +16,12 @@ describe('Boot', function() { afterEach(() => gu.checkForErrors()); async function hasPrompt() { - assert.include( - await driver.findContentWait('pre', /GRIST_BOOT_KEY/, 2000).getText(), - 'GRIST_BOOT_KEY=secret'); + // There is some glitchiness to when the text appears. + gu.waitToPass(async () => { + assert.include( + await driver.findContentWait('pre', /GRIST_BOOT_KEY/, 2000).getText(), + 'GRIST_BOOT_KEY=secret'); + }, 3000); } it('tells user about /admin', async function() {