Cmcmahon has submitted this change and it was merged.
Change subject: Working code for June 27 tech demo meetup
......................................................................
Working code for June 27 tech demo meetup
Change-Id: Ic49cd5268d2bd9c2357402f0b889328d0924486b
---
A features/step_definitions/wikilove_steps.rb
A features/support/pages/wikilove_page.rb
A features/wikilove.feature
3 files changed, 83 insertions(+), 0 deletions(-)
Approvals:
Cmcmahon: Looks good to me, approved
jenkins-bot: Verified
diff --git a/features/step_definitions/wikilove_steps.rb
b/features/step_definitions/wikilove_steps.rb
new file mode 100644
index 0000000..26fb5f1
--- /dev/null
+++ b/features/step_definitions/wikilove_steps.rb
@@ -0,0 +1,39 @@
+When(/^I click Barnstars$/) do
+ on(WikilovePage).barnstars_element.click
+end
+
+When(/^I click Food and drink$/) do
+ on(WikilovePage).food_and_drink_element.click
+end
+
+When(/^I click Kittens$/) do
+ on(WikilovePage).kittens_element.click
+end
+
+When(/^I click Wikilove$/) do
+ on(WikilovePage).heart_element.click
+end
+
+When(/^I visit the User page of Selenium_user2$/) do
+ visit WikilovePage
+end
+
+Then(/^I should be able to select an image$/) do
+ on(WikilovePage).kitten_image_element.when_visible.click
+end
+
+Then(/^I should see the Food and drink selectbox$/) do
+ on(WikilovePage).food_drink_select_element.should be_visible
+end
+
+Then(/^I should see the header text field containing (.+)$/) do
|wikilove_message|
+ on(WikilovePage).food_header.should match Regexp.escape(wikilove_message)
+end
+
+Then(/^I should see the barnstars selectbox$/) do
+ on(WikilovePage).barnstar_select_element.should be_visible
+end
+
+Then(/^I should see the message text field$/) do
+ on(WikilovePage).wikilove_message_element.should be_visible
+end
\ No newline at end of file
diff --git a/features/support/pages/wikilove_page.rb
b/features/support/pages/wikilove_page.rb
new file mode 100644
index 0000000..1afb016
--- /dev/null
+++ b/features/support/pages/wikilove_page.rb
@@ -0,0 +1,20 @@
+require 'page-object'
+
+class WikilovePage
+ include PageObject
+
+ include URL
+ page_url URL.url('User:Selenium_user2')
+
+ select_list(:barnstar_select, id: 'mw-wikilove-subtype')
+ div(:barnstars, text: 'Barnstars')
+ div(:food_and_drink, text: 'Food and drink')
+ select_list(:food_drink_select, id: 'mw-wikilove-subtype')
+ text_field(:food_header, id: 'mw-wikilove-header')
+ a(:heart, text: 'WikiLove')
+ text_field(:kitten_header, id: 'mw-wikilove-header')
+ a(:kitten_image, id: 'mw-wikilove-gallery-img-0')
+ div(:kittens, text: 'Kittens')
+ text_area(:wikilove_message, id: 'mw-wikilove-message')
+ div(:wikilove_spinner, id: 'mw-wikilove-image-preview-spinner')
+end
diff --git a/features/wikilove.feature b/features/wikilove.feature
new file mode 100644
index 0000000..7c869ae
--- /dev/null
+++ b/features/wikilove.feature
@@ -0,0 +1,24 @@
[email protected] @login
+Feature: Wikilove
+
+ Background:
+ Given I am logged in
+ When I visit the User page of Selenium_user2
+ And I click Wikilove
+
+ Scenario: Wikilove barnstar options
+ When I click Barnstars
+ Then I should see the barnstars selectbox
+ And I should see the message text field
+
+ Scenario: Wikilove Food and drink options
+ When I click Food and drink
+ Then I should see the Food and drink selectbox
+ And I should see the header text field containing Some baklava for you!
+ And I should see the message text field
+
+ Scenario: Wikilove Kittens options
+ When I click Kittens
+ Then I should be able to select an image
+ And I should see the header text field containing A kitten for you!
+ And I should see the message text field
\ No newline at end of file
--
To view, visit https://gerrit.wikimedia.org/r/68283
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic49cd5268d2bd9c2357402f0b889328d0924486b
Gerrit-PatchSet: 5
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Qgil <[email protected]>
Gerrit-Reviewer: Rachel99 <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits