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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
f1c7ab51
Commit
f1c7ab51
authored
Jul 23, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace author_link snake case in specs
parent
08892f95
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+2
-2
spec/features/issues/update_issues_spec.rb
spec/features/issues/update_issues_spec.rb
+1
-1
spec/features/merge_requests/user_mass_updates_spec.rb
spec/features/merge_requests/user_mass_updates_spec.rb
+1
-1
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+2
-2
spec/javascripts/issue_show/components/edited_spec.js
spec/javascripts/issue_show/components/edited_spec.js
+3
-3
spec/javascripts/sidebar/assignees_spec.js
spec/javascripts/sidebar/assignees_spec.js
+4
-4
No files found.
app/assets/javascripts/users_select.js
View file @
f1c7ab51
...
@@ -206,8 +206,8 @@ function UsersSelect(currentUser, els, options = {}) {
...
@@ -206,8 +206,8 @@ function UsersSelect(currentUser, els, options = {}) {
return
$collapsedSidebar
.
html
(
collapsedAssigneeTemplate
(
user
));
return
$collapsedSidebar
.
html
(
collapsedAssigneeTemplate
(
user
));
});
});
};
};
collapsedAssigneeTemplate
=
_
.
template
(
'
<% if( avatar ) { %> <a class="author
_
link" href="/<%- username %>"> <img width="24" class="avatar avatar-inline s24" alt="" src="<%- avatar %>"> </a> <% } else { %> <i class="fa fa-user"></i> <% } %>
'
);
collapsedAssigneeTemplate
=
_
.
template
(
'
<% if( avatar ) { %> <a class="author
-
link" href="/<%- username %>"> <img width="24" class="avatar avatar-inline s24" alt="" src="<%- avatar %>"> </a> <% } else { %> <i class="fa fa-user"></i> <% } %>
'
);
assigneeTemplate
=
_
.
template
(
'
<% if (username) { %> <a class="author
_
link bold" href="/<%- username %>"> <% if( avatar ) { %> <img width="32" class="avatar avatar-inline s32" alt="" src="<%- avatar %>"> <% } %> <span class="author"><%- name %></span> <span class="username"> @<%- username %> </span> </a> <% } else { %> <span class="no-value assign-yourself"> No assignee - <a href="#" class="js-assign-yourself"> assign yourself </a> </span> <% } %>
'
);
assigneeTemplate
=
_
.
template
(
'
<% if (username) { %> <a class="author
-
link bold" href="/<%- username %>"> <% if( avatar ) { %> <img width="32" class="avatar avatar-inline s32" alt="" src="<%- avatar %>"> <% } %> <span class="author"><%- name %></span> <span class="username"> @<%- username %> </span> </a> <% } else { %> <span class="no-value assign-yourself"> No assignee - <a href="#" class="js-assign-yourself"> assign yourself </a> </span> <% } %>
'
);
return
$dropdown
.
glDropdown
({
return
$dropdown
.
glDropdown
({
showMenuAbove
:
showMenuAbove
,
showMenuAbove
:
showMenuAbove
,
data
:
function
(
term
,
callback
)
{
data
:
function
(
term
,
callback
)
{
...
...
spec/features/issues/update_issues_spec.rb
View file @
f1c7ab51
...
@@ -49,7 +49,7 @@ describe 'Multiple issue updating from issues#index', :js do
...
@@ -49,7 +49,7 @@ describe 'Multiple issue updating from issues#index', :js do
click_update_issues_button
click_update_issues_button
page
.
within
(
'.issue .controls'
)
do
page
.
within
(
'.issue .controls'
)
do
expect
(
find
(
'.author
_
link'
)[
"title"
]).
to
have_content
(
user
.
name
)
expect
(
find
(
'.author
-
link'
)[
"title"
]).
to
have_content
(
user
.
name
)
end
end
end
end
...
...
spec/features/merge_requests/user_mass_updates_spec.rb
View file @
f1c7ab51
...
@@ -47,7 +47,7 @@ describe 'Merge requests > User mass updates', :js do
...
@@ -47,7 +47,7 @@ describe 'Merge requests > User mass updates', :js do
change_assignee
(
user
.
name
)
change_assignee
(
user
.
name
)
page
.
within
(
'.merge-request .controls'
)
do
page
.
within
(
'.merge-request .controls'
)
do
expect
(
find
(
'.author
_
link'
)[
"title"
]).
to
have_content
(
user
.
name
)
expect
(
find
(
'.author
-
link'
)[
"title"
]).
to
have_content
(
user
.
name
)
end
end
end
end
end
end
...
...
spec/javascripts/issue_show/components/app_spec.js
View file @
f1c7ab51
...
@@ -76,7 +76,7 @@ describe('Issuable output', () => {
...
@@ -76,7 +76,7 @@ describe('Issuable output', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.wiki
'
).
innerHTML
).
toContain
(
'
<p>this is a description!</p>
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.wiki
'
).
innerHTML
).
toContain
(
'
<p>this is a description!</p>
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-task-list-field
'
).
value
).
toContain
(
'
this is a description
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-task-list-field
'
).
value
).
toContain
(
'
this is a description
'
);
expect
(
formatText
(
editedText
.
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Some User/
);
expect
(
formatText
(
editedText
.
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Some User/
);
expect
(
editedText
.
querySelector
(
'
.author
_
link
'
).
href
).
toMatch
(
/
\/
some_user$/
);
expect
(
editedText
.
querySelector
(
'
.author
-
link
'
).
href
).
toMatch
(
/
\/
some_user$/
);
expect
(
editedText
.
querySelector
(
'
time
'
)).
toBeTruthy
();
expect
(
editedText
.
querySelector
(
'
time
'
)).
toBeTruthy
();
})
})
.
then
(()
=>
{
.
then
(()
=>
{
...
@@ -90,7 +90,7 @@ describe('Issuable output', () => {
...
@@ -90,7 +90,7 @@ describe('Issuable output', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-task-list-field
'
).
value
).
toContain
(
'
42
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-task-list-field
'
).
value
).
toContain
(
'
42
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.edited-text
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
querySelector
(
'
.edited-text
'
)).
toBeTruthy
();
expect
(
formatText
(
vm
.
$el
.
querySelector
(
'
.edited-text
'
).
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Other User/
);
expect
(
formatText
(
vm
.
$el
.
querySelector
(
'
.edited-text
'
).
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Other User/
);
expect
(
editedText
.
querySelector
(
'
.author
_
link
'
).
href
).
toMatch
(
/
\/
other_user$/
);
expect
(
editedText
.
querySelector
(
'
.author
-
link
'
).
href
).
toMatch
(
/
\/
other_user$/
);
expect
(
editedText
.
querySelector
(
'
time
'
)).
toBeTruthy
();
expect
(
editedText
.
querySelector
(
'
time
'
)).
toBeTruthy
();
})
})
.
then
(
done
)
.
then
(
done
)
...
...
spec/javascripts/issue_show/components/edited_spec.js
View file @
f1c7ab51
...
@@ -18,7 +18,7 @@ describe('edited', () => {
...
@@ -18,7 +18,7 @@ describe('edited', () => {
}).
$mount
();
}).
$mount
();
expect
(
formatText
(
editedComponent
.
$el
.
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Some User/
);
expect
(
formatText
(
editedComponent
.
$el
.
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Some User/
);
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author
_
link
'
).
href
).
toMatch
(
/
\/
some_user$/
);
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author
-
link
'
).
href
).
toMatch
(
/
\/
some_user$/
);
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeTruthy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeTruthy
();
});
});
...
@@ -31,7 +31,7 @@ describe('edited', () => {
...
@@ -31,7 +31,7 @@ describe('edited', () => {
}).
$mount
();
}).
$mount
();
expect
(
formatText
(
editedComponent
.
$el
.
innerText
)).
toMatch
(
/Edited by Some User/
);
expect
(
formatText
(
editedComponent
.
$el
.
innerText
)).
toMatch
(
/Edited by Some User/
);
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author
_
link
'
).
href
).
toMatch
(
/
\/
some_user$/
);
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author
-
link
'
).
href
).
toMatch
(
/
\/
some_user$/
);
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeFalsy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeFalsy
();
});
});
...
@@ -43,7 +43,7 @@ describe('edited', () => {
...
@@ -43,7 +43,7 @@ describe('edited', () => {
}).
$mount
();
}).
$mount
();
expect
(
formatText
(
editedComponent
.
$el
.
innerText
)).
not
.
toMatch
(
/by Some User/
);
expect
(
formatText
(
editedComponent
.
$el
.
innerText
)).
not
.
toMatch
(
/by Some User/
);
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author
_
link
'
)).
toBeFalsy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author
-
link
'
)).
toBeFalsy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeTruthy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeTruthy
();
});
});
...
...
spec/javascripts/sidebar/assignees_spec.js
View file @
f1c7ab51
...
@@ -102,13 +102,13 @@ describe('Assignee component', () => {
...
@@ -102,13 +102,13 @@ describe('Assignee component', () => {
},
},
}).
$mount
();
}).
$mount
();
expect
(
component
.
$el
.
querySelector
(
'
.author
_
link
'
)).
not
.
toBeNull
();
expect
(
component
.
$el
.
querySelector
(
'
.author
-
link
'
)).
not
.
toBeNull
();
// The image
// The image
expect
(
component
.
$el
.
querySelector
(
'
.author
_
link img
'
).
getAttribute
(
'
src
'
)).
toEqual
(
UsersMock
.
user
.
avatar
);
expect
(
component
.
$el
.
querySelector
(
'
.author
-
link img
'
).
getAttribute
(
'
src
'
)).
toEqual
(
UsersMock
.
user
.
avatar
);
// Author name
// Author name
expect
(
component
.
$el
.
querySelector
(
'
.author
_
link .author
'
).
innerText
.
trim
()).
toEqual
(
UsersMock
.
user
.
name
);
expect
(
component
.
$el
.
querySelector
(
'
.author
-
link .author
'
).
innerText
.
trim
()).
toEqual
(
UsersMock
.
user
.
name
);
// Username
// Username
expect
(
component
.
$el
.
querySelector
(
'
.author
_
link .username
'
).
innerText
.
trim
()).
toEqual
(
`@
${
UsersMock
.
user
.
username
}
`
);
expect
(
component
.
$el
.
querySelector
(
'
.author
-
link .username
'
).
innerText
.
trim
()).
toEqual
(
`@
${
UsersMock
.
user
.
username
}
`
);
});
});
it
(
'
has the root url present in the assigneeUrl method
'
,
()
=>
{
it
(
'
has the root url present in the assigneeUrl method
'
,
()
=>
{
...
...
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