Commit graph

144 commits

Author SHA1 Message Date
jhall ba90be7d7a [browser test] Headings now include a buffer space
Confirmed with James F that this was an intentional Parsoid
change (and not a bug).

Change-Id: I21d7eba4675eaf7250267003516585e96069b4e6
2013-12-06 20:55:58 +00:00
Timo Tijhof cf7f2b141d Set up node-jscs, pass it, and configure in local Gruntfile
Let's experiment with this via our local Gruntfile. If it works
fine we can install it in Jenkins (similar to node-csslint).

Verify through $ npm install && npm test;

Fixed all outstanding violations.

Also:
* Added syntaxhighight to ignore.
* Added imetests (which contain unformatted JSON) to ignore.
* In ve.dm.ModelRegistry#matchTypeRegExps, removed redundant
  !! cast from the [+!!withFunc] statement which was hitting
  a bug in node-jscs. All callers to this local private function
  pass a literal boolean true/false so no need to cast it.
* Removed "/* key .. , value */" from ve.setProp, though this
  wasn't caught by node-jscs, found it when searching for " , ".
* Made npm.devDependencies fixed instead of using tilde-ranges.
  This too often leads to strange bugs or sudden changes. Fixed
  them at the version they were currently ranging to.

Bug: 54218
Change-Id: Ib2630806f3946874c8b01e58cf171df83a28da29
2013-12-06 10:37:27 -08:00
Zeljko Filipin e195aa7bb5 Updated Ruby gems
Checking if selenium-webdriver 2.38.0 fixes cursor problem in Chrome.

Change-Id: I4467ed4ec1b3d7007f4293e3791f41502ce05959
2013-12-06 16:11:36 +00:00
cmcmahon e54170929d [browser test] Chrome seems to not honor when_present() correctly
1) Added another sleep statement which seems to fix the issue locally.
2) Modified a link page element identifier.

Change-Id: Ic0006f18752d3625bc244d924a7a8a9fac2d5221
2013-12-06 15:02:53 +00:00
jenkins-bot d17e031d46 Merge "Revert "Remove dual-type support for Languages and Categories"" 2013-12-06 04:03:10 +00:00
Jforrester d8dcafe25b Revert "Remove dual-type support for Languages and Categories"
'Cos Parsoid caches things for ages.

This reverts commit 114a24f1d3.

Change-Id: I8b2f4d982becea36ddc06b29b3a48660fa0f3a44
2013-12-06 04:01:00 +00:00
jenkins-bot 68ad762613 Merge "Remove dual-type support for Languages and Categories" 2013-12-05 23:01:32 +00:00
jenkins-bot 2554487f41 Merge "Prevent content selections ending up inside handlesOwnChildren nodes" 2013-12-05 18:02:43 +00:00
mayankmadan 306665fa72 [browser test] Changed readme file so that it points to mediawiki-selenium
Bug: 56089
Change-Id: Ia0f5d0a36337d883c4066a866aada98d849b8315
2013-12-05 17:52:58 +00:00
jhall 02ae003f2b [Browser test] Removing hard-coded MEDIAWIKI_USER value
Per this QA mail list discussion:
http://lists.wikimedia.org/pipermail/qa/2013-December/000799.html

Change-Id: Ide3bafe9b69eb5769eb99d0a3989d0e909f512ea
2013-12-05 16:56:29 +00:00
Ed Sanders 62e9b6a939 Prevent content selections ending up inside handlesOwnChildren nodes
The delete logic sees the caption inside the image as a valid place to
put a cursor and therefore a valid range to delete up to. This means
paragraphs can be merged into image captions by backspacing them in.

Add in a flag that keeps track of whether we are in a handlesOwnChildren
node so we can skip over them.

Bug: 57927
Change-Id: I19e91d2d3a871806d207cbd419f4a45e41d69dc0
2013-12-05 16:45:28 +00:00
James D. Forrester 114a24f1d3 Remove dual-type support for Languages and Categories
The new form was implemented in Parsoid and deployed in October, so enough time
has passed that there is no longer any need for VisualEditor to support the old
type.

Bug: 56009
Change-Id: Ief2e584345ccdb0e7eb44ab16c4bc14f7c14f5ec
2013-12-04 18:49:48 -08:00
Ed Sanders e01e2e045b Always use #getDocumentNode.
Because if you only sometimes use a getter you're just wasting your time!

Change-Id: Idd38976f77b58e322d527cecca9f9c36e3ad9318
2013-12-04 22:55:26 +00:00
Ed Sanders 6d34e344ee getDataFromDom -> getModelFromDom
Following on from getDomFromModel, this returns a document model
instead of element linear data. The only instance that hasn't been
replaced is in rich paste, where we need to sanitize the converted
data before constructing the document model.

This should be cleaned up in a later commit.

Change-Id: I37a2b641632af2cb515e3409deed5cd1fa358af5
2013-12-04 14:46:34 -08:00
Ed Sanders 86922f8ca8 Change signature of getDomFromData and rename
Currently it takes 4 arguments which are all properties
of the document model, so just pass the model instead and
access the properties later. Rename to getDomFromModel.

Change-Id: I0c378a04dc08b9b90bdc3984f8fa8c4acfe0b667
2013-12-04 16:30:40 +00:00
jhall 1b847c44dd [Browser test] Restoring a missing page element
Earlier check-in for a VE media interface test
inadvertently re-named a page element that
should not have changed.

Change-Id: Iac1ef365e9cb3912977c8a89f3158ad9d122c93d
2013-12-04 16:03:15 +00:00
jenkins-bot 12d2210cb3 Merge "[Browser tests] Prefer double-quoted strings in Ruby code" 2013-12-04 12:17:01 +00:00
jhall 73198b52d0 [Browser test] New test for VE media interface
Updated to capture changed iframe positioning of some page controls.

Change-Id: I3864e04935eca1ae7c9d70df42fd34ce58e90d66
2013-12-03 23:12:57 +00:00
Ed Sanders 96e2313e6e Genericise runSurfaceHandleDeleteTest to work with other 'handle' methods
We will want to reuse this test runner for handleEnter and handleInsertion.

Change-Id: I7489bf2d20fa17b1c164ff20e0cfcd9b9d5102d2
2013-12-02 15:52:44 +00:00
cmcmahon c65a683ecf [browser test] more shuffling of elements among iframes
Change-Id: I1a60e2370fc436702d983705d7360563f5483242
2013-11-27 09:05:58 -07:00
mayankmadan 2af79b6108 [Browser tests] Prefer double-quoted strings in Ruby code
Bug: 57597
Change-Id: I4ddc3f20d03bf3e66b04234be529c3eaa29be9e0
2013-11-27 16:01:23 +05:30
cmcmahon 0a091193f9 [browser test] elements moved among iframes
Change-Id: Icc9f3f4422dfed063073724f8b610e75fd967b2d
2013-11-26 18:55:21 -07:00
Ed Sanders 24a95b102d Add fixUpInsertion to newFromDocumentReplace
In order to do this we have to separate out the removal
operation from NDFR, so it becomes newFromDocumentInsertion
(again, although actually, for the first time). As NFDI is
an insertion we can just run fixUpInsertion on the data
part of it.

In order for the removal operation to be a proper removal
we have to allow metadata removal (the default is to merge it).

Change-Id: I16d575b61b9796e7e889f2c27cfe02b4a40b7639
2013-11-20 11:24:06 +00:00
Roan Kattouw cde3304864 Recompute auto-numbered reference listKeys when merging internalLists
This fixes some of the problems with pasting references.

It's a bit overzealous in that references get renumbered even when
replacing, which is unnecessary but doesn't actually have any
noticeable effect.

Unfortunately, the internal list state depends so much on the converter
having run that we now need to add yet another hack, to set the counter
to the appropriate value.

Change-Id: I3c6514ce600af4f4c037f419554d34b5a5c86a63
2013-11-20 16:50:48 +05:30
Jeff Hall c027af9e12 [Browser test] Expanding test with additional text markup types
Change-Id: I3141993f1527dfdeea66ac2a52ee7c8be384f198
2013-11-19 13:42:07 -08:00
Jeff Hall 583936f82f [Browser test] Add Review Changes workflow per reviewer comment
Change-Id: I50d0defb3c4f51f317a497d0f805859e961b8f7f
2013-11-19 10:28:26 +01:00
cmcmahon 2d6864e19f [browser test] Additional UTF-8 editing test string
Change-Id: Iaf894043462e114e0845fc3016396ab4f51fa21b
2013-11-13 18:46:44 +00:00
cmcmahon d2165ad8fb [browser test] identifier for Link close element changed
Change-Id: Ia923c775315af9f0cd7017e0b02e621b3d9112b4
2013-11-13 00:23:50 +00:00
cmcmahon f8d0cbded5 [browser test] one more variable string no longer hard coded
Change-Id: Ifa4917442707d0c83799ea7e018ae1c4aa7bb4c6
2013-11-08 09:19:30 -07:00
cmcmahon 53cb5a3ffd [browser test] edit string no longer hard coded
Change-Id: I8d9e9ae2cafa18a9a680abdca8c4224ef10a08b6
2013-11-08 07:35:38 -07:00
cmcmahon ca2a7ce38f [browser test] input string no longer hard coded
Change-Id: I361b3ea025e405d1fc5a2e12c3c85d177147b90d
2013-11-06 17:08:42 -07:00
cmcmahon 3754bc77e4 [browser test] add a test to edit with utf8 strings
Change-Id: I88e475ee98bc8f696c1a1d0ad108c12a48fe7eee
2013-11-05 07:45:06 -07:00
jenkins-bot 154726deea Merge "Fix metadata issues in newFromDocumentReplace" 2013-11-04 14:55:37 +00:00
Roan Kattouw 64e5016423 Fix metadata issues in newFromDocumentReplace
* Our metadata insertions now need to be the same length as the data
  insertion, not one more, so:
** Remove the +1 in the listMetadata splice
** Shorten the metadata variable by dropping the merging of the
   metadata right before and right after the internal list; it was
   also including the metadata right after the internal list twice
*** We still need to deal with this in some way though, left a TODO
** Fix the metadata insertion test for these changes
* Fix null reference keys in the test data; we made all references
  keyed a while ago, but this test data was never updated for that
** The remapping of reference data doesn't remap auto/N keys yet,
   left a FIXME for that

Change-Id: I8ef4e6ee7c1808574d81d0b83294848afd400cd7
2013-11-04 14:37:26 +00:00
Zeljko Filipin efa741baea [browser test] Updated Ruby gems
Change-Id: I8c298efe8dd1abbb42b5c42ee0b8075a0aad9acf
2013-11-04 15:36:03 +01:00
Zeljko Filipin abc5b9920d [browser test] Removed visual_editor from file names
No longer needed, since the files are now in VisualEditor repository.

Change-Id: Id677c2630ff5a1ae2d49f62058d0d4fdebeaf381
2013-10-31 16:22:08 +00:00
jenkins-bot 5d55d3a5b9 Merge "[browser test] changes make it convenient to click Refs icon" 2013-10-30 17:32:34 +00:00
cmcmahon 86745454a6 [browser test] changes make it convenient to click Refs icon
Change-Id: I9a9ca50357601e9d254a8c86e172a497ca839387
2013-10-30 10:35:57 -06:00
cmcmahon 937f68aaa8 [browser test] changes make it more convenient to click Transclusion icon
Change-Id: I21e5a0f11f58c7f199d9c36c2ac65705c295b397
2013-10-30 16:27:15 +00:00
cmcmahon e4549a14b3 [browser test] disabled indent/outdent are now spans not links
Change-Id: I8b8788f4c92219480936360efe7153ab093c274e
2013-10-30 09:49:39 -06:00
cmcmahon 2fd5507f99 [browser test] remove OS-specific part of elements using :title
Change-Id: I1d6db5b6bf9bec44f5646ed8f7096ce462a5707c
2013-10-29 09:47:44 -06:00
jenkins-bot 9ae15a77b7 Merge "[browser test] fixed Cucumber tags" 2013-10-29 06:20:59 +00:00
Roan Kattouw c9b959e878 [Browser tests] Fix a couple of stray ve-ui classes that moved to oo-ui
Change-Id: Ie89c0b1312b3150e7a3d9144d771a8996f0f606d
2013-10-28 23:10:42 -07:00
Trevor Parscal e83dc3f8fc Use a toolbar for the actions buttons in ve.init.mw.ViewPageTarget
Change-Id: I260059802379d8cab8ca175b7d7d32813e3ff10a
2013-10-29 05:57:52 +00:00
Trevor Parscal 230d88d182 Isolate links within OO.ui.Tool
This allows other content to be added without it being nested inside an
<a> which results undesired visual and functional effects.

Change-Id: I667878fe4ae682712094a61bb4b411ac5fb999c7
2013-10-28 22:55:32 -07:00
Zeljko Filipin 781e788b9d [browser test] fixed Cucumber tags
There was no space between a couple of tags in a couple of files.

Change-Id: I1fadc61e41a4a0e210739106f5f8b28b2a460f01
2013-10-29 06:55:24 +01:00
jenkins-bot 40da34aa36 Merge "Split oojs-ui from ve.ui" 2013-10-29 05:45:02 +00:00
Trevor Parscal d2dfb9ac4f Split oojs-ui from ve.ui
* Move and rename generic parts of ve.ui to OO.ui
* We now have a UI test suite because ve.Element (outside ve.ui)
  is now part of oojs-ui, so it needs a test suite.
* Added to the MW test run (just like we do for unicodejs).
* Updated csslint config (also added ve-mw and syntaxhighlight
  which were missing).

oojs-ui still depends on the TriggerRegistry in VE, this is addressed
in a follow-up commit.

Change-Id: Iec147155c1ddf20b73a4d15d87b8742207032312
2013-10-28 22:40:08 -07:00
cmcmahon 192b9d3c1e [browser test] workaround for VE bug probably caused by https://bugzilla.wikimedia.org/show_bug.cgi?id=56274
Change-Id: I2b872966399ecb6eb60da619eb9af52ae33f3aca
2013-10-28 20:42:46 +00:00
jenkins-bot cc8010e556 Merge changes Ia6ca85bc,I919135eb,Ia18bd8fc,I49dfc81f,Ia234f174,I06425e2c,Ia192331b,I5624ae07
* changes:
  Get rid of dmRendering hack in ve.ce.MWInternalLinkAnnotation
  Render resolved URLs for href and src attributes in CE
  Give ce.Annotations a reference to their ce.ContentBranchNode
  Track the original HTMLDocument in ve.dm.Document
  Create CE nodes and annotations with the correct $$
  Add ve.resolveUrl for URL resolution
  Don't render href as src in MWBlockImageNode
  Rename 'html' to 'body' in converter tests
2013-10-28 18:55:11 +00:00