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
0988599e
Commit
0988599e
authored
Jul 01, 2020
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nested selectors
parent
52f4994e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
16 deletions
+10
-16
app/assets/javascripts/notes/components/sort_discussion.vue
app/assets/javascripts/notes/components/sort_discussion.vue
+3
-7
ee/spec/features/epics/epic_show_spec.rb
ee/spec/features/epics/epic_show_spec.rb
+7
-9
No files found.
app/assets/javascripts/notes/components/sort_discussion.vue
View file @
0988599e
...
...
@@ -50,19 +50,15 @@ export default {
<
template
>
<div
class=
"js-sort-discussion-filter-container mr-2 d-inline-block align-bottom full-width-mobile"
data-testid=
"sort-discussion-filter"
class=
"mr-2 d-inline-block align-bottom full-width-mobile"
>
<local-storage-sync
:value=
"sortDirection"
:storage-key=
"storageKey"
@
input=
"setDiscussionSortDirection"
/>
<button
id=
"sort-discussion-filter-dropdown"
class=
"btn btn-sm js-dropdown-text"
data-toggle=
"dropdown"
aria-expanded=
"false"
>
<button
class=
"btn btn-sm js-dropdown-text"
data-toggle=
"dropdown"
aria-expanded=
"false"
>
{{
dropdownText
}}
<gl-icon
name=
"chevron-down"
/>
</button>
...
...
ee/spec/features/epics/epic_show_spec.rb
View file @
0988599e
...
...
@@ -141,8 +141,6 @@ RSpec.describe 'Epic show', :js do
end
describe
'Sort dropdown'
do
let!
(
:dropdown_label
)
{
find
(
'.js-sort-discussion-filter-container #sort-discussion-filter-dropdown'
)
}
def
submit_comment
(
text
)
fill_in
'note[note]'
,
with:
text
click_button
'Comment'
...
...
@@ -151,8 +149,8 @@ RSpec.describe 'Epic show', :js do
context
'when sorted by `Oldest first`'
do
it
'shows label `Oldest first`'
do
page
.
within
(
'
.js-noteable-awards
'
)
do
expect
(
dropdown_label
).
to
have_content
(
'Oldest first'
)
page
.
within
(
'
[data-testid="sort-discussion-filter"]
'
)
do
expect
(
find
(
'.js-dropdown-text'
)
).
to
have_content
(
'Oldest first'
)
end
end
...
...
@@ -167,17 +165,17 @@ RSpec.describe 'Epic show', :js do
context
'when sorted by `Newest first`'
do
before
do
page
.
within
(
'
.js-noteable-awards
'
)
do
dropdown_label
.
click
page
.
within
(
'
[data-testid="sort-discussion-filter"]
'
)
do
find
(
'button'
)
.
click
wait_for_requests
find
(
'.js-
sort-discussion-filter-container .js-
newest-first'
).
click
find
(
'.js-newest-first'
).
click
wait_for_requests
end
end
it
'shows label `Newest first`'
do
page
.
within
(
'
.js-noteable-awards
'
)
do
expect
(
dropdown_label
).
to
have_content
(
'Newest first'
)
page
.
within
(
'
[data-testid="sort-discussion-filter"]
'
)
do
expect
(
find
(
'.js-dropdown-text'
)
).
to
have_content
(
'Newest first'
)
end
end
...
...
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