summaryrefslogtreecommitdiff
path: root/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb')
-rw-r--r--tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb b/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
new file mode 100644
index 00000000..ba41f7fb
--- /dev/null
+++ b/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
@@ -0,0 +1,28 @@
+Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, page_content|
+ @wikitext = page_content
+ on(APIPage).create page_title, page_content
+ step "I am on the #{page_title} page"
+end
+
+Given(/^I am on the (.+) page$/) do |article|
+ article = article.gsub(/ /, '_')
+ visit(ZtargetPage, :using_params => {:article_name => article})
+end
+
+Given(/^I create page "(.*?)" with content "(.*?)"$/) do |page_title, page_content|
+ on(APIPage).create page_title, page_content
+end
+
+
+When(/^I click the Link Target link$/) do
+ on(ZtargetPage).link_target_page_link
+end
+
+Then(/^I should be on the Link Target Test Page$/) do
+ @browser.url.should match /Link_Target_Test_Page/
+end
+
+Then(/^the page content should contain "(.*?)"$/) do |content|
+ on(ZtargetPage).page_content.should match content
+end
+