Commit graph

96 commits

Author SHA1 Message Date
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
Tobias Gritschacher d079937e43 Fix browsertests README
Change-Id: I4ec4c22a69b4cf896b0f5a719f47ea84b7faaec3
2016-11-09 13:33:29 +01:00
Tobias Gritschacher 69e3a7dd6e Fix selecting betafeature in browsertests
this broke due to https://gerrit.wikimedia.org/r/#/c/315850/

Bug: T148841
Change-Id: I8997ec6d8bb210b87bb984a8f6aed2ba10dbd3f6
2016-10-21 17:29:01 +02:00
Tobias Gritschacher f3a239aa24 Refactor timeline browsertests
- Applied the Given-When-Then rule
- Added separate accessors for disabled arrow elements

Bug: T146276
Change-Id: I0278ef607f96851ed69e7373b952f5d02139cb0c
2016-10-13 15:22:57 +00:00
Tobias Gritschacher 3ca7099cc6 Refactor tooltips browsertests
- Applied the Given-When-Then rule

Bug: T146276
Change-Id: Ie9eb48cafd85ef7a00c9d9f9fd626fab5f128824
2016-10-13 15:22:46 +00:00
WMDE-Fisch a111213d36 Wait for pointers to finish moving in browsertests
This will avoid checking pointer data prematurely when
they are still moving and the diff was not reloaded yet.

Change-Id: I3c29a43940e40b7c338a00b3520e5aa6b237ea4a
2016-10-13 16:41:19 +02:00
Tobias Gritschacher 5553fe0688 Remove obsolete step
Bug: T146276
Change-Id: I9b1b8e2aa87b88bd18d58a46834e6090284314ee
2016-10-12 11:48:06 +02:00
Tobias Gritschacher 722242a600 Refactor history and pointers browsertests
- Applied the Given-When-Then rule
- Created alias for the "diff-has-loaded" step for readability
- Created higher-level step for loading the revisionslider
- Added assertions where missing
- Added ability to click the upper or lower area of revisionbars

Bug: T146276
Change-Id: Iad5abbb6e73a31afad1e2058b26ece3fbc7ad942
2016-10-12 10:46:24 +02:00
Tobias Gritschacher c2f4b64a3a Refactor help browsertest
- Applied the Given-When-Then rule
- Created alias of "close-help-dialog" step for readability

Bug: T146276
Change-Id: Icc8aeb8720025bd3c6d6bc811713fac48a9919dd
2016-10-10 14:52:24 +00:00
Tobias Gritschacher eeedd58f56 Refactor expand browsertests
- Applied the Given-When-Then rule to scenarios
- Added alias for one step for better readability of scenarios

Bug: T146276
Change-Id: I08aabda113d6ad9f1bbf06161484143549b13a7c
2016-10-07 16:11:12 +02:00
Tobias Gritschacher c7781efd34 Refactor autoexpand browsertests
- Applied the Given-When-Then rule to scenarios
- Small renaming of steps

Bug: T146276
Change-Id: I873be448f9b472aa7438bf525f79c403e1346641
2016-10-07 15:57:58 +02:00
Tobi Gritschacher a3244e1805 Expand Revision Slider when user activates pin button
Bug: T145068
Change-Id: I26bd6d3cbd2e0da6e3d537431a45ef8193906c40
2016-09-13 16:05:01 +02:00
Leszek Manicki c745c917c3 Wait for auto expand button before checking its state in browser tests
Change-Id: I8b8e43f14f6e6aa2ee619d823f93fdfeabb469ac
2016-09-06 17:44:52 +02:00
Leszek Manicki 8e7fe2434d Add eslint, to be used instead of jscs and/or jshint
First I jumped on replacing both jscs and jshint with eslint but
it might be premature decision. Although linting with eslint
is possible (like in there is wikimedia config for eslint)
it is still not clear should it

But in case the change happens we will be ready.

Apart from config stuff this changes few bits spotted by eslint:
improves some indentation, removes weird spaces, completes some
doc blocks, changes IIFE forms in tests. These changes do not
seem controversial.

Change-Id: I9f8bf0f5745da8e662685f4cd879ea4baa609c01
2016-09-05 09:47:11 +02:00
WMDE-Fisch 2c6bd11eda Avoid errors when elements are not loaded yet
Introduced when_visible where it might be usefull to avoid
flacky browser-tests.

Change-Id: I2c8c58aae1bc859062395a1795513d445ecb37f8
2016-08-31 18:28:50 +02:00
WMDE-Fisch 2da20ba593 Simplify visiblity checks for tooltips
Change-Id: I2eba136a92054df7431dedb7a83f5af38f4d01e9
2016-08-31 12:47:18 +02:00
Leszek Manicki e55f28f877 Remove not need browser test helper method
Slipped in in Id561485344cba9b136666fe31b086151467de19e

Change-Id: Iba279cd7f1b09709ac3f316fa5b7c14a30256d4c
2016-08-31 12:27:39 +02:00
Leszek Manicki 6502728184 Add button to have revision slider expanded automatically
This adds a button which allows a user to make revision slider
automatically expand on each diff page (disabled by default).
User's choice is stored as a hidden user preference.

This is a bit hacky as it squeezes a button on top
of another button (100% wide expand/collapse button).
This also adjusts styles of ToggleButtonWidget so
the button looks more like a frameless button, although
it is created as a framed one (to have inverted behaviour
when button is in its "on" state).

The button only gets visible when Resource Loader finishes
loading JS and CSS to avoid button jumping around the top
of slider window before "right" styles are applied.

Bug: T142196
Change-Id: Id561485344cba9b136666fe31b086151467de19e
2016-08-30 13:57:12 +02:00
jenkins-bot 805b92dd1a Merge "Use moment.js's localized date and time format" 2016-08-23 10:19:07 +00:00
Ed Sanders 6c9e3e36a6 Fix loading state of diff page
* The jQuery for appending the 'darkness' mask was broken (not nesting)
* Use a more semantic name
* Simplify styling to just set opacity to 50%.
* Remove browser compatibility hacks as all MediaWiki's JS
  supported browsers also support CSS opacity.

Change-Id: Id893a75bb90a4e6e2e8a26ebc3863de565d8a4ee
2016-08-15 11:20:34 -07:00
Leszek Manicki 90d652adef Use moment.js's localized date and time format
Localized format of date containing month name, day, year and time
is used instead of format enforcing the order of time and date,
and use of short month name.

Bug: T141167
Change-Id: I39b2844e777beb986cefb3097d52d481bb038a63
2016-08-11 11:40:30 +00:00
Ed Sanders f6a44f43fe Convert the few instances of IDs to classes
Makes for more modular code.

Change-Id: Ic71d7421aea548e5b4a9c4841cd4af49a3d385a5
2016-08-10 15:32:12 -07:00
Leszek Manicki e243ca2746 Do not load RevisionSlider initially, add a button to show/hide it
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.

This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.

API calls are only made once RevisionSlider has been expanded.

This is re-submit of b0f229d75f
that was reverted in I26427faaa00b38c2aa1377a66224c9062dcca302.

Bug: T141871
Change-Id: I879de5774b2cce7b908e73cbbe869fd48d6afa23
2016-08-10 16:26:54 +02:00
WMDE-Fisch c5690ba763 Revert "Do not load RevisionSlider initially, add button to load it"
This reverts commit b0f229d75f.

Change-Id: I26427faaa00b38c2aa1377a66224c9062dcca302
2016-08-09 16:34:53 +00:00
Leszek Manicki b0f229d75f Do not load RevisionSlider initially, add button to load it
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.

This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.

API calls are only made once RevisionSlider has been expanded.

Bug: T141871
Change-Id: Ib312f6225b85b9ebdf4ac5d16e254a57d5cf6411
2016-08-09 14:54:59 +02:00