Skip to content
Snippets Groups Projects
Verified Commit 691413e9 authored by Samantha Ming's avatar Samantha Ming Committed by GitLab
Browse files

Merge branch 'dpisek/group-deps-filtering-fix-empty-dropdown' into 'master'

Group Deps: Fix empty license filter dropdown

See merge request !143799



Merged-by: default avatarSamantha Ming <sming@gitlab.com>
Approved-by: default avatarSamantha Ming <sming@gitlab.com>
Approved-by: Lorenz van Herwaarden's avatarLorenz van Herwaarden <lvanherwaarden@gitlab.com>
Reviewed-by: default avatarDavid Pisek <dpisek@gitlab.com>
Co-authored-by: default avatarDave Pisek <dpisek@gitlab.com>
parents 3b98fd03 0c879bb0
No related branches found
No related tags found
2 merge requests!144312Change service start (cut-off) date for code suggestions to March 15th,!143799Group Deps: Fix empty license filter dropdown
Pipeline #1166825588 passed
Pipeline: E2E Omnibus GitLab EE

#1166915145

    Pipeline: E2E GDK

    #1166827959

      Pipeline: [gitlab-database-load_balancing gem] Ruby 3.0 pipeline

      #1166826141

        +26
        ......@@ -108,7 +108,7 @@ export default {
        </template>
        <template #suggestions>
        <gl-loading-icon v-if="fetchingLicensesInProgress" size="sm" />
        <div v-else>
        <div v-else-if="filteredLicenses.length">
        <dynamic-scroller
        :items="filteredLicenses"
        :min-item-size="32"
        ......
        ......@@ -99,22 +99,21 @@ describe('ee/dependencies/components/filtered_search/tokens/license_token.vue',
        );
        });
        it('correctly sets up a dynamic-scroller to enhance the render-performance of the licenses list', () => {
        createComponent();
        expect(findDynamicScroller().attributes()).toMatchObject({
        'key-field': 'id',
        'min-item-size': '32',
        style: 'max-height: 170px;',
        });
        });
        it('shows the full list of licenses once the fetch is completed', () => {
        store.state.allDependencies.licenses = TEST_LICENSES;
        createComponent();
        it.each([
        { licenses: TEST_LICENSES, expectDynamicScroller: true },
        {
        licenses: [],
        expectDynamicScroller: false,
        },
        ])(
        'with $licenses.length licenses it contains a dynamic-scroller is "$expectDynamicScroller"',
        ({ licenses, expectDynamicScroller }) => {
        store.state.allDependencies.licenses = licenses;
        createComponent();
        expect(findDynamicScroller().props('items')).toEqual(TEST_LICENSES);
        });
        expect(findDynamicScroller().exists()).toBe(expectDynamicScroller);
        },
        );
        it.each([
        { active: true, expectedValue: null },
        ......@@ -142,6 +141,18 @@ describe('ee/dependencies/components/filtered_search/tokens/license_token.vue',
        createComponent();
        });
        it('correctly sets up a dynamic-scroller to enhance the render-performance of the licenses list', () => {
        expect(findDynamicScroller().attributes()).toMatchObject({
        'key-field': 'id',
        'min-item-size': '32',
        style: 'max-height: 170px;',
        });
        });
        it('shows the full list of licenses once the fetch is completed', () => {
        expect(findDynamicScroller().props('items')).toEqual(TEST_LICENSES);
        });
        describe('when a user enters a search term', () => {
        it('shows the filtered list of suggestions', async () => {
        await searchForLicense(TEST_LICENSES[0].name);
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment