Commit graph

183 commits

Author SHA1 Message Date
WMDE-Fisch 95540a313c Merge tooltip browser tests
No need to build up two test here with refreshing the page.

Change-Id: I9bc5b44e2b92704b896edaaa03affac216b9dbce
2024-02-02 16:53:02 +01:00
Umherirrender 748c7d9b89 tests: Use namespaced classes
Change-Id: I5f578ee6a91720921512bb8321ee7a95dd3d3aa4
2024-01-05 21:23:18 +01:00
gerritbot 419865a72b Update StaticUserOptionsLookup's FQN
User-options related classes are being moved to
the MediaWiki\User\Options namespace in MediaWiki Core;
reflect that change here.

Bug: T352284
Depends-On: I42653491c19dde5de99e0661770e2c81df5d7e84
Change-Id: I5b9f4c7ea90f492f75b9055b801ec0853da22687
2023-11-29 17:55:18 +00:00
WMDE-Fisch 6482107b14 build: Update linter libs
* "eslint-config-wikimedia": "0.26.0"
* "grunt-eslint": "24.3.0"
* "grunt-stylelint": "0.19.0"
* "stylelint-config-wikimedia": "0.16.1"

Including auto fixes.

Change-Id: I24374dad734fca734f9c5e25cfa5b5380ad24c46
2023-11-24 10:14:15 +01:00
thiemowmde d20cead930 Split large hook handler function into named methods
Change-Id: Ided2c233829166bd691f01cb8b619f03c1ca4ff2
2023-11-08 09:16:38 +01:00
jenkins-bot ff56357289 Merge "Partly drop dependency from RevisionListView to RevisionList" 2023-10-26 12:21:38 +00:00
thiemowmde 0d8158de5c Partly drop dependency from RevisionListView to RevisionList
It turns out the view class doesn't really do anything with the
RevisionList object. All it does it manually iterating the array of
revisions. But it doesn't call anything from the RevisionList class.
With a single exception.

Warning: This doesn't mean the RevisionList class is pointless. It's
critical because this is where the relativeSize fields are calculated.

Bug: T224971
Change-Id: I06b8af815bb6f931355d68aa511070fb34b08156
2023-10-26 13:58:59 +02:00
thiemowmde 6178ba7936 Fix docs and avoid duplication in PointerView class
Change-Id: I82395995dadd3c7f7f8d7973c5e51cc367e11b5a
2023-10-23 18:38:18 +02:00
thiemowmde 75ea1a1e21 Add missing PHPUnit tests for hook handlers
Bug: T345620
Change-Id: I98283917644116da2a9668a5618bac086c863227
2023-09-21 12:47:39 +02:00
WMDE-Fisch de99612520 Rename tag/user highlighting to free up the term
While working on renaming and consolidating some methods I found
it puzzeling, that the generic "highlight" word is already taken
by the filter mechanism. So I made these things more specific.

I checked the global wiki search if any user referes to these to
override CSS. It seems nobody does, so the change should be save.

Change-Id: I47c149978b0527c2d9e91709ef9d704526d56101
2023-09-05 12:01:02 +00:00
thiemowmde 3d93003dcc Drop wikitext comment in favor of parsedcomment
The plain wikitext comment is apparently not used for anything,
anywhere. It was for some reason used for an "is empty" check. But
we can do the same with the `parsedcomment`. I checked and an empty
comment doesn't result in something non-empty like `<div></div>`, but
stays as an empty string.

Change-Id: Iedc5898b7b0f82231328ab3e0e46b1461ca845b1
2023-08-25 14:42:32 +02:00
WMDE-Fisch d4693da19f selenium: run tests concurrently
Bug: T337862
Change-Id: Iff2b05070772955f048010010b1bac38881c54ec
2023-06-23 15:01:41 +02:00
Adam Wight b900446572 Migrate JS to ES6
Reintroduces IIFE closures in test files because variables were
declared in the global namespace, and "const" now causes hard errors.

Bug: T339323
Change-Id: I69e9d7a29591137f185f3e5ab02dea590ec4dff6
2023-06-23 08:01:31 +02:00
WMDE-Fisch 8fe657e90e Fix test for scrolling over revisions
Due to some change in the test setup, possibly related to the new
Vector skin, the slider now has more space and the need to scroll
triggers at a later point.

Change-Id: I5411d5a31714761434135e65d916f57f1e437003
2023-05-22 13:13:06 +03:00
Fomafix 65d1dfefbf Use document.body instead of 'body' as jQuery selector
Change-Id: I2e74d31b61f5f46d1bbb1a0283a7468af9c4e856
2023-04-21 08:52:25 +00:00
Vaughn Walters 8a53d056be selenium: Refactor WebdriverIO tests from sync to async mode
WebdriverIO has dropped support of sync mode, hence changed to async.

Update npm packages: @wdio/*, wdio-mediawiki
because async mode needs at least @wdio v7.9.

Remove npm packages: @wdio/dot-reporter and @wdio/sync.

Bug: T300798
Change-Id: I053ea6b5fbfdcff279f4eb10cf2429155690bd72
2023-03-31 14:10:46 -05:00
Ed Sanders 4a44f8c2e5 build: Update devDependencies
Change-Id: I0bbd117b2b3ebdfee8deb7ed38b409a561f570d5
2022-03-17 22:55:02 +00:00
WMDE-Fisch 1fa153aeab Fix issues to prepare for lint update
The new mw eslint config comes with node 12 and the change will be
quite big due to the lock file. I wanted to keep the diff of actual
code changes seperate.

- Applied all code style recommendations
- Removed one test that's not giving any value
- Changed regex .match to .test for performance and convinience

Change-Id: I578be8c6460c7a4d1220354c028a9bfd9bb86d13
2022-01-13 13:59:53 +01:00
Thiemo Kreuz 9aca3a2593 Merge ….RevisionList ResourceLoader module away
It's never used in another context but together with the
….Slider module.

Motivated by the confusion about the two types of require()
introduced in Idf1cc79.

Bug: T233279
Change-Id: I922d7ab56fd3ce80bc901f1a5d7174df6fe6756d
2021-12-20 12:13:09 +01:00
jenkins-bot d8c013e323 Merge "Merge ….HelpDialog ResourceLoader module away" 2021-12-17 13:48:22 +00:00
jenkins-bot fd8b96b791 Merge "Merge ….Pointer ResourceLoader module away" 2021-12-17 13:48:20 +00:00
Thiemo Kreuz 1407e0a90d Merge ….HelpDialog ResourceLoader module away
It's never used in another context but together with the
….Slider module as well as the ….init module. The ….init
module continues to require the ….Slider module, so all
dependencies are still met.

Motivated by the confusion about the two types of require()
introduced in Idf1cc79.

Bug: T233279
Change-Id: I4b4ef69f3074d57f884763c092a515ce976daaef
2021-12-16 16:45:41 +01:00
Thiemo Kreuz 319061c92a Merge ….Pointer ResourceLoader module away
It's never used in another context but together with the
….Slider module.

Motivated by the confusion about the two types of require()
introduced in Idf1cc79.

Bug: T233279
Change-Id: I7c98a41051e6d83ab3524cb14a709002feec2d78
2021-12-16 16:39:07 +01:00
Ed Sanders 64effa6e42 Move var declarations inline
Change-Id: If1256b01f6ac8237c79b5ba62f20ad65f1dc7691
2021-10-07 14:55:44 +01:00
sahil 45b95f90f3 selenium: Upgrade WebdriverIO to v7
Update npm packages: @wdio/* and webdriverio.

Also adding a fallback for the case, that the slider does
not open as expected.

It seems, that the update is causing some issues when
waiting for the module state. Waiting for the lazy module
in DiffPage.ready() should make sure, that the event to
trigger the opening of the slider is in place. This seems
to fail sometimes.

Bug: T274579
Change-Id: Icd597fc5aaa857879a8af310166867d433ba0678
2021-07-02 17:36:55 +05:30
jenkins-bot 28bd07bcb6 Merge "selenium: Update wdio-mediawiki and fix window resizing" 2021-05-27 08:39:19 +00:00
Adam Wight 40de993f4c selenium: Update wdio-mediawiki and fix window resizing
wdio-mediawiki v1.1.1:
- Includes wdio-defaults.conf.js file that vastly simplifies wdio.conf.js.
- Replaces @wdio/spec-reporter with @wdio/dot-reporter.
- Introduces video recording.

Some part of the new setup seems to influnce they way how resize is applied
to the window. The fix makes sure it works as expected.

Bug: T283597
Change-Id: I20697815591243367b5a8bdd1cd1cc173a1ddc77
2021-05-27 10:17:30 +02:00
sahil 0a8d861b05 selenium: Update README.md file
Bug: T282237
Change-Id: I089bad7629246a93032174665ad10826c5789e53
2021-05-24 17:59:49 +00:00
Adam Wight 8132e43a20 Migrate Slider module to packageFiles
Change-Id: Idf1cc799ab37ec8f49b3a28d161b6cd53090f707
2020-11-19 09:13:45 +00:00
Adam Wight ebd9985afc Migrate RevisionList to packageFiles
Change-Id: I3299d3a4bc66a3b85d0d0f7d8a49edbf8f6329c3
2020-11-19 08:54:10 +00:00
jenkins-bot 316aac146a Merge "Remove closure wrappers from all JavaScript code" 2020-11-18 10:28:26 +00:00
Thiemo Kreuz 4ac1ff57f1 Remove closure wrappers from all JavaScript code
These are not needed any more, because the code runs in a
seperate scope anyway.

Change-Id: I939a06102f194a0c98021accb2f62be73dd0562f
2020-11-18 11:16:04 +01:00
WMDE-Fisch b37389e91b Remove leftovers from Ruby selenium tests
Bug: T180247
Depends-On: Ie0b252f20f06a621729f27ec3d96c52e5a9c2487
Change-Id: Id67a2dbb830d9af65ef196be6fc0cf58b4838192
2020-11-17 12:06:49 +00:00
Svantje Lilienthal 7649e6c0f3 ported help.feature from ruby to node.js
Change-Id: Ia9d86b50ab0f555e4c32093b45430182bc68f2eb
2020-11-17 11:03:45 +00:00
Thiemo Kreuz c57fe0f2b6 Get rid of all var … = function () {} declarations
… and replace them with more trivial `function …() {}`. I
believe this does not make any difference. But I feel this
makes the code a little more straightforward.

The motivation for this patch is because a few other patches
change some of these function declarations, leaving a (in my
opinion) confusing mixture of styles behind.

Change-Id: Ib8928c4176a963afcf1fee1c785dd7bdc86c9706
2020-11-12 19:23:40 +00:00
Svantje Lilienthal 3726c47ad2 ported tooltips.feature from ruby to node.js
Bug: T267204
Change-Id: I76f71532030afc6f12b29f117e5161b40c2f9cd1
2020-11-11 17:45:27 +00:00
WMDE-Fisch 69bf1e0dea Try with a minimum set of revisions for timeline test
Reducing the width further leads to a strange behavior were it fails.

Locally this test is about 30% faster this way.

Change-Id: I5f950041ccf0f2f326ad6d9023d300e6a344f902
2020-11-09 15:34:06 +01:00
WMDE-Fisch 4734f69efb Reduce some test revisions to minimum needed
Change-Id: I12572558a47824de284904bc24dd940281b689a9
2020-11-09 13:48:16 +01:00
jenkins-bot 08276faacc Merge "Remove redundant TODO for revision bar click tests" 2020-11-09 12:23:52 +00:00
jenkins-bot 14a654bb96 Merge "Rewrite fragile wait" 2020-11-09 12:23:51 +00:00
jenkins-bot 121fbc4734 Merge "Improve dragPointer methods and use them in history spec" 2020-11-09 12:01:00 +00:00
jenkins-bot 79ff26da88 Merge "Merge methods waiting for loaded slider" 2020-11-09 12:00:58 +00:00
Adam Wight 91772fa904 Remove redundant TODO for revision bar click tests
These are already covered by history.js

Bug: T267206
Bug: T165831
Change-Id: Ic133df6e1ba398180eb3e9d8c0e3a6d6c4997a10
2020-11-09 11:47:16 +00:00
WMDE-Fisch 457661419a Improve dragPointer methods and use them in history spec
Change-Id: I9cf69c116e20eb34e5502c1886a05230eeb2697e
2020-11-09 12:40:28 +01:00
Adam Wight 32c920c240 Rewrite fragile wait
Directly measure the jQuery animation using its custom
pseudo-selector.  Previously, we had been relying on a side-effect.

Change-Id: I0db8077e9ed86d5be025d089e0467654789bb13f
2020-11-09 11:38:47 +00:00
WMDE-Fisch 5537fb963b Merge methods waiting for loaded slider
Change-Id: I06009d372c0691d2db8356e8cd7e7e8653ff51a0
2020-11-09 12:36:35 +01:00
Adam Wight 0c9ef9d88f Port timeline browser tests to js
`aria-disabled` is a bit of a hack, but maybe more robust than
coupling to the OOUI internal class name.

Bug: T267205
Change-Id: I5c1f547f2d25d9acaa74d63da03cd215be82bd71
2020-11-09 12:04:36 +01:00
Adam Wight c9f9023873 Move loop into browser code
This seems to be much faster.

Change-Id: I6caafd5a38c0dd319b8518538663862fb8d7cec8
2020-11-09 11:44:12 +01:00
Adam Wight 11bf368fc1 Port pointers browser tests to js
Bug: T267206
Change-Id: I7419c49786de87e4dd228af9bf281f6fcf061a88
2020-11-09 11:35:48 +01:00
Andrew Kostka eb09ac07b9 Port difflinks Ruby selenium tests to NodeJS
Bug: T267199
Change-Id: I357927144c42e67cc449fd1b9ce73ecd770c1481
2020-11-09 09:53:09 +00:00