diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 03:08:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 03:08:30 +0300 |
commit | 8c80b21468c5c969644c9ea83fec7b43dba1eb3c (patch) | |
tree | efdc69f22231ae472f0264dee21001e595c4f86d /spec/frontend/environments | |
parent | a407a618ae21dce15c85ae15c465a531811a69b9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/environments')
3 files changed, 21 insertions, 4 deletions
diff --git a/spec/frontend/environments/environment_details/components/deployment_actions_spec.js b/spec/frontend/environments/environment_details/components/deployment_actions_spec.js index 4aac25bc8b3..a0eb4c494e6 100644 --- a/spec/frontend/environments/environment_details/components/deployment_actions_spec.js +++ b/spec/frontend/environments/environment_details/components/deployment_actions_spec.js @@ -3,10 +3,10 @@ import VueApollo from 'vue-apollo'; import { GlButton } from '@gitlab/ui'; import DeploymentActions from '~/environments/environment_details/components/deployment_actions.vue'; import { mountExtended } from 'helpers/vue_test_utils_helper'; +import createMockApollo from 'helpers/mock_apollo_helper'; +import waitForPromises from 'helpers/wait_for_promises'; import { translations } from '~/environments/environment_details/constants'; import ActionsComponent from '~/environments/components/environment_actions.vue'; -import createMockApollo from '../../../__helpers__/mock_apollo_helper'; -import waitForPromises from '../../../__helpers__/wait_for_promises'; describe('~/environments/environment_details/components/deployment_actions.vue', () => { Vue.use(VueApollo); @@ -39,13 +39,17 @@ describe('~/environments/environment_details/components/deployment_actions.vue', setEnvironmentToRollback: mockSetEnvironmentToRollback, }, }; - const createWrapper = ({ actions, rollback }) => { + const createWrapper = ({ actions, rollback, approvalEnvironment }) => { const mockApollo = createMockApollo([], mockResolvers); return mountExtended(DeploymentActions, { apolloProvider: mockApollo, + provide: { + projectPath: 'fullProjectPath', + }, propsData: { actions, rollback, + approvalEnvironment, }, }); }; diff --git a/spec/frontend/environments/environment_details/page_spec.js b/spec/frontend/environments/environment_details/page_spec.js index d94faf4addb..ed7e0feb6ed 100644 --- a/spec/frontend/environments/environment_details/page_spec.js +++ b/spec/frontend/environments/environment_details/page_spec.js @@ -40,11 +40,15 @@ describe('~/environments/environment_details/page.vue', () => { environmentToRollbackMock.mockReturnValue( environmentToRollbackData || emptyEnvironmentToRollbackData, ); + const projectFullPath = 'gitlab-group/test-project'; return mountExtended(EnvironmentsDetailPage, { apolloProvider: mockApollo, + provide: { + projectPath: projectFullPath, + }, propsData: { - projectFullPath: 'gitlab-group/test-project', + projectFullPath, environmentName: 'test-environment-name', }, }); diff --git a/spec/frontend/environments/helpers/__snapshots__/deployment_data_transformation_helper_spec.js.snap b/spec/frontend/environments/helpers/__snapshots__/deployment_data_transformation_helper_spec.js.snap index 0462b614ee2..ec0fe0c5541 100644 --- a/spec/frontend/environments/helpers/__snapshots__/deployment_data_transformation_helper_spec.js.snap +++ b/spec/frontend/environments/helpers/__snapshots__/deployment_data_transformation_helper_spec.js.snap @@ -26,6 +26,9 @@ Object { }, "created": "2022-10-17T07:44:17Z", "deployed": "2022-10-17T07:44:43Z", + "deploymentApproval": Object { + "isApprovalActionAvailable": false, + }, "id": "31", "job": Object { "label": "deploy-prod (#860)", @@ -83,6 +86,9 @@ Object { }, "created": "2022-10-17T07:44:17Z", "deployed": "2022-10-17T07:44:43Z", + "deploymentApproval": Object { + "isApprovalActionAvailable": false, + }, "id": "31", "job": undefined, "rollback": null, @@ -115,6 +121,9 @@ Object { }, "created": "2022-10-17T07:44:17Z", "deployed": "", + "deploymentApproval": Object { + "isApprovalActionAvailable": false, + }, "id": "31", "job": null, "rollback": null, |