Merge pull request #2126 from dsander/fix-dry-run-modal

Fix dry-run modal when clicking on icon in 'Dry Run' button
This commit is contained in:
Akinori MUSHA 2017-09-16 23:11:09 +09:00 committed by GitHub
commit 985cc8e376
2 changed files with 7 additions and 1 deletions

View file

@ -220,7 +220,7 @@ class @AgentEditPage
invokeDryRun: (e) =>
e.preventDefault()
@updateFromEditors()
Utils.handleDryRunButton(e.target)
Utils.handleDryRunButton(e.currentTarget)
formatAgentForSelect = (agent) ->
originalOption = agent.element

View file

@ -23,6 +23,12 @@ describe "Dry running an Agent", js: true do
to_return(:status => 200, :body => File.read(Rails.root.join("spec/data_fixtures/xkcd.html")), :headers => {})
end
it 'opens the dry run modal even when clicking on the refresh icon' do
visit edit_agent_path(agent)
find('.agent-dry-run-button span.glyphicon').click
expect(page).to have_text('Event to send (Optional)')
end
it 'shows the dry run pop up without previous events and selects the events tab when a event was created' do
open_dry_run_modal(agent)
click_on("Dry Run")