- The identifier for a product variant. This is used to link a course run to a product variant for external LOBs (i.e; ExecEd & Bootcamps).
+ The identifier for a product variant. This is used to link a course run to a product variant for external LOBs (e.g; ExecEd).
}
@@ -771,7 +771,7 @@ exports[`Collapsible Course Run renders correctly restriction type field for ext
helpText={
- The identifier for a product variant. This is used to link a course run to a product variant for external LOBs (i.e; ExecEd & Bootcamps).
+ The identifier for a product variant. This is used to link a course run to a product variant for external LOBs (e.g; ExecEd).
}
@@ -1439,7 +1439,7 @@ exports[`Collapsible Course Run renders correctly variant_id field for external
helpText={
- The identifier for a product variant. This is used to link a course run to a product variant for external LOBs (i.e; ExecEd & Bootcamps).
+ The identifier for a product variant. This is used to link a course run to a product variant for external LOBs (e.g; ExecEd).
The identifier for a product variant. This is used to link a course run to a product variant for external LOBs
- (i.e; ExecEd & Bootcamps).
+ (e.g; ExecEd).
);
diff --git a/src/setupTest.js b/src/setupTest.js
index 700cf3398..78cbf9059 100644
--- a/src/setupTest.js
+++ b/src/setupTest.js
@@ -17,10 +17,6 @@ process.env.COURSE_URL_SLUGS_PATTERN = `{
"default": {
"slug_format": "^learn/[a-z0-9_]+(?:-?[a-z0-9_]+)*/[a-z0-9_]+(?:-?[a-z0-9_]+)*$|^[a-z0-9_]+(?:-[a-z0-9_]+)*$",
"error_msg": "Course URL slug contains lowercase letters, numbers, underscores, and dashes only and must be in the format or learn//-."
- },
- "bootcamp-2u": {
- "slug_format": "^boot-camps/[a-z0-9_]+(?:-?[a-z0-9_]+)*/[a-z0-9_]+(?:-?[a-z0-9_]+)*$|^[a-z0-9_]+(?:-[a-z0-9_]+)*$",
- "error_msg": "Course URL slug contains lowercase letters, numbers, underscores, and dashes only and must be in the format or boot-camps//-."
}
},
"external-source": {
@@ -31,10 +27,6 @@ process.env.COURSE_URL_SLUGS_PATTERN = `{
"executive-education-2u": {
"slug_format": "^executive-education/[a-z0-9_]+(?:-?[a-z0-9_]+)*$|^[a-z0-9_]+(?:-[a-z0-9_]+)*$",
"error_msg": "Course URL slug contains lowercase letters, numbers, underscores, and dashes only and must be in the format or executive-education/-."
- },
- "bootcamp-2u": {
- "slug_format": "^boot-camps/[a-z0-9_]+(?:-?[a-z0-9_]+)*/[a-z0-9_]+(?:-?[a-z0-9_]+)*$|^[a-z0-9_]+(?:-[a-z0-9_]+)*$",
- "error_msg": "Course URL slug contains lowercase letters, numbers, underscores, and dashes only and must be in the format or boot-camps//-."
}
}
}`;
diff --git a/src/utils/index.js b/src/utils/index.js
index 862207c71..cbddc78e9 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -5,7 +5,7 @@ import qs from 'query-string';
import {
COURSE_EXEMPT_FIELDS, COURSE_RUN_NON_EXEMPT_FIELDS, COURSE_URL_SLUG_PATTERN_OLD,
- MASTERS_TRACK, COURSE_URL_SLUG_VALIDATION_MESSAGE, EXECUTIVE_EDUCATION_SLUG, BOOTCAMP_SLUG,
+ MASTERS_TRACK, COURSE_URL_SLUG_VALIDATION_MESSAGE, EXECUTIVE_EDUCATION_SLUG,
RESTRICTION_TYPE_OPTIONS as restrictionTypeOptions,
} from '../data/constants';
import DiscoveryDataApiService from '../data/services/DiscoveryDataApiService';
@@ -220,7 +220,7 @@ const isPristine = (initialValues, currentFormValues, runKey) => {
};
const isExternalCourse = (productSource, courseType) => (
- productSource !== DEFAULT_PRODUCT_SOURCE && [EXECUTIVE_EDUCATION_SLUG, BOOTCAMP_SLUG].includes(courseType)
+ productSource !== DEFAULT_PRODUCT_SOURCE && [EXECUTIVE_EDUCATION_SLUG].includes(courseType)
);
const parseOptions = inChoices => inChoices.map(choice => ({ label: choice.display_name, value: choice.value }));
diff --git a/src/utils/utils.test.js b/src/utils/utils.test.js
index 3a1ddf3ac..c7c59d63b 100644
--- a/src/utils/utils.test.js
+++ b/src/utils/utils.test.js
@@ -1,5 +1,5 @@
import * as utils from '.';
-import { BOOTCAMP_SLUG, COURSE_URL_SLUG_PATTERN_OLD, EXECUTIVE_EDUCATION_SLUG } from '../data/constants';
+import { COURSE_URL_SLUG_PATTERN_OLD, EXECUTIVE_EDUCATION_SLUG } from '../data/constants';
import { DEFAULT_PRODUCT_SOURCE } from '../data/constants/productSourceOptions';
const initialRuns = [
@@ -129,38 +129,15 @@ describe('getCourseUrlSlugPattern', () => {
});
},
);
-
- it(
- 'returns the old course url slug pattern when courseType is bootcamp and updatedSlugFlag is false',
- () => {
- expect(
- utils.getCourseUrlSlugPattern(false, 'external-source', BOOTCAMP_SLUG),
- ).toEqual({
- slug_format: COURSE_URL_SLUG_PATTERN_OLD,
- error_msg: 'Course URL slug contains lowercase letters, numbers, underscores, and dashes only.',
- });
- },
- );
-
- it(
- 'returns the bootcamp subdirectory slug pattern when courseType is bootcamp and updatedSlugFlag is true',
- () => {
- expect(
- utils.getCourseUrlSlugPattern(true, 'external-source', BOOTCAMP_SLUG),
- ).toEqual(JSON.parse(COURSE_URL_SLUGS_PATTERN)['external-source'][BOOTCAMP_SLUG]);
- },
- );
});
describe('isExternalCourse', () => {
- const EXTERNAL_COURSE_TYPES = [EXECUTIVE_EDUCATION_SLUG, BOOTCAMP_SLUG];
+ const EXTERNAL_COURSE_TYPES = [EXECUTIVE_EDUCATION_SLUG];
it('returns true if the product source is other than edx and course type is in EXTERNAL_COURSE_TYPES', () => {
expect(utils.isExternalCourse('external-source', EXTERNAL_COURSE_TYPES[0])).toBe(true);
- expect(utils.isExternalCourse('external-source', EXTERNAL_COURSE_TYPES[1])).toBe(true);
});
it('returns false if the product source has a default value', () => {
expect(utils.isExternalCourse(DEFAULT_PRODUCT_SOURCE, EXTERNAL_COURSE_TYPES[0])).toBe(false);
- expect(utils.isExternalCourse(DEFAULT_PRODUCT_SOURCE, EXTERNAL_COURSE_TYPES[1])).toBe(false);
});
it(
'returns false if the product source does not have a default value and course type is not in EXTERNAL_COURSE_TYPES',