From 6fb8132f2a2ad948d7e38c4aaefef59ddec1d858 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Thu, 30 Jan 2025 16:11:28 +0100 Subject: [PATCH] change color --- scripts/pit/its/test-utils.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/pit/its/test-utils.js b/scripts/pit/its/test-utils.js index c405b73..a2f527d 100644 --- a/scripts/pit/its/test-utils.js +++ b/scripts/pit/its/test-utils.js @@ -14,10 +14,9 @@ function log(...args) { function out(...args) { process.stderr.write(`\x1b[2m\x1b[196m${args}\x1b[0m`); } -function green(...args) { - process.stderr.write(`\x1b[2m\x1b[0;32m${args}\x1b[0m`); +function ok(...args) { + process.stderr.write(`\x1b[2m\x1b[92m${args}\x1b[0m`); } - function warn(...args) { process.stderr.write(`\x1b[2m\x1b[91m${args}\x1b[0m`); } @@ -108,7 +107,7 @@ async function waitForServerReady(page, url, options = {}) { // Check if the response status is not 503 if (response && response.status() < 400) { await page.waitForTimeout(1500); - green(` ✓ Attempt ${attempt} Server is ready and returned a valid response. ${response.status()}\n`); + ok(` ✓ Attempt ${attempt} Server is ready and returned a valid response. ${response.status()}\n`); return response; } else { out(` ⏲ Attempt ${attempt} Server is not ready yet. ${response.status()}\n`);