05-Specifications / 05.10.WUI-Fix-Duplicate-Tests.spec

05.10.WUI Fix Duplicate Tests.spec

05.10. WUI Fix Duplicate Tests.spec

Overview

Analysis of the bnc-cpt-wui (The Bot) Puppeteer test suite reveals significant duplication of browser setup logic and redundant testing of UI components across different functional specifications.

Pinpointed Duplications

1. Landing Page Redundancy

2. Language Switcher Redundancy

3. Step Navigation Overlap

4. Boilerplate Setup Duplication

Proposed Action Plan

  1. Refactor test.utils.js: Centralize all navigation helpers (e.g., utils.selectBrand('tesla'), utils.completePackageStep('pro', 'stripe')).
  2. Surgical Cleanup: Remove redundant tests from test-101 and test-105.
  3. Merge Tesla Flows: Consolidate test-303.tesla-full-blind-flow.spec.js and test-304.tesla-semi-auto-flow.spec.js into a single parameterized test file to minimize duplication of common steps.
  4. Screenshot Management: Standardize screenshot names on failure to prevent naming collisions and duplicate captures.