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-12-15 00:09:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-15 00:09:47 +0300
commit3a51d1d11d8282ec011f1a79fa10b1ce370e9933 (patch)
tree2730c6078b7641d9d25eb64df53ac0e44bd1f3c5 /spec/frontend/terraform
parent319ac09313e73485b47b8da7a67fb27e74f05721 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/terraform')
-rw-r--r--spec/frontend/terraform/components/states_table_spec.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/frontend/terraform/components/states_table_spec.js b/spec/frontend/terraform/components/states_table_spec.js
index 3f644bd1d38..f2b7bc00e5b 100644
--- a/spec/frontend/terraform/components/states_table_spec.js
+++ b/spec/frontend/terraform/components/states_table_spec.js
@@ -38,6 +38,19 @@ describe('StatesTable', () => {
createdByUser: {
name: 'user-3',
},
+ job: {
+ detailedStatus: {
+ detailsPath: '/job-path-3',
+ group: 'failed',
+ icon: 'status_failed',
+ label: 'failed',
+ text: 'failed',
+ },
+ pipeline: {
+ id: 'gid://gitlab/Ci::Pipeline/3',
+ path: '/pipeline-path-3',
+ },
+ },
},
},
{
@@ -48,6 +61,19 @@ describe('StatesTable', () => {
latestVersion: {
updatedAt: '2020-10-09T00:00:00Z',
createdByUser: null,
+ job: {
+ detailedStatus: {
+ detailsPath: '/job-path-4',
+ group: 'passed',
+ icon: 'status_success',
+ label: 'passed',
+ text: 'passed',
+ },
+ pipeline: {
+ id: 'gid://gitlab/Ci::Pipeline/4',
+ path: '/pipeline-path-4',
+ },
+ },
},
},
],
@@ -107,6 +133,23 @@ describe('StatesTable', () => {
expect(state.text()).toMatchInterpolatedText(updateTime);
});
+ it.each`
+ pipelineText | toolTipAdded | lineNumber
+ ${''} | ${false} | ${0}
+ ${''} | ${false} | ${1}
+ ${'#3 failed Job status'} | ${true} | ${2}
+ ${'#4 passed Job status'} | ${true} | ${3}
+ `(
+ 'displays the pipeline information for line "$lineNumber"',
+ ({ pipelineText, toolTipAdded, lineNumber }) => {
+ const states = wrapper.findAll('[data-testid="terraform-states-table-pipeline"]');
+ const state = states.at(lineNumber);
+
+ expect(state.find(GlTooltip).exists()).toBe(toolTipAdded);
+ expect(state.text()).toMatchInterpolatedText(pipelineText);
+ },
+ );
+
it('displays no actions dropdown', () => {
expect(findActions().length).toEqual(0);
});