Commit graph

523 commits

Author SHA1 Message Date
David Lynch 300d5ec486 MWInternalLinkAnnotation: test fragment behavior
Bug: T194463
Change-Id: I08d587c4e4cd12b1362915a22b37d9a0224de198
2018-05-18 20:55:35 +02:00
Ed Sanders 3dd3073bd2 Update VE core submodule to master (a8e0eef6d)
New changes:
a8e0eef6d Simplify usage of dummy target

Local changes:
Simplify usage of dummy target, ceating an MWDummyTarget, extending
DummyTarget instead of mw.ArticleTarget.

Depends-On: I01a6860387087db8149c73793e9bd4294d33aea8
Change-Id: I227486159fe416c219e2c37a1d054201084fe285
2018-04-30 13:05:02 -07:00
gopavasanth 3e541774e8 Change http://www.mediawiki.org/ to https://www.mediawiki.org/
In other files, links to mediawiki site are https://www.mediawiki.org/

Bug: T189687
Change-Id: I0279a7ffdb9544a87a11ffdab7ff5d5d38ea6035
2018-04-23 15:08:43 +00:00
James D. Forrester 58c5643f1e Update VE core submodule to master (a64ba1cc6)
New changes:
aee32648a Allow access to a fragment's async state
a64ba1cc6 Add extra copy/paste tests for <span> clipboard keys

Local changes:
* Fix signature of runSurfacePasteTest

Change-Id: Idbc2f2c25eaf0606c51d9dff8ec23562f5244c08
2018-04-17 16:02:04 +00:00
Ed Sanders 637d869d99 Convert href-less links to spans
Bug: T191598
Change-Id: I0993869ed53842f9de60ff7e68f79a69da1d23c7
2018-04-09 18:04:08 +00:00
James D. Forrester ac2b5e1ef8 Update VE core submodule to master (3ea11b8b1)
New changes:
f97bdb039 PlainTextStringTransferHandler: Allow as paste
5a0007e49 Expand ce.Surface tests for plain text pasting
bab28c8d3 Localisation updates from https://translatewiki.net.
82bc2c014 Fix language input design now that indicator-next is gone
c14c6ac56 Fix z-index of context elements in diff

Bug: T190590
Bug: T190916
Change-Id: Ibe8b1b62a8300f380b753f978bed6a6f8d520044
2018-04-06 10:52:54 -05:00
James D. Forrester ece430258b Update VE core submodule to master (dc98cb7ec)
New changes:
617708fe1 Update rel attribute checks to be aware of multiple rel values
c22428f81 ve.ce.LinearSelection: Don't throw exceptions only to catch on the next line
406db2ce3 Localisation updates from https://translatewiki.net.
33f94faf7 tests: Update ve.dm.Converter#getModelFromDom cases for new metadata behavior
d85bf0d68 Use documentFragments when DOM splicing
110519f1c Update documentation now describeChange can return jQuery
ff7fa5fa0 Change http://www.mediawiki.org to https://www.mediawiki.org
09faa4a3d Fix error with tabs per this:
a329edf67 Localisation updates from https://translatewiki.net.
da864cc5e demos: Separate out and fix mobile-dist
380cc90c5 VisualDiffs: Unit test for timeout behaviour
601173c02 Clarify the "Log" button label on the debug bar
c52a2e07e demos: Fix auto-save by only storing doc state if not recovered
1b8d2c457 Auto-save: Save and restore last known selection
9e279e77e Fix deprecated icon name 'alignCentre' > 'alignCenter'

Local changes:
tests: Update ve.dm.Converter#getModelFromDom cases for new metadata behavior

Bug: T189687
Bug: T189939
Depends-On: I2059d8ce9140b733ee92436de395d735ab06b9df
Change-Id: I3c210112c84e2d2bd8226de3dad195bf17afb4c2
2018-03-20 16:38:54 -07:00
Jforrester 16437646fe Merge "Update VE core submodule to master (ca771b8bc)" 2018-03-06 13:14:21 +00:00
James D. Forrester d144599cea Update VE core submodule to master (ca771b8bc)
New changes:
7551f6c66 [BREAKING CHANGE] Rename class ve.dm.IndexValueStore->ve.dm.HashValueStore

Local changes:
Follow-through rename of IndexValueStore->HashValueStore

Bug: T188900
Change-Id: If60d0c637fe92f0e7afe916c064fafb17980d063
2018-03-06 12:55:30 +00:00
jenkins-bot eb125877e2 Merge "Revert "For empty / whitespace-only headings, output <p> instead of <h#>"" 2018-03-06 12:22:31 +00:00
Ed Sanders a274bdb8f7 Revert "For empty / whitespace-only headings, output <p> instead of <h#>"
Parsoid now handles empty headings for us in
scrub_wikitext mode (which we use).

This reverts commit 884f301aa0.

Bug: T187913
Change-Id: I8690bbced64be76622929f78f9c9e0d8f85d4be8
2018-03-05 23:27:52 +00:00
David Lynch 09237b71ef mwExample: add test case for cross-document numberedlink paste
Bug: T188429
Change-Id: I722f30f07abd65dba93e9ba297b6933ef8ca79c2
2018-03-05 13:35:25 -06:00
David Lynch 795b428477 MWNumberedExternalLinkNode: set an explicit type
This lets copy-paste between documents retain the numbered status rather than
falling back on pasting "<a>[3]</a>".

Update the part of LinkCache which selects on mw:ExtLink, so it will handle
possible multiple values in the link rel.

Bug: T188429
Change-Id: Ia5e4c9fa45e94da9cbfcd2a42d017d0fda1c511f
2018-03-05 11:59:41 -06:00
Ed Sanders d17121d1f3 MWImageNode: getHashObject -> getHashObjectForRendering
The latter was introduced for this very purpose: defining
which attributes affect the rendering (in this case the
thumbnail URL). getHashObject should be reserved for making
full semantic comparisons.

Bonus: Don't distinguish between block/inline images
for URL caching purposes.

Change-Id: I6e6d2547a0d110f07c4d18b8179c168d8c251059
2018-02-24 12:44:53 +00:00
Ed Sanders 05a504887d Drop IE10 support
Change-Id: Ib1cb8fb32c499ba0bdc87ec55e1e2e95d2eb39ec
Depends-On: I68c882e64fba95d5e1bf41f64658fcef7524dcf5
2018-02-22 00:47:38 +00:00
James D. Forrester 4ce103abb9 Update VE core submodule to master (c5fddd508)
New changes:
21a5d55b8 [BREAKING CHANGE] Store metadata as block nodes in the main data list
2f9868aae Localisation updates from https://translatewiki.net.
7a224cf4b Remove <style> tags from pasteTarget ASAP
fb4e894b6 Workaround missing child selector in OOUI for menuLayout
fa4f35281 rebaser: Fix sequencing of server operations
931ee29f6 SurfaceSynchronizer: Also translate selections that are not mentioned in the change
d232b8f04 Disable undo/usurp within SurfaceSynchronizer
d1b7fc597 ve.dm.Change: Truncate stores as well as transactions on conflict
7606f684d rebaser: Only apply artificial delay to submitChange events
9473e8b42 Toolbars: Replace $.width with clientWidth/offsetWidth
abb8f2075 ve.ui.DesktopContext: Remove unused CSS
050414205 ve.ui.DesktopContext: Remove old unnecessary CSS
7b8cbb830 Failing test case for losing annotations
5447d33e4 CommentNode: Protect against call after teardown
bf98ca2b6 Rebaser: Use better hack for disabling history commands
90c07f46c Rebaser: uninitialize fully
2a59016e4 Move updatingName recursion guard out of debounce

Bug: T56299
Bug: T185532
Bug: T185544
Bug: T185599
Bug: T185716
Bug: T185747
Change-Id: I45251811e3fbb3323a25ca5cf364e4cb94aa1d01
2018-01-29 08:43:08 -08:00
David Lynch d97b734352 MWWikitextStringTransferHandler: Perform Parsoid cleanup on result
Parsoid markup delivered as a result of a paste was being handled differently.

Bug: T183173
Change-Id: Ic563d2c5cd1f663f35860892b369fb7ba34b9c55
2018-01-22 14:43:19 -08:00
James D. Forrester 0a7a845a42 doc: Bump copyright year
Change-Id: I0b299c840ede1a1b8552cecfc70c5760ab036181
2018-01-03 17:45:07 +00:00
Ed Sanders 169ce28c44 Remove duplication from browser whitelist
The whitelist isn't checked for blacklisted browsers,
so if all non-blacklisted browsers are whitelisted,
set the whitelist definition to all (null).

Change-Id: I8ee3569d9d5be2eda9153f1b087c1be385f93d9c
2017-10-12 16:54:46 +01:00
Željko Filipin fe09c22e33 Delete Ruby Selenium tests
Tests are broken most of the time. Ruby framework will be deprecated next month. Selenium tests
that are needed should be implemented in Node.js.

Bug: T164479
Change-Id: I8ec1d9b19b9538936c508daf2b50249a705b3170
2017-09-29 16:55:12 +02:00
James D. Forrester 2c70792c4f Replace constructive with progressive UI flag
Change-Id: Iae36e978978ed6642f44606a934c540cf5f8537f
2017-09-26 15:14:32 -04:00
Arlo Breault 3e96d8ed5a Use figure-inline instead of span for inline media
Bug: T118520
Depends-On: I0681c39301e52a3368b53d38ed518ac66e18f0d6
Change-Id: Id8ec5b77207f43fc7c379b35859dc09f264e2c04
2017-09-05 12:17:14 -04:00
David Chan c87abccdf9 MWLinkAction: Don't annotate close tags
Change-Id: I273838eba4cb259cf053ce88378da10b0e241155
2017-08-13 11:33:43 -04:00
Timo Tijhof d8a532c87e tests: Remove QUnit.newMwEnvironment from ve.test.utils.mwEnvironment
Two problems:
* At least one caller already calls QUnit.newMwEnvironment(), which means
  it runs twice which is unsupported and breaks If4141df10eae55 in core.
* It assumes the return will contain 'setup' and 'teardown', which
  is internal and also changes with If4141df10eae55 in core.

Using 'setup' and 'teardown' for this within VE-MW is fine.

First attempt is to simply remove it. Uses that already called
QUnit.newMwEnvironment are effectively unchanged. Uses that didn't
and only pass ve.test.utils.mwEnvironment to QUnit.module directly
will now run without core's QUnit.newMwEnvironment() setup/teardown.

If that breaks anything, we can add it back to those tests that actually
need it.

Change-Id: I9ef0368ba58daf1c7dc92d083ae79c108cc27638
2017-07-20 00:15:51 +00:00
Ed Sanders 835a775a49 build: Upgrade grunt-eslint from 19.0.0 to 20.0.0
Mostly indent and regex fixes.

Change-Id: Iaf9d02363c78cb71deec5c4cab53a05b67f60600
2017-07-18 12:55:33 +01:00
David Lynch 7e678dc81a Update VE core submodule to master (b528a5321)
New changes:
44d2d666c Remove custom icon sizing from block slugs
793d131f9 Ignore covering annotations when looking for plain text pastes
b0025f3ab dm.Document fixupInsertion: check suggestedParents as well
73ce638f1 ve.ui.TableLineContext: Fancier popups
9d54d531e Visual Diff: add internal list diff
4f4e121b5 DiffElement: Add hacky support for template-defined references

Local changes:

dm.SurfaceFragment tests: exercise fixupInsertion for mwHeadings

Core VE doesn't have any elements with suggestedParents, so make sure this is
properly tested.

Bug: T153315
Bug: T162819
Bug: T164017
Bug: T165865
Change-Id: I01489226d282abe71020e65358ead24fe07692f7
2017-06-28 20:57:19 +01:00
Ed Sanders c4f93b1411 Ensure MWInlineImages get the ve-ce-leafNode class
Without this class, offset calculations fail and model/view
sync can be lost.

Bug: T167009
Change-Id: Ie7b6551ac5a532949c14122b9ee7584a794af0f2
2017-06-26 12:43:23 +00:00
Ed Sanders 004ca16a8f Remove mobile browsers from the blacklist
They are already blacklisted by MW:
https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix_.28mobile.29

Change-Id: I8d6bfc415604a74b6da82d8c4b8f7d9ec7b9d89d
2017-05-22 14:58:54 +02:00
James D. Forrester 8e88db4232 Follow-up 7e72163ea: Fix CBN alien unit test I missed and force-merged
Whoops.

Change-Id: I21e30efd930458f6c1509e2f3d947f94d5ec5ad2
2017-05-21 16:32:08 +02:00
James D. Forrester 229d6cdf3b Update VE core submodule to master (fbeb0db2c)
New changes:
d61440346 Add logging to the rebase server and client
d1d2539ae rebaser: Add script to convert a log file to a test case
0896d5f05 lib: Update README files for OOjs and OOjs UI
045ae87fb Localisation updates from https://translatewiki.net.
04b276e16 VisualDiff: Make annotation whitespace trimming configurable
dd04912e5 Localisation updates from https://translatewiki.net.
11fc30709 MobileContext: fix button spacing
7898acd0b Fix typos and minor lint issues
4e3e2deb9 Avoid using the global namespace in test files
1ed81efa1 build: Update eslint to 0.4.0 and make a pass

Bug: T163473
Bug: T164166
Change-Id: I4bab4260d6b05ff0277cacd167186336acc02080
2017-05-10 10:02:54 -05:00
Ed Sanders 59b3f2e0dc Avoid global variables in tests and build
Change-Id: I44dd3c3980f88e660798962c4aa0229b62760796
2017-04-29 12:37:53 +01:00
Ed Sanders 381f143a27 QUnit: Remove all code for counting tests
Change-Id: Ifc20282a4da1aed9be2a9215c13f9a4e3e30168f
2017-04-28 17:03:20 +01:00
jenkins-bot 323f2479ea Merge "Add basic support for Parsoid HTML5 video/audio" 2017-04-28 15:26:44 +00:00
Ed Sanders 0c2bb3da9c Add basic support for Parsoid HTML5 video/audio
Change-Id: I30b787261c57e912e571170d8aa2d04726b6aa3a
2017-04-28 14:08:18 +01:00
David Lynch 88f3191926 tests: MWInternalLinkAnnotation getFragment
Also, fix docs for it. It could also return null for a missing fragment.

Change-Id: Ib6df379c5c3686a59026b6b66f26b3050ede231a
2017-04-27 11:21:58 -05:00
Ed Sanders a7477a869f Move out Cite-specific unit tests in WT transfer handler
Change-Id: Ibea6994a208e4b0b1022896eb31dd2f36f0fd6c6
2017-04-20 17:07:46 +01:00
James D. Forrester 3a382e6398 Update VE core submodule to master (fc46ed86f)
New changes:
719f8c667 ve.ce.DocumentNode: toggle all contentEditable properties, not just the outer one
35cadd7db Introduce single-line mode for surfaces
41fe321b2 Restore pointer-events comments for IE10 support
42f556820 Upgrade to jQuery v3
c1b8f142c Pass toolbarConfig position to actions toolbar by default
0d4c6a5fc Fix styling of table context in MW theme
db6eb4ebf Localisation updates from https://translatewiki.net.

Bug: T161944
Bug: T162808
Bug: T162830
Change-Id: I9b11673b4a77b7aebcdc282953d83ade08a8d8bd
2017-04-17 11:25:00 -07:00
James D. Forrester ca6cf4e914 ve.test.utils: Don't try to write user options in test suites
Bug: T162810
Change-Id: I8c2588fe4f7577b962200b583efd68f9cb80367e
2017-04-13 00:42:51 +00:00
James D. Forrester d1c24ce226 Update VE core submodule to master (da9c49395)
New changes:
dc0cad28c tests: Factor out ve.dm.TestRebaseClient/Server into their own files
98061108b Convert RebaseServer tests to data provider
3e746a51b Update OOjs to v2.0.0
16231a812 [BREAKING CHANGE] Drop support for Internet Explorer 9
64daeb4b5 Localisation updates from https://translatewiki.net.
3310e876c Update DOMPurify to 0.8.5
579033a83 Follow-up 16231a81: Drop IE9 support in createDocumentFromHtmlUsingIframe

Bug: T162277
Change-Id: If17c6a3fac0920db29f80069f344ffd6be46c3c9
2017-04-10 08:32:51 -07:00
Bartosz Dziewoński 5afd15b2cc ve.ui.MWLinkAction: Use delayed sequence
The trailing space at the end of the regexp is no longer required to
prevent matching (and executing) too soon. We also don't need to know
about trailing punctuation.

However, to prevent the match from ending in the middle of typing, we
have to allow for ' ' and '-' at the end of the match.

Tweaked tests to better match the intent now that a trailing space is
not included, but they pass without changes too, the command is quite
permissive.

Bug: T117165
Depends-On: Ie36046fa43ce49f8a25c99f2de577eb296d68a51
Depends-On: I2af0a738afa43295bf6d7d612cac4349bc6cd20d
Change-Id: I7c28d5c93b1a441387ad05a75846af83d2b21b6a
2017-03-15 21:58:13 +00:00
Ed Sanders d85e8da9e2 Remove MSIE from blacklist, already blacklisted upstream
We support all versions of IE that MW supports, so no need
for additional blacklisting.

Bug: T160494
Change-Id: I771459b4d6a0e2d5781a69a905a51323369b3b66
2017-03-15 17:42:34 +00:00
James D. Forrester 6ab24fe9f0 Update VE core submodule to master (41134af2b)
New changes:
1e12d0174 Generalize DiffElement logic (improves lists and tables)
24e0c7a94 Localisation updates from https://translatewiki.net.
32759ae86 Allow variable-length sequences without a fake space terminator, use for autolinking
82c204ba0 QUnit.assert.equalHash: Correctly compare JSON representation
2e5462610 DiffElement: Allow a node change to be an attribute change *and* a linear diff
41134af2b ve.ui.LinkAction: Allow autolinking ranges including trailing spaces again

Local changes:
Updated tests for 32759ae86: the autolinkUrl command no longer expects
trailing whitespace to be included in the range.

Bug: T117165
Bug: T149537
Bug: T158518
Change-Id: I5c2d5b97894fc93f49ce6270a198f3dfdcd09986
2017-03-14 12:47:32 -07:00
Bartosz Dziewoński b109c3405f ve.ui.MWWikitextStringTransferHandler: Avoid API call for magic links
Updated tests to stop assuming that MWWikitextStringTransferHandler
always goes through an API request and Parsoid.

Bug: T117165
Change-Id: I24dffaaf3b4051b1b807ec29ac456d24da2f1fe9
2017-03-13 19:54:19 +01:00
James D. Forrester 9b4e27a91c MWWikitextStringTransferHandler.test: Don't pass around an invalid doc
Even if it sounds cool, it isn't.

Change-Id: Ib6612bc0ea8d66fc1964b3a782ad56356da65952
2017-03-02 05:43:10 +00:00
Željko Filipin f776983204 Update tests to Selenium 3
Bug: T158074
Change-Id: I784fc7bb85f32d5e50b5abb500c51493839ccebe
2017-02-28 14:39:00 +01:00
Bartosz Dziewoński 2c78411113 ve.test.utils.createSurfaceFromDocument: Actually attach surface to DOM
Bug: T158141
Change-Id: I999bcdc7095a3b9e2a86a7d5eca0e1f3ceb175ef
2017-02-16 01:17:17 +01:00
Ed Sanders 1d7f929a91 Update VE core submodule to master (139bdf7)
New changes:
d79138b Overwrite selected content when pasting via DataTransferItem
3c4737f Ensure clipboard is never empty text
3b1339e Create dummy platform and target for tests
4d63c8e Pass text as string to insertDocument when detected as plain text

Local change:
Remove VE standalone module

Flow used to use it, but not anymore. Going forward no one should
be using it in MW.

Bug: T154020
Bug: T156302
Bug: T156498
Depends-On: I078c244ef524669da477a43f9b37c847252e5ad7
Change-Id: Ifc4be16269f819890f2dcdddbbdebf9694ad2868
2017-01-29 18:50:47 +00:00
James D. Forrester 122f49b2dd build: Bump file copyright notices for 2017
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -08:00
Ed Sanders 2ee9e62a4d Use upstream media search widget from core
Bug: T140166
Depends-On: If53ef7f4b62c7a5d4da565c14dd2a353778694e5
Change-Id: I28845e9c143e78d3a377f067606c62da212e3bf1
2016-11-29 17:19:14 +00:00
Ed Sanders 37ccaca2ec eslint: Re-enable wrap-iife and partially enable dot-notation
Change-Id: I4420d66f528dcb18ebe2b9f63996661b2969f833
2016-11-12 14:43:43 +00:00