OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/spec/features/work_packages/table/invalid_query_spec.rb

35 lines
1011 B

require 'spec_helper'
describe 'Invalid query spec', js: true do
let(:user) { FactoryGirl.create :admin }
let(:project) { FactoryGirl.create :project }
let(:wp_table) { ::Pages::WorkPackagesTable.new }
let(:filters) { ::Components::WorkPackages::Filters.new }
let(:query) {
query = FactoryGirl.create(:query,
project: project,
user: user)
query.add_filter('assigned_to_id', '=', [99999])
query.save!(validate: false)
query
}
before do
login_as(user)
wp_table.visit_query(query)
end
# Regression test for bug #24114 (broken watcher filter)
it 'should load the faulty query' do
expect(page).to have_selector(".notification-box.-error", wait: 10)
expect(page).to have_selector('#empty-row-notification .wp-table--faulty-query-icon')
filters.open
filters.expect_filter_count 2
expect(page).to have_select('values-assignee', selected: I18n.t('js.placeholders.selection'))
end
end