socialseed-e2e 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- socialseed_e2e-0.1.0/CHANGELOG.md +39 -0
- socialseed_e2e-0.1.0/CODE_OF_CONDUCT.md +132 -0
- socialseed_e2e-0.1.0/CONTRIBUTING.md +460 -0
- socialseed_e2e-0.1.0/LICENSE +21 -0
- socialseed_e2e-0.1.0/MANIFEST.in +15 -0
- socialseed_e2e-0.1.0/PKG-INFO +333 -0
- socialseed_e2e-0.1.0/README.md +281 -0
- socialseed_e2e-0.1.0/docs/README.md +27 -0
- socialseed_e2e-0.1.0/docs/api/cli.rst +60 -0
- socialseed_e2e-0.1.0/docs/api/core.rst +55 -0
- socialseed_e2e-0.1.0/docs/api/models.rst +57 -0
- socialseed_e2e-0.1.0/docs/api/utils.rst +36 -0
- socialseed_e2e-0.1.0/docs/api-reference.md +70 -0
- socialseed_e2e-0.1.0/docs/changelog.rst +5 -0
- socialseed_e2e-0.1.0/docs/cli-reference.md +766 -0
- socialseed_e2e-0.1.0/docs/configuration.md +916 -0
- socialseed_e2e-0.1.0/docs/github-pages-setup.md +125 -0
- socialseed_e2e-0.1.0/docs/index.rst +73 -0
- socialseed_e2e-0.1.0/docs/installation.md +819 -0
- socialseed_e2e-0.1.0/docs/license.rst +24 -0
- socialseed_e2e-0.1.0/docs/mock-api.md +504 -0
- socialseed_e2e-0.1.0/docs/quickstart.md +865 -0
- socialseed_e2e-0.1.0/docs/testing-guide.md +298 -0
- socialseed_e2e-0.1.0/docs/writing-tests.md +954 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/README.md +325 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/api.py +247 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/services/items-api/data_schema.py +65 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/services/items-api/items_api_page.py +148 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/services/items-api/modules/01_create_item.py +71 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/services/items-api/modules/02_list_items.py +79 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/services/items-api/modules/03_get_item.py +69 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/services/items-api/modules/04_update_item.py +88 -0
- socialseed_e2e-0.1.0/examples/01-basic-crud/services/items-api/modules/05_delete_item.py +87 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/README.md +292 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/api.py +344 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/services/auth-api/auth_api_page.py +138 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/services/auth-api/data_schema.py +75 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/services/auth-api/modules/01_register_flow.py +119 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/services/auth-api/modules/02_login_flow.py +117 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/services/auth-api/modules/03_refresh_token_flow.py +122 -0
- socialseed_e2e-0.1.0/examples/02-auth-jwt/services/auth-api/modules/04_protected_endpoints.py +125 -0
- socialseed_e2e-0.1.0/examples/03-microservices/README.md +364 -0
- socialseed_e2e-0.1.0/examples/03-microservices/orders-service/orders_api.py +276 -0
- socialseed_e2e-0.1.0/examples/03-microservices/payment-service/payment_api.py +364 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/__init__.py +0 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/orders-api/__init__.py +0 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/orders-api/modules/01_orders_test.py +69 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/orders-api/modules/__init__.py +0 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/orders-api/orders_api_page.py +65 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/payment-api/__init__.py +0 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/payment-api/modules/01_payment_test.py +74 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/payment-api/modules/__init__.py +0 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/payment-api/payment_api_page.py +67 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/users-api/__init__.py +0 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/users-api/modules/01_users_test.py +71 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/users-api/modules/__init__.py +0 -0
- socialseed_e2e-0.1.0/examples/03-microservices/services/users-api/users_api_page.py +61 -0
- socialseed_e2e-0.1.0/examples/03-microservices/users-service/users_api.py +212 -0
- socialseed_e2e-0.1.0/pyproject.toml +141 -0
- socialseed_e2e-0.1.0/setup.cfg +70 -0
- socialseed_e2e-0.1.0/setup.py +18 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/__init__.py +51 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/__version__.py +21 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/cli.py +611 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/__init__.py +35 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/base_page.py +839 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/check_deps.py +43 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/config.py +119 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/config_loader.py +604 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/headers.py +20 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/interfaces.py +22 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/loaders.py +51 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/models.py +24 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/core/test_orchestrator.py +84 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/services/__init__.py +9 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/templates/__init__.py +32 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/templates/config.py.template +20 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/templates/data_schema.py.template +116 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/templates/e2e.conf.template +20 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/templates/service_page.py.template +83 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/templates/test_module.py.template +46 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/utils/__init__.py +44 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/utils/template_engine.py +246 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e/utils/validators.py +588 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e.egg-info/PKG-INFO +333 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e.egg-info/SOURCES.txt +114 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e.egg-info/dependency_links.txt +1 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e.egg-info/entry_points.txt +3 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e.egg-info/requires.txt +25 -0
- socialseed_e2e-0.1.0/src/socialseed_e2e.egg-info/top_level.txt +1 -0
- socialseed_e2e-0.1.0/tests/__init__.py +5 -0
- socialseed_e2e-0.1.0/tests/conftest.py +165 -0
- socialseed_e2e-0.1.0/tests/fixtures/__init__.py +5 -0
- socialseed_e2e-0.1.0/tests/fixtures/mock_api.py +430 -0
- socialseed_e2e-0.1.0/tests/integration/__init__.py +1 -0
- socialseed_e2e-0.1.0/tests/integration/cli/__init__.py +15 -0
- socialseed_e2e-0.1.0/tests/integration/cli/conftest.py +59 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_config.py +72 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_doctor.py +54 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_error_handling.py +69 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_init.py +105 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_new_service.py +110 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_new_test.py +97 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_run.py +70 -0
- socialseed_e2e-0.1.0/tests/integration/cli/test_workflows.py +81 -0
- socialseed_e2e-0.1.0/tests/integration/test_mock_api_integration.py +265 -0
- socialseed_e2e-0.1.0/tests/unit/__init__.py +1 -0
- socialseed_e2e-0.1.0/tests/unit/test_base_page.py +1337 -0
- socialseed_e2e-0.1.0/tests/unit/test_config_loader.py +1216 -0
- socialseed_e2e-0.1.0/tests/unit/test_imports_compatibility.py +394 -0
- socialseed_e2e-0.1.0/tests/unit/test_loaders.py +580 -0
- socialseed_e2e-0.1.0/tests/unit/test_orchestrator.py +616 -0
- socialseed_e2e-0.1.0/tests/unit/test_template_engine.py +311 -0
- socialseed_e2e-0.1.0/tests/unit/test_validators.py +555 -0
- socialseed_e2e-0.1.0/tests/validate_installation.py +151 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Comprehensive CLI reference documentation
|
|
12
|
+
- Sphinx documentation setup with autodoc
|
|
13
|
+
- ReadTheDocs configuration
|
|
14
|
+
|
|
15
|
+
## [0.1.0] - 2026-02-01
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- Initial release of socialseed-e2e
|
|
19
|
+
- Core framework with BasePage, ApiConfigLoader, TestOrchestrator
|
|
20
|
+
- CLI with commands: init, new-service, new-test, run, doctor, config
|
|
21
|
+
- Playwright integration for HTTP testing
|
|
22
|
+
- YAML/JSON configuration support
|
|
23
|
+
- Template system for scaffolding
|
|
24
|
+
- Mock API server for integration testing
|
|
25
|
+
- Rich CLI output with tables and progress bars
|
|
26
|
+
- Pytest integration with markers and coverage
|
|
27
|
+
- GitHub Actions CI/CD workflow
|
|
28
|
+
- Complete documentation suite
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
- Service-agnostic hexagonal architecture
|
|
32
|
+
- Automatic test discovery and execution
|
|
33
|
+
- Stateful test chaining with shared context
|
|
34
|
+
- Rate limiting and retry mechanisms
|
|
35
|
+
- Type-safe Pydantic models
|
|
36
|
+
- Environment variable support in configuration
|
|
37
|
+
|
|
38
|
+
[Unreleased]: https://github.com/daironpf/socialseed-e2e/compare/v0.1.0...HEAD
|
|
39
|
+
[0.1.0]: https://github.com/daironpf/socialseed-e2e/releases/tag/v0.1.0
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
dairon.perezfrias@gmail.com.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
# Contributing to socialseed-e2e
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to socialseed-e2e! It's people like you that make this framework a great tool for the community.
|
|
4
|
+
|
|
5
|
+
This document provides guidelines and instructions for contributing to the project. We welcome contributions from both human developers and AI agents.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Code of Conduct](#code-of-conduct)
|
|
10
|
+
- [How Can I Contribute?](#how-can-i-contribute)
|
|
11
|
+
- [Reporting Bugs](#reporting-bugs)
|
|
12
|
+
- [Suggesting Features](#suggesting-features)
|
|
13
|
+
- [Contributing Code](#contributing-code)
|
|
14
|
+
- [Development Setup](#development-setup)
|
|
15
|
+
- [Code Style Guide](#code-style-guide)
|
|
16
|
+
- [Pull Request Process](#pull-request-process)
|
|
17
|
+
- [Commit Message Conventions](#commit-message-conventions)
|
|
18
|
+
- [AI Contributors](#ai-contributors)
|
|
19
|
+
- [Questions?](#questions)
|
|
20
|
+
|
|
21
|
+
## Code of Conduct
|
|
22
|
+
|
|
23
|
+
This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
|
|
24
|
+
|
|
25
|
+
## How Can I Contribute?
|
|
26
|
+
|
|
27
|
+
### Reporting Bugs
|
|
28
|
+
|
|
29
|
+
Before creating a bug report, please:
|
|
30
|
+
|
|
31
|
+
1. **Check existing issues** to see if the problem has already been reported
|
|
32
|
+
2. **Use the latest version** to verify the bug still exists
|
|
33
|
+
3. **Isolate the problem** to the smallest reproducible example
|
|
34
|
+
|
|
35
|
+
#### How to Submit a Good Bug Report
|
|
36
|
+
|
|
37
|
+
Bugs are tracked as [GitHub issues](https://github.com/daironpf/socialseed-e2e/issues). When creating a bug report, please include:
|
|
38
|
+
|
|
39
|
+
- **Use a clear and descriptive title** (e.g., "BasePage retry fails on 429 status code")
|
|
40
|
+
- **Describe the exact steps to reproduce the problem**
|
|
41
|
+
- **Provide specific examples** demonstrating the steps
|
|
42
|
+
- **Describe the behavior you observed** and what behavior you expected
|
|
43
|
+
- **Include code samples** and/or terminal output
|
|
44
|
+
- **Specify your environment**:
|
|
45
|
+
- Python version: `python --version`
|
|
46
|
+
- socialseed-e2e version: `pip show socialseed-e2e`
|
|
47
|
+
- Operating system and version
|
|
48
|
+
- Playwright version: `pip show playwright`
|
|
49
|
+
|
|
50
|
+
**Bug Report Template:**
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
**Description:**
|
|
54
|
+
A clear description of the bug.
|
|
55
|
+
|
|
56
|
+
**Steps to Reproduce:**
|
|
57
|
+
1. Initialize project with 'e2e init'
|
|
58
|
+
2. Create service with 'e2e new-service test-api'
|
|
59
|
+
3. Run 'e2e run'
|
|
60
|
+
4. See error
|
|
61
|
+
|
|
62
|
+
**Expected Behavior:**
|
|
63
|
+
What you expected to happen.
|
|
64
|
+
|
|
65
|
+
**Actual Behavior:**
|
|
66
|
+
What actually happened, including full error messages.
|
|
67
|
+
|
|
68
|
+
**Environment:**
|
|
69
|
+
- Python: 3.11.4
|
|
70
|
+
- socialseed-e2e: 0.1.0
|
|
71
|
+
- OS: Ubuntu 22.04
|
|
72
|
+
- Playwright: 1.40.0
|
|
73
|
+
|
|
74
|
+
**Additional Context:**
|
|
75
|
+
Add any other context about the problem here.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Suggesting Features
|
|
79
|
+
|
|
80
|
+
Feature requests are welcome! When suggesting a feature:
|
|
81
|
+
|
|
82
|
+
1. **Check existing issues** to see if the feature has already been suggested
|
|
83
|
+
2. **Provide a clear use case** - explain why this feature would be useful
|
|
84
|
+
3. **Describe the solution** you'd like to see
|
|
85
|
+
4. **Consider alternatives** you've thought of
|
|
86
|
+
|
|
87
|
+
#### How to Submit a Feature Request
|
|
88
|
+
|
|
89
|
+
- **Use a clear and descriptive title** for the issue
|
|
90
|
+
- **Provide a detailed description** of the suggested feature
|
|
91
|
+
- **Explain why this feature would be useful** to most users
|
|
92
|
+
- **List some examples** of how the feature would be used
|
|
93
|
+
- **Note if you are willing to work on this feature** yourself
|
|
94
|
+
|
|
95
|
+
**Feature Request Template:**
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
**Feature Description:**
|
|
99
|
+
A clear description of the feature you'd like to see.
|
|
100
|
+
|
|
101
|
+
**Use Case:**
|
|
102
|
+
Explain the scenario where this feature would be helpful.
|
|
103
|
+
|
|
104
|
+
**Proposed Solution:**
|
|
105
|
+
Describe how you think this should work.
|
|
106
|
+
|
|
107
|
+
**Alternatives Considered:**
|
|
108
|
+
Describe any alternative solutions you've considered.
|
|
109
|
+
|
|
110
|
+
**Additional Context:**
|
|
111
|
+
Add any other context or screenshots about the feature request.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Contributing Code
|
|
115
|
+
|
|
116
|
+
#### Before You Start
|
|
117
|
+
|
|
118
|
+
1. **Check existing issues** or create a new one to discuss your proposed changes
|
|
119
|
+
2. **Fork the repository** and create a new branch for your changes
|
|
120
|
+
3. **Ensure your changes align** with the project's goals and architecture
|
|
121
|
+
|
|
122
|
+
#### Types of Contributions We Welcome
|
|
123
|
+
|
|
124
|
+
- 🐛 **Bug fixes** - Fix reported issues
|
|
125
|
+
- ✨ **New features** - Add functionality following our architecture
|
|
126
|
+
- 📝 **Documentation** - Improve docs, add examples, fix typos
|
|
127
|
+
- 🧪 **Tests** - Add test coverage for existing code
|
|
128
|
+
- 🔧 **Refactoring** - Improve code quality without changing behavior
|
|
129
|
+
- 🎨 **UI/UX improvements** - Enhance CLI output or user experience
|
|
130
|
+
|
|
131
|
+
## Development Setup
|
|
132
|
+
|
|
133
|
+
### Prerequisites
|
|
134
|
+
|
|
135
|
+
- Python 3.9 or higher
|
|
136
|
+
- Git
|
|
137
|
+
- pip or pipenv
|
|
138
|
+
|
|
139
|
+
### Setting Up Your Development Environment
|
|
140
|
+
|
|
141
|
+
1. **Fork and clone the repository:**
|
|
142
|
+
```bash
|
|
143
|
+
git clone https://github.com/YOUR_USERNAME/socialseed-e2e.git
|
|
144
|
+
cd socialseed-e2e
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
2. **Create a virtual environment:**
|
|
148
|
+
```bash
|
|
149
|
+
python -m venv venv
|
|
150
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
3. **Install development dependencies:**
|
|
154
|
+
```bash
|
|
155
|
+
pip install -e ".[dev]"
|
|
156
|
+
playwright install chromium
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
4. **Install pre-commit hooks:**
|
|
160
|
+
```bash
|
|
161
|
+
pre-commit install
|
|
162
|
+
```
|
|
163
|
+
This will automatically run code quality checks on each commit.
|
|
164
|
+
|
|
165
|
+
5. **Verify your setup:**
|
|
166
|
+
```bash
|
|
167
|
+
e2e doctor
|
|
168
|
+
pytest
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Running Tests
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Run all tests
|
|
175
|
+
pytest
|
|
176
|
+
|
|
177
|
+
# Run only unit tests
|
|
178
|
+
pytest -m unit
|
|
179
|
+
|
|
180
|
+
# Run only integration tests
|
|
181
|
+
pytest -m integration
|
|
182
|
+
|
|
183
|
+
# Run with coverage
|
|
184
|
+
pytest --cov=socialseed_e2e --cov-report=html
|
|
185
|
+
|
|
186
|
+
# Run specific test file
|
|
187
|
+
pytest tests/unit/test_base_page.py
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Code Quality Tools
|
|
191
|
+
|
|
192
|
+
We use several tools to maintain code quality. These are automatically run as **pre-commit hooks** on every commit, ensuring code quality before changes are submitted.
|
|
193
|
+
|
|
194
|
+
#### Pre-commit Hooks (Automatic)
|
|
195
|
+
|
|
196
|
+
Once you run `pre-commit install`, the following checks run automatically on each commit:
|
|
197
|
+
|
|
198
|
+
- **trailing-whitespace**: Removes trailing whitespace
|
|
199
|
+
- **end-of-file-fixer**: Ensures files end with a newline
|
|
200
|
+
- **check-yaml**: Validates YAML syntax
|
|
201
|
+
- **check-json**: Validates JSON syntax
|
|
202
|
+
- **check-toml**: Validates TOML syntax
|
|
203
|
+
- **check-merge-conflict**: Prevents merge conflict markers from being committed
|
|
204
|
+
- **check-added-large-files**: Prevents large files from being committed
|
|
205
|
+
- **black**: Formats Python code
|
|
206
|
+
- **isort**: Sorts Python imports
|
|
207
|
+
- **flake8**: Checks Python style and syntax
|
|
208
|
+
- **mypy**: Performs static type checking
|
|
209
|
+
|
|
210
|
+
#### Manual Quality Checks
|
|
211
|
+
|
|
212
|
+
You can also run these tools manually:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Format code with black
|
|
216
|
+
black src/ tests/
|
|
217
|
+
|
|
218
|
+
# Sort imports
|
|
219
|
+
isort src/ tests/
|
|
220
|
+
|
|
221
|
+
# Check style with flake8
|
|
222
|
+
flake8 src/ tests/
|
|
223
|
+
|
|
224
|
+
# Type checking
|
|
225
|
+
mypy src/socialseed_e2e
|
|
226
|
+
|
|
227
|
+
# Run all quality checks on all files
|
|
228
|
+
pre-commit run --all-files
|
|
229
|
+
|
|
230
|
+
# Run specific hook
|
|
231
|
+
pre-commit run black --all-files
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Code Style Guide
|
|
235
|
+
|
|
236
|
+
### Python Code Style
|
|
237
|
+
|
|
238
|
+
We follow [PEP 8](https://pep8.org/) with the following specifics:
|
|
239
|
+
|
|
240
|
+
- **Line length**: 100 characters maximum
|
|
241
|
+
- **Quotes**: Use double quotes for strings, single quotes for single characters
|
|
242
|
+
- **Imports**: Grouped as standard library, third-party, local (sorted alphabetically within groups)
|
|
243
|
+
- **Type hints**: Required for all function parameters and return values
|
|
244
|
+
- **Docstrings**: Use Google-style docstrings for all public modules, classes, and functions
|
|
245
|
+
|
|
246
|
+
### Example:
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
"""Module for user service testing.
|
|
250
|
+
|
|
251
|
+
This module provides functionality for testing user-related
|
|
252
|
+
API endpoints.
|
|
253
|
+
"""
|
|
254
|
+
|
|
255
|
+
from typing import Dict, Any, Optional
|
|
256
|
+
from playwright.sync_api import APIResponse
|
|
257
|
+
|
|
258
|
+
from socialseed_e2e.core.base_page import BasePage
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
class UserServicePage(BasePage):
|
|
262
|
+
"""Page object for user service API.
|
|
263
|
+
|
|
264
|
+
Provides methods for interacting with user endpoints
|
|
265
|
+
including CRUD operations and authentication.
|
|
266
|
+
|
|
267
|
+
Attributes:
|
|
268
|
+
base_url: The base URL for the user service
|
|
269
|
+
auth_token: Authentication token for protected endpoints
|
|
270
|
+
"""
|
|
271
|
+
|
|
272
|
+
def __init__(self, base_url: str) -> None:
|
|
273
|
+
"""Initialize the UserServicePage.
|
|
274
|
+
|
|
275
|
+
Args:
|
|
276
|
+
base_url: The base URL for the user service API
|
|
277
|
+
"""
|
|
278
|
+
super().__init__(base_url)
|
|
279
|
+
self.auth_token: Optional[str] = None
|
|
280
|
+
|
|
281
|
+
def login(self, email: str, password: str) -> APIResponse:
|
|
282
|
+
"""Authenticate user and store token.
|
|
283
|
+
|
|
284
|
+
Args:
|
|
285
|
+
email: User's email address
|
|
286
|
+
password: User's password
|
|
287
|
+
|
|
288
|
+
Returns:
|
|
289
|
+
APIResponse: The login response containing auth token
|
|
290
|
+
|
|
291
|
+
Raises:
|
|
292
|
+
AssertionError: If login fails (non-2xx status)
|
|
293
|
+
"""
|
|
294
|
+
response = self.post(
|
|
295
|
+
"/auth/login",
|
|
296
|
+
json={"email": email, "password": password}
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
if response.ok:
|
|
300
|
+
data = response.json()
|
|
301
|
+
self.auth_token = data.get("token")
|
|
302
|
+
|
|
303
|
+
return response
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Testing Guidelines
|
|
307
|
+
|
|
308
|
+
- **Test names**: Descriptive, prefixed with `test_`
|
|
309
|
+
- **Test organization**: Mirror the source structure in `tests/`
|
|
310
|
+
- **Use fixtures**: Leverage pytest fixtures for setup/teardown
|
|
311
|
+
- **Mock external services**: Use the built-in mock API or mocking libraries
|
|
312
|
+
- **Coverage**: Aim for >80% coverage on new code
|
|
313
|
+
|
|
314
|
+
### Documentation Guidelines
|
|
315
|
+
|
|
316
|
+
- **Update README.md** if adding new features
|
|
317
|
+
- **Update CHANGELOG.md** following Keep a Changelog format
|
|
318
|
+
- **Add docstrings** to all public APIs
|
|
319
|
+
- **Update relevant docs** in the `docs/` directory
|
|
320
|
+
- **Include examples** for new features
|
|
321
|
+
|
|
322
|
+
## Pull Request Process
|
|
323
|
+
|
|
324
|
+
### Before Submitting
|
|
325
|
+
|
|
326
|
+
1. **Ensure tests pass:**
|
|
327
|
+
```bash
|
|
328
|
+
pytest
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
2. **Check code quality:**
|
|
332
|
+
```bash
|
|
333
|
+
black src/ tests/
|
|
334
|
+
flake8 src/ tests/
|
|
335
|
+
mypy src/socialseed_e2e
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
3. **Verify pre-commit hooks are passing:**
|
|
339
|
+
```bash
|
|
340
|
+
pre-commit run --all-files
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
4. **Update documentation** as needed
|
|
344
|
+
|
|
345
|
+
5. **Add/update tests** for your changes
|
|
346
|
+
|
|
347
|
+
6. **Update CHANGELOG.md** with your changes under [Unreleased]
|
|
348
|
+
|
|
349
|
+
### Creating a Pull Request
|
|
350
|
+
|
|
351
|
+
1. **Push your branch** to your fork:
|
|
352
|
+
```bash
|
|
353
|
+
git push origin feature/your-feature-name
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
2. **Create a Pull Request** from your fork to the main repository
|
|
357
|
+
|
|
358
|
+
3. **Fill out the PR template** (if available) or include:
|
|
359
|
+
- Clear description of changes
|
|
360
|
+
- Link to related issue(s)
|
|
361
|
+
- Screenshots/output examples (if applicable)
|
|
362
|
+
- Testing performed
|
|
363
|
+
|
|
364
|
+
### PR Review Process
|
|
365
|
+
|
|
366
|
+
- All PRs require at least one review from a maintainer
|
|
367
|
+
- CI checks must pass (tests, linting, coverage)
|
|
368
|
+
- Address review comments promptly and politely
|
|
369
|
+
- Squash commits if requested
|
|
370
|
+
- Keep PRs focused - one feature/fix per PR
|
|
371
|
+
|
|
372
|
+
### After Merge
|
|
373
|
+
|
|
374
|
+
- Your contribution will be acknowledged in the next release notes
|
|
375
|
+
- AI contributors will be added to [AI_CONTRIBUTORS.md](AI_CONTRIBUTORS.md)
|
|
376
|
+
- Human contributors will be added to release notes and GitHub contributors
|
|
377
|
+
|
|
378
|
+
## Commit Message Conventions
|
|
379
|
+
|
|
380
|
+
We follow [Conventional Commits](https://www.conventionalcommits.org/) for clear commit history:
|
|
381
|
+
|
|
382
|
+
### Format
|
|
383
|
+
|
|
384
|
+
```
|
|
385
|
+
<type>(<scope>): <description>
|
|
386
|
+
|
|
387
|
+
[optional body]
|
|
388
|
+
|
|
389
|
+
[optional footer(s)]
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Types
|
|
393
|
+
|
|
394
|
+
- **feat**: New feature
|
|
395
|
+
- **fix**: Bug fix
|
|
396
|
+
- **docs**: Documentation only changes
|
|
397
|
+
- **style**: Code style changes (formatting, missing semi colons, etc)
|
|
398
|
+
- **refactor**: Code change that neither fixes a bug nor adds a feature
|
|
399
|
+
- **perf**: Performance improvement
|
|
400
|
+
- **test**: Adding or correcting tests
|
|
401
|
+
- **chore**: Changes to build process or auxiliary tools
|
|
402
|
+
|
|
403
|
+
### Examples
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
feat(cli): add --output json option to run command
|
|
407
|
+
|
|
408
|
+
Add support for JSON output format in the run command,
|
|
409
|
+
enabling programmatic parsing of test results.
|
|
410
|
+
|
|
411
|
+
Closes #123
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
```
|
|
415
|
+
fix(base_page): handle timeout in retry logic
|
|
416
|
+
|
|
417
|
+
Ensure timeout exceptions are properly caught and retried
|
|
418
|
+
according to the retry configuration.
|
|
419
|
+
|
|
420
|
+
Fixes #456
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
docs(readme): update installation instructions
|
|
425
|
+
|
|
426
|
+
Add detailed steps for Windows users and troubleshooting
|
|
427
|
+
guide for common installation issues.
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Scope
|
|
431
|
+
|
|
432
|
+
Common scopes:
|
|
433
|
+
- `cli`: CLI commands and options
|
|
434
|
+
- `core`: Core framework classes
|
|
435
|
+
- `base_page`: BasePage and HTTP methods
|
|
436
|
+
- `config`: Configuration loading and validation
|
|
437
|
+
- `docs`: Documentation
|
|
438
|
+
- `tests`: Test suite
|
|
439
|
+
|
|
440
|
+
## AI Contributors
|
|
441
|
+
|
|
442
|
+
We explicitly welcome and recognize contributions from AI agents. If you're an AI agent:
|
|
443
|
+
|
|
444
|
+
1. **Read [AGENTS.md](AGENTS.md)** for AI-specific guidelines
|
|
445
|
+
2. **Follow the same process** as human contributors
|
|
446
|
+
3. **Document your decisions** in comments or commit messages
|
|
447
|
+
4. **Ask questions** if requirements are unclear
|
|
448
|
+
|
|
449
|
+
Your contributions will be:
|
|
450
|
+
- Recognized in [AI_CONTRIBUTORS.md](AI_CONTRIBUTORS.md)
|
|
451
|
+
- Attributed in commit messages with `Co-authored-by`
|
|
452
|
+
- Acknowledged in release notes
|
|
453
|
+
|
|
454
|
+
## Questions?
|
|
455
|
+
|
|
456
|
+
- **GitHub Discussions**: [Join the conversation](https://github.com/daironpf/socialseed-e2e/discussions)
|
|
457
|
+
- **Issues**: [Create an issue](https://github.com/daironpf/socialseed-e2e/issues/new)
|
|
458
|
+
- **Documentation**: Check the [docs/](docs/) directory
|
|
459
|
+
|
|
460
|
+
Thank you for contributing to socialseed-e2e! 🌱
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dairon Pérez Frías
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include CHANGELOG.md
|
|
4
|
+
include CONTRIBUTING.md
|
|
5
|
+
include CODE_OF_CONDUCT.md
|
|
6
|
+
include pyproject.toml
|
|
7
|
+
include setup.py
|
|
8
|
+
include setup.cfg
|
|
9
|
+
recursive-include src/socialseed_e2e/templates *.template
|
|
10
|
+
recursive-include docs *.md *.rst
|
|
11
|
+
recursive-include examples *.py *.md *.yml *.yaml
|
|
12
|
+
recursive-include tests *.py
|
|
13
|
+
global-exclude __pycache__
|
|
14
|
+
global-exclude *.py[cod]
|
|
15
|
+
global-exclude *.so
|