mirror of
https://github.com/Dasharo/docs.git
synced 2026-06-13 10:16:57 -07:00
tests/: add tos-gate test and CI workflow
29 tests across four classes: - TestTosGatedDownloads (9) - macro unit tests: URL absent from HTML, base64/JSON roundtrip, group format encoding, checkbox attributes, prose_section_id, tos_url override - TestTosCheckbox (4) - legacy macro: element presence, section ID, URL defaults/override - TestTosGateJs (7) - JS file: function defined, noreferrer absent from link template but warning comment present, data-prose-group selector present, group branch present, prose hidden on uncheck - TestStaticFiles (9) - no plain dl.3mdeb.com links, correct macro usage in variants/ files, tos-gate.js in mkdocs.yml, permalink: true, referrer meta in overrides/main.html Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: ToS gate tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
paths:
|
||||
- main.py
|
||||
- docs/javascripts/tos-gate.js
|
||||
- overrides/main.html
|
||||
- mkdocs.yml
|
||||
- docs/**
|
||||
- tests/test_tos_gate.py
|
||||
- requirements.txt
|
||||
pull_request:
|
||||
paths:
|
||||
- main.py
|
||||
- docs/javascripts/tos-gate.js
|
||||
- overrides/main.html
|
||||
- mkdocs.yml
|
||||
- docs/**
|
||||
- tests/test_tos_gate.py
|
||||
- requirements.txt
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
- name: Run ToS gate tests
|
||||
run: pytest tests/test_tos_gate.py -v
|
||||
Reference in New Issue
Block a user