stable
Clone or download
part of story #29240 reply to pull request comment How to test: Create a pull request with the following situations and browse the files in the side-by-side mode: When a file has deleted lines at the very end, the placeholder should be on the previous group, not at line 0 on the right-hand side. When a file has its first line modified: - if the lines are equal, no placeholder is visible. - if the left side is shorter, there is a placeholder on the right-hand side. - if the right side is shorter, there is a placeholder on the left-hand side. No change expected for other cases: file added, file deleted. Notes: tests were asserting with toEqual(), but since all our (fake) line handles were empty objects, they were always equal to each other. Using toBe() checks the object reference and will be stricter. Change-Id: I0db13cbbf79112f2fe7c482dd11f88c5df018477
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-code-placeholder-builder.js | +2 | −26 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-code-placeholder-builder.test.js | +1 | −73 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-line-grouper.js | +4 | −6 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-line-mapper.js | +35 | −15 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-line-mapper.test.js | +120 | −74 | Go to diff View file |
M | plugins/pullrequest/scripts/pullrequests-app/src/app/file-diff/diff-modes/side-by-side-lines-state.js | +9 | −34 | Go to diff View file |