mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-22 14:01:29 -05:00
fix(curriculum): missing b1 cert from settings page (#64938)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
@@ -127,6 +127,7 @@ describe('certificate routes', () => {
|
||||
isCertMap: {
|
||||
is2018DataVisCert: false,
|
||||
isA2EnglishCert: false,
|
||||
isB1EnglishCert: false,
|
||||
isApisMicroservicesCert: false,
|
||||
isBackEndCert: false,
|
||||
isCollegeAlgebraPyCertV8: false,
|
||||
@@ -223,6 +224,7 @@ describe('certificate routes', () => {
|
||||
],
|
||||
is2018DataVisCert: true,
|
||||
isA2EnglishCert: true,
|
||||
isB1EnglishCert: true,
|
||||
isApisMicroservicesCert: true,
|
||||
isCollegeAlgebraPyCertV8: true,
|
||||
isDataAnalysisPyCertV7: true,
|
||||
|
||||
@@ -337,6 +337,7 @@ const sessionUserData = {
|
||||
const baseProgressData = {
|
||||
currentChallengeId: '',
|
||||
isA2EnglishCert: false,
|
||||
isB1EnglishCert: false,
|
||||
isRespWebDesignCert: false,
|
||||
is2018DataVisCert: false,
|
||||
isFrontEndLibsCert: false,
|
||||
|
||||
@@ -188,6 +188,7 @@ const publicUserData = {
|
||||
is2018DataVisCert: testUserData.is2018DataVisCert,
|
||||
is2018FullStackCert: testUserData.is2018FullStackCert, // TODO: should this be returned? The client doesn't use it at the moment.
|
||||
isA2EnglishCert: testUserData.isA2EnglishCert,
|
||||
isB1EnglishCert: testUserData.isB1EnglishCert,
|
||||
isApisMicroservicesCert: testUserData.isApisMicroservicesCert,
|
||||
isBackEndCert: testUserData.isBackEndCert,
|
||||
isCheater: testUserData.isCheater,
|
||||
|
||||
@@ -53,6 +53,7 @@ export const getPublicProfile = {
|
||||
is2018DataVisCert: Type.Boolean(),
|
||||
is2018FullStackCert: Type.Boolean(),
|
||||
isA2EnglishCert: Type.Boolean(),
|
||||
isB1EnglishCert: Type.Boolean(),
|
||||
isApisMicroservicesCert: Type.Boolean(),
|
||||
isBackEndCert: Type.Boolean(),
|
||||
isCheater: Type.Boolean(),
|
||||
|
||||
@@ -4,6 +4,7 @@ import { User } from '../../../../redux/prop-types';
|
||||
export const getCertifications = (user: User) => {
|
||||
const {
|
||||
isA2EnglishCert,
|
||||
isB1EnglishCert,
|
||||
isRespWebDesignCert,
|
||||
isRespWebDesignCertV9,
|
||||
is2018DataVisCert,
|
||||
@@ -32,6 +33,7 @@ export const getCertifications = (user: User) => {
|
||||
return {
|
||||
hasModernCert:
|
||||
isA2EnglishCert ||
|
||||
isB1EnglishCert ||
|
||||
isRespWebDesignCertV9 ||
|
||||
isJavascriptCertV9 ||
|
||||
isFoundationalCSharpCertV8 ||
|
||||
@@ -63,6 +65,11 @@ export const getCertifications = (user: User) => {
|
||||
title: 'A2 English for Developers Certification (Beta)',
|
||||
certSlug: Certification.A2English
|
||||
},
|
||||
{
|
||||
show: isB1EnglishCert,
|
||||
title: 'B1 English for Developers Certification (Beta)',
|
||||
certSlug: Certification.B1English
|
||||
},
|
||||
{
|
||||
show: isRespWebDesignCertV9,
|
||||
title: 'Responsive Web Design Certification',
|
||||
|
||||
@@ -55,6 +55,7 @@ const userProps = {
|
||||
isDonating: false,
|
||||
is2018DataVisCert: true,
|
||||
isA2EnglishCert: true,
|
||||
isB1EnglishCert: true,
|
||||
isApisMicroservicesCert: true,
|
||||
isBackEndCert: true,
|
||||
isDataVisCert: true,
|
||||
|
||||
@@ -16,7 +16,7 @@ test.describe('Public profile certifications', () => {
|
||||
|
||||
await expect(
|
||||
page.getByRole('link', { name: /View.+Certification/ })
|
||||
).toHaveCount(24);
|
||||
).toHaveCount(25);
|
||||
});
|
||||
|
||||
test('Should show claimed certifications if the username includes uppercase characters', async ({
|
||||
@@ -48,7 +48,7 @@ test.describe('Public profile certifications', () => {
|
||||
await page.waitForURL('/certifiedboozer');
|
||||
await expect(
|
||||
page.getByRole('link', { name: /View.+Certification/ })
|
||||
).toHaveCount(24);
|
||||
).toHaveCount(25);
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
|
||||
@@ -55,6 +55,7 @@ export function isCertification(x: string): x is Certification {
|
||||
// live and not legacy.
|
||||
export const currentCertifications = [
|
||||
Certification.A2English,
|
||||
Certification.B1English,
|
||||
Certification.FoundationalCSharp,
|
||||
Certification.JsV9,
|
||||
Certification.PythonV9,
|
||||
@@ -96,7 +97,6 @@ export const upcomingCertifications = [
|
||||
Certification.FrontEndDevLibsV9,
|
||||
Certification.BackEndDevApisV9,
|
||||
Certification.FullStackDeveloperV9,
|
||||
Certification.B1English,
|
||||
Certification.A2Spanish,
|
||||
Certification.A2Chinese,
|
||||
Certification.A1Chinese
|
||||
|
||||
@@ -221,6 +221,7 @@ module.exports.fullyCertifiedUser = {
|
||||
currentChallengeId: '',
|
||||
isHonest: true,
|
||||
isA2EnglishCert: true,
|
||||
isB1EnglishCert: true,
|
||||
isFrontEndCert: true,
|
||||
isDataVisCert: true,
|
||||
isBackEndCert: true,
|
||||
|
||||
Reference in New Issue
Block a user