selenium: Initial version of wdio-mediawiki package
[lhc/web/wiklou.git] / tests / selenium / wdio-mediawiki / README.md
1 # wdio-mediawiki
2
3 A plugin for [WebdriverIO](http://webdriver.io/) providing utilities to simplify testing of MediaWiki features.
4
5 ## Getting Started
6
7 ### Page
8
9 The `Page` class is a base class for following the [Page Objects Pattern](http://webdriver.io/guide/testrunner/pageobjects.html).
10
11 * `openTitle( title [, Object query ] )`
12
13 The convention is for implementations to extend this class and provide an `open()` method
14 that calls `super.openTitle()`, as well as add various getters for elements on the page.
15
16 See [BlankPage](./BlankPage.js) and [specs/BlankPage](./specs/BlankPage.js) for an example.
17
18 ### Api
19
20 Utilities to interact with the MediaWiki API. Uses the [mwbot](https://github.com/Fannon/mwbot) library.
21
22 Actions are performed logged-in using `browser.options.username` and `browser.options.password`,
23 which typically come from `MEDIAWIKI_USER` and `MEDIAWIKI_PASSWORD` environment variables.
24
25 * `edit(title, content)`
26 * `delete(title, reason)`
27 * `createAccount(username, password)`
28
29 ## Versioning
30
31 This package follows [Semantic Versioning guidelines](https://semver.org/) for its releases. In
32 particular, its major version must be bumped when compatibility is removed for a previous of
33 MediaWiki.
34
35 It is the expectation that this module will only support a single version of MediaWiki at any
36 given time, and that tests in older branches of MediaWiki-related projects naturally use the older
37 release line of this package.
38
39 In order to allow for smooth and decentralised upgrades, it is recommended that the only type of
40 breaking change made to this package is a change that removes something. Thus, in order to change
41 something, it must either be backwards-compatible, or must be introduced as a new method that
42 co-exists with its deprecated equivalent for at least one release.
43
44 ## Issue tracker
45
46 Please report issues to [Phabricator](https://phabricator.wikimedia.org/tag/mediawiki-core-tests/).
47
48 ## Contributing
49
50 This module is maintained in the MediaWiki core repository and published from there as a
51 package to npmjs.org. To simplify development and to ensure changes are verified
52 automatically, MediaWiki core itself uses this module directly from the working copy
53 using [npm Local Paths](https://docs.npmjs.com/files/package.json#local-paths).