# unxusr/elmenus architecture

> Architecture diagram of the GitHub repository unxusr/elmenus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/unxusr/elmenus
- Repository: https://github.com/unxusr/elmenus

## Overview

##### Main Components

a) Test Framework Layer
- Behave Framework (Top-level orchestrator)
- Feature Files Container
- Step Definitions Container
- Environment Configuration

b) Page Object Model Layer
- Base Page Component
- Specific Page Objects
- E2E Objects

c) WebDriver Layer
- Browser Drivers (Chrome/Firefox)
- Selenium WebDriver

d) Reporting Layer
- Allure Reports Generator
- Screenshots Storage
- Logs Management

##### Component Relationships

**[Feature Files] → [Step Definitions] → [Page Objects] → [WebDriver] → [Browser]**
- ↘ [Reports & Logs]

##### Specific Implementation Details

- Feature files location (/features/test_scenarios/)
- Step definitions (/features/steps/)
- Page Objects (/features/pages/)
- Configuration files (behave.ini)
- Report output directory (/reports/)
- Screenshot storage (/failed_scenarios_screenshots/)

##### Important Elements to Highlight

a) Test Structure:
- Three main feature files (e2e_scenario, sign_in, sign_up)
- Their connection to corresponding step definition files

b) Page Object Pattern:
- Demonstrate inheritance from base_page.py
- Relationship between page objects and step definitions

c) Reporting Flow:
- How test execution results flow to the reporting system
- Screenshot capture mechanism for failed tests

**[Test Scenarios] → [Step Definitions] → [Page Objects] → [Base Page]**
- ↓
- [WebDriver Interface]
- ↓
- [Browser Instance]
- ↓
- [Target Website]

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Test_Framework
        BF[Behave Framework]
        subgraph Features
            E2E["E2E Feature"]
            SignIn["Sign In Feature"]
            SignUp["Sign Up Feature"]
        end
        subgraph Steps
            E2ESteps["E2E Steps"]
            SignInSteps["Sign In Steps"]
            SignUpSteps["Sign Up Steps"]
        end
        Config["Environment Config"]
    end

    subgraph POM[Page Object Model]
        BasePage["Base Page"]
        HomePage["Home Page"]
        E2EObjects["E2E Objects"]
    end

    subgraph WebDriver
        Selenium["Selenium WebDriver"]
        Browsers["Browser Drivers"]
    end

    subgraph Reporting
        Allure["Allure Reports"]
        Screenshots["Screenshots Storage"]
        Logs["System Logs"]
        WDLogs["WebDriver Logs"]
    end

    %% Relationships
    Features --> Steps
    Steps --> POM
    POM --> Selenium
    Selenium --> Browsers
    Steps --> Reporting
    POM --> Reporting

    %% Component Mappings
    click E2E "https://github.com/unxusr/elmenus/blob/main/features/test_scenarios/e2e_scenario.feature"
    click SignIn "https://github.com/unxusr/elmenus/blob/main/features/test_scenarios/sign_in.feature"
    click SignUp "https://github.com/unxusr/elmenus/blob/main/features/test_scenarios/sign_up.feature"
    click E2ESteps "https://github.com/unxusr/elmenus/blob/main/features/steps/e2e_scenario.py"
    click SignInSteps "https://github.com/unxusr/elmenus/blob/main/features/steps/sign_in.py"
    click SignUpSteps "https://github.com/unxusr/elmenus/blob/main/features/steps/sign_up.py"
    click BasePage "https://github.com/unxusr/elmenus/blob/main/features/pages/base_page.py"
    click HomePage "https://github.com/unxusr/elmenus/blob/main/features/pages/home_page.py"
    click E2EObjects "https://github.com/unxusr/elmenus/blob/main/features/pages/e2e_objects.py"
    click Config "https://github.com/unxusr/elmenus/blob/main/features/environment.py"
    click Allure "https://github.com/unxusr/elmenus/tree/main/reports/"
    click Screenshots "https://github.com/unxusr/elmenus/tree/main/failed_scenarios_screenshots/"
    click Logs "https://github.com/unxusr/elmenus/blob/main/elmenues-test.log"
    click WDLogs "https://github.com/unxusr/elmenus/blob/main/geckodriver.log"

    %% Styling
    classDef feature fill:#90EE90
    classDef step fill:#ADD8E6
    classDef pom fill:#4169E1
    classDef webdriver fill:#FFD700
    classDef reporting fill:#DDA0DD
    classDef config fill:#808080

    class E2E,SignIn,SignUp feature
    class E2ESteps,SignInSteps,SignUpSteps step
    class BasePage,HomePage,E2EObjects pom
    class Selenium,Browsers webdriver
    class Allure,Screenshots,Logs,WDLogs reporting
    class Config,BF config
```
