5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef FactoryGirl.create(:distributed_ontology, :with_children).children.first
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef source_ontology = FactoryGirl.create :single_ontology
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef target_ontology = FactoryGirl.create :single_ontology
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef FactoryGirl.create :mapping, source: source_ontology,
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha GraefGiven(/^I visit my subject's (\S+) command$/) do |command|
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha GraefThen(/^the page title should include "(\S+)"$/) do |text|
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha GraefThen(/^the page title should include the subject's (\S+)$/) do |attribute|
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef expect(page.title).to include(@subject.send(attribute))
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha GraefThen(/^the page title should include the subject's ontology's (\S+)$/) do |attribute|
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef expect(page.title).to include(ontology.send(attribute))
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha GraefThen(/^the active tab in the navigation level (\d+) should be "([^"]+)"$/) do |level, text|
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef expect(page.find_all(".nav_tab_level#{level} > .nav-tabs > li.active").last.text).
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha GraefThen(/^a headline should include "Proof Attempt of \[the corresponding theorem's name\]"$/) do
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef search_string = "Proof Attempt of #{theorem.name}"
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef expect(page.find('h3').text).to include(search_string)
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha GraefThen(/^a headline should include "Prover Output for \[theorem's name\]'s proof attempt #\[proof attempt's number\]"$/) do
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef search_string = "Prover Output for #{theorem.name}'s proof attempt ##{proof_attempt.number}"