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
1ab01e04
Commit
1ab01e04
authored
Jul 27, 2020
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the spec
parent
f1321c8a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
15 deletions
+31
-15
app/views/shared/issuable/_feed_buttons.html.haml
app/views/shared/issuable/_feed_buttons.html.haml
+1
-1
spec/features/groups/issues_spec.rb
spec/features/groups/issues_spec.rb
+30
-14
No files found.
app/views/shared/issuable/_feed_buttons.html.haml
View file @
1ab01e04
=
link_to
safe_params
.
merge
(
rss_url_options
),
class:
'btn btn-svg has-tooltip'
,
data:
{
container:
'body'
},
title:
_
(
'Subscribe to RSS feed'
)
do
=
link_to
safe_params
.
merge
(
rss_url_options
),
class:
'btn btn-svg has-tooltip'
,
data:
{
container:
'body'
,
testid:
'rss-feed-link'
},
title:
_
(
'Subscribe to RSS feed'
)
do
=
sprite_icon
(
'rss'
,
css_class:
'qa-rss-icon'
,
size:
16
)
=
link_to
safe_params
.
merge
(
calendar_url_options
),
class:
'btn has-tooltip'
,
data:
{
container:
'body'
},
title:
_
(
'Subscribe to calendar'
)
do
=
sprite_icon
(
'calendar'
)
spec/features/groups/issues_spec.rb
View file @
1ab01e04
...
...
@@ -11,11 +11,7 @@ RSpec.describe 'Group issues page' do
let
(
:project_with_issues_disabled
)
{
create
(
:project
,
:issues_disabled
,
group:
group
)
}
let
(
:path
)
{
issues_group_path
(
group
)
}
before
do
stub_feature_flags
(
vue_issuables_list:
false
)
end
context
'with shared examples'
do
context
'with shared examples'
,
:js
do
let
(
:issuable
)
{
create
(
:issue
,
project:
project
,
title:
"this is my created issuable"
)}
include_examples
'project features apply to issuables'
,
Issue
...
...
@@ -30,19 +26,33 @@ RSpec.describe 'Group issues page' do
user_in_group
end
it_behaves_like
"it has an RSS button with current_user's feed token"
it_behaves_like
"an autodiscoverable RSS feed with current_user's feed token"
# Note: The one from rss_shared_example.rb uses a css pseudo-class `:has`
# which is VERY experimental and only supported in Nokogiri used by Capybara
# However,`:js` option forces Capybara to use Selenium that doesn't support`:has`
context
"it has an RSS button with current_user's feed token"
do
it
"shows the RSS button with current_user's feed token"
do
expect
(
find
(
'[data-testid="rss-feed-link"]'
)[
'href'
]).
to
have_content
(
user
.
feed_token
)
end
end
end
context
'when signed out'
do
let
(
:user
)
{
nil
}
it_behaves_like
"it has an RSS button without a feed token"
it_behaves_like
"an autodiscoverable RSS feed without a feed token"
# Note: please see the above
context
"it has an RSS button without a feed token"
do
it
"shows the RSS button without a feed token"
do
expect
(
find
(
'[data-testid="rss-feed-link"]'
)[
'href'
]).
not_to
have_content
(
'feed_token'
)
end
end
end
end
context
'assignee'
,
:js
do
context
'assignee'
do
let
(
:access_level
)
{
ProjectFeature
::
ENABLED
}
let
(
:user
)
{
user_in_group
}
let
(
:user2
)
{
user_outside_group
}
...
...
@@ -56,7 +66,7 @@ RSpec.describe 'Group issues page' do
end
end
context
'issues list'
do
context
'issues list'
,
:js
do
let
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
let
(
:subgroup_project
)
{
create
(
:project
,
:public
,
group:
subgroup
)}
let
(
:user_in_group
)
{
create
(
:group_member
,
:maintainer
,
user:
create
(
:user
),
group:
group
).
user
}
...
...
@@ -110,7 +120,7 @@ RSpec.describe 'Group issues page' do
end
end
context
'manual ordering'
do
context
'manual ordering'
,
:js
do
let
(
:user_in_group
)
{
create
(
:group_member
,
:maintainer
,
user:
create
(
:user
),
group:
group
).
user
}
let!
(
:issue1
)
{
create
(
:issue
,
project:
project
,
title:
'Issue #1'
,
relative_position:
1
)
}
...
...
@@ -143,9 +153,11 @@ RSpec.describe 'Group issues page' do
end
end
it
'issues should be draggable and persist order'
,
:js
do
it
'issues should be draggable and persist order'
do
visit
issues_group_path
(
group
,
sort:
'relative_position'
)
wait_for_requests
drag_to
(
selector:
'.manual-ordering'
,
from_index:
0
,
to_index:
2
)
...
...
@@ -159,11 +171,13 @@ RSpec.describe 'Group issues page' do
check_issue_order
end
it
'issues should not be draggable when user is not logged in'
,
:js
do
it
'issues should not be draggable when user is not logged in'
do
sign_out
(
user_in_group
)
visit
issues_group_path
(
group
,
sort:
'relative_position'
)
wait_for_requests
drag_to
(
selector:
'.manual-ordering'
,
from_index:
0
,
to_index:
2
)
...
...
@@ -187,7 +201,7 @@ RSpec.describe 'Group issues page' do
end
end
context
'issues pagination'
do
context
'issues pagination'
,
:js
do
let
(
:user_in_group
)
{
create
(
:group_member
,
:maintainer
,
user:
create
(
:user
),
group:
group
).
user
}
let!
(
:issues
)
do
...
...
@@ -204,7 +218,9 @@ RSpec.describe 'Group issues page' do
end
it
'first pagination item is active'
do
expect
(
page
).
to
have_css
(
".js-first-button a.page-link.active"
)
page
.
within
(
'.gl-pagination'
)
do
expect
(
find
(
'.active'
)).
to
have_content
(
'1'
)
end
end
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