wdio-mediawiki: extract bot() function
authorLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Mon, 16 Sep 2019 14:36:13 +0000 (16:36 +0200)
committerLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Mon, 16 Sep 2019 16:51:25 +0000 (18:51 +0200)
commitce904f4bd5e0c8d939753d57dfd6a2fee526d996
treeeeabda7ff955877e9ad84600617081ae970a5874
parent901b67a8b57eb5c48ea1333de89a2e8b0c6a196f
wdio-mediawiki: extract bot() function

This functionality was previously copy+pasted for most other methods,
and is also useful externally, to make API requests that are not covered
by other methods in Api.js.

createAccount() needs a different type of token, so for now we leave it
alone. (Perhaps the token type could become a parameter of bot() later?)

Change-Id: Ica24213a1f0d651bfc3fbffe24b63251a4841658
tests/selenium/wdio-mediawiki/Api.js