Commit graph

120 commits

Author SHA1 Message Date
Adam Wight 17ab004262 Fix test module copypasta
A few modules had wrong (duplicated) names.

Change-Id: Ib2ff195ee458a23d01e25a6cb1ff1b573dd9999a
2020-03-29 23:23:48 +02:00
jenkins-bot 2cc1c8617a Merge "build: Update dependencies and make them pass" 2019-10-24 06:56:48 +00:00
WMDE-Fisch 5c77b477e6 Use waitForModuleState from Util class
Change-Id: Ida52cf73686a1cc5af5ab955ef30daf15a2ec68a
2019-10-23 17:50:21 +02:00
WMDE-Fisch 8c9632385d build: Update dependencies and make them pass
Change-Id: Ia7764d44d7fbc8bf5c03e80887b58031a0de5d86
2019-10-23 17:46:39 +02:00
Amir Sarabadani 111d108150 Merge some resource loader modules
Each RL module comes with the cost of its name + hash being sent over every
request and in the startup module increasing the time to load the page.

Bug: T229791
Change-Id: I3ae230a84112a70ab369ffbff70e173b8f07ec1a
2019-08-14 23:10:25 +02:00
WMDE-Fisch 9e73c7d2c1 Fix re-highlighting of revisions
This was broken for obvious reasons. Also adding a test.

Change-Id: Ib6e8988884ff84472928758d4112574e17fa48be
2019-04-25 11:15:14 +02:00
WMDE-Fisch 1a18ab3d38 Add a few more selenium tests for the filter options
Change-Id: I7bb14987e2f2ef452953fb2b71aae7f697a4d820
2019-04-12 11:08:49 +02:00
WMDE-Fisch a2ca2c031e Add node selenium tests for revision highlight feature
The patch adds a first package of node selenium tests including
test for the user and tag filters.

The classes for user- and tag-rows were re-added to have better
access via selectors.

Change-Id: I8c53d9c923820e177d83ee900cee08e93cd3f65b
2019-04-11 17:58:53 +02:00
Kunal Mehta 46e2f60fec Remove empty tests/phan directory
tests/phan/issues is no longer populated, and stubs should be in .phan/stubs
going forwards.

Change-Id: I238ff73939c5b1b79594c8a043c4fe7082f93a65
2019-03-23 23:02:22 +00:00
gopavasanth 197bd4c7b3 Upgrade RevisionSlider to use newer phan
Bug: T216939
Change-Id: Icecfd92783dbe956133b2e63eeb6717fc1466cc0
2019-03-03 12:06:21 +05:30
Ed Sanders e62f46dd80 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Icf10ea6bbc09542e69c0cd583a4ee4f2f76a3f43
2018-11-16 16:33:52 +00:00
Ed Sanders 351bdcfae7 build: Update linters
Change-Id: If21c9dbeba945d54c6bcf9b6e4edd586c5b411ca
2018-09-13 21:58:39 +01:00
Thiemo Kreuz 48396b78c7 Rework and cleanup ext.RevisionSlider.DiffPage code
This is a direct follow up to the change done in I885f8e7. I found the
code very hard to read after the change, and tried to rearrange it a
little bit. This is what I came up with. What the code does is entirely
untouched.

This also rearranges the replaceWith calls so the replacements are done
from top to bottom.

This patch also avoids calling mw.config.set multiple times.

Change-Id: I1cbce8e8aa030d6ba5cd7d19ab26fa363e13474b
2018-09-04 10:52:16 +02:00
WMDE-Fisch af276e0f7f Re-enable testing bar clicking
Change-Id: I23f192cf47e2ff94521733f8b1b056152d5ad0fe
2018-08-14 11:25:40 +00:00
WMDE-Fisch 187e1e5194 Stabilize ruby selenium browser tests
- added sleep to let scripts load
- changed cookie setting to use vanilla JS
- replace deprecated visible methods
- fixed element definitions
- fixed indentation
- removed unused code

Change-Id: I21047f7c529eee7e22f84fe1023c9e23b74cffa0
2018-08-14 07:52:22 +00:00
Thiemo Kreuz 407c1de800 Use cookie to dismiss help dialog and fix failing browser tests
I have seen this failing:
https://integration.wikimedia.org/ci/job/mwext-mw-selenium-jessie/9255/console

The idea is to pre-set this cookie so the help dialog never shows up
in the first place. The tests do not need to look for the element, click
it, wait for the dialog to close. This should even speed up the browser
tests, I believe.

Also this adjustes waiting conditions in several places to address
timing issues with failing browser tests.

Since these tests should be replaced by Node.js on the long run I
added "sleep" in the cases although it's not recommended.

Change-Id: Ida381faa390aa62ebaadd3713864676be80abd51
2018-07-03 16:44:28 +02:00
Kunal Mehta 6d3d69c6d5 Migrate to mediawiki-phan-config
Change-Id: Id0175a253802650a740c071e86691334e282e3d7
2018-02-15 13:19:55 -08:00
libraryupgrader ce352749bf build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: If7e2cece08c3c99d7acd5617abfb8368ec699d0f
2017-09-24 12:30:47 +00:00
Addshore b86be90b06 Reintroduce improved hover and bar clicking
This patch mainly reintroduces the option to click on bars and move
the pointers with it. To do this, 'ghost' pointers are introduced
to show what would happen when bars are clicked. The pointers moved
differ depending on where the user clicks on a bar. Pointers are
still not allowed to change positions, so in some cases booth pointers
move with one click. See the task description.

The patch also includes some renaming and also refactoring of the
click handling in general. Furthermore bar hover mechanics are handled
by the RevisionListView class now.

Moving both pointers is not possible when it would push one of them of
limits.

Bug: T172092, T173566
Change-Id: I32a8256f7667e03081324d54accdf03a17454faf
2017-08-29 09:19:13 +00:00
Ed Sanders b1f2613d79 Use core wgDiffOldId/wgDiffNewId JS config values
Newly introduced in a469795efc5bc1c585c9f84ee289ee099833661d.
This will require MediaWiki 1.30.

Change-Id: I9897a77b24e258bf037f8ec6cafa1d0684bf867d
2017-07-18 16:16:05 +00:00
WMDE-Fisch 4a9ee131d3 Refactor pointer class names
Pointers can always be identified as the pointer for the "older" and
"newer" revisions. Class nameing was cleaned up and changed accordingly.

Change-Id: Id17878e780b5a405b196fdc5ec7429eeaef5bd4c
2017-07-11 10:17:24 +02:00
jenkins-bot ac5e6de6f4 Merge "Add jQuery reference to modules using it" 2017-07-06 14:31:29 +00:00
WMDE-Fisch edfd885543 Remove last SliderViewTwo parts
Bug: T165747
Change-Id: I9ac410613361e567bd825f096eb12bbb3edc5cde
2017-07-05 10:22:33 +02:00
WMDE-Fisch fc5c13f359 Merge draggableDragAction and dependencies
Also temporarily deactivate browser tests for bar clicking.

Change-Id: I347533ef445cb3c37e420beebcc79919e56a1223
2017-07-04 10:56:40 +00:00
WMDE-Fisch 64bf845aef Add jQuery reference to modules using it
Change-Id: Icf5ff3459978b7c7a5fa8e24b42981e789bcc492
2017-06-29 10:14:27 +02:00
Andrew-WMDE 80ab1408ac Remove BetaFeature Code
Bug: T167276
Change-Id: Iad2e34e2f906777c7ba0e22e245dc55891f211ae
2017-06-23 14:45:48 +02:00
WMDE-Fisch 0525f0bdb2 Do not assume that revIds increase in time
This patch fixes issues with the RevisonSlider assuming that the higher
revision id belongs to the newer revision. Min/Max methods to decide what
the diff and what the oldid is are removed and the usage of methods is
adjusted accordingly.

Also the test for switchover pointers is removed since this will not work
with the patch.

Bug: T164455
Change-Id: If5d9cbb8ebd872aee376d249942e6881c8edb984
2017-06-01 18:29:22 +02:00
WMDE-Fisch 72d19630ad Let revision bars leave space for the pointer line end border
The end border for the pointer lines can not be displayed because the
bars on the biggest revisions used all the height. This patch reduces
the max height of the bars slightly and refactores the calculating method.

Bug: T163436
Change-Id: Idfa6bdb9f85221063e13f3ec16b22fcfbe6cbd9c
2017-04-25 15:29:18 +02:00
WMDE-Fisch a79fd1624a Fix phan checks
Phan now can run and pass without BetaFeatures extension beeing installed.

Change-Id: I0bb8433fc9f882ff8e021785aba78f707cec00a1
2017-04-06 09:24:36 +02:00
WMDE-Fisch 268944a0b3 Remove browser tests for beta feature setting
The browser tests do not gain very much from the beta
feature tests and the default setting having the extension
only availible as a beta feature slows down the tests in
general.

Furthermore removing this will make it easier to let tests
pass for the temporary change in the slider logic.

Change-Id: I7377a6f11aa103af76d14fea3cbb34572495192a
2017-04-05 11:24:40 +02:00
WMDE-Fisch b0227f24b4 Renamed firstVisibleRevision to oldestVisibleRevison
The meaning of first in this context was totally unclear and not
very usefull. It turns out, that the "first" revision is always
the oldest and the last is always the newest revision.

Change-Id: I009438777908a5f4a8833f8f5cb7d3041057741c
2017-03-27 21:04:31 +02:00
WMDE-Fisch 8e361bcb36 Fix failing browser tests with new OOUI
Change-Id: I1c7c2511b3690e48c51ff1ca65a99c71185d3793
2017-03-22 14:13:01 +01:00
WMDE-Fisch f5e5c7a19c Increase browser test stability
The last times tests failed randomly at that point. The should
inrease stability there.

Change-Id: If679fc52cc501680b0f3feb6c27e3827a8b6fc6e
2017-03-21 13:35:02 +01:00
WMDE-Fisch 89b1f8a4da Rename CSS classes for help text
The is now consistent with other CSS naming and MW rules.

Change-Id: I4bcffe2d22692d1784ebb53c49f49c94f412486f
2017-03-16 15:53:39 +01:00
WMDE-Fisch edd9ed4dcb Add rubocop rules and make it pass
Change-Id: Ie0f7ea20c9f79a005a253b41c120ed40d884a1b8
2017-03-08 12:24:05 +01:00
jenkins-bot 7f851a48ca Merge "Refactor usage of OOjs UI tooltips" 2017-03-04 17:21:37 +00:00
jenkins-bot 159b2d4290 Merge "Update tests to Selenium 3" 2017-03-04 17:13:24 +00:00
WMDE-Fisch fbac5c69a4 Refactor usage of OOjs UI tooltips
This patch changes the way OOjs UI tooltips are constructed.
Until now we did not use the full potential of the widget.

Some strange behaviour remains and it seems we can not use
'horizontalPosition' here. Therefore the direction is passed
down to the RevisionsListView to center the tooltip manually
and margins are set for the help and arrow tooltips.

Bug: T159428
Change-Id: I0a67340da4d94f2f6b29e507f94fc695b44b71f9
2017-03-03 14:31:07 +00:00
WMDE-Fisch dc02babd02 Increase default timeout
Improving test stability

Change-Id: Ic6fe9e55ad7d8c5e8a5a8e616f3f16ca6ea5b732
2017-03-03 09:59:57 +01:00
WMDE-Fisch 12e6631dde Update tests to Selenium 3
The waitr click on the checkbox seems to be broken or is broken with
intend since the actual OOUI checkbox has an opacity of 0.

Additionally when_visible fails when the element is not present yet.
The the way to go here seems to wait for the element to be there
and then check for visibility.

Also made use of PageObject method for checkboxes, the name selector
and the link element.

Bug: T158074
Change-Id: I2c3d6d963c8bcdc420bfbc57c1c2380bce7ef2f1
2017-03-01 17:26:12 +01:00
addshore ce4bc18569 Attach to Newer / Older edit links
This now attaches the revisionslider to the
older and new links that are by default in the
diff.

This means when clicking them the revision slider
will use an ajax call to reload the diff (while moving
its own pointes) rather than reloading the whole page

Change-Id: I11fa92828140f980ca8edee27403a4e2a5f5a6a7
2017-02-03 15:06:20 +00:00
addshore 7d1d445417 Remove redundant phan exclude_file_list check
Change-Id: I12a1486ea034c5372516dbf77b1e19e9df078d4f
2017-01-20 15:02:14 +00:00
addshore 20e0d5a779 Add Phan config
See: https://www.mediawiki.org/wiki/Continuous_integration/Phan

Change-Id: I2e870d3e8994025e19d47a32b1ff229fbf2695bf
2017-01-04 11:02:04 +00:00
Tobias Gritschacher 233b69ccbf Check if QUnit tests are language-setting-proof
Change-Id: I6ed0cc013db676a587f734c1f35f117525405db7
2016-12-20 14:44:56 +01:00
Tobias Gritschacher f81d65bf6d Revert "Reset custom separator transform tables in number formatting tests"
This reverts commit b46c105202.

Checking if this was fixed by changes to core.

Change-Id: Ia8dcae5227163edd5911cd1ea3c1b0213f7e654d
2016-12-20 13:23:33 +00:00
Leszek Manicki b46c105202 Reset custom separator transform tables in number formatting tests
Looks like custom settings used in a test for number separator
transformation added in Icc9bc09675151645055c7e7f706472a15cc81b0f
influenced RevisonSlider's tests resulting in test failure if
that core test was run before RS test.
Relevant RevisionSlider tests now are ignoring any custom value.
Any value before the test is restored after the test run, though,
in case other tests relied on this (which does not seem to be a case).

Bug: T153121
Change-Id: Ida81b93e4d081b6948e760995a92d182ad79fe0f
2016-12-14 11:23:28 +01:00
addshore 2cf768f7b7 Lazy load most of the JS
With the parent of this commit (current master)
Loading the RevisionSlider JS without it expanded increases
the request size by roughly 767KB on first request and 242KB
on subsequent requests.
The large size of the first request is mainly down the to
dependancies of the slider.

This lazy loading patch means the RevisionSlider JS
only causes an increase of 184 KB per request.

If the user has the bar expand by default the main JS will
be loaded straight away (and the lazy JS will not be).

This patch also means that when only the bar is loaded the
pin button to set auto expand will not be shown.
This will be added once the RevsionSlider is loaded.

Bug: T151668
Change-Id: I054a82e9ea2aa89326464632e744497239f7adba
2016-11-30 11:59:16 +01:00
Ed Sanders 1c3ef546ad eslint: Remove old jshint/jscs refs, fix exceptions
Change-Id: I56b9f037405d0f93f82dc81dad1cc1b111be338e
2016-11-19 13:37:20 +00:00
James D. Forrester 3269f791f5 build: Bump eslint-config-wikimedia to v0.3.0 and make pass
Change-Id: I774e05c4393eca8b4719f335a124efcb3d2a6dd5
2016-11-15 16:48:38 -08:00
Tobias Gritschacher 518aea3ead Clean-up browsertests
- add Gemfile.lock
- use recent version of gems
- ditch README and link to wiki documentation
- clean-up environments

Change-Id: I76bb1d491911abbc0c0bb4387b436ab3ff2cebc2
2016-11-14 12:07:41 +01:00