wait for text to appear

This commit is contained in:
Paul Fitzpatrick 2024-05-13 17:18:29 -04:00
parent ae781ff0d4
commit 632a2b00c5
No known key found for this signature in database
GPG Key ID: 07F16BF3214888F6

View File

@ -16,9 +16,12 @@ describe('Boot', function() {
afterEach(() => gu.checkForErrors()); afterEach(() => gu.checkForErrors());
async function hasPrompt() { async function hasPrompt() {
assert.include( // There is some glitchiness to when the text appears.
await driver.findContentWait('pre', /GRIST_BOOT_KEY/, 2000).getText(), gu.waitToPass(async () => {
'GRIST_BOOT_KEY=secret'); assert.include(
await driver.findContentWait('pre', /GRIST_BOOT_KEY/, 2000).getText(),
'GRIST_BOOT_KEY=secret');
}, 3000);
} }
it('tells user about /admin', async function() { it('tells user about /admin', async function() {