diff --git a/Gruntfile.js b/Gruntfile.js index 407e14a4d..3e7abf84c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,4 @@ -// Copyright 2014-2020 Signal Messenger, LLC +// Copyright 2014-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only const { join } = require('path'); @@ -382,12 +382,18 @@ module.exports = grunt => { console.log('window opened'); }) .then(() => - // Get the window's title - app.client.getTitle() - ) - .then(title => { // Verify the window's title - assert.equal(title, packageJson.productName); + app.client.waitUntil( + async () => + (await app.client.getTitle()) === packageJson.productName, + { + timeoutMsg: `Expected window title to be ${JSON.stringify( + packageJson.productName + )}`, + } + ) + ) + .then(() => { console.log('title ok'); }) .then(() => {