According to the documentation (https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/junit/jupiter/EnabledIf.html#expression--) you
Your expression should look like this:
@EnabledIf(value = "${spring.profiles.active == 'test'}", loadContext = true)