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:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/error_tracking
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/error_tracking')
-rw-r--r--spec/frontend/error_tracking/components/error_details_spec.js6
-rw-r--r--spec/frontend/error_tracking/components/error_tracking_actions_spec.js24
-rw-r--r--spec/frontend/error_tracking/components/error_tracking_list_spec.js20
-rw-r--r--spec/frontend/error_tracking/store/actions_spec.js4
-rw-r--r--spec/frontend/error_tracking/store/details/actions_spec.js6
-rw-r--r--spec/frontend/error_tracking/store/list/actions_spec.js19
6 files changed, 30 insertions, 49 deletions
diff --git a/spec/frontend/error_tracking/components/error_details_spec.js b/spec/frontend/error_tracking/components/error_details_spec.js
index ef3eeb8c7e4..0b9e0008ed7 100644
--- a/spec/frontend/error_tracking/components/error_details_spec.js
+++ b/spec/frontend/error_tracking/components/error_details_spec.js
@@ -38,8 +38,8 @@ describe('ErrorDetails', () => {
let mocks;
const externalUrl = 'https://sentry.io/organizations/test-sentry-nk/issues/1/?project=1';
- const findInput = name => {
- const inputs = wrapper.findAll(GlFormInput).filter(c => c.attributes('name') === name);
+ const findInput = (name) => {
+ const inputs = wrapper.findAll(GlFormInput).filter((c) => c.attributes('name') === name);
return inputs.length ? inputs.at(0) : inputs;
};
@@ -245,7 +245,7 @@ describe('ErrorDetails', () => {
it.each(Object.keys(severityLevel))(
'should set correct severity level variant for %s badge',
- level => {
+ (level) => {
wrapper.setData({
error: {
tags: { level: severityLevel[level] },
diff --git a/spec/frontend/error_tracking/components/error_tracking_actions_spec.js b/spec/frontend/error_tracking/components/error_tracking_actions_spec.js
index b22805f5227..05b3d2f1dec 100644
--- a/spec/frontend/error_tracking/components/error_tracking_actions_spec.js
+++ b/spec/frontend/error_tracking/components/error_tracking_actions_spec.js
@@ -41,16 +41,8 @@ describe('Error Tracking Actions', () => {
expect(findButtons().exists()).toBe(true);
return wrapper.vm.$nextTick().then(() => {
- expect(
- findButtons()
- .at(0)
- .attributes('title'),
- ).toBe('Ignore');
- expect(
- findButtons()
- .at(1)
- .attributes('title'),
- ).toBe('Resolve');
+ expect(findButtons().at(0).attributes('title')).toBe('Ignore');
+ expect(findButtons().at(1).attributes('title')).toBe('Resolve');
});
});
});
@@ -64,11 +56,7 @@ describe('Error Tracking Actions', () => {
expect(findButtons().exists()).toBe(true);
return wrapper.vm.$nextTick().then(() => {
- expect(
- findButtons()
- .at(0)
- .attributes('title'),
- ).toBe('Undo Ignore');
+ expect(findButtons().at(0).attributes('title')).toBe('Undo Ignore');
});
});
});
@@ -82,11 +70,7 @@ describe('Error Tracking Actions', () => {
expect(findButtons().exists()).toBe(true);
return wrapper.vm.$nextTick().then(() => {
- expect(
- findButtons()
- .at(1)
- .attributes('title'),
- ).toBe('Unresolve');
+ expect(findButtons().at(1).attributes('title')).toBe('Unresolve');
});
});
});
diff --git a/spec/frontend/error_tracking/components/error_tracking_list_spec.js b/spec/frontend/error_tracking/components/error_tracking_list_spec.js
index a77bf39cb54..da12237b1d9 100644
--- a/spec/frontend/error_tracking/components/error_tracking_list_spec.js
+++ b/spec/frontend/error_tracking/components/error_tracking_list_spec.js
@@ -19,18 +19,9 @@ describe('ErrorTrackingList', () => {
const findErrorListTable = () => wrapper.find('table');
const findErrorListRows = () => wrapper.findAll('tbody tr');
const dropdownsArray = () => wrapper.findAll(GlDropdown);
- const findRecentSearchesDropdown = () =>
- dropdownsArray()
- .at(0)
- .find(GlDropdown);
- const findStatusFilterDropdown = () =>
- dropdownsArray()
- .at(1)
- .find(GlDropdown);
- const findSortDropdown = () =>
- dropdownsArray()
- .at(2)
- .find(GlDropdown);
+ const findRecentSearchesDropdown = () => dropdownsArray().at(0).find(GlDropdown);
+ const findStatusFilterDropdown = () => dropdownsArray().at(1).find(GlDropdown);
+ const findSortDropdown = () => dropdownsArray().at(2).find(GlDropdown);
const findLoadingIcon = () => wrapper.find(GlLoadingIcon);
const findPagination = () => wrapper.find(GlPagination);
const findErrorActions = () => wrapper.find(ErrorTrackingActions);
@@ -156,7 +147,7 @@ describe('ErrorTrackingList', () => {
});
it('each error in the list should have an action button set', () => {
- findErrorListRows().wrappers.forEach(row => {
+ findErrorListRows().wrappers.forEach((row) => {
expect(row.find(ErrorTrackingActions).exists()).toBe(true);
});
});
@@ -243,7 +234,6 @@ describe('ErrorTrackingList', () => {
stubs: {
GlTable: false,
GlLink: false,
- GlDeprecatedButton: false,
},
});
});
@@ -274,7 +264,6 @@ describe('ErrorTrackingList', () => {
stubs: {
GlTable: false,
GlLink: false,
- GlDeprecatedButton: false,
},
});
});
@@ -454,7 +443,6 @@ describe('ErrorTrackingList', () => {
stubs: {
GlTable: false,
GlLink: false,
- GlDeprecatedButton: false,
},
});
});
diff --git a/spec/frontend/error_tracking/store/actions_spec.js b/spec/frontend/error_tracking/store/actions_spec.js
index 43037473a61..34ad600af05 100644
--- a/spec/frontend/error_tracking/store/actions_spec.js
+++ b/spec/frontend/error_tracking/store/actions_spec.js
@@ -28,7 +28,7 @@ describe('Sentry common store actions', () => {
const params = { endpoint, redirectUrl, status };
describe('updateStatus', () => {
- it('should handle successful status update', done => {
+ it('should handle successful status update', (done) => {
mock.onPut().reply(200, {});
testAction(
actions.updateStatus,
@@ -48,7 +48,7 @@ describe('Sentry common store actions', () => {
);
});
- it('should handle unsuccessful status update', done => {
+ it('should handle unsuccessful status update', (done) => {
mock.onPut().reply(400, {});
testAction(actions.updateStatus, params, {}, [], [], () => {
expect(visitUrl).not.toHaveBeenCalled();
diff --git a/spec/frontend/error_tracking/store/details/actions_spec.js b/spec/frontend/error_tracking/store/details/actions_spec.js
index 58e77c46e02..152ecde6985 100644
--- a/spec/frontend/error_tracking/store/details/actions_spec.js
+++ b/spec/frontend/error_tracking/store/details/actions_spec.js
@@ -28,7 +28,7 @@ describe('Sentry error details store actions', () => {
describe('startPollingStacktrace', () => {
const endpoint = '123/stacktrace';
- it('should commit SET_ERROR with received response', done => {
+ it('should commit SET_ERROR with received response', (done) => {
const payload = { error: [1, 2, 3] };
mockedAdapter.onGet().reply(200, payload);
testAction(
@@ -46,7 +46,7 @@ describe('Sentry error details store actions', () => {
);
});
- it('should show flash on API error', done => {
+ it('should show flash on API error', (done) => {
mockedAdapter.onGet().reply(400);
testAction(
@@ -62,7 +62,7 @@ describe('Sentry error details store actions', () => {
);
});
- it('should not restart polling when receiving an empty 204 response', done => {
+ it('should not restart polling when receiving an empty 204 response', (done) => {
mockedRestart = jest.spyOn(Poll.prototype, 'restart');
mockedAdapter.onGet().reply(204);
diff --git a/spec/frontend/error_tracking/store/list/actions_spec.js b/spec/frontend/error_tracking/store/list/actions_spec.js
index 7326472e1dd..a93608fe70d 100644
--- a/spec/frontend/error_tracking/store/list/actions_spec.js
+++ b/spec/frontend/error_tracking/store/list/actions_spec.js
@@ -20,7 +20,7 @@ describe('error tracking actions', () => {
});
describe('startPolling', () => {
- it('should start polling for data', done => {
+ it('should start polling for data', (done) => {
const payload = { errors: [{ id: 1 }, { id: 2 }] };
mock.onGet().reply(httpStatusCodes.OK, payload);
@@ -41,14 +41,17 @@ describe('error tracking actions', () => {
);
});
- it('should show flash on API error', done => {
+ it('should show flash on API error', (done) => {
mock.onGet().reply(httpStatusCodes.BAD_REQUEST);
testAction(
actions.startPolling,
{},
{},
- [{ type: types.SET_LOADING, payload: true }, { type: types.SET_LOADING, payload: false }],
+ [
+ { type: types.SET_LOADING, payload: true },
+ { type: types.SET_LOADING, payload: false },
+ ],
[],
() => {
expect(createFlash).toHaveBeenCalledTimes(1);
@@ -64,7 +67,10 @@ describe('error tracking actions', () => {
actions.restartPolling,
{},
{},
- [{ type: types.SET_ERRORS, payload: [] }, { type: types.SET_LOADING, payload: true }],
+ [
+ { type: types.SET_ERRORS, payload: [] },
+ { type: types.SET_LOADING, payload: true },
+ ],
[],
);
});
@@ -110,7 +116,10 @@ describe('error tracking actions', () => {
actions.sortByField,
field,
{},
- [{ type: types.SET_CURSOR, payload: null }, { type: types.SET_SORT_FIELD, payload: field }],
+ [
+ { type: types.SET_CURSOR, payload: null },
+ { type: types.SET_SORT_FIELD, payload: field },
+ ],
[{ type: 'stopPolling' }, { type: 'startPolling' }],
);
});