diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-05 18:12:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-05 18:12:53 +0300 |
commit | a84626f13d61d190b2db5e44caf71b22fc541276 (patch) | |
tree | 5cf591ce134ac0ad5b8c101e3518b2e49101b6ad /spec/frontend/error_tracking | |
parent | c9b0dfef1ba43a9e04264023b08c589bcb9eb397 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/error_tracking')
-rw-r--r-- | spec/frontend/error_tracking/components/error_details_spec.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/spec/frontend/error_tracking/components/error_details_spec.js b/spec/frontend/error_tracking/components/error_details_spec.js index babbc0c8a4d..4e459d800e8 100644 --- a/spec/frontend/error_tracking/components/error_details_spec.js +++ b/spec/frontend/error_tracking/components/error_details_spec.js @@ -503,6 +503,53 @@ describe('ErrorDetails', () => { }); }); }); + + describe('Release links', () => { + const firstReleaseVersion = '7975be01'; + const firstCommitLink = '/gitlab/-/commit/7975be01'; + const firstReleaseLink = '/sentry/releases/7975be01'; + const findFirstCommitLink = () => wrapper.find(`[href$="${firstCommitLink}"]`); + const findFirstReleaseLink = () => wrapper.find(`[href$="${firstReleaseLink}"]`); + + const lastReleaseVersion = '6ca5a5c1'; + const lastCommitLink = '/gitlab/-/commit/6ca5a5c1'; + const lastReleaseLink = '/sentry/releases/6ca5a5c1'; + const findLastCommitLink = () => wrapper.find(`[href$="${lastCommitLink}"]`); + const findLastReleaseLink = () => wrapper.find(`[href$="${lastReleaseLink}"]`); + + it('should display links to Sentry', async () => { + mocks.$apollo.queries.error.loading = false; + await wrapper.setData({ + error: { + firstReleaseVersion, + lastReleaseVersion, + externalBaseUrl: '/sentry', + }, + }); + + expect(findFirstReleaseLink().exists()).toBe(true); + expect(findLastReleaseLink().exists()).toBe(true); + expect(findFirstCommitLink().exists()).toBe(false); + expect(findLastCommitLink().exists()).toBe(false); + }); + + it('should display links to GitLab when integrated', async () => { + mocks.$apollo.queries.error.loading = false; + await wrapper.setData({ + error: { + firstReleaseVersion, + lastReleaseVersion, + integrated: true, + externalBaseUrl: '/gitlab', + }, + }); + + expect(findFirstCommitLink().exists()).toBe(true); + expect(findLastCommitLink().exists()).toBe(true); + expect(findFirstReleaseLink().exists()).toBe(false); + expect(findLastReleaseLink().exists()).toBe(false); + }); + }); }); describe('Snowplow tracking', () => { |