From 99ecdfefffb8f7e331b3902b0167626aaada9bc4 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 24 Apr 2026 16:17:31 +0200 Subject: [PATCH] test: use getText helper instead of executeScript executeScript is being removed from charlie's public API; getText with an attribute name reads element attributes (here: img src) directly. Made-with: Cursor --- test/test.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/test.js b/test/test.js index edba684..b6938f2 100755 --- a/test/test.js +++ b/test/test.js @@ -10,7 +10,7 @@ import { clearCache, click, cloudronCli, - executeScript, + getText, goto, loginOIDC, sendKeys, @@ -51,10 +51,7 @@ describe('Application life cycle test', function () { async function checkAvatar() { await goto(`https://${app.fqdn}/${username}`, '//div[@id="profile-avatar"]/a/img'); - const avatarSrc = await executeScript(() => { - const el = document.querySelector('#profile-avatar a img'); - return el ? el.getAttribute('src') : null; - }); + const avatarSrc = await getText('//div[@id="profile-avatar"]/a/img', 'src'); assert.ok(avatarSrc); const avatarUrl = new URL(avatarSrc, `https://${app.fqdn}`).href; const response = await superagent.get(avatarUrl);