extends GdUnitTestSuite

## NEO-85: lock highlight uses albedo-only tuning on unshaded dummy materials.

const Markers := preload("res://scripts/prototype_target_markers.gd")

const ALPHA_ID := "prototype_target_alpha"


func test_set_locked_target_brightens_body_albedo_without_emission() -> void:
	# Arrange
	var markers: Node3D = Markers.new()
	auto_free(markers)
	add_child(markers)
	await get_tree().process_frame
	var body: MeshInstance3D = markers.get_node("Marker_%s/DummyBody" % ALPHA_ID) as MeshInstance3D
	var body_mat: StandardMaterial3D = body.material_override as StandardMaterial3D
	var idle_color: Color = body_mat.albedo_color
	# Act
	markers.set_locked_target(ALPHA_ID)
	# Assert
	assert_that(body_mat.albedo_color).is_not_equal(idle_color)
	assert_that(body_mat.emission_enabled).is_false()
