Expected Behavior
You should be able to run core webdriver.io tests against Patch demo.
Actual Behavior
Running webdriver.io tests generates errors so the test do not pass. It's mwbot that cannot login or do it thing. mwbot generates the generic No valid JSON response response and if I add some logging I can see that the user gets 403 Forbidden.
npm run selenium-test
....
[0-1] RUNNING in chrome - file:///tests/selenium/docs/Page_object_pattern/specs/login.js
[0-1] Error: invalidjson: No valid JSON response
[0-1] at /Users/phedenskog/git/core/node_modules/mwbot/src/index.js:254:31
[0-1] at tryCatcher (/Users/phedenskog/git/core/node_modules/bluebird/js/release/util.js:16:23)
[0-1] at Promise._settlePromiseFromHandler (/Users/phedenskog/git/core/node_modules/bluebird/js/release/promise.js:547:31)
[0-1] at Promise._settlePromise (/Users/phedenskog/git/core/node_modules/bluebird/js/release/promise.js:604:18)
[0-1] at Promise._settlePromise0 (/Users/phedenskog/git/core/node_modules/bluebird/js/release/promise.js:649:10)
[0-1] at Promise._settlePromises (/Users/phedenskog/git/core/node_modules/bluebird/js/release/promise.js:729:18)
[0-1] at _drainQueueStep (/Users/phedenskog/git/core/node_modules/bluebird/js/release/async.js:93:12)
[0-1] at _drainQueue (/Users/phedenskog/git/core/node_modules/bluebird/js/release/async.js:86:9)
[0-1] at Async._drainQueues (/Users/phedenskog/git/core/node_modules/bluebird/js/release/async.js:102:5)
[0-1] at Async.drainQueues (/Users/phedenskog/git/core/node_modules/bluebird/js/release/async.js:15:14)
[0-1] at process.processImmediate (node:internal/timers:485:21) {
[0-1] code: 'invalidjson',
[0-1] info: 'No valid JSON response',
[0-1] response: '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n' +
[0-1] '<html><head>\n' +
[0-1] '<title>403 Forbidden</title>\n' +
[0-1] '</head><body>\n' +
[0-1] '<h1>Forbidden</h1>\n' +
[0-1] "<p>You don't have permission to access this resource.</p>\n" +
[0-1] '<hr>\n' +
[0-1] '<address>Apache/2.4.38 (Debian) Server at a14d02fca3.catalyst.wmcloud.org Port 8080</address>\n' +
[0-1] '</body></html>\n'
[0-1] }
[0-1] TypeError in "User.should be able to log in without page object"I tested multiple users but I guess it should be the "Patch Demo" user that should do the job. I can login as that users through the GUI but maybe it doesn't have correct rights for mwbot or I'm not sure how that works.
Steps to reproduce:
Follow the instructions at https://www.mediawiki.org/wiki/Selenium/Getting_Started/Run_tests_targeting_Patch_demo
