Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_suite_comparer_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aab805f9598d343e40269b62c5e5dd4f79e1d9c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# frozen_string_literal: true

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
    expose :error_count, as: :errored
  end

  expose :new_failures, using: TestCaseEntity do |suite|
    suite.limited_tests.new_failures
  end

  expose :existing_failures, using: TestCaseEntity do |suite|
    suite.limited_tests.existing_failures
  end

  expose :resolved_failures, using: TestCaseEntity do |suite|
    suite.limited_tests.resolved_failures
  end

  expose :new_errors, using: TestCaseEntity do |suite|
    suite.limited_tests.new_errors
  end

  expose :existing_errors, using: TestCaseEntity do |suite|
    suite.limited_tests.existing_errors
  end

  expose :resolved_errors, using: TestCaseEntity do |suite|
    suite.limited_tests.resolved_errors
  end
end