Pablo Grass e908d347ef selenium: invoke jobs to enforce eventual consistency 6 年之前
..
specs e552e95f71 Selenium: Daily Jenkins job targeting beta cluster should run only tests that pass 6 年之前
.eslintrc.json 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
Api.js 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
BlankPage.js 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
CHANGELOG.md cee33128c8 wdio-mediawiki: Tag v0.2.0 6 年之前
LICENSE 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
LoginPage.js 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
Page.js 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
README.md 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
RunJobs.js e908d347ef selenium: invoke jobs to enforce eventual consistency 6 年之前
Util.js bde7249241 selenium: Remove '☃' character (U+2603 snowman emoji) from random usernames 6 年之前
index.js 16a4d9da7b selenium: Initial version of wdio-mediawiki package 6 年之前
package.json cee33128c8 wdio-mediawiki: Tag v0.2.0 6 年之前

README.md

wdio-mediawiki

A plugin for WebdriverIO providing utilities to simplify testing of MediaWiki features.

Getting Started

Page

The Page class is a base class for following the Page Objects Pattern.

  • openTitle( title [, Object query ] )

The convention is for implementations to extend this class and provide an open() method that calls super.openTitle(), as well as add various getters for elements on the page.

See BlankPage and specs/BlankPage for an example.

Api

Utilities to interact with the MediaWiki API. Uses the mwbot library.

Actions are performed logged-in using browser.options.username and browser.options.password, which typically come from MEDIAWIKI_USER and MEDIAWIKI_PASSWORD environment variables.

  • edit(title, content)
  • delete(title, reason)
  • createAccount(username, password)

Versioning

This package follows Semantic Versioning guidelines for its releases. In particular, its major version must be bumped when compatibility is removed for a previous of MediaWiki.

It is the expectation that this module will only support a single version of MediaWiki at any given time, and that tests in older branches of MediaWiki-related projects naturally use the older release line of this package.

In order to allow for smooth and decentralised upgrades, it is recommended that the only type of breaking change made to this package is a change that removes something. Thus, in order to change something, it must either be backwards-compatible, or must be introduced as a new method that co-exists with its deprecated equivalent for at least one release.

Issue tracker

Please report issues to Phabricator.

Contributing

This module is maintained in the MediaWiki core repository and published from there as a package to npmjs.org. To simplify development and to ensure changes are verified automatically, MediaWiki core itself uses this module directly from the working copy using npm Local Paths.