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>2020-01-16 21:08:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 21:08:46 +0300
commitaa0f0e992153e84e1cdec8a1c7310d5eb93a9f8f (patch)
tree4a662bc77fb43e1d1deec78cc7a95d911c0da1c5 /spec/frontend/vue_mr_widget
parentd47f9d2304dbc3a23bba7fe7a5cd07218eeb41cd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_mr_widget')
-rw-r--r--spec/frontend/vue_mr_widget/deployment/deployment_spec.js2
-rw-r--r--spec/frontend/vue_mr_widget/deployment/deployment_view_button_spec.js34
2 files changed, 12 insertions, 24 deletions
diff --git a/spec/frontend/vue_mr_widget/deployment/deployment_spec.js b/spec/frontend/vue_mr_widget/deployment/deployment_spec.js
index 78e086e473d..2902c8280dd 100644
--- a/spec/frontend/vue_mr_widget/deployment/deployment_spec.js
+++ b/spec/frontend/vue_mr_widget/deployment/deployment_spec.js
@@ -134,7 +134,7 @@ describe('Deployment component', () => {
if (status === SUCCESS) {
expect(wrapper.find(DeploymentViewButton).text()).toContain('View app');
} else {
- expect(wrapper.find(DeploymentViewButton).text()).toContain('View previous app');
+ expect(wrapper.find(DeploymentViewButton).text()).toContain('View latest app');
}
});
}
diff --git a/spec/frontend/vue_mr_widget/deployment/deployment_view_button_spec.js b/spec/frontend/vue_mr_widget/deployment/deployment_view_button_spec.js
index b48c97341b2..5e0f38459b0 100644
--- a/spec/frontend/vue_mr_widget/deployment/deployment_view_button_spec.js
+++ b/spec/frontend/vue_mr_widget/deployment/deployment_view_button_spec.js
@@ -3,6 +3,11 @@ import DeploymentViewButton from '~/vue_merge_request_widget/components/deployme
import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue';
import deploymentMockData from './deployment_mock_data';
+const appButtonText = {
+ text: 'View app',
+ tooltip: 'View the latest successful deployment to this environment',
+};
+
describe('Deployment View App button', () => {
let wrapper;
@@ -16,7 +21,7 @@ describe('Deployment View App button', () => {
factory({
propsData: {
deployment: deploymentMockData,
- isCurrent: true,
+ appButtonText,
},
});
});
@@ -26,25 +31,8 @@ describe('Deployment View App button', () => {
});
describe('text', () => {
- describe('when app is current', () => {
- it('shows View app', () => {
- expect(wrapper.find(ReviewAppLink).text()).toContain('View app');
- });
- });
-
- describe('when app is not current', () => {
- beforeEach(() => {
- factory({
- propsData: {
- deployment: deploymentMockData,
- isCurrent: false,
- },
- });
- });
-
- it('shows View Previous app', () => {
- expect(wrapper.find(ReviewAppLink).text()).toContain('View previous app');
- });
+ it('renders text as passed', () => {
+ expect(wrapper.find(ReviewAppLink).text()).toContain(appButtonText.text);
});
});
@@ -53,7 +41,7 @@ describe('Deployment View App button', () => {
factory({
propsData: {
deployment: { ...deploymentMockData, changes: null },
- isCurrent: false,
+ appButtonText,
},
});
});
@@ -68,7 +56,7 @@ describe('Deployment View App button', () => {
factory({
propsData: {
deployment: { ...deploymentMockData, changes: [deploymentMockData.changes[0]] },
- isCurrent: false,
+ appButtonText,
},
});
});
@@ -91,7 +79,7 @@ describe('Deployment View App button', () => {
factory({
propsData: {
deployment: deploymentMockData,
- isCurrent: false,
+ appButtonText,
},
});
});