Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
14465111
Commit
14465111
authored
Aug 11, 2020
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Aug 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor `FilterStatus` and subcomponents
parent
286be9cc
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
274 additions
and
141 deletions
+274
-141
filter-status.js
src/sidebar/components/filter-status.js
+248
-141
filter-status-test.js
src/sidebar/components/test/filter-status-test.js
+26
-0
No files found.
src/sidebar/components/filter-status.js
View file @
14465111
This diff is collapsed.
Click to expand it.
src/sidebar/components/test/filter-status-test.js
View file @
14465111
...
...
@@ -150,6 +150,32 @@ describe('FilterStatus', () => {
assertFilterText
(
createComponent
(),
'Showing 4 annotations'
);
});
it
(
'should show the count of additionally-shown top-level annotations'
,
()
=>
{
// In selection mode, "forced visible" count is computed by subtracting
// the selectedCount from the count of all visible top-level threads
// (children/replies are ignored in this count)
fakeUseRootThread
.
returns
({
id
:
'__default__'
,
children
:
[
{
id
:
'1'
,
annotation
:
{
$tag
:
'1'
},
visible
:
true
,
children
:
[]
},
{
id
:
'2'
,
annotation
:
{
$tag
:
'2'
},
visible
:
true
,
children
:
[
{
id
:
'2a'
,
annotation
:
{
$tag
:
'2a'
},
visible
:
true
,
children
:
[],
},
],
},
],
});
assertFilterText
(
createComponent
(),
'Showing 1 annotation (and 1 more)'
);
});
it
(
'should provide a "Show all" button that shows a count of all annotations'
,
()
=>
{
fakeStore
.
annotationCount
.
returns
(
5
);
assertButton
(
createComponent
(),
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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