Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
urgi-is
data-discovery
Commits
6e841a28
Commit
6e841a28
authored
Aug 07, 2018
by
Exbrayat Cédric
Browse files
chore: lint fixes
parent
4729a703
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/app/highlight.service.ts
View file @
6e841a28
...
...
@@ -25,8 +25,7 @@ export class HighlightService {
if
(
textContent
.
length
>
remainingLength
)
{
childNode
.
textContent
=
textContent
.
substring
(
0
,
remainingLength
);
length
+=
remainingLength
;
}
else
{
}
else
{
length
+=
textContent
.
length
;
}
}
...
...
frontend/src/app/search.service.spec.ts
View file @
6e841a28
...
...
@@ -55,7 +55,8 @@ describe('SearchService', () => {
const
resource
=
toGeneticResource
(
'
Bacteria
'
);
const
expectedResults
=
toSinglePage
([
resource
]);
http
.
expectOne
(
'
/api/genetic-resources?query=Bacteria&page=0&highlight=true&coo=France&coo=Italy&domain=Forest
'
).
flush
(
expectedResults
);
http
.
expectOne
(
'
/api/genetic-resources?query=Bacteria&page=0&highlight=true&coo=France&coo=Italy&domain=Forest
'
)
.
flush
(
expectedResults
);
expect
(
actualResults
).
toEqual
(
expectedResults
);
});
...
...
@@ -70,7 +71,8 @@ describe('SearchService', () => {
const
aggregation
=
toAggregation
(
'
coo
'
,
[
'
France
'
,
'
Italy
'
]);
const
expectedResults
=
toSinglePage
([
resource
],
[
aggregation
]);
http
.
expectOne
(
'
/api/genetic-resources?query=Bacteria&page=0&highlight=true&aggregate=true&coo=France&coo=Italy&domain=Forest
'
).
flush
(
expectedResults
);
http
.
expectOne
(
'
/api/genetic-resources?query=Bacteria&page=0&highlight=true&aggregate=true&coo=France&coo=Italy&domain=Forest
'
)
.
flush
(
expectedResults
);
expect
(
actualResults
).
toEqual
(
expectedResults
);
});
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment