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>2019-11-22 15:06:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 15:06:25 +0300
commit4db9eeb44af5644eb1d080b4ccf4aff8b90656b9 (patch)
tree4ca630fe181e6c66134579694fc97a60430ff7e9 /spec/frontend/error_tracking
parent8a3fdede9607c806d88856d46d4f5394b630a006 (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.js27
1 files changed, 24 insertions, 3 deletions
diff --git a/spec/frontend/error_tracking/components/error_details_spec.js b/spec/frontend/error_tracking/components/error_details_spec.js
index ddc17dea291..cf91c840cc4 100644
--- a/spec/frontend/error_tracking/components/error_details_spec.js
+++ b/spec/frontend/error_tracking/components/error_details_spec.js
@@ -83,13 +83,34 @@ describe('ErrorDetails', () => {
expect(wrapper.find(Stacktrace).exists()).toBe(false);
});
- it('should allow a blank issue to be created', () => {
+ it('should allow an issue to be created with title and description', () => {
store.state.details.loading = false;
- store.state.details.error.id = 1;
+ store.state.details.error = {
+ id: 1,
+ title: 'Issue title',
+ external_url: 'http://sentry.gitlab.net/gitlab',
+ first_seen: '2017-05-26T13:32:48Z',
+ last_seen: '2018-05-26T13:32:48Z',
+ count: 12,
+ user_count: 2,
+ };
mountComponent();
const button = wrapper.find(GlButton);
+ const title = 'Issue title';
+ const url = 'Sentry event: http://sentry.gitlab.net/gitlab';
+ const firstSeen = 'First seen: 2017-05-26T13:32:48Z';
+ const lastSeen = 'Last seen: 2018-05-26T13:32:48Z';
+ const count = 'Events: 12';
+ const userCount = 'Users: 2';
+
+ const issueDescription = `${url}${firstSeen}${lastSeen}${count}${userCount}`;
+
+ const issueLink = `/test-project/issues/new?issue[title]=${encodeURIComponent(
+ title,
+ )}&issue[description]=${encodeURIComponent(issueDescription)}`;
+
expect(button.exists()).toBe(true);
- expect(button.attributes().href).toBe(wrapper.props().issueProjectPath);
+ expect(button.attributes().href).toBe(issueLink);
});
describe('Stacktrace', () => {