visit repository_tree_path(@ontology.repository)
end
Then(/^I should see the ontology's file$/i) do
file_cell_selector = 'table.file-table td.name'
end
expect(page).to have_selector(ontology_cell_selector, count: 1)
expect(find(ontology_cell_selector).
has_link?(@ontology.name, polymorphic_path(@ontology))).
to be(true)
end
Then(/^I should see no other ontologies next to the ontology's file$/i) do
ontology_cell_selector = 'table.file-table td.ontology ul.ontology-list'
end
expect(page).to have_selector(ontology_cell_selector, count: 1)
expect(find(ontology_cell_selector).
has_link?(@ontology.name, polymorphic_path(@ontology))).
to be(true)
@ontology.children.each do |child|
expect(find(ontology_cell_selector).
has_link?(child.name, polymorphic_path(child))).
to be(true)
end
end