Skip to content

Commit 14e7b82

Browse files
authored
Merge pull request #100 from Integration-Automation/dev
Release dev to main
2 parents f9ee4fe + f702187 commit 14e7b82

347 files changed

Lines changed: 5198 additions & 3579 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ updates:
99
directory: "/" # Location of package manifests
1010
schedule:
1111
interval: "daily"
12+
- package-ecosystem: "github-actions" # Keep workflow action versions current
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"

.github/workflows/e2e_browser.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
uses: actions/setup-python@v5
4242
with:
4343
python-version: "3.12"
44+
cache: 'pip'
45+
cache-dependency-path: dev_requirements.txt
4446

4547
- name: Install dependencies
4648
run: |

.github/workflows/test_dev.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ jobs:
2727
uses: actions/setup-python@v5
2828
with:
2929
python-version: ${{ matrix.python-version }}
30+
cache: 'pip'
31+
cache-dependency-path: dev_requirements.txt
3032

3133
- name: Install dependencies
3234
run: |
3335
python -m pip install --upgrade pip wheel
3436
pip install -r dev_requirements.txt
35-
pip install pytest
3637
3738
- name: Run unit tests
3839
run: python -m pytest test/unit_test/test_*.py -v
@@ -63,6 +64,8 @@ jobs:
6364
uses: actions/setup-python@v5
6465
with:
6566
python-version: ${{ matrix.python-version }}
67+
cache: 'pip'
68+
cache-dependency-path: dev_requirements.txt
6669

6770
- name: Install dependencies
6871
run: |

.github/workflows/test_stable.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
uses: actions/setup-python@v5
2828
with:
2929
python-version: ${{ matrix.python-version }}
30+
cache: 'pip'
31+
cache-dependency-path: requirements.txt
3032

3133
- name: Install dependencies
3234
run: |
@@ -63,6 +65,8 @@ jobs:
6365
uses: actions/setup-python@v5
6466
with:
6567
python-version: ${{ matrix.python-version }}
68+
cache: 'pip'
69+
cache-dependency-path: requirements.txt
6670

6771
- name: Install dependencies
6872
run: |

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,21 @@ dmypy.json
123123
# Driver
124124
*.zip
125125
*.exe
126+
# webdriver-manager driver cache (set_driver caches drivers under cwd)
127+
.wdm/
126128

127129
/.claude/
128130
/.claude
129131
issues.json
130132
hotspots.json
131133
codacy.json
134+
135+
# Static-analysis exports (SonarCloud / Codacy / pyflakes scratch files)
136+
.codacy_*.json
137+
.sonar_*.json
138+
.pyflakes_files*.txt
139+
140+
# Local report-generation scratch output
141+
default_name*.html
142+
default_name*.json
143+
default_name*.xml

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing to WebRunner
2+
3+
Thanks for your interest in improving WebRunner (`je_web_runner`). This
4+
guide covers the local setup, the checks we expect to pass, and the branch
5+
/ PR conventions.
6+
7+
## Development setup
8+
9+
WebRunner targets **Python 3.10+**.
10+
11+
```bash
12+
# Runtime dependencies
13+
pip install -r requirements.txt
14+
15+
# Development dependencies (tests, linters, docs, build tooling)
16+
pip install -r dev_requirements.txt
17+
```
18+
19+
## Running the tests
20+
21+
```bash
22+
# Whole suite (unit + integration; e2e tests skip without a Selenium hub)
23+
python -m pytest test/
24+
25+
# Unit tests only
26+
python -m pytest test/unit_test/test_*.py
27+
```
28+
29+
The pure-Python unit suite needs no browser. Integration tests spawn
30+
short-lived subprocesses. The real-browser e2e tests under
31+
`test/e2e_test/` skip cleanly unless `WEBRUNNER_E2E_HUB` points at a
32+
reachable Selenium Grid (see `docker/`).
33+
34+
## Before opening a pull request
35+
36+
Run the linters and keep them clean (no new findings):
37+
38+
```bash
39+
python -m flake8 je_web_runner/ --max-line-length=120 --max-complexity=10
40+
python -m pylint je_web_runner/
41+
python -m bandit -r je_web_runner/ -ll
42+
python -m mypy je_web_runner/
43+
```
44+
45+
Please also:
46+
47+
- Add or update tests for any behaviour you change.
48+
- Keep public functions type-hinted and documented.
49+
- Avoid introducing new static-analysis issues (SonarQube / Codacy).
50+
51+
## Branches and commits
52+
53+
- `main` is the stable branch; `dev` is the development branch.
54+
- Open pull requests **from `dev` into `main`**.
55+
- Write concise, imperative commit messages (e.g. "Add element
56+
validation", "Fix driver cleanup on timeout").
57+
58+
## Reporting security issues
59+
60+
Do **not** file security vulnerabilities as public issues — see
61+
[SECURITY.md](SECURITY.md) for the private disclosure process.

SECURITY.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
WebRunner (`je_web_runner`) is distributed on PyPI. Security fixes are
6+
applied to the latest released version. Please upgrade to the most recent
7+
release before reporting an issue, as the problem may already be resolved.
8+
9+
| Version | Supported |
10+
| -------------- | ------------------ |
11+
| Latest release | :white_check_mark: |
12+
| Older releases | :x: |
13+
14+
## Reporting a Vulnerability
15+
16+
Please report security vulnerabilities **privately** — do not open a public
17+
issue, pull request, or discussion for a suspected vulnerability.
18+
19+
Use either of the following private channels:
20+
21+
- **GitHub Security Advisories** — open a private report via the
22+
repository's *Security* tab → *Report a vulnerability*. This is the
23+
preferred channel.
24+
- **Email**`jechenmailman@gmail.com` with a subject line beginning
25+
`[SECURITY]`.
26+
27+
To help triage quickly, please include where practical:
28+
29+
- A description of the vulnerability and its impact.
30+
- The affected version(s) and platform.
31+
- Step-by-step reproduction instructions or a minimal proof of concept.
32+
- Any suggested remediation.
33+
34+
## Disclosure Process
35+
36+
- We aim to acknowledge a report within **5 business days**.
37+
- We target a fix and coordinated disclosure within **90 days** of the
38+
initial report, sooner for actively exploited issues.
39+
- We will credit reporters who wish to be acknowledged once a fix is
40+
released. Please let us know your preference.
41+
42+
Thank you for helping keep WebRunner and its users safe.

dev_requirements.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ Pyside6
77
defusedxml
88
Pillow
99
faker
10-
sqlalchemy
10+
sqlalchemy
11+
pytest
12+
pylint
13+
flake8
14+
bandit
15+
mypy

docs/source/Zh/doc/specialized_modules/specialized_modules_doc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ CODEOWNERS 解析器(GitHub 語意:最後一條 match 的規則勝出)+ 每
514514
* ``web_push_assert`` —— Push subscription VAPID key 匹配、endpoint
515515
白名單、``userVisibleOnly``、``showNotification`` payload。
516516
* ``background_sync_assert`` —— Background Sync register / fire /
517-
retry / ``lastChance``(quota 耗盡)斷言。
517+
retry / ``lastChance``\ (quota 耗盡)斷言。
518518
* ``wake_lock_assert`` —— Screen wake lock acquire / release /
519519
漏掉 / 切回前景時 re-acquire 偵測。
520520
* ``pip_assert`` —— Picture-in-Picture(影片 + Document PiP)
@@ -569,7 +569,7 @@ Email 與通知送達
569569
================
570570

571571
* ``email_deliverability`` —— SPF / DKIM / DMARC header +
572-
``List-Unsubscribe``(Gmail/Yahoo 大量寄件規則)+ BCC 外洩稽核。
572+
``List-Unsubscribe``\ (Gmail/Yahoo 大量寄件規則)+ BCC 外洩稽核。
573573
* ``inbox_render_outlook`` —— Outlook(Word 引擎)/ Gmail / Apple
574574
Mail 渲染相容性 pre-flight 檢查。
575575
* ``push_delivery`` —— FCM / APNs payload 大小 + 必填欄位 + PII

docs/source/Zh/doc/webdriver_wrapper/webdriver_wrapper_doc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ CDP Fetch 攔截
304304
--------------
305305

306306
``Fetch.*`` CDP 命令薄包裝。要實際收事件 (``Fetch.requestPaused``) 請使用
307-
``CDPEventListener``(或 Selenium trio-based devtools listener)自行訂閱:
307+
``CDPEventListener``\ (或 Selenium trio-based devtools listener)自行訂閱:
308308

309309
.. code-block:: python
310310

0 commit comments

Comments
 (0)