Page MenuHomePhabricator

Remove regular expressions in browser tests page element selectors
Closed, DeclinedPublic

Description

That is really really slow when using Sauce Labs.

RepositoryTaskJenkins jobVagrant roleZuulregexActive
mediawiki/extensions/ArticleFeedbackv53
mediawiki/extensions/Flowflowexperimental6
mediawiki/extensions/MobileFrontendmobilefrontendtest, postmerge9
mediawiki/extensions/MultimediaViewermultimediaviewer4
mediawiki/extensions/PageTriagepagetriage2
mediawiki/extensions/UploadWizarduploadwizard2
mediawiki/extensions/VisualEditorvisualeditor19
$ grep --include *.rb  -R -F ': /' .
./extensions/ArticleFeedbackv5/tests/browser/features/support/pages/aftv5_page.rb:  a(:all_comments, text: /All comments/)
./extensions/ArticleFeedbackv5/tests/browser/features/support/pages/aftv5_page.rb:  a(:learn_more, text: /Learn more/)
./extensions/ArticleFeedbackv5/tests/browser/features/support/pages/aftv5_page.rb:  a(:most_relevant, text: /Most relevant/)

./extensions/Flow/tests/browser/features/support/components/board_description.rb:  link(:save, text: /Save description.*/)
./extensions/Flow/tests/browser/features/support/components/board_description.rb:    content_element.link_element(text: /Archive/)
./extensions/Flow/tests/browser/features/support/pages/abstract_flow_page.rb:    new_topic_widget_element.link_element(text: /Add topic.*/)
./extensions/Flow/tests/browser/features/support/pages/abstract_flow_page.rb:    first_reply_widget_element.link_element(text: /Reply.*/)
./extensions/Flow/tests/browser/features/support/pages/abstract_flow_page.rb:  a(:no_javascript_start_reply, href: /action=reply/)
./extensions/Flow/tests/browser/features/support/pages/abstract_flow_page.rb:  a(:no_javascript_start_topic, href: /action=new-topic/)

./extensions/MobileFrontend/tests/browser/features/step_definitions/mainmenu_steps.rb:  expect(on(ArticlePage).navigation_element.link_element(href: /UserProfile\/#{user}/, text: user_label)).to be_visible
./extensions/MobileFrontend/tests/browser/features/support/pages/article_page.rb:  a(:about_link) { |page| page.navigation_element.link_element(text: /^About/) }
./extensions/MobileFrontend/tests/browser/features/support/pages/article_page.rb:  a(:last_modified_bar_history_link, href: /Special:History/)
./extensions/MobileFrontend/tests/browser/features/support/pages/language_page.rb:  p(:number_languages, text: /This page is available in (\d+) languages/)
./extensions/MobileFrontend/tests/browser/features/support/pages/special_userprofile_page.rb:  a(:contributions_link, href: /Special:Contributions\//)
./extensions/MobileFrontend/tests/browser/features/support/pages/special_userprofile_page.rb:  a(:uploads_link, href: /Special:Uploads\//)
./extensions/MobileFrontend/tests/browser/features/support/pages/special_userprofile_page.rb:  a(:talk_link, href: /User_talk:/)
./extensions/MobileFrontend/tests/browser/features/support/pages/special_userprofile_page.rb:  a(:user_page_link, href: /User:/)
./extensions/MobileFrontend/tests/browser/features/support/pages/special_userprofile_page.rb:  a(:user_page_link, href: /User:/)

./extensions/MultimediaViewer/tests/browser/features/support/pages/commons_page.rb:  img(:commons_image, src: /Kerala\.jpg$/)
./extensions/MultimediaViewer/tests/browser/features/support/pages/e2e_test_page.rb:  a(:image1_in_article, class: "image", href: /Kerala\.jpg$/)
./extensions/MultimediaViewer/tests/browser/features/support/pages/e2e_test_page.rb:  a(:image2_in_article, class: "image", href: /Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_24\.jpg$/)
./extensions/MultimediaViewer/tests/browser/features/support/pages/e2e_test_page.rb:  a(:other_image_in_article, href: /Academy_of_Sciences\.jpg$/)

./extensions/PageTriage/tests/browser/features/support/pages/page_triage_page.rb:  a(:learn_more, href: /Wikipedia:Page_Curation\/Help/, text: "Learn more")
./extensions/PageTriage/tests/browser/features/support/pages/page_triage_page.rb:  a(:leave_feedback, href: /Wikipedia_talk:Page_Curation/, text: "Leave feedback")

./extensions/UploadWizard/tests/browser/features/support/pages/describe_page.rb:  textarea(:description, name: /^description/)
./extensions/UploadWizard/tests/browser/features/support/pages/upload_page.rb:  p(:duplicate_error, text: /You are already uploading/)

./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:add_a_template_title, class: 'oo-ui-processDialog-location', text: /Add a template/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:edit_ve, title: /Edit this page with VisualEditor/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:edit_wikitext, title: /You can edit this page\./)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  span(:heading, class: 'oo-ui-tool-title', text: /Heading/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:ip_warning, class: 've-ui-mwNoticesPopupTool-item', text: /Your IP address/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:link_overlay_does_not_exist, text: /New page/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:link_overlay_external_link, text: /External link.+New page/m)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:link_overlay_wiki_page, text: /Matching page/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:options_settings_content_advanced, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout', text: /Advanced settings/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:options_settings_content_categories, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout', text: /Categories/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:options_settings_content_page_settings, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout', text: /Page settings/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:page_title, text: /Page title/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:paragraph, text: /Paragraph/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:preformatted, text: /Preformatted/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  div(:references_title, class: 'oo-ui-processDialog-location', text: /References/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:subheading1, text: /Sub-heading 1/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:subheading2, text: /Sub-heading 2/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:subheading3, text: /Sub-heading 3/)
./extensions/VisualEditor/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb:  a(:subheading4, text: /Sub-heading 4/)

Details

Related Gerrit Patches:

Event Timeline

zeljkofilipin claimed this task.
zeljkofilipin raised the priority of this task from to Medium.
zeljkofilipin updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 11 2015, 4:49 PM
This comment was removed by zeljkofilipin.
zeljkofilipin renamed this task from Check if browser tests are using regular expressions in page element selectors to Remove regular expressions in browser tests page element selectors.Sep 16 2015, 3:41 PM
zeljkofilipin set Security to None.

Change 200767 had a related patch set uploaded (by Zfilipin):
Browser test: avoid loading elements over network

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

Change 200767 merged by jenkins-bot:
Browser test: avoid loading elements over network

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

For core it should be fixed now. I have manually triggered a build : https://integration.wikimedia.org/ci/job/browsertests-Core-en.wikipedia.beta.wmflabs.org-linux-firefox-sauce/747/

Still have to audit all other repositories.

zeljkofilipin removed a project: Patch-For-Review.
zeljkofilipin removed zeljkofilipin as the assignee of this task.Sep 28 2015, 4:07 PM
TTO added a subscriber: TTO.

Seems like this is not blocking the release of 1.26, as end users won't be running tests. Please revert me if I'm wrong though!

It is a bug tracking a similar issue on various repositories.

Danny_B moved this task from Tag to Should be Goal instead on the Tracking-Neverending board.
Danny_B added a subscriber: Danny_B.

No subtasks = not Tracking-Neverending.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptJul 10 2016, 10:19 PM
zeljkofilipin closed this task as Declined.May 26 2017, 3:32 PM
zeljkofilipin lowered the priority of this task from Medium to Low.

Unlikely to ever be resolved because of T139740: Port Selenium tests from Ruby to Node.js.