'descendant with leaf value and ancestor' | '//child[@other-leaf=1]/leaf-name[text()="search"]/ancestor::parent' || true | true
}
+ def 'Parse #scenario cps path with contains function condition'() {
+ when: 'the given cps path is parsed'
+ def result = CpsPathQuery.createFrom('//someContainer[contains(@lang,"en")]')
+ then: 'the query has the right xpath type'
+ result.cpsPathPrefixType == DESCENDANT
+ and: 'the right contains function condition is set'
+ result.hasContainsFunctionCondition()
+ result.containsFunctionConditionLeafName == 'lang'
+ result.containsFunctionConditionValue == 'en'
+ }
+
def 'Parse cps path with error: #scenario.'() {
when: 'the given cps path is parsed'
CpsPathQuery.createFrom(cpsPath)