Resolve "WebIDE asks for confirmation to leave the page when committing and creating a new MR"
What does this MR do?
Clear staged changes before redirection
Any local changes in WebIDE should be cleared before redirecting
to the new merge request page. Earlier, it was happening just after
redirection, which causes onbeforeunload
event to trigger and warns the
user that his unsaved changes will be lost, when in fact there are no
unsaved changes at this point.
The test for this case was falsely passing. I have modified it to ensure that it always fails in the absence of this change.
Screenshots
Before:
After:
The popup would not appear.
Does this MR meet the acceptance criteria?
Conformity
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Closes #30881 (closed)
Edited by Himanshu Kapoor