diff options
Diffstat (limited to 'polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html')
-rw-r--r-- | polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html index 96ef5ff135..81fe54ef65 100644 --- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html +++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.html @@ -597,6 +597,38 @@ limitations under the License. destination: 'master', base: null, message: 'foo message', + allow_conflicts: false, + }, + ]); + }); + + test('cherry pick even with conflicts', () => { + element._handleCherrypickTap(); + const action = { + __key: 'cherrypick', + __type: 'revision', + __primary: false, + enabled: true, + label: 'Cherry pick', + method: 'POST', + title: 'Cherry pick change to a different branch', + }; + + element.$.confirmCherrypick.branch = 'master'; + + // Add attributes that are used to determine the message. + element.$.confirmCherrypick.commitMessage = 'foo message'; + element.$.confirmCherrypick.changeStatus = 'OPEN'; + element.$.confirmCherrypick.commitNum = '123'; + + element._handleCherrypickConflictConfirm(); + + assert.deepEqual(fireActionStub.lastCall.args, [ + '/cherrypick', action, true, { + destination: 'master', + base: null, + message: 'foo message', + allow_conflicts: true, }, ]); }); |