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
9078f3f3
Commit
9078f3f3
authored
Sep 01, 2021
by
jerasmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update query name
Updated the GraphQL query name
parent
edf6a259
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
app/assets/javascripts/repository/components/table/row.vue
app/assets/javascripts/repository/components/table/row.vue
+1
-1
app/assets/javascripts/repository/components/tree_content.vue
...assets/javascripts/repository/components/tree_content.vue
+1
-1
app/assets/javascripts/repository/mixins/preload.js
app/assets/javascripts/repository/mixins/preload.js
+1
-1
app/graphql/queries/repository/paginated_tree.query.graphql
app/graphql/queries/repository/paginated_tree.query.graphql
+1
-1
spec/frontend/repository/components/tree_content_spec.js
spec/frontend/repository/components/tree_content_spec.js
+4
-3
No files found.
app/assets/javascripts/repository/components/table/row.vue
View file @
9078f3f3
...
...
@@ -9,8 +9,8 @@ import {
GlHoverLoadDirective
,
}
from
'
@gitlab/ui
'
;
import
{
escapeRegExp
}
from
'
lodash
'
;
import
paginatedTreeQuery
from
'
shared_queries/repository/paginated_tree.query.graphql
'
;
import
filesQuery
from
'
shared_queries/repository/files.query.graphql
'
;
import
paginatedTreeQuery
from
'
shared_queries/repository/paginated_tree.query.graphql
'
;
import
{
escapeFileUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
TREE_PAGE_SIZE
}
from
'
~/repository/constants
'
;
import
FileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
...
...
app/assets/javascripts/repository/components/tree_content.vue
View file @
9078f3f3
<
script
>
import
paginatedTreeQuery
from
'
shared_queries/repository/paginated_tree.query.graphql
'
;
import
filesQuery
from
'
shared_queries/repository/files.query.graphql
'
;
import
paginatedTreeQuery
from
'
shared_queries/repository/paginated_tree.query.graphql
'
;
import
createFlash
from
'
~/flash
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
__
}
from
'
../../locale
'
;
...
...
app/assets/javascripts/repository/mixins/preload.js
View file @
9078f3f3
import
paginatedTreeQuery
from
'
shared_queries/repository/paginated_tree.query.graphql
'
;
import
filesQuery
from
'
shared_queries/repository/files.query.graphql
'
;
import
paginatedTreeQuery
from
'
shared_queries/repository/paginated_tree.query.graphql
'
;
import
projectPathQuery
from
'
../queries/project_path.query.graphql
'
;
import
getRefMixin
from
'
./get_ref
'
;
...
...
app/graphql/queries/repository/paginated_tree.query.graphql
View file @
9078f3f3
...
...
@@ -7,7 +7,7 @@ fragment TreeEntry on Entry {
type
}
query
get
Files
(
$projectPath
:
ID
!,
$path
:
String
,
$ref
:
String
!,
$nextPageCursor
:
String
)
{
query
get
PaginatedTree
(
$projectPath
:
ID
!,
$path
:
String
,
$ref
:
String
!,
$nextPageCursor
:
String
)
{
project
(
fullPath
:
$projectPath
)
{
id
__typename
...
...
spec/frontend/repository/components/tree_content_spec.js
View file @
9078f3f3
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
filesQuery
from
'
shared_queries/repository/files
.query.graphql
'
;
import
paginatedTreeQuery
from
'
shared_queries/repository/paginated_tree
.query.graphql
'
;
import
FilePreview
from
'
~/repository/components/preview/index.vue
'
;
import
FileTable
from
'
~/repository/components/table/index.vue
'
;
import
TreeContent
from
'
~/repository/components/tree_content.vue
'
;
...
...
@@ -22,6 +22,7 @@ function factory(path, data = () => ({})) {
provide
:
{
glFeatures
:
{
increasePageSizeExponentially
:
true
,
paginatedTreeGraphqlQuery
:
true
,
},
},
});
...
...
@@ -58,7 +59,7 @@ describe('Repository table component', () => {
it
(
'
normalizes edge nodes
'
,
()
=>
{
factory
(
'
/
'
);
const
output
=
vm
.
vm
.
normalizeData
(
'
blobs
'
,
[{
node
:
'
1
'
},
{
node
:
'
2
'
}]
);
const
output
=
vm
.
vm
.
normalizeData
(
'
blobs
'
,
{
nodes
:
[
'
1
'
,
'
2
'
]
}
);
expect
(
output
).
toEqual
([
'
1
'
,
'
2
'
]);
});
...
...
@@ -168,7 +169,7 @@ describe('Repository table component', () => {
vm
.
vm
.
fetchFiles
();
expect
(
$apollo
.
query
).
toHaveBeenCalledWith
({
query
:
files
Query
,
query
:
paginatedTree
Query
,
variables
:
{
pageSize
,
nextPageCursor
:
''
,
...
...
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