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
17da29e4
Commit
17da29e4
authored
Apr 21, 2021
by
Jacques Erasmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update master to main
Updated the default branch name
parent
0c171090
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
28 deletions
+28
-28
spec/frontend/repository/components/table/index_spec.js
spec/frontend/repository/components/table/index_spec.js
+2
-2
spec/frontend/repository/components/table/parent_row_spec.js
spec/frontend/repository/components/table/parent_row_spec.js
+7
-7
spec/frontend/repository/components/table/row_spec.js
spec/frontend/repository/components/table/row_spec.js
+3
-3
spec/frontend/repository/components/upload_blob_modal_spec.js
.../frontend/repository/components/upload_blob_modal_spec.js
+3
-3
spec/frontend/repository/log_tree_spec.js
spec/frontend/repository/log_tree_spec.js
+3
-3
spec/frontend/repository/router_spec.js
spec/frontend/repository/router_spec.js
+8
-8
spec/frontend/repository/utils/title_spec.js
spec/frontend/repository/utils/title_spec.js
+2
-2
No files found.
spec/frontend/repository/components/table/index_spec.js
View file @
17da29e4
...
@@ -55,8 +55,8 @@ describe('Repository table component', () => {
...
@@ -55,8 +55,8 @@ describe('Repository table component', () => {
it
.
each
`
it
.
each
`
path | ref
path | ref
${
'
/
'
}
|
${
'
ma
ster
'
}
${
'
/
'
}
|
${
'
ma
in
'
}
${
'
app/assets
'
}
|
${
'
ma
ster
'
}
${
'
app/assets
'
}
|
${
'
ma
in
'
}
${
'
/
'
}
|
${
'
test
'
}
${
'
/
'
}
|
${
'
test
'
}
`
(
'
renders table caption for $ref in $path
'
,
({
path
,
ref
})
=>
{
`
(
'
renders table caption for $ref in $path
'
,
({
path
,
ref
})
=>
{
factory
({
path
});
factory
({
path
});
...
...
spec/frontend/repository/components/table/parent_row_spec.js
View file @
17da29e4
...
@@ -12,7 +12,7 @@ function factory(path, loadingPath) {
...
@@ -12,7 +12,7 @@ function factory(path, loadingPath) {
vm
=
shallowMount
(
ParentRow
,
{
vm
=
shallowMount
(
ParentRow
,
{
propsData
:
{
propsData
:
{
commitRef
:
'
ma
ster
'
,
commitRef
:
'
ma
in
'
,
path
,
path
,
loadingPath
,
loadingPath
,
},
},
...
@@ -32,10 +32,10 @@ describe('Repository parent row component', () => {
...
@@ -32,10 +32,10 @@ describe('Repository parent row component', () => {
it
.
each
`
it
.
each
`
path | to
path | to
${
'
app
'
}
|
${
'
/-/tree/ma
ster
/
'
}
${
'
app
'
}
|
${
'
/-/tree/ma
in
/
'
}
${
'
app/assets
'
}
|
${
'
/-/tree/ma
ster
/app
'
}
${
'
app/assets
'
}
|
${
'
/-/tree/ma
in
/app
'
}
${
'
app/assets#/test
'
}
|
${
'
/-/tree/ma
ster
/app/assets%23
'
}
${
'
app/assets#/test
'
}
|
${
'
/-/tree/ma
in
/app/assets%23
'
}
${
'
app/assets#/test/world
'
}
|
${
'
/-/tree/ma
ster
/app/assets%23/test
'
}
${
'
app/assets#/test/world
'
}
|
${
'
/-/tree/ma
in
/app/assets%23/test
'
}
`
(
'
renders link in $path to $to
'
,
({
path
,
to
})
=>
{
`
(
'
renders link in $path to $to
'
,
({
path
,
to
})
=>
{
factory
(
path
);
factory
(
path
);
...
@@ -50,7 +50,7 @@ describe('Repository parent row component', () => {
...
@@ -50,7 +50,7 @@ describe('Repository parent row component', () => {
vm
.
find
(
'
td
'
).
trigger
(
'
click
'
);
vm
.
find
(
'
td
'
).
trigger
(
'
click
'
);
expect
(
$router
.
push
).
toHaveBeenCalledWith
({
expect
(
$router
.
push
).
toHaveBeenCalledWith
({
path
:
'
/-/tree/ma
ster
/app
'
,
path
:
'
/-/tree/ma
in
/app
'
,
});
});
});
});
...
@@ -62,7 +62,7 @@ describe('Repository parent row component', () => {
...
@@ -62,7 +62,7 @@ describe('Repository parent row component', () => {
vm
.
find
(
'
a
'
).
trigger
(
'
click
'
);
vm
.
find
(
'
a
'
).
trigger
(
'
click
'
);
expect
(
$router
.
push
).
not
.
toHaveBeenCalledWith
({
expect
(
$router
.
push
).
not
.
toHaveBeenCalledWith
({
path
:
'
/-/tree/ma
ster
/app
'
,
path
:
'
/-/tree/ma
in
/app
'
,
});
});
});
});
...
...
spec/frontend/repository/components/table/row_spec.js
View file @
17da29e4
...
@@ -30,7 +30,7 @@ function factory(propsData = {}) {
...
@@ -30,7 +30,7 @@ function factory(propsData = {}) {
},
},
});
});
vm
.
setData
({
escapedRef
:
'
ma
ster
'
});
vm
.
setData
({
escapedRef
:
'
ma
in
'
});
}
}
describe
(
'
Repository table row component
'
,
()
=>
{
describe
(
'
Repository table row component
'
,
()
=>
{
...
@@ -115,7 +115,7 @@ describe('Repository table row component', () => {
...
@@ -115,7 +115,7 @@ describe('Repository table row component', () => {
return
vm
.
vm
.
$nextTick
().
then
(()
=>
{
return
vm
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
find
({
ref
:
'
link
'
}).
props
(
'
to
'
)).
toEqual
({
expect
(
vm
.
find
({
ref
:
'
link
'
}).
props
(
'
to
'
)).
toEqual
({
path
:
`/-/tree/ma
ster
/
${
encodeURIComponent
(
path
)}
`
,
path
:
`/-/tree/ma
in
/
${
encodeURIComponent
(
path
)}
`
,
});
});
});
});
});
});
...
@@ -130,7 +130,7 @@ describe('Repository table row component', () => {
...
@@ -130,7 +130,7 @@ describe('Repository table row component', () => {
});
});
return
vm
.
vm
.
$nextTick
().
then
(()
=>
{
return
vm
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
find
(
'
.tree-item-link
'
).
props
(
'
to
'
)).
toEqual
({
path
:
'
/-/tree/ma
ster
/test%23
'
});
expect
(
vm
.
find
(
'
.tree-item-link
'
).
props
(
'
to
'
)).
toEqual
({
path
:
'
/-/tree/ma
in
/test%23
'
});
});
});
});
});
...
...
spec/frontend/repository/components/upload_blob_modal_spec.js
View file @
17da29e4
...
@@ -20,8 +20,8 @@ jest.mock('~/lib/utils/url_utility', () => ({
...
@@ -20,8 +20,8 @@ jest.mock('~/lib/utils/url_utility', () => ({
const
initialProps
=
{
const
initialProps
=
{
modalId
:
'
upload-blob
'
,
modalId
:
'
upload-blob
'
,
commitMessage
:
'
Upload New File
'
,
commitMessage
:
'
Upload New File
'
,
targetBranch
:
'
ma
ster
'
,
targetBranch
:
'
ma
in
'
,
originalBranch
:
'
ma
ster
'
,
originalBranch
:
'
ma
in
'
,
canPushCode
:
true
,
canPushCode
:
true
,
path
:
'
new_upload
'
,
path
:
'
new_upload
'
,
};
};
...
@@ -111,7 +111,7 @@ describe('UploadBlobModal', () => {
...
@@ -111,7 +111,7 @@ describe('UploadBlobModal', () => {
if
(
canPushCode
)
{
if
(
canPushCode
)
{
describe
(
'
when changing the branch name
'
,
()
=>
{
describe
(
'
when changing the branch name
'
,
()
=>
{
it
(
'
displays the MR toggle
'
,
async
()
=>
{
it
(
'
displays the MR toggle
'
,
async
()
=>
{
wrapper
.
setData
({
target
:
'
Not ma
ster
'
});
wrapper
.
setData
({
target
:
'
Not ma
in
'
});
await
wrapper
.
vm
.
$nextTick
();
await
wrapper
.
vm
.
$nextTick
();
...
...
spec/frontend/repository/log_tree_spec.js
View file @
17da29e4
...
@@ -53,7 +53,7 @@ describe('fetchLogsTree', () => {
...
@@ -53,7 +53,7 @@ describe('fetchLogsTree', () => {
client
=
{
client
=
{
readQuery
:
()
=>
({
readQuery
:
()
=>
({
projectPath
:
'
gitlab-org/gitlab-foss
'
,
projectPath
:
'
gitlab-org/gitlab-foss
'
,
escapedRef
:
'
ma
ster
'
,
escapedRef
:
'
ma
in
'
,
commits
:
[],
commits
:
[],
}),
}),
writeQuery
:
jest
.
fn
(),
writeQuery
:
jest
.
fn
(),
...
@@ -71,7 +71,7 @@ describe('fetchLogsTree', () => {
...
@@ -71,7 +71,7 @@ describe('fetchLogsTree', () => {
it
(
'
calls axios get
'
,
()
=>
it
(
'
calls axios get
'
,
()
=>
fetchLogsTree
(
client
,
''
,
'
0
'
,
resolver
).
then
(()
=>
{
fetchLogsTree
(
client
,
''
,
'
0
'
,
resolver
).
then
(()
=>
{
expect
(
axios
.
get
).
toHaveBeenCalledWith
(
'
/gitlab-org/gitlab-foss/-/refs/ma
ster
/logs_tree/
'
,
{
expect
(
axios
.
get
).
toHaveBeenCalledWith
(
'
/gitlab-org/gitlab-foss/-/refs/ma
in
/logs_tree/
'
,
{
params
:
{
format
:
'
json
'
,
offset
:
'
0
'
},
params
:
{
format
:
'
json
'
,
offset
:
'
0
'
},
});
});
}));
}));
...
@@ -114,7 +114,7 @@ describe('fetchLogsTree', () => {
...
@@ -114,7 +114,7 @@ describe('fetchLogsTree', () => {
query
:
expect
.
anything
(),
query
:
expect
.
anything
(),
data
:
{
data
:
{
projectPath
:
'
gitlab-org/gitlab-foss
'
,
projectPath
:
'
gitlab-org/gitlab-foss
'
,
escapedRef
:
'
ma
ster
'
,
escapedRef
:
'
ma
in
'
,
commits
:
[
commits
:
[
expect
.
objectContaining
({
expect
.
objectContaining
({
__typename
:
'
LogTreeCommit
'
,
__typename
:
'
LogTreeCommit
'
,
...
...
spec/frontend/repository/router_spec.js
View file @
17da29e4
...
@@ -5,14 +5,14 @@ import createRouter from '~/repository/router';
...
@@ -5,14 +5,14 @@ import createRouter from '~/repository/router';
describe
(
'
Repository router spec
'
,
()
=>
{
describe
(
'
Repository router spec
'
,
()
=>
{
it
.
each
`
it
.
each
`
path
| branch | component | componentName
path | branch | component | componentName
${
'
/
'
}
|
${
'
master
'
}
|
${
IndexPage
}
|
${
'
IndexPage
'
}
${
'
/
'
}
|
${
'
main
'
}
|
${
IndexPage
}
|
${
'
IndexPage
'
}
${
'
/tree/ma
ster
'
}
|
${
'
master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/tree/ma
in
'
}
|
${
'
main
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/tree/feat(test)
'
}
|
${
'
feat(test)
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/tree/feat(test)
'
}
|
${
'
feat(test)
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/ma
ster
'
}
|
${
'
master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/ma
in
'
}
|
${
'
main
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/ma
ster/app/assets
'
}
|
${
'
master
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/ma
in/app/assets
'
}
|
${
'
main
'
}
|
${
TreePage
}
|
${
'
TreePage
'
}
${
'
/-/tree/123/app/assets
'
}
|
${
'
master
'
}
|
${
null
}
|
${
'
null
'
}
${
'
/-/tree/123/app/assets
'
}
|
${
'
main
'
}
|
${
null
}
|
${
'
null
'
}
${
'
/-/blob/ma
ster/file.md
'
}
|
${
'
master
'
}
|
${
BlobPage
}
|
${
'
BlobPage
'
}
${
'
/-/blob/ma
in/file.md
'
}
|
${
'
main
'
}
|
${
BlobPage
}
|
${
'
BlobPage
'
}
`
(
'
sets component as $componentName for path "$path"
'
,
({
path
,
component
,
branch
})
=>
{
`
(
'
sets component as $componentName for path "$path"
'
,
({
path
,
component
,
branch
})
=>
{
const
router
=
createRouter
(
''
,
branch
);
const
router
=
createRouter
(
''
,
branch
);
...
...
spec/frontend/repository/utils/title_spec.js
View file @
17da29e4
...
@@ -8,9 +8,9 @@ describe('setTitle', () => {
...
@@ -8,9 +8,9 @@ describe('setTitle', () => {
${
'
app/assets
'
}
|
${
'
app/assets
'
}
${
'
app/assets
'
}
|
${
'
app/assets
'
}
${
'
app/assets/javascripts
'
}
|
${
'
app/assets/javascripts
'
}
${
'
app/assets/javascripts
'
}
|
${
'
app/assets/javascripts
'
}
`
(
'
sets document title as $title for $path
'
,
({
path
,
title
})
=>
{
`
(
'
sets document title as $title for $path
'
,
({
path
,
title
})
=>
{
setTitle
(
path
,
'
ma
ster
'
,
'
GitLab Org / GitLab
'
);
setTitle
(
path
,
'
ma
in
'
,
'
GitLab Org / GitLab
'
);
expect
(
document
.
title
).
toEqual
(
`
${
title
}
· ma
ster
· GitLab Org / GitLab · GitLab`
);
expect
(
document
.
title
).
toEqual
(
`
${
title
}
· ma
in
· GitLab Org / GitLab · GitLab`
);
});
});
});
});
...
...
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