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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-10 21:09:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-10 21:09:14 +0300
commitd18b7dc5eea84db5008986c6879a24ad7f6462a6 (patch)
tree98d6e8635ac32f210f15fcfb3dc583a6295e0b9a /spec/frontend/security_configuration
parent6ebe886c82111e1ab9e71d4c02a888d2312898bc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/security_configuration')
-rw-r--r--spec/frontend/security_configuration/components/training_provider_list_spec.js7
-rw-r--r--spec/frontend/security_configuration/mock_data.js12
2 files changed, 12 insertions, 7 deletions
diff --git a/spec/frontend/security_configuration/components/training_provider_list_spec.js b/spec/frontend/security_configuration/components/training_provider_list_spec.js
index 08ba4bcbf69..5e2efa2425c 100644
--- a/spec/frontend/security_configuration/components/training_provider_list_spec.js
+++ b/spec/frontend/security_configuration/components/training_provider_list_spec.js
@@ -26,6 +26,7 @@ import {
updateSecurityTrainingProvidersErrorResponse,
testProjectPath,
testProviderIds,
+ testProviderName,
tempProviderLogos,
} from '../mock_data';
@@ -207,9 +208,13 @@ describe('TrainingProviderList component', () => {
expect(findLogos().at(provider).attributes('width')).toBe('18');
});
+ it.each(providerIndexArray)('has a11y decorative attribute for provider %s', (provider) => {
+ expect(findLogos().at(provider).attributes('role')).toBe('presentation');
+ });
+
it.each(providerIndexArray)('displays the correct svg path for provider %s', (provider) => {
expect(findLogos().at(provider).attributes('src')).toBe(
- tempProviderLogos[testProviderIds[provider]].svg,
+ tempProviderLogos[testProviderName[provider]].svg,
);
});
});
diff --git a/spec/frontend/security_configuration/mock_data.js b/spec/frontend/security_configuration/mock_data.js
index 588fac11987..3bad687740c 100644
--- a/spec/frontend/security_configuration/mock_data.js
+++ b/spec/frontend/security_configuration/mock_data.js
@@ -1,11 +1,11 @@
export const testProjectPath = 'foo/bar';
-
export const testProviderIds = [101, 102, 103];
+export const testProviderName = ['Vendor Name 1', 'Vendor Name 2', 'Vendor Name 3'];
const createSecurityTrainingProviders = ({ providerOverrides = {} }) => [
{
id: testProviderIds[0],
- name: 'Vendor Name 1',
+ name: testProviderName[0],
description: 'Interactive developer security education',
url: 'https://www.example.org/security/training',
isEnabled: false,
@@ -14,7 +14,7 @@ const createSecurityTrainingProviders = ({ providerOverrides = {} }) => [
},
{
id: testProviderIds[1],
- name: 'Vendor Name 2',
+ name: testProviderName[1],
description: 'Security training with guide and learning pathways.',
url: 'https://www.vendornametwo.com/',
isEnabled: false,
@@ -23,7 +23,7 @@ const createSecurityTrainingProviders = ({ providerOverrides = {} }) => [
},
{
id: testProviderIds[2],
- name: 'Vendor Name 3',
+ name: testProviderName[2],
description: 'Security training for the everyday developer.',
url: 'https://www.vendornamethree.com/',
isEnabled: false,
@@ -99,10 +99,10 @@ export const updateSecurityTrainingProvidersErrorResponse = {
// Will remove once this issue is resolved where the svg path will be available in the GraphQL query
// https://gitlab.com/gitlab-org/gitlab/-/issues/346899
export const tempProviderLogos = {
- [testProviderIds[0]]: {
+ [testProviderName[0]]: {
svg: '/assets/illustrations/vulnerability/vendor-1.svg',
},
- [testProviderIds[1]]: {
+ [testProviderName[1]]: {
svg: '/assets/illustrations/vulnerability/vendor-2.svg',
},
};