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
f6ce5527
Commit
f6ce5527
authored
Oct 27, 2021
by
Frédéric Caplette
Committed by
Natalia Tepluhina
Oct 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace writeQuery calls in pipeline_editor app with client mutations
parent
033444cf
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
63 additions
and
37 deletions
+63
-37
app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
...ipts/pipeline_editor/components/commit/commit_section.vue
+5
-5
app/assets/javascripts/pipeline_editor/graphql/mutations/update_app_status.mutation.graphql
...itor/graphql/mutations/update_app_status.mutation.graphql
+3
-0
app/assets/javascripts/pipeline_editor/graphql/queries/client/is_new_ci_config_file.graphql
...itor/graphql/queries/client/is_new_ci_config_file.graphql
+0
-3
app/assets/javascripts/pipeline_editor/graphql/resolvers.js
app/assets/javascripts/pipeline_editor/graphql/resolvers.js
+9
-7
app/assets/javascripts/pipeline_editor/index.js
app/assets/javascripts/pipeline_editor/index.js
+9
-0
app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
...ssets/javascripts/pipeline_editor/pipeline_editor_app.vue
+8
-15
app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
...sets/javascripts/pipeline_editor/pipeline_editor_home.vue
+1
-0
spec/frontend/pipeline_editor/components/commit/commit_section_spec.js
.../pipeline_editor/components/commit/commit_section_spec.js
+2
-2
spec/frontend/pipeline_editor/mock_data.js
spec/frontend/pipeline_editor/mock_data.js
+11
-0
spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
+15
-5
No files found.
app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
View file @
f6ce5527
...
@@ -11,7 +11,6 @@ import commitCIFile from '../../graphql/mutations/commit_ci_file.mutation.graphq
...
@@ -11,7 +11,6 @@ import commitCIFile from '../../graphql/mutations/commit_ci_file.mutation.graphq
import
updateCurrentBranchMutation
from
'
../../graphql/mutations/update_current_branch.mutation.graphql
'
;
import
updateCurrentBranchMutation
from
'
../../graphql/mutations/update_current_branch.mutation.graphql
'
;
import
updateLastCommitBranchMutation
from
'
../../graphql/mutations/update_last_commit_branch.mutation.graphql
'
;
import
updateLastCommitBranchMutation
from
'
../../graphql/mutations/update_last_commit_branch.mutation.graphql
'
;
import
getCurrentBranch
from
'
../../graphql/queries/client/current_branch.graphql
'
;
import
getCurrentBranch
from
'
../../graphql/queries/client/current_branch.graphql
'
;
import
getIsNewCiConfigFile
from
'
../../graphql/queries/client/is_new_ci_config_file.graphql
'
;
import
getPipelineEtag
from
'
../../graphql/queries/client/pipeline_etag.graphql
'
;
import
getPipelineEtag
from
'
../../graphql/queries/client/pipeline_etag.graphql
'
;
import
CommitForm
from
'
./commit_form.vue
'
;
import
CommitForm
from
'
./commit_form.vue
'
;
...
@@ -41,18 +40,19 @@ export default {
...
@@ -41,18 +40,19 @@ export default {
required
:
false
,
required
:
false
,
default
:
''
,
default
:
''
,
},
},
isNewCiConfigFile
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{
return
{
commit
:
{},
commit
:
{},
isNewCiConfigFile
:
false
,
isSaving
:
false
,
isSaving
:
false
,
};
};
},
},
apollo
:
{
apollo
:
{
isNewCiConfigFile
:
{
query
:
getIsNewCiConfigFile
,
},
currentBranch
:
{
currentBranch
:
{
query
:
getCurrentBranch
,
query
:
getCurrentBranch
,
},
},
...
...
app/assets/javascripts/pipeline_editor/graphql/mutations/update_app_status.mutation.graphql
0 → 100644
View file @
f6ce5527
mutation
updateAppStatus
(
$appStatus
:
String
)
{
updateAppStatus
(
appStatus
:
$appStatus
)
@client
}
app/assets/javascripts/pipeline_editor/graphql/queries/client/is_new_ci_config_file.graphql
deleted
100644 → 0
View file @
033444cf
query
getIsNewCiConfigFile
{
isNewCiConfigFile
@client
}
app/assets/javascripts/pipeline_editor/graphql/resolvers.js
View file @
f6ce5527
import
produce
from
'
immer
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
getAppStatus
from
'
./queries/client/app_status.graphql
'
;
import
getCurrentBranchQuery
from
'
./queries/client/current_branch.graphql
'
;
import
getCurrentBranchQuery
from
'
./queries/client/current_branch.graphql
'
;
import
getLastCommitBranchQuery
from
'
./queries/client/last_commit_branch.query.graphql
'
;
import
getLastCommitBranchQuery
from
'
./queries/client/last_commit_branch.query.graphql
'
;
...
@@ -31,20 +31,22 @@ export const resolvers = {
...
@@ -31,20 +31,22 @@ export const resolvers = {
__typename
:
'
CiLintContent
'
,
__typename
:
'
CiLintContent
'
,
}));
}));
},
},
updateAppStatus
:
(
_
,
{
appStatus
},
{
cache
})
=>
{
cache
.
writeQuery
({
query
:
getAppStatus
,
data
:
{
appStatus
},
});
},
updateCurrentBranch
:
(
_
,
{
currentBranch
},
{
cache
})
=>
{
updateCurrentBranch
:
(
_
,
{
currentBranch
},
{
cache
})
=>
{
cache
.
writeQuery
({
cache
.
writeQuery
({
query
:
getCurrentBranchQuery
,
query
:
getCurrentBranchQuery
,
data
:
produce
(
cache
.
readQuery
({
query
:
getCurrentBranchQuery
}),
(
draftData
)
=>
{
data
:
{
currentBranch
},
draftData
.
currentBranch
=
currentBranch
;
}),
});
});
},
},
updateLastCommitBranch
:
(
_
,
{
lastCommitBranch
},
{
cache
})
=>
{
updateLastCommitBranch
:
(
_
,
{
lastCommitBranch
},
{
cache
})
=>
{
cache
.
writeQuery
({
cache
.
writeQuery
({
query
:
getLastCommitBranchQuery
,
query
:
getLastCommitBranchQuery
,
data
:
produce
(
cache
.
readQuery
({
query
:
getLastCommitBranchQuery
}),
(
draftData
)
=>
{
data
:
{
lastCommitBranch
},
draftData
.
lastCommitBranch
=
lastCommitBranch
;
}),
});
});
},
},
},
},
...
...
app/assets/javascripts/pipeline_editor/index.js
View file @
f6ce5527
...
@@ -3,8 +3,10 @@ import Vue from 'vue';
...
@@ -3,8 +3,10 @@ import Vue from 'vue';
import
VueApollo
from
'
vue-apollo
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
{
resetServiceWorkersPublicPath
}
from
'
../lib/utils/webpack
'
;
import
{
resetServiceWorkersPublicPath
}
from
'
../lib/utils/webpack
'
;
import
{
EDITOR_APP_STATUS_LOADING
}
from
'
./constants
'
;
import
{
CODE_SNIPPET_SOURCE_SETTINGS
}
from
'
./components/code_snippet_alert/constants
'
;
import
{
CODE_SNIPPET_SOURCE_SETTINGS
}
from
'
./components/code_snippet_alert/constants
'
;
import
getCurrentBranch
from
'
./graphql/queries/client/current_branch.graphql
'
;
import
getCurrentBranch
from
'
./graphql/queries/client/current_branch.graphql
'
;
import
getAppStatus
from
'
./graphql/queries/client/app_status.graphql
'
;
import
getLastCommitBranchQuery
from
'
./graphql/queries/client/last_commit_branch.query.graphql
'
;
import
getLastCommitBranchQuery
from
'
./graphql/queries/client/last_commit_branch.query.graphql
'
;
import
getPipelineEtag
from
'
./graphql/queries/client/pipeline_etag.graphql
'
;
import
getPipelineEtag
from
'
./graphql/queries/client/pipeline_etag.graphql
'
;
import
{
resolvers
}
from
'
./graphql/resolvers
'
;
import
{
resolvers
}
from
'
./graphql/resolvers
'
;
...
@@ -64,6 +66,13 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
...
@@ -64,6 +66,13 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
});
});
const
{
cache
}
=
apolloProvider
.
clients
.
defaultClient
;
const
{
cache
}
=
apolloProvider
.
clients
.
defaultClient
;
cache
.
writeQuery
({
query
:
getAppStatus
,
data
:
{
appStatus
:
EDITOR_APP_STATUS_LOADING
,
},
});
cache
.
writeQuery
({
cache
.
writeQuery
({
query
:
getCurrentBranch
,
query
:
getCurrentBranch
,
data
:
{
data
:
{
...
...
app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
View file @
f6ce5527
...
@@ -17,11 +17,11 @@ import {
...
@@ -17,11 +17,11 @@ import {
LOAD_FAILURE_UNKNOWN
,
LOAD_FAILURE_UNKNOWN
,
STARTER_TEMPLATE_NAME
,
STARTER_TEMPLATE_NAME
,
}
from
'
./constants
'
;
}
from
'
./constants
'
;
import
updateAppStatus
from
'
./graphql/mutations/update_app_status.mutation.graphql
'
;
import
getBlobContent
from
'
./graphql/queries/blob_content.graphql
'
;
import
getBlobContent
from
'
./graphql/queries/blob_content.graphql
'
;
import
getCiConfigData
from
'
./graphql/queries/ci_config.graphql
'
;
import
getCiConfigData
from
'
./graphql/queries/ci_config.graphql
'
;
import
getAppStatus
from
'
./graphql/queries/client/app_status.graphql
'
;
import
getAppStatus
from
'
./graphql/queries/client/app_status.graphql
'
;
import
getCurrentBranch
from
'
./graphql/queries/client/current_branch.graphql
'
;
import
getCurrentBranch
from
'
./graphql/queries/client/current_branch.graphql
'
;
import
getIsNewCiConfigFile
from
'
./graphql/queries/client/is_new_ci_config_file.graphql
'
;
import
getTemplate
from
'
./graphql/queries/get_starter_template.query.graphql
'
;
import
getTemplate
from
'
./graphql/queries/get_starter_template.query.graphql
'
;
import
getLatestCommitShaQuery
from
'
./graphql/queries/latest_commit_sha.query.graphql
'
;
import
getLatestCommitShaQuery
from
'
./graphql/queries/latest_commit_sha.query.graphql
'
;
import
PipelineEditorHome
from
'
./pipeline_editor_home.vue
'
;
import
PipelineEditorHome
from
'
./pipeline_editor_home.vue
'
;
...
@@ -44,20 +44,20 @@ export default {
...
@@ -44,20 +44,20 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
starterTemplateName
:
STARTER_TEMPLATE_NAME
,
ciConfigData
:
{},
ciConfigData
:
{},
currentCiFileContent
:
''
,
failureType
:
null
,
failureType
:
null
,
failureReasons
:
[],
failureReasons
:
[],
initialCiFileContent
:
''
,
initialCiFileContent
:
''
,
isFetchingCommitSha
:
false
,
isFetchingCommitSha
:
false
,
isNewCiConfigFile
:
false
,
isNewCiConfigFile
:
false
,
lastCommittedContent
:
''
,
lastCommittedContent
:
''
,
currentCiFileContent
:
''
,
showFailure
:
false
,
successType
:
null
,
showStartScreen
:
false
,
showStartScreen
:
false
,
showSuccess
:
false
,
showSuccess
:
false
,
showFailure
:
false
,
starterTemplate
:
''
,
starterTemplate
:
''
,
starterTemplateName
:
STARTER_TEMPLATE_NAME
,
successType
:
null
,
};
};
},
},
...
@@ -179,9 +179,6 @@ export default {
...
@@ -179,9 +179,6 @@ export default {
currentBranch
:
{
currentBranch
:
{
query
:
getCurrentBranch
,
query
:
getCurrentBranch
,
},
},
isNewCiConfigFile
:
{
query
:
getIsNewCiConfigFile
,
},
starterTemplate
:
{
starterTemplate
:
{
query
:
getTemplate
,
query
:
getTemplate
,
variables
()
{
variables
()
{
...
@@ -261,12 +258,10 @@ export default {
...
@@ -261,12 +258,10 @@ export default {
this
.
currentCiFileContent
=
this
.
lastCommittedContent
;
this
.
currentCiFileContent
=
this
.
lastCommittedContent
;
},
},
setAppStatus
(
appStatus
)
{
setAppStatus
(
appStatus
)
{
this
.
$apollo
.
getClient
().
writeQuery
({
query
:
getAppStatus
,
data
:
{
appStatus
}
});
this
.
$apollo
.
mutate
({
mutation
:
updateAppStatus
,
variables
:
{
appStatus
}
});
},
},
setNewEmptyCiConfigFile
()
{
setNewEmptyCiConfigFile
()
{
this
.
$apollo
this
.
isNewCiConfigFile
=
true
;
.
getClient
()
.
writeQuery
({
query
:
getIsNewCiConfigFile
,
data
:
{
isNewCiConfigFile
:
true
}
});
this
.
showStartScreen
=
false
;
this
.
showStartScreen
=
false
;
},
},
showErrorAlert
({
type
,
reasons
=
[]
})
{
showErrorAlert
({
type
,
reasons
=
[]
})
{
...
@@ -283,9 +278,7 @@ export default {
...
@@ -283,9 +278,7 @@ export default {
this
.
reportSuccess
(
type
);
this
.
reportSuccess
(
type
);
if
(
this
.
isNewCiConfigFile
)
{
if
(
this
.
isNewCiConfigFile
)
{
this
.
$apollo
this
.
isNewCiConfigFile
=
false
;
.
getClient
()
.
writeQuery
({
query
:
getIsNewCiConfigFile
,
data
:
{
isNewCiConfigFile
:
false
}
});
}
}
// Keep track of the latest committed content to know
// Keep track of the latest committed content to know
...
...
app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
View file @
f6ce5527
...
@@ -125,6 +125,7 @@ export default {
...
@@ -125,6 +125,7 @@ export default {
:ref=
"$options.commitSectionRef"
:ref=
"$options.commitSectionRef"
:ci-file-content=
"ciFileContent"
:ci-file-content=
"ciFileContent"
:commit-sha=
"commitSha"
:commit-sha=
"commitSha"
:is-new-ci-config-file=
"isNewCiConfigFile"
v-on=
"$listeners"
v-on=
"$listeners"
/>
/>
<pipeline-editor-drawer
/>
<pipeline-editor-drawer
/>
...
...
spec/frontend/pipeline_editor/components/commit/commit_section_spec.js
View file @
f6ce5527
...
@@ -52,6 +52,7 @@ describe('Pipeline Editor | Commit section', () => {
...
@@ -52,6 +52,7 @@ describe('Pipeline Editor | Commit section', () => {
const
defaultProps
=
{
const
defaultProps
=
{
ciFileContent
:
mockCiYml
,
ciFileContent
:
mockCiYml
,
commitSha
:
mockCommitSha
,
commitSha
:
mockCommitSha
,
isNewCiConfigFile
:
false
,
};
};
const
createComponent
=
({
props
=
{},
options
=
{},
provide
=
{}
}
=
{})
=>
{
const
createComponent
=
({
props
=
{},
options
=
{},
provide
=
{}
}
=
{})
=>
{
...
@@ -72,7 +73,6 @@ describe('Pipeline Editor | Commit section', () => {
...
@@ -72,7 +73,6 @@ describe('Pipeline Editor | Commit section', () => {
data
()
{
data
()
{
return
{
return
{
currentBranch
:
mockDefaultBranch
,
currentBranch
:
mockDefaultBranch
,
isNewCiConfigFile
:
Boolean
(
options
?.
isNewCiConfigfile
),
};
};
},
},
mocks
:
{
mocks
:
{
...
@@ -115,7 +115,7 @@ describe('Pipeline Editor | Commit section', () => {
...
@@ -115,7 +115,7 @@ describe('Pipeline Editor | Commit section', () => {
describe
(
'
when the user commits a new file
'
,
()
=>
{
describe
(
'
when the user commits a new file
'
,
()
=>
{
beforeEach
(
async
()
=>
{
beforeEach
(
async
()
=>
{
createComponent
({
options
:
{
isNewCiConfigf
ile
:
true
}
});
createComponent
({
props
:
{
isNewCiConfigF
ile
:
true
}
});
await
submitCommit
();
await
submitCommit
();
});
});
...
...
spec/frontend/pipeline_editor/mock_data.js
View file @
f6ce5527
...
@@ -35,6 +35,17 @@ job_build:
...
@@ -35,6 +35,17 @@ job_build:
- echo "build"
- echo "build"
needs: ["job_test_2"]
needs: ["job_test_2"]
`
;
`
;
export
const
mockCiTemplateQueryResponse
=
{
data
:
{
project
:
{
ciTemplate
:
{
content
:
mockCiYml
,
},
},
},
};
export
const
mockBlobContentQueryResponse
=
{
export
const
mockBlobContentQueryResponse
=
{
data
:
{
data
:
{
project
:
{
repository
:
{
blobs
:
{
nodes
:
[{
rawBlob
:
mockCiYml
}]
}
}
},
project
:
{
repository
:
{
blobs
:
{
nodes
:
[{
rawBlob
:
mockCiYml
}]
}
}
},
...
...
spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
View file @
f6ce5527
...
@@ -11,17 +11,21 @@ import PipelineEditorMessages from '~/pipeline_editor/components/ui/pipeline_edi
...
@@ -11,17 +11,21 @@ import PipelineEditorMessages from '~/pipeline_editor/components/ui/pipeline_edi
import
{
COMMIT_SUCCESS
,
COMMIT_FAILURE
}
from
'
~/pipeline_editor/constants
'
;
import
{
COMMIT_SUCCESS
,
COMMIT_FAILURE
}
from
'
~/pipeline_editor/constants
'
;
import
getBlobContent
from
'
~/pipeline_editor/graphql/queries/blob_content.graphql
'
;
import
getBlobContent
from
'
~/pipeline_editor/graphql/queries/blob_content.graphql
'
;
import
getCiConfigData
from
'
~/pipeline_editor/graphql/queries/ci_config.graphql
'
;
import
getCiConfigData
from
'
~/pipeline_editor/graphql/queries/ci_config.graphql
'
;
import
getPipelineQuery
from
'
~/pipeline_editor/graphql/queries/client/pipeline.graphql
'
;
import
getTemplate
from
'
~/pipeline_editor/graphql/queries/get_starter_template.query.graphql
'
;
import
getTemplate
from
'
~/pipeline_editor/graphql/queries/get_starter_template.query.graphql
'
;
import
getLatestCommitShaQuery
from
'
~/pipeline_editor/graphql/queries/latest_commit_sha.query.graphql
'
;
import
getLatestCommitShaQuery
from
'
~/pipeline_editor/graphql/queries/latest_commit_sha.query.graphql
'
;
import
getPipelineQuery
from
'
~/pipeline_editor/graphql/queries/client/pipeline.graphql
'
;
import
PipelineEditorApp
from
'
~/pipeline_editor/pipeline_editor_app.vue
'
;
import
PipelineEditorApp
from
'
~/pipeline_editor/pipeline_editor_app.vue
'
;
import
PipelineEditorHome
from
'
~/pipeline_editor/pipeline_editor_home.vue
'
;
import
PipelineEditorHome
from
'
~/pipeline_editor/pipeline_editor_home.vue
'
;
import
{
import
{
mockCiConfigPath
,
mockCiConfigPath
,
mockCiConfigQueryResponse
,
mockCiConfigQueryResponse
,
mockBlobContentQueryResponse
,
mockBlobContentQueryResponse
,
mockBlobContentQueryResponseNoCiFile
,
mockBlobContentQueryResponseNoCiFile
,
mockCiYml
,
mockCiYml
,
mockCiTemplateQueryResponse
,
mockCommitSha
,
mockCommitSha
,
mockCommitShaResults
,
mockCommitShaResults
,
mockDefaultBranch
,
mockDefaultBranch
,
...
@@ -79,7 +83,7 @@ describe('Pipeline editor app component', () => {
...
@@ -79,7 +83,7 @@ describe('Pipeline editor app component', () => {
});
});
};
};
const
createComponentWithApollo
=
async
({
pro
ps
=
{},
pro
vide
=
{},
stubs
=
{}
}
=
{})
=>
{
const
createComponentWithApollo
=
async
({
provide
=
{},
stubs
=
{}
}
=
{})
=>
{
const
handlers
=
[
const
handlers
=
[
[
getBlobContent
,
mockBlobContentData
],
[
getBlobContent
,
mockBlobContentData
],
[
getCiConfigData
,
mockCiConfigData
],
[
getCiConfigData
,
mockCiConfigData
],
...
@@ -87,7 +91,6 @@ describe('Pipeline editor app component', () => {
...
@@ -87,7 +91,6 @@ describe('Pipeline editor app component', () => {
[
getLatestCommitShaQuery
,
mockLatestCommitShaQuery
],
[
getLatestCommitShaQuery
,
mockLatestCommitShaQuery
],
[
getPipelineQuery
,
mockPipelineQuery
],
[
getPipelineQuery
,
mockPipelineQuery
],
];
];
mockApollo
=
createMockApollo
(
handlers
);
mockApollo
=
createMockApollo
(
handlers
);
const
options
=
{
const
options
=
{
...
@@ -95,13 +98,15 @@ describe('Pipeline editor app component', () => {
...
@@ -95,13 +98,15 @@ describe('Pipeline editor app component', () => {
data
()
{
data
()
{
return
{
return
{
currentBranch
:
mockDefaultBranch
,
currentBranch
:
mockDefaultBranch
,
lastCommitBranch
:
''
,
appStatus
:
''
,
};
};
},
},
mocks
:
{},
mocks
:
{},
apolloProvider
:
mockApollo
,
apolloProvider
:
mockApollo
,
};
};
createComponent
({
pro
ps
,
pro
vide
,
stubs
,
options
});
createComponent
({
provide
,
stubs
,
options
});
return
waitForPromises
();
return
waitForPromises
();
};
};
...
@@ -199,7 +204,7 @@ describe('Pipeline editor app component', () => {
...
@@ -199,7 +204,7 @@ describe('Pipeline editor app component', () => {
it
(
'
shows a unkown error message
'
,
async
()
=>
{
it
(
'
shows a unkown error message
'
,
async
()
=>
{
const
loadUnknownFailureText
=
'
The CI configuration was not loaded, please try again.
'
;
const
loadUnknownFailureText
=
'
The CI configuration was not loaded, please try again.
'
;
mockBlobContentData
.
mockRejectedValueOnce
(
new
Error
(
'
My error!
'
)
);
mockBlobContentData
.
mockRejectedValueOnce
();
await
createComponentWithApollo
({
await
createComponentWithApollo
({
stubs
:
{
stubs
:
{
PipelineEditorMessages
,
PipelineEditorMessages
,
...
@@ -344,6 +349,8 @@ describe('Pipeline editor app component', () => {
...
@@ -344,6 +349,8 @@ describe('Pipeline editor app component', () => {
describe
(
'
when refetching content
'
,
()
=>
{
describe
(
'
when refetching content
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mockBlobContentData
.
mockResolvedValue
(
mockBlobContentQueryResponse
);
mockCiConfigData
.
mockResolvedValue
(
mockCiConfigQueryResponse
);
mockLatestCommitShaQuery
.
mockResolvedValue
(
mockCommitShaResults
);
mockLatestCommitShaQuery
.
mockResolvedValue
(
mockCommitShaResults
);
});
});
...
@@ -379,7 +386,10 @@ describe('Pipeline editor app component', () => {
...
@@ -379,7 +386,10 @@ describe('Pipeline editor app component', () => {
const
originalLocation
=
window
.
location
.
href
;
const
originalLocation
=
window
.
location
.
href
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mockBlobContentData
.
mockResolvedValue
(
mockBlobContentQueryResponse
);
mockCiConfigData
.
mockResolvedValue
(
mockCiConfigQueryResponse
);
mockLatestCommitShaQuery
.
mockResolvedValue
(
mockCommitShaResults
);
mockLatestCommitShaQuery
.
mockResolvedValue
(
mockCommitShaResults
);
mockGetTemplate
.
mockResolvedValue
(
mockCiTemplateQueryResponse
);
setWindowLocation
(
'
?template=Android
'
);
setWindowLocation
(
'
?template=Android
'
);
});
});
...
...
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