2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
class TestSuiteComparerEntity < Grape::Entity
|
|
|
|
expose :name
|
|
|
|
expose :total_status, as: :status
|
|
|
|
|
|
|
|
expose :summary do
|
|
|
|
expose :total_count, as: :total
|
|
|
|
expose :resolved_count, as: :resolved
|
|
|
|
expose :failed_count, as: :failed
|
2020-03-09 13:42:32 +05:30
|
|
|
expose :error_count, as: :errored
|
2018-11-18 11:00:15 +05:30
|
|
|
end
|
|
|
|
|
2019-09-30 21:07:59 +05:30
|
|
|
expose :new_failures, using: TestCaseEntity do |suite|
|
2021-01-29 00:20:46 +05:30
|
|
|
suite.limited_tests.new_failures
|
2019-09-30 21:07:59 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
expose :existing_failures, using: TestCaseEntity do |suite|
|
2021-01-29 00:20:46 +05:30
|
|
|
suite.limited_tests.existing_failures
|
2019-09-30 21:07:59 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
expose :resolved_failures, using: TestCaseEntity do |suite|
|
2021-01-29 00:20:46 +05:30
|
|
|
suite.limited_tests.resolved_failures
|
2019-09-30 21:07:59 +05:30
|
|
|
end
|
|
|
|
|
2020-03-09 13:42:32 +05:30
|
|
|
expose :new_errors, using: TestCaseEntity do |suite|
|
2021-01-29 00:20:46 +05:30
|
|
|
suite.limited_tests.new_errors
|
2020-03-09 13:42:32 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
expose :existing_errors, using: TestCaseEntity do |suite|
|
2021-01-29 00:20:46 +05:30
|
|
|
suite.limited_tests.existing_errors
|
2020-03-09 13:42:32 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
expose :resolved_errors, using: TestCaseEntity do |suite|
|
2021-01-29 00:20:46 +05:30
|
|
|
suite.limited_tests.resolved_errors
|
2019-09-30 21:07:59 +05:30
|
|
|
end
|
2018-11-18 11:00:15 +05:30
|
|
|
end
|