Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-22 00:09:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-22 00:09:40 +0300
commitdb115d5ac71e57b2dad327004de7660e353dcd1c (patch)
tree440519fe8dd6439577258fa671274d6b9a0d7813 /spec/frontend/pipelines/graph
parentaed8f5ecc5f9a09e3af9c32f7b02743d317a4116 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines/graph')
-rw-r--r--spec/frontend/pipelines/graph/graph_component_wrapper_spec.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js
index d785818166d..28f43476dc8 100644
--- a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js
+++ b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js
@@ -354,6 +354,36 @@ describe('Pipeline graph wrapper', () => {
});
});
+ describe('when feature flag is on and local storage is set, but the graph does not use needs', () => {
+ beforeEach(async () => {
+ const nonNeedsResponse = { ...mockPipelineResponse };
+ nonNeedsResponse.data.project.pipeline.usesNeeds = false;
+
+ localStorage.setItem(VIEW_TYPE_KEY, LAYER_VIEW);
+
+ createComponentWithApollo({
+ provide: {
+ glFeatures: {
+ pipelineGraphLayersView: true,
+ },
+ },
+ mountFn: mount,
+ getPipelineDetailsHandler: jest.fn().mockResolvedValue(nonNeedsResponse),
+ });
+
+ jest.runOnlyPendingTimers();
+ await wrapper.vm.$nextTick();
+ });
+
+ afterEach(() => {
+ localStorage.clear();
+ });
+
+ it('still passes stage type to graph', () => {
+ expect(getGraph().props('viewType')).toBe(STAGE_VIEW);
+ });
+ });
+
describe('when feature flag is on but pipeline does not use needs', () => {
beforeEach(async () => {
const nonNeedsResponse = { ...mockPipelineResponse };