diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-09-01 20:17:46 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-09-01 20:17:46 +0000 |
commit | b211887282409a7a5209514b388e3cc2e16f6ba0 (patch) | |
tree | c635d5a72d7edfb0ef121122b22ebc2fb810b41e /features | |
parent | 2c3586d299beb036bc689df3fe699e3085672df4 (diff) | |
parent | 28db37de70fa94b2e7d287c9cfa31946f037125a (diff) | |
download | gitlab-ce-b211887282409a7a5209514b388e3cc2e16f6ba0.tar.gz |
Merge branch '21508-inconsistency-personal-dashboard-todos-page-uses-old-interface-wrong-dropdown-filter-buttons' into 'master'
Update todo view filter dropdowns
## What does this MR do?
Swaps out old `select2` dropdowns on todo page with newer dropdowns.
Also removes todo inline JS.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## Screenshots (if relevant)
### Project
![2016-08-29_14.02.57](/uploads/73d610fd41d202540f3770afa7e5266f/2016-08-29_14.02.57.gif)
### Author
![2016-08-29_14.03.40](/uploads/8ce97b81c91db06111f6a930cd5fb293/2016-08-29_14.03.40.gif)
### Type
![2016-08-29_14.04.32](/uploads/1aa050a7822de1d99ee7fdc3bbc621a3/2016-08-29_14.04.32.gif)
### Action
![2016-08-29_14.05.23](/uploads/680d19c56723a222274c3677f941cfcd/2016-08-29_14.05.23.gif)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #21508
Related to #19866
See merge request !6072
Diffstat (limited to 'features')
-rw-r--r-- | features/dashboard/todos.feature | 20 | ||||
-rw-r--r-- | features/steps/dashboard/todos.rb | 23 |
2 files changed, 17 insertions, 26 deletions
diff --git a/features/dashboard/todos.feature b/features/dashboard/todos.feature index 42f5d6d2af7..0b23bbb7951 100644 --- a/features/dashboard/todos.feature +++ b/features/dashboard/todos.feature @@ -23,26 +23,6 @@ Feature: Dashboard Todos Then I should see all todos marked as done @javascript - Scenario: I filter by project - Given I filter by "Enterprise" - Then I should not see todos - - @javascript - Scenario: I filter by author - Given I filter by "John Doe" - Then I should not see todos related to "Mary Jane" in the list - - @javascript - Scenario: I filter by type - Given I filter by "Issue" - Then I should not see todos related to "Merge Requests" in the list - - @javascript - Scenario: I filter by action - Given I filter by "Mentioned" - Then I should not see todos related to "Assignments" in the list - - @javascript Scenario: I click on a todo row Given I click on the todo Then I should be directed to the corresponding page diff --git a/features/steps/dashboard/todos.rb b/features/steps/dashboard/todos.rb index 0607086c166..344b6fda9a6 100644 --- a/features/steps/dashboard/todos.rb +++ b/features/steps/dashboard/todos.rb @@ -3,7 +3,6 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps include SharedPaths include SharedProject include SharedUser - include Select2Helper step '"John Doe" is a developer of project "Shop"' do project.team << [john_doe, :developer] @@ -55,7 +54,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps expect(page).to have_content 'To do 0' expect(page).to have_content 'Done 4' expect(page).to have_content "You're all done!" - expect(page).not_to have_link project.name_with_namespace + expect('.prepend-top-default').not_to have_link project.name_with_namespace should_not_see_todo "John Doe assigned you merge request #{merge_request.to_reference}" should_not_see_todo "John Doe mentioned you on issue #{issue.to_reference}" should_not_see_todo "John Doe assigned you issue #{issue.to_reference}" @@ -80,19 +79,31 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps end step 'I filter by "Enterprise"' do - select2(enterprise.id, from: "#project_id") + click_button 'Project' + page.within '.dropdown-menu-project' do + click_link enterprise.name_with_namespace + end end step 'I filter by "John Doe"' do - select2(john_doe.id, from: "#author_id") + click_button 'Author' + page.within '.dropdown-menu-author' do + click_link john_doe.username + end end step 'I filter by "Issue"' do - select2('Issue', from: "#type") + click_button 'Type' + page.within '.dropdown-menu-type' do + click_link 'Issue' + end end step 'I filter by "Mentioned"' do - select2("#{Todo::MENTIONED}", from: '#action_id') + click_button 'Action' + page.within '.dropdown-menu-action' do + click_link 'Mentioned' + end end step 'I should not see todos' do |