# rahimilahi/tfl architecture

> Architecture diagram of the GitHub repository rahimilahi/tfl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rahimilahi/tfl
- Repository: https://github.com/rahimilahi/tfl

## Overview

This repository is a SpecFlow/Selenium acceptance-test suite for TfL’s journey planner. Feature scenarios describe user journeys; SpecFlow binds their steps to page-specific step definitions, which drive TfL pages through Selenium page objects and assert displayed results or validation messages. Scenario hooks create and quit Chrome, sharing its WebDriver through DriverHelper. The README also identifies reusable feature parameters. The feature source and some runtime wiring were not excerpted, so those links are shown only where documented or left out when unverified.

Main entry points: [`StepDefinitions/HomePageSteps.cs`](https://github.com/rahimilahi/tfl/blob/master/StepDefinitions/HomePageSteps.cs) (Home steps), [`Features/JourneyPlanner.feature`](https://github.com/rahimilahi/tfl/blob/master/Features/JourneyPlanner.feature) (Journey scenarios), [`StepDefinitions/ResultsPageSteps.cs`](https://github.com/rahimilahi/tfl/blob/master/StepDefinitions/ResultsPageSteps.cs) (Results steps), [`DriverHelper.cs`](https://github.com/rahimilahi/tfl/blob/master/DriverHelper.cs) (Driver helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenarios["Journey scenarios"]
  node_feature["Journey scenarios"]
end

subgraph group_automation["Browser automation"]
  node_home_steps["Home steps<br/>[HomePageSteps.cs]"]
  node_results_steps["Results steps"]
  node_home_page["Home page object<br/>[HomePage.cs]"]
  node_results_page["Results page object<br/>[ResultsPage.cs]"]
  node_driver["Driver helper<br/>[DriverHelper.cs]"]
  node_hooks["Scenario hooks<br/>[Hooks1.cs]"]
end

subgraph group_tfl["TfL website"]
  node_chrome["Chrome browser"]
  node_website["TfL journey planner"]
end

node_user(("Test runner"))

node_user -.->|"runs scenarios"| node_feature
node_feature -.->|"dispatches steps"| node_home_steps
node_feature -.->|"dispatches steps"| node_results_steps
node_hooks -->|"sets driver"| node_driver
node_hooks -->|"creates and quits"| node_chrome
node_home_steps -->|"uses driver"| node_driver
node_home_steps -->|"calls page methods"| node_home_page
node_results_steps -->|"uses driver"| node_driver
node_results_steps -->|"calls page methods"| node_results_page
node_home_page -.->|"locates and acts"| node_website
node_results_page -.->|"locates and reads"| node_website
node_home_steps -->|"navigates to"| node_website

click node_feature "https://github.com/rahimilahi/tfl/blob/master/Features/JourneyPlanner.feature"
click node_home_steps "https://github.com/rahimilahi/tfl/blob/master/StepDefinitions/HomePageSteps.cs"
click node_results_steps "https://github.com/rahimilahi/tfl/blob/master/StepDefinitions/ResultsPageSteps.cs"
click node_home_page "https://github.com/rahimilahi/tfl/blob/master/Pages/HomePage.cs"
click node_results_page "https://github.com/rahimilahi/tfl/blob/master/Pages/ResultsPage.cs"
click node_driver "https://github.com/rahimilahi/tfl/blob/master/DriverHelper.cs"
click node_hooks "https://github.com/rahimilahi/tfl/blob/master/Hooks/Hooks1.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_feature toneBlue
class node_home_steps,node_results_steps,node_home_page,node_results_page,node_driver,node_hooks toneAmber
class node_chrome,node_website toneMint
class node_user toneIndigo
```

## Components

### Journey scenarios

- [Journey scenarios](https://github.com/rahimilahi/tfl/blob/master/Features/JourneyPlanner.feature): `Features/JourneyPlanner.feature`

### Browser automation

- [Home steps](https://github.com/rahimilahi/tfl/blob/master/StepDefinitions/HomePageSteps.cs): `StepDefinitions/HomePageSteps.cs`
- [Results steps](https://github.com/rahimilahi/tfl/blob/master/StepDefinitions/ResultsPageSteps.cs): `StepDefinitions/ResultsPageSteps.cs`
- [Home page object](https://github.com/rahimilahi/tfl/blob/master/Pages/HomePage.cs): `Pages/HomePage.cs`
- [Results page object](https://github.com/rahimilahi/tfl/blob/master/Pages/ResultsPage.cs): `Pages/ResultsPage.cs`
- [Driver helper](https://github.com/rahimilahi/tfl/blob/master/DriverHelper.cs): `DriverHelper.cs`
- [Scenario hooks](https://github.com/rahimilahi/tfl/blob/master/Hooks/Hooks1.cs): `Hooks/Hooks1.cs`

### TfL website

- **Chrome browser**
- **TfL journey planner**

### Other components

- **Test runner**

## Connections

- Test runner → Journey scenarios: runs scenarios
- Journey scenarios → Home steps: dispatches steps
- Journey scenarios → Results steps: dispatches steps
- Scenario hooks → Driver helper: sets driver (evidence: `Hooks/Hooks1.cs`)
- Scenario hooks → Chrome browser: creates and quits (evidence: `Hooks/Hooks1.cs`)
- Home steps → Driver helper: uses driver (evidence: `StepDefinitions/HomePageSteps.cs`)
- Home steps → Home page object: calls page methods (evidence: `StepDefinitions/HomePageSteps.cs`)
- Results steps → Driver helper: uses driver (evidence: `StepDefinitions/ResultsPageSteps.cs`)
- Results steps → Results page object: calls page methods (evidence: `StepDefinitions/ResultsPageSteps.cs`)
- Home page object → TfL journey planner: locates and acts
- Results page object → TfL journey planner: locates and reads
- Home steps → TfL journey planner: navigates to (evidence: `StepDefinitions/HomePageSteps.cs`)
