fix shared notes automated test

This commit is contained in:
Mohamed Amine Ben Salah 2020-07-20 18:19:24 -03:00
parent d5ba5efb0b
commit a51105fab3
4 changed files with 10 additions and 3 deletions

View File

@ -64,9 +64,10 @@ class Note extends Component {
onClick={() => {
Session.set('openPanel', 'userlist');
}}
data-test="hideNoteLabel"
aria-label={intl.formatMessage(intlMessages.hideNoteLabel)}
label={intl.formatMessage(intlMessages.title)}
icon={isRTL ? "right_arrow" : "left_arrow"}
icon={isRTL ? 'right_arrow' : 'left_arrow'}
className={styles.hideBtn}
/>
</div>

View File

@ -93,7 +93,7 @@ class UserNotes extends Component {
>
<Icon iconName="copy" />
<div aria-hidden>
<div className={styles.noteTitle}>
<div className={styles.noteTitle} data-test="sharedNotes">
{intl.formatMessage(intlMessages.sharedNotes)}
</div>
{disableNote

View File

@ -10,7 +10,7 @@ async function startSharedNotes(test) {
}
async function getTestElement(element) {
const response = document.querySelectorAll(element).length >= 1;
const response = await document.querySelectorAll(element).length >= 1;
return response;
}

View File

@ -1,11 +1,17 @@
const SharedNotes = require('./notes/sharednotes');
describe('Shared notes', () => {
beforeEach(() => {
jest.setTimeout(30000);
});
test('Open Shared notes', async () => {
const test = new SharedNotes();
let response;
try {
await test.init();
await test.page1.closeAudioModal();
await test.page2.closeAudioModal();
response = await test.test();
} catch (e) {
console.log(e);