mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-21 07:46:06 +08:00
fix(compose): Enable esc-to-cancel from Cannot Send dialog (Fixes #1383)
This commit is contained in:
parent
f1cd1056cc
commit
9f8f1750cc
|
@ -686,7 +686,7 @@ class ComposerView extends React.Component
|
||||||
if dealbreaker
|
if dealbreaker
|
||||||
dialog.showMessageBox(remote.getCurrentWindow(), {
|
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
buttons: ['Edit Message'],
|
buttons: ['Edit Message', 'Cancel'],
|
||||||
message: 'Cannot Send',
|
message: 'Cannot Send',
|
||||||
detail: dealbreaker
|
detail: dealbreaker
|
||||||
})
|
})
|
||||||
|
|
|
@ -425,7 +425,7 @@ describe "ComposerView", ->
|
||||||
expect(@dialog.showMessageBox).toHaveBeenCalled()
|
expect(@dialog.showMessageBox).toHaveBeenCalled()
|
||||||
dialogArgs = @dialog.showMessageBox.mostRecentCall.args[1]
|
dialogArgs = @dialog.showMessageBox.mostRecentCall.args[1]
|
||||||
expect(dialogArgs.detail).toEqual("You need to provide one or more recipients before sending the message.")
|
expect(dialogArgs.detail).toEqual("You need to provide one or more recipients before sending the message.")
|
||||||
expect(dialogArgs.buttons).toEqual ['Edit Message']
|
expect(dialogArgs.buttons).toEqual ['Edit Message', 'Cancel']
|
||||||
|
|
||||||
it "shows an error if a recipient is invalid", ->
|
it "shows an error if a recipient is invalid", ->
|
||||||
useDraft.call @,
|
useDraft.call @,
|
||||||
|
@ -437,7 +437,7 @@ describe "ComposerView", ->
|
||||||
expect(@dialog.showMessageBox).toHaveBeenCalled()
|
expect(@dialog.showMessageBox).toHaveBeenCalled()
|
||||||
dialogArgs = @dialog.showMessageBox.mostRecentCall.args[1]
|
dialogArgs = @dialog.showMessageBox.mostRecentCall.args[1]
|
||||||
expect(dialogArgs.detail).toEqual("lol is not a valid email address - please remove or edit it before sending.")
|
expect(dialogArgs.detail).toEqual("lol is not a valid email address - please remove or edit it before sending.")
|
||||||
expect(dialogArgs.buttons).toEqual ['Edit Message']
|
expect(dialogArgs.buttons).toEqual ['Edit Message', 'Cancel']
|
||||||
|
|
||||||
describe "empty body warning", ->
|
describe "empty body warning", ->
|
||||||
it "warns if the body of the email is still the pristine body", ->
|
it "warns if the body of the email is still the pristine body", ->
|
||||||
|
@ -751,4 +751,3 @@ describe "ComposerView", ->
|
||||||
Actions.sendDraft(DRAFT_CLIENT_ID)
|
Actions.sendDraft(DRAFT_CLIENT_ID)
|
||||||
secondStatus = @composer._isValidDraft()
|
secondStatus = @composer._isValidDraft()
|
||||||
expect(secondStatus).toBe false
|
expect(secondStatus).toBe false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue