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
a7335c11
Commit
a7335c11
authored
Jun 28, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored tests and added a breakpoint to the merge_request_tabs
parent
502bd6c0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
17 deletions
+42
-17
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+3
-0
spec/features/issuables/user_sees_sidebar_spec.rb
spec/features/issuables/user_sees_sidebar_spec.rb
+30
-0
spec/features/issues/issue_sidebar_spec.rb
spec/features/issues/issue_sidebar_spec.rb
+0
-17
spec/support/shared_examples/features/issuable_sidebar_shared_examples.rb
...red_examples/features/issuable_sidebar_shared_examples.rb
+9
-0
No files found.
app/assets/javascripts/merge_request_tabs.js
View file @
a7335c11
...
@@ -144,6 +144,9 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
...
@@ -144,6 +144,9 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
this
.
resetViewContainer
();
this
.
resetViewContainer
();
this
.
mountPipelinesView
();
this
.
mountPipelinesView
();
}
else
{
}
else
{
if
(
Breakpoints
.
get
().
getBreakpointSize
()
!==
'
xs
'
)
{
this
.
expandView
();
}
this
.
resetViewContainer
();
this
.
resetViewContainer
();
this
.
destroyPipelinesView
();
this
.
destroyPipelinesView
();
}
}
...
...
spec/features/issuables/user_sees_sidebar_spec.rb
0 → 100644
View file @
a7335c11
require
'rails_helper'
describe
'Issue Sidebar on Mobile'
do
include
MobileHelpers
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:user
)
{
create
(
:user
)}
before
do
sign_in
(
user
)
end
context
'mobile sidebar on merge requests'
,
js:
true
do
before
do
visit
namespace_project_merge_request_path
(
merge_request
.
project
.
namespace
,
merge_request
.
project
,
merge_request
)
end
it_behaves_like
"issue sidebar stays collapsed on mobile"
end
context
'mobile sidebar on issues'
,
js:
true
do
before
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
end
it_behaves_like
"issue sidebar stays collapsed on mobile"
end
end
spec/features/issues/issue_sidebar_spec.rb
View file @
a7335c11
...
@@ -6,7 +6,6 @@ feature 'Issue Sidebar', feature: true do
...
@@ -6,7 +6,6 @@ feature 'Issue Sidebar', feature: true do
let
(
:group
)
{
create
(
:group
,
:nested
)
}
let
(
:group
)
{
create
(
:group
,
:nested
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let!
(
:user
)
{
create
(
:user
)}
let!
(
:user
)
{
create
(
:user
)}
let!
(
:label
)
{
create
(
:label
,
project:
project
,
title:
'bug'
)
}
let!
(
:label
)
{
create
(
:label
,
project:
project
,
title:
'bug'
)
}
...
@@ -155,22 +154,6 @@ feature 'Issue Sidebar', feature: true do
...
@@ -155,22 +154,6 @@ feature 'Issue Sidebar', feature: true do
end
end
end
end
context
'as a allowed mobile user'
,
js:
true
do
before
do
project
.
team
<<
[
user
,
:developer
]
resize_screen_xs
end
context
'mobile sidebar'
do
it
'collapses the sidebar for small screens on an issue/merge_request'
do
visit_issue
(
project
,
issue
)
expect
(
page
).
not_to
have_css
(
'aside.right-sidebar.right-sidebar-collapsed'
)
visit
namespace_project_merge_request_path
(
merge_request
.
project
.
namespace
,
merge_request
.
project
,
merge_request
)
expect
(
page
).
not_to
have_css
(
'aside.right-sidebar.right-sidebar-collapsed'
)
end
end
end
context
'as a guest'
do
context
'as a guest'
do
before
do
before
do
project
.
team
<<
[
user
,
:guest
]
project
.
team
<<
[
user
,
:guest
]
...
...
spec/support/shared_examples/features/issuable_sidebar_shared_examples.rb
0 → 100644
View file @
a7335c11
shared_examples
'issue sidebar stays collapsed on mobile'
do
before
do
resize_screen_xs
end
it
'keeps the sidebar collapsed'
do
expect
(
page
).
not_to
have_css
(
'.right-sidebar.right-sidebar-collapsed'
)
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