mediawiki_selenium 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bacf5f933bc56eb780b7c2121c08b126510d9e9
4
- data.tar.gz: e61ffa4d2f0ea2e3b43a2dd5794dff2afa67ac25
3
+ metadata.gz: 5b9d34f69b4891d046792c1d08c95381ad7a307d
4
+ data.tar.gz: 4b7ccde7d48e16ad61c9147f35f478d0a081ab82
5
5
  SHA512:
6
- metadata.gz: 1b5b637474eaaf3be59c4ca14ffd45e8b687f708010cd9ae1babdd4eff7057a4ebbe4f9050e2a0a37327c3f729995e6710ebf9cf2889d568f0a098f560e4d2d5
7
- data.tar.gz: d2d32be0f848edf29d7974014fe48c0ed61d5f022119f5ff93bcbe1a4e219d5bb49285bbc8a2bb4f8af6b0b79d5b8d7e6620135dcce4f76d5be9b33ae05541bb
6
+ metadata.gz: 8118784009a3baac049aa40cce035cf7049f3916d5652cceb07af325c4b2a832ebbe97e6468c206853dac324161306354c9a0aa5b3894523e270a48456b9c23e
7
+ data.tar.gz: e3761449bb85794401858c715c510ce57be53952fc4004343f628bc3b6424960400262904f1cd8512ddbe899b124e9aa825c0d7b1c248edc01a20f235b1d0f3f
@@ -16,9 +16,11 @@ require "mediawiki_selenium/support/hooks"
16
16
  require "mediawiki_selenium/support/sauce"
17
17
 
18
18
  require "mediawiki_selenium/step_definitions/login_steps"
19
+ require "mediawiki_selenium/step_definitions/navigation_steps"
19
20
  require "mediawiki_selenium/step_definitions/preferences_steps"
20
21
 
21
22
  require "mediawiki_selenium/support/modules/url_module"
22
23
 
23
24
  require "mediawiki_selenium/support/pages/login_page"
25
+ require "mediawiki_selenium/support/pages/random_page"
24
26
  require "mediawiki_selenium/support/pages/reset_preferences_page"
@@ -0,0 +1,14 @@
1
+ =begin
2
+ This file is subject to the license terms in the LICENSE file found in the
3
+ mediawiki_selenium top-level directory and at
4
+ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/LICENSE. No part of
5
+ mediawiki_selenium, including this file, may be copied, modified, propagated, or
6
+ distributed except according to the terms contained in the LICENSE file.
7
+ Copyright 2013 by the Mediawiki developers. See the CREDITS file in the
8
+ mediawiki_selenium top-level directory and at
9
+ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
10
+ =end
11
+
12
+ Given(/^I am at a random page.*$/) do
13
+ visit RandomPage
14
+ end
@@ -0,0 +1,45 @@
1
+ =begin
2
+ This file is subject to the license terms in the LICENSE file found in the
3
+ mediawiki_selenium top-level directory and at
4
+ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/LICENSE. No part of
5
+ mediawiki_selenium, including this file, may be copied, modified, propagated, or
6
+ distributed except according to the terms contained in the LICENSE file.
7
+ Copyright 2013 by the Mediawiki developers. See the CREDITS file in the
8
+ mediawiki_selenium top-level directory and at
9
+ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
10
+ =end
11
+
12
+ Then(/^page has no ResourceLoader errors$/) do
13
+ @browser.execute_script("
14
+ return (function() {
15
+ // Returns a string listing problem modules,
16
+ // or empty string if all OK (or not a MediaWiki page).
17
+ // MediaWiki registers many JS modules that are not loaded on average pages.
18
+ var i, len, state,
19
+ modules = mw.loader.getModuleNames(),
20
+ error = [],
21
+ missing = [],
22
+ ret = '';
23
+ if ( ( typeof mediaWiki === 'undefined' ) || !mediaWiki.loader ) {
24
+ return ret;
25
+ }
26
+
27
+ for ( i = 0, len = modules.length; i < len; i++ ) {
28
+ state = mw.loader.getState( modules[i] );
29
+ if ( state === 'error' ) {
30
+ error.push( modules[i] );
31
+ }
32
+ if ( state === 'missing' ) {
33
+ missing.push( modules[i] );
34
+ }
35
+ }
36
+ if ( error.length ) {
37
+ ret += 'Error modules: ' + error.join( '; ') + '.';
38
+ }
39
+ if ( missing.length ) {
40
+ ret += 'Missing modules: ' + missing.join( '; ') + '.';
41
+ }
42
+ return ret;
43
+ }) ();
44
+ ").should == ""
45
+ end
@@ -0,0 +1,17 @@
1
+ =begin
2
+ This file is subject to the license terms in the LICENSE file found in the
3
+ mediawiki_selenium top-level directory and at
4
+ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/LICENSE. No part of
5
+ mediawiki_selenium, including this file, may be copied, modified, propagated, or
6
+ distributed except according to the terms contained in the LICENSE file.
7
+ Copyright 2013 by the Mediawiki developers. See the CREDITS file in the
8
+ mediawiki_selenium top-level directory and at
9
+ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
10
+ =end
11
+
12
+ class RandomPage
13
+ include PageObject
14
+
15
+ include URL
16
+ page_url URL.url("Special:Random")
17
+ end
@@ -10,5 +10,5 @@ https://git.wikimedia.org/blob/mediawiki%2Fselenium/HEAD/CREDITS.
10
10
  =end
11
11
 
12
12
  module MediawikiSelenium
13
- VERSION = "0.2.9"
13
+ VERSION = "0.2.10"
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mediawiki_selenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris McMahon
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-03-06 00:00:00.000000000 Z
15
+ date: 2014-03-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: cucumber
@@ -195,11 +195,14 @@ files:
195
195
  - README.md
196
196
  - lib/mediawiki_selenium.rb
197
197
  - lib/mediawiki_selenium/step_definitions/login_steps.rb
198
+ - lib/mediawiki_selenium/step_definitions/navigation_steps.rb
198
199
  - lib/mediawiki_selenium/step_definitions/preferences_steps.rb
200
+ - lib/mediawiki_selenium/step_definitions/resource_loader_steps.rb
199
201
  - lib/mediawiki_selenium/support/env.rb
200
202
  - lib/mediawiki_selenium/support/hooks.rb
201
203
  - lib/mediawiki_selenium/support/modules/url_module.rb
202
204
  - lib/mediawiki_selenium/support/pages/login_page.rb
205
+ - lib/mediawiki_selenium/support/pages/random_page.rb
203
206
  - lib/mediawiki_selenium/support/pages/reset_preferences_page.rb
204
207
  - lib/mediawiki_selenium/support/sauce.rb
205
208
  - lib/mediawiki_selenium/version.rb