Commit graph

136 commits

Author SHA1 Message Date
Tpt d51e0ae06a Make error HTML valid XHTML
Allows easy parsing using XML tools

Change-Id: I27b5a8b719d703636c2c09d513cd04766fc66ce1
2019-04-24 12:06:14 +02:00
Umherirrender 328e2f2c3b Use ::class for class name resolution
Available since php5.5

Change-Id: Ib2a249e81f4039d015f12ebcce04326c847c7b13
2019-03-08 19:11:50 +00:00
libraryupgrader 54d1b77401 build: Updating mediawiki/mediawiki-codesniffer to 24.0.0
Change-Id: I30daab715920757ec96350c9933fc18c887972c4
2019-02-06 23:08:22 +00:00
Ed Sanders 5f7f535c28 Update eslint-config-wikimedia to 0.9.0
Change-Id: I4c7dcb1b3cd3d03e3ea3d1e17bfcf63f3b553e50
2018-11-30 21:08:28 +00:00
Ed Sanders cf33c80b98 eslint: Use in all folders (including tests/selenium)
Change-Id: I0ab0a9f99817077934e7569d19d76735c33678e9
2018-11-12 17:08:22 +00:00
AndreG-P 2699479827 Link wikidata items to math tags
Adds a parameter that links individual formulae to their respective wikidata items.

Bug: T71424
Change-Id: I32cfe2039e62f163fe3aebaf77bafbdd84b343c6
2018-11-12 20:59:25 +09:00
jenkins-bot 817ada2cf1 Merge "Add tracking category for deprecated mhchem syntax" 2018-11-09 12:19:12 +00:00
Umherirrender d37698535a Add method scope visibility
Change-Id: I6b8e90017c9862fc082b216d44bebab34f3a6095
2018-11-02 18:52:06 +01:00
Moritz Schubotz (physikerwelt) a865a8565a
Add tracking category for deprecated mhchem syntax
Gets warning information from restbase and adds tracking categories
for deprecated chemical syntax.
Refactor mechanism to add tracking categories, and avoiding rechecking
already checked formulae.

Depends on: Ieca66f45ae7685d61eece1624bd7ff65ccad2eaa
Change-Id: I10e78ab79015dc1331f645c60b25bbbd237e23fe
2018-10-27 20:38:02 +02:00
Jakob Warkotsch b8153d0d24 Ensure database tests run as part of --group Database
The comments behind @group Database prevented the tests from being run
as part of the --group Database phpunit jobs.

Bug: T202223
Change-Id: I8dc68d3d90502fa7bd691cf18f0e296d97d3c893
2018-09-06 11:49:07 +00:00
Moritz Schubotz (physikerwelt) f0c8840148
Add math related styles and script via appropriate hook
Create MathDataUpdater class that checks if statements
are using math and adds the stlyes required for math in that case.

This patch has no effect until
I5bc0622ee7338f3215d14e15331a0a1931ca1ae0
is merged.

After both changes are in effect
I0abd6acbfa12fd503d11476f0c8c8c8a8a851cdc
can be merged.

Bug: T173949
Change-Id: I0e24bbb53e6e01d549f534744780ca1afc49fdd7
2018-07-24 16:40:52 +02:00
Thiemo Kreuz 97000ed8b0 Fix "@param $…" missing the type
Change-Id: I8d20ae852100a6ecc39df05eab3aa8e2b9c09480
2018-06-20 11:10:43 +02:00
Moritz Schubotz (physikerwelt) 9a04cd6de3
Improve test coverage for MathSource
Change-Id: I82d76db4b087b6472c2856806c70f4ef1ffbc8df
2018-06-08 16:25:11 +02:00
jenkins-bot ec99401072 Merge "Make use of the …::class feature whenever possible" 2018-06-06 12:24:31 +00:00
Moritz Schubotz (physikerwelt) e359eafe6c Improve tests coverage for MathPng
Change-Id: Ibb5138512afd20304983be44e0ab45a244634b4b
2018-06-06 10:30:53 +00:00
Thiemo Kreuz 5648b8e2c3 Make use of the …::class feature whenever possible
Note that a class is not resolved this was. …::class is not a function
call. It's more like a named string constant. Technically still a
string. The advantage is that IDEs and tools like linters can much easier
understand that these strings refer to a class, and list them in usage
reports, renames, and such.

Change-Id: I5225543dbb837685a1840837cb2772dd576cca38
2018-06-06 12:13:04 +02:00
Moritz Schubotz (physikerwelt) aa2c4cf913 Improve tests coverage for MathMathML
* deprecate and fix pickHost. It was broken and never used.
* simplify inputTypeSelection
* remove superfluous is_array check for the result of explode

Change-Id: I392f22f074facfe30b97d53a3002f464a471b67e
2018-06-01 15:36:35 +00:00
Moritz Schubotz (physikerwelt) c1c4e42c86 Improve tests coverage for MathFormatter
Change-Id: I2c9141753b59d99a1caf84279a0afcaf8431e631
2018-06-01 14:45:04 +00:00
Moritz Schubotz (physikerwelt) 4156f1c9b7
Remove dead texvc code from the math extension
In T74240 support for LaTeX based rendering of the <math/>-tags was
removed. This change eliminates the unused code from the repository.

Bug: T195871
Change-Id: Ic57d83fa49f090b574ce8b82fd2ebc84a5350318
2018-05-29 17:41:53 +02:00
Željko Filipin 88e9149e3e Delete Selenium tests in Ruby
They are replaced by Selenuium tests in Node.js.

Bug: T162455
Change-Id: I1f5bc8f9c5cd687a6ba116f2f0461eb2992096c7
Depends-On: Ibd8a39cc75231932f872456b8d3ec1fe41ef23e2
2018-05-25 05:58:17 +00:00
jenkins-bot 5581b9779a Merge "Selenium tests for Math" 2018-05-24 16:14:52 +00:00
Moritz Schubotz (physikerwelt) b5cf0e0b77
Serve png mode from mathoid
* Use the exactly same routines to deliver png images that are used in
  mathml mode.
* Change the output to use mathoids png image rather than the mathml
  and svg output.
* Locally tested on Firefox and Chrome: Depending on the mode either
  the SVG or the PNG path is used.

Bug: T74240
Change-Id: I4b1cac92eb9a02190f316faab6621940951603d5
2018-05-21 13:47:49 +02:00
Željko Filipin befe4af465 Selenium tests for Math
* Implement a basic tests that renders $2+3$

Bug: T162455
Change-Id: Ic605bd0d934d0f138390145fa5f5bddaa8f8e578
2018-05-19 17:04:22 +00:00
Thiemo Kreuz b12b4f740f Throw InvalidArgumentException when validating/formatting null
Change-Id: Ia46f76a89b26c830aab70ebf5fcc222711c325d1
2018-05-18 20:02:43 +02:00
Kunal Mehta 7a53bd905c Disable PHPCS more narrowly
Change-Id: I20d8b519d5827e865ccd3adf7c2c6ba069f37afb
2018-05-03 19:00:55 -07:00
Moritz Schubotz (physikerwelt) 88546ae1ad
Move phpunit test files
* currently the phpunit tests are not triggered by jenkins
* some test can't be re-enabled possible reasons:
** the texvc and texvccheck binaries are not available from jenkins
** the binaries can not be generated
** the path to the binaries are not set up correctly

Bug: T142120
Change-Id: I0c8fe5ad652c4663eeb029781521acbf56e42bad
2018-04-22 10:09:12 +02:00
Jayprakash12345 270b942c64 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I2fe982bc146355d7faec03e39a2a59e9d32e22be
2018-04-13 17:37:23 +00:00
jenkins-bot 0a8608399a Merge "Fix MathFormatter failing on new SnakFormatter format MIME types" 2018-04-13 16:11:03 +00:00
Thiemo Kreuz 1f87afa8e6 Fix MathFormatter failing on new SnakFormatter format MIME types
A formatter like this is not supposed to check if the format is known
or not. The code calling these formatters can introduce new (sub) formats
any time. What a formatter like this should do then are two things:
* If it's some HTML format, always return HTML.
* If you really can't identify the format, do a sensible fallback.

This currently blocks introducing a new format in Wikibase.

Bug: T46727
Change-Id: I585069e8f2ba33ec657ca4d514c6d502fe0f5ba3
2018-04-13 14:46:58 +00:00
jenkins-bot 3291177420 Merge "Use "@license GPL-2.0-or-later" according to SPDX" 2018-04-13 14:21:44 +00:00
jenkins-bot 04e17f7e1e Merge "Remove non-helpful comments" 2018-04-13 14:09:33 +00:00
Thiemo Kreuz 945ef79559 Use "@license GPL-2.0-or-later" according to SPDX
Change-Id: I5b9ba062f51dce9fcc10f7c31f37c137176bfff3
2018-04-13 16:07:10 +02:00
Thiemo Kreuz 920ca42c59 Remove insonsistent "@ingroup Extensions" tag
This is obviously copy-pasted from somwhere else. Note that this tag
only appears in these two files. No other file does have it. It's not
useful for anything this way.

Change-Id: I7e0dcf0594fb59b396b1fd26b13383d59227b3f9
2018-04-13 15:33:41 +02:00
Thiemo Kreuz 3f0398e031 Remove non-helpful comments
Documenting protected members as protected members is not really helpful.
One can see this by looking at the code.

Same for documenting a variable named "$html…" as "HTML". This does not
add anything.

Change-Id: I72364b6857166d77b9c85aa884cd139dc163c6bb
2018-04-13 15:32:05 +02:00
libraryupgrader 5a076f94aa build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment

Change-Id: Ia8000677263c4150d4900526bcba1c0602664b8e
2018-03-29 03:44:44 +00:00
Umherirrender 43b187e6fd Move @covers closer to test class
Change-Id: I25987f180c134b53f7ade3e2a2225328f5b088a8
2018-03-10 12:20:29 +00:00
Moritz Schubotz d8822169ab
Mathoid CLI interface
Renders formulae via mathoid without to run mathoid as a service.
Mathoid 0.7.1 or later must be installed locally and configured to be
accessed directly from the math extension. It has been tested with the
config.dev.yaml of version 0.7.1. If mathoid is installed in
'/srv/mathoid' the following line might be added to LocalSettings.php
$wgMathoidCli = ['/srv/mathoid/cli.js', '-c', '/srv/mathoid/config.dev.yaml'];
i.e., make sure to specify the -c parameter with an absolute path.
In addition mathoid uses more memory than the the default. With
the config.dev.yaml a value of
$wgMaxShellMemory = 2097152;
has been tested to work well.

Change-Id: I0600f056d21927963267cf979d342e313419e9fa
2018-02-21 20:29:20 +01:00
Moritz Schubotz (physikerwelt) 26e9f00c2a
Fix broken links in phpunit covers annotations
Phpunit now checks if the coverage annotations are reasonable.

This fix corrects unresolvable references in phpunit covers annotations.

Change-Id: I7eba10bd7dc445b175df750465bb80bd5ef0f4c6
2018-02-05 16:24:46 +01:00
Umherirrender 13d43ec6be Rename files to match classes
Change-Id: Iecf3ea2d0e7ec3dc0f743a3d1a8d85463939d19d
2017-12-10 12:42:41 +01:00
libraryupgrader bc0b7ee838 build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound

Change-Id: Ia2c06ebe33acefdf03625d86d98bf0dbaf826c4c
2017-09-01 04:53:09 +00:00
Kunal Mehta df1689c717 build: Updating mediawiki/mediawiki-codesniffer to 0.11.0
Change-Id: I8ce8155621fbfc5cb3dcf5dafbfa89796d0c1f11
2017-08-10 23:57:43 -04:00
Umherirrender 2bbb86b868 Improve some parameter docs
Change-Id: If7d52d77935b7dd6cddd583b9a6215735fa8b91e
2017-08-09 22:56:19 +02:00
Thiemo Mättig bdeec56d1f Fix and add missing documentation and fix minor code smell issues
Change-Id: Ifa2f8a47fbd0bdd20334f59dd06a21339b9a4292
2017-07-10 11:40:12 +02:00
Kunal Mehta fbd17b4fef build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.DuplicateReturn
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I46c900a5652a6560d18be6cd67badc37ed7f8d97
2017-06-21 00:59:25 +00:00
Moritz Schubotz f5fdda0ba1 Improve error reporting
Display error message in the UI,
if the check command passes,
but the mml/svg/complete endpoints returns an valid json error.

Bug: T143225
Change-Id: I50776926e42f75a2c1e30fc9afe08baae3fcdbd1
2016-08-17 21:15:02 +02:00
Željko Filipin 61abb07b5d Fix Watir::Wait::TimeoutError in Selenium tests
Bug: T137711
Change-Id: I9aeb9d4c38bff31bdc2f248b74b6797a4e518f3d
2016-06-13 17:03:40 +02:00
Željko Filipin c4636667d4 Fix Cucumber scenario that is broken in daily Jenkins jobs
"Welcome to Wikipedia" popup broke the scenario.

Bug: T94150
Change-Id: I5d3b41b8f3060f6edc41a5afe2c992fc6faca4e7
2016-05-16 18:11:59 +02:00
Željko Filipin d2ff0ef699 Fixed broken Selenium test
The test is broken on beta cluster because the formula is rendered as
meta tag. It is rendered at img tag on my mediawiki-vagrant virtual
machine. The test now works on both environments.

Bug: T128190
Change-Id: I458d618af24533d104fcac25a8d8c6468b14605a
2016-04-26 19:07:49 +02:00
jenkins-bot 462178f320 Merge "Migration of browsertests* Jenkins jobs to selenium* jobs" 2016-04-25 17:05:39 +00:00
Željko Filipin 7bc7a0cabf Migration of browsertests* Jenkins jobs to selenium* jobs
selenium* jobs are a new way of running Ruby based Selenium tests. The
jobs are triggered daily.

Bug: T128190
Change-Id: Ide349ea15e0c38ff9f61d348abd61cd2349a83f6
2016-04-25 18:31:00 +02:00