Commit 4361d0d6 authored by JC Brand's avatar JC Brand

Fix failing tests due to time tag

parent 40272351
......@@ -714,8 +714,8 @@
});
_converse.connection._dataRecv(test_utils.createRequest(presence));
var $time = $chat_content.find('time');
expect($time.length).toEqual(4);
let time = chat_content.querySelectorAll('time.separator-text');
expect(time.length).toEqual(4);
var $indicator = $chat_content.find('.date-separator:eq(3)');
expect($indicator.attr('class')).toEqual('message date-separator');
......@@ -753,8 +753,8 @@
});
_converse.connection._dataRecv(test_utils.createRequest(presence));
$time = $chat_content.find('time');
expect($time.length).toEqual(6);
time = chat_content.querySelectorAll('time.separator-text');
expect(time.length).toEqual(6);
$indicator = $chat_content.find('.date-separator:eq(5)');
expect($indicator.attr('class')).toEqual('message date-separator');
......
......@@ -577,7 +577,7 @@
expect($el.hasClass('chat-msg-followup')).toBe(false);
expect($el.text()).toEqual('Older message');
$time = $chat_content.find('time:eq(1)');
$time = $chat_content.find('time.separator-text:eq(1)');
expect($time.text()).toEqual("Monday Jan 1st 2018");
$day = $chat_content.find('.date-separator:eq(1)');
......@@ -591,7 +591,7 @@
expect($el.find('.chat-msg-text').text()).toEqual('another inbetween message');
expect($el.hasClass('chat-msg-followup')).toBe(true);
$time = $chat_content.find('time:nth(2)');
$time = $chat_content.find('time.separator-text:nth(2)');
expect($time.text()).toEqual("Tuesday Jan 2nd 2018");
$day = $chat_content.find('.date-separator:nth(2)');
......@@ -928,7 +928,7 @@
expect(_converse.emit).toHaveBeenCalledWith('message', jasmine.any(Object));
// Check that there is a <time> element, with the required
// props.
expect($chat_content[0].querySelectorAll('time').length).toEqual(2); // There are now two time elements
expect($chat_content[0].querySelectorAll('time.separator-text').length).toEqual(2); // There are now two time elements
var message_date = new Date();
$day = $chat_content.find('.date-separator:last');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment