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
7b242d2e
Commit
7b242d2e
authored
Jul 31, 2020
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable js for tests
parent
ad5b16b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
spec/features/issues/user_sorts_issues_spec.rb
spec/features/issues/user_sorts_issues_spec.rb
+7
-9
No files found.
spec/features/issues/user_sorts_issues_spec.rb
View file @
7b242d2e
...
...
@@ -16,8 +16,6 @@ RSpec.describe "User sorts issues" do
let_it_be
(
:later_due_milestone
)
{
create
(
:milestone
,
project:
project
,
due_date:
'2013-12-12'
)
}
before
do
stub_feature_flags
(
vue_issuables_list:
false
)
create_list
(
:award_emoji
,
2
,
:upvote
,
awardable:
issue1
)
create_list
(
:award_emoji
,
2
,
:downvote
,
awardable:
issue2
)
create
(
:award_emoji
,
:downvote
,
awardable:
issue1
)
...
...
@@ -48,7 +46,7 @@ RSpec.describe "User sorts issues" do
expect
(
find
(
'.issues-filters a.is-active'
)).
to
have_content
(
'Milestone'
)
end
it
"sorts by popularity"
do
it
"sorts by popularity"
,
:js
do
find
(
'.filter-dropdown-container .dropdown'
).
click
page
.
within
(
'ul.dropdown-menu.dropdown-menu-right li'
)
do
...
...
@@ -70,14 +68,14 @@ RSpec.describe "User sorts issues" do
end
end
it
'sorts by newest'
do
it
'sorts by newest'
,
:js
do
visit
project_issues_path
(
project
,
sort:
sort_value_created_date
)
expect
(
first_issue
).
to
include
(
'foo'
)
expect
(
last_issue
).
to
include
(
'baz'
)
end
it
'sorts by most recently updated'
do
it
'sorts by most recently updated'
,
:js
do
issue3
.
updated_at
=
Time
.
now
+
100
issue3
.
save
visit
project_issues_path
(
project
,
sort:
sort_value_recently_updated
)
...
...
@@ -85,7 +83,7 @@ RSpec.describe "User sorts issues" do
expect
(
first_issue
).
to
include
(
'baz'
)
end
describe
'sorting by due date'
do
describe
'sorting by due date'
,
:js
do
before
do
issue1
.
update
(
due_date:
1
.
day
.
from_now
)
issue2
.
update
(
due_date:
6
.
days
.
from_now
)
...
...
@@ -122,7 +120,7 @@ RSpec.describe "User sorts issues" do
end
end
describe
'filtering by due date'
do
describe
'filtering by due date'
,
:js
do
before
do
issue1
.
update
(
due_date:
1
.
day
.
from_now
)
issue2
.
update
(
due_date:
6
.
days
.
from_now
)
...
...
@@ -205,7 +203,7 @@ RSpec.describe "User sorts issues" do
end
end
describe
'sorting by milestone'
do
describe
'sorting by milestone'
,
:js
do
before
do
issue1
.
milestone
=
newer_due_milestone
issue1
.
save
...
...
@@ -221,7 +219,7 @@ RSpec.describe "User sorts issues" do
end
end
describe
'combine filter and sort'
do
describe
'combine filter and sort'
,
:js
do
let
(
:user2
)
{
create
(
:user
)
}
before
do
...
...
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