end
end
@name = 'Foobar'
end
within '#search_form_div' do
end
end
end
end
@filterable = FactoryGirl.create filterable.to_sym
@ontology = FactoryGirl.create :ontology, filterable.to_sym => @filterable
end
end
within '#search_form_div' do
end
end
within '#search_form_div' do
end
end
within '#search_form_div' do
end
end
expect(page).to have_content(@ontology.name)
expect(page).to have_content(@filterable.name)
end
Given(/^there is an ontology with all filters given$/) do
@ontology_type = FactoryGirl.create :ontology_type
@project = FactoryGirl.create :project
@formality_level = FactoryGirl.create :formality_level
@license_model = FactoryGirl.create :license_model
@task = FactoryGirl.create :task
@ontology = FactoryGirl.create :ontology, ontology_type: @ontology_type,
projects: [@project], formality_level: @formality_level,
license_models: [@license_model], tasks: [@task]
end
When(/^I select the all filters I search for$/) do
within '#search_form_div' do
select @ontology_type.name, from: '_ontology_type'
select @project.name, from: '_project'
select @formality_level.name, from: '_formality_level'
select @license_model.name, from: '_license_model'
end
end
end
end
select @ontology_type.name, from: '_ontology_type'
select @project.name, from: '_project'
end
end
end
end
@repository_one = FactoryGirl.create :repository, name: 'RepoOne'
@repository_two = FactoryGirl.create :repository, name: 'RepoTwo'
end
end
end
end
end
end
end
end
end
end
end
end
[@project]
[@project]
end
end
end
within '#search_form_div' do
end
end
within '#search_form_div' do
end
end
end
end
end
end
end
end
@repo.ontologies << @ontology
end
end
expect(page).not_to have_content(@ontology.name)
end
When(/^I search for this ontology$/) do
within '#search_form_div' do
end
end