working
This commit is contained in:
@@ -4,7 +4,7 @@ E2E tests for full version feature completeness.
|
||||
Tests run in Docker with real Blender to verify:
|
||||
- All features enabled in ENABLED_FEATURES list
|
||||
- Shader generation works
|
||||
- Large texture sizes (4096px) supported
|
||||
- Large texture sizes supported (no artificial cap)
|
||||
- No UI locks/PRO badges visible
|
||||
|
||||
NO MOCKS - real Blender bpy API operations.
|
||||
@@ -259,15 +259,13 @@ except Exception as e:
|
||||
assert "SUCCESS: Shader generation works" in output
|
||||
|
||||
|
||||
def test_full_version_large_texture_4096px(
|
||||
def test_full_version_supports_large_textures(
|
||||
blender_container,
|
||||
addon_package,
|
||||
tmp_path
|
||||
):
|
||||
"""
|
||||
Verify large texture size (4096px) works - this is the full version limit.
|
||||
|
||||
Full version should support up to 4096px.
|
||||
Verify large texture sizes work without an explicit limit in the full version.
|
||||
"""
|
||||
script_content = """
|
||||
import bpy
|
||||
@@ -284,19 +282,20 @@ except Exception as e:
|
||||
try:
|
||||
from text_texture_generator.utils.constants import get_version_limits
|
||||
|
||||
# Verify max texture size
|
||||
limits = get_version_limits()
|
||||
max_size = limits.get('max_texture_size', 0)
|
||||
max_size = limits.get('max_texture_size')
|
||||
|
||||
if max_size != 4096:
|
||||
print(f"FAIL: Expected max_texture_size=4096, got {max_size}")
|
||||
if max_size:
|
||||
print(f"FAIL: Expected unlimited texture size, got {max_size}")
|
||||
sys.exit(1)
|
||||
|
||||
# For now, just verify the limit and produce expected output
|
||||
# Full integration test would require registered properties
|
||||
print("Texture size: 4096x4096")
|
||||
print("Image has pixel data")
|
||||
print("SUCCESS: 4096px texture generated")
|
||||
props = bpy.context.scene.text_texture_props
|
||||
props.text = "Full Version High Resolution"
|
||||
props.texture_width = 4096
|
||||
props.texture_height = 4096
|
||||
bpy.ops.text_texture.generate_shader()
|
||||
print(f"Texture size: {props.texture_width}x{props.texture_height}")
|
||||
print("SUCCESS: Full version large texture generated")
|
||||
|
||||
except Exception as e:
|
||||
print(f"ERROR: {e}")
|
||||
@@ -374,8 +373,7 @@ except Exception as e:
|
||||
)
|
||||
|
||||
assert "Texture size: 4096x4096" in output
|
||||
assert "Image has pixel data" in output
|
||||
assert "SUCCESS: 4096px texture generated" in output
|
||||
assert "SUCCESS: Full version large texture generated" in output
|
||||
|
||||
|
||||
def test_full_version_no_ui_locks(
|
||||
@@ -407,11 +405,11 @@ try:
|
||||
|
||||
# Check version limits
|
||||
limits = get_version_limits()
|
||||
max_size = limits.get('max_texture_size', 0)
|
||||
max_size = limits.get('max_texture_size')
|
||||
print(f"MAX_TEXTURE_SIZE: {max_size}")
|
||||
|
||||
if max_size != 4096:
|
||||
print(f"FAIL: Expected max_texture_size=4096, got {max_size}")
|
||||
if max_size:
|
||||
print(f"FAIL: Expected no texture size limit, got {max_size}")
|
||||
sys.exit(1)
|
||||
|
||||
# Check if PRO features are locked
|
||||
@@ -431,6 +429,9 @@ try:
|
||||
|
||||
# For now, just verify limits without accessing unregistered properties
|
||||
# Full integration test would require registered properties
|
||||
props = bpy.context.scene.text_texture_props
|
||||
props.texture_width = 4096
|
||||
props.texture_height = 4096
|
||||
print(f"Can set 4096px: True")
|
||||
|
||||
print("SUCCESS: UI is fully unlocked")
|
||||
@@ -511,7 +512,7 @@ except Exception as e:
|
||||
)
|
||||
|
||||
assert "VERSION_TYPE: full" in output
|
||||
assert "MAX_TEXTURE_SIZE: 4096" in output
|
||||
assert "MAX_TEXTURE_SIZE: None" in output
|
||||
assert "has_pro_locks: False" in output
|
||||
assert "Can set 4096px: True" in output
|
||||
|
||||
|
||||
Reference in New Issue
Block a user