Jhobs has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/170942

Change subject: [WIP] News page tests with Cucumber error
......................................................................

[WIP] News page tests with Cucumber error

Uploading to gerrit in reference to bug 72379

Change-Id: I732e32714190f784fa4d548af2cf370360aa4516
---
A tests/browser/features/news.feature
A tests/browser/features/step_definitions/news_steps.rb
M tests/browser/features/support/pages/news_page.rb
3 files changed, 49 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal 
refs/changes/42/170942/1

diff --git a/tests/browser/features/news.feature 
b/tests/browser/features/news.feature
new file mode 100644
index 0000000..88d4dc2
--- /dev/null
+++ b/tests/browser/features/news.feature
@@ -0,0 +1,9 @@
+Feature: News
+
+  Scenario: Content elements should be visible
+    Given I am on the news page
+    Then I should see a carousel
+      And I should see some posts
+      And I should see a list of categories
+      And I should see the archives
+      And I should see contact info
\ No newline at end of file
diff --git a/tests/browser/features/step_definitions/news_steps.rb 
b/tests/browser/features/step_definitions/news_steps.rb
new file mode 100644
index 0000000..eb00473
--- /dev/null
+++ b/tests/browser/features/step_definitions/news_steps.rb
@@ -0,0 +1,33 @@
+Given /^I am on the news page$/ do
+  visit(NewsPage)
+end
+
+Then /^I should see a carousel$/ do
+  pending do
+    on(NewsPage) { |page| expect(page.carousel_element).to be_visible }
+  end
+end
+
+Then /^I should see some posts$/ do
+  pending do
+    on(NewsPage) { |page| expect(page.post_list_element).to be_visible }
+  end
+end
+
+Then /^I should see a list of categories$/ do
+  pending do
+    on(NewsPage) { |page| expect(page.category_list_element).to be_visible }
+  end
+end
+
+Then /^I should see the archives$/ do
+  pending do
+    on(NewsPage) { |page| expect(page.archives_element).to be_visible }
+  end
+end
+
+Then /^I should see contact info$/ do
+  pending do
+    on(NewsPage) { |page| expect(page.contact_info_element).to be_visible }
+  end
+end
\ No newline at end of file
diff --git a/tests/browser/features/support/pages/news_page.rb 
b/tests/browser/features/support/pages/news_page.rb
index 5999189..812dca8 100644
--- a/tests/browser/features/support/pages/news_page.rb
+++ b/tests/browser/features/support/pages/news_page.rb
@@ -1,5 +1,11 @@
 class NewsPage
   include PageObject
 
-  page_url URL.url("Special:ZeroPortal#/news")
+  page_url URL.url("Special:ZeroPortal?s=b|#/news")
+
+  div(:carousel, :id => "carousel-container")
+  div(:post_list, :id => "posts-container")
+  div(:category_list, :id => "categories-container")
+  div(:archives, :id => "archives-container")
+  div(:contact_info, :id => "contact-container")
 end
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/170942
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I732e32714190f784fa4d548af2cf370360aa4516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: Jhobs <jhob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to