Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
541b7e2c
Commit
541b7e2c
authored
Mar 09, 2021
by
Doug Stull
Committed by
Mike Greiling
Mar 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove text decoration on invite members button
- it is a button, should not have that.
parent
a50a4a25
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
40 deletions
+22
-40
app/assets/javascripts/invite_members/components/invite_members_trigger.vue
...ipts/invite_members/components/invite_members_trigger.vue
+16
-11
app/views/groups/group_members/index.html.haml
app/views/groups/group_members/index.html.haml
+1
-1
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+1
-1
spec/frontend/invite_members/components/invite_members_trigger_spec.js
.../invite_members/components/invite_members_trigger_spec.js
+4
-27
No files found.
app/assets/javascripts/invite_members/components/invite_members_trigger.vue
View file @
541b7e2c
<
script
>
import
{
Gl
Link
,
GlIc
on
}
from
'
@gitlab/ui
'
;
import
{
Gl
Butt
on
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
eventHub
from
'
../event_hub
'
;
export
default
{
components
:
{
GlLink
,
GlIcon
,
},
components
:
{
GlButton
},
props
:
{
displayText
:
{
type
:
String
,
...
...
@@ -24,6 +21,11 @@ export default {
required
:
false
,
default
:
''
,
},
variant
:
{
type
:
String
,
required
:
false
,
default
:
undefined
,
},
},
methods
:
{
openModal
()
{
...
...
@@ -34,10 +36,13 @@ export default {
</
script
>
<
template
>
<gl-link
:class=
"classes"
data-qa-selector=
"invite_members_button"
@
click=
"openModal"
>
<div
v-if=
"icon"
class=
"nav-icon-container"
>
<gl-icon
:size=
"16"
:name=
"icon"
/>
</div>
<span
class=
"nav-item-name"
>
{{
displayText
}}
</span>
</gl-link>
<gl-button
:class=
"classes"
:icon=
"icon"
:variant=
"variant"
data-qa-selector=
"invite_members_button"
@
click=
"openModal"
>
{{
displayText
}}
</gl-button>
</
template
>
app/views/groups/group_members/index.html.haml
View file @
541b7e2c
...
...
@@ -18,7 +18,7 @@
.gl-w-half.gl-xs-w-full
.gl-display-flex.gl-flex-wrap.gl-justify-content-end.gl-mb-3
.js-invite-group-trigger
{
data:
{
classes:
'gl-mt-3 gl-sm-w-auto gl-w-full'
,
display_text:
_
(
'Invite a group'
)
}
}
.js-invite-members-trigger
{
data:
{
classes:
'btn btn-success gl-button
gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3'
,
display_text:
_
(
'Invite members'
)
}
}
.js-invite-members-trigger
{
data:
{
variant:
'success'
,
classes:
'
gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3'
,
display_text:
_
(
'Invite members'
)
}
}
=
render
'groups/invite_members_modal'
,
group:
@group
-
if
can_manage_members
&&
!
can_invite_members_for_group?
(
@group
)
%hr
.gl-mt-4
...
...
app/views/projects/project_members/index.html.haml
View file @
541b7e2c
...
...
@@ -20,7 +20,7 @@
.col-md-12.col-lg-6
.gl-display-flex.gl-flex-wrap.gl-justify-content-end
.js-invite-group-trigger
{
data:
{
classes:
'gl-mt-3 gl-sm-w-auto gl-w-full'
,
display_text:
_
(
'Invite a group'
)
}
}
.js-invite-members-trigger
{
data:
{
classes:
'btn btn-success gl-button
gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3'
,
display_text:
_
(
'Invite members'
)
}
}
.js-invite-members-trigger
{
data:
{
variant:
'success'
,
classes:
'
gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3'
,
display_text:
_
(
'Invite members'
)
}
}
=
render
'projects/invite_members_modal'
,
project:
@project
-
else
...
...
spec/frontend/invite_members/components/invite_members_trigger_spec.js
View file @
541b7e2c
import
{
Gl
Icon
,
GlLink
}
from
'
@gitlab/ui
'
;
import
{
Gl
Button
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
InviteMembersTrigger
from
'
~/invite_members/components/invite_members_trigger.vue
'
;
const
displayText
=
'
Invite team members
'
;
const
icon
=
'
plus
'
;
const
createComponent
=
(
props
=
{})
=>
{
return
shallowMount
(
InviteMembersTrigger
,
{
...
...
@@ -23,36 +22,14 @@ describe('InviteMembersTrigger', () => {
});
describe
(
'
displayText
'
,
()
=>
{
const
find
Link
=
()
=>
wrapper
.
findComponent
(
GlLink
);
const
find
Button
=
()
=>
wrapper
.
findComponent
(
GlButton
);
beforeEach
(()
=>
{
wrapper
=
createComponent
();
});
it
(
'
includes the correct displayText for the link
'
,
()
=>
{
expect
(
findLink
().
text
()).
toBe
(
displayText
);
});
});
describe
(
'
icon
'
,
()
=>
{
const
findIcon
=
()
=>
wrapper
.
findComponent
(
GlIcon
);
it
(
'
includes the correct icon when an icon is sent
'
,
()
=>
{
wrapper
=
createComponent
({
icon
});
expect
(
findIcon
().
attributes
(
'
name
'
)).
toBe
(
icon
);
});
it
(
'
does not include an icon when icon is not sent
'
,
()
=>
{
wrapper
=
createComponent
();
expect
(
findIcon
().
exists
()).
toBe
(
false
);
});
it
(
'
does not include an icon when empty string is sent
'
,
()
=>
{
wrapper
=
createComponent
({
icon
:
''
});
expect
(
findIcon
().
exists
()).
toBe
(
false
);
it
(
'
includes the correct displayText for the button
'
,
()
=>
{
expect
(
findButton
().
text
()).
toBe
(
displayText
);
});
});
});
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