Zfilipin has submitted this change and it was merged. Change subject: Basic test for Hotcat gadget test2wiki only for now ......................................................................
Basic test for Hotcat gadget test2wiki only for now Change-Id: Ie6c8b066aaa7adc10451935ee8c4c0957410767f --- A features/hotcat.feature A features/step_definitions/hotcat_steps.rb A features/support/pages/hotcat_page.rb 3 files changed, 66 insertions(+), 0 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/features/hotcat.feature b/features/hotcat.feature new file mode 100644 index 0000000..70e4e11 --- /dev/null +++ b/features/hotcat.feature @@ -0,0 +1,21 @@ [email protected] @login + +Feature: Hotcat + + Background: + Given I am logged in + And I am at random page + + Scenario: Hotcat category link + When I click the Categories link + Then I am taken to the Special:Categories page + + Scenario: Hotcat Modify several categories + When I click the Modify several categories button + Then a Save button is visible + And an Add new categories link is visible + + Scenario: Hotcat Add category + When I click the Add a new category link + Then I can click OK and click Add new category + And I can click Cancel and click Add new category diff --git a/features/step_definitions/hotcat_steps.rb b/features/step_definitions/hotcat_steps.rb new file mode 100644 index 0000000..6aaac00 --- /dev/null +++ b/features/step_definitions/hotcat_steps.rb @@ -0,0 +1,35 @@ +When(/^I click the Add a new category link$/) do + on(HotcatPage).add_new_category_element.when_present.click +end + +When(/^I click the Categories link$/) do + on(HotcatPage).categories_link +end + +When(/^I click the Modify several categories button$/) do + on(HotcatPage).modify_several_categories +end + +Then(/^a Save button is visible$/) do + on(HotcatPage).save_button_element.should be_visible +end + +Then(/^an Add new categories link is visible$/) do + on(HotcatPage).add_new_category_element.when_present.should be_visible +end + +Then(/^I am taken to the Special:Categories page$/) do + @browser.url.should match Regexp.escape('Special:Categories') +end + +Then(/^I can click Cancel and click Add new category$/) do + on(HotcatPage).cancel + step 'I click the Add a new category link' +end + +Then(/^I can click OK and click Add new category$/) do + on(HotcatPage).ok + step 'I click the Add a new category link' +end + + diff --git a/features/support/pages/hotcat_page.rb b/features/support/pages/hotcat_page.rb new file mode 100644 index 0000000..1c07f80 --- /dev/null +++ b/features/support/pages/hotcat_page.rb @@ -0,0 +1,10 @@ +class HotcatPage + include PageObject + + a(:add_new_category, title: 'Add a new category') + button(:cancel, value: 'Cancel') + a(:categories_link, text: 'Categories') + a(:modify_several_categories, title: 'Modify several categories') + button(:ok, value: 'OK') + button(:save_button, value: 'Save') +end -- To view, visit https://gerrit.wikimedia.org/r/74075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6c8b066aaa7adc10451935ee8c4c0957410767f Gerrit-PatchSet: 5 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon <[email protected]> Gerrit-Reviewer: Qgil <[email protected]> Gerrit-Reviewer: Sumanah <[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
