Commit 0b0df9a
committed
test(keys): lifecycle, placement, hover and export
33 tests. The Python half covers the lifecycle and validation; the render
half covers what only the browser can answer.
Notable cases, each pinned to a decision rather than to current output:
* a bare RGBA key draws NO card — alpha 0 stays transparent, which is the
whole reason a triangle or a disc can sit on an image
* keys pin to the AXES BOX, not the letterboxed picture. The panel is made
much wider than its square image so the two differ, and the key must
track imgX. This is the scale bar's rule and the test says so.
* hover_only stays dark until the pointer arrives, and a plain key is
unaffected by hovering
* three export regressions: a hover_only key must appear in an export
taken with the pointer away; cold and hovered exports must be
byte-identical; and a LONE hover_only key must still export — that last
one is the display:none / 0x0-rect trap, which no other key is around to
mask.
Adds a shared `mount_page` fixture to tests/conftest.py. `interact_page`
calls renderFn directly and exposes no mount handle, so it can drive a
pointer but cannot export or reach the panels map; these tests need both at
once. test_export_png.py and test_texture.py predate it and keep their own
local copies.1 parent 64541b4 commit 0b0df9a
2 files changed
Lines changed: 419 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
0 commit comments