npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wdio-mediawiki

v2.5.0

Published

WebdriverIO plugin for testing a MediaWiki site.

Downloads

11,466

Readme

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 [, string fragment ] ] )

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.config.mwUser and browser.config.mwPwd, which typically come from MEDIAWIKI_USER and MEDIAWIKI_PASSWORD environment variables.

  • bot([string username [, string password [, string baseUrl ] ] ])
  • createAccount(MWBot bot, string username, string password)
  • blockUser(MWBot bot, [ string username [, string expiry ] ])
  • unblockUser(MWBot bot, [ string username ])

Example:

bot = await Api.bot();
await bot.edit( 'Some page', 'Some initial content' );
await bot.edit( 'Some page', 'Some other content', 'Optional edit reason here' );
await bot.delete( 'Some page', 'Some deletion reason here' );

RunJobs

Use the static RunJobs.run() method to ensure that any queued jobs are executed before making assertions that depend on its outcome.

Util

Util is a collection of popular utility methods.

  • getTestString([ string prefix ])
  • waitForModuleState(string moduleName [, string moduleStatus [, number timeout ] ])

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.