Skip to content

[Remove legacy waffle flags] Remove Legacy UI Waffle Flag Test Mocks — Phase 3 (test cleanup) #526

Description

@farhan

Part of #521 — Remove Legacy Studio UI Waffle Flags
Frontend ticket: openedx/frontend-app-authoring#3063

Depends on: #525 (Phase 2 flag definitions must be removed first)

/cc @openedx/axim-aximprovements

Scope

Remove test infrastructure that mocked the now-deleted routing flags across ~15–20 test files.

Tasks

15. Test files (~15–20 files)

  • Remove `mockWaffleFlags({ useNewUnitPage: false })` style overrides
  • Remove `getApiWaffleFlagsUrl` mock setups where the endpoint is being dropped
  • Delete test cases that exercise legacy routing branches (dead code)

Key files to update:

  • `src/data/apiHooks.test.tsx`
  • `src/CourseAuthoringPage.test.tsx`
  • `src/header/hooks.test.tsx`
  • `src/course-unit/CourseUnit.test.tsx`
  • `src/course-unit/breadcrumbs/Breadcrumbs.test.tsx`
  • `src/course-checklist/ChecklistSection/ChecklistSection.test.jsx`
  • `src/editors/containers/VideoEditor/components/VideoSettingsModal/index.test.tsx`
  • ~8–10 more files referencing removed flag names

Acceptance Criteria

  • No test mocks remain setting the 12 removed flag names
  • No test cases exercise legacy routing branches
  • `make validate.ci` passes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions