Fixup test

This commit is contained in:
Johannes Zellner 2022-08-19 16:18:45 +02:00
parent 7261adc546
commit a2d2edabaf

View file

@ -75,12 +75,7 @@ describe('Application life cycle test', function () {
async function checkAvatar() {
await browser.get(`https://${app.fqdn}/${username}`);
let avatarSrc;
if (app.manifest.version === '1.24.0') {
avatarSrc = await browser.findElement(By.xpath('//div[@id="profile-avatar"]/a/img')).getAttribute('src');
} else {
avatarSrc = await browser.findElement(By.xpath('//a[@id="profile-avatar"]/img')).getAttribute('src');
}
const avatarSrc = await browser.findElement(By.xpath('//div[@id="profile-avatar"]/a/img')).getAttribute('src');
const response = await superagent.get(avatarSrc);
expect(response.statusCode).to.equal(200);