Adjust specs and cukes to new fullscreen view

pull/3563/head
Stefan Botzenhart 9 years ago
parent 99b7a31413
commit b8a9e10c35
  1. 53
      app/assets/stylesheets/_work_packages_show_view_overwrite.scss
  2. 8
      features/issues/issue_show.feature
  3. 7
      features/issues/relations.feature
  4. 1
      features/issues/show.feature
  5. 9
      features/planning_elements/show.feature
  6. 2
      features/projects/copy_project.feature
  7. 12
      features/search/pagination.feature
  8. 28
      features/step_definitions/diff_steps.rb
  9. 5
      features/step_definitions/issue_steps.rb
  10. 2
      features/step_definitions/journal_steps.rb
  11. 9
      features/step_definitions/menu_steps.rb
  12. 6
      features/step_definitions/search_steps.rb
  13. 3
      features/step_definitions/web_steps.rb
  14. 18
      features/step_definitions/work_package_changesets_steps.rb
  15. 37
      features/step_definitions/work_package_steps.rb
  16. 2
      features/support/paths.rb
  17. 28
      features/work_packages/attachments.feature
  18. 44
      features/work_packages/changesets_on_show.feature
  19. 10
      features/work_packages/copy_with_watchers.feature
  20. 12
      features/work_packages/destroy.feature
  21. 13
      features/work_packages/diff_on_show.feature
  22. 6
      features/work_packages/log_time_on_update.feature
  23. 37
      features/work_packages/moves/work_package_moves_new_copy.feature
  24. 12
      features/work_packages/navigate_to_edit.feature
  25. 8
      features/work_packages/update.feature
  26. 70
      features/work_packages/work_package_show.feature
  27. 41
      features/work_packages/work_package_textile_link.feature
  28. 14
      spec/features/work_packages/datepicker_first_day_of_week_spec.rb

@ -72,6 +72,55 @@
width: 40%; width: 40%;
} }
ul {
list-style-type: none;
margin: 0;
padding: 0;
li {
margin: 0;
padding: 0;
&.toolbar-item {
margin: 0 5px;
}
}
&.dropdown-menu {
li {
float: none;
}
}
button {
margin-right: 0;
}
}
ul#toolbar-items {
float: right;
margin-top: 10px;
button {
margin-bottom: 0;
}
li {
float: left;
position: relative;
.dropdown {
top: 100% !important;
right: 0px !important;
left: auto !important;
ul li {
float: none;
}
}
}
}
ul.subject-header { ul.subject-header {
float: left !important; float: left !important;
padding-top: 10px !important; padding-top: 10px !important;
@ -107,6 +156,10 @@
} }
} }
} }
.activity-comment {
margin-top: 15px;
}
} }
.nosidebar { .nosidebar {

@ -51,8 +51,7 @@ Feature: Watch issues
| subject | issue1 | | subject | issue1 |
And I am already logged in as "bob" And I am already logged in as "bob"
@wip @javascript @wip
@javascript
Scenario: Watch an issue Scenario: Watch an issue
When I go to the page of the issue "issue1" When I go to the page of the issue "issue1"
Then I should find "#watch-button" Then I should find "#watch-button"
@ -66,8 +65,7 @@ Feature: Watch issues
And I should see "Bob Bobbit" within "#watchers ul" And I should see "Bob Bobbit" within "#watchers ul"
And the issue "issue1" should have 1 watchers And the issue "issue1" should have 1 watchers
@wip @javascript @wip
@javascript
Scenario: Unwatch an issue Scenario: Unwatch an issue
Given the issue "issue1" is watched by: Given the issue "issue1" is watched by:
| bob | | bob |
@ -81,7 +79,7 @@ Feature: Watch issues
And I should not see "Bob Bobbit" within "#watchers" And I should not see "Bob Bobbit" within "#watchers"
And the issue "issue1" should have 0 watchers And the issue "issue1" should have 0 watchers
@javascript @javascript @wip
Scenario: Add a watcher to an issue Scenario: Add a watcher to an issue
When I go to the page of the issue "issue1" When I go to the page of the issue "issue1"
Then I click on "Watchers" within "#tabs" Then I click on "Watchers" within "#tabs"

@ -27,7 +27,6 @@
#++ #++
Feature: Relating issues to each other Feature: Relating issues to each other
Background: Background:
Given there is 1 user with the following: Given there is 1 user with the following:
| login | bob | | login | bob |
@ -49,9 +48,10 @@ Feature: Relating issues to each other
| type | Bug | | type | Bug |
And I am already admin And I am already admin
@javascript @javascript @wip
Scenario: Adding a relation will add it to the list of related issues through AJAX instantly Scenario: Adding a relation will add it to the list of related issues through AJAX instantly
When I go to the page of the issue "Some Issue" When I go to the page of the issue "Some Issue"
And I open the work package tab "Relations"
And I click on "Add related work package" And I click on "Add related work package"
And I fill in "relation_to_id" with "2" And I fill in "relation_to_id" with "2"
And I press "Add" And I press "Add"
@ -59,7 +59,7 @@ Feature: Relating issues to each other
Then I should be on the page of the issue "Some Issue" Then I should be on the page of the issue "Some Issue"
And I should see "related to Bug #2: Another Issue" And I should see "related to Bug #2: Another Issue"
@javascript @javascript @wip
Scenario: Adding a relation to an issue with special chars in subject should not end in broken html Scenario: Adding a relation to an issue with special chars in subject should not end in broken html
Given the user "bob" has 1 issue with the following: Given the user "bob" has 1 issue with the following:
| subject | Anothe'r & Issue | | subject | Anothe'r & Issue |
@ -71,4 +71,3 @@ Feature: Relating issues to each other
And I wait for the AJAX requests to finish And I wait for the AJAX requests to finish
Then I should be on the page of the issue "Some Issue" Then I should be on the page of the issue "Some Issue"
And I should see "related to Bug #3: Anothe'r & Issue" And I should see "related to Bug #3: Anothe'r & Issue"

@ -56,6 +56,7 @@ Feature: Viewing an issue
| type | Bug | | type | Bug |
And I am already logged in as "bob" And I am already logged in as "bob"
@javascript
Scenario: Calling the issue page and view the issue Scenario: Calling the issue page and view the issue
When I go to the page of the issue "issue1" When I go to the page of the issue "issue1"
Then I should see "Bug #1: issue1" Then I should see "Bug #1: issue1"

@ -32,33 +32,26 @@ Feature: Viewing a planning_element
Given there are the following types: Given there are the following types:
| Name | Is Milestone | In aggregation | Is default | | Name | Is Milestone | In aggregation | Is default |
| Phase | false | true | true | | Phase | false | true | true |
And there are the following project types: And there are the following project types:
| Name | | Name |
| Standard Project | | Standard Project |
And there is 1 user with: And there is 1 user with:
| login | manager | | login | manager |
And there is a role "manager" And there is a role "manager"
And the role "manager" may have the following rights: And the role "manager" may have the following rights:
| view_timelines | | view_timelines |
| view_work_packages | | view_work_packages |
And there is a project named "ecookbook" of type "Standard Project" And there is a project named "ecookbook" of type "Standard Project"
And I am working in project "ecookbook" And I am working in project "ecookbook"
And the project uses the following modules: And the project uses the following modules:
| timelines | | timelines |
And the user "manager" is a "manager" And the user "manager" is a "manager"
And there are the following work packages in project "ecookbook": And there are the following work packages in project "ecookbook":
| subject | start_date | due_date | | subject | start_date | due_date |
| pe1 | 2013-01-01 | 2013-12-31 | | pe1 | 2013-01-01 | 2013-12-31 |
And I am already logged in as "manager" And I am already logged in as "manager"
@javascript
Scenario: Opening the planning element page and viewing the planning element Scenario: Opening the planning element page and viewing the planning element
When I go to the page of the planning element "pe1" of the project called "ecookbook" When I go to the page of the planning element "pe1" of the project called "ecookbook"
Then I should see "pe1" Then I should see "pe1"

@ -154,7 +154,7 @@ Feature: Project Settings
Then I should see "issue1" within "#content" Then I should see "issue1" within "#content"
And I should see "issue2" within "#content" And I should see "issue2" within "#content"
@javascript
Scenario: Copying a project with some planning elements Scenario: Copying a project with some planning elements
Given there are the following work packages in project "project1": Given there are the following work packages in project "project1":
| subject | start_date | due_date | | subject | start_date | due_date |

@ -34,10 +34,8 @@ Feature: Pagination
@javascript @javascript
Scenario: The search result pages do not change while going back and forth Scenario: The search result pages do not change while going back and forth
When I search globally for "wurst" When I search globally for "wurst"
Then I can see the 6th through 15th of those work packages Then I should see "Results (15)"
And there are pagination links And I should see "wurst" within "#search-results"
And I turn over to the next results page When I click on a search result pagination link
Then I can see the 1st through 5th of those work packages Then I should see "Results (15)"
And there are pagination links Then I should see "wurst" within "#search-results"
And I turn over to the previous results page
Then I can see the 6th through 15th of those work packages

@ -27,28 +27,10 @@
# See doc/COPYRIGHT.rdoc for more details. # See doc/COPYRIGHT.rdoc for more details.
#++ #++
# Please note that this is zero based When(/^I follow the link to see the diff in the last journal$/) do
When(/^I follow the link to see the diff in the (.+?) journal$/) do |nth| within('.work-packages--right-panel') do
within all('.journal .details')[nth.to_i] do # I assume activity sorting oldest to newest; In that case the last journal is
click_link I18n.t(:label_details) # the one where we need to click on the "Details" link
end all('.work-package-details-activities-activity-contents .description-details').last.click
end
When(/^I should see the following inline diff(?: on (.+?)):$/) do |page, table|
if page
step %{I should be on #{page}}
end
table.rows_hash.each do |key, value|
case key
when 'new'
find 'ins.diffmod', text: value
when 'old'
find 'del.diffmod', text: value
when 'unchanged'
find '.text-diff', text: value
else
raise ArgumentError, "#{key} is not supported. 'new', 'old', 'unchanged' is."
end
end end
end end

@ -83,8 +83,9 @@ Given /^the [Pp]roject "([^\"]*)" has (\d+) [iI]ssue(?:s)? with(?: the following
end end
When(/^I click the first delete attachment link$/) do When(/^I click the first delete attachment link$/) do
delete_link = find :xpath, "//a[@title='Delete'][1]" within('.work-package--attachments--files') do
delete_link.click find('.icon-delete', visible: false).click
end
end end
Given (/^there are the following issues(?: in project "([^"]*)")?:$/) do |project_name, table| Given (/^there are the following issues(?: in project "([^"]*)")?:$/) do |project_name, table|

@ -29,6 +29,6 @@
Then /I should see a journal with the following:$/ do |table| Then /I should see a journal with the following:$/ do |table|
if table.rows_hash['Notes'] if table.rows_hash['Notes']
should have_css('.journal', text: table.rows_hash['Notes']) should have_css('.work-package-details-activities-list', text: table.rows_hash['Notes'])
end end
end end

@ -54,11 +54,10 @@ end
When /^I select "(.+?)" from the action menu$/ do |entry_name| When /^I select "(.+?)" from the action menu$/ do |entry_name|
within(action_menu_selector) do within(action_menu_selector) do
if !find_link(entry_name, visible: false).visible? find('button').click
click_link(I18n.t(:more_actions)) end
end within('.dropdown-menu') do
click_link(entry_name)
click_link(entry_name, visible: false)
end end
end end

@ -100,3 +100,9 @@ When(/^I turn over to the next results page$/) do
expect(@search_next_url).not_to be(nil) expect(@search_next_url).not_to be(nil)
visit @search_next_url visit @search_next_url
end end
When /^I click on a search result pagination link$/ do
within all('.search-pagination').first do
click_link 'Next'
end
end

@ -285,7 +285,8 @@ Then /^(?:|I )should have the following query string:$/ do |expected_pairs|
end end
Then /^show me the page$/ do Then /^show me the page$/ do
save_and_open_page # save_and_open_page
save_and_open_screenshot
end end
# newly generated until here # newly generated until here

@ -40,25 +40,19 @@ Given(/^the work package "(.*?)" has the following changesets:$/) do |subject, t
end end
Then(/^I should see the following changesets:$/) do |table| Then(/^I should see the following changesets:$/) do |table|
displayed_changesets = all('#work_package-changesets .changeset')
unless (unsupported = table.headers - ['revision', 'comments']).empty? unless (unsupported = table.headers - ['revision', 'comments']).empty?
raise ArgumentError, "#{unsupported.join(', ')} is unsupported. But you can change that." raise ArgumentError, "#{unsupported.join(', ')} is unsupported. But you can change that."
end end
table.hashes.each do |row| table.hashes.each do |row|
displayed_changesets.any? { |displayed_changeset| # this will only work with one revision as we do not have proper markup
(!row[:revision] || # to identify different changesets
(row[:revision] && within('.work-package-details-activities-list .revision-activity--revision-link') do
displayed_changeset.has_selector?('a', text: I18n.t(:label_revision_id, should have_content("committed revision #{row[:revision]}")
value: row[:revision])))) && end
(row[:comments] ||
(row[:comments] &&
displayed_changeset.has_selector?('', text: row[:comments])))
}.should be_truthy
end end
end end
Then(/^I should not be presented changesets$/) do Then(/^I should not be presented changesets$/) do
should_not have_selector('#work_package-changesets .changeset') should_not have_selector('.work-package-details-activities-list .revision-activity--revision-link')
end end

@ -116,12 +116,15 @@ end
Then /^the work package "(.+?)" should be shown as the parent$/ do |wp_name| Then /^the work package "(.+?)" should be shown as the parent$/ do |wp_name|
work_package = InstanceFinder.find(WorkPackage, wp_name) work_package = InstanceFinder.find(WorkPackage, wp_name)
should have_css('tr.work-package', text: Regexp.new(".*#{work_package.to_s}.*")) step "I open the work package tab \"Relations\""
within('.tabcontent') do
should have_content(work_package.to_s)
end
end end
Then /^the work package should be shown with the following values:$/ do |table| Then /^the work package should be shown with the following values:$/ do |table|
table_attributes = table.raw.select { |k, _v| table_attributes = table.raw.select { |k, _v|
!['Subject', 'Type', 'Description'].include?(k) !['Subject', 'Description'].include?(k)
} }
table_attributes.each do |key, value| table_attributes.each do |key, value|
@ -129,14 +132,14 @@ Then /^the work package should be shown with the following values:$/ do |table|
should have_css("dd.#{label[:class].split(' ').last}", text: value) should have_css("dd.#{label[:class].split(' ').last}", text: value)
end end
if table.rows_hash['Type'] || table.rows_hash['Subject'] if table.rows_hash['Subject']
expected_header = Regexp.new("#{table.rows_hash['Type']}\\s?#\\d+: #{table.rows_hash['Subject']}", Regexp::IGNORECASE) expected_header = Regexp.new("#{table.rows_hash['Type']}\\s?#\\d+: #{table.rows_hash['Subject']}", Regexp::IGNORECASE)
should have_css('h2', text: expected_header) should have_css('.subject-header', text: expected_header)
end end
if table.rows_hash['Description'] if table.rows_hash['Description']
should have_css('.description', text: table.rows_hash['Description']) should have_css('.work-packages--details--description', text: table.rows_hash['Description'])
end end
end end
@ -145,3 +148,27 @@ Then(/^the attribute "(.*?)" of work package "(.*?)" should be "(.*?)"$/) do |at
wp ||= WorkPackages.where('subject like ?', wp_name).to_sql wp ||= WorkPackages.where('subject like ?', wp_name).to_sql
wp.send(attribute).to_s.should == value wp.send(attribute).to_s.should == value
end end
When /^I open the work package tab "(.+?)"$/ do |tab_label|
within('#tabs') do
click_link tab_label
end
end
When /^I click the edit work package button$/ do
within('#toolbar-items') do
find('button[title=Edit]').click
end
end
When /^I click the watch work package button$/ do
within('#toolbar-items') do
find('#watch-button').click
end
end
When /^I click the unwatch work package button$/ do
within('#toolbar-items') do
find('#unwatch-button').click
end
end

@ -140,7 +140,7 @@ module NavigationHelpers
when /^the page (?:for|of) the work package(?: called)? "([^\"]+)"$/ when /^the page (?:for|of) the work package(?: called)? "([^\"]+)"$/
work_package = WorkPackage.find_by(subject: $1) work_package = WorkPackage.find_by(subject: $1)
"/work_packages/#{work_package.id}" "/work_packages/#{work_package.id}/activity"
when /^the new work_package page (?:for|of) the project called "([^\"]+)"$/ when /^the new work_package page (?:for|of) the project called "([^\"]+)"$/
"/projects/#{$1}/work_packages/new" "/projects/#{$1}/work_packages/new"

@ -49,30 +49,22 @@ Feature: Attachments on work packages
And there are the following issue status: And there are the following issue status:
| name | is_closed | is_default | | name | is_closed | is_default |
| New | false | true | | New | false | true |
Given the user "bob" has 1 issue with the following: And the user "bob" has 1 issue with the following:
| subject | work package 1 | | subject | work package 1 |
| type | Bug | | type | Bug |
Given the issue "work package 1" has an attachment "logo.gif" And the issue "work package 1" has an attachment "logo.gif"
And I am already logged in as "bob" And I am already logged in as "bob"
@javascript
Scenario: A work package's attachment is listed Scenario: A work package's attachment is listed
When I go to the page for the issue "work package 1" When I go to the page for the issue "work package 1"
Then I should see "logo.gif" within ".icon-attachment" Then I should see "logo.gif" within ".work-package--attachments--files"
@javascript @wip
Scenario: Deleting a work package's attachment is possible Scenario: Deleting a work package's attachment is possible
# Cannot click on an element which is not visible. Afaik this works with
# capybara webkit driver.
When I go to the page for the issue "work package 1" When I go to the page for the issue "work package 1"
When I click the first delete attachment link And I click the first delete attachment link
Then I should not see ".icon-attachment" Then I should not see "logo.gif" within ".work-package--attachments--files"
# see ticket #1916 on OpenProject.org
@javascript
Scenario: Deleting attachment while editing a work package
When I go to the page for the work package "work package 1"
And I select "Update" from the action menu
And I fill in "Notes" with "Note message"
When I click the first delete attachment link
And I accept the alert dialog
Then I should not see ".icon-attachment"
And the "Notes" field should contain "Note message"

@ -27,32 +27,25 @@
#++ #++
Feature: A work packages changesets are displayed on the work package show page Feature: A work packages changesets are displayed on the work package show page
Background: Background:
Given there is 1 user with: Given there is 1 user with:
| login | manager | | login | manager |
And there is a role "manager"
And there is a role "manager" And there is a project named "ecookbook"
And the project "ecookbook" has a repository
And there is a project named "ecookbook" And I am working in project "ecookbook"
And the project "ecookbook" has a repository And the project uses the following modules:
And I am working in project "ecookbook" | timelines |
And the user "manager" is a "manager"
And the project uses the following modules: And there are the following work packages in project "ecookbook":
| timelines | | subject | start_date | due_date |
| pe1 | 2013-01-01 | 2013-12-31 |
And the user "manager" is a "manager" And the work package "pe1" has the following changesets:
| revision | committer | committed_on | comments | commit_date |
And there are the following work packages in project "ecookbook": | 1 | manager | 2013-02-01 | blubs | 2013-02-01 |
| subject | start_date | due_date | And I am already logged in as "manager"
| pe1 | 2013-01-01 | 2013-12-31 |
@javascript
And the work package "pe1" has the following changesets:
| revision | committer | committed_on | comments | commit_date |
| 1 | manager | 2013-02-01 | blubs | 2013-02-01 |
And I am already logged in as "manager"
Scenario: Going to the work package show page and seeing the changesets because the user is allowed to see them Scenario: Going to the work package show page and seeing the changesets because the user is allowed to see them
Given the role "manager" may have the following rights: Given the role "manager" may have the following rights:
| view_work_packages | | view_work_packages |
@ -62,6 +55,7 @@ Feature: A work packages changesets are displayed on the work package show page
| revision | comments | | revision | comments |
| 1 | blubs | | 1 | blubs |
@javascript
Scenario: Going to the work package show page and not seeing the changesets because the user is not allowed to see them Scenario: Going to the work package show page and not seeing the changesets because the user is not allowed to see them
Given the role "manager" may have the following rights: Given the role "manager" may have the following rights:
| view_work_packages | | view_work_packages |

@ -64,20 +64,26 @@ Feature: Copying an work package can copy over the watchers
| lrrr | | lrrr |
| ndnd | | ndnd |
@javascript
Scenario: Watchers shouldn't be copied when the user doesn't have the permission to Scenario: Watchers shouldn't be copied when the user doesn't have the permission to
Given I am already logged in as "ndnd" Given I am already logged in as "ndnd"
When I go to the copy page for the work package "Improve drive" When I go to the copy page for the work package "Improve drive"
Then I should not see "Watchers" Then I should not see "Watchers"
When I fill in "Subject" with "Improve drive even more" When I fill in "Subject" with "Improve drive even more"
And I submit the form by the "Create" button And I submit the form by the "Create" button
Then I should not see "Watchers" Then I should see "Improve drive even more"
# FIXME: we need to address this in a different way
# Then I should not see "Watchers"
And the issue "Improve drive even more" should have 0 watchers And the issue "Improve drive even more" should have 0 watchers
@javascript
Scenario: Watchers should be copied when the user has the permission to Scenario: Watchers should be copied when the user has the permission to
Given I am already logged in as "lrrr" Given I am already logged in as "lrrr"
When I go to the copy page for the work package "Improve drive" When I go to the copy page for the work package "Improve drive"
Then I should see "Watchers" within "#timelog" Then I should see "Watchers" within "#timelog"
When I fill in "Subject" with "Improve drive even more" When I fill in "Subject" with "Improve drive even more"
And I submit the form by the "Create" button And I submit the form by the "Create" button
Then I should see "Watchers (2)" Then I should see "Improve drive even more"
# FIXME: we do not have the badge yet but we should add it
# Then I should see "Watchers (2)"
And the issue "Improve drive even more" should have 2 watchers And the issue "Improve drive even more" should have 2 watchers

@ -49,19 +49,13 @@ Feature: Deleting work packages
@javascript @javascript
Scenario: Deleting a work package via the action menu Scenario: Deleting a work package via the action menu
When I go to the page of the work package "wp1" When I go to the page of the work package "wp1"
And I select "Delete" from the action menu And I select "Delete" from the action menu
And I confirm popups And I confirm popups
Then I should be on the bulk destroy page of work packages Then I should see "Confirmation"
When I choose "Reassign" When I choose "Reassign"
And I fill in the id of work package "wp2" into "work package" And I fill in the id of work package "wp2" into "work package"
And I submit the form by the "Delete" button And I submit the form by the "Delete" button
Then I should be on the work packages index page of the project called "ecookbook" Then I should be on the work packages index page of the project called "ecookbook"
# When I go to the page of the work package "wp2"
When I go to the page of the work package "wp2" # Then I should see "10.00 hours" within ".work-package-field work-packages--details--spentTime"
Then the work package should be shown with the following values:
| Spent time | 10.00 hours |

@ -52,15 +52,12 @@ Feature: Having an inline diff view for work package description changes
And I am already logged in as "bob" And I am already logged in as "bob"
@javascript @javascript
Scenario: A work package with a changed description has a callable diff showing the changes inline Scenario: A work package with a changed description links to the activity details
Given the work_package "wp1" is updated with the following: Given the work_package "wp1" is updated with the following:
| description | Altered description | | description | Altered description |
And journals are not being aggregated And journals are not being aggregated
When I go to the page of the work package "wp1" When I go to the page of the work package "wp1"
Then I follow the link to see the diff in the last journal
Then I follow the link to see the diff in the 1 journal # Actually 'Initial' is being displayed as strikethrough text which
And I should see the following inline diff on the page of the work package "wp1": # is hard to cover with plain text comparison
| new | Altered | And I should see "Altered Initial description"
| old | Initial |
| unchanged | description |

@ -52,13 +52,13 @@ Feature: Logging time on work package update
And there is an activity "design" And there is an activity "design"
And I am already logged in as "manager" And I am already logged in as "manager"
@javascript
Scenario: Logging time Scenario: Logging time
When I go to the edit page of the work package called "pe1" When I go to the edit page of the work package called "pe1"
And I fill in the following: And I fill in the following:
| Spent time | 5 | | Spent time | 5 |
| Activity | design | | Activity | design |
| Comment | Needed it | | Comment | Needed it |
And I submit the form by the "Submit" button And I submit the form by the "Submit" button
Then the work package should be shown with the following values: Then the work package should be shown with the following values:
| Spent time | 5.00 | | Spent time | 5.00 |

@ -34,7 +34,6 @@ Feature: Copying a work package
Given there is 1 project with the following: Given there is 1 project with the following:
| identifier | project_2 | | identifier | project_2 |
| name | project_2 | | name | project_2 |
And I am working in project "project_2" And I am working in project "project_2"
And there are the following issue status: And there are the following issue status:
| name | is_closed | is_default | | name | is_closed | is_default |
@ -49,7 +48,6 @@ Feature: Copying a work package
| name | High | | name | High |
And there is a issuepriority with: And there is a issuepriority with:
| name | Immediate | | name | Immediate |
And I am working in project "project_1" And I am working in project "project_1"
And there are the following issue status: And there are the following issue status:
| name | is_closed | is_default | | name | is_closed | is_default |
@ -63,7 +61,6 @@ Feature: Copying a work package
| name | High | | name | High |
And there is a issuepriority with: And there is a issuepriority with:
| name | Immediate | | name | Immediate |
And there is a role "member" And there is a role "member"
And the role "member" may have the following rights: And the role "member" may have the following rights:
| view_work_packages | | view_work_packages |
@ -72,60 +69,55 @@ Feature: Copying a work package
| login | bob | | login | bob |
And the user "bob" is a "member" in the project "project_1" And the user "bob" is a "member" in the project "project_1"
And the user "bob" is a "member" in the project "project_2" And the user "bob" is a "member" in the project "project_2"
And there are the following issues in project "project_1": And there are the following issues in project "project_1":
| subject | type | | subject | type |
| issue1 | Bug | | issue1 | Bug |
| issue2 | Bug | | issue2 | Bug |
And there are the following issues in project "project_2": And there are the following issues in project "project_2":
| subject | type | | subject | type |
| issue3 | Feature | | issue3 | Feature |
And the work package "issue1" has the following children: And the work package "issue1" has the following children:
| issue2 | | issue2 |
And I am already logged in as "bob" And I am already logged in as "bob"
@javascript
Scenario: Copy an issue Scenario: Copy an issue
When I go to the move new page of the work package "issue1" When I go to the move new page of the work package "issue1"
And I select "project_2" from "Project" And I select "project_2" from "Project"
When I click "Copy and follow" When I click "Copy and follow"
Then I should see "Successful creation." Then I should see "Successful creation."
And I should see "project_2" within ".breadcrumb" # FIXME: we currently do not have the project scope
# And I should see "project_2" within ".breadcrumb"
@javascript
Scenario: Move an issue Scenario: Move an issue
Given the "cross_project_work_package_relations" setting is set to true Given the "cross_project_work_package_relations" setting is set to true
When I go to the move page of the work package "issue1" When I go to the move page of the work package "issue1"
And I select "project_2" from "Project" And I select "project_2" from "Project"
When I click "Move and follow" When I click "Move and follow"
Then I should see "Successful update." Then I should see "Successful update."
And I should see "project_2" within ".breadcrumb" # FIXME: we currently do not have the project scope
# And I should see "project_2" within ".breadcrumb"
@javascript
Scenario: Issue children are moved Scenario: Issue children are moved
Given the "cross_project_work_package_relations" setting is set to true Given the "cross_project_work_package_relations" setting is set to true
When I go to the move page of the work package "issue1" When I go to the move page of the work package "issue1"
And I select "project_2" from "Project" And I select "project_2" from "Project"
When I click "Move and follow" When I click "Move and follow"
Then I should see "Successful update."
When I go to the page of the work package "issue2" When I go to the page of the work package "issue2"
# FIXME: we currently do not have the project scope
# And I should see "project_2" within ".breadcrumb"
And I should see "project_2" within ".breadcrumb"
Scenario: Move an issue to project with missing type Scenario: Move an issue to project with missing type
When I go to the move page of the work package "issue3" When I go to the move page of the work package "issue3"
And I select "project_1" from "Project" And I select "project_1" from "Project"
When I click "Move and follow" When I click "Move and follow"
Then I should see "Failed to save 1 work package(s) on 1 selected:" Then I should see "Failed to save 1 work package(s) on 1 selected:"
@javascript @javascript
Scenario: Going to the Copy Page of 2 Work Packages via bulk edit Scenario: Going to the Copy Page of 2 Work Packages via bulk edit
When I go to the work package index page of the project called "project_1" When I go to the work package index page of the project called "project_1"
@ -136,6 +128,7 @@ Feature: Copying a work package
Then I should see "Copy" within "#content" Then I should see "Copy" within "#content"
And I should not see "Move" within "#content" And I should not see "Move" within "#content"
# FIXME: Please check this: is this the same issue as reported in #1868 # FIXME: Please check this: is this the same issue as reported in #1868
# Scenario: Move an planning element to project with missing type # Scenario: Move an planning element to project with missing type
# When I go to the move page of the work package "pe3" # When I go to the move page of the work package "pe3"

@ -27,35 +27,31 @@
#++ #++
Feature: Navigating to the work package edit page Feature: Navigating to the work package edit page
Background: Background:
Given there is 1 user with: Given there is 1 user with:
| login | manager | | login | manager |
And there is a role "manager" And there is a role "manager"
And the role "manager" may have the following rights: And the role "manager" may have the following rights:
| edit_work_packages | | edit_work_packages |
| view_work_packages | | view_work_packages |
And there is 1 project with the following: And there is 1 project with the following:
| identifier | ecookbook | | identifier | ecookbook |
| name | ecookbook | | name | ecookbook |
And I am working in project "ecookbook" And I am working in project "ecookbook"
And the user "manager" is a "manager" And the user "manager" is a "manager"
And there are the following work packages in project "ecookbook": And there are the following work packages in project "ecookbook":
| subject | | subject |
| pe1 | | pe1 |
And I am already logged in as "manager" And I am already logged in as "manager"
Scenario: Directly opening the page Scenario: Directly opening the page
When I go to the edit page of the work package called "pe1" When I go to the edit page of the work package called "pe1"
Then I should be on the edit page of the work package called "pe1" Then I should be on the edit page of the work package called "pe1"
@javascript
Scenario: From the show page of a work package Scenario: From the show page of a work package
When I go to the page of the work package called "pe1" When I go to the page of the work package called "pe1"
And I select "Update" from the action menu # need to click on edit icon
And I click the edit work package button
# And I select "Update" from the action menu
Then I should be on the edit page of the work package called "pe1" Then I should be on the edit page of the work package called "pe1"

@ -94,13 +94,11 @@ Feature: Updating work packages
| Description | Desc2 | | Description | Desc2 |
And I fill in the id of work package "pe2" into "Parent" And I fill in the id of work package "pe2" into "Parent"
And I submit the form by the "Submit" button And I submit the form by the "Submit" button
Then I should be on the page of the work package "New subject" Then I should be on the page of the work package "New subject"
And the work package should be shown with the following values: And the work package should be shown with the following values:
| Responsible | the manager | | Responsible | the manager |
| Assignee | the manager | | Assignee | the manager |
| Start date | 03/04/2013 | | Date | 03/04/2013 - 03/06/2013 |
| Due date | 03/06/2013 |
| Estimated time | 5.00 | | Estimated time | 5.00 |
| % done | 30 | | % done | 30 |
| Priority | prio2 | | Priority | prio2 |
@ -108,8 +106,9 @@ Feature: Updating work packages
| Subject | New subject | | Subject | New subject |
| Type | Phase2 | | Type | Phase2 |
| Description | Desc2 | | Description | Desc2 |
And the work package "pe2" should be shown as the parent # And the work package "pe2" should be shown as the parent
@javascript
Scenario: Concurrent updates to work packages Scenario: Concurrent updates to work packages
When I go to the edit page of the work package called "pe1" When I go to the edit page of the work package called "pe1"
And I fill in the following: And I fill in the following:
@ -120,6 +119,7 @@ Feature: Updating work packages
Then I should see "Information has been updated by at least one other user in the meantime." Then I should see "Information has been updated by at least one other user in the meantime."
And I should see "The update(s) came from" And I should see "The update(s) came from"
@javascript
Scenario: Adding a note Scenario: Adding a note
When I go to the edit page of the work package called "pe1" When I go to the edit page of the work package called "pe1"
And I fill in "Notes" with "Note message" And I fill in "Notes" with "Note message"

@ -41,11 +41,9 @@ Feature: Viewing a work package
| name | High | | name | High |
And there is a issuepriority with: And there is a issuepriority with:
| name | Immediate | | name | Immediate |
And there are the following types: And there are the following types:
| Name | Is Milestone | In aggregation | Is default | | Name | Is Milestone | In aggregation | Is default |
| Phase | false | true | true | | Phase | false | true | true |
And there is a role "member" And there is a role "member"
And the role "member" may have the following rights: And the role "member" may have the following rights:
| manage_subtasks | | manage_subtasks |
@ -63,61 +61,63 @@ Feature: Viewing a work package
And there are the following issue status: And there are the following issue status:
| name | is_closed | is_default | | name | is_closed | is_default |
| New | false | true | | New | false | true |
And there are the following issues in project "omicronpersei8": And there are the following issues in project "omicronpersei8":
| subject | type | description | author | | subject | type | description | author |
| issue1 | Bug | "1" | bob | | issue1 | Bug | "1" | bob |
| issue2 | Bug | "2" | bob | | issue2 | Bug | "2" | bob |
| issue3 | Bug | "3" | bob | | issue3 | Bug | "3" | bob |
And there are the following work packages in project "omicronpersei8": And there are the following work packages in project "omicronpersei8":
| subject | start_date | due_date | | subject | start_date | due_date |
| pe1 | 2013-01-01 | 2013-12-31 | | pe1 | 2013-01-01 | 2013-12-31 |
| pe2 | 2013-01-01 | 2013-12-31 | | pe2 | 2013-01-01 | 2013-12-31 |
And the work package "issue1" has the following children: And the work package "issue1" has the following children:
| issue2 | | issue2 |
And the work package "pe1" has the following children: And the work package "pe1" has the following children:
| pe2 | | pe2 |
And I am already logged in as "bob" And I am already logged in as "bob"
@javascript
Scenario: Call the work package page for an issue and view the issue Scenario: Call the work package page for an issue and view the issue
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
Then I should see "Bug #1: issue1" Then I should see "Bug #1: issue1"
Then I should see "Bug #2: issue2" within ".idnt-1" And I open the work package tab "Relations"
And I should see "0% Total progress" Then I should see "#2 issue2" within ".work-packages--right-panel"
# And I should see "0% Total progress"
@javascript @wip
Scenario: View work package with issue done ratio disabled Scenario: View work package with issue done ratio disabled
Given the "work_package_done_ratio" setting is set to disabled Given the "work_package_done_ratio" setting is set to disabled
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
Then I should see "Bug #1: issue1" Then I should see "#1 issue1" within ".work-packages--right-panel"
And I should not see "Total progress" # And I should not see "Total progress"
@javascript
Scenario: View child work package of type issue Scenario: View child work package of type issue
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
When I click on "Bug #2" within ".idnt-1" And I open the work package tab "Relations"
When I click on "#2 issue2" within ".work-packages--right-panel"
Then I should see "Bug #2: issue2" Then I should see "Bug #2: issue2"
Then I should see "Bug #1: issue1" within ".work-package-1" And I open the work package tab "Relations"
Then I should see "#1 issue1" within ".work-packages--right-panel"
@javascript @wip
Scenario: Add subtask leads to issue creation page for a parent issue Scenario: Add subtask leads to issue creation page for a parent issue
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
Then I should see "Add subtask" Then I should see "Add subtask"
When I click on "Add subtask" When I click on "Add subtask"
Then I should be on the new work_package page of the project called "omicronpersei8" Then I should be on the new work_package page of the project called "omicronpersei8"
@javascript @javascript @wip
Scenario: Adding a relation will add it to the list of related work packages through AJAX instantly Scenario: Adding a relation will add it to the list of related work packages through AJAX instantly
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
And I click on "Add related work package" And I click on "Add related work package"
And I fill in "relation_to_id" with "3" And I fill in "relation_to_id" with "3"
And I press "Add" And I press "Add"
And I wait for the AJAX requests to finish And I wait for the AJAX requests to finish
Then I should be on the page of the work package "issue1" Then I should be on the page of the work package "issue1"
And I should see "related to Bug #3: issue3" And I should see "related to Bug #3: issue3"
@javascript @javascript @wip
Scenario: Removing an existing relation will remove it from the list of related work packages through AJAX instantly Scenario: Removing an existing relation will remove it from the list of related work packages through AJAX instantly
Given a relation between "issue1" and "issue3" Given a relation between "issue1" and "issue3"
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
@ -127,14 +127,29 @@ Feature: Viewing a work package
Then I should be on the page of the work package "issue1" Then I should be on the page of the work package "issue1"
Then I should not see "Bug #3: issue3" Then I should not see "Bug #3: issue3"
@javascript @javascript @wip
Scenario: Watch and unwatch a work package
# Can't see watchers tab
When I go to the page of the work package "issue1"
And I open the work package tab "Watchers"
Then I should see "bob" within ".work-packages--right-panel"
And I click the unwatch work package button
And I go to the page of the work package "issue1"
And I open the work package tab "Watchers"
Then I should not see "bob" within ".work-packages--right-panel"
And I click the watch work package button
And I go to the page of the work package "issue1"
And I open the work package tab "Watchers"
Then I should see "bob" within ".work-packages--right-panel"
@javascript @wip
Scenario: User adds herself as watcher to an issue Scenario: User adds herself as watcher to an issue
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
Then I should see "Watch" within "#content > .action_menu_specific" Then I should see "Watch" within "#content > .action_menu_specific"
When I click "Watch" within "#content > .action_menu_specific" When I click "Watch" within "#content > .action_menu_specific"
Then I should see "Unwatch" within "#content > .action_menu_specific" Then I should see "Unwatch" within "#content > .action_menu_specific"
@javascript @javascript @wip
Scenario: User removes herself as watcher from an issue Scenario: User removes herself as watcher from an issue
Given user is already watching "issue1" Given user is already watching "issue1"
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
@ -146,21 +161,19 @@ Feature: Viewing a work package
Scenario: Log time leads to time entry creation page for issues Scenario: Log time leads to time entry creation page for issues
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
When I select "Log time" from the action menu When I select "Log time" from the action menu
Then I should see "Spent time" Then I should see "Spent time"
@javascript @javascript @wip
Scenario: For an issue copy leads to work package copy page Scenario: For an issue copy leads to work package copy page
# Copy is somewhy not available
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
When I select "Copy" from the action menu When I select "Copy" from the action menu
Then I should see "Copy" Then I should see "Copy"
@javascript @javascript
Scenario: For an issue move leads to work package copy page Scenario: For an issue move leads to work package copy page
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
When I select "Move" from the action menu When I select "Move" from the action menu
Then I should see "Move" Then I should see "Move"
@javascript @javascript
@ -168,16 +181,15 @@ Feature: Viewing a work package
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
When I select "Delete" from the action menu When I select "Delete" from the action menu
And I confirm popups And I confirm popups
Then I should see "Work packages" Then I should see "Work packages"
@javascript @wip
Scenario: Description quoting link visible Scenario: Description quoting link visible
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
Then I should see "Quote" within ".description" Then I should see "Quote" within ".description"
@javascript @javascript @wip
Scenario: Description quoting link sets edit note Scenario: Description quoting link sets edit note
When I go to the page of the work package "issue1" When I go to the page of the work package "issue1"
And I click on "Quote" within ".description" And I click on "Quote" within ".description"
Then I should see "Bob Bobbit wrote:" Then I should see "Bob Bobbit wrote:"

@ -32,24 +32,19 @@ Feature: Work package textile quickinfo links
| Name | Is Milestone | | Name | Is Milestone |
| Phase | false | | Phase | false |
| Milestone | true | | Milestone | true |
And there is 1 user with: And there is 1 user with:
| login | manager | | login | manager |
And there is a role "manager" And there is a role "manager"
And the role "manager" may have the following rights: And the role "manager" may have the following rights:
| manage_wiki | | manage_wiki |
| view_wiki_pages | | view_wiki_pages |
| edit_wiki_pages | | edit_wiki_pages |
| view_work_packages | | view_work_packages |
And there is a project named "ecookbook" And there is a project named "ecookbook"
And I am working in project "ecookbook" And I am working in project "ecookbook"
And the project uses the following modules: And the project uses the following modules:
| timelines | | timelines |
| wiki | | wiki |
And the user "manager" is a "manager" And the user "manager" is a "manager"
And there are the following issue status: And there are the following issue status:
| name | is_closed | is_default | | name | is_closed | is_default |
@ -59,58 +54,48 @@ Feature: Work package textile quickinfo links
| Subject | Type | Start date | Due date | description | status | responsible | assigned_to | | Subject | Type | Start date | Due date | description | status | responsible | assigned_to |
| January | None | 2012-01-01 | 2012-01-31 | Avocado Sali Grande Grande | New | manager | manager | | January | None | 2012-01-01 | 2012-01-31 | Avocado Sali Grande Grande | New | manager | manager |
@javascript
Scenario: Adding a work package link Scenario: Adding a work package link
Given I am already logged in as "manager" Given I am already logged in as "manager"
When I go to the wiki page "testitest" for the project called "ecookbook" When I go to the wiki page "testitest" for the project called "ecookbook"
And I fill in a 1 hash quickinfo link to "January" for "content_text" And I fill in a 1 hash quickinfo link to "January" for "content_text"
And I press "Save" And I press "Save"
Then I should see a 1 hash work package quickinfo link to "January" within "div.wiki" Then I should see a 1 hash work package quickinfo link to "January" within "div.wiki"
When I follow the 1 hash work package quickinfo link to "January" When I follow the 1 hash work package quickinfo link to "January"
Then I should be on the page of the work package "January" Then I should be on the page of the work package "January"
@javascript
Scenario: Adding a work package quickinfo link Scenario: Adding a work package quickinfo link
Given I am already logged in as "manager" Given I am already logged in as "manager"
When I go to the wiki page "testitest" for the project called "ecookbook" When I go to the wiki page "testitest" for the project called "ecookbook"
And I fill in a 2 hashes quickinfo link to "January" for "content_text" And I fill in a 2 hashes quickinfo link to "January" for "content_text"
And I press "Save" And I press "Save"
Then I should see a 2 hashes work package quickinfo link to "January" within "div.wiki" Then I should see a 2 hashes work package quickinfo link to "January" within "div.wiki"
When I follow the 2 hashes work package quickinfo link to "January" When I follow the 2 hashes work package quickinfo link to "January"
Then I should be on the page of the work package "January" Then I should be on the page of the work package "January"
@javascript
Scenario: Adding a work package quickinfo link with description Scenario: Adding a work package quickinfo link with description
Given I am already logged in as "manager" Given I am already logged in as "manager"
When I go to the wiki page "testitest" for the project called "ecookbook" When I go to the wiki page "testitest" for the project called "ecookbook"
And I fill in a 3 hashes quickinfo link to "January" for "content_text" And I fill in a 3 hashes quickinfo link to "January" for "content_text"
And I press "Save" And I press "Save"
Then I should see a 3 hashes work package quickinfo link to "January" within "div.wiki" Then I should see a 3 hashes work package quickinfo link to "January" within "div.wiki"
When I follow the 3 hashes work package quickinfo link to "January" When I follow the 3 hashes work package quickinfo link to "January"
Then I should be on the page of the work package "January" Then I should be on the page of the work package "January"
Scenario: Adding a work package quickinfo link without the right to see the work package
Given there is 1 user with:
| login | dude |
And there is a role "dude"
And the role "dude" may have the following rights:
| manage_wiki |
| view_wiki_pages |
| edit_wiki_pages |
And the user "dude" is a "dude"
And I am already logged in as "dude"
Scenario: Adding a work package quickinfo link without the right to see the work package
Given there is 1 user with:
| login | dude |
And there is a role "dude"
And the role "dude" may have the following rights:
| manage_wiki |
| view_wiki_pages |
| edit_wiki_pages |
And the user "dude" is a "dude"
And I am already logged in as "dude"
When I go to the wiki page "testitest" for the project called "ecookbook" When I go to the wiki page "testitest" for the project called "ecookbook"
And I fill in a 3 hashes quickinfo link to "January" for "content_text" And I fill in a 3 hashes quickinfo link to "January" for "content_text"
And I press "Save" And I press "Save"
Then I should not see a 3 hashes work package quickinfo link to "January" within "div.wiki" Then I should not see a 3 hashes work package quickinfo link to "January" within "div.wiki"

@ -29,14 +29,14 @@
require 'spec_helper' require 'spec_helper'
require 'features/work_packages/work_packages_page' require 'features/work_packages/work_packages_page'
describe 'New work package', type: :feature do describe 'Create work package', type: :feature do
let(:user) { FactoryGirl.create(:admin) } let(:user) { FactoryGirl.create(:admin) }
let(:project) { FactoryGirl.create(:project) } let(:project) { FactoryGirl.create(:project) }
let(:work_packages_page) { WorkPackagesPage.new(project) } let(:work_packages_page) { WorkPackagesPage.new(project) }
before do allow(User).to receive(:current).and_return(user) end before do allow(User).to receive(:current).and_return(user) end
describe 'Datepicker', js: true do describe 'first day in datepicker', js: true do
shared_examples_for 'first week day set' do |locale: :de| shared_examples_for 'first week day set' do |locale: :de|
let(:datepicker_selector) { '#ui-datepicker-div table.ui-datepicker-calendar thead tr th:nth-of-type(2)' } let(:datepicker_selector) { '#ui-datepicker-div table.ui-datepicker-calendar thead tr th:nth-of-type(2)' }
@ -47,34 +47,34 @@ describe 'New work package', type: :feature do
work_packages_page.visit_new work_packages_page.visit_new
# Fill in the date, as a simple click does not seem to trigger the datepicker here # Fill in the date, as a simple click does not seem to trigger the datepicker here
fill_in 'Start date', with: DateTime.now.strftime('%Y-%m-%d') fill_in 'Start date', with: DateTime.new(2015, 8, 1).strftime('%Y-%m-%d')
end end
it { expect(page).to have_selector(datepicker_selector, text: day_acronym) } it { expect(page).to have_selector(datepicker_selector, text: day_acronym) }
end end
context 'Monday' do context 'is Monday' do
it_behaves_like 'first week day set' do it_behaves_like 'first week day set' do
let(:day_of_week) { 1 } let(:day_of_week) { 1 }
let(:day_acronym) { 'Mo' } let(:day_acronym) { 'Mo' }
end end
end end
context 'Sunday' do context 'is Sunday' do
it_behaves_like 'first week day set' do it_behaves_like 'first week day set' do
let(:day_of_week) { 7 } let(:day_of_week) { 7 }
let(:day_acronym) { 'So' } let(:day_acronym) { 'So' }
end end
end end
context 'Saturday' do context 'is Saturday' do
it_behaves_like 'first week day set' do it_behaves_like 'first week day set' do
let(:day_of_week) { 6 } let(:day_of_week) { 6 }
let(:day_acronym) { 'Sa' } let(:day_acronym) { 'Sa' }
end end
end end
context 'Language-specific' do context 'is locale specific' do
it_behaves_like 'first week day set' do it_behaves_like 'first week day set' do
let(:day_of_week) { nil } let(:day_of_week) { nil }
let(:day_acronym) { 'Mo' } let(:day_acronym) { 'Mo' }
Loading…
Cancel
Save