Cross Reference: ontology_search_steps.rb
xref
: /
ontohub
/
features
/
step_definitions
/
ontology_search_steps.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ontology_search_steps.rb revision 518acf1845fb61410df491c389966b89e1b9a071
409
N/A
Given
(/^
there
is
an
ontology
$/)
do
3
N/A
@
ontology
=
FactoryGirl.create
:
ontology
3
N/A
end
3
N/A
3
N/A
When
(/^I
open
the
ontologies
overview
page
$/)
do
3
N/A
visit
ontologies_path
3
N/A
end
3
N/A
3
N/A
Then
(/^I
should
see
all
available
ontologies
$/)
do
3
N/A
page.should
have_content
(@
ontology.name
)
3
N/A
end
3
N/A
3
N/A
Given
(/^
the
ontology
I
want
to
search
for
$/)
do
3
N/A
@
name
=
'Foobar'
3
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
name
: @
name
3
N/A
end
3
N/A
3
N/A
When
(/^I
fill
in
the
search
form
$/)
do
3
N/A
within
'#search_form_div'
do
3
N/A
fill_in
'query'
,
with
: @
name
3
N/A
end
3
N/A
end
3
N/A
268
N/A
Then
(/^I
should
see
the
ontology
$/)
do
3
N/A
page.should
have_content
(@
name
)
3
N/A
end
3
N/A
59
N/A
Then
(/^I
shouldnt
see
the
ontology
$/)
do
3
N/A
page.should
_not
have_content
(
"{#@
ontology.name
}"
+
'Foobar'
)
59
N/A
end
416
N/A
3
N/A
Given
(/^
there
is
an
ontology
with
a
type
$/)
do
30
N/A
@
ontology_type
=
FactoryGirl.create
:
ontology_type
175
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
ontology_type
: @
ontology_type
30
N/A
end
30
N/A
30
N/A
When
(/^I
select
the
type
I
search
for
$/)
do
30
N/A
within
'#search_form_div'
do
30
N/A
select
@
ontology_type.name
,
from
:
'_ontology_type'
30
N/A
end
30
N/A
end
30
N/A
30
N/A
Then
(/^I
should
see
all
ontologies
with
that
type
$/)
do
30
N/A
page.should
have_content
(@
ontology.name
)
30
N/A
page.should
have_content
(@
ontology_type.name
)
3
N/A
end
416
N/A
416
N/A
Given
(/^
there
is
an
ontology
in
a
project
$/)
do
3
N/A
@
project
=
FactoryGirl.create
:
project
416
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
projects
: [@
project
]
3
N/A
end
3
N/A
3
N/A
When
(/^I
select
the
project
I
search
for
$/)
do
3
N/A
within
'#search_form_div'
do
526
N/A
select
@
project.name
,
from
:
'_project'
526
N/A
end
526
N/A
end
526
N/A
526
N/A
Then
(/^I
should
see
all
ontologies
in
that
project
$/)
do
526
N/A
page.should
have_content
(@
ontology.name
)
526
N/A
page.should
have_content
(@
project.name
)
526
N/A
end
526
N/A
526
N/A
Given
(/^
there
is
an
ontology
with
a
formality
level
$/)
do
526
N/A
@
formality_level
=
FactoryGirl.create
:
formality_level
3
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
formality_level
: @
formality_level
146
N/A
end
526
N/A
526
N/A
When
(/^I
select
the
formality
I
search
for
$/)
do
526
N/A
within
'#search_form_div'
do
146
N/A
select
@
formality_level.name
,
from
:
'_formality_level'
146
N/A
end
3
N/A
end
526
N/A
526
N/A
Then
(/^I
should
see
all
ontologies
with
that
formality
level
$/)
do
526
N/A
page.should
have_content
(@
ontology.name
)
3
N/A
page.should
have_content
(@
formality_level.name
)
416
N/A
end
3
N/A
429
N/A
Given
(/^
there
is
an
ontology
with
a
license
model
$/)
do
429
N/A
@
license_model
=
FactoryGirl.create
:
license_model
429
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
license_models
: [@
license_model
]
30
N/A
end
30
N/A
30
N/A
When
(/^I
select
the
license
model
I
search
for
$/)
do
30
N/A
within
'#search_form_div'
do
30
N/A
select
@
license_model.name
,
from
:
'_license_model'
416
N/A
end
30
N/A
end
30
N/A
416
N/A
Then
(/^I
should
see
all
ontologies
with
that
license
model
$/)
do
175
N/A
page.should
have_content
(@
ontology.name
)
30
N/A
page.should
have_content
(@
license_model.name
)
30
N/A
end
30
N/A
3
N/A
Given
(/^
there
is
an
ontology
with
a
task
$/)
do
416
N/A
@
task
=
FactoryGirl.create
:
task
416
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
tasks
: [@
task
]
3
N/A
end
3
N/A
416
N/A
When
(/^I
select
the
task
I
search
for
$/)
do
416
N/A
within
'#search_form_div'
do
3
N/A
select
@
task.name
,
from
:
'_task'
3
N/A
end
3
N/A
end
416
N/A
416
N/A
Then
(/^I
should
see
all
ontologies
with
that
task
$/)
do
3
N/A
page.should
have_content
(@
ontology.name
)
3
N/A
page.should
have_content
(@
task.name
)
59
N/A
end
416
N/A
59
N/A
Given
(/^
there
is
an
ontology
with
all
filters
given
$/)
do
59
N/A
@
ontology_type
=
FactoryGirl.create
:
ontology_type
59
N/A
@
project
=
FactoryGirl.create
:
project
59
N/A
@
formality_level
=
FactoryGirl.create
:
formality_level
59
N/A
@
license_model
=
FactoryGirl.create
:
license_model
59
N/A
@
task
=
FactoryGirl.create
:
task
59
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
ontology_type
: @
ontology_type
,
59
N/A
projects
: [@
project
],
formality_level
: @
formality_level
,
3
N/A
license_models
: [@
license_model
],
tasks
: [@
task
]
22
N/A
end
3
N/A
59
N/A
When
(/^I
select
the
all
filters
I
search
for
$/)
do
416
N/A
within
'#search_form_div'
do
526
N/A
select
@
ontology_type.name
,
from
:
'_ontology_type'
416
N/A
select
@
project.name
,
from
:
'_project'
526
N/A
select
@
formality_level.name
,
from
:
'_formality_level'
526
N/A
select
@
license_model.name
,
from
:
'_license_model'
526
N/A
select
@
task.name
,
from
:
'_task'
526
N/A
end
526
N/A
end
526
N/A
526
N/A
Then
(/^I
should
see
all
ontologies
with
that
features
$/)
do
526
N/A
page.should
have_content
(@
ontology.name
)
526
N/A
page.should
have_content
(@
ontology_type.name
)
416
N/A
page.should
have_content
(@
project.name
)
416
N/A
page.should
have_content
(@
formality_level.name
)
146
N/A
page.should
have_content
(@
license_model.name
)
416
N/A
page.should
have_content
(@
task.name
)
146
N/A
end
146
N/A
59
N/A
Given
(/^
there
is
an
ontology
with
a
type
which
is
in
a
project
$/)
do
526
N/A
@
ontology_type
=
FactoryGirl.create
:
ontology_type
416
N/A
@
project
=
FactoryGirl.create
:
project
416
N/A
@
ontology
=
FactoryGirl.create
:
ontology
,
ontology_type
: @
ontology_type
,
146
N/A
projects
: [@
project
]
416
N/A
end
146
N/A
146
N/A
When
(/^I
select
the
type
and
project
I
search
for
$/)
do
45
N/A
within
'#search_form_div'
do
526
N/A
select
@
ontology_type.name
,
from
:
'_ontology_type'
416
N/A
select
@
project.name
,
from
:
'_project'
416
N/A
end
146
N/A
end
416
N/A
146
N/A
Then
(/^I
should
see
all
ontologies
with
that
two
features
$/)
do
146
N/A
page.should
have_content
(@
ontology_type.name
)
45
N/A
page.should
have_content
(@
project.name
)
175
N/A
end
175
N/A
526
N/A
Then
(/^I
should
see
all
ontologies
with
that
name
$/)
do
175
N/A
page.should
have_content
(@
ontology.name
)
526
N/A
end
526
N/A
526
N/A