summaryrefslogtreecommitdiff
path: root/spec/frontend/packages/list
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/packages/list')
-rw-r--r--spec/frontend/packages/list/components/__snapshots__/packages_list_app_spec.js.snap16
-rw-r--r--spec/frontend/packages/list/components/packages_sort_spec.js2
-rw-r--r--spec/frontend/packages/list/stores/actions_spec.js34
3 files changed, 29 insertions, 23 deletions
diff --git a/spec/frontend/packages/list/components/__snapshots__/packages_list_app_spec.js.snap b/spec/frontend/packages/list/components/__snapshots__/packages_list_app_spec.js.snap
index c51130dae00..b2df1ac5ab6 100644
--- a/spec/frontend/packages/list/components/__snapshots__/packages_list_app_spec.js.snap
+++ b/spec/frontend/packages/list/components/__snapshots__/packages_list_app_spec.js.snap
@@ -34,7 +34,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
@@ -95,7 +95,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no Composer packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
@@ -156,7 +156,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no Conan packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
@@ -217,7 +217,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no Generic packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
@@ -278,7 +278,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no Maven packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
@@ -339,7 +339,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no NPM packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
@@ -400,7 +400,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no NuGet packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
@@ -461,7 +461,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
- alt="There are no PyPI packages yet"
+ alt=""
class="gl-max-w-full"
src="helpSvg"
/>
diff --git a/spec/frontend/packages/list/components/packages_sort_spec.js b/spec/frontend/packages/list/components/packages_sort_spec.js
index 5c4794d8f63..d15ad9bd542 100644
--- a/spec/frontend/packages/list/components/packages_sort_spec.js
+++ b/spec/frontend/packages/list/components/packages_sort_spec.js
@@ -16,7 +16,7 @@ describe('packages_sort', () => {
const findPackageListSorting = () => wrapper.find(GlSorting);
const findSortingItems = () => wrapper.findAll(GlSortingItem);
- const createStore = isGroupPage => {
+ const createStore = (isGroupPage) => {
const state = {
config: {
isGroupPage,
diff --git a/spec/frontend/packages/list/stores/actions_spec.js b/spec/frontend/packages/list/stores/actions_spec.js
index cf205ecbac4..05e1fe57cae 100644
--- a/spec/frontend/packages/list/stores/actions_spec.js
+++ b/spec/frontend/packages/list/stores/actions_spec.js
@@ -30,7 +30,7 @@ describe('Actions Package list store', () => {
sort: 'asc',
orderBy: 'version',
};
- it('should fetch the project packages list when isGroupPage is false', done => {
+ it('should fetch the project packages list when isGroupPage is false', (done) => {
testAction(
actions.requestPackagesList,
undefined,
@@ -50,7 +50,7 @@ describe('Actions Package list store', () => {
);
});
- it('should fetch the group packages list when isGroupPage is true', done => {
+ it('should fetch the group packages list when isGroupPage is true', (done) => {
testAction(
actions.requestPackagesList,
undefined,
@@ -70,7 +70,7 @@ describe('Actions Package list store', () => {
);
});
- it('should fetch packages of a certain type when selectedType is present', done => {
+ it('should fetch packages of a certain type when selectedType is present', (done) => {
const packageType = 'maven';
testAction(
@@ -102,14 +102,17 @@ describe('Actions Package list store', () => {
);
});
- it('should create flash on API error', done => {
+ it('should create flash on API error', (done) => {
Api.projectPackages = jest.fn().mockRejectedValue();
testAction(
actions.requestPackagesList,
undefined,
{ config: { isGroupPage: false, resourceId: 2 }, sorting },
[],
- [{ type: 'setLoading', payload: true }, { type: 'setLoading', payload: false }],
+ [
+ { type: 'setLoading', payload: true },
+ { type: 'setLoading', payload: false },
+ ],
() => {
expect(createFlash).toHaveBeenCalled();
done();
@@ -119,7 +122,7 @@ describe('Actions Package list store', () => {
});
describe('receivePackagesListSuccess', () => {
- it('should set received packages', done => {
+ it('should set received packages', (done) => {
const data = 'foo';
testAction(
@@ -137,7 +140,7 @@ describe('Actions Package list store', () => {
});
describe('setInitialState', () => {
- it('should commit setInitialState', done => {
+ it('should commit setInitialState', (done) => {
testAction(
actions.setInitialState,
'1',
@@ -150,7 +153,7 @@ describe('Actions Package list store', () => {
});
describe('setLoading', () => {
- it('should commit set main loading', done => {
+ it('should commit set main loading', (done) => {
testAction(
actions.setLoading,
true,
@@ -168,7 +171,7 @@ describe('Actions Package list store', () => {
delete_api_path: 'foo',
},
};
- it('should perform a delete operation on _links.delete_api_path', done => {
+ it('should perform a delete operation on _links.delete_api_path', (done) => {
mock.onDelete(payload._links.delete_api_path).replyOnce(200);
Api.projectPackages = jest.fn().mockResolvedValue({ data: 'foo' });
@@ -185,14 +188,17 @@ describe('Actions Package list store', () => {
);
});
- it('should stop the loading and call create flash on api error', done => {
+ it('should stop the loading and call create flash on api error', (done) => {
mock.onDelete(payload._links.delete_api_path).replyOnce(400);
testAction(
actions.requestDeletePackage,
payload,
null,
[],
- [{ type: 'setLoading', payload: true }, { type: 'setLoading', payload: false }],
+ [
+ { type: 'setLoading', payload: true },
+ { type: 'setLoading', payload: false },
+ ],
() => {
expect(createFlash).toHaveBeenCalled();
done();
@@ -205,7 +211,7 @@ describe('Actions Package list store', () => {
${'_links'} | ${{}}
${'delete_api_path'} | ${{ _links: {} }}
`('should reject and createFlash when $property is missing', ({ actionPayload }, done) => {
- testAction(actions.requestDeletePackage, actionPayload, null, [], []).catch(e => {
+ testAction(actions.requestDeletePackage, actionPayload, null, [], []).catch((e) => {
expect(e).toEqual(new Error(MISSING_DELETE_PATH_ERROR));
expect(createFlash).toHaveBeenCalledWith(DELETE_PACKAGE_ERROR_MESSAGE);
done();
@@ -214,7 +220,7 @@ describe('Actions Package list store', () => {
});
describe('setSorting', () => {
- it('should commit SET_SORTING', done => {
+ it('should commit SET_SORTING', (done) => {
testAction(
actions.setSorting,
'foo',
@@ -227,7 +233,7 @@ describe('Actions Package list store', () => {
});
describe('setFilter', () => {
- it('should commit SET_FILTER', done => {
+ it('should commit SET_FILTER', (done) => {
testAction(
actions.setFilter,
'foo',