fix: show fsd superblock in development (#57472)

This commit is contained in:
Oliver Eyton-Williams
2024-12-10 20:21:26 +01:00
committed by GitHub
parent 15d4ac1894
commit a2b954b21b
4 changed files with 7 additions and 42 deletions
-40
View File
@@ -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: [] } });
@@ -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();
@@ -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]);
}
});
});