Skip to content
Snippets Groups Projects
Commit 1e1bbabd authored by David Pisek's avatar David Pisek :three:
Browse files

Merge branch '355940-sec-training-url-loading' into 'master'

Display completed training urls

See merge request !122366



Merged-by: default avatarDavid Pisek <dpisek@gitlab.com>
Approved-by: default avatarDavid Pisek <dpisek@gitlab.com>
Approved-by: Lorenz van Herwaarden's avatarLorenz van Herwaarden <lvanherwaarden@gitlab.com>
Co-authored-by: default avatarSamantha Ming <sming@gitlab.com>
parents 292582e4 ad59dd1b
No related branches found
No related tags found
1 merge request!122366Display completed training urls
Pipeline #889442329 passed
Pipeline: E2E GDK

#889461748

    Pipeline: E2E Omnibus GitLab EE

    #889449902

      Pipeline: GitLab

      #889449889

        ......@@ -25,6 +25,7 @@ export const TRAINING_URL_POLLING_INTERVAL = 5000;
        export default {
        i18n,
        TEMP_PROVIDER_LOGOS,
        SECURITY_TRAINING_URL_STATUS_COMPLETED,
        components: {
        GlLink,
        GlIcon,
        ......@@ -172,12 +173,12 @@ export default {
        <div v-else-if="isUrlsLoading">
        <gl-skeleton-loader :width="200" :lines="3" />
        </div>
        <div v-else>
        <div
        v-for="({ name, url, identifier }, index) in securityTrainingUrls"
        :key="index"
        class="gl-mt-6"
        >
        <div
        v-for="({ name, url, identifier, status }, index) in securityTrainingUrls"
        :key="index"
        class="gl-mt-6"
        >
        <div v-if="status === $options.SECURITY_TRAINING_URL_STATUS_COMPLETED">
        <div>
        <span v-if="$options.TEMP_PROVIDER_LOGOS[name]" class="gl-mr-1 gl-display-inline-flex">
        <div
        ......
        ......@@ -277,6 +277,23 @@ describe('VulnerabilityTraining component', () => {
        expect(findTrainingItemLinks().exists()).toBe(false);
        expect(findTrainingItemLinkIcons().exists()).toBe(false);
        });
        it('does not display the training item if the status is not completed', async () => {
        createApolloProvider({
        projectQueryHandler: jest.fn().mockResolvedValue(
        getSecurityTrainingProjectData({
        urlOverrides: {
        first: {
        status: SECURITY_TRAINING_URL_STATUS_PENDING,
        },
        },
        }).response,
        ),
        });
        createComponent();
        await waitForQueryToBeLoaded();
        expect(findTrainingItemLinks()).toHaveLength(testTrainingUrls.length - 1);
        });
        });
        describe('security training query', () => {
        ......
        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