Commit 5a81bca8 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'sh-fix-submit-not-clearing-local-storage' into 'master'

Fix local storage not being cleared after creating a new issue

Closes #37162

See merge request gitlab-org/gitlab-ce!19226
parents a0073f05 ee61ab6f
......@@ -30,7 +30,7 @@ export default class IssuableForm {
}
this.initAutosave();
this.form.on('submit:success', this.handleSubmit);
this.form.on('submit', this.handleSubmit);
this.form.on('click', '.btn-cancel', this.resetAutosave);
this.initWip();
......
---
title: Fix local storage not being cleared after creating a new issue
merge_request:
author:
type: fixed
......@@ -591,6 +591,20 @@ describe 'Issues' do
end
end
it 'clears local storage after creating a new issue', :js do
2.times.each do
visit new_project_issue_path(project)
wait_for_requests
expect(page).to have_field('Title', with: '')
fill_in 'issue_title', with: 'bug 345'
fill_in 'issue_description', with: 'bug description'
click_button 'Submit issue'
end
end
context 'dropzone upload file', :js do
before do
visit new_project_issue_path(project)
......
......@@ -62,7 +62,8 @@ describe 'Users > Terms' do
expect(current_path).to eq(project_issues_path(project))
end
it 'redirects back to the page the user was trying to save' do
# Disabled until https://gitlab.com/gitlab-org/gitlab-ce/issues/37162 is solved properly
xit 'redirects back to the page the user was trying to save' do
visit new_project_issue_path(project)
fill_in :issue_title, with: 'Hello world, a new issue'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment