Commit 8c99b06b authored by Nick Kipling's avatar Nick Kipling

Applying maintainer feedback

Removed unused directive
Changed dynamic css class
Modified test to use named arguments
Added case for null in utils_spec
parent 5a04f8f7
<script>
import { mapState, mapGetters } from 'vuex';
import { GlPagination, GlModal, GlTooltipDirective } from '@gitlab/ui';
import { GlPagination, GlModal } from '@gitlab/ui';
import Tracking from '~/tracking';
import { s__, sprintf } from '~/locale';
import { TrackingActions } from '../../shared/constants';
......@@ -15,7 +15,6 @@ export default {
PackagesListLoader,
PackagesListRow,
},
directives: { GlTooltip: GlTooltipDirective },
mixins: [Tracking.mixin()],
data() {
return {
......
......@@ -91,8 +91,8 @@ export default {
</div>
<div
class="table-section section-40 d-flex flex-md-column justify-content-between align-items-md-end"
:class="{ 'section-50': isGroupPage }"
class="table-section d-flex flex-md-column justify-content-between align-items-md-end"
:class="isGroupPage ? 'section-50' : 'section-40'"
>
<publish-method :package-entity="packageEntity" />
......
......@@ -66,7 +66,7 @@ exports[`packages_list_row renders 1`] = `
</div>
<div
class="table-section section-40 d-flex flex-md-column justify-content-between align-items-md-end"
class="table-section d-flex flex-md-column justify-content-between align-items-md-end section-40"
>
<publish-method-stub
packageentity="[object Object]"
......
......@@ -4,7 +4,7 @@ import { packageList } from '../../mock_data';
describe('Getters registry list store', () => {
let state;
const setState = (isGroupPage = false) => {
const setState = ({ isGroupPage = false } = {}) => {
state = {
packages: packageList,
config: {
......@@ -42,7 +42,7 @@ describe('Getters registry list store', () => {
});
describe('when isGroupPage is true', () => {
beforeEach(() => setState(true));
beforeEach(() => setState({ isGroupPage: true }));
it('returns an absolute link matching project path', () => {
const mavenPackage = packageList[0];
......
......@@ -31,6 +31,7 @@ describe('Packages shared utils', () => {
${'maven'} | ${'Maven'}
${'npm'} | ${'NPM'}
${'nuget'} | ${'NuGet'}
${'foo'} | ${null}
`(`package type`, ({ packageType, expectedResult }) => {
it(`${packageType} should show as ${expectedResult}`, () => {
expect(getPackageType(packageType)).toBe(expectedResult);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment