Last modified: 2014-10-19 17:44:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65620, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63620 - MobileFrontend Selenium tests do not use page object pattern
MobileFrontend Selenium tests do not use page object pattern
Status: NEW
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
wmf-deployment
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-07 12:52 UTC by Željko Filipin
Modified: 2014-10-19 17:44 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Željko Filipin 2014-04-07 12:52:23 UTC
Examples:

on(ArticlePage).link_element(class: "edit-page", index: arg1.to_i).when_present.click

https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/editor_ve_steps.rb#L41

--

on(ArticlePage).overlay_element.when_present.h2_element(:text => "Nearby").should be_visible

https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/geonotahack_steps.rb#L10

--

on(ArticlePage).overlay_languages_element.when_present.button_element(class: "cancel").click

https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/language_steps.rb#L14

--

When(/^I click on "(.*?)" in the main navigation menu$/) do |text|
  step 'I click on the main navigation button'
  on(ArticlePage).navigation_element.link_element(text: text).click
end

Then(/^I see a link to "(.*?)" in the main navigation menu$/) do |text|
  on(ArticlePage).navigation_element.link_element(text: text).should be_visible
end

Then(/^I do not see a link to "(.*?)" in the main navigation menu$/) do |text|
  on(ArticlePage).navigation_element.link_element(text: text).should_not be_visible
end

https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/mainmenu_steps.rb#L5-L16

--

Then(/^I should see at least one result in the nearby items list$/) do
  on(ArticlePage) do |page|
    page.page_list_element.when_present(20).should be_visible
    page.page_list_element.link_element(:css => "a.title" ).should be_visible
  end
end

When(/^I click a nearby result$/) do
  on(ArticlePage).page_list_element.when_present(20).link_element(:css => "a.title" ).click
end

Then(/^I see the page preview overlay$/) do
  on(ArticlePage).overlay_element.when_present(20).div_element(:class => "content").should be_visible
end

https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/nearby_steps.rb#L7-L20
Comment 1 Željko Filipin 2014-06-28 20:52:29 UTC
Chris, is MobileFrontend repo now using page object pattern? Can this bug be resolved?
Comment 2 Chris McMahon 2014-06-30 14:29:59 UTC
One update: https://gerrit.wikimedia.org/r/#/c/142605/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links