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
92a5b028
Commit
92a5b028
authored
Apr 03, 2019
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not show activity page link if group does not have one
parent
2b4ded56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
group-list-item-out-of-scope.js
src/sidebar/components/group-list-item-out-of-scope.js
+13
-11
group-list-item-out-of-scope-test.js
...ebar/components/test/group-list-item-out-of-scope-test.js
+9
-0
No files found.
src/sidebar/components/group-list-item-out-of-scope.js
View file @
92a5b028
...
...
@@ -77,17 +77,19 @@ function GroupListItemOutOfScope({ analytics, group }) {
This
group
has
been
restricted
to
selected
URLs
by
its
administrators
.
<
/p
>
<
p
className
=
"group-list-item-out-of-scope__details-actions"
>
<
a
className
=
"button button--text group-list-item-out-of-scope__details-group-page-link"
href
=
{
group
.
links
.
html
}
target
=
"_blank"
onClick
=
{
trackViewActivity
}
rel
=
"noopener noreferrer"
>
Go
to
group
page
<
/a
>
<
/p
>
{
group
.
links
.
html
&&
(
<
p
className
=
"group-list-item-out-of-scope__details-actions"
>
<
a
className
=
"button button--text group-list-item-out-of-scope__details-group-page-link"
href
=
{
group
.
links
.
html
}
target
=
"_blank"
onClick
=
{
trackViewActivity
}
rel
=
"noopener noreferrer"
>
Go
to
group
page
<
/a
>
<
/p
>
)}
<
/Fragment
>
)}
<
/div
>
...
...
src/sidebar/components/test/group-list-item-out-of-scope-test.js
View file @
92a5b028
...
...
@@ -73,6 +73,15 @@ describe('GroupListItemOutOfScope', () => {
);
});
it
(
'does not show "Go to group page" link if the group has no HTML link'
,
()
=>
{
const
group
=
{
...
fakeGroup
,
links
:
{}
};
const
wrapper
=
createGroupListItemOutOfScope
(
group
);
const
link
=
wrapper
.
find
(
'a'
)
.
filterWhere
(
link
=>
link
.
text
()
===
'Go to group page'
);
assert
.
isFalse
(
link
.
exists
());
});
it
(
'sets alt text of logo'
,
()
=>
{
fakeGroupListItemCommon
.
orgName
.
withArgs
(
fakeGroup
)
...
...
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