Skip to content
Snippets Groups Projects
Commit 2cbe00cd authored by Mike Greiling's avatar Mike Greiling
Browse files

restore "first()" method call and make it clear that variable is jQuery object

parent c4c6c380
No related merge requests found
......@@ -6,19 +6,19 @@ import '~/abuse_reports';
const FIXTURE = 'abuse_reports/abuse_reports_list.html.raw';
const MAX_MESSAGE_LENGTH = 500;
let messages;
let $messages;
const assertMaxLength = $message => expect($message.text().length).toEqual(MAX_MESSAGE_LENGTH);
const findMessage = searchText => messages.filter(
const findMessage = searchText => $messages.filter(
(index, element) => element.innerText.indexOf(searchText) > -1,
)[0];
).first();
preloadFixtures(FIXTURE);
beforeEach(function () {
loadFixtures(FIXTURE);
this.abuseReports = new global.AbuseReports();
messages = $('.abuse-reports .message');
$messages = $('.abuse-reports .message');
});
it('should truncate long messages', () => {
......
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