Page MenuHomePhabricator

EditSubpages extension fails mediawiki/core webdriver.io tests
Open, Needs TriagePublic

Description

The EditSubpages extension restricts anonymous users from editing most pages. As such as the webdriver.io spec tests in mediawiki/core fail due to a permission error. https://www.mediawiki.org/wiki/Extension:EditSubpages

User
     ✓ should be able to create account
     ✓ should be able to log in
     ✓ should be able to change preferences

1) Page should be creatable:
An element could not be located on the page using the given search parameters ("#wpTextbox1").

2) Page should be re-creatable:
An element could not be located on the page using the given search parameters ("#wpTextbox1").

3) Page should be editable:
invalid element state: Element must be user-editable in order to clear it.

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php70-docker/5253/

Assuming the extensions tests are run first and that we have admin rights on the wiki, we should be able to whitelist a few pages to allow edition. The wiki page mentions whitelisting them in [[MediaWiki:Unlockedpages]].

See also T196960 which is to let some extensions opt out of running webdriver.io tests.

Event Timeline

hashar created this task.Jun 5 2018, 8:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 5 2018, 8:48 AM

Assuming the extensions tests are run first and that we have admin rights on the wiki, we should be able to whitelist a few pages to allow edition.

I don't think that would work. By design, each test is a world for itself, with as little dependencies as possiblek, mediawiki with admin user are the only ones, I think. Each test creates things it needs (users, pages...) with random names. There is no way at the moment that a test could influence another test. Also, I think that should not be possible. Among other things, that leads to more robust tests that can be executed in any order or in parallel. A test depending on another test is a code smell.

Vvjjkkii renamed this task from EditSubpages extension fails mediawiki/core webdriver.io tests to rmbaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from rmbaaaaaaa to EditSubpages extension fails mediawiki/core webdriver.io tests.Jul 1 2018, 9:32 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.