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
e9c70152
Commit
e9c70152
authored
Nov 24, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed rspec
added getter specs
parent
8f7ec95b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
4 deletions
+35
-4
spec/features/projects/tree/create_directory_spec.rb
spec/features/projects/tree/create_directory_spec.rb
+3
-1
spec/features/projects/tree/create_file_spec.rb
spec/features/projects/tree/create_file_spec.rb
+3
-1
spec/features/projects/tree/upload_file_spec.rb
spec/features/projects/tree/upload_file_spec.rb
+2
-2
spec/javascripts/repo/stores/getters_spec.js
spec/javascripts/repo/stores/getters_spec.js
+27
-0
No files found.
spec/features/projects/tree/create_directory_spec.rb
View file @
e9c70152
...
...
@@ -26,9 +26,11 @@ feature 'Multi-file editor new directory', :js do
click_button
(
'Create directory'
)
end
find
(
'.multi-file-commit-panel-collapse-btn'
).
click
fill_in
(
'commit-message'
,
with:
'commit message'
)
click_button
(
'Commit
1 file
'
)
click_button
(
'Commit'
)
expect
(
page
).
to
have_selector
(
'td'
,
text:
'commit message'
)
end
...
...
spec/features/projects/tree/create_file_spec.rb
View file @
e9c70152
...
...
@@ -26,9 +26,11 @@ feature 'Multi-file editor new file', :js do
click_button
(
'Create file'
)
end
find
(
'.multi-file-commit-panel-collapse-btn'
).
click
fill_in
(
'commit-message'
,
with:
'commit message'
)
click_button
(
'Commit
1 file
'
)
click_button
(
'Commit'
)
expect
(
page
).
to
have_selector
(
'td'
,
text:
'commit message'
)
end
...
...
spec/features/projects/tree/upload_file_spec.rb
View file @
e9c70152
...
...
@@ -26,7 +26,7 @@ feature 'Multi-file editor upload file', :js do
find
(
'.add-to-tree'
).
click
expect
(
page
).
to
have_selector
(
'.
repo
-tab'
,
text:
'doc_sample.txt'
)
expect
(
page
).
to
have_selector
(
'.
multi-file
-tab'
,
text:
'doc_sample.txt'
)
expect
(
find
(
'.blob-editor-container .lines-content'
)[
'innerText'
]).
to
have_content
(
File
.
open
(
txt_file
,
&
:readline
))
end
...
...
@@ -39,7 +39,7 @@ feature 'Multi-file editor upload file', :js do
find
(
'.add-to-tree'
).
click
expect
(
page
).
to
have_selector
(
'.
repo
-tab'
,
text:
'dk.png'
)
expect
(
page
).
to
have_selector
(
'.
multi-file
-tab'
,
text:
'dk.png'
)
expect
(
page
).
not_to
have_selector
(
'.monaco-editor'
)
expect
(
page
).
to
have_content
(
'The source could not be displayed for this temporary file.'
)
end
...
...
spec/javascripts/repo/stores/getters_spec.js
View file @
e9c70152
...
...
@@ -116,4 +116,31 @@ describe('Multi-file store getters', () => {
expect
(
getters
.
canEditFile
(
localState
)).
toBeFalsy
();
});
});
describe
(
'
modifiedFiles
'
,
()
=>
{
it
(
'
returns a list of modified files
'
,
()
=>
{
localState
.
openFiles
.
push
(
file
());
localState
.
openFiles
.
push
(
file
(
'
changed
'
));
localState
.
openFiles
[
1
].
changed
=
true
;
const
modifiedFiles
=
getters
.
modifiedFiles
(
localState
);
expect
(
modifiedFiles
.
length
).
toBe
(
1
);
expect
(
modifiedFiles
[
0
].
name
).
toBe
(
'
changed
'
);
});
});
describe
(
'
addedFiles
'
,
()
=>
{
it
(
'
returns a list of added files
'
,
()
=>
{
localState
.
openFiles
.
push
(
file
());
localState
.
openFiles
.
push
(
file
(
'
added
'
));
localState
.
openFiles
[
1
].
changed
=
true
;
localState
.
openFiles
[
1
].
tempFile
=
true
;
const
modifiedFiles
=
getters
.
addedFiles
(
localState
);
expect
(
modifiedFiles
.
length
).
toBe
(
1
);
expect
(
modifiedFiles
[
0
].
name
).
toBe
(
'
added
'
);
});
});
});
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