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-03-12 21:09:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-12 21:09:23 +0300
commitee4105895ebffdc6185d20f4592031723a76fedc (patch)
tree2c723287e54f4131ccb95ad0e8b1e0609311621b /spec/frontend/pipelines/time_ago_spec.js
parent006000e366ad5dc61966770d33e3afd4c07e728d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines/time_ago_spec.js')
-rw-r--r--spec/frontend/pipelines/time_ago_spec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/pipelines/time_ago_spec.js b/spec/frontend/pipelines/time_ago_spec.js
index 4919efbb4c6..93aeb049434 100644
--- a/spec/frontend/pipelines/time_ago_spec.js
+++ b/spec/frontend/pipelines/time_ago_spec.js
@@ -29,6 +29,7 @@ describe('Timeago component', () => {
const duration = () => wrapper.find('.duration');
const finishedAt = () => wrapper.find('.finished-at');
+ const findInProgress = () => wrapper.find('[data-testid="pipeline-in-progress"]');
describe('with duration', () => {
beforeEach(() => {
@@ -77,4 +78,21 @@ describe('Timeago component', () => {
expect(finishedAt().exists()).toBe(false);
});
});
+
+ describe('in progress', () => {
+ it.each`
+ durationTime | finishedAtTime | shouldShow
+ ${10} | ${'2017-04-26T12:40:23.277Z'} | ${false}
+ ${10} | ${''} | ${false}
+ ${0} | ${'2017-04-26T12:40:23.277Z'} | ${false}
+ ${0} | ${''} | ${true}
+ `(
+ 'progress state shown: $shouldShow when pipeline duration is $durationTime and finished_at is $finishedAtTime',
+ ({ durationTime, finishedAtTime, shouldShow }) => {
+ createComponent({ duration: durationTime, finished_at: finishedAtTime });
+
+ expect(findInProgress().exists()).toBe(shouldShow);
+ },
+ );
+ });
});