Merge pull request #2750 from ulferts/fix/stabilize_query_menu_item_cuke

attempt to stabilize query menu item cuke
pull/2754/head
Jan Sandbrink 10 years ago
commit 5aa1600be2
  1. 2
      features/menu_items/query_menu_items.feature
  2. 12
      features/step_definitions/work_package_steps.rb

@ -56,6 +56,7 @@ Feature: Query menu items
@javascript
Scenario: Create a query menu item
When I go to the applied query "Bugs" on the work packages index page of the project "Awesome Project"
And the work package table has finished loading
And I click on "Settings"
And I click on "Share ..."
And I check "Show page in menu"
@ -69,6 +70,7 @@ Feature: Query menu items
| name | title | navigatable |
| bugs_query | Bugs Query | Bugs |
When I go to the applied query "Bugs" on the work packages index page of the project "Awesome Project"
And the work package table has finished loading
And I click on "Settings"
And I click on "Share ..."
And I uncheck "Show page in menu"

@ -89,6 +89,18 @@ Given(/^the user "([^\"]+)" has the following query menu items in the project "(
end
end
When /^the work package table has finished loading$/ do
message <<-MESSAGE
This is a safeguard to ensure that the work package table is loaded before performing actions
on UI items that have not been fully loaded.
It currently assumes that at least one filter is set, without the necessity of the filter being
displayed.
MESSAGE
expect(page).to have_selector('.advanced-filters--filter', visible: false), message
end
When /^I fill in the id of work package "(.+?)" into "(.+?)"$/ do |wp_name, field_name|
work_package = InstanceFinder.find(WorkPackage, wp_name)

Loading…
Cancel
Save