Repository: freeCodeCamp/freeCodeCamp
File: e2e/super-block-page.spec.ts (TypeScript)

Code before:
          name: 'Getting Started with freeCodeCamp'
        })
      ).toHaveAttribute('aria-expanded', 'true');

      // First block
      await expect(
        page.getByRole('button', {
          name: 'Lecture Welcome to freeCodeCamp'
        })
      ).toHaveAttribute('aria-expanded', 'true');

      await page.goto('/learn/full-stack-developer/workshop-blog-page/step-2');

      const editor = getEditors(page);
      await focusEditor({ page, isMobile });
      await clearEditor({ page, browserName });
      await editor.fill('<head></head>');
      await page.getByRole('button', { name: /check your code/i }).click();
      await page.getByRole('button', { name: /submit and go/i }).click();

      // The submit button navigates user to the next challenge.
      // Allow that navigation to complete before going back to the super block page.
      await page.waitForURL(
        '/learn/full-stack-developer/workshop-blog-page/step-3'
      );

      // Go back to the super block page
      await page.goto('/learn/full-stack-developer');

      // The entire first chapter is collapsed
      await expect(
        page.getByRole('button', {
          name: 'Welcome',
          exact: true
        })
      ).toHaveAttribute('aria-expanded', 'false');

      // HTML chapter
      await expect(
        page.getByRole('button', {
          name: 'HTML',
          exact: true
        })
      ).toHaveAttribute('aria-expanded', 'true');

      // Semantic HTML module
      await expect(
        page.getByRole('button', {
          name: 'Semantic HTML',
          exact: true
        })

Review comment (suggestion):
```suggestion
```
Same again; we don't need to complete a challenge, just visit it.

Code after:
          name: 'Welcome',
          exact: true
        })
      ).toHaveAttribute('aria-expanded', 'false');

      // HTML chapter
      await expect(
        page.getByRole('button', {
          name: 'HTML',
          exact: true
        })
      ).toHaveAttribute('aria-expanded', 'true');

      // Semantic HTML module
      await expect(
        page.getByRole('button', {
          name: 'Semantic HTML',
          exact: true
        })
      ).toHaveAttribute('aria-expanded', 'true');

      // Cat Blog Page block
      await expect(
        page.getByRole('button', {
          name: 'Workshop Build a Cat Blog Page'
        })
      ).toHaveAttribute('aria-expanded', 'true');
    });
  });
});

test.describe('Super Block Page - Unauthenticated User', () => {
  test.use({ storageState: { cookies: [], origins: [] } });

  test.describe('Super Block in List View', () => {
    test('should expand the first block of the super block', async ({
      page
    }) => {
      await page.goto('/learn/javascript-algorithms-and-data-structures-v8/');

      await expect(
        page.getByRole('button', {
          name: 'Learn Introductory JavaScript by Building a Pyramid Generator'
        })
      ).toHaveAttribute('aria-expanded', 'true');

      await page.goto('/learn/a2-english-for-developers/');

      await expect(
        page.getByRole('button', {
          name: 'Learn Greetings in your First Day at the Office'