diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-09-20 14:53:39 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-09-20 14:53:39 +0300 |
commit | ab3efb6664c17f1367772da3bbdc8648535adf63 (patch) | |
tree | 5c1987d31b6f0852567ad955638d6775dde105de /spec | |
parent | 74725da142986a5fe55ae59ee202af3bcd56f79a (diff) | |
parent | 2872c75266a2cffbde77a0b8a14e22effedd00ce (diff) |
Merge branch 'merge-request-push-compare-ui' into 'master'
Frontend for Merge Request Diff
This merge request improves the UX for the merge request diff feature which was recently implemented here (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6127). Specifically, it styles various parts of the diff feature to match the designs, it disables comment-related buttons in states where comments are disabled, and it adds a 'Show latest version' button for convenience.
## Are there points in the code the reviewer needs to double check?
I could use feedback on this MR's fidelity to the design.
## Why was this MR needed?
Neccessary styling improvements for basic UX of this feature, and enabled comment buttons are not functional and thus need to be disabled in certain states.
## Screenshots (if relevant)
![57dd0755f0b14342305909](/uploads/318a44a3bc8b7fc5c9c6ef92ba92e511/57dd0755f0b14342305909.gif)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/21427
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6127
cc: @jschatz1
See merge request !6343
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/merge_requests/merge_request_versions_spec.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/features/merge_requests/merge_request_versions_spec.rb b/spec/features/merge_requests/merge_request_versions_spec.rb index 9e759de3752..22d9e42119d 100644 --- a/spec/features/merge_requests/merge_request_versions_spec.rb +++ b/spec/features/merge_requests/merge_request_versions_spec.rb @@ -21,7 +21,7 @@ feature 'Merge Request versions', js: true, feature: true do describe 'switch between versions' do before do page.within '.mr-version-dropdown' do - find('.btn-link').click + find('.btn-default').click click_link 'version 1' end end @@ -42,12 +42,12 @@ feature 'Merge Request versions', js: true, feature: true do describe 'compare with older version' do before do page.within '.mr-version-compare-dropdown' do - find('.btn-link').click + find('.btn-default').click click_link 'version 1' end end - it 'should has correct value in the compare dropdown' do + it 'should have correct value in the compare dropdown' do page.within '.mr-version-compare-dropdown' do expect(page).to have_content 'version 1' end @@ -64,5 +64,13 @@ feature 'Merge Request versions', js: true, feature: true do it 'show diff between new and old version' do expect(page).to have_content '4 changed files with 15 additions and 6 deletions' end + + it 'should return to latest version when "Show latest version" button is clicked' do + click_link 'Show latest version' + page.within '.mr-version-dropdown' do + expect(page).to have_content 'latest version' + end + expect(page).to have_content '8 changed files' + end end end |