summaryrefslogtreecommitdiff
path: root/tests/browser/README.mediawiki
blob: 226576275f6f9fe8b630a043a5ecfb62e258e1fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Purpose:

The purpose of these tests is to validate that a newly installed (or updated, or hacked, or whatever) mediawiki instance presents to the user a set of expected features, regardless of what language the wiki is in, or where it is installed, or what extensions it might have.

The tests are based on the basic definition of a wiki, a website where anyone

* can read a page
* can create a page
* can edit a page
* can link one page to another page

Install:

Ruby 1.9.3 or higher is required
Firefox browser is required
::
 cd /tests/browser
 gem update --system
 gem install bundler
 bundle install

Run the tests:

Edit the environment_variables file with appropriate values for your wiki
$source environment_variables (example shown in bash shell)

bundle exec cucumber features/

Note that the acceptance tests will create three pages in your wiki entitled "Editing Test Page", "Link Source Test Page", and "Link Target Test Page".  These pages may be deleted at any time.  If you wish to re-run the tests at any time, these test pages will be re-created or reset to their original contents at the time that the tests run.

For more information about running Selenium tests please see
https://github.com/wikimedia/mediawiki-selenium

Details:

create_account.feature
* Checks three different ways to arrive on page allowing the user to create an account

create_and_follow_wiki_link.feature:
* uses the mediawiki API to create a link target page
* uses the mediawiki API to create a link source page
* navigates a browser to the link source page
* clicks the link in that page to the link target page
* validates that the browser has in fact followed the link to the target page correctly

edit_page.feature:
* uses the mediawiki API to create an editable page on the wiki
* navigates a browser to the page
* clicks the Edit button to invoke the basic editor
* edits the page with a particular string containing a static part and also a quasi-unique random part
* saves the edited page
* checks that the saved page contains the particular string with which the page was edited

main_page.feature:
* navigates a browser to the default landing page of the wiki
* checks for the View History link on the landing page
* checks for the full set of of sidebar links that should exist on every mediawiki wiki

view_history.feature
* similar to edit_page.feature but checks for an older version of the edited page

Notes:

Tested on beta labs hewiki, dewiki, enwiki, and on a local installation of mediawiki