Skip to content

Commit

Permalink
#312: add support of "TC", "Test cases" keywords
Browse files Browse the repository at this point in the history
Fixed #312
  • Loading branch information
dgroup committed Jan 25, 2021
1 parent 57b1533 commit 02c6ac8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lazylead/task/accuracy/testcase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def with_tc_ar_er?
def detect_tc(line, index)
return unless @tc.negative?
@tc = index if eql? line,
%w[testcase: tc: teststeps: teststeps steps: tcsteps:]
%w[testcase: tc: teststeps: teststeps steps: tcsteps: tc testcases]
end

# Detect index of line with actual result
Expand Down
18 changes: 18 additions & 0 deletions test/lazylead/task/accuracy/testcase_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,24 @@ class TestcaseTest < Lazylead::Test
*{color:#DE10AA}[AR]{color}* = YYYY"
end

test "tc" do
assert testcase? "*TC*
# Step 1
# Step ..
# Step N
*{color:#00673A}[ER]{color}* = XXXX
*{color:#DE10AA}[AR]{color}* = YYYY"
end

test "testcases" do
assert testcase? "*Test cases*
# Step 1
# Step ..
# Step N
*{color:#00673A}[ER]{color}* = XXXX
*{color:#DE10AA}[AR]{color}* = YYYY"
end

# ensure that issue description has a test case, AR and ER
def testcase?(desc)
Testcase.new.passed(OpenStruct.new(description: desc))
Expand Down

0 comments on commit 02c6ac8

Please sign in to comment.