mediawiki-extensions-Visual.../modules/ve-mw/tests/ui
Bartosz Dziewoński 461c76981f Rewrite mw.libs.ve.getTargetDataFromHref with URL API
At first I was going for a more minimal replacement of mw.Uri with URL,
until I discovered that this code depends on a mw.Uri bug that would be
difficult to replicate:

  // Expected: Relative URLs are accepted
  new mw.Uri( '/foo' ).toString() // => 'https://localhost/foo'
  // Expected: Protocol is optional
  new mw.Uri( 'example.com/foo' ).toString() // => 'https://example.com/foo'
  // Unexpected: Treated as empty domain with no protocol rather than relative URL
  new mw.Uri( './foo' ).toString() // => 'https://./foo'

So I went for a bigger rewrite to preserve the intent rather than the
exact logic.

I had to change some test cases to use more realistic fake data. They
previously relied on bugs in our URL handling to pass despite the base
URLs being incorrect, particularly for non-short URLs (see T270219).
In my testing non-short URLs behave the same as before in practice.

Depends-On: I07a8c097dba0f5572c0aedf4febdf1434063ea6f
Bug: T325249
Change-Id: I232361266c1dda795b88018c3aaa3d9ecbe42b93
2023-01-23 14:59:23 +00:00
..
actions tests: Use ve.test.utils.newMwEnvironment() 2022-03-10 01:44:11 +00:00
datatransferhandlers Rewrite mw.libs.ve.getTargetDataFromHref with URL API 2023-01-23 14:59:23 +00:00
dialogs Remove $wgVisualEditorTransclusionDialogInlineDescriptions feature flag 2022-06-15 12:09:47 +02:00
inspectors tests: Use ve.test.utils.newMwEnvironment() 2022-03-10 01:44:11 +00:00
layouts Remove dysfunctional "no outline" mode from template dialog 2022-07-25 14:45:18 +00:00
pages Remove invisible stuff from BookletLayout OutlineItems 2022-06-20 09:31:53 +00:00
widgets Differ between setting and highlighting a parameter 2022-07-12 10:18:56 +00:00
ve.ui.DiffElement.test.js Update VE core submodule to master (b7ff5aac0) 2023-01-23 15:57:59 +01:00