Skip to content

Commit 4e7d844

Browse files
committed
Finalize the cloning test and document our findings
1 parent e05f8f6 commit 4e7d844

File tree

3 files changed

+594
-120
lines changed

3 files changed

+594
-120
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ optional-dependencies.docs = [
4242
"sphinx-rtd-theme",
4343
]
4444
optional-dependencies.tests = [
45+
"beautifulsoup4",
4546
"coverage",
4647
"pytest",
4748
"pytest-asyncio",

tests/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Django Content Editor Tests
2+
3+
## Clone Functionality Testing
4+
5+
### Key Tests
6+
- `test_clone_plugins_functionality`: End-to-end UI + database testing
7+
- `test_clone_backend_logic`: Backend-only form processing
8+
- `test_clone_insert_between_existing_content`: Insert positioning tests
9+
10+
### Critical Insights
11+
**Clone Ordering**: `_clone_ordering` = ordering value to insert *before*. After save, existing content gets renormalized but cloned content keeps its target ordering value. This is correct behavior.
12+
13+
**Section Auto-Selection**: JavaScript auto-selects nested checkboxes. Use direct JS evaluation in tests.
14+
15+
**Region Targeting**: Use `[data-region="sidebar"] .order-machine-insert-target` for region-specific insert targets.
16+
17+
### Running Tests
18+
```bash
19+
python -m pytest tests/testapp/test_playwright.py -v
20+
tox -e py313-dj52
21+
```

0 commit comments

Comments
 (0)