-
Notifications
You must be signed in to change notification settings - Fork 9
/
cucumber.yml
19 lines (15 loc) · 1.4 KB
/
cucumber.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<%
# Can't use 'require_relative' because it won't work on JRuby inside of an ERB file
require "#{__dir__}/cuke_slicer_project_settings"
require "#{__dir__}/cuke_slicer_helper"
# The output folder needs to exist no matter how Cucumber was invoked, so do it here
FileUtils.mkdir(ENV['CUKE_SLICER_REPORT_FOLDER']) unless File.exist?(ENV['CUKE_SLICER_REPORT_FOLDER'])
cucumber_major_version = CukeSlicer::CukeSlicerHelper.major_version_of('cucumber')
cuke_modeler_major_version = CukeSlicer::CukeSlicerHelper.major_version_of('cuke_modeler')
max_cuke_modeler_version = ENV['MOST_CURRENT_CUKE_MODELER_VERSION'].to_i
# Some tests only work for some versions of CukeModeler
cuke_modeler_filter_tags = ((cuke_modeler_major_version + 1)..max_cuke_modeler_version).map{ |index| "@cuke_modeler_min_version_#{index}" }
formatted_filter_tags = (cucumber_major_version < 4 ? cuke_modeler_filter_tags.map { |tag| "-t ~#{tag}" } : cuke_modeler_filter_tags.map { |tag| "-t 'not #{tag}'" }).join(' ')
%>
html: -f html -o <%= ENV['CUKE_SLICER_REPORT_FOLDER'] %>/<%= ENV['CUKE_SLICER_CUCUMBER_REPORT_HTML_FILE'] %>
default: testing/cucumber/features -p html -f progress --color -r testing/environments/cucumber_env.rb -t <%= cucumber_major_version < 4 ? "~@wip": "'not @wip'" %> <%= '--publish-quiet' if cucumber_major_version >= 5 %> <%= formatted_filter_tags unless cuke_modeler_major_version == max_cuke_modeler_version %>