File tree 3 files changed +13
-5
lines changed
lib/gitlab/ci/status/build
spec/lib/gitlab/ci/status/build
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Fix tooltip displayed for running manual actions
3
+ merge_request : 16489
4
+ author :
5
+ type : fixed
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ module Gitlab
2
2
module Ci
3
3
module Status
4
4
module Build
5
+ ##
6
+ # Extended status for playable manual actions.
7
+ #
5
8
class Action < Status ::Extended
6
9
def label
7
10
if has_action?
@@ -12,7 +15,7 @@ def label
12
15
end
13
16
14
17
def self . matches? ( build , user )
15
- build . action ?
18
+ build . playable ?
16
19
end
17
20
end
18
21
end
Original file line number Diff line number Diff line change 37
37
describe '.matches?' do
38
38
subject { described_class . matches? ( build , user ) }
39
39
40
- context 'when build is an action' do
41
- let ( :build ) { create ( :ci_build , :manual ) }
40
+ context 'when build is playable action' do
41
+ let ( :build ) { create ( :ci_build , :playable ) }
42
42
43
43
it 'is a correct match' do
44
44
expect ( subject ) . to be true
45
45
end
46
46
end
47
47
48
- context 'when build is not manual ' do
49
- let ( :build ) { create ( :ci_build ) }
48
+ context 'when build is not playable action ' do
49
+ let ( :build ) { create ( :ci_build , :non_playable ) }
50
50
51
51
it 'does not match' do
52
52
expect ( subject ) . to be false
You can’t perform that action at this time.
0 commit comments