Skip to content

Holding Detail Page E2E Validation

Ticket #239: E2E Validation – Holding Detail Page and Refactoring of Page Objects and Locators
Type: Automation / E2E / Quality
Affected Component: e2e/src/pages/PortefeuillePage.ts, e2e/src/pages/TitreDetailPage.ts, e2e/src/tests/titreDetail.spec.ts, e2e/src/pages/locators/, docs/tests/, docs/fr/tests/


1. Context and Objective

A dedicated E2E validation was added for the holding detail page, to ensure via testing the compliance of the following user journey: login, access to the "My Portfolio Holdings" page, selection of a holding, then validation of all key elements on the detail page (name/symbol, performance, chart, technical data, history).

At the same time, a complete refactoring of Playwright locator management was carried out. The goal was to centralize all selectors in dedicated files, harmonize their naming, and ensure that each Page Object only consumes these centralized locators. This was part of a drive for robustness and maintainability of E2E tests.


2. Initial Issues Identified

  • No dedicated E2E test for the "holding list -> detail" journey.
  • Risk of regression on the format of displayed data (presentation, currency, structure).
  • Scattered selectors, mixing logic/locators in Page Objects.

3. Validated Plan

  • Creation of two new Page Objects: PortefeuillePage.ts (list) and TitreDetailPage.ts (detail).
  • Centralization and harmonization of all locators in dedicated files, imported into each Page Object.
  • Drafting of a single test file titreDetail.spec.ts: navigation, validation of each business block, format checks (flexible regex, French labels, USD/CAD currency).
  • Systematic use of pre-authenticated session to guarantee stability.

4. Solutions Implemented

  • Creation and documentation of PortefeuillePage.ts: navigation, list check, click on the first holding.
  • Creation and documentation of TitreDetailPage.ts: validation methods for each block (name/symbol, variation, chart, technical data, history).
  • Extraction and harmonization of all locators in dedicated files, imported into each Page Object.
  • Creation of titreDetail.spec.ts: 7 independent tests, each validating a specific business aspect of the journey.

5. Validation and Results

  • All tests pass on Chromium, each business block is validated.
  • The key user journey is now covered by a robust, readable, and maintainable E2E test.
  • Centralizing locators simplifies maintenance and speeds up audits.