+ Тесты с x-тегом пропускаются
Этот коммит содержится в:
родитель
b163beeff8
коммит
b5020fefd1
2 изменённых файлов: 68 добавлений и 29 удалений
|
@ -197,3 +197,31 @@ Feature: tag filters
|
||||||
a feature path "three"
|
a feature path "three"
|
||||||
a feature path "four"
|
a feature path "four"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Scenario: empty filter and scenarios with x-tag - are skipped
|
||||||
|
Given a feature "normal.feature" file:
|
||||||
|
"""
|
||||||
|
Feature: x-tagged
|
||||||
|
|
||||||
|
Scenario: one
|
||||||
|
Given a feature path "one"
|
||||||
|
|
||||||
|
Scenario: two
|
||||||
|
Given a feature path "two"
|
||||||
|
|
||||||
|
@x
|
||||||
|
Scenario: three
|
||||||
|
Given a feature path "three"
|
||||||
|
|
||||||
|
@x
|
||||||
|
Scenario: four
|
||||||
|
Given a feature path "four"
|
||||||
|
"""
|
||||||
|
When I run feature suite with tags ""
|
||||||
|
Then the suite should have passed
|
||||||
|
And I should have 2 scenario registered
|
||||||
|
And the following steps should be passed:
|
||||||
|
"""
|
||||||
|
a feature path "one"
|
||||||
|
a feature path "two"
|
||||||
|
"""
|
||||||
|
|
|
@ -15,7 +15,7 @@ func ApplyTagFilter(filter string, pickles []*messages.Pickle) []*messages.Pickl
|
||||||
return ff
|
return ff
|
||||||
}
|
}
|
||||||
|
|
||||||
return pickles
|
return filterOutX(pickles)
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = []*messages.Pickle{}
|
var result = []*messages.Pickle{}
|
||||||
|
@ -77,3 +77,14 @@ func filterF(pickles []*messages.Pickle) []*messages.Pickle {
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
func filterOutX(pickles []*messages.Pickle) []*messages.Pickle {
|
||||||
|
var result = []*messages.Pickle{}
|
||||||
|
|
||||||
|
for _, pickle := range pickles {
|
||||||
|
if !contains(pickle.Tags, "x") {
|
||||||
|
result = append(result, pickle)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче