import {test, expect} from '../../fixtures/test' // Canvas module overview pages set context for a week's worth of learning. // They contain learning objectives, activity lists with estimated times, // required materials, and navigation links to module items. These realistic // module overview patterns verify structured instructional content is preserved. test.describe('Canvas module overview page content patterns', () => { test.beforeEach(async ({page, rcePage}) => { await page.goto('/scenarios/basic') await rcePage.waitForEditor() }) async function setAndGet(page: any, html: string): Promise { return page.evaluate((content: string) => { // @ts-expect-error -- TinyMCE global window.tinymce.activeEditor.setContent(content) // @ts-expect-error -- TinyMCE global return window.tinymce.activeEditor.getContent() }, html) } test('module intro with learning objectives — all objectives preserved', async ({page}) => { const content = await setAndGet( page, `

Module 4: Market Structures and Competition

This module examines how market structure affects firm behavior and economic outcomes.

Learning Objectives

By the end of this module, you will be able to:

`, ) expect(content).toContain('Market Structures and Competition') expect(content).toContain('monopolistic competition') expect(content).toContain('marginal analysis') expect(content).toContain('game theory concepts') }) test('activity checklist with time estimates — all items preserved', async ({page}) => { const content = await setAndGet( page, `

Module Activities

  1. Read: Textbook Chapter 12 (pp. 287-318) — approx. 45 minutes
  2. Watch: Lecture video "Perfect Competition" (Module 4a) — 23 minutes
  3. Watch: Lecture video "Monopoly and Market Power" (Module 4b) — 31 minutes
  4. Complete: Practice problems 4.1-4.5 (ungraded self-check)
  5. Submit: Problem Set 4 by Sunday 11:59 PM — est. 90 minutes
  6. Participate: Discussion: Oligopoly in the Real World (due Thursday)
`, ) expect(content).toContain('Textbook Chapter 12') expect(content).toContain('Perfect Competition') expect(content).toContain('Problem Set 4') expect(content).toContain('Oligopoly in the Real World') }) test('required materials list with links — all entries preserved', async ({page}) => { const content = await setAndGet( page, `

Required Materials for This Module

`, ) expect(content).toContain('Microeconomics') expect(content).toContain('Theory of Oligopoly') expect(content).toContain('Game theory primer') }) test('module with embedded video intro and text — all preserved', async ({page}) => { const content = await setAndGet( page, `

Welcome to Module 7. Before diving in, watch this short orientation video:

This module covers the final three statistical tests you will need for your capstone project: ANOVA, chi-square, and correlation analysis. Each has a dedicated lecture, worked examples, and practice data sets.

`, ) expect(content).toContain('Welcome to Module 7') expect(content).toContain('ANOVA, chi-square') expect(content).toContain('capstone project') }) })