BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f0e1ee5f
Commit
f0e1ee5f
authored
Mar 25, 2018
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for Tests on file.js and tabs tests
parent
1814fc3f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
file.js
app/assets/javascripts/ide/stores/actions/file.js
+2
-5
repo_tabs_spec.js
spec/javascripts/ide/components/repo_tabs_spec.js
+1
-0
No files found.
app/assets/javascripts/ide/stores/actions/file.js
View file @
f0e1ee5f
...
...
@@ -48,9 +48,8 @@ export const setFileActive = ({ commit, state, getters, dispatch }, path) => {
export
const
getFileData
=
({
state
,
commit
,
dispatch
},
{
path
,
makeFileActive
=
true
})
=>
{
const
file
=
state
.
entries
[
path
];
return
new
Promise
((
resolve
,
reject
)
=>
{
commit
(
types
.
TOGGLE_LOADING
,
{
entry
:
file
});
service
return
service
.
getFileData
(
file
.
url
)
.
then
(
res
=>
{
const
pageTitle
=
decodeURI
(
normalizeHeaders
(
res
.
headers
)[
'PAGE-TITLE'
]);
...
...
@@ -65,11 +64,9 @@ export const getFileData = ({ state, commit, dispatch }, { path, makeFileActive
if
(
makeFileActive
)
dispatch
(
'setFileActive'
,
file
.
path
);
commit
(
types
.
TOGGLE_LOADING
,
{
entry
:
file
});
})
.
catch
(
err
=>
{
.
catch
(()
=>
{
commit
(
types
.
TOGGLE_LOADING
,
{
entry
:
file
});
flash
(
'Error loading file data. Please try again.'
,
'alert'
,
document
,
null
,
false
,
true
);
reject
(
err
);
});
});
};
...
...
spec/javascripts/ide/components/repo_tabs_spec.js
View file @
f0e1ee5f
...
...
@@ -17,6 +17,7 @@ describe('RepoTabs', () => {
files
:
openedFiles
,
viewer
:
'editor'
,
hasChanges
:
false
,
hasMergeRequest
:
false
,
});
openedFiles
[
0
].
active
=
true
;
...
...
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