Commit Graph

269 Commits

Author SHA1 Message Date
Niklas Laxström
f43a00d5b8 Refactoring tests
Collaboratively

Change-Id: I6c5417a0681f9bb8596c36600a569df2ddd7bf9e
2013-09-16 15:55:51 -07:00
Kartik Mistry
e53f9176ce Integration tests for off-screen IME selector.
Change-Id: I0b3253ba9cb19afae41612435ef0a9604814f3ed
2013-09-13 23:23:14 -07:00
jenkins-bot
a7904a6d01 Merge "Make more tests pass in sandbox.translatewiki.net" 2013-09-06 12:44:05 +00:00
cmcmahon
813271b8a9 Wait longer, so the preference is saved.
Reported as bug 53772.

Change-Id: I8a0d6ae9d3cec06f953e6bb35abb9370e5551eec
2013-09-05 21:09:59 +00:00
Niklas Laxström
e36d9b1cc3 Regression: Using [...] to change language does not activate apply button
Bug: 53736
Change-Id: If52beb73f9f3f74cde63bd846974540682066ab6
2013-09-04 07:00:53 +00:00
Niklas Laxström
bcb2dd8b82 Make more tests pass in sandbox.translatewiki.net
* When ULS is in personal, cancel opens the language selector
  again but apply doesn't.
* Created separate steps for testing the ULS trigger in personal
  position, different behavior with different configuration.

Change-Id: Ifb7f101f2bfacd32c11cba69e7f2c01fe9bd9bb7
2013-09-04 09:37:28 +03:00
Santhosh Thottingal
3af403fee5 Make the cancel and apply button applicable for all modules
If a user does changes in module A, does not save or cancel,
goes to module B, does some changes, moves to other modules,
and finally presses Apply, all changes should get saved.

Similarly, if a user cancels, all changes should get cancelled.

This required moving the cancel and apply button outside of modules
and managed by the language settings framework.

Modules get mw.uls.settings.apply or mw.uls.settings.cancel triggers
to do whatever they want to do on apply or save.

Includes some refactoring related to this.

Bug: 53256
Change-Id: I7d773d33a980a78604b36e39bf96a5686870124e
2013-09-02 17:03:13 +02:00
Niklas Laxström
975e69d880 Cleanup and add documentation for tags
* Fixed one scenario to work with the default setting
* Fixed one typo in scenario
* Removed unused tags
* Documented the tags currently in use

Change-Id: I14687782857daf79dcd497b934dff99fc45a3997
2013-09-02 17:14:25 +03:00
Niklas Laxström
34146ea023 (bug 49738) Use correct name for wiki content language
Happens when anonymous user cannot change language, and the
language of the translation differs from the content language.

Change-Id: Ie4f15f1813eec992cfe060baf9cd7dcb5f8a0d95
2013-08-30 12:45:02 +03:00
Niklas Laxström
b90208affc New scenario: Discarding a live preview of a font keeps the previous font
Change-Id: I4dbd90263be5a35c654b850e6c3632959e8a3915
2013-08-30 12:18:26 +03:00
Niklas Laxström
53f19e9f70 Add test for language live preview cancellation
Change-Id: I4880667df23301f4235a05df575fb84554c17303
2013-08-30 10:47:01 +03:00
Niklas Laxström
773b8f42e6 Fix more tests for phantomjs
As a bonus got rid of JavaScript call.

Refactored uls-position code to a method.

Change-Id: I1df384a02909d430c12225525d5722a0520177ee
2013-08-30 10:47:01 +03:00
Niklas Laxström
54afab7ffc Assert that the login succeeded for more helpful error messages
Change-Id: I9f985d31de86fe2a062d10ca3f51fb2d7c727798
2013-08-30 10:47:01 +03:00
Niklas Laxström
a6e3ec586e Make tests pass in phantomjs
Change-Id: I0cb094b8a350b716cfb7b50ea6e370fd39fff1d6
2013-08-28 18:44:23 +03:00
Niklas Laxström
2a6ae9f162 More refactoring of tests per feature
Change-Id: Ie9acf09f9bb992f6e03ff6dfbb80e1e20a9d43ca
2013-08-28 14:56:24 +03:00
Niklas Laxström
3bd4bb4f03 Refactor ULS tests to reduce duplication and repetition
Change-Id: I96f1594f1b4d1960da9a8bc21e2a5c4727497b10
2013-08-28 14:08:17 +03:00
Niklas Laxström
d695b21381 Add new scenarios for font changes
There is currently some duplication between the various page objects
and other code. Those should be cleaned up incrementally.

Change-Id: I592829a00ca65bbecd5399b773c885c764c1cc06
2013-08-27 16:35:23 +03:00
Niklas Laxström
7f8f1136e8 Add gitignore and remove unsupported browsers
Change-Id: Ic415bcee0cfa8822a48396a2c1b086dbff200c2a
2013-08-27 14:03:47 +03:00
Zeljko Filipin
2547ed87b5 Moved ULS tests from browsertests repository
Change-Id: I4f4a4c5530ad7e5dff70171b59a589dc98b1ef29
2013-08-27 12:04:58 +02:00
Siebrand Mazeland
a373340aea Fix CSS error and add missing field labels, also update jQuery source
Change-Id: Ie30841d78befc04d58e8ec5c50c9fa51483a4088
2013-08-05 16:27:15 +08:00
Siebrand Mazeland
102f257427 Fix CodeSniffer errors and warnings
More fixes will be submitted upstream.

Change-Id: Ib22997f8756537b063fd6eed3f1f74f3eda315d7
2013-08-05 05:55:03 +02:00
Santhosh Thottingal
aee6c78935 Remove unused test html file
Change-Id: I66b897680c165837c81c4f736b87a6e11be98dbd
2013-07-19 11:43:57 +05:30
Amir E. Aharoni
b6698228d4 Allow loading redirects in Common languages
Bug: 49847
Change-Id: Ia2380a77ebad789a2f70a7a88a1bb9970199b1c5
2013-07-04 12:55:39 +00:00
Santhosh Thottingal
76e205234a Update webfonts test page
This was broken when the ULS javascript files were changed.

Change-Id: I7cb1769957a6514cd303aada459678a2ce8127ae
2013-05-22 11:52:22 +00:00
Niklas Laxström
142bdbd7c7 Better way to fix jslint warnings
Change-Id: Id56aa9c742bdd5dd7cec5848d1b44a4dafaca9c0
2013-05-22 09:41:20 +05:30
Santhosh Thottingal
bf270812f5 Fix all jshint errors
Change-Id: Ib8fb350132bb34c1e063eb644af5aeff833f95e8
2013-05-20 15:07:42 +05:30
Amir E. Aharoni
e99f5cf170 Preferences tests
This is a basic test that checks the writing preferences
does not result in an error.
It depends on I8fdc1a05 and I18a5ffb5.
It is very rudimentary: The saving test only checks that the API call
didn't result in an error. It should be enough to check for bug 41763,
but it doesn't really check that the options were written correctly.
It also doesn't do anything to distinguish anonymous and logged-in
users, the preferences for which work differently.

Change-Id: I417089eea64e8a84bd38a00bbb31cbb77dc5bd68
2013-01-09 14:45:28 +00:00
Amir E. Aharoni
c81c2170c3 Add redirect from als to gsw
The 'als' is used in a non-standard way in MediaWiki -
it may be used to represent the Allemanic language,
the standard code of which is 'gsw', while 'als'
is ISO 639 3 refers to Tosk Albanian, which is
not currently used in any way in MediaWiki.
This local fix adds a redirect for it.

Also add a test to check that it works correctly.

Change-Id: Id904cab129eb58f8b96ce493e77d21da7c44ea8b
2013-01-07 17:54:02 +02:00
Santhosh Thottingal
5a604d9f3f Updated webfonts test page with bold, italic, underline options
Works with font variants

Change-Id: Ic143498f1fa02f261e5740873a97929a8f6354b0
2012-11-14 17:05:25 +05:30
Siebrand Mazeland
d2d4bb5f67 Fix JSHint suggestions
Change-Id: I89dc3f39531f6426fd95b2521ba898cd4fbe04f2
2012-11-14 10:35:41 +05:30
Siebrand Mazeland
98d7a8d9f9 Reformat code.
Change-Id: Ic0a5b37fa01b4a13023e66af0518ea94919ee880
2012-11-11 10:34:10 +01:00
Amir E. Aharoni
5a4667c3fd Delete utils.data tests - they were moved to the jQuery component
Change-Id: Iead160c5845a64d4c0106037c2c7cf4d51eadae7
2012-10-10 16:27:20 +05:30
Amir E. Aharoni
8d31bf8c07 Updated util functions names after refactoring
jquery.uls.js is just updated from GitHub.

Change-Id: I506ab810d7136ba5d96dfdd469394a843110f8de
2012-10-08 20:50:49 +02:00
Santhosh Thottingal
99936c2b80 Update the test for webfonts
This was broken when jquery.uls moved to github

Change-Id: I874fb96301726792e7d22d66e71406192c44cf9f
2012-10-02 10:24:09 +05:30
Siebrand Mazeland
e1a4f7f0cb After training the PHPStorm code formatter.
See https://github.com/siebrand/MediaWiki-PHPStorm

Issue remains with anonymous functions in JavaScript.

Change-Id: I2b520f8df127452acf02deb659277a6465e6ca59
2012-09-17 17:10:59 -07:00
Santhosh Thottingal
6e1f652abc Update test cases and remove references to AU region
AU region does not exist, It was merged with PA

Change-Id: Icb0e8ec92b85db3b771d32c8728c02fd09c29a41
2012-09-14 22:17:15 -07:00
Amir E. Aharoni
de3abc3315 (bug 38679) Replacing regions NA, LA, SA with AM
Change-Id: Ib484dd9cb0453ec1bd214e0196119b14d96ac128
2012-09-01 10:09:16 +03:00
Amir E. Aharoni
8974e61984 Fix tests after regions renumbering
Change-Id: I7bcb561508d6410334d1d4e1c4508911820fc537
2012-08-30 21:04:18 +03:00
Santhosh Thottingal
baa3aae6cc Fix the LanguageNameSearch::search call used in phpunit test
Change-Id: Ib95e0738f6a6866dd7e7d84be0c0c6a03a671ce7
2012-08-30 21:54:10 +05:30
Santhosh Thottingal
93ed9a3ae3 Updated webfonts example
Change-Id: I4296fd973da66c000cb4acf3e1ee387dfaf4fbcb
2012-08-29 11:36:40 +05:30
Amir E. Aharoni
ca411138c7 Adding language presence by territory to langdb
A very simple mechanism for importing per-country language lists
from CLDR to ULS' langdb.

If I understand correctly, we only need languages spoken in a country
ordered by number of speakers. The CLDR data already has it and it should be
mostly useful.

Also added a utility function and a test.

Some tweaks to override the CLDR data are still needed:

* The data as it is omits some useful languages. For example, Amharic is not
  listed in Eritrea.
* Some countries have a very large number of languages. Ideally it's right,
  but is not practical currently, for example India with 75. Maybe
  hand-picking or limiting the choice to top X languages can be useful,
  but requires thought.
* Some language codes are standard, but different from Wikipedia practice,
  for example "pa_Guru" (we just write "pa"). Maybe a mapping of codes
  is needed.

Change-Id: I3c0cd5a9118997ba39a4f3695978e359f3de6956
2012-08-26 10:40:52 +03:00
Amir E. Aharoni
67dd765e13 Add basic information and utils for RTL scripts
Change-Id: Ie01b58cd3627e8f0bf726f0bb296bffb25efcbb5
2012-08-22 18:16:01 +03:00
Amir E. Aharoni
05a878ba9f Added French to NA (Quebec), SA (Guiana) and WW
Also updated tests accordingly.
Patch originally proposed by Aude.

Change-Id: Id83f6fb80d394e6fac4d7486ba2feae9e9c5bd99
2012-08-15 09:37:16 +03:00
Amire80
103269694f Merge "WebFonts integration with ULS display settings." 2012-08-15 06:01:13 +00:00
Santhosh Thottingal
8f7382b242 Introduce languages options to ULS
Default value of this option will be $.uls.data.autonyms().
It can be set to limit language selection to a set of languages.

Updated examples, used a config variable wgULSLanguages to set this.

Change-Id: Ia322cbdcdb14f08619d2e4df5b23e2702841d147
2012-08-15 08:52:46 +03:00
Santhosh
97758430ff Merge "Partly reverting the langdb" 2012-08-15 04:56:15 +00:00
Santhosh Thottingal
e62b50c9d8 WebFonts integration with ULS display settings.
This does not add much functionality. That will come in
future commits.

This commit has many cleanup, refactoring on the display settings,
language settings code.

Change-Id: I7fbc3ebb9b67c1afd80f159c2d82cd2a1c6bea74
2012-08-14 18:01:25 +03:00
Amir E. Aharoni
3d2e85664f Partly reverting the langdb
Multiple scripts and autonyms are not currently supported by ULS utils.
I commented out the problematic lines and left the current de-facto
situation in Wikipedia.
This is a TODO item, but it needs proper specification.

Also updated the tests somewhat.

Change-Id: I8cdc6ae430f5bb5af4b1890abf6e71a91b6beb3d
2012-08-14 16:46:11 +03:00
Niklas Laxström
3f4b5e4540 Mediawiki WebFonts repository for jquery.webfonts
Added license and upstream information and a
script to compile repoconfig automatically
from metadata.

also contains integration code

Change-Id: Ib39668249dd568a1f6017f0c08a3b9d1e2067ae4
2012-08-14 19:01:46 +05:30
Amir E. Aharoni
a3ab65906a Add Language settings dialog
Change-Id: Ie3455f32ac6ceff3c52d79643a6f7f82106ab7f1
2012-08-14 10:42:13 +05:30