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
fc7d2a88
Commit
fc7d2a88
authored
Feb 12, 2017
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace static fixture for merge_request_tabs_spec.js (!9172)
parent
8a1441fb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
24 deletions
+42
-24
changelogs/unreleased/merge-request-tabs-fixture.yml
changelogs/unreleased/merge-request-tabs-fixture.yml
+4
-0
spec/javascripts/fixtures/merge_request_tabs.html.haml
spec/javascripts/fixtures/merge_request_tabs.html.haml
+0
-22
spec/javascripts/fixtures/merge_requests.rb
spec/javascripts/fixtures/merge_requests.rb
+36
-0
spec/javascripts/merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+2
-2
No files found.
changelogs/unreleased/merge-request-tabs-fixture.yml
0 → 100644
View file @
fc7d2a88
---
title
:
Replace static fixture for merge_request_tabs_spec.js
merge_request
:
9172
author
:
winniehell
spec/javascripts/fixtures/merge_request_tabs.html.haml
deleted
100644 → 0
View file @
8a1441fb
%ul
.nav.nav-tabs.merge-request-tabs
%li
.notes-tab
%a
{
href:
'/foo/bar/merge_requests/1'
,
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}}
Discussion
%li
.commits-tab
%a
{
href:
'/foo/bar/merge_requests/1/commits'
,
data:
{
target:
'div#commits'
,
action:
'commits'
,
toggle:
'tab'
}}
Commits
%li
.diffs-tab
%a
{
href:
'/foo/bar/merge_requests/1/diffs'
,
data:
{
target:
'div#diffs'
,
action:
'diffs'
,
toggle:
'tab'
}}
Diffs
.tab-content
#notes
.notes.tab-pane
Notes Content
#commits
.commits.tab-pane
Commits Content
#diffs
.diffs.tab-pane
Diffs Content
.mr-loading-status
.loading
Loading Animation
spec/javascripts/fixtures/merge_requests.rb
0 → 100644
View file @
fc7d2a88
require
'spec_helper'
describe
Projects
::
MergeRequestsController
,
'(JavaScript fixtures)'
,
type: :controller
do
include
JavaScriptFixturesHelpers
let
(
:admin
)
{
create
(
:admin
)
}
let
(
:namespace
)
{
create
(
:namespace
,
name:
'frontend-fixtures'
)}
let
(
:project
)
{
create
(
:project
,
namespace:
namespace
,
path:
'merge-requests-project'
)
}
render_views
before
(
:all
)
do
clean_frontend_fixtures
(
'merge_requests/'
)
end
before
(
:each
)
do
sign_in
(
admin
)
end
it
'merge_requests/merge_request_with_task_list.html.raw'
do
|
example
|
merge_request
=
create
(
:merge_request
,
:with_diffs
,
source_project:
project
,
target_project:
project
,
description:
'- [ ] Task List Item'
)
render_merge_request
(
example
.
description
,
merge_request
)
end
private
def
render_merge_request
(
fixture_file_name
,
merge_request
)
get
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
id:
merge_request
.
to_param
expect
(
response
).
to
be_success
store_frontend_fixture
(
response
,
fixture_file_name
)
end
end
spec/javascripts/merge_request_tabs_spec.js
View file @
fc7d2a88
...
@@ -25,7 +25,7 @@ require('vendor/jquery.scrollTo');
...
@@ -25,7 +25,7 @@ require('vendor/jquery.scrollTo');
};
};
$
.
extend
(
stubLocation
,
defaults
,
stubs
||
{});
$
.
extend
(
stubLocation
,
defaults
,
stubs
||
{});
};
};
preloadFixtures
(
'
static/merge_request_tabs
.html.raw
'
);
preloadFixtures
(
'
merge_requests/merge_request_with_task_list
.html.raw
'
);
beforeEach
(
function
()
{
beforeEach
(
function
()
{
this
.
class
=
new
gl
.
MergeRequestTabs
({
stubLocation
:
stubLocation
});
this
.
class
=
new
gl
.
MergeRequestTabs
({
stubLocation
:
stubLocation
});
...
@@ -41,7 +41,7 @@ require('vendor/jquery.scrollTo');
...
@@ -41,7 +41,7 @@ require('vendor/jquery.scrollTo');
describe
(
'
#activateTab
'
,
function
()
{
describe
(
'
#activateTab
'
,
function
()
{
beforeEach
(
function
()
{
beforeEach
(
function
()
{
spyOn
(
$
,
'
ajax
'
).
and
.
callFake
(
function
()
{});
spyOn
(
$
,
'
ajax
'
).
and
.
callFake
(
function
()
{});
loadFixtures
(
'
static/merge_request_tabs
.html.raw
'
);
loadFixtures
(
'
merge_requests/merge_request_with_task_list
.html.raw
'
);
this
.
subject
=
this
.
class
.
activateTab
;
this
.
subject
=
this
.
class
.
activateTab
;
});
});
it
(
'
shows the first tab when action is show
'
,
function
()
{
it
(
'
shows the first tab when action is show
'
,
function
()
{
...
...
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