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);