Commit graph

8 commits

Author SHA1 Message Date
Kerri Miller
bd624741a1 Remove 2nd stub expectation of #last_diff_file
It looks to be a stub/mock rather than strictly an expectation of the
system, so dropping this to only a single invocation expected, as we've
removed one of the two places #last_diff_file would be invoked.
2019-06-05 16:19:45 -07:00
Igor
c92db3db71 Fix removing empty lines via suggestions
Before this fix, a suggestion which just removes
an empty line wasn't appliable
2019-05-28 07:12:29 +00:00
Oswaldo Ferreira
e540c0d71e Fixed test specs
- added suggestions to mock data
- fixed props to be not required
2019-04-04 13:08:34 +00:00
Oswaldo Ferreira
03e0604d5d Prepare suggestion implementation for multi-line
Adds the groundwork needed in order to persist multi-line suggestions,
while providing the parsing strategy which will be reused for the
**Preview** as well.
2019-03-27 12:26:53 -03:00
Oswaldo Ferreira
e116fcab41 Always fetch MR latest version when creating suggestions
This is an issue that can only be seen through EE. Further
details can be seen on
https://gitlab.com/gitlab-org/gitlab-ee/issues/9876. In general
we should always use the latest diff version of a file in order
to both create and apply suggestions.
2019-02-26 17:19:17 -03:00
Oswaldo Ferreira
1b93b3b640 Adjusts suggestions unable to be applied
1. Presents the system error message when available,
when applying suggestions

2. Adjusts target branch updates affecting MRs pointing
to it when there are previously created suggestions in
the MR. We just need to compare the HEAD shas from
position and MR source branch.
2019-01-25 11:30:44 -02:00
Oswaldo Ferreira
6e29368118 Adjust applied suggestion reverting previous changes
1. Avoid suggestions being applied on the same file
from reverting previous changes
2. Gracefully use and handle file changes error
when updating the file (though, it does not totally
solves the sync problem for multiple suggestion
applications at once)
2019-01-11 21:35:07 -02:00
Oswaldo Ferreira
ed3034bbb7 Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00