diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-27 15:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-27 15:09:14 +0300 |
commit | 95ff19a65c5236863e4c7c7e198bfc1e2fa70f07 (patch) | |
tree | e543a0b23941611b93a7d435b7644eafcdd8cbeb /spec/frontend/pipelines/pipeline_url_spec.js | |
parent | 2df573afed782aebce8c020d92b42e9da7d2868e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines/pipeline_url_spec.js')
-rw-r--r-- | spec/frontend/pipelines/pipeline_url_spec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/pipelines/pipeline_url_spec.js b/spec/frontend/pipelines/pipeline_url_spec.js index 0bcc3f96f7c..fc45af2c254 100644 --- a/spec/frontend/pipelines/pipeline_url_spec.js +++ b/spec/frontend/pipelines/pipeline_url_spec.js @@ -16,6 +16,7 @@ describe('Pipeline Url Component', () => { const findAutoDevopsTag = () => wrapper.find('[data-testid="pipeline-url-autodevops"]'); const findStuckTag = () => wrapper.find('[data-testid="pipeline-url-stuck"]'); const findDetachedTag = () => wrapper.find('[data-testid="pipeline-url-detached"]'); + const findForkTag = () => wrapper.find('[data-testid="pipeline-url-fork"]'); const defaultProps = { pipeline: { @@ -30,6 +31,9 @@ describe('Pipeline Url Component', () => { const createComponent = props => { wrapper = shallowMount(PipelineUrlComponent, { propsData: { ...defaultProps, ...props }, + provide: { + targetProjectFullPath: 'test/test', + }, }); }; @@ -137,4 +141,15 @@ describe('Pipeline Url Component', () => { expect(findScheduledTag().exists()).toBe(true); expect(findScheduledTag().text()).toContain('Scheduled'); }); + it('should render the fork badge when the pipeline was run in a fork', () => { + createComponent({ + pipeline: { + flags: {}, + project: { fullPath: 'test/forked' }, + }, + }); + + expect(findForkTag().exists()).toBe(true); + expect(findForkTag().text()).toBe('fork'); + }); }); |