Skip to content

Commit a362ca3

Browse files
committed
use template literal for log messages
1 parent 8404b54 commit a362ca3

1 file changed

Lines changed: 4 additions & 15 deletions

File tree

test/functional/page_objects/common_page.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
182182
}
183183

184184
async sleep(sleepMilliseconds: number) {
185-
log.debug('... sleep(' + sleepMilliseconds + ') start');
185+
log.debug(`... sleep(${sleepMilliseconds}) start`);
186186
await delay(sleepMilliseconds);
187-
log.debug('... sleep(' + sleepMilliseconds + ') end');
187+
log.debug(`... sleep(${sleepMilliseconds}) end`);
188188
}
189189

190190
async navigateToApp(
@@ -241,22 +241,11 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
241241
// remove that part so we can get a match in the tests.
242242
const navSuccessful = new RegExp(
243243
appUrl.replace(':80/', '/').replace(':443/', '/') +
244-
'.{0,' +
245-
maxAdditionalLengthOnNavUrl +
246-
'}$'
244+
`.{0,${maxAdditionalLengthOnNavUrl}}$`
247245
).test(currentUrl);
248246

249247
if (!navSuccessful) {
250-
const msg =
251-
'App failed to load: ' +
252-
appName +
253-
' in ' +
254-
defaultFindTimeout +
255-
'ms' +
256-
' appUrl = ' +
257-
appUrl +
258-
' currentUrl = ' +
259-
currentUrl;
248+
const msg = `App failed to load: ${appName} in ${defaultFindTimeout}ms appUrl=${appUrl} currentUrl=${currentUrl}`;
260249
log.debug(msg);
261250
throw new Error(msg);
262251
}

0 commit comments

Comments
 (0)