Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gitlab-External-Templates
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adri
Gitlab-External-Templates
Commits
2cbe00cd
Commit
2cbe00cd
authored
7 years ago
by
Mike Greiling
Browse files
Options
Downloads
Patches
Plain Diff
restore "first()" method call and make it clear that variable is jQuery object
parent
c4c6c380
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/javascripts/abuse_reports_spec.js
+4
-4
4 additions, 4 deletions
spec/javascripts/abuse_reports_spec.js
with
4 additions
and
4 deletions
spec/javascripts/abuse_reports_spec.js
+
4
−
4
View file @
2cbe00cd
...
...
@@ -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
'
,
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment