Skip to content

Commit

Permalink
fix: show fsd superblock in development (freeCodeCamp#57472)
Browse files Browse the repository at this point in the history
  • Loading branch information
ojeytonwilliams authored Dec 10, 2024
1 parent 15d4ac1 commit a2b954b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 42 deletions.
5 changes: 4 additions & 1 deletion client/config/growthbook-features-default.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,8 @@
"name": "prod-show-benefits"
}
]
},
"fcc-10": {
"defaultValue": true
}
}
}
3 changes: 2 additions & 1 deletion e2e/landing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const superBlocks = [
intro[SuperBlocks.InfoSec].title,
intro[SuperBlocks.MachineLearningPy].title,
intro[SuperBlocks.CollegeAlgebraPy].title,
intro[SuperBlocks.FullStackDeveloper].title,
intro[SuperBlocks.A2English].title,
intro[SuperBlocks.FoundationalCSharp].title,
intro[SuperBlocks.TheOdinProject].title,
Expand Down Expand Up @@ -201,7 +202,7 @@ test.describe('Landing Page', () => {

test('Has links to all curriculum', async ({ page }) => {
const curriculumBtns = page.getByTestId(landingPageElements.curriculumBtns);
await expect(curriculumBtns).toHaveCount(21);
await expect(curriculumBtns).toHaveCount(superBlocks.length);
for (let index = 0; index < superBlocks.length; index++) {
const btn = curriculumBtns.nth(index);
await expect(btn).toContainText(superBlocks[index]);
Expand Down
40 changes: 0 additions & 40 deletions e2e/learn.spec.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
import { test, expect } from '@playwright/test';
import words from '../client/i18n/locales/english/motivation.json';

const superBlocks = [
'Responsive Web Design',
'JavaScript Algorithms and Data Structures (Beta)',
'Front End Development Libraries',
'Data Visualization',
'Relational Database',
'Back End Development and APIs',
'Quality Assurance',
'Scientific Computing with Python (Beta)',
'Data Analysis with Python',
'Information Security',
'Machine Learning with Python',
'College Algebra with Python',
'A2 English for Developers (Beta)',
'Foundational C# with Microsoft',
'The Odin Project - freeCodeCamp Remix (Beta)',
'Coding Interview Prep',
'Project Euler',
'Rosetta Code',
'Legacy Responsive Web Design Challenges',
'JavaScript Algorithms and Data Structures',
'Legacy Python for Everybody'
];

test.describe('Learn - Unauthenticated user', () => {
test.use({ storageState: { cookies: [], origins: [] } });

Expand Down Expand Up @@ -59,14 +35,6 @@ test.describe('Learn - Unauthenticated user', () => {
await expect(paragraph).toBeVisible();
}

// certifications
const curriculumBtns = page.getByTestId('curriculum-map-button');
await expect(curriculumBtns).toHaveCount(superBlocks.length);
for (let i = 0; i < superBlocks.length; i++) {
const btn = curriculumBtns.nth(i);
await expect(btn).toContainText(superBlocks[i]);
}

await expect(
page.getByRole('link', { name: 'Sign in to save your progress' })
).toBeVisible();
Expand Down Expand Up @@ -101,13 +69,5 @@ test.describe('Learn - Authenticated user)', () => {

expect(allMotivationalQuotes).toContain(shownQuote);
expect(allAuthors).toContain(shownAuthor);

// certifications
const curriculumBtns = page.getByTestId('curriculum-map-button');
await expect(curriculumBtns).toHaveCount(superBlocks.length);
for (let i = 0; i < superBlocks.length; i++) {
const btn = curriculumBtns.nth(i);
await expect(btn).toContainText(superBlocks[i]);
}
});
});
1 change: 1 addition & 0 deletions e2e/map.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test.beforeEach(async ({ page }) => {

const superBlocksWithLinks = [
...superBlockStages[SuperBlockStage.Core],
...superBlockStages[SuperBlockStage.Next],
...superBlockStages[SuperBlockStage.English],
...superBlockStages[SuperBlockStage.Professional],
...superBlockStages[SuperBlockStage.Extra],
Expand Down

0 comments on commit a2b954b

Please sign in to comment.