fixes chat Test specs

This commit is contained in:
Mohamed Amine Ben Salah 2020-02-25 14:53:18 -03:00
parent aea10d65f2
commit d74f97e9cc
2 changed files with 4 additions and 11 deletions

View File

@ -22,9 +22,8 @@ class Copy extends Page {
await this.click(e.chatCopy, true);
const copiedChat = clipboardy.readSync();
expect(copiedChat).toEqual(expect.stringContaining(`User1 : ${e.message}`));
return true;
return copiedChat.includes(`User1 : ${e.message}`);
}
}

View File

@ -14,15 +14,9 @@ class Save extends Page {
await this.click(e.chatOptions);
await this.click(e.chatSave, true);
// TODO: Replace this with a download event listener
await this.screenshot(true);
await this.screenshot(true);
await this.screenshot(true);
// TODO: Check test
return true;
const clicked = await this.page.addListener('click', () => document.addEventListener('click'));
return clicked;
}
}
module.exports = exports = Save;
module.exports = exports = Save;